2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for GNU tar 1.27.
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.27'
584 PACKAGE_STRING='GNU tar 1.27'
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
657 DEFAULT_QUOTING_STYLE
660 DEFAULT_ARCHIVE_FORMAT
663 TAR_COND_XATTR_H_FALSE
664 TAR_COND_XATTR_H_TRUE
665 GNULIB_TEST_WARN_CFLAGS
676 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
679 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE
680 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE
681 LIBUNISTRING_UNIWIDTH_H
682 LIBUNISTRING_UNITYPES_H
684 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
686 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
687 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
688 TIME_H_DEFINES_STRUCT_TIMESPEC
689 NEXT_AS_FIRST_DIRECTIVE_TIME_H
691 GL_GENERATE_SYSEXITS_H_FALSE
692 GL_GENERATE_SYSEXITS_H_TRUE
695 NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H
698 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
700 NEXT_AS_FIRST_DIRECTIVE_STRING_H
702 HAVE_DECL_STRNCASECMP
706 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
708 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
710 GL_GENERATE_STDARG_H_FALSE
711 GL_GENERATE_STDARG_H_TRUE
713 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
715 GL_GENERATE_STDALIGN_H_FALSE
716 GL_GENERATE_STDALIGN_H_TRUE
718 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
720 GL_GENERATE_SELINUX_CONTEXT_H_FALSE
721 GL_GENERATE_SELINUX_CONTEXT_H_TRUE
723 NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H
724 NEXT_SELINUX_SELINUX_H
727 REPLACE_PTHREAD_SIGMASK
729 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
730 HAVE_STRUCT_SIGACTION_SA_SIGACTION
736 HAVE_POSIX_SIGNALBLOCKING
739 GNULIB_SIGNAL_H_SIGPIPE
741 GNULIB_PTHREAD_SIGMASK
745 GL_GENERATE_STDBOOL_H_FALSE
746 GL_GENERATE_STDBOOL_H_TRUE
755 HAVE_DECL_LOCALTIME_R
837 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
840 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
842 GL_GENERATE_STDDEF_H_FALSE
843 GL_GENERATE_STDDEF_H_TRUE
855 LOCALCHARSET_TESTS_ENVIRONMENT
857 HAVE_LANGINFO_YESEXPR
859 HAVE_LANGINFO_T_FMT_AMPM
860 HAVE_LANGINFO_CODESET
862 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H
870 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
883 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
885 UINT64_MAX_EQ_ULONG_MAX
886 UINT32_MAX_LT_UINTMAX_MAX
889 INT64_MAX_EQ_LONG_MAX
890 INT32_MAX_LT_INTMAX_MAX
900 GL_GENERATE_STDINT_H_FALSE
901 GL_GENERATE_STDINT_H_TRUE
910 HAVE_SIGNED_SIG_ATOMIC_T
913 BITSIZEOF_SIG_ATOMIC_T
916 APPLE_UNIVERSAL_BUILD
920 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
925 HAVE_UNSIGNED_LONG_LONG_INT
927 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
929 REPLACE_STRUCT_TIMEVAL
937 GNULIB_GL_UNISTD_H_GETOPT
940 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
942 WINDOWS_64_BIT_ST_SIZE
943 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
946 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
955 REPLACE_STDIO_WRITE_FUNCS
956 REPLACE_STDIO_READ_FUNCS
965 REPLACE_OBSTACK_PRINTF
990 HAVE_DECL_OBSTACK_PRINTF
996 GNULIB_VSPRINTF_POSIX
1000 GNULIB_VFPRINTF_POSIX
1007 GNULIB_STDIO_H_SIGPIPE
1008 GNULIB_STDIO_H_NONBLOCKING
1009 GNULIB_SPRINTF_POSIX
1023 GNULIB_OBSTACK_PRINTF_POSIX
1024 GNULIB_OBSTACK_PRINTF
1040 GNULIB_FPRINTF_POSIX
1049 GL_GENERATE_FNMATCH_H_FALSE
1050 GL_GENERATE_FNMATCH_H_TRUE
1053 GL_GENERATE_FLOAT_H_FALSE
1054 GL_GENERATE_FLOAT_H_TRUE
1056 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1058 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1108 GL_GENERATE_ERRNO_H_FALSE
1109 GL_GENERATE_ERRNO_H_TRUE
1111 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1114 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1117 PRAGMA_SYSTEM_HEADER
1118 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1144 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1146 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1147 UNISTD_H_HAVE_WINSOCK2_H
1168 REPLACE_GETDOMAINNAME
1179 HAVE_DECL_SETHOSTNAME
1180 HAVE_DECL_GETUSERSHELL
1181 HAVE_DECL_GETPAGESIZE
1182 HAVE_DECL_GETLOGIN_R
1183 HAVE_DECL_GETDOMAINNAME
1222 GNULIB_UNISTD_H_SIGPIPE
1223 GNULIB_UNISTD_H_NONBLOCKING
1249 GNULIB_GETDTABLESIZE
1250 GNULIB_GETDOMAINNAME
1279 REPLACE_CANONICALIZE_FILE_NAME
1284 HAVE_STRUCT_RANDOM_DATA
1306 HAVE_DECL_GETLOADAVG
1307 HAVE_CANONICALIZE_FILE_NAME
1318 GNULIB_SECURE_GETENV
1321 GNULIB_REALLOC_POSIX
1338 GNULIB_CANONICALIZE_FILE_NAME
1442 GL_GENERATE_ALLOCA_H_FALSE
1443 GL_GENERATE_ALLOCA_H_TRUE
1446 GL_COND_LIBTOOL_FALSE
1447 GL_COND_LIBTOOL_TRUE
1474 AM_DEFAULT_VERBOSITY
1485 INSTALL_STRIP_PROGRAM
1527 program_transform_name
1540 enable_option_checking
1542 enable_dependency_tracking
1549 with_packager_version
1550 with_packager_bug_reports
1563 with_libiconv_prefix
1566 enable_backup_scripts
1568 ac_precious_vars='build_alias
1581 DEFAULT_ARCHIVE_FORMAT
1584 DEFAULT_QUOTING_STYLE'
1587 # Initialize some variables set by options.
1589 ac_init_version=false
1590 ac_unrecognized_opts=
1591 ac_unrecognized_sep=
1592 # The variables have the same names as the options, with
1593 # dashes changed to underlines.
1594 cache_file=/dev/null
1601 program_transform_name=s,x,x,
1609 # Installation directory options.
1610 # These are left unexpanded so users can "make install exec_prefix=/foo"
1611 # and all the variables that are supposed to be based on exec_prefix
1612 # by default will actually change.
1613 # Use braces instead of parens because sh, perl, etc. also accept them.
1614 # (The list follows the same order as the GNU Coding Standards.)
1615 bindir='${exec_prefix}/bin'
1616 sbindir='${exec_prefix}/sbin'
1617 libexecdir='${exec_prefix}/libexec'
1618 datarootdir='${prefix}/share'
1619 datadir='${datarootdir}'
1620 sysconfdir='${prefix}/etc'
1621 sharedstatedir='${prefix}/com'
1622 localstatedir='${prefix}/var'
1623 includedir='${prefix}/include'
1624 oldincludedir='/usr/include'
1625 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1626 infodir='${datarootdir}/info'
1631 libdir='${exec_prefix}/lib'
1632 localedir='${datarootdir}/locale'
1633 mandir='${datarootdir}/man'
1639 # If the previous option needs an argument, assign it.
1640 if test -n "$ac_prev"; then
1641 eval $ac_prev=\$ac_option
1647 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1652 # Accept the important Cygnus configure options, so we can diagnose typos.
1654 case $ac_dashdash$ac_option in
1658 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1660 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1661 bindir=$ac_optarg ;;
1663 -build | --build | --buil | --bui | --bu)
1664 ac_prev=build_alias ;;
1665 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1666 build_alias=$ac_optarg ;;
1668 -cache-file | --cache-file | --cache-fil | --cache-fi \
1669 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1670 ac_prev=cache_file ;;
1671 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1672 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1673 cache_file=$ac_optarg ;;
1675 --config-cache | -C)
1676 cache_file=config.cache ;;
1678 -datadir | --datadir | --datadi | --datad)
1680 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1681 datadir=$ac_optarg ;;
1683 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1684 | --dataroo | --dataro | --datar)
1685 ac_prev=datarootdir ;;
1686 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1687 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1688 datarootdir=$ac_optarg ;;
1690 -disable-* | --disable-*)
1691 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1692 # Reject names that are not valid shell variable names.
1693 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1694 as_fn_error $? "invalid feature name: $ac_useropt"
1695 ac_useropt_orig=$ac_useropt
1696 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1697 case $ac_user_opts in
1699 "enable_$ac_useropt"
1701 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1702 ac_unrecognized_sep=', ';;
1704 eval enable_$ac_useropt=no ;;
1706 -docdir | --docdir | --docdi | --doc | --do)
1708 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1709 docdir=$ac_optarg ;;
1711 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1713 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1714 dvidir=$ac_optarg ;;
1716 -enable-* | --enable-*)
1717 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1718 # Reject names that are not valid shell variable names.
1719 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1720 as_fn_error $? "invalid feature name: $ac_useropt"
1721 ac_useropt_orig=$ac_useropt
1722 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1723 case $ac_user_opts in
1725 "enable_$ac_useropt"
1727 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1728 ac_unrecognized_sep=', ';;
1730 eval enable_$ac_useropt=\$ac_optarg ;;
1732 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1733 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1734 | --exec | --exe | --ex)
1735 ac_prev=exec_prefix ;;
1736 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1737 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1738 | --exec=* | --exe=* | --ex=*)
1739 exec_prefix=$ac_optarg ;;
1741 -gas | --gas | --ga | --g)
1742 # Obsolete; use --with-gas.
1745 -help | --help | --hel | --he | -h)
1746 ac_init_help=long ;;
1747 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1748 ac_init_help=recursive ;;
1749 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1750 ac_init_help=short ;;
1752 -host | --host | --hos | --ho)
1753 ac_prev=host_alias ;;
1754 -host=* | --host=* | --hos=* | --ho=*)
1755 host_alias=$ac_optarg ;;
1757 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1759 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1761 htmldir=$ac_optarg ;;
1763 -includedir | --includedir | --includedi | --included | --include \
1764 | --includ | --inclu | --incl | --inc)
1765 ac_prev=includedir ;;
1766 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1767 | --includ=* | --inclu=* | --incl=* | --inc=*)
1768 includedir=$ac_optarg ;;
1770 -infodir | --infodir | --infodi | --infod | --info | --inf)
1772 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1773 infodir=$ac_optarg ;;
1775 -libdir | --libdir | --libdi | --libd)
1777 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1778 libdir=$ac_optarg ;;
1780 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1781 | --libexe | --libex | --libe)
1782 ac_prev=libexecdir ;;
1783 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1784 | --libexe=* | --libex=* | --libe=*)
1785 libexecdir=$ac_optarg ;;
1787 -localedir | --localedir | --localedi | --localed | --locale)
1788 ac_prev=localedir ;;
1789 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1790 localedir=$ac_optarg ;;
1792 -localstatedir | --localstatedir | --localstatedi | --localstated \
1793 | --localstate | --localstat | --localsta | --localst | --locals)
1794 ac_prev=localstatedir ;;
1795 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1796 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1797 localstatedir=$ac_optarg ;;
1799 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1801 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1802 mandir=$ac_optarg ;;
1804 -nfp | --nfp | --nf)
1805 # Obsolete; use --without-fp.
1808 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1809 | --no-cr | --no-c | -n)
1812 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1813 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1816 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1817 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1818 | --oldin | --oldi | --old | --ol | --o)
1819 ac_prev=oldincludedir ;;
1820 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1821 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1822 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1823 oldincludedir=$ac_optarg ;;
1825 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1827 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1828 prefix=$ac_optarg ;;
1830 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1831 | --program-pre | --program-pr | --program-p)
1832 ac_prev=program_prefix ;;
1833 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1834 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1835 program_prefix=$ac_optarg ;;
1837 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1838 | --program-suf | --program-su | --program-s)
1839 ac_prev=program_suffix ;;
1840 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1841 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1842 program_suffix=$ac_optarg ;;
1844 -program-transform-name | --program-transform-name \
1845 | --program-transform-nam | --program-transform-na \
1846 | --program-transform-n | --program-transform- \
1847 | --program-transform | --program-transfor \
1848 | --program-transfo | --program-transf \
1849 | --program-trans | --program-tran \
1850 | --progr-tra | --program-tr | --program-t)
1851 ac_prev=program_transform_name ;;
1852 -program-transform-name=* | --program-transform-name=* \
1853 | --program-transform-nam=* | --program-transform-na=* \
1854 | --program-transform-n=* | --program-transform-=* \
1855 | --program-transform=* | --program-transfor=* \
1856 | --program-transfo=* | --program-transf=* \
1857 | --program-trans=* | --program-tran=* \
1858 | --progr-tra=* | --program-tr=* | --program-t=*)
1859 program_transform_name=$ac_optarg ;;
1861 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1863 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1864 pdfdir=$ac_optarg ;;
1866 -psdir | --psdir | --psdi | --psd | --ps)
1868 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1871 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1872 | -silent | --silent | --silen | --sile | --sil)
1875 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1877 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1879 sbindir=$ac_optarg ;;
1881 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1882 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1883 | --sharedst | --shareds | --shared | --share | --shar \
1885 ac_prev=sharedstatedir ;;
1886 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1887 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1888 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1890 sharedstatedir=$ac_optarg ;;
1892 -site | --site | --sit)
1894 -site=* | --site=* | --sit=*)
1897 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1899 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1900 srcdir=$ac_optarg ;;
1902 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1903 | --syscon | --sysco | --sysc | --sys | --sy)
1904 ac_prev=sysconfdir ;;
1905 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1906 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1907 sysconfdir=$ac_optarg ;;
1909 -target | --target | --targe | --targ | --tar | --ta | --t)
1910 ac_prev=target_alias ;;
1911 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1912 target_alias=$ac_optarg ;;
1914 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1917 -version | --version | --versio | --versi | --vers | -V)
1918 ac_init_version=: ;;
1921 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1922 # Reject names that are not valid shell variable names.
1923 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1924 as_fn_error $? "invalid package name: $ac_useropt"
1925 ac_useropt_orig=$ac_useropt
1926 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1927 case $ac_user_opts in
1931 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1932 ac_unrecognized_sep=', ';;
1934 eval with_$ac_useropt=\$ac_optarg ;;
1936 -without-* | --without-*)
1937 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1938 # Reject names that are not valid shell variable names.
1939 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1940 as_fn_error $? "invalid package name: $ac_useropt"
1941 ac_useropt_orig=$ac_useropt
1942 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1943 case $ac_user_opts in
1947 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1948 ac_unrecognized_sep=', ';;
1950 eval with_$ac_useropt=no ;;
1953 # Obsolete; use --with-x.
1956 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1957 | --x-incl | --x-inc | --x-in | --x-i)
1958 ac_prev=x_includes ;;
1959 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1960 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1961 x_includes=$ac_optarg ;;
1963 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1964 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1965 ac_prev=x_libraries ;;
1966 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1967 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1968 x_libraries=$ac_optarg ;;
1970 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1971 Try \`$0 --help' for more information"
1975 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1976 # Reject names that are not valid shell variable names.
1977 case $ac_envvar in #(
1978 '' | [0-9]* | *[!_$as_cr_alnum]* )
1979 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1981 eval $ac_envvar=\$ac_optarg
1982 export $ac_envvar ;;
1985 # FIXME: should be removed in autoconf 3.0.
1986 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1987 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1988 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1989 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1995 if test -n "$ac_prev"; then
1996 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1997 as_fn_error $? "missing argument to $ac_option"
2000 if test -n "$ac_unrecognized_opts"; then
2001 case $enable_option_checking in
2003 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
2004 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2008 # Check all directory arguments for consistency.
2009 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2010 datadir sysconfdir sharedstatedir localstatedir includedir \
2011 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2012 libdir localedir mandir
2014 eval ac_val=\$$ac_var
2015 # Remove trailing slashes.
2018 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2019 eval $ac_var=\$ac_val;;
2021 # Be sure to have absolute directory names.
2023 [\\/$]* | ?:[\\/]* ) continue;;
2024 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
2026 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
2029 # There might be people who depend on the old broken behavior: `$host'
2030 # used to hold the argument of --host etc.
2031 # FIXME: To remove some day.
2034 target=$target_alias
2036 # FIXME: To remove some day.
2037 if test "x$host_alias" != x; then
2038 if test "x$build_alias" = x; then
2039 cross_compiling=maybe
2040 elif test "x$build_alias" != "x$host_alias"; then
2046 test -n "$host_alias" && ac_tool_prefix=$host_alias-
2048 test "$silent" = yes && exec 6>/dev/null
2051 ac_pwd=`pwd` && test -n "$ac_pwd" &&
2052 ac_ls_di=`ls -di .` &&
2053 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
2054 as_fn_error $? "working directory cannot be determined"
2055 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2056 as_fn_error $? "pwd does not report name of working directory"
2059 # Find the source files, if location was not specified.
2060 if test -z "$srcdir"; then
2061 ac_srcdir_defaulted=yes
2062 # Try the directory containing this script, then the parent directory.
2063 ac_confdir=`$as_dirname -- "$as_myself" ||
2064 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2065 X"$as_myself" : 'X\(//\)[^/]' \| \
2066 X"$as_myself" : 'X\(//\)$' \| \
2067 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2068 $as_echo X"$as_myself" |
2069 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2087 if test ! -r "$srcdir/$ac_unique_file"; then
2091 ac_srcdir_defaulted=no
2093 if test ! -r "$srcdir/$ac_unique_file"; then
2094 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
2095 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
2097 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
2099 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2101 # When building in place, set srcdir=.
2102 if test "$ac_abs_confdir" = "$ac_pwd"; then
2105 # Remove unnecessary trailing slashes from srcdir.
2106 # Double slashes in file names in object file debugging info
2107 # mess up M-x gdb in Emacs.
2109 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2111 for ac_var in $ac_precious_vars; do
2112 eval ac_env_${ac_var}_set=\${${ac_var}+set}
2113 eval ac_env_${ac_var}_value=\$${ac_var}
2114 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
2115 eval ac_cv_env_${ac_var}_value=\$${ac_var}
2119 # Report the --help message.
2121 if test "$ac_init_help" = "long"; then
2122 # Omit some internal or obsolete options to make the list less imposing.
2123 # This message is too long to be a string in the A/UX 3.1 sh.
2125 \`configure' configures GNU tar 1.27 to adapt to many kinds of systems.
2127 Usage: $0 [OPTION]... [VAR=VALUE]...
2129 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2130 VAR=VALUE. See below for descriptions of some of the useful variables.
2132 Defaults for the options are specified in brackets.
2135 -h, --help display this help and exit
2136 --help=short display options specific to this package
2137 --help=recursive display the short help of all the included packages
2138 -V, --version display version information and exit
2139 -q, --quiet, --silent do not print \`checking ...' messages
2140 --cache-file=FILE cache test results in FILE [disabled]
2141 -C, --config-cache alias for \`--cache-file=config.cache'
2142 -n, --no-create do not create output files
2143 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2145 Installation directories:
2146 --prefix=PREFIX install architecture-independent files in PREFIX
2147 [$ac_default_prefix]
2148 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2151 By default, \`make install' will install all the files in
2152 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2153 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2154 for instance \`--prefix=\$HOME'.
2156 For better control, use the options below.
2158 Fine tuning of the installation directories:
2159 --bindir=DIR user executables [EPREFIX/bin]
2160 --sbindir=DIR system admin executables [EPREFIX/sbin]
2161 --libexecdir=DIR program executables [EPREFIX/libexec]
2162 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2163 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2164 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2165 --libdir=DIR object code libraries [EPREFIX/lib]
2166 --includedir=DIR C header files [PREFIX/include]
2167 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2168 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2169 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2170 --infodir=DIR info documentation [DATAROOTDIR/info]
2171 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2172 --mandir=DIR man documentation [DATAROOTDIR/man]
2173 --docdir=DIR documentation root [DATAROOTDIR/doc/tar]
2174 --htmldir=DIR html documentation [DOCDIR]
2175 --dvidir=DIR dvi documentation [DOCDIR]
2176 --pdfdir=DIR pdf documentation [DOCDIR]
2177 --psdir=DIR ps documentation [DOCDIR]
2183 --program-prefix=PREFIX prepend PREFIX to installed program names
2184 --program-suffix=SUFFIX append SUFFIX to installed program names
2185 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2188 --build=BUILD configure for building on BUILD [guessed]
2189 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2193 if test -n "$ac_init_help"; then
2194 case $ac_init_help in
2195 short | recursive ) echo "Configuration of GNU tar 1.27:";;
2200 --disable-option-checking ignore unrecognized --enable/--with options
2201 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2202 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2203 --enable-silent-rules less verbose build output (undo: "make V=1")
2204 --disable-silent-rules verbose build output (undo: "make V=0")
2205 --enable-dependency-tracking
2206 do not reject slow dependency extractors
2207 --disable-dependency-tracking
2208 speeds up one-time build
2209 --disable-largefile omit support for large files
2210 --disable-acl do not support ACLs
2211 --enable-gcc-warnings turn on many GCC warnings (for developers; best with
2213 --disable-rpath do not hardcode runtime library paths
2214 --disable-nls do not use Native Language Support
2215 --enable-backup-scripts Create and install backup and restore scripts
2218 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
2219 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
2220 --without-posix-acls do not use POSIX.1e access control lists
2221 --without-included-regex
2222 don't compile regex; this is the default on systems
2223 with recent-enough versions of the GNU C Library
2224 (use with caution on other systems).
2225 --without-selinux do not use SELinux, even on systems with SELinux
2226 --with-packager String identifying the packager of this software
2227 --with-packager-version Packager-specific version information
2228 --with-packager-bug-reports
2229 Packager info for bug reports (URL/e-mail/...)
2230 --with-rmt=FILE Use FILE as the default `rmt' program. Do not build
2231 included copy of `rmt'.
2232 --without-xattrs don't use linux extended attributes
2233 --with-compress=PROG use PROG as compress compressor program
2234 --with-gzip=PROG use PROG as gzip compressor program
2235 --with-bzip2=PROG use PROG as bzip2 compressor program
2236 --with-lzip=PROG use PROG as lzip compressor program
2237 --with-lzma=PROG use PROG as lzma compressor program
2238 --with-lzop=PROG use PROG as lzop compressor program
2239 --with-xz=PROG use PROG as xz compressor program
2240 --with-gnu-ld assume the C compiler uses GNU ld [default=no]
2241 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
2242 --without-libiconv-prefix don't search for libiconv in includedir and libdir
2243 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib
2244 --without-libintl-prefix don't search for libintl in includedir and libdir
2246 Some influential environment variables:
2247 CC C compiler command
2248 CFLAGS C compiler flags
2249 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2250 nonstandard directory <lib dir>
2251 LIBS libraries to pass to the linker, e.g. -l<library>
2252 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2253 you have headers in a nonstandard directory <include dir>
2254 YACC The `Yet Another Compiler Compiler' implementation to use.
2255 Defaults to the first program found out of: `bison -y', `byacc',
2257 YFLAGS The list of arguments that will be passed by default to $YACC.
2258 This script will default YFLAGS to the empty string to avoid a
2259 default value of `-d' given by some make applications.
2262 Define full file name of the directory where to install `rmt'.
2263 (default: $(libexecdir))
2264 RSH Configure absolute path to default remote shell binary
2265 DEFAULT_ARCHIVE_FORMAT
2266 Set the default archive format. Allowed values are: V7, OLDGNU,
2267 USTAR, POSIX, GNU. Default is GNU
2269 Set the name of the default archive (default: -)
2271 Define default blocking factor (default: 20)
2272 DEFAULT_QUOTING_STYLE
2273 Set the default quoting style. Allowed values are: literal,
2274 shell, shell-always, c, escape, locale, clocale . Default is
2277 Use these variables to override the choices made by `configure' or to help
2278 it to find libraries and programs with nonstandard names/locations.
2280 Report bugs to <bug-tar@gnu.org>.
2281 GNU tar home page: <http://www.gnu.org/software/tar/>.
2282 General help using GNU software: <http://www.gnu.org/gethelp/>.
2287 if test "$ac_init_help" = "recursive"; then
2288 # If there are subdirs, report their specific --help.
2289 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2290 test -d "$ac_dir" ||
2291 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2296 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2298 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2299 # A ".." for each directory in $ac_dir_suffix.
2300 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2301 case $ac_top_builddir_sub in
2302 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2303 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2306 ac_abs_top_builddir=$ac_pwd
2307 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2308 # for backward compatibility:
2309 ac_top_builddir=$ac_top_build_prefix
2312 .) # We are building in place.
2314 ac_top_srcdir=$ac_top_builddir_sub
2315 ac_abs_top_srcdir=$ac_pwd ;;
2316 [\\/]* | ?:[\\/]* ) # Absolute name.
2317 ac_srcdir=$srcdir$ac_dir_suffix;
2318 ac_top_srcdir=$srcdir
2319 ac_abs_top_srcdir=$srcdir ;;
2321 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2322 ac_top_srcdir=$ac_top_build_prefix$srcdir
2323 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2325 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2327 cd "$ac_dir" || { ac_status=$?; continue; }
2328 # Check for guested configure.
2329 if test -f "$ac_srcdir/configure.gnu"; then
2331 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2332 elif test -f "$ac_srcdir/configure"; then
2334 $SHELL "$ac_srcdir/configure" --help=recursive
2336 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2338 cd "$ac_pwd" || { ac_status=$?; break; }
2342 test -n "$ac_init_help" && exit $ac_status
2343 if $ac_init_version; then
2345 GNU tar configure 1.27
2346 generated by GNU Autoconf 2.69
2348 Copyright (C) 2012 Free Software Foundation, Inc.
2349 This configure script is free software; the Free Software Foundation
2350 gives unlimited permission to copy, distribute and modify it.
2355 ## ------------------------ ##
2356 ## Autoconf initialization. ##
2357 ## ------------------------ ##
2359 # ac_fn_c_try_compile LINENO
2360 # --------------------------
2361 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2362 ac_fn_c_try_compile ()
2364 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2365 rm -f conftest.$ac_objext
2366 if { { ac_try="$ac_compile"
2368 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2369 *) ac_try_echo=$ac_try;;
2371 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2372 $as_echo "$ac_try_echo"; } >&5
2373 (eval "$ac_compile") 2>conftest.err
2375 if test -s conftest.err; then
2376 grep -v '^ *+' conftest.err >conftest.er1
2377 cat conftest.er1 >&5
2378 mv -f conftest.er1 conftest.err
2380 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2381 test $ac_status = 0; } && {
2382 test -z "$ac_c_werror_flag" ||
2383 test ! -s conftest.err
2384 } && test -s conftest.$ac_objext; then :
2387 $as_echo "$as_me: failed program was:" >&5
2388 sed 's/^/| /' conftest.$ac_ext >&5
2392 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2393 as_fn_set_status $ac_retval
2395 } # ac_fn_c_try_compile
2397 # ac_fn_c_try_cpp LINENO
2398 # ----------------------
2399 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2402 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2403 if { { ac_try="$ac_cpp conftest.$ac_ext"
2405 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2406 *) ac_try_echo=$ac_try;;
2408 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2409 $as_echo "$ac_try_echo"; } >&5
2410 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2412 if test -s conftest.err; then
2413 grep -v '^ *+' conftest.err >conftest.er1
2414 cat conftest.er1 >&5
2415 mv -f conftest.er1 conftest.err
2417 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2418 test $ac_status = 0; } > conftest.i && {
2419 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2420 test ! -s conftest.err
2424 $as_echo "$as_me: failed program was:" >&5
2425 sed 's/^/| /' conftest.$ac_ext >&5
2429 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2430 as_fn_set_status $ac_retval
2434 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2435 # -------------------------------------------------------
2436 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2437 # the include files in INCLUDES and setting the cache variable VAR
2439 ac_fn_c_check_header_mongrel ()
2441 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2442 if eval \${$3+:} false; then :
2443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2444 $as_echo_n "checking for $2... " >&6; }
2445 if eval \${$3+:} false; then :
2446 $as_echo_n "(cached) " >&6
2449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2450 $as_echo "$ac_res" >&6; }
2452 # Is the header compilable?
2453 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2454 $as_echo_n "checking $2 usability... " >&6; }
2455 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2456 /* end confdefs.h. */
2460 if ac_fn_c_try_compile "$LINENO"; then :
2461 ac_header_compiler=yes
2463 ac_header_compiler=no
2465 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2466 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2467 $as_echo "$ac_header_compiler" >&6; }
2469 # Is the header present?
2470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2471 $as_echo_n "checking $2 presence... " >&6; }
2472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2473 /* end confdefs.h. */
2476 if ac_fn_c_try_cpp "$LINENO"; then :
2477 ac_header_preproc=yes
2479 ac_header_preproc=no
2481 rm -f conftest.err conftest.i conftest.$ac_ext
2482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2483 $as_echo "$ac_header_preproc" >&6; }
2485 # So? What about this header?
2486 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2488 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2489 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2490 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2491 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2494 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2495 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2496 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2497 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2498 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2499 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2500 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2501 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2502 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2503 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2504 ( $as_echo "## ------------------------------ ##
2505 ## Report this to bug-tar@gnu.org ##
2506 ## ------------------------------ ##"
2507 ) | sed "s/^/$as_me: WARNING: /" >&2
2510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2511 $as_echo_n "checking for $2... " >&6; }
2512 if eval \${$3+:} false; then :
2513 $as_echo_n "(cached) " >&6
2515 eval "$3=\$ac_header_compiler"
2518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2519 $as_echo "$ac_res" >&6; }
2521 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2523 } # ac_fn_c_check_header_mongrel
2525 # ac_fn_c_try_run LINENO
2526 # ----------------------
2527 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2528 # that executables *can* be run.
2531 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2532 if { { ac_try="$ac_link"
2534 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2535 *) ac_try_echo=$ac_try;;
2537 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2538 $as_echo "$ac_try_echo"; } >&5
2539 (eval "$ac_link") 2>&5
2541 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2542 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2543 { { case "(($ac_try" in
2544 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2545 *) ac_try_echo=$ac_try;;
2547 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2548 $as_echo "$ac_try_echo"; } >&5
2549 (eval "$ac_try") 2>&5
2551 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2552 test $ac_status = 0; }; }; then :
2555 $as_echo "$as_me: program exited with status $ac_status" >&5
2556 $as_echo "$as_me: failed program was:" >&5
2557 sed 's/^/| /' conftest.$ac_ext >&5
2559 ac_retval=$ac_status
2561 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2562 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2563 as_fn_set_status $ac_retval
2567 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2568 # -------------------------------------------------------
2569 # Tests whether HEADER exists and can be compiled using the include files in
2570 # INCLUDES, setting the cache variable VAR accordingly.
2571 ac_fn_c_check_header_compile ()
2573 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2575 $as_echo_n "checking for $2... " >&6; }
2576 if eval \${$3+:} false; then :
2577 $as_echo_n "(cached) " >&6
2579 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2580 /* end confdefs.h. */
2584 if ac_fn_c_try_compile "$LINENO"; then :
2589 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2593 $as_echo "$ac_res" >&6; }
2594 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2596 } # ac_fn_c_check_header_compile
2598 # ac_fn_c_try_link LINENO
2599 # -----------------------
2600 # Try to link conftest.$ac_ext, and return whether this succeeded.
2603 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2604 rm -f conftest.$ac_objext conftest$ac_exeext
2605 if { { ac_try="$ac_link"
2607 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2608 *) ac_try_echo=$ac_try;;
2610 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2611 $as_echo "$ac_try_echo"; } >&5
2612 (eval "$ac_link") 2>conftest.err
2614 if test -s conftest.err; then
2615 grep -v '^ *+' conftest.err >conftest.er1
2616 cat conftest.er1 >&5
2617 mv -f conftest.er1 conftest.err
2619 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2620 test $ac_status = 0; } && {
2621 test -z "$ac_c_werror_flag" ||
2622 test ! -s conftest.err
2623 } && test -s conftest$ac_exeext && {
2624 test "$cross_compiling" = yes ||
2625 test -x conftest$ac_exeext
2629 $as_echo "$as_me: failed program was:" >&5
2630 sed 's/^/| /' conftest.$ac_ext >&5
2634 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2635 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2636 # interfere with the next link command; also delete a directory that is
2637 # left behind by Apple's compiler. We do this before executing the actions.
2638 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2639 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2640 as_fn_set_status $ac_retval
2642 } # ac_fn_c_try_link
2644 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2645 # -------------------------------------------
2646 # Tests whether TYPE exists after having included INCLUDES, setting cache
2647 # variable VAR accordingly.
2648 ac_fn_c_check_type ()
2650 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2652 $as_echo_n "checking for $2... " >&6; }
2653 if eval \${$3+:} false; then :
2654 $as_echo_n "(cached) " >&6
2657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2658 /* end confdefs.h. */
2669 if ac_fn_c_try_compile "$LINENO"; then :
2670 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2671 /* end confdefs.h. */
2682 if ac_fn_c_try_compile "$LINENO"; then :
2687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2689 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2693 $as_echo "$ac_res" >&6; }
2694 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2696 } # ac_fn_c_check_type
2698 # ac_fn_c_check_func LINENO FUNC VAR
2699 # ----------------------------------
2700 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2701 ac_fn_c_check_func ()
2703 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2705 $as_echo_n "checking for $2... " >&6; }
2706 if eval \${$3+:} false; then :
2707 $as_echo_n "(cached) " >&6
2709 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2710 /* end confdefs.h. */
2711 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2712 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2713 #define $2 innocuous_$2
2715 /* System header to define __stub macros and hopefully few prototypes,
2716 which can conflict with char $2 (); below.
2717 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2718 <limits.h> exists even on freestanding compilers. */
2721 # include <limits.h>
2723 # include <assert.h>
2728 /* Override any GCC internal prototype to avoid an error.
2729 Use char because int might match the return type of a GCC
2730 builtin and then its argument prototype would still apply. */
2735 /* The GNU C library defines this for functions which it implements
2736 to always fail with ENOSYS. Some functions are actually named
2737 something starting with __ and the normal name is an alias. */
2738 #if defined __stub_$2 || defined __stub___$2
2750 if ac_fn_c_try_link "$LINENO"; then :
2755 rm -f core conftest.err conftest.$ac_objext \
2756 conftest$ac_exeext conftest.$ac_ext
2759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2760 $as_echo "$ac_res" >&6; }
2761 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2763 } # ac_fn_c_check_func
2765 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2766 # ---------------------------------------------
2767 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2769 ac_fn_c_check_decl ()
2771 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2772 as_decl_name=`echo $2|sed 's/ *(.*//'`
2773 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2774 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2775 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2776 if eval \${$3+:} false; then :
2777 $as_echo_n "(cached) " >&6
2779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2780 /* end confdefs.h. */
2785 #ifndef $as_decl_name
2787 (void) $as_decl_use;
2789 (void) $as_decl_name;
2797 if ac_fn_c_try_compile "$LINENO"; then :
2802 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2805 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2806 $as_echo "$ac_res" >&6; }
2807 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2809 } # ac_fn_c_check_decl
2811 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2812 # --------------------------------------------
2813 # Tries to find the compile-time value of EXPR in a program that includes
2814 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2816 ac_fn_c_compute_int ()
2818 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2819 if test "$cross_compiling" = yes; then
2820 # Depending upon the size, compute the lo and hi bounds.
2821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2822 /* end confdefs.h. */
2827 static int test_array [1 - 2 * !(($2) >= 0)];
2829 return test_array [0];
2835 if ac_fn_c_try_compile "$LINENO"; then :
2838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2839 /* end confdefs.h. */
2844 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2846 return test_array [0];
2852 if ac_fn_c_try_compile "$LINENO"; then :
2853 ac_hi=$ac_mid; break
2855 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2856 if test $ac_lo -le $ac_mid; then
2860 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2862 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2866 /* end confdefs.h. */
2871 static int test_array [1 - 2 * !(($2) < 0)];
2873 return test_array [0];
2879 if ac_fn_c_try_compile "$LINENO"; then :
2882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2883 /* end confdefs.h. */
2888 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2890 return test_array [0];
2896 if ac_fn_c_try_compile "$LINENO"; then :
2897 ac_lo=$ac_mid; break
2899 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2900 if test $ac_mid -le $ac_hi; then
2904 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2911 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2913 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2914 # Binary search between lo and hi bounds.
2915 while test "x$ac_lo" != "x$ac_hi"; do
2916 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2918 /* end confdefs.h. */
2923 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2925 return test_array [0];
2931 if ac_fn_c_try_compile "$LINENO"; then :
2934 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2939 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2944 /* end confdefs.h. */
2946 static long int longval () { return $2; }
2947 static unsigned long int ulongval () { return $2; }
2954 FILE *f = fopen ("conftest.val", "w");
2959 long int i = longval ();
2962 fprintf (f, "%ld", i);
2966 unsigned long int i = ulongval ();
2969 fprintf (f, "%lu", i);
2971 /* Do not output a trailing newline, as this causes \r\n confusion
2972 on some platforms. */
2973 return ferror (f) || fclose (f) != 0;
2979 if ac_fn_c_try_run "$LINENO"; then :
2980 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2984 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2985 conftest.$ac_objext conftest.beam conftest.$ac_ext
2989 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2990 as_fn_set_status $ac_retval
2992 } # ac_fn_c_compute_int
2994 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2995 # ----------------------------------------------------
2996 # Tries to find if the field MEMBER exists in type AGGR, after including
2997 # INCLUDES, setting cache variable VAR accordingly.
2998 ac_fn_c_check_member ()
3000 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3002 $as_echo_n "checking for $2.$3... " >&6; }
3003 if eval \${$4+:} false; then :
3004 $as_echo_n "(cached) " >&6
3006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3007 /* end confdefs.h. */
3019 if ac_fn_c_try_compile "$LINENO"; then :
3022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3023 /* end confdefs.h. */
3029 if (sizeof ac_aggr.$3)
3035 if ac_fn_c_try_compile "$LINENO"; then :
3040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3042 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3046 $as_echo "$ac_res" >&6; }
3047 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3049 } # ac_fn_c_check_member
3050 cat >config.log <<_ACEOF
3051 This file contains any messages produced by compilers while
3052 running configure, to aid debugging if configure makes a mistake.
3054 It was created by GNU tar $as_me 1.27, which was
3055 generated by GNU Autoconf 2.69. Invocation command line was
3067 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3068 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3069 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3070 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3071 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3073 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3074 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3076 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3077 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3078 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3079 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3080 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3081 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3082 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3086 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3090 test -z "$as_dir" && as_dir=.
3091 $as_echo "PATH: $as_dir"
3107 # Keep a trace of the command line.
3108 # Strip out --no-create and --no-recursion so they do not pile up.
3109 # Strip out --silent because we don't want to record it for future runs.
3110 # Also quote any args containing shell meta-characters.
3111 # Make two passes to allow for proper duplicate-argument suppression.
3115 ac_must_keep_next=false
3121 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3122 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3123 | -silent | --silent | --silen | --sile | --sil)
3126 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3129 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3131 as_fn_append ac_configure_args1 " '$ac_arg'"
3132 if test $ac_must_keep_next = true; then
3133 ac_must_keep_next=false # Got value, back to normal.
3136 *=* | --config-cache | -C | -disable-* | --disable-* \
3137 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3138 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3139 | -with-* | --with-* | -without-* | --without-* | --x)
3140 case "$ac_configure_args0 " in
3141 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3144 -* ) ac_must_keep_next=true ;;
3147 as_fn_append ac_configure_args " '$ac_arg'"
3152 { ac_configure_args0=; unset ac_configure_args0;}
3153 { ac_configure_args1=; unset ac_configure_args1;}
3155 # When interrupted or exit'd, cleanup temporary files, and complete
3156 # config.log. We remove comments because anyway the quotes in there
3157 # would cause problems or look ugly.
3158 # WARNING: Use '\'' to represent an apostrophe within the trap.
3159 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3160 trap 'exit_status=$?
3161 # Save into config.log some information that might help in debugging.
3165 $as_echo "## ---------------- ##
3166 ## Cache variables. ##
3167 ## ---------------- ##"
3169 # The following way of writing the cache mishandles newlines in values,
3171 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3172 eval ac_val=\$$ac_var
3176 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3177 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3180 _ | IFS | as_nl) ;; #(
3181 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3182 *) { eval $ac_var=; unset $ac_var;} ;;
3187 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3188 *${as_nl}ac_space=\ *)
3190 "s/'\''/'\''\\\\'\'''\''/g;
3191 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3194 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3201 $as_echo "## ----------------- ##
3202 ## Output variables. ##
3203 ## ----------------- ##"
3205 for ac_var in $ac_subst_vars
3207 eval ac_val=\$$ac_var
3209 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3211 $as_echo "$ac_var='\''$ac_val'\''"
3215 if test -n "$ac_subst_files"; then
3216 $as_echo "## ------------------- ##
3217 ## File substitutions. ##
3218 ## ------------------- ##"
3220 for ac_var in $ac_subst_files
3222 eval ac_val=\$$ac_var
3224 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3226 $as_echo "$ac_var='\''$ac_val'\''"
3231 if test -s confdefs.h; then
3232 $as_echo "## ----------- ##
3239 test "$ac_signal" != 0 &&
3240 $as_echo "$as_me: caught signal $ac_signal"
3241 $as_echo "$as_me: exit $exit_status"
3243 rm -f core *.core core.conftest.* &&
3244 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3247 for ac_signal in 1 2 13 15; do
3248 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3252 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3253 rm -f -r conftest* confdefs.h
3255 $as_echo "/* confdefs.h */" > confdefs.h
3257 # Predefined preprocessor variables.
3259 cat >>confdefs.h <<_ACEOF
3260 #define PACKAGE_NAME "$PACKAGE_NAME"
3263 cat >>confdefs.h <<_ACEOF
3264 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3267 cat >>confdefs.h <<_ACEOF
3268 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3271 cat >>confdefs.h <<_ACEOF
3272 #define PACKAGE_STRING "$PACKAGE_STRING"
3275 cat >>confdefs.h <<_ACEOF
3276 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3279 cat >>confdefs.h <<_ACEOF
3280 #define PACKAGE_URL "$PACKAGE_URL"
3284 # Let the site file select an alternate cache file if it wants to.
3285 # Prefer an explicitly selected file to automatically selected ones.
3288 if test -n "$CONFIG_SITE"; then
3289 # We do not want a PATH search for config.site.
3290 case $CONFIG_SITE in #((
3291 -*) ac_site_file1=./$CONFIG_SITE;;
3292 */*) ac_site_file1=$CONFIG_SITE;;
3293 *) ac_site_file1=./$CONFIG_SITE;;
3295 elif test "x$prefix" != xNONE; then
3296 ac_site_file1=$prefix/share/config.site
3297 ac_site_file2=$prefix/etc/config.site
3299 ac_site_file1=$ac_default_prefix/share/config.site
3300 ac_site_file2=$ac_default_prefix/etc/config.site
3302 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3304 test "x$ac_site_file" = xNONE && continue
3305 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3306 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3307 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3308 sed 's/^/| /' "$ac_site_file" >&5
3310 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3311 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3312 as_fn_error $? "failed to load site script $ac_site_file
3313 See \`config.log' for more details" "$LINENO" 5; }
3317 if test -r "$cache_file"; then
3318 # Some versions of bash will fail to source /dev/null (special files
3319 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3320 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3321 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3322 $as_echo "$as_me: loading cache $cache_file" >&6;}
3324 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3325 *) . "./$cache_file";;
3329 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3330 $as_echo "$as_me: creating cache $cache_file" >&6;}
3334 as_fn_append ac_header_list " fcntl.h"
3335 as_fn_append ac_header_list " linux/fd.h"
3336 as_fn_append ac_header_list " memory.h"
3337 as_fn_append ac_header_list " net/errno.h"
3338 as_fn_append ac_header_list " sgtty.h"
3339 as_fn_append ac_header_list " string.h"
3340 as_fn_append ac_header_list " sys/param.h"
3341 as_fn_append ac_header_list " sys/device.h"
3342 as_fn_append ac_header_list " sys/gentape.h"
3343 as_fn_append ac_header_list " sys/inet.h"
3344 as_fn_append ac_header_list " sys/io/trioctl.h"
3345 as_fn_append ac_header_list " sys/mtio.h"
3346 as_fn_append ac_header_list " sys/time.h"
3347 as_fn_append ac_header_list " sys/tprintf.h"
3348 as_fn_append ac_header_list " sys/tape.h"
3349 as_fn_append ac_header_list " unistd.h"
3350 as_fn_append ac_header_list " locale.h"
3351 as_fn_append ac_func_list " flockfile"
3352 as_fn_append ac_func_list " funlockfile"
3353 as_fn_append ac_header_list " features.h"
3354 as_fn_append ac_header_list " linewrap.h"
3355 as_fn_append ac_func_list " pathconf"
3356 as_fn_append ac_func_list " btowc"
3357 as_fn_append ac_func_list " canonicalize_file_name"
3358 as_fn_append ac_func_list " getcwd"
3359 as_fn_append ac_func_list " readlink"
3360 as_fn_append ac_func_list " realpath"
3361 as_fn_append ac_func_list " readlinkat"
3362 as_fn_append ac_func_list " chown"
3363 as_fn_append ac_func_list " fchown"
3364 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3365 as_fn_append ac_header_list " sys/socket.h"
3366 as_fn_append ac_func_list " fchdir"
3367 as_fn_append ac_header_list " dirent.h"
3368 as_fn_append ac_func_list " fdopendir"
3369 as_fn_append ac_func_list " fchmodat"
3370 as_fn_append ac_func_list " lchmod"
3371 as_fn_append ac_func_list " fcntl"
3372 as_fn_append ac_func_list " symlink"
3373 as_fn_append ac_func_list " mempcpy"
3374 as_fn_append ac_func_list " isblank"
3375 as_fn_append ac_func_list " iswctype"
3376 as_fn_append ac_func_list " mbsrtowcs"
3377 as_fn_append ac_func_list " wmemchr"
3378 as_fn_append ac_func_list " wmemcpy"
3379 as_fn_append ac_func_list " wmempcpy"
3380 as_fn_append ac_header_list " wctype.h"
3381 gl_fnmatch_required=GNU
3382 as_fn_append ac_header_list " stdio_ext.h"
3383 as_fn_append ac_func_list " __fpending"
3384 as_fn_append ac_header_list " sys/stat.h"
3385 as_fn_append ac_func_list " fstatat"
3386 as_fn_append ac_func_list " futimens"
3387 as_fn_append ac_func_list " getdelim"
3388 as_fn_append ac_func_list " getdtablesize"
3389 gl_getopt_required=GNU
3390 as_fn_append ac_header_list " getopt.h"
3391 as_fn_append ac_func_list " gettimeofday"
3392 as_fn_append ac_func_list " nanotime"
3393 as_fn_append ac_header_list " wchar.h"
3394 as_fn_append ac_header_list " stdint.h"
3395 as_fn_append ac_header_list " inttypes.h"
3396 as_fn_append ac_func_list " iswcntrl"
3397 as_fn_append ac_func_list " iswblank"
3398 as_fn_append ac_header_list " langinfo.h"
3399 as_fn_append ac_func_list " link"
3400 as_fn_append ac_func_list " openat"
3401 as_fn_append ac_func_list " linkat"
3402 as_fn_append ac_header_list " xlocale.h"
3403 as_fn_append ac_func_list " lstat"
3404 as_fn_append ac_func_list " mbsinit"
3405 as_fn_append ac_func_list " mbrtowc"
3406 as_fn_append ac_header_list " sys/mman.h"
3407 as_fn_append ac_func_list " mprotect"
3408 as_fn_append ac_func_list " mkdirat"
3409 as_fn_append ac_func_list " mkfifo"
3410 as_fn_append ac_func_list " mkfifoat"
3411 as_fn_append ac_func_list " mknodat"
3412 as_fn_append ac_func_list " mknod"
3413 as_fn_append ac_func_list " nl_langinfo"
3414 as_fn_append ac_header_list " priv.h"
3415 as_fn_append ac_func_list " wcscoll"
3416 as_fn_append ac_func_list " renameat"
3417 as_fn_append ac_func_list " secure_getenv"
3418 as_fn_append ac_header_list " selinux/selinux.h"
3419 as_fn_append ac_func_list " setenv"
3420 as_fn_append ac_func_list " sleep"
3421 as_fn_append ac_func_list " snprintf"
3422 as_fn_append ac_func_list " strdup"
3423 as_fn_append ac_header_list " strings.h"
3424 as_fn_append ac_func_list " strndup"
3425 as_fn_append ac_func_list " strtoumax"
3426 as_fn_append ac_func_list " symlinkat"
3427 as_fn_append ac_header_list " sysexits.h"
3428 as_fn_append ac_func_list " localtime_r"
3429 as_fn_append ac_func_list " pipe"
3430 as_fn_append ac_func_list " unlinkat"
3431 as_fn_append ac_header_list " utime.h"
3432 as_fn_append ac_func_list " futimes"
3433 as_fn_append ac_func_list " futimesat"
3434 as_fn_append ac_func_list " utimensat"
3435 as_fn_append ac_func_list " lutimes"
3436 as_fn_append ac_func_list " vasnprintf"
3437 as_fn_append ac_func_list " wcrtomb"
3438 as_fn_append ac_func_list " wcwidth"
3439 as_fn_append ac_header_list " netdb.h"
3440 as_fn_append ac_header_list " sys/wait.h"
3441 as_fn_append ac_header_list " pwd.h"
3442 as_fn_append ac_header_list " grp.h"
3443 as_fn_append ac_func_list " setlocale"
3444 as_fn_append ac_func_list " fchmod"
3445 as_fn_append ac_func_list " fsync"
3446 gt_needs="$gt_needs need-formatstring-macros"
3447 # Check that the precious variables saved in the cache have kept the same
3449 ac_cache_corrupted=false
3450 for ac_var in $ac_precious_vars; do
3451 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3452 eval ac_new_set=\$ac_env_${ac_var}_set
3453 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3454 eval ac_new_val=\$ac_env_${ac_var}_value
3455 case $ac_old_set,$ac_new_set in
3457 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3458 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3459 ac_cache_corrupted=: ;;
3461 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3462 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3463 ac_cache_corrupted=: ;;
3466 if test "x$ac_old_val" != "x$ac_new_val"; then
3467 # differences in whitespace do not lead to failure.
3468 ac_old_val_w=`echo x $ac_old_val`
3469 ac_new_val_w=`echo x $ac_new_val`
3470 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3471 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3472 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3473 ac_cache_corrupted=:
3475 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3476 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3477 eval $ac_var=\$ac_old_val
3479 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3480 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3481 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3482 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3485 # Pass precious variables to config.status.
3486 if test "$ac_new_set" = set; then
3488 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3489 *) ac_arg=$ac_var=$ac_new_val ;;
3491 case " $ac_configure_args " in
3492 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3493 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3497 if $ac_cache_corrupted; then
3498 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3499 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3500 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3501 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3502 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3504 ## -------------------- ##
3505 ## Main body of script. ##
3506 ## -------------------- ##
3509 ac_cpp='$CPP $CPPFLAGS'
3510 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3511 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3512 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3517 for ac_dir in build-aux "$srcdir"/build-aux; do
3518 if test -f "$ac_dir/install-sh"; then
3520 ac_install_sh="$ac_aux_dir/install-sh -c"
3522 elif test -f "$ac_dir/install.sh"; then
3524 ac_install_sh="$ac_aux_dir/install.sh -c"
3526 elif test -f "$ac_dir/shtool"; then
3528 ac_install_sh="$ac_aux_dir/shtool install -c"
3532 if test -z "$ac_aux_dir"; then
3533 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3536 # These three variables are undocumented and unsupported,
3537 # and are intended to be withdrawn in a future Autoconf release.
3538 # They can cause serious problems if a builder's source tree is in a directory
3539 # whose full name contains unusual characters.
3540 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3541 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3542 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3545 ac_config_headers="$ac_config_headers config.h"
3548 am__api_version='1.12'
3550 # Find a good install program. We prefer a C program (faster),
3551 # so one script is as good as another. But avoid the broken or
3552 # incompatible versions:
3553 # SysV /etc/install, /usr/sbin/install
3554 # SunOS /usr/etc/install
3555 # IRIX /sbin/install
3557 # AmigaOS /C/install, which installs bootblocks on floppy discs
3558 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3559 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3560 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3561 # OS/2's system install, which has a completely different semantic
3562 # ./install, which can be erroneously created by make from ./install.sh.
3563 # Reject install programs that cannot install multiple files.
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3565 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3566 if test -z "$INSTALL"; then
3567 if ${ac_cv_path_install+:} false; then :
3568 $as_echo_n "(cached) " >&6
3570 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3574 test -z "$as_dir" && as_dir=.
3575 # Account for people who put trailing slashes in PATH elements.
3576 case $as_dir/ in #((
3577 ./ | .// | /[cC]/* | \
3578 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3579 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3582 # OSF1 and SCO ODT 3.0 have their own names for install.
3583 # Don't use installbsd from OSF since it installs stuff as root
3585 for ac_prog in ginstall scoinst install; do
3586 for ac_exec_ext in '' $ac_executable_extensions; do
3587 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
3588 if test $ac_prog = install &&
3589 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3590 # AIX install. It has an incompatible calling convention.
3592 elif test $ac_prog = install &&
3593 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3594 # program-specific install script used by HP pwplus--don't use.
3597 rm -rf conftest.one conftest.two conftest.dir
3598 echo one > conftest.one
3599 echo two > conftest.two
3601 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3602 test -s conftest.one && test -s conftest.two &&
3603 test -s conftest.dir/conftest.one &&
3604 test -s conftest.dir/conftest.two
3606 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3619 rm -rf conftest.one conftest.two conftest.dir
3622 if test "${ac_cv_path_install+set}" = set; then
3623 INSTALL=$ac_cv_path_install
3625 # As a last resort, use the slow shell script. Don't cache a
3626 # value for INSTALL within a source directory, because that will
3627 # break other packages using the cache if that directory is
3628 # removed, or if the value is a relative name.
3629 INSTALL=$ac_install_sh
3632 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3633 $as_echo "$INSTALL" >&6; }
3635 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3636 # It thinks the first close brace ends the variable substitution.
3637 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3639 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3641 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3644 $as_echo_n "checking whether build environment is sane... " >&6; }
3645 # Reject unsafe characters in $srcdir or the absolute working directory
3646 # name. Accept space and tab only in the latter.
3650 *[\\\"\#\$\&\'\`$am_lf]*)
3651 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3654 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3655 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
3658 # Do 'set' in a subshell so we don't clobber the current shell's
3659 # arguments. Must try -L first in case configure is actually a
3660 # symlink; some systems play weird games with the mod time of symlinks
3661 # (eg FreeBSD returns the mod time of the symlink's containing
3665 for am_try in 1 2; do
3666 echo "timestamp, slept: $am_has_slept" > conftest.file
3667 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3668 if test "$*" = "X"; then
3670 set X `ls -t "$srcdir/configure" conftest.file`
3672 if test "$*" != "X $srcdir/configure conftest.file" \
3673 && test "$*" != "X conftest.file $srcdir/configure"; then
3675 # If neither matched, then we have a broken ls. This can happen
3676 # if, for instance, CONFIG_SHELL is bash and it inherits a
3677 # broken ls alias from the environment. This has actually
3678 # happened. Such a system could not be considered "sane".
3679 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
3680 alias in your environment" "$LINENO" 5
3682 if test "$2" = conftest.file || test $am_try -eq 2; then
3689 test "$2" = conftest.file
3695 as_fn_error $? "newly created file is older than distributed files!
3696 Check your system clock" "$LINENO" 5
3698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3699 $as_echo "yes" >&6; }
3700 # If we didn't sleep, we still need to ensure time stamps of config.status and
3701 # generated files are strictly newer.
3703 if grep 'slept: no' conftest.file >/dev/null 2>&1; then
3710 test "$program_prefix" != NONE &&
3711 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3712 # Use a double $ so make ignores it.
3713 test "$program_suffix" != NONE &&
3714 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3715 # Double any \ or $.
3716 # By default was `s,x,x', remove it if useless.
3717 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3718 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3720 # expand $ac_aux_dir to an absolute path
3721 am_aux_dir=`cd $ac_aux_dir && pwd`
3723 if test x"${MISSING+set}" != xset; then
3726 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3728 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3731 # Use eval to expand $SHELL
3732 if eval "$MISSING --run true"; then
3733 am_missing_run="$MISSING --run "
3736 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
3737 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
3740 if test x"${install_sh}" != xset; then
3743 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3745 install_sh="\${SHELL} $am_aux_dir/install-sh"
3749 # Installed binaries are usually stripped using 'strip' when the user
3750 # run "make install-strip". However 'strip' might not be the right
3751 # tool to use in cross-compilation environments, therefore Automake
3752 # will honor the 'STRIP' environment variable to overrule this program.
3753 if test "$cross_compiling" != no; then
3754 if test -n "$ac_tool_prefix"; then
3755 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3756 set dummy ${ac_tool_prefix}strip; ac_word=$2
3757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3758 $as_echo_n "checking for $ac_word... " >&6; }
3759 if ${ac_cv_prog_STRIP+:} false; then :
3760 $as_echo_n "(cached) " >&6
3762 if test -n "$STRIP"; then
3763 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3765 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3769 test -z "$as_dir" && as_dir=.
3770 for ac_exec_ext in '' $ac_executable_extensions; do
3771 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3772 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3773 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3782 STRIP=$ac_cv_prog_STRIP
3783 if test -n "$STRIP"; then
3784 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3785 $as_echo "$STRIP" >&6; }
3787 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3788 $as_echo "no" >&6; }
3793 if test -z "$ac_cv_prog_STRIP"; then
3795 # Extract the first word of "strip", so it can be a program name with args.
3796 set dummy strip; ac_word=$2
3797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3798 $as_echo_n "checking for $ac_word... " >&6; }
3799 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3800 $as_echo_n "(cached) " >&6
3802 if test -n "$ac_ct_STRIP"; then
3803 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3805 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3809 test -z "$as_dir" && as_dir=.
3810 for ac_exec_ext in '' $ac_executable_extensions; do
3811 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3812 ac_cv_prog_ac_ct_STRIP="strip"
3813 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3822 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3823 if test -n "$ac_ct_STRIP"; then
3824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3825 $as_echo "$ac_ct_STRIP" >&6; }
3827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3828 $as_echo "no" >&6; }
3831 if test "x$ac_ct_STRIP" = x; then
3834 case $cross_compiling:$ac_tool_warned in
3836 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3837 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3838 ac_tool_warned=yes ;;
3843 STRIP="$ac_cv_prog_STRIP"
3847 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3850 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3851 if test -z "$MKDIR_P"; then
3852 if ${ac_cv_path_mkdir+:} false; then :
3853 $as_echo_n "(cached) " >&6
3855 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3856 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3859 test -z "$as_dir" && as_dir=.
3860 for ac_prog in mkdir gmkdir; do
3861 for ac_exec_ext in '' $ac_executable_extensions; do
3862 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue
3863 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3864 'mkdir (GNU coreutils) '* | \
3865 'mkdir (coreutils) '* | \
3866 'mkdir (fileutils) '4.1*)
3867 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3877 test -d ./--version && rmdir ./--version
3878 if test "${ac_cv_path_mkdir+set}" = set; then
3879 MKDIR_P="$ac_cv_path_mkdir -p"
3881 # As a last resort, use the slow shell script. Don't cache a
3882 # value for MKDIR_P within a source directory, because that will
3883 # break other packages using the cache if that directory is
3884 # removed, or if the value is a relative name.
3885 MKDIR_P="$ac_install_sh -d"
3888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3889 $as_echo "$MKDIR_P" >&6; }
3891 for ac_prog in gawk mawk nawk awk
3893 # Extract the first word of "$ac_prog", so it can be a program name with args.
3894 set dummy $ac_prog; ac_word=$2
3895 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3896 $as_echo_n "checking for $ac_word... " >&6; }
3897 if ${ac_cv_prog_AWK+:} false; then :
3898 $as_echo_n "(cached) " >&6
3900 if test -n "$AWK"; then
3901 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3903 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3907 test -z "$as_dir" && as_dir=.
3908 for ac_exec_ext in '' $ac_executable_extensions; do
3909 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3910 ac_cv_prog_AWK="$ac_prog"
3911 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3921 if test -n "$AWK"; then
3922 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3923 $as_echo "$AWK" >&6; }
3925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3926 $as_echo "no" >&6; }
3930 test -n "$AWK" && break
3933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3934 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3936 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3937 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3938 $as_echo_n "(cached) " >&6
3940 cat >conftest.make <<\_ACEOF
3943 @echo '@@@%%%=$(MAKE)=@@@%%%'
3945 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3946 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3948 eval ac_cv_prog_make_${ac_make}_set=yes;;
3950 eval ac_cv_prog_make_${ac_make}_set=no;;
3954 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3956 $as_echo "yes" >&6; }
3959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3960 $as_echo "no" >&6; }
3961 SET_MAKE="MAKE=${MAKE-make}"
3964 rm -rf .tst 2>/dev/null
3965 mkdir .tst 2>/dev/null
3966 if test -d .tst; then
3971 rmdir .tst 2>/dev/null
3973 # Check whether --enable-silent-rules was given.
3974 if test "${enable_silent_rules+set}" = set; then :
3975 enableval=$enable_silent_rules;
3978 case $enable_silent_rules in # (((
3979 yes) AM_DEFAULT_VERBOSITY=0;;
3980 no) AM_DEFAULT_VERBOSITY=1;;
3981 *) AM_DEFAULT_VERBOSITY=1;;
3983 am_make=${MAKE-make}
3984 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3985 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3986 if ${am_cv_make_support_nested_variables+:} false; then :
3987 $as_echo_n "(cached) " >&6
3989 if $as_echo 'TRUE=$(BAR$(V))
3995 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3996 am_cv_make_support_nested_variables=yes
3998 am_cv_make_support_nested_variables=no
4001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4002 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4003 if test $am_cv_make_support_nested_variables = yes; then
4005 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4007 AM_V=$AM_DEFAULT_VERBOSITY
4008 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4012 if test "`cd $srcdir && pwd`" != "`pwd`"; then
4013 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
4014 # is not polluted with repeated "-I."
4015 am__isrc=' -I$(srcdir)'
4016 # test to see if srcdir already configured
4017 if test -f $srcdir/config.status; then
4018 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
4022 # test whether we have cygpath
4023 if test -z "$CYGPATH_W"; then
4024 if (cygpath --version) >/dev/null 2>/dev/null; then
4025 CYGPATH_W='cygpath -w'
4032 # Define the identity of the package.
4037 cat >>confdefs.h <<_ACEOF
4038 #define PACKAGE "$PACKAGE"
4042 cat >>confdefs.h <<_ACEOF
4043 #define VERSION "$VERSION"
4046 # Some tools Automake needs.
4048 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
4051 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
4054 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
4057 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
4060 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
4062 # For better backward compatibility. To be removed once Automake 1.9.x
4063 # dies out for good. For more background, see:
4064 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
4065 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
4066 mkdir_p='$(MKDIR_P)'
4068 # We need awk for the "check" target. The system "awk" is bad on
4070 # Always define AMTAR for backward compatibility. Yes, it's still used
4071 # in the wild :-( We should find a proper way to deprecate it ...
4075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5
4076 $as_echo_n "checking how to create a ustar tar archive... " >&6; }
4077 # Loop over all known methods to create a tar archive until one works.
4078 _am_tools='gnutar plaintar pax cpio none'
4079 _am_tools=${am_cv_prog_tar_ustar-$_am_tools}
4080 # Do not fold the above two line into one, because Tru64 sh and
4081 # Solaris sh will not grok spaces in the rhs of '-'.
4082 for _am_tool in $_am_tools
4086 for _am_tar in tar gnutar gtar;
4088 { echo "$as_me:$LINENO: $_am_tar --version" >&5
4089 ($_am_tar --version) >&5 2>&5
4091 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4092 (exit $ac_status); } && break
4094 am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"'
4095 am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"'
4096 am__untar="$_am_tar -xf -"
4099 # Must skip GNU tar: if it does not support --format= it doesn't create
4100 # ustar tarball either.
4101 (tar --version) >/dev/null 2>&1 && continue
4102 am__tar='tar chf - "$$tardir"'
4103 am__tar_='tar chf - "$tardir"'
4104 am__untar='tar xf -'
4107 am__tar='pax -L -x ustar -w "$$tardir"'
4108 am__tar_='pax -L -x ustar -w "$tardir"'
4112 am__tar='find "$$tardir" -print | cpio -o -H ustar -L'
4113 am__tar_='find "$tardir" -print | cpio -o -H ustar -L'
4114 am__untar='cpio -i -H ustar -d'
4123 # If the value was cached, stop now. We just wanted to have am__tar
4124 # and am__untar set.
4125 test -n "${am_cv_prog_tar_ustar}" && break
4127 # tar/untar a dummy directory, and stop if the command works
4130 echo GrepMe > conftest.dir/file
4131 { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5
4132 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5
4134 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4135 (exit $ac_status); }
4137 if test -s conftest.tar; then
4138 { echo "$as_me:$LINENO: $am__untar <conftest.tar" >&5
4139 ($am__untar <conftest.tar) >&5 2>&5
4141 echo "$as_me:$LINENO: \$? = $ac_status" >&5
4142 (exit $ac_status); }
4143 grep GrepMe conftest.dir/file >/dev/null 2>&1 && break
4148 if ${am_cv_prog_tar_ustar+:} false; then :
4149 $as_echo_n "(cached) " >&6
4151 am_cv_prog_tar_ustar=$_am_tool
4154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5
4155 $as_echo "$am_cv_prog_tar_ustar" >&6; }
4162 # Enable silent rules by default:
4163 # Check whether --enable-silent-rules was given.
4164 if test "${enable_silent_rules+set}" = set; then :
4165 enableval=$enable_silent_rules;
4168 case $enable_silent_rules in # (((
4169 yes) AM_DEFAULT_VERBOSITY=0;;
4170 no) AM_DEFAULT_VERBOSITY=1;;
4171 *) AM_DEFAULT_VERBOSITY=0;;
4173 am_make=${MAKE-make}
4174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
4175 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
4176 if ${am_cv_make_support_nested_variables+:} false; then :
4177 $as_echo_n "(cached) " >&6
4179 if $as_echo 'TRUE=$(BAR$(V))
4185 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
4186 am_cv_make_support_nested_variables=yes
4188 am_cv_make_support_nested_variables=no
4191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
4192 $as_echo "$am_cv_make_support_nested_variables" >&6; }
4193 if test $am_cv_make_support_nested_variables = yes; then
4195 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
4197 AM_V=$AM_DEFAULT_VERBOSITY
4198 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
4204 ac_cpp='$CPP $CPPFLAGS'
4205 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4206 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4207 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4208 if test -n "$ac_tool_prefix"; then
4209 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
4210 set dummy ${ac_tool_prefix}gcc; ac_word=$2
4211 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4212 $as_echo_n "checking for $ac_word... " >&6; }
4213 if ${ac_cv_prog_CC+:} false; then :
4214 $as_echo_n "(cached) " >&6
4216 if test -n "$CC"; then
4217 ac_cv_prog_CC="$CC" # Let the user override the test.
4219 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4223 test -z "$as_dir" && as_dir=.
4224 for ac_exec_ext in '' $ac_executable_extensions; do
4225 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4226 ac_cv_prog_CC="${ac_tool_prefix}gcc"
4227 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4237 if test -n "$CC"; then
4238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4239 $as_echo "$CC" >&6; }
4241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4242 $as_echo "no" >&6; }
4247 if test -z "$ac_cv_prog_CC"; then
4249 # Extract the first word of "gcc", so it can be a program name with args.
4250 set dummy gcc; ac_word=$2
4251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4252 $as_echo_n "checking for $ac_word... " >&6; }
4253 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4254 $as_echo_n "(cached) " >&6
4256 if test -n "$ac_ct_CC"; then
4257 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4259 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4263 test -z "$as_dir" && as_dir=.
4264 for ac_exec_ext in '' $ac_executable_extensions; do
4265 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4266 ac_cv_prog_ac_ct_CC="gcc"
4267 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4276 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4277 if test -n "$ac_ct_CC"; then
4278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4279 $as_echo "$ac_ct_CC" >&6; }
4281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4282 $as_echo "no" >&6; }
4285 if test "x$ac_ct_CC" = x; then
4288 case $cross_compiling:$ac_tool_warned in
4290 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4291 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4292 ac_tool_warned=yes ;;
4300 if test -z "$CC"; then
4301 if test -n "$ac_tool_prefix"; then
4302 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
4303 set dummy ${ac_tool_prefix}cc; ac_word=$2
4304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4305 $as_echo_n "checking for $ac_word... " >&6; }
4306 if ${ac_cv_prog_CC+:} false; then :
4307 $as_echo_n "(cached) " >&6
4309 if test -n "$CC"; then
4310 ac_cv_prog_CC="$CC" # Let the user override the test.
4312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4316 test -z "$as_dir" && as_dir=.
4317 for ac_exec_ext in '' $ac_executable_extensions; do
4318 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4319 ac_cv_prog_CC="${ac_tool_prefix}cc"
4320 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4330 if test -n "$CC"; then
4331 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4332 $as_echo "$CC" >&6; }
4334 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4335 $as_echo "no" >&6; }
4341 if test -z "$CC"; then
4342 # Extract the first word of "cc", so it can be a program name with args.
4343 set dummy cc; ac_word=$2
4344 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4345 $as_echo_n "checking for $ac_word... " >&6; }
4346 if ${ac_cv_prog_CC+:} false; then :
4347 $as_echo_n "(cached) " >&6
4349 if test -n "$CC"; then
4350 ac_cv_prog_CC="$CC" # Let the user override the test.
4353 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4357 test -z "$as_dir" && as_dir=.
4358 for ac_exec_ext in '' $ac_executable_extensions; do
4359 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4360 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4361 ac_prog_rejected=yes
4365 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4372 if test $ac_prog_rejected = yes; then
4373 # We found a bogon in the path, so make sure we never use it.
4374 set dummy $ac_cv_prog_CC
4376 if test $# != 0; then
4377 # We chose a different compiler from the bogus one.
4378 # However, it has the same basename, so the bogon will be chosen
4379 # first if we set CC to just the basename; use the full file name.
4381 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4387 if test -n "$CC"; then
4388 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4389 $as_echo "$CC" >&6; }
4391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4392 $as_echo "no" >&6; }
4397 if test -z "$CC"; then
4398 if test -n "$ac_tool_prefix"; then
4399 for ac_prog in cl.exe
4401 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4402 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4404 $as_echo_n "checking for $ac_word... " >&6; }
4405 if ${ac_cv_prog_CC+:} false; then :
4406 $as_echo_n "(cached) " >&6
4408 if test -n "$CC"; then
4409 ac_cv_prog_CC="$CC" # Let the user override the test.
4411 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4415 test -z "$as_dir" && as_dir=.
4416 for ac_exec_ext in '' $ac_executable_extensions; do
4417 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4418 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4419 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4429 if test -n "$CC"; then
4430 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4431 $as_echo "$CC" >&6; }
4433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4434 $as_echo "no" >&6; }
4438 test -n "$CC" && break
4441 if test -z "$CC"; then
4443 for ac_prog in cl.exe
4445 # Extract the first word of "$ac_prog", so it can be a program name with args.
4446 set dummy $ac_prog; ac_word=$2
4447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4448 $as_echo_n "checking for $ac_word... " >&6; }
4449 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4450 $as_echo_n "(cached) " >&6
4452 if test -n "$ac_ct_CC"; then
4453 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4455 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4459 test -z "$as_dir" && as_dir=.
4460 for ac_exec_ext in '' $ac_executable_extensions; do
4461 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
4462 ac_cv_prog_ac_ct_CC="$ac_prog"
4463 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4472 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4473 if test -n "$ac_ct_CC"; then
4474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4475 $as_echo "$ac_ct_CC" >&6; }
4477 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4478 $as_echo "no" >&6; }
4482 test -n "$ac_ct_CC" && break
4485 if test "x$ac_ct_CC" = x; then
4488 case $cross_compiling:$ac_tool_warned in
4490 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4491 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4492 ac_tool_warned=yes ;;
4501 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4502 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4503 as_fn_error $? "no acceptable C compiler found in \$PATH
4504 See \`config.log' for more details" "$LINENO" 5; }
4506 # Provide some information about the compiler.
4507 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4510 for ac_option in --version -v -V -qversion; do
4511 { { ac_try="$ac_compiler $ac_option >&5"
4513 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4514 *) ac_try_echo=$ac_try;;
4516 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4517 $as_echo "$ac_try_echo"; } >&5
4518 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4520 if test -s conftest.err; then
4522 ... rest of stderr output deleted ...
4523 10q' conftest.err >conftest.er1
4524 cat conftest.er1 >&5
4526 rm -f conftest.er1 conftest.err
4527 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4528 test $ac_status = 0; }
4531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4532 /* end confdefs.h. */
4542 ac_clean_files_save=$ac_clean_files
4543 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4544 # Try to create an executable without -o first, disregard a.out.
4545 # It will help us diagnose broken compilers, and finding out an intuition
4547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4548 $as_echo_n "checking whether the C compiler works... " >&6; }
4549 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4551 # The possible output files:
4552 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4555 for ac_file in $ac_files
4558 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4559 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4564 if { { ac_try="$ac_link_default"
4566 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4567 *) ac_try_echo=$ac_try;;
4569 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4570 $as_echo "$ac_try_echo"; } >&5
4571 (eval "$ac_link_default") 2>&5
4573 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4574 test $ac_status = 0; }; then :
4575 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4576 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4577 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4578 # so that the user can short-circuit this test for compilers unknown to
4580 for ac_file in $ac_files ''
4582 test -f "$ac_file" || continue
4584 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4587 # We found the default executable, but exeext='' is most
4591 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4593 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4595 # We set ac_cv_exeext here because the later test for it is not
4596 # safe: cross compilers may not add the suffix if given an `-o'
4597 # argument, so we may need to know it at that point already.
4598 # Even if this section looks crufty: it has the advantage of
4605 test "$ac_cv_exeext" = no && ac_cv_exeext=
4610 if test -z "$ac_file"; then :
4611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4612 $as_echo "no" >&6; }
4613 $as_echo "$as_me: failed program was:" >&5
4614 sed 's/^/| /' conftest.$ac_ext >&5
4616 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4617 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4618 as_fn_error 77 "C compiler cannot create executables
4619 See \`config.log' for more details" "$LINENO" 5; }
4621 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4622 $as_echo "yes" >&6; }
4624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4625 $as_echo_n "checking for C compiler default output file name... " >&6; }
4626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4627 $as_echo "$ac_file" >&6; }
4628 ac_exeext=$ac_cv_exeext
4630 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4631 ac_clean_files=$ac_clean_files_save
4632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4633 $as_echo_n "checking for suffix of executables... " >&6; }
4634 if { { ac_try="$ac_link"
4636 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4637 *) ac_try_echo=$ac_try;;
4639 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4640 $as_echo "$ac_try_echo"; } >&5
4641 (eval "$ac_link") 2>&5
4643 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4644 test $ac_status = 0; }; then :
4645 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4646 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4647 # work properly (i.e., refer to `conftest.exe'), while it won't with
4649 for ac_file in conftest.exe conftest conftest.*; do
4650 test -f "$ac_file" || continue
4652 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4653 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4659 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4660 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4661 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4662 See \`config.log' for more details" "$LINENO" 5; }
4664 rm -f conftest conftest$ac_cv_exeext
4665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4666 $as_echo "$ac_cv_exeext" >&6; }
4668 rm -f conftest.$ac_ext
4669 EXEEXT=$ac_cv_exeext
4671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4672 /* end confdefs.h. */
4677 FILE *f = fopen ("conftest.out", "w");
4678 return ferror (f) || fclose (f) != 0;
4684 ac_clean_files="$ac_clean_files conftest.out"
4685 # Check that the compiler produces executables we can run. If not, either
4686 # the compiler is broken, or we cross compile.
4687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4688 $as_echo_n "checking whether we are cross compiling... " >&6; }
4689 if test "$cross_compiling" != yes; then
4690 { { ac_try="$ac_link"
4692 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4693 *) ac_try_echo=$ac_try;;
4695 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4696 $as_echo "$ac_try_echo"; } >&5
4697 (eval "$ac_link") 2>&5
4699 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4700 test $ac_status = 0; }
4701 if { ac_try='./conftest$ac_cv_exeext'
4702 { { case "(($ac_try" in
4703 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4704 *) ac_try_echo=$ac_try;;
4706 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4707 $as_echo "$ac_try_echo"; } >&5
4708 (eval "$ac_try") 2>&5
4710 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4711 test $ac_status = 0; }; }; then
4714 if test "$cross_compiling" = maybe; then
4717 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4718 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4719 as_fn_error $? "cannot run C compiled programs.
4720 If you meant to cross compile, use \`--host'.
4721 See \`config.log' for more details" "$LINENO" 5; }
4725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4726 $as_echo "$cross_compiling" >&6; }
4728 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4729 ac_clean_files=$ac_clean_files_save
4730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4731 $as_echo_n "checking for suffix of object files... " >&6; }
4732 if ${ac_cv_objext+:} false; then :
4733 $as_echo_n "(cached) " >&6
4735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4736 /* end confdefs.h. */
4746 rm -f conftest.o conftest.obj
4747 if { { ac_try="$ac_compile"
4749 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4750 *) ac_try_echo=$ac_try;;
4752 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4753 $as_echo "$ac_try_echo"; } >&5
4754 (eval "$ac_compile") 2>&5
4756 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4757 test $ac_status = 0; }; then :
4758 for ac_file in conftest.o conftest.obj conftest.*; do
4759 test -f "$ac_file" || continue;
4761 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4762 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4767 $as_echo "$as_me: failed program was:" >&5
4768 sed 's/^/| /' conftest.$ac_ext >&5
4770 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4771 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4772 as_fn_error $? "cannot compute suffix of object files: cannot compile
4773 See \`config.log' for more details" "$LINENO" 5; }
4775 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4778 $as_echo "$ac_cv_objext" >&6; }
4779 OBJEXT=$ac_cv_objext
4781 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4782 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4783 if ${ac_cv_c_compiler_gnu+:} false; then :
4784 $as_echo_n "(cached) " >&6
4786 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4787 /* end confdefs.h. */
4800 if ac_fn_c_try_compile "$LINENO"; then :
4805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4806 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4810 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4811 if test $ac_compiler_gnu = yes; then
4816 ac_test_CFLAGS=${CFLAGS+set}
4817 ac_save_CFLAGS=$CFLAGS
4818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4819 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4820 if ${ac_cv_prog_cc_g+:} false; then :
4821 $as_echo_n "(cached) " >&6
4823 ac_save_c_werror_flag=$ac_c_werror_flag
4824 ac_c_werror_flag=yes
4827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4828 /* end confdefs.h. */
4838 if ac_fn_c_try_compile "$LINENO"; then :
4842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4843 /* end confdefs.h. */
4853 if ac_fn_c_try_compile "$LINENO"; then :
4856 ac_c_werror_flag=$ac_save_c_werror_flag
4858 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4859 /* end confdefs.h. */
4869 if ac_fn_c_try_compile "$LINENO"; then :
4872 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4874 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4876 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4877 ac_c_werror_flag=$ac_save_c_werror_flag
4879 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4880 $as_echo "$ac_cv_prog_cc_g" >&6; }
4881 if test "$ac_test_CFLAGS" = set; then
4882 CFLAGS=$ac_save_CFLAGS
4883 elif test $ac_cv_prog_cc_g = yes; then
4884 if test "$GCC" = yes; then
4890 if test "$GCC" = yes; then
4896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4897 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4898 if ${ac_cv_prog_cc_c89+:} false; then :
4899 $as_echo_n "(cached) " >&6
4901 ac_cv_prog_cc_c89=no
4903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4904 /* end confdefs.h. */
4908 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4909 struct buf { int x; };
4910 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4911 static char *e (p, i)
4917 static char *f (char * (*g) (char **, int), char **p, ...)
4922 s = g (p, va_arg (v,int));
4927 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4928 function prototypes and stuff, but not '\xHH' hex character constants.
4929 These don't provoke an error unfortunately, instead are silently treated
4930 as 'x'. The following induces an error, until -std is added to get
4931 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4932 array size at least. It's necessary to write '\x00'==0 to get something
4933 that's true only with -std. */
4934 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4936 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4937 inside strings and character constants. */
4939 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4941 int test (int i, double x);
4942 struct s1 {int (*f) (int a);};
4943 struct s2 {int (*f) (double a);};
4944 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4950 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4955 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4956 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4958 CC="$ac_save_CC $ac_arg"
4959 if ac_fn_c_try_compile "$LINENO"; then :
4960 ac_cv_prog_cc_c89=$ac_arg
4962 rm -f core conftest.err conftest.$ac_objext
4963 test "x$ac_cv_prog_cc_c89" != "xno" && break
4965 rm -f conftest.$ac_ext
4970 case "x$ac_cv_prog_cc_c89" in
4972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4973 $as_echo "none needed" >&6; } ;;
4975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4976 $as_echo "unsupported" >&6; } ;;
4978 CC="$CC $ac_cv_prog_cc_c89"
4979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4980 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4982 if test "x$ac_cv_prog_cc_c89" != xno; then :
4987 ac_cpp='$CPP $CPPFLAGS'
4988 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4989 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4990 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4991 DEPDIR="${am__leading_dot}deps"
4993 ac_config_commands="$ac_config_commands depfiles"
4996 am_make=${MAKE-make}
4997 cat > confinc << 'END'
4999 @echo this is the am__doit target
5002 # If we don't find an include directive, just comment out the code.
5003 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
5004 $as_echo_n "checking for style of include used by $am_make... " >&6; }
5008 # First try GNU make style include.
5009 echo "include confinc" > confmf
5010 # Ignore all kinds of additional output from 'make'.
5011 case `$am_make -s -f confmf 2> /dev/null` in #(
5012 *the\ am__doit\ target*)
5018 # Now try BSD make style include.
5019 if test "$am__include" = "#"; then
5020 echo '.include "confinc"' > confmf
5021 case `$am_make -s -f confmf 2> /dev/null` in #(
5022 *the\ am__doit\ target*)
5023 am__include=.include
5031 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
5032 $as_echo "$_am_result" >&6; }
5033 rm -f confinc confmf
5035 # Check whether --enable-dependency-tracking was given.
5036 if test "${enable_dependency_tracking+set}" = set; then :
5037 enableval=$enable_dependency_tracking;
5040 if test "x$enable_dependency_tracking" != xno; then
5041 am_depcomp="$ac_aux_dir/depcomp"
5045 if test "x$enable_dependency_tracking" != xno; then
5055 depcc="$CC" am_compiler_list=
5057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
5058 $as_echo_n "checking dependency style of $depcc... " >&6; }
5059 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
5060 $as_echo_n "(cached) " >&6
5062 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
5063 # We make a subdir and do the tests there. Otherwise we can end up
5064 # making bogus files that we don't know about and never remove. For
5065 # instance it was reported that on HP-UX the gcc test will end up
5066 # making a dummy file named 'D' -- because '-MD' means "put the output
5070 # Copy depcomp to subdir because otherwise we won't find it if we're
5071 # using a relative directory.
5072 cp "$am_depcomp" conftest.dir
5074 # We will build objects and dependencies in a subdirectory because
5075 # it helps to detect inapplicable dependency modes. For instance
5076 # both Tru64's cc and ICC support -MD to output dependencies as a
5077 # side effect of compilation, but ICC will put the dependencies in
5078 # the current directory while Tru64 will put them in the object
5082 am_cv_CC_dependencies_compiler_type=none
5083 if test "$am_compiler_list" = ""; then
5084 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
5087 case " $depcc " in #(
5088 *\ -arch\ *\ -arch\ *) am__universal=true ;;
5091 for depmode in $am_compiler_list; do
5092 # Setup a source with many dependencies, because some compilers
5093 # like to wrap large dependency lists on column 80 (with \), and
5094 # we should not choose a depcomp mode which is confused by this.
5096 # We need to recreate these files for each test, as the compiler may
5097 # overwrite some of them when testing with obscure command lines.
5098 # This happens at least with the AIX C compiler.
5100 for i in 1 2 3 4 5 6; do
5101 echo '#include "conftst'$i'.h"' >> sub/conftest.c
5102 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
5103 # Solaris 10 /bin/sh.
5104 echo '/* dummy */' > sub/conftst$i.h
5106 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
5108 # We check with '-c' and '-o' for the sake of the "dashmstdout"
5109 # mode. It turns out that the SunPro C++ compiler does not properly
5110 # handle '-M -o', and we need to detect this. Also, some Intel
5111 # versions had trouble with output in subdirs.
5112 am__obj=sub/conftest.${OBJEXT-o}
5113 am__minus_obj="-o $am__obj"
5116 # This depmode causes a compiler race in universal mode.
5117 test "$am__universal" = false || continue
5120 # After this tag, mechanisms are not by side-effect, so they'll
5121 # only be used when explicitly requested.
5122 if test "x$enable_dependency_tracking" = xyes; then
5128 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
5129 # This compiler won't grok '-c -o', but also, the minuso test has
5130 # not run yet. These depmodes are late enough in the game, and
5131 # so weak that their functioning should not be impacted.
5132 am__obj=conftest.${OBJEXT-o}
5137 if depmode=$depmode \
5138 source=sub/conftest.c object=$am__obj \
5139 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
5140 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
5141 >/dev/null 2>conftest.err &&
5142 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
5143 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
5144 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
5145 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
5146 # icc doesn't choke on unknown options, it will just issue warnings
5147 # or remarks (even with -Werror). So we grep stderr for any message
5148 # that says an option was ignored or not supported.
5149 # When given -MP, icc 7.0 and 7.1 complain thusly:
5150 # icc: Command line warning: ignoring option '-M'; no argument required
5151 # The diagnosis changed in icc 8.0:
5152 # icc: Command line remark: option '-MP' not supported
5153 if (grep 'ignoring option' conftest.err ||
5154 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
5155 am_cv_CC_dependencies_compiler_type=$depmode
5164 am_cv_CC_dependencies_compiler_type=none
5168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
5169 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
5170 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
5173 test "x$enable_dependency_tracking" != xno \
5174 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
5176 am__fastdepCC_FALSE='#'
5178 am__fastdepCC_TRUE='#'
5179 am__fastdepCC_FALSE=
5184 if test -n "$ac_tool_prefix"; then
5185 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5186 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5188 $as_echo_n "checking for $ac_word... " >&6; }
5189 if ${ac_cv_prog_RANLIB+:} false; then :
5190 $as_echo_n "(cached) " >&6
5192 if test -n "$RANLIB"; then
5193 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5195 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5199 test -z "$as_dir" && as_dir=.
5200 for ac_exec_ext in '' $ac_executable_extensions; do
5201 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5202 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5203 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5212 RANLIB=$ac_cv_prog_RANLIB
5213 if test -n "$RANLIB"; then
5214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5215 $as_echo "$RANLIB" >&6; }
5217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5218 $as_echo "no" >&6; }
5223 if test -z "$ac_cv_prog_RANLIB"; then
5224 ac_ct_RANLIB=$RANLIB
5225 # Extract the first word of "ranlib", so it can be a program name with args.
5226 set dummy ranlib; ac_word=$2
5227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5228 $as_echo_n "checking for $ac_word... " >&6; }
5229 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5230 $as_echo_n "(cached) " >&6
5232 if test -n "$ac_ct_RANLIB"; then
5233 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5235 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5239 test -z "$as_dir" && as_dir=.
5240 for ac_exec_ext in '' $ac_executable_extensions; do
5241 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5242 ac_cv_prog_ac_ct_RANLIB="ranlib"
5243 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5252 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5253 if test -n "$ac_ct_RANLIB"; then
5254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5255 $as_echo "$ac_ct_RANLIB" >&6; }
5257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5258 $as_echo "no" >&6; }
5261 if test "x$ac_ct_RANLIB" = x; then
5264 case $cross_compiling:$ac_tool_warned in
5266 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5267 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5268 ac_tool_warned=yes ;;
5270 RANLIB=$ac_ct_RANLIB
5273 RANLIB="$ac_cv_prog_RANLIB"
5276 for ac_prog in 'bison -y' byacc
5278 # Extract the first word of "$ac_prog", so it can be a program name with args.
5279 set dummy $ac_prog; ac_word=$2
5280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5281 $as_echo_n "checking for $ac_word... " >&6; }
5282 if ${ac_cv_prog_YACC+:} false; then :
5283 $as_echo_n "(cached) " >&6
5285 if test -n "$YACC"; then
5286 ac_cv_prog_YACC="$YACC" # Let the user override the test.
5288 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5292 test -z "$as_dir" && as_dir=.
5293 for ac_exec_ext in '' $ac_executable_extensions; do
5294 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5295 ac_cv_prog_YACC="$ac_prog"
5296 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5305 YACC=$ac_cv_prog_YACC
5306 if test -n "$YACC"; then
5307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
5308 $as_echo "$YACC" >&6; }
5310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5311 $as_echo "no" >&6; }
5315 test -n "$YACC" && break
5317 test -n "$YACC" || YACC="yacc"
5321 ac_cpp='$CPP $CPPFLAGS'
5322 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5323 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5324 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5326 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5327 # On Suns, sometimes $CPP names a directory.
5328 if test -n "$CPP" && test -d "$CPP"; then
5331 if test -z "$CPP"; then
5332 if ${ac_cv_prog_CPP+:} false; then :
5333 $as_echo_n "(cached) " >&6
5335 # Double quotes because CPP needs to be expanded
5336 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5339 for ac_c_preproc_warn_flag in '' yes
5341 # Use a header file that comes with gcc, so configuring glibc
5342 # with a fresh cross-compiler works.
5343 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5344 # <limits.h> exists even on freestanding compilers.
5345 # On the NeXT, cc -E runs the code through the compiler's parser,
5346 # not just through cpp. "Syntax error" is here to catch this case.
5347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5348 /* end confdefs.h. */
5350 # include <limits.h>
5352 # include <assert.h>
5356 if ac_fn_c_try_cpp "$LINENO"; then :
5359 # Broken: fails on valid input.
5362 rm -f conftest.err conftest.i conftest.$ac_ext
5364 # OK, works on sane cases. Now check whether nonexistent headers
5365 # can be detected and how.
5366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5367 /* end confdefs.h. */
5368 #include <ac_nonexistent.h>
5370 if ac_fn_c_try_cpp "$LINENO"; then :
5371 # Broken: success on invalid input.
5374 # Passes both tests.
5378 rm -f conftest.err conftest.i conftest.$ac_ext
5381 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5382 rm -f conftest.i conftest.err conftest.$ac_ext
5383 if $ac_preproc_ok; then :
5395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5396 $as_echo "$CPP" >&6; }
5398 for ac_c_preproc_warn_flag in '' yes
5400 # Use a header file that comes with gcc, so configuring glibc
5401 # with a fresh cross-compiler works.
5402 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5403 # <limits.h> exists even on freestanding compilers.
5404 # On the NeXT, cc -E runs the code through the compiler's parser,
5405 # not just through cpp. "Syntax error" is here to catch this case.
5406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5407 /* end confdefs.h. */
5409 # include <limits.h>
5411 # include <assert.h>
5415 if ac_fn_c_try_cpp "$LINENO"; then :
5418 # Broken: fails on valid input.
5421 rm -f conftest.err conftest.i conftest.$ac_ext
5423 # OK, works on sane cases. Now check whether nonexistent headers
5424 # can be detected and how.
5425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5426 /* end confdefs.h. */
5427 #include <ac_nonexistent.h>
5429 if ac_fn_c_try_cpp "$LINENO"; then :
5430 # Broken: success on invalid input.
5433 # Passes both tests.
5437 rm -f conftest.err conftest.i conftest.$ac_ext
5440 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5441 rm -f conftest.i conftest.err conftest.$ac_ext
5442 if $ac_preproc_ok; then :
5445 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5446 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5447 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5448 See \`config.log' for more details" "$LINENO" 5; }
5452 ac_cpp='$CPP $CPPFLAGS'
5453 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5454 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5455 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5459 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5460 if ${ac_cv_path_GREP+:} false; then :
5461 $as_echo_n "(cached) " >&6
5463 if test -z "$GREP"; then
5464 ac_path_GREP_found=false
5465 # Loop through the user's path and test for each of PROGNAME-LIST
5466 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5467 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5470 test -z "$as_dir" && as_dir=.
5471 for ac_prog in grep ggrep; do
5472 for ac_exec_ext in '' $ac_executable_extensions; do
5473 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5474 as_fn_executable_p "$ac_path_GREP" || continue
5475 # Check for GNU ac_path_GREP and select it if it is found.
5476 # Check for GNU $ac_path_GREP
5477 case `"$ac_path_GREP" --version 2>&1` in
5479 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5482 $as_echo_n 0123456789 >"conftest.in"
5485 cat "conftest.in" "conftest.in" >"conftest.tmp"
5486 mv "conftest.tmp" "conftest.in"
5487 cp "conftest.in" "conftest.nl"
5488 $as_echo 'GREP' >> "conftest.nl"
5489 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5490 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5491 as_fn_arith $ac_count + 1 && ac_count=$as_val
5492 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5493 # Best one so far, save it but keep looking for a better one
5494 ac_cv_path_GREP="$ac_path_GREP"
5495 ac_path_GREP_max=$ac_count
5497 # 10*(2^10) chars as input seems more than enough
5498 test $ac_count -gt 10 && break
5500 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5503 $ac_path_GREP_found && break 3
5508 if test -z "$ac_cv_path_GREP"; then
5509 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5512 ac_cv_path_GREP=$GREP
5516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5517 $as_echo "$ac_cv_path_GREP" >&6; }
5518 GREP="$ac_cv_path_GREP"
5521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5522 $as_echo_n "checking for egrep... " >&6; }
5523 if ${ac_cv_path_EGREP+:} false; then :
5524 $as_echo_n "(cached) " >&6
5526 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5527 then ac_cv_path_EGREP="$GREP -E"
5529 if test -z "$EGREP"; then
5530 ac_path_EGREP_found=false
5531 # Loop through the user's path and test for each of PROGNAME-LIST
5532 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5533 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5536 test -z "$as_dir" && as_dir=.
5537 for ac_prog in egrep; do
5538 for ac_exec_ext in '' $ac_executable_extensions; do
5539 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5540 as_fn_executable_p "$ac_path_EGREP" || continue
5541 # Check for GNU ac_path_EGREP and select it if it is found.
5542 # Check for GNU $ac_path_EGREP
5543 case `"$ac_path_EGREP" --version 2>&1` in
5545 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5548 $as_echo_n 0123456789 >"conftest.in"
5551 cat "conftest.in" "conftest.in" >"conftest.tmp"
5552 mv "conftest.tmp" "conftest.in"
5553 cp "conftest.in" "conftest.nl"
5554 $as_echo 'EGREP' >> "conftest.nl"
5555 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5556 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5557 as_fn_arith $ac_count + 1 && ac_count=$as_val
5558 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5559 # Best one so far, save it but keep looking for a better one
5560 ac_cv_path_EGREP="$ac_path_EGREP"
5561 ac_path_EGREP_max=$ac_count
5563 # 10*(2^10) chars as input seems more than enough
5564 test $ac_count -gt 10 && break
5566 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5569 $ac_path_EGREP_found && break 3
5574 if test -z "$ac_cv_path_EGREP"; then
5575 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5578 ac_cv_path_EGREP=$EGREP
5583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5584 $as_echo "$ac_cv_path_EGREP" >&6; }
5585 EGREP="$ac_cv_path_EGREP"
5590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5591 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5592 if ${gl_cv_c_amsterdam_compiler+:} false; then :
5593 $as_echo_n "(cached) " >&6
5596 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5597 /* end confdefs.h. */
5604 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5605 $EGREP "Amsterdam" >/dev/null 2>&1; then :
5606 gl_cv_c_amsterdam_compiler=yes
5608 gl_cv_c_amsterdam_compiler=no
5614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5615 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
5616 if test -z "$AR"; then
5617 if test $gl_cv_c_amsterdam_compiler = yes; then
5619 if test -z "$ARFLAGS"; then
5623 if test -n "$ac_tool_prefix"; then
5624 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5625 set dummy ${ac_tool_prefix}ar; ac_word=$2
5626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5627 $as_echo_n "checking for $ac_word... " >&6; }
5628 if ${ac_cv_prog_AR+:} false; then :
5629 $as_echo_n "(cached) " >&6
5631 if test -n "$AR"; then
5632 ac_cv_prog_AR="$AR" # Let the user override the test.
5634 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5638 test -z "$as_dir" && as_dir=.
5639 for ac_exec_ext in '' $ac_executable_extensions; do
5640 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5641 ac_cv_prog_AR="${ac_tool_prefix}ar"
5642 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5652 if test -n "$AR"; then
5653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5654 $as_echo "$AR" >&6; }
5656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5657 $as_echo "no" >&6; }
5662 if test -z "$ac_cv_prog_AR"; then
5664 # Extract the first word of "ar", so it can be a program name with args.
5665 set dummy ar; ac_word=$2
5666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5667 $as_echo_n "checking for $ac_word... " >&6; }
5668 if ${ac_cv_prog_ac_ct_AR+:} false; then :
5669 $as_echo_n "(cached) " >&6
5671 if test -n "$ac_ct_AR"; then
5672 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5678 test -z "$as_dir" && as_dir=.
5679 for ac_exec_ext in '' $ac_executable_extensions; do
5680 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5681 ac_cv_prog_ac_ct_AR="ar"
5682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5691 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5692 if test -n "$ac_ct_AR"; then
5693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5694 $as_echo "$ac_ct_AR" >&6; }
5696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5697 $as_echo "no" >&6; }
5700 if test "x$ac_ct_AR" = x; then
5703 case $cross_compiling:$ac_tool_warned in
5705 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5706 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5707 ac_tool_warned=yes ;;
5715 if test -z "$ARFLAGS"; then
5720 if test -z "$ARFLAGS"; then
5726 if test -z "$RANLIB"; then
5727 if test $gl_cv_c_amsterdam_compiler = yes; then
5730 if test -n "$ac_tool_prefix"; then
5731 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5732 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5734 $as_echo_n "checking for $ac_word... " >&6; }
5735 if ${ac_cv_prog_RANLIB+:} false; then :
5736 $as_echo_n "(cached) " >&6
5738 if test -n "$RANLIB"; then
5739 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5741 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5745 test -z "$as_dir" && as_dir=.
5746 for ac_exec_ext in '' $ac_executable_extensions; do
5747 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5748 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5749 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5758 RANLIB=$ac_cv_prog_RANLIB
5759 if test -n "$RANLIB"; then
5760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5761 $as_echo "$RANLIB" >&6; }
5763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5764 $as_echo "no" >&6; }
5769 if test -z "$ac_cv_prog_RANLIB"; then
5770 ac_ct_RANLIB=$RANLIB
5771 # Extract the first word of "ranlib", so it can be a program name with args.
5772 set dummy ranlib; ac_word=$2
5773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5774 $as_echo_n "checking for $ac_word... " >&6; }
5775 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5776 $as_echo_n "(cached) " >&6
5778 if test -n "$ac_ct_RANLIB"; then
5779 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5781 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5785 test -z "$as_dir" && as_dir=.
5786 for ac_exec_ext in '' $ac_executable_extensions; do
5787 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5788 ac_cv_prog_ac_ct_RANLIB="ranlib"
5789 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5798 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5799 if test -n "$ac_ct_RANLIB"; then
5800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5801 $as_echo "$ac_ct_RANLIB" >&6; }
5803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5804 $as_echo "no" >&6; }
5807 if test "x$ac_ct_RANLIB" = x; then
5810 case $cross_compiling:$ac_tool_warned in
5812 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5813 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5814 ac_tool_warned=yes ;;
5816 RANLIB=$ac_ct_RANLIB
5819 RANLIB="$ac_cv_prog_RANLIB"
5826 if test "x$CC" != xcc; then
5827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5
5828 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; }
5830 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5
5831 $as_echo_n "checking whether cc understands -c and -o together... " >&6; }
5833 set dummy $CC; ac_cc=`$as_echo "$2" |
5834 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5835 if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then :
5836 $as_echo_n "(cached) " >&6
5838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5839 /* end confdefs.h. */
5849 # Make sure it works both with $CC and with simple cc.
5850 # We do the test twice because some compilers refuse to overwrite an
5851 # existing .o file with -o, though they will create one.
5852 ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5854 if { { case "(($ac_try" in
5855 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5856 *) ac_try_echo=$ac_try;;
5858 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5859 $as_echo "$ac_try_echo"; } >&5
5860 (eval "$ac_try") 2>&5
5862 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5863 test $ac_status = 0; } &&
5864 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5865 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5866 *) ac_try_echo=$ac_try;;
5868 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5869 $as_echo "$ac_try_echo"; } >&5
5870 (eval "$ac_try") 2>&5
5872 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5873 test $ac_status = 0; };
5875 eval ac_cv_prog_cc_${ac_cc}_c_o=yes
5876 if test "x$CC" != xcc; then
5877 # Test first that cc exists at all.
5878 if { ac_try='cc -c conftest.$ac_ext >&5'
5879 { { case "(($ac_try" in
5880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5881 *) ac_try_echo=$ac_try;;
5883 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5884 $as_echo "$ac_try_echo"; } >&5
5885 (eval "$ac_try") 2>&5
5887 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5888 test $ac_status = 0; }; }; then
5889 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5'
5891 if { { case "(($ac_try" in
5892 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5893 *) ac_try_echo=$ac_try;;
5895 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5896 $as_echo "$ac_try_echo"; } >&5
5897 (eval "$ac_try") 2>&5
5899 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5900 test $ac_status = 0; } &&
5901 test -f conftest2.$ac_objext && { { case "(($ac_try" in
5902 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
5903 *) ac_try_echo=$ac_try;;
5905 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
5906 $as_echo "$ac_try_echo"; } >&5
5907 (eval "$ac_try") 2>&5
5909 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
5910 test $ac_status = 0; };
5915 # cc exists but doesn't like -o.
5916 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5921 eval ac_cv_prog_cc_${ac_cc}_c_o=no
5923 rm -f core conftest*
5926 if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then
5927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
5928 $as_echo "yes" >&6; }
5930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5931 $as_echo "no" >&6; }
5933 $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h
5937 # FIXME: we rely on the cache variable name because
5938 # there is no other way.
5940 am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'`
5941 eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o
5942 if test "$am_t" != yes; then
5943 # Losing compiler, so override with the script.
5944 # FIXME: It is wrong to rewrite CC.
5945 # But if we don't then we get into trouble of one sort or another.
5946 # A longer-term fix would be to have automake use am__CC in this case,
5947 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)"
5948 CC="$am_aux_dir/compile $CC"
5952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5953 $as_echo_n "checking for ANSI C header files... " >&6; }
5954 if ${ac_cv_header_stdc+:} false; then :
5955 $as_echo_n "(cached) " >&6
5957 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5958 /* end confdefs.h. */
5972 if ac_fn_c_try_compile "$LINENO"; then :
5973 ac_cv_header_stdc=yes
5975 ac_cv_header_stdc=no
5977 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5979 if test $ac_cv_header_stdc = yes; then
5980 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5981 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5982 /* end confdefs.h. */
5986 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5987 $EGREP "memchr" >/dev/null 2>&1; then :
5990 ac_cv_header_stdc=no
5996 if test $ac_cv_header_stdc = yes; then
5997 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5998 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5999 /* end confdefs.h. */
6003 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6004 $EGREP "free" >/dev/null 2>&1; then :
6007 ac_cv_header_stdc=no
6013 if test $ac_cv_header_stdc = yes; then
6014 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6015 if test "$cross_compiling" = yes; then :
6018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6019 /* end confdefs.h. */
6022 #if ((' ' & 0x0FF) == 0x020)
6023 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6024 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6026 # define ISLOWER(c) \
6027 (('a' <= (c) && (c) <= 'i') \
6028 || ('j' <= (c) && (c) <= 'r') \
6029 || ('s' <= (c) && (c) <= 'z'))
6030 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6033 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6038 for (i = 0; i < 256; i++)
6039 if (XOR (islower (i), ISLOWER (i))
6040 || toupper (i) != TOUPPER (i))
6045 if ac_fn_c_try_run "$LINENO"; then :
6048 ac_cv_header_stdc=no
6050 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6051 conftest.$ac_objext conftest.beam conftest.$ac_ext
6056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6057 $as_echo "$ac_cv_header_stdc" >&6; }
6058 if test $ac_cv_header_stdc = yes; then
6060 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6064 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
6065 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
6066 inttypes.h stdint.h unistd.h
6068 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
6069 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
6071 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
6072 cat >>confdefs.h <<_ACEOF
6073 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
6082 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
6083 if test "x$ac_cv_header_minix_config_h" = xyes; then :
6090 if test "$MINIX" = yes; then
6092 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
6095 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
6098 $as_echo "#define _MINIX 1" >>confdefs.h
6101 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
6106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
6107 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
6108 if ${ac_cv_safe_to_define___extensions__+:} false; then :
6109 $as_echo_n "(cached) " >&6
6111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6112 /* end confdefs.h. */
6114 # define __EXTENSIONS__ 1
6115 $ac_includes_default
6124 if ac_fn_c_try_compile "$LINENO"; then :
6125 ac_cv_safe_to_define___extensions__=yes
6127 ac_cv_safe_to_define___extensions__=no
6129 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6131 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
6132 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
6133 test $ac_cv_safe_to_define___extensions__ = yes &&
6134 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
6136 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
6138 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
6140 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
6142 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
6144 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
6146 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
6147 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
6148 if ${ac_cv_should_define__xopen_source+:} false; then :
6149 $as_echo_n "(cached) " >&6
6151 ac_cv_should_define__xopen_source=no
6152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6153 /* end confdefs.h. */
6165 if ac_fn_c_try_compile "$LINENO"; then :
6168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6169 /* end confdefs.h. */
6171 #define _XOPEN_SOURCE 500
6182 if ac_fn_c_try_compile "$LINENO"; then :
6183 ac_cv_should_define__xopen_source=yes
6185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6187 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6189 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
6190 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
6191 test $ac_cv_should_define__xopen_source = yes &&
6192 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
6201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGEFILE_SOURCE value needed for large files" >&5
6202 $as_echo_n "checking for _LARGEFILE_SOURCE value needed for large files... " >&6; }
6203 if ${ac_cv_sys_largefile_source+:} false; then :
6204 $as_echo_n "(cached) " >&6
6207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6208 /* end confdefs.h. */
6209 #include <sys/types.h> /* for off_t */
6214 int (*fp) (FILE *, off_t, int) = fseeko;
6215 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6220 if ac_fn_c_try_link "$LINENO"; then :
6221 ac_cv_sys_largefile_source=no; break
6223 rm -f core conftest.err conftest.$ac_objext \
6224 conftest$ac_exeext conftest.$ac_ext
6225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6226 /* end confdefs.h. */
6227 #define _LARGEFILE_SOURCE 1
6228 #include <sys/types.h> /* for off_t */
6233 int (*fp) (FILE *, off_t, int) = fseeko;
6234 return fseeko (stdin, 0, 0) && fp (stdin, 0, 0);
6239 if ac_fn_c_try_link "$LINENO"; then :
6240 ac_cv_sys_largefile_source=1; break
6242 rm -f core conftest.err conftest.$ac_objext \
6243 conftest$ac_exeext conftest.$ac_ext
6244 ac_cv_sys_largefile_source=unknown
6248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_source" >&5
6249 $as_echo "$ac_cv_sys_largefile_source" >&6; }
6250 case $ac_cv_sys_largefile_source in #(
6253 cat >>confdefs.h <<_ACEOF
6254 #define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
6260 # We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
6261 # in glibc 2.1.3, but that breaks too many other things.
6262 # If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
6263 if test $ac_cv_sys_largefile_source != unknown; then
6265 $as_echo "#define HAVE_FSEEKO 1" >>confdefs.h
6269 # Check whether --enable-largefile was given.
6270 if test "${enable_largefile+set}" = set; then :
6271 enableval=$enable_largefile;
6274 if test "$enable_largefile" != no; then
6276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6277 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6278 if ${ac_cv_sys_largefile_CC+:} false; then :
6279 $as_echo_n "(cached) " >&6
6281 ac_cv_sys_largefile_CC=no
6282 if test "$GCC" != yes; then
6285 # IRIX 6.2 and later do not support large files by default,
6286 # so use the C compiler's -n32 option if that helps.
6287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6288 /* end confdefs.h. */
6289 #include <sys/types.h>
6290 /* Check that off_t can represent 2**63 - 1 correctly.
6291 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6292 since some C++ compilers masquerading as C compilers
6293 incorrectly reject 9223372036854775807. */
6294 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6295 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6296 && LARGE_OFF_T % 2147483647 == 1)
6306 if ac_fn_c_try_compile "$LINENO"; then :
6309 rm -f core conftest.err conftest.$ac_objext
6311 if ac_fn_c_try_compile "$LINENO"; then :
6312 ac_cv_sys_largefile_CC=' -n32'; break
6314 rm -f core conftest.err conftest.$ac_objext
6318 rm -f conftest.$ac_ext
6321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6322 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6323 if test "$ac_cv_sys_largefile_CC" != no; then
6324 CC=$CC$ac_cv_sys_largefile_CC
6327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6328 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6329 if ${ac_cv_sys_file_offset_bits+:} false; then :
6330 $as_echo_n "(cached) " >&6
6333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6334 /* end confdefs.h. */
6335 #include <sys/types.h>
6336 /* Check that off_t can represent 2**63 - 1 correctly.
6337 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6338 since some C++ compilers masquerading as C compilers
6339 incorrectly reject 9223372036854775807. */
6340 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6341 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6342 && LARGE_OFF_T % 2147483647 == 1)
6352 if ac_fn_c_try_compile "$LINENO"; then :
6353 ac_cv_sys_file_offset_bits=no; break
6355 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6357 /* end confdefs.h. */
6358 #define _FILE_OFFSET_BITS 64
6359 #include <sys/types.h>
6360 /* Check that off_t can represent 2**63 - 1 correctly.
6361 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6362 since some C++ compilers masquerading as C compilers
6363 incorrectly reject 9223372036854775807. */
6364 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6365 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6366 && LARGE_OFF_T % 2147483647 == 1)
6376 if ac_fn_c_try_compile "$LINENO"; then :
6377 ac_cv_sys_file_offset_bits=64; break
6379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6380 ac_cv_sys_file_offset_bits=unknown
6384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6385 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6386 case $ac_cv_sys_file_offset_bits in #(
6389 cat >>confdefs.h <<_ACEOF
6390 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6395 if test $ac_cv_sys_file_offset_bits = unknown; then
6396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6397 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6398 if ${ac_cv_sys_large_files+:} false; then :
6399 $as_echo_n "(cached) " >&6
6402 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6403 /* end confdefs.h. */
6404 #include <sys/types.h>
6405 /* Check that off_t can represent 2**63 - 1 correctly.
6406 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6407 since some C++ compilers masquerading as C compilers
6408 incorrectly reject 9223372036854775807. */
6409 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6410 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6411 && LARGE_OFF_T % 2147483647 == 1)
6421 if ac_fn_c_try_compile "$LINENO"; then :
6422 ac_cv_sys_large_files=no; break
6424 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6426 /* end confdefs.h. */
6427 #define _LARGE_FILES 1
6428 #include <sys/types.h>
6429 /* Check that off_t can represent 2**63 - 1 correctly.
6430 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6431 since some C++ compilers masquerading as C compilers
6432 incorrectly reject 9223372036854775807. */
6433 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6434 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6435 && LARGE_OFF_T % 2147483647 == 1)
6445 if ac_fn_c_try_compile "$LINENO"; then :
6446 ac_cv_sys_large_files=1; break
6448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6449 ac_cv_sys_large_files=unknown
6453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6454 $as_echo "$ac_cv_sys_large_files" >&6; }
6455 case $ac_cv_sys_large_files in #(
6458 cat >>confdefs.h <<_ACEOF
6459 #define _LARGE_FILES $ac_cv_sys_large_files
6467 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
6471 case $ac_cv_prog_cc_stdc in #(
6473 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
6475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
6476 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
6477 if ${ac_cv_prog_cc_c99+:} false; then :
6478 $as_echo_n "(cached) " >&6
6480 ac_cv_prog_cc_c99=no
6482 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6483 /* end confdefs.h. */
6485 #include <stdbool.h>
6490 // Check varargs macros. These examples are taken from C99 6.10.3.5.
6491 #define debug(...) fprintf (stderr, __VA_ARGS__)
6492 #define showlist(...) puts (#__VA_ARGS__)
6493 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
6495 test_varargs_macros (void)
6500 debug ("X = %d\n", x);
6501 showlist (The first, second, and third items.);
6502 report (x>y, "x is %d but y is %d", x, y);
6505 // Check long long types.
6506 #define BIG64 18446744073709551615ull
6507 #define BIG32 4294967295ul
6508 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
6510 your preprocessor is broken;
6514 your preprocessor is broken;
6516 static long long int bignum = -9223372036854775807LL;
6517 static unsigned long long int ubignum = BIG64;
6519 struct incomplete_array
6527 const wchar_t *name;
6531 typedef const char *ccp;
6534 test_restrict (ccp restrict text)
6536 // See if C++-style comments work.
6537 // Iterate through items via the restricted pointer.
6538 // Also check for declarations in for loops.
6539 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
6544 // Check varargs and va_copy.
6546 test_varargs (const char *format, ...)
6549 va_start (args, format);
6551 va_copy (args_copy, args);
6562 str = va_arg (args_copy, const char *);
6565 number = va_arg (args_copy, int);
6568 fnumber = va_arg (args_copy, double);
6583 _Bool success = false;
6586 if (test_restrict ("String literal") == 0)
6588 char *restrict newvar = "Another string";
6591 test_varargs ("s, d' f .", "string", 65, 34.234);
6592 test_varargs_macros ();
6594 // Check flexible array members.
6595 struct incomplete_array *ia =
6596 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
6598 for (int i = 0; i < ia->datasize; ++i)
6599 ia->data[i] = i * 1.234;
6601 // Check named initializers.
6602 struct named_init ni = {
6604 .name = L"Test wide string",
6605 .average = 543.34343,
6610 int dynamic_array[ni.number];
6611 dynamic_array[ni.number - 1] = 543;
6613 // work around unused variable warnings
6614 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
6615 || dynamic_array[ni.number - 1] != 543);
6621 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99
6623 CC="$ac_save_CC $ac_arg"
6624 if ac_fn_c_try_compile "$LINENO"; then :
6625 ac_cv_prog_cc_c99=$ac_arg
6627 rm -f core conftest.err conftest.$ac_objext
6628 test "x$ac_cv_prog_cc_c99" != "xno" && break
6630 rm -f conftest.$ac_ext
6635 case "x$ac_cv_prog_cc_c99" in
6637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6638 $as_echo "none needed" >&6; } ;;
6640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6641 $as_echo "unsupported" >&6; } ;;
6643 CC="$CC $ac_cv_prog_cc_c99"
6644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
6645 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
6647 if test "x$ac_cv_prog_cc_c99" != xno; then :
6648 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
6650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
6651 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
6652 if ${ac_cv_prog_cc_c89+:} false; then :
6653 $as_echo_n "(cached) " >&6
6655 ac_cv_prog_cc_c89=no
6657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6658 /* end confdefs.h. */
6662 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
6663 struct buf { int x; };
6664 FILE * (*rcsopen) (struct buf *, struct stat *, int);
6665 static char *e (p, i)
6671 static char *f (char * (*g) (char **, int), char **p, ...)
6676 s = g (p, va_arg (v,int));
6681 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
6682 function prototypes and stuff, but not '\xHH' hex character constants.
6683 These don't provoke an error unfortunately, instead are silently treated
6684 as 'x'. The following induces an error, until -std is added to get
6685 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
6686 array size at least. It's necessary to write '\x00'==0 to get something
6687 that's true only with -std. */
6688 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
6690 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
6691 inside strings and character constants. */
6693 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
6695 int test (int i, double x);
6696 struct s1 {int (*f) (int a);};
6697 struct s2 {int (*f) (double a);};
6698 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
6704 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
6709 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
6710 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
6712 CC="$ac_save_CC $ac_arg"
6713 if ac_fn_c_try_compile "$LINENO"; then :
6714 ac_cv_prog_cc_c89=$ac_arg
6716 rm -f core conftest.err conftest.$ac_objext
6717 test "x$ac_cv_prog_cc_c89" != "xno" && break
6719 rm -f conftest.$ac_ext
6724 case "x$ac_cv_prog_cc_c89" in
6726 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6727 $as_echo "none needed" >&6; } ;;
6729 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6730 $as_echo "unsupported" >&6; } ;;
6732 CC="$CC $ac_cv_prog_cc_c89"
6733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
6734 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
6736 if test "x$ac_cv_prog_cc_c89" != xno; then :
6737 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
6739 ac_cv_prog_cc_stdc=no
6745 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
6746 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
6747 if ${ac_cv_prog_cc_stdc+:} false; then :
6748 $as_echo_n "(cached) " >&6
6751 case $ac_cv_prog_cc_stdc in #(
6753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
6754 $as_echo "unsupported" >&6; } ;; #(
6756 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
6757 $as_echo "none needed" >&6; } ;; #(
6759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
6760 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
6766 # Code from module acl:
6767 # Code from module alloca:
6768 # Code from module alloca-opt:
6769 # Code from module allocator:
6770 # Code from module areadlink:
6771 # Code from module areadlinkat:
6772 # Code from module argmatch:
6773 # Code from module argp:
6774 # Code from module argp-version-etc:
6775 # Code from module at-internal:
6776 # Code from module backupfile:
6777 # Code from module bitrotate:
6778 # Code from module btowc:
6779 # Code from module c-ctype:
6780 # Code from module c-strcase:
6781 # Code from module c-strcaseeq:
6782 # Code from module canonicalize-lgpl:
6783 # Code from module careadlinkat:
6784 # Code from module chdir:
6785 # Code from module chdir-long:
6786 # Code from module chown:
6787 # Code from module clock-time:
6788 # Code from module cloexec:
6789 # Code from module close:
6790 # Code from module close-stream:
6791 # Code from module closedir:
6792 # Code from module closeout:
6793 # Code from module configmake:
6794 # Code from module d-ino:
6795 # Code from module dirent:
6796 # Code from module dirent-safer:
6797 # Code from module dirfd:
6798 # Code from module dirname:
6799 # Code from module dirname-lgpl:
6800 # Code from module dosname:
6801 # Code from module double-slash-root:
6802 # Code from module dup:
6803 # Code from module dup2:
6804 # Code from module environ:
6805 # Code from module errno:
6806 # Code from module error:
6807 # Code from module exclude:
6808 # Code from module exitfail:
6809 # Code from module extensions:
6811 # Code from module extern-inline:
6812 # Code from module fchdir:
6813 # Code from module fchmodat:
6814 # Code from module fchownat:
6815 # Code from module fcntl:
6816 # Code from module fcntl-h:
6817 # Code from module fd-hook:
6818 # Code from module fdopendir:
6819 # Code from module fdutimensat:
6820 # Code from module fileblocks:
6821 # Code from module filename:
6822 # Code from module filenamecat-lgpl:
6823 # Code from module float:
6824 # Code from module fnmatch:
6825 # Code from module fnmatch-gnu:
6826 # Code from module fpending:
6827 # Code from module fseek:
6828 # Code from module fseeko:
6830 # Code from module fstat:
6831 # Code from module fstatat:
6832 # Code from module full-write:
6833 # Code from module futimens:
6834 # Code from module getcwd:
6835 # Code from module getcwd-lgpl:
6836 # Code from module getdelim:
6837 # Code from module getdtablesize:
6838 # Code from module getline:
6839 # Code from module getopt-gnu:
6840 # Code from module getopt-posix:
6841 # Code from module getpagesize:
6842 # Code from module gettext:
6843 # Code from module gettext-h:
6844 # Code from module gettime:
6845 # Code from module gettimeofday:
6846 # Code from module gitlog-to-changelog:
6847 # Code from module hash:
6848 # Code from module havelib:
6849 # Code from module human:
6850 # Code from module include_next:
6851 # Code from module intprops:
6852 # Code from module inttostr:
6853 # Code from module inttypes:
6854 # Code from module inttypes-incomplete:
6855 # Code from module iswblank:
6856 # Code from module langinfo:
6857 # Code from module largefile:
6859 # Code from module lchown:
6860 # Code from module link:
6861 # Code from module link-follow:
6862 # Code from module linkat:
6863 # Code from module localcharset:
6864 # Code from module locale:
6865 # Code from module localeconv:
6866 # Code from module lseek:
6867 # Code from module lstat:
6868 # Code from module malloc-gnu:
6869 # Code from module malloc-posix:
6870 # Code from module malloca:
6871 # Code from module manywarnings:
6872 # Code from module mbchar:
6873 # Code from module mbrtowc:
6874 # Code from module mbscasecmp:
6875 # Code from module mbsinit:
6876 # Code from module mbsrtowcs:
6877 # Code from module mbtowc:
6878 # Code from module mbuiter:
6879 # Code from module memchr:
6880 # Code from module mempcpy:
6881 # Code from module memrchr:
6882 # Code from module mkdir:
6883 # Code from module mkdirat:
6884 # Code from module mkdtemp:
6885 # Code from module mkfifo:
6886 # Code from module mkfifoat:
6887 # Code from module mknod:
6888 # Code from module mktime:
6889 # Code from module modechange:
6890 # Code from module msvc-inval:
6891 # Code from module msvc-nothrow:
6892 # Code from module multiarch:
6893 # Code from module nl_langinfo:
6894 # Code from module nocrash:
6895 # Code from module obstack:
6896 # Code from module open:
6897 # Code from module openat:
6898 # Code from module openat-die:
6899 # Code from module openat-h:
6900 # Code from module opendir:
6901 # Code from module parse-datetime:
6902 # Code from module pathmax:
6903 # Code from module priv-set:
6904 # Code from module progname:
6905 # Code from module qacl:
6906 # Code from module quote:
6907 # Code from module quotearg:
6908 # Code from module quotearg-simple:
6909 # Code from module raise:
6910 # Code from module rawmemchr:
6911 # Code from module read:
6912 # Code from module readdir:
6913 # Code from module readlink:
6914 # Code from module readlinkat:
6915 # Code from module realloc-posix:
6916 # Code from module regex:
6917 # Code from module rename:
6918 # Code from module renameat:
6919 # Code from module rewinddir:
6920 # Code from module rmdir:
6921 # Code from module root-uid:
6922 # Code from module rpmatch:
6923 # Code from module safe-read:
6924 # Code from module safe-write:
6925 # Code from module same-inode:
6926 # Code from module save-cwd:
6927 # Code from module savedir:
6928 # Code from module secure_getenv:
6929 # Code from module selinux-at:
6930 # Code from module selinux-h:
6931 # Code from module setenv:
6932 # Code from module signal-h:
6933 # Code from module size_max:
6934 # Code from module sleep:
6935 # Code from module snippet/_Noreturn:
6936 # Code from module snippet/arg-nonnull:
6937 # Code from module snippet/c++defs:
6938 # Code from module snippet/unused-parameter:
6939 # Code from module snippet/warn-on-use:
6940 # Code from module snprintf:
6941 # Code from module ssize_t:
6942 # Code from module stat:
6943 # Code from module stat-macros:
6944 # Code from module stat-time:
6945 # Code from module statat:
6946 # Code from module stdalign:
6947 # Code from module stdarg:
6951 # Code from module stdbool:
6952 # Code from module stddef:
6953 # Code from module stdint:
6954 # Code from module stdio:
6955 # Code from module stdlib:
6956 # Code from module stpcpy:
6957 # Code from module strcase:
6958 # Code from module strchrnul:
6959 # Code from module strdup-posix:
6960 # Code from module streq:
6961 # Code from module strerror:
6962 # Code from module strerror-override:
6963 # Code from module string:
6964 # Code from module strings:
6965 # Code from module strndup:
6966 # Code from module strnlen:
6967 # Code from module strnlen1:
6968 # Code from module strtol:
6969 # Code from module strtoul:
6970 # Code from module strtoull:
6971 # Code from module strtoumax:
6972 # Code from module symlink:
6973 # Code from module symlinkat:
6974 # Code from module sys_stat:
6975 # Code from module sys_time:
6976 # Code from module sys_types:
6977 # Code from module sysexits:
6978 # Code from module tempname:
6979 # Code from module time:
6980 # Code from module time_r:
6981 # Code from module timespec:
6982 # Code from module unistd:
6983 # Code from module unistd-safer:
6984 # Code from module unitypes:
6985 # Code from module uniwidth/base:
6986 # Code from module uniwidth/width:
6987 # Code from module unlink:
6988 # Code from module unlinkat:
6989 # Code from module unlinkdir:
6990 # Code from module unlocked-io:
6991 # Code from module unsetenv:
6992 # Code from module utimens:
6993 # Code from module utimensat:
6994 # Code from module vasnprintf:
6995 # Code from module vasprintf:
6996 # Code from module verify:
6997 # Code from module version-etc:
6998 # Code from module version-etc-fsf:
6999 # Code from module vsnprintf:
7000 # Code from module warnings:
7001 # Code from module wchar:
7002 # Code from module wcrtomb:
7003 # Code from module wctype-h:
7004 # Code from module wcwidth:
7005 # Code from module write:
7006 # Code from module xalloc:
7007 # Code from module xalloc-die:
7008 # Code from module xalloc-oversized:
7009 # Code from module xgetcwd:
7010 # Code from module xsize:
7011 # Code from module xstrndup:
7012 # Code from module xstrtol:
7013 # Code from module xstrtoumax:
7014 # Code from module xvasprintf:
7017 # Check whether --enable-largefile was given.
7018 if test "${enable_largefile+set}" = set; then :
7019 enableval=$enable_largefile;
7022 if test "$enable_largefile" != no; then
7024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
7025 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
7026 if ${ac_cv_sys_largefile_CC+:} false; then :
7027 $as_echo_n "(cached) " >&6
7029 ac_cv_sys_largefile_CC=no
7030 if test "$GCC" != yes; then
7033 # IRIX 6.2 and later do not support large files by default,
7034 # so use the C compiler's -n32 option if that helps.
7035 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7036 /* end confdefs.h. */
7037 #include <sys/types.h>
7038 /* Check that off_t can represent 2**63 - 1 correctly.
7039 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7040 since some C++ compilers masquerading as C compilers
7041 incorrectly reject 9223372036854775807. */
7042 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7043 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7044 && LARGE_OFF_T % 2147483647 == 1)
7054 if ac_fn_c_try_compile "$LINENO"; then :
7057 rm -f core conftest.err conftest.$ac_objext
7059 if ac_fn_c_try_compile "$LINENO"; then :
7060 ac_cv_sys_largefile_CC=' -n32'; break
7062 rm -f core conftest.err conftest.$ac_objext
7066 rm -f conftest.$ac_ext
7069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
7070 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
7071 if test "$ac_cv_sys_largefile_CC" != no; then
7072 CC=$CC$ac_cv_sys_largefile_CC
7075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7076 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
7077 if ${ac_cv_sys_file_offset_bits+:} false; then :
7078 $as_echo_n "(cached) " >&6
7081 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7082 /* end confdefs.h. */
7083 #include <sys/types.h>
7084 /* Check that off_t can represent 2**63 - 1 correctly.
7085 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7086 since some C++ compilers masquerading as C compilers
7087 incorrectly reject 9223372036854775807. */
7088 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7089 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7090 && LARGE_OFF_T % 2147483647 == 1)
7100 if ac_fn_c_try_compile "$LINENO"; then :
7101 ac_cv_sys_file_offset_bits=no; break
7103 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7104 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7105 /* end confdefs.h. */
7106 #define _FILE_OFFSET_BITS 64
7107 #include <sys/types.h>
7108 /* Check that off_t can represent 2**63 - 1 correctly.
7109 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7110 since some C++ compilers masquerading as C compilers
7111 incorrectly reject 9223372036854775807. */
7112 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7113 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7114 && LARGE_OFF_T % 2147483647 == 1)
7124 if ac_fn_c_try_compile "$LINENO"; then :
7125 ac_cv_sys_file_offset_bits=64; break
7127 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7128 ac_cv_sys_file_offset_bits=unknown
7132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
7133 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
7134 case $ac_cv_sys_file_offset_bits in #(
7137 cat >>confdefs.h <<_ACEOF
7138 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7143 if test $ac_cv_sys_file_offset_bits = unknown; then
7144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
7145 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
7146 if ${ac_cv_sys_large_files+:} false; then :
7147 $as_echo_n "(cached) " >&6
7150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7151 /* end confdefs.h. */
7152 #include <sys/types.h>
7153 /* Check that off_t can represent 2**63 - 1 correctly.
7154 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7155 since some C++ compilers masquerading as C compilers
7156 incorrectly reject 9223372036854775807. */
7157 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7158 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7159 && LARGE_OFF_T % 2147483647 == 1)
7169 if ac_fn_c_try_compile "$LINENO"; then :
7170 ac_cv_sys_large_files=no; break
7172 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7174 /* end confdefs.h. */
7175 #define _LARGE_FILES 1
7176 #include <sys/types.h>
7177 /* Check that off_t can represent 2**63 - 1 correctly.
7178 We can't simply define LARGE_OFF_T to be 9223372036854775807,
7179 since some C++ compilers masquerading as C compilers
7180 incorrectly reject 9223372036854775807. */
7181 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7182 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7183 && LARGE_OFF_T % 2147483647 == 1)
7193 if ac_fn_c_try_compile "$LINENO"; then :
7194 ac_cv_sys_large_files=1; break
7196 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7197 ac_cv_sys_large_files=unknown
7201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
7202 $as_echo "$ac_cv_sys_large_files" >&6; }
7203 case $ac_cv_sys_large_files in #(
7206 cat >>confdefs.h <<_ACEOF
7207 #define _LARGE_FILES $ac_cv_sys_large_files
7215 $as_echo "#define _DARWIN_USE_64_BIT_INODE 1" >>confdefs.h
7219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing strerror" >&5
7220 $as_echo_n "checking for library containing strerror... " >&6; }
7221 if ${ac_cv_search_strerror+:} false; then :
7222 $as_echo_n "(cached) " >&6
7224 ac_func_search_save_LIBS=$LIBS
7225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7226 /* end confdefs.h. */
7228 /* Override any GCC internal prototype to avoid an error.
7229 Use char because int might match the return type of a GCC
7230 builtin and then its argument prototype would still apply. */
7243 for ac_lib in '' cposix; do
7244 if test -z "$ac_lib"; then
7245 ac_res="none required"
7248 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7250 if ac_fn_c_try_link "$LINENO"; then :
7251 ac_cv_search_strerror=$ac_res
7253 rm -f core conftest.err conftest.$ac_objext \
7255 if ${ac_cv_search_strerror+:} false; then :
7259 if ${ac_cv_search_strerror+:} false; then :
7262 ac_cv_search_strerror=no
7265 LIBS=$ac_func_search_save_LIBS
7267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_strerror" >&5
7268 $as_echo "$ac_cv_search_strerror" >&6; }
7269 ac_res=$ac_cv_search_strerror
7270 if test "$ac_res" != no; then :
7271 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
7276 $as_echo_n "checking for inline... " >&6; }
7277 if ${ac_cv_c_inline+:} false; then :
7278 $as_echo_n "(cached) " >&6
7281 for ac_kw in inline __inline__ __inline; do
7282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7283 /* end confdefs.h. */
7286 static $ac_kw foo_t static_foo () {return 0; }
7287 $ac_kw foo_t foo () {return 0; }
7291 if ac_fn_c_try_compile "$LINENO"; then :
7292 ac_cv_c_inline=$ac_kw
7294 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7295 test "$ac_cv_c_inline" != no && break
7299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
7300 $as_echo "$ac_cv_c_inline" >&6; }
7302 case $ac_cv_c_inline in
7305 case $ac_cv_c_inline in
7307 *) ac_val=$ac_cv_c_inline;;
7309 cat >>confdefs.h <<_ACEOF
7311 #define inline $ac_val
7321 for ac_header in $ac_header_list
7323 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7324 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7326 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7327 cat >>confdefs.h <<_ACEOF
7328 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7371 for ac_header in sys/buf.h
7373 ac_fn_c_check_header_compile "$LINENO" "sys/buf.h" "ac_cv_header_sys_buf_h" "#if HAVE_SYS_PARAM_H
7374 #include <sys/param.h>
7377 if test "x$ac_cv_header_sys_buf_h" = xyes; then :
7378 cat >>confdefs.h <<_ACEOF
7379 #define HAVE_SYS_BUF_H 1
7387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5
7388 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; }
7389 if ${ac_cv_header_sys_wait_h+:} false; then :
7390 $as_echo_n "(cached) " >&6
7392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7393 /* end confdefs.h. */
7394 #include <sys/types.h>
7395 #include <sys/wait.h>
7397 # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8)
7400 # define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
7408 s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7413 if ac_fn_c_try_compile "$LINENO"; then :
7414 ac_cv_header_sys_wait_h=yes
7416 ac_cv_header_sys_wait_h=no
7418 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5
7421 $as_echo "$ac_cv_header_sys_wait_h" >&6; }
7422 if test $ac_cv_header_sys_wait_h = yes; then
7424 $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h
7430 for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
7431 as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
7432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5
7433 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; }
7434 if eval \${$as_ac_Header+:} false; then :
7435 $as_echo_n "(cached) " >&6
7437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7438 /* end confdefs.h. */
7439 #include <sys/types.h>
7451 if ac_fn_c_try_compile "$LINENO"; then :
7452 eval "$as_ac_Header=yes"
7454 eval "$as_ac_Header=no"
7456 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7458 eval ac_res=\$$as_ac_Header
7459 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7460 $as_echo "$ac_res" >&6; }
7461 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7462 cat >>confdefs.h <<_ACEOF
7463 #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
7466 ac_header_dirent=$ac_hdr; break
7470 # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
7471 if test $ac_header_dirent = dirent.h; then
7472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7473 $as_echo_n "checking for library containing opendir... " >&6; }
7474 if ${ac_cv_search_opendir+:} false; then :
7475 $as_echo_n "(cached) " >&6
7477 ac_func_search_save_LIBS=$LIBS
7478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7479 /* end confdefs.h. */
7481 /* Override any GCC internal prototype to avoid an error.
7482 Use char because int might match the return type of a GCC
7483 builtin and then its argument prototype would still apply. */
7496 for ac_lib in '' dir; do
7497 if test -z "$ac_lib"; then
7498 ac_res="none required"
7501 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7503 if ac_fn_c_try_link "$LINENO"; then :
7504 ac_cv_search_opendir=$ac_res
7506 rm -f core conftest.err conftest.$ac_objext \
7508 if ${ac_cv_search_opendir+:} false; then :
7512 if ${ac_cv_search_opendir+:} false; then :
7515 ac_cv_search_opendir=no
7518 LIBS=$ac_func_search_save_LIBS
7520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7521 $as_echo "$ac_cv_search_opendir" >&6; }
7522 ac_res=$ac_cv_search_opendir
7523 if test "$ac_res" != no; then :
7524 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7529 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5
7530 $as_echo_n "checking for library containing opendir... " >&6; }
7531 if ${ac_cv_search_opendir+:} false; then :
7532 $as_echo_n "(cached) " >&6
7534 ac_func_search_save_LIBS=$LIBS
7535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7536 /* end confdefs.h. */
7538 /* Override any GCC internal prototype to avoid an error.
7539 Use char because int might match the return type of a GCC
7540 builtin and then its argument prototype would still apply. */
7553 for ac_lib in '' x; do
7554 if test -z "$ac_lib"; then
7555 ac_res="none required"
7558 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7560 if ac_fn_c_try_link "$LINENO"; then :
7561 ac_cv_search_opendir=$ac_res
7563 rm -f core conftest.err conftest.$ac_objext \
7565 if ${ac_cv_search_opendir+:} false; then :
7569 if ${ac_cv_search_opendir+:} false; then :
7572 ac_cv_search_opendir=no
7575 LIBS=$ac_func_search_save_LIBS
7577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5
7578 $as_echo "$ac_cv_search_opendir" >&6; }
7579 ac_res=$ac_cv_search_opendir
7580 if test "$ac_res" != no; then :
7581 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether sys/types.h defines makedev" >&5
7588 $as_echo_n "checking whether sys/types.h defines makedev... " >&6; }
7589 if ${ac_cv_header_sys_types_h_makedev+:} false; then :
7590 $as_echo_n "(cached) " >&6
7592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7593 /* end confdefs.h. */
7594 #include <sys/types.h>
7598 return makedev(0, 0);
7603 if ac_fn_c_try_link "$LINENO"; then :
7604 ac_cv_header_sys_types_h_makedev=yes
7606 ac_cv_header_sys_types_h_makedev=no
7608 rm -f core conftest.err conftest.$ac_objext \
7609 conftest$ac_exeext conftest.$ac_ext
7612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_types_h_makedev" >&5
7613 $as_echo "$ac_cv_header_sys_types_h_makedev" >&6; }
7615 if test $ac_cv_header_sys_types_h_makedev = no; then
7616 ac_fn_c_check_header_mongrel "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default"
7617 if test "x$ac_cv_header_sys_mkdev_h" = xyes; then :
7619 $as_echo "#define MAJOR_IN_MKDEV 1" >>confdefs.h
7625 if test $ac_cv_header_sys_mkdev_h = no; then
7626 ac_fn_c_check_header_mongrel "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default"
7627 if test "x$ac_cv_header_sys_sysmacros_h" = xyes; then :
7629 $as_echo "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h
7637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
7638 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
7639 if ${ac_cv_header_stat_broken+:} false; then :
7640 $as_echo_n "(cached) " >&6
7642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7643 /* end confdefs.h. */
7644 #include <sys/types.h>
7645 #include <sys/stat.h>
7647 #if defined S_ISBLK && defined S_IFDIR
7648 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
7651 #if defined S_ISBLK && defined S_IFCHR
7652 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
7655 #if defined S_ISLNK && defined S_IFREG
7656 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
7659 #if defined S_ISSOCK && defined S_IFREG
7660 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
7664 if ac_fn_c_try_compile "$LINENO"; then :
7665 ac_cv_header_stat_broken=no
7667 ac_cv_header_stat_broken=yes
7669 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
7672 $as_echo "$ac_cv_header_stat_broken" >&6; }
7673 if test $ac_cv_header_stat_broken = yes; then
7675 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
7679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
7680 $as_echo_n "checking for ANSI C header files... " >&6; }
7681 if ${ac_cv_header_stdc+:} false; then :
7682 $as_echo_n "(cached) " >&6
7684 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7685 /* end confdefs.h. */
7699 if ac_fn_c_try_compile "$LINENO"; then :
7700 ac_cv_header_stdc=yes
7702 ac_cv_header_stdc=no
7704 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7706 if test $ac_cv_header_stdc = yes; then
7707 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7709 /* end confdefs.h. */
7713 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7714 $EGREP "memchr" >/dev/null 2>&1; then :
7717 ac_cv_header_stdc=no
7723 if test $ac_cv_header_stdc = yes; then
7724 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7725 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7726 /* end confdefs.h. */
7730 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7731 $EGREP "free" >/dev/null 2>&1; then :
7734 ac_cv_header_stdc=no
7740 if test $ac_cv_header_stdc = yes; then
7741 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
7742 if test "$cross_compiling" = yes; then :
7745 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7746 /* end confdefs.h. */
7749 #if ((' ' & 0x0FF) == 0x020)
7750 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
7751 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
7753 # define ISLOWER(c) \
7754 (('a' <= (c) && (c) <= 'i') \
7755 || ('j' <= (c) && (c) <= 'r') \
7756 || ('s' <= (c) && (c) <= 'z'))
7757 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
7760 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
7765 for (i = 0; i < 256; i++)
7766 if (XOR (islower (i), ISLOWER (i))
7767 || toupper (i) != TOUPPER (i))
7772 if ac_fn_c_try_run "$LINENO"; then :
7775 ac_cv_header_stdc=no
7777 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7778 conftest.$ac_objext conftest.beam conftest.$ac_ext
7783 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
7784 $as_echo "$ac_cv_header_stdc" >&6; }
7785 if test $ac_cv_header_stdc = yes; then
7787 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
7792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for st_fstype string in struct stat" >&5
7793 $as_echo_n "checking for st_fstype string in struct stat... " >&6; }
7794 if ${diff_cv_st_fstype_string+:} false; then :
7795 $as_echo_n "(cached) " >&6
7797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7798 /* end confdefs.h. */
7799 #include <sys/types.h>
7800 #include <sys/stat.h>
7804 struct stat s; s.st_fstype[0] = 'x';
7809 if ac_fn_c_try_compile "$LINENO"; then :
7810 diff_cv_st_fstype_string=yes
7812 diff_cv_st_fstype_string=no
7814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $diff_cv_st_fstype_string" >&5
7818 $as_echo "$diff_cv_st_fstype_string" >&6; }
7819 if test $diff_cv_st_fstype_string = yes; then
7821 $as_echo "#define HAVE_ST_FSTYPE_STRING 1" >>confdefs.h
7825 # even if we use gnulib's acl.h with integrated m4 file later on (used because
7826 # of very useful file_has_acl() function) we need following checks that restrict
7827 # tar to use POSIX.1e ACLs only.
7829 # Check whether --with-posix-acls was given.
7830 if test "${with_posix_acls+set}" = set; then :
7831 withval=$with_posix_acls; with_posix_acls=no
7834 if test "x$with_posix_acls" != "xno"; then
7835 for ac_header in sys/acl.h
7837 ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
7838 if test "x$ac_cv_header_sys_acl_h" = xyes; then :
7839 cat >>confdefs.h <<_ACEOF
7840 #define HAVE_SYS_ACL_H 1
7849 for tar_acl_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
7850 acl_to_text acl_from_text; do \
7851 test "x$with_posix_acls" = xno && break
7852 as_ac_Search=`$as_echo "ac_cv_search_$tar_acl_func" | $as_tr_sh`
7853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing $tar_acl_func" >&5
7854 $as_echo_n "checking for library containing $tar_acl_func... " >&6; }
7855 if eval \${$as_ac_Search+:} false; then :
7856 $as_echo_n "(cached) " >&6
7858 ac_func_search_save_LIBS=$LIBS
7859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7860 /* end confdefs.h. */
7862 /* Override any GCC internal prototype to avoid an error.
7863 Use char because int might match the return type of a GCC
7864 builtin and then its argument prototype would still apply. */
7868 char $tar_acl_func ();
7872 return $tar_acl_func ();
7877 for ac_lib in '' acl pacl; do
7878 if test -z "$ac_lib"; then
7879 ac_res="none required"
7882 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7884 if ac_fn_c_try_link "$LINENO"; then :
7885 eval "$as_ac_Search=\$ac_res"
7887 rm -f core conftest.err conftest.$ac_objext \
7889 if eval \${$as_ac_Search+:} false; then :
7893 if eval \${$as_ac_Search+:} false; then :
7896 eval "$as_ac_Search=no"
7899 LIBS=$ac_func_search_save_LIBS
7901 eval ac_res=\$$as_ac_Search
7902 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
7903 $as_echo "$ac_res" >&6; }
7904 eval ac_res=\$$as_ac_Search
7905 if test "$ac_res" != no; then :
7906 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7913 if test "x$with_posix_acls" != xno; then
7915 $as_echo "#define HAVE_POSIX_ACLS /**/" >>confdefs.h
7919 # disable acls in gnulib's checks
7920 export enable_acl=no
7923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of signal handlers" >&5
7924 $as_echo_n "checking return type of signal handlers... " >&6; }
7925 if ${ac_cv_type_signal+:} false; then :
7926 $as_echo_n "(cached) " >&6
7928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7929 /* end confdefs.h. */
7930 #include <sys/types.h>
7936 return *(signal (0, 0)) (0) == 1;
7941 if ac_fn_c_try_compile "$LINENO"; then :
7942 ac_cv_type_signal=int
7944 ac_cv_type_signal=void
7946 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_signal" >&5
7949 $as_echo "$ac_cv_type_signal" >&6; }
7951 cat >>confdefs.h <<_ACEOF
7952 #define RETSIGTYPE $ac_cv_type_signal
7956 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
7957 if test "x$ac_cv_type_mode_t" = xyes; then :
7961 cat >>confdefs.h <<_ACEOF
7967 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7968 if test "x$ac_cv_type_pid_t" = xyes; then :
7972 cat >>confdefs.h <<_ACEOF
7978 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
7979 if test "x$ac_cv_type_off_t" = xyes; then :
7983 cat >>confdefs.h <<_ACEOF
7984 #define off_t long int
7989 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
7990 if test "x$ac_cv_type_size_t" = xyes; then :
7994 cat >>confdefs.h <<_ACEOF
7995 #define size_t unsigned int
8000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8001 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
8002 if ${ac_cv_type_uid_t+:} false; then :
8003 $as_echo_n "(cached) " >&6
8005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8006 /* end confdefs.h. */
8007 #include <sys/types.h>
8010 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8011 $EGREP "uid_t" >/dev/null 2>&1; then :
8012 ac_cv_type_uid_t=yes
8019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8020 $as_echo "$ac_cv_type_uid_t" >&6; }
8021 if test $ac_cv_type_uid_t = no; then
8023 $as_echo "#define uid_t int" >>confdefs.h
8026 $as_echo "#define gid_t int" >>confdefs.h
8030 ac_fn_c_check_type "$LINENO" "major_t" "ac_cv_type_major_t" "$ac_includes_default"
8031 if test "x$ac_cv_type_major_t" = xyes; then :
8035 $as_echo "#define major_t int" >>confdefs.h
8039 ac_fn_c_check_type "$LINENO" "minor_t" "ac_cv_type_minor_t" "$ac_includes_default"
8040 if test "x$ac_cv_type_minor_t" = xyes; then :
8044 $as_echo "#define minor_t int" >>confdefs.h
8048 ac_fn_c_check_type "$LINENO" "dev_t" "ac_cv_type_dev_t" "$ac_includes_default"
8049 if test "x$ac_cv_type_dev_t" = xyes; then :
8053 cat >>confdefs.h <<_ACEOF
8054 #define dev_t unsigned
8059 ac_fn_c_check_type "$LINENO" "ino_t" "ac_cv_type_ino_t" "$ac_includes_default"
8060 if test "x$ac_cv_type_ino_t" = xyes; then :
8064 cat >>confdefs.h <<_ACEOF
8065 #define ino_t unsigned
8072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
8073 $as_echo_n "checking for ssize_t... " >&6; }
8074 if ${gt_cv_ssize_t+:} false; then :
8075 $as_echo_n "(cached) " >&6
8077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8078 /* end confdefs.h. */
8079 #include <sys/types.h>
8083 int x = sizeof (ssize_t *) + sizeof (ssize_t);
8089 if ac_fn_c_try_compile "$LINENO"; then :
8094 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
8097 $as_echo "$gt_cv_ssize_t" >&6; }
8098 if test $gt_cv_ssize_t = no; then
8100 $as_echo "#define ssize_t int" >>confdefs.h
8111 LIBC_FATAL_STDERR_=1
8112 export LIBC_FATAL_STDERR_
8114 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8115 # for constant arguments. Useless!
8116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
8117 $as_echo_n "checking for working alloca.h... " >&6; }
8118 if ${ac_cv_working_alloca_h+:} false; then :
8119 $as_echo_n "(cached) " >&6
8121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8122 /* end confdefs.h. */
8127 char *p = (char *) alloca (2 * sizeof (int));
8133 if ac_fn_c_try_link "$LINENO"; then :
8134 ac_cv_working_alloca_h=yes
8136 ac_cv_working_alloca_h=no
8138 rm -f core conftest.err conftest.$ac_objext \
8139 conftest$ac_exeext conftest.$ac_ext
8141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
8142 $as_echo "$ac_cv_working_alloca_h" >&6; }
8143 if test $ac_cv_working_alloca_h = yes; then
8145 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
8149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
8150 $as_echo_n "checking for alloca... " >&6; }
8151 if ${ac_cv_func_alloca_works+:} false; then :
8152 $as_echo_n "(cached) " >&6
8154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8155 /* end confdefs.h. */
8157 # define alloca __builtin_alloca
8160 # include <malloc.h>
8161 # define alloca _alloca
8163 # ifdef HAVE_ALLOCA_H
8164 # include <alloca.h>
8169 # ifndef alloca /* predefined by HP cc +Olibcalls */
8170 void *alloca (size_t);
8180 char *p = (char *) alloca (1);
8186 if ac_fn_c_try_link "$LINENO"; then :
8187 ac_cv_func_alloca_works=yes
8189 ac_cv_func_alloca_works=no
8191 rm -f core conftest.err conftest.$ac_objext \
8192 conftest$ac_exeext conftest.$ac_ext
8194 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
8195 $as_echo "$ac_cv_func_alloca_works" >&6; }
8197 if test $ac_cv_func_alloca_works = yes; then
8199 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
8202 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8203 # that cause trouble. Some versions do not even contain alloca or
8204 # contain a buggy version. If you still want to use their alloca,
8205 # use ar to extract alloca.o from them instead of compiling alloca.c.
8211 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
8213 $as_echo "#define C_ALLOCA 1" >>confdefs.h
8216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
8217 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
8218 if ${ac_cv_os_cray+:} false; then :
8219 $as_echo_n "(cached) " >&6
8221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8222 /* end confdefs.h. */
8223 #if defined CRAY && ! defined CRAY2
8230 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8231 $EGREP "webecray" >/dev/null 2>&1; then :
8239 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
8240 $as_echo "$ac_cv_os_cray" >&6; }
8241 if test $ac_cv_os_cray = yes; then
8242 for ac_func in _getb67 GETB67 getb67; do
8243 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8244 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8245 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8247 cat >>confdefs.h <<_ACEOF
8248 #define CRAY_STACKSEG_END $ac_func
8257 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
8258 $as_echo_n "checking stack direction for C alloca... " >&6; }
8259 if ${ac_cv_c_stack_direction+:} false; then :
8260 $as_echo_n "(cached) " >&6
8262 if test "$cross_compiling" = yes; then :
8263 ac_cv_c_stack_direction=0
8265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8266 /* end confdefs.h. */
8267 $ac_includes_default
8269 find_stack_direction (int *addr, int depth)
8274 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
8275 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
8280 main (int argc, char **argv)
8282 return find_stack_direction (0, argc + !argv + 20) < 0;
8285 if ac_fn_c_try_run "$LINENO"; then :
8286 ac_cv_c_stack_direction=1
8288 ac_cv_c_stack_direction=-1
8290 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8291 conftest.$ac_objext conftest.beam conftest.$ac_ext
8295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
8296 $as_echo "$ac_cv_c_stack_direction" >&6; }
8297 cat >>confdefs.h <<_ACEOF
8298 #define STACK_DIRECTION $ac_cv_c_stack_direction
8304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
8305 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
8306 if ${ac_cv_c_restrict+:} false; then :
8307 $as_echo_n "(cached) " >&6
8310 # The order here caters to the fact that C++ does not require restrict.
8311 for ac_kw in __restrict __restrict__ _Restrict restrict; do
8312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8313 /* end confdefs.h. */
8314 typedef int * int_ptr;
8315 int foo (int_ptr $ac_kw ip) {
8329 if ac_fn_c_try_compile "$LINENO"; then :
8330 ac_cv_c_restrict=$ac_kw
8332 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8333 test "$ac_cv_c_restrict" != no && break
8337 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
8338 $as_echo "$ac_cv_c_restrict" >&6; }
8340 case $ac_cv_c_restrict in
8342 no) $as_echo "#define restrict /**/" >>confdefs.h
8344 *) cat >>confdefs.h <<_ACEOF
8345 #define restrict $ac_cv_c_restrict
8350 ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default"
8351 if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then :
8357 cat >>confdefs.h <<_ACEOF
8358 #define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl
8361 ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default"
8362 if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then :
8368 cat >>confdefs.h <<_ACEOF
8369 #define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl
8372 ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default"
8373 if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then :
8379 cat >>confdefs.h <<_ACEOF
8380 #define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl
8383 ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default"
8384 if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then :
8390 cat >>confdefs.h <<_ACEOF
8391 #define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl
8394 ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default"
8395 if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then :
8401 cat >>confdefs.h <<_ACEOF
8402 #define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl
8405 ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default"
8406 if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then :
8412 cat >>confdefs.h <<_ACEOF
8413 #define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl
8416 ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default"
8417 if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then :
8423 cat >>confdefs.h <<_ACEOF
8424 #define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl
8427 ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default"
8428 if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then :
8434 cat >>confdefs.h <<_ACEOF
8435 #define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl
8438 ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default"
8439 if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then :
8445 cat >>confdefs.h <<_ACEOF
8446 #define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl
8449 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
8450 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
8456 cat >>confdefs.h <<_ACEOF
8457 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
8460 ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default"
8461 if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then :
8467 cat >>confdefs.h <<_ACEOF
8468 #define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl
8471 ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default"
8472 if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then :
8478 cat >>confdefs.h <<_ACEOF
8479 #define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl
8482 ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default"
8483 if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then :
8489 cat >>confdefs.h <<_ACEOF
8490 #define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl
8496 for ac_func in $ac_func_list
8498 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
8499 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
8500 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
8501 cat >>confdefs.h <<_ACEOF
8502 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
8517 XGETTEXT_EXTRA_OPTIONS=
8519 # Make sure we can run config.sub.
8520 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
8521 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
8523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
8524 $as_echo_n "checking build system type... " >&6; }
8525 if ${ac_cv_build+:} false; then :
8526 $as_echo_n "(cached) " >&6
8528 ac_build_alias=$build_alias
8529 test "x$ac_build_alias" = x &&
8530 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
8531 test "x$ac_build_alias" = x &&
8532 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
8533 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
8534 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
8537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
8538 $as_echo "$ac_cv_build" >&6; }
8539 case $ac_cv_build in
8541 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
8544 ac_save_IFS=$IFS; IFS='-'
8550 # Remember, the first character of IFS is used to create $*,
8551 # except with old shells:
8554 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
8557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
8558 $as_echo_n "checking host system type... " >&6; }
8559 if ${ac_cv_host+:} false; then :
8560 $as_echo_n "(cached) " >&6
8562 if test "x$host_alias" = x; then
8563 ac_cv_host=$ac_cv_build
8565 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
8566 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
8570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
8571 $as_echo "$ac_cv_host" >&6; }
8574 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
8577 ac_save_IFS=$IFS; IFS='-'
8583 # Remember, the first character of IFS is used to create $*,
8584 # except with old shells:
8587 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
8590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
8591 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
8592 if ${gl_cv_struct_dirent_d_ino+:} false; then :
8593 $as_echo_n "(cached) " >&6
8595 if test "$cross_compiling" = yes; then :
8597 # Guess yes on glibc systems with Linux kernel.
8598 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
8599 # If we don't know, assume the worst.
8600 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
8604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8605 /* end confdefs.h. */
8606 #include <sys/types.h>
8607 #include <sys/stat.h>
8613 DIR *dp = opendir (".");
8621 if (stat (e->d_name, &st) != 0)
8623 if (e->d_ino != st.st_ino)
8631 if ac_fn_c_try_run "$LINENO"; then :
8632 gl_cv_struct_dirent_d_ino=yes
8634 gl_cv_struct_dirent_d_ino=no
8636 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8637 conftest.$ac_objext conftest.beam conftest.$ac_ext
8641 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
8642 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
8643 case "$gl_cv_struct_dirent_d_ino" in
8646 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
8652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
8653 $as_echo_n "checking for long file names... " >&6; }
8654 if ${ac_cv_sys_long_file_names+:} false; then :
8655 $as_echo_n "(cached) " >&6
8657 ac_cv_sys_long_file_names=yes
8658 # Test for long file names in all the places we know might matter:
8659 # . the current directory, where building will happen
8660 # $prefix/lib where we will be installing things
8661 # $exec_prefix/lib likewise
8662 # $TMPDIR if set, where it might want to write temporary files
8663 # /tmp where it might want to write temporary files
8666 for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
8667 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
8668 # in the usual case where exec_prefix is '${prefix}'.
8670 . | /* | ?:[\\/]*) ;; #(
8673 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
8674 ac_xdir=$ac_dir/cf$$
8675 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
8676 ac_tf1=$ac_xdir/conftest9012345
8677 ac_tf2=$ac_xdir/conftest9012346
8678 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
8679 ac_cv_sys_long_file_names=no
8680 rm -f -r "$ac_xdir" 2>/dev/null
8681 test $ac_cv_sys_long_file_names = no && break
8684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
8685 $as_echo "$ac_cv_sys_long_file_names" >&6; }
8686 if test $ac_cv_sys_long_file_names = yes; then
8688 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
8701 GNULIB_MBSNRTOWCS=0;
8704 GNULIB_WCSNRTOMBS=0;
8721 GNULIB_WCSCASECMP=0;
8722 GNULIB_WCSNCASECMP=0;
8772 HAVE_DECL_WCWIDTH=1;
8773 REPLACE_MBSTATE_T=0;
8779 REPLACE_MBSRTOWCS=0;
8780 REPLACE_MBSNRTOWCS=0;
8782 REPLACE_WCSRTOMBS=0;
8783 REPLACE_WCSNRTOMBS=0;
8788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
8789 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
8790 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
8791 $as_echo_n "(cached) " >&6
8793 gl_cv_header_wchar_h_correct_inline=yes
8794 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8795 /* end confdefs.h. */
8797 #define wcstod renamed_wcstod
8798 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8800 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8801 included before <wchar.h>. */
8806 extern int zero (void);
8807 int main () { return zero(); }
8810 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8811 (eval $ac_compile) 2>&5
8813 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8814 test $ac_status = 0; }; then
8815 mv conftest.$ac_objext conftest1.$ac_objext
8816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8817 /* end confdefs.h. */
8819 #define wcstod renamed_wcstod
8820 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
8822 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
8823 included before <wchar.h>. */
8828 int zero (void) { return 0; }
8831 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
8832 (eval $ac_compile) 2>&5
8834 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8835 test $ac_status = 0; }; then
8836 mv conftest.$ac_objext conftest2.$ac_objext
8837 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
8840 gl_cv_header_wchar_h_correct_inline=no
8844 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
8847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
8848 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
8849 if test $gl_cv_header_wchar_h_correct_inline = no; then
8850 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
8851 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
8852 C99 mode. You have four options:
8853 - Add the flag -fgnu89-inline to CC and reconfigure, or
8854 - Fix your include files, using parts of
8855 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
8856 - Use a gcc version older than 4.3, or
8857 - Don't use the flags -std=c99 or -std=gnu99.
8858 Configuration aborted." "$LINENO" 5
8864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8865 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
8866 if ${am_cv_langinfo_codeset+:} false; then :
8867 $as_echo_n "(cached) " >&6
8869 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8870 /* end confdefs.h. */
8871 #include <langinfo.h>
8875 char* cs = nl_langinfo(CODESET); return !cs;
8880 if ac_fn_c_try_link "$LINENO"; then :
8881 am_cv_langinfo_codeset=yes
8883 am_cv_langinfo_codeset=no
8885 rm -f core conftest.err conftest.$ac_objext \
8886 conftest$ac_exeext conftest.$ac_ext
8889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8890 $as_echo "$am_cv_langinfo_codeset" >&6; }
8891 if test $am_cv_langinfo_codeset = yes; then
8893 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8900 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
8901 $as_echo_n "checking for a traditional french locale... " >&6; }
8902 if ${gt_cv_locale_fr+:} false; then :
8903 $as_echo_n "(cached) " >&6
8906 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8907 /* end confdefs.h. */
8911 #if HAVE_LANGINFO_CODESET
8912 # include <langinfo.h>
8919 /* Check whether the given locale name is recognized by the system. */
8920 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
8921 /* On native Windows, setlocale(category, "") looks at the system settings,
8922 not at the environment variables. Also, when an encoding suffix such
8923 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
8924 category of the locale to "C". */
8925 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
8926 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
8929 if (setlocale (LC_ALL, "") == NULL) return 1;
8931 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
8932 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
8933 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
8934 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
8935 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
8936 some unit tests fail.
8937 On MirBSD 10, when an unsupported locale is specified, setlocale()
8938 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
8939 #if HAVE_LANGINFO_CODESET
8941 const char *cs = nl_langinfo (CODESET);
8942 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
8943 || strcmp (cs, "UTF-8") == 0)
8948 /* On Cygwin, avoid locale names without encoding suffix, because the
8949 locale_charset() function relies on the encoding suffix. Note that
8950 LC_ALL is set on the command line. */
8951 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
8953 /* Check whether in the abbreviation of the second month, the second
8954 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
8955 one byte long. This excludes the UTF-8 encoding. */
8956 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
8957 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
8958 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
8959 /* Check whether the decimal separator is a comma.
8960 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
8961 are nl_langinfo(RADIXCHAR) are both ".". */
8962 if (localeconv () ->decimal_point[0] != ',') return 1;
8968 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
8969 (eval $ac_link) 2>&5
8971 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
8972 test $ac_status = 0; } && test -s conftest$ac_exeext; then
8974 # Handle native Windows specially, because there setlocale() interprets
8975 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
8976 # "fr" or "fra" as "French" or "French_France.1252",
8977 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
8978 # "ja" as "Japanese" or "Japanese_Japan.932",
8981 # Test for the native Windows locale name.
8982 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8983 gt_cv_locale_fr=French_France.1252
8986 gt_cv_locale_fr=none
8990 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
8991 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
8992 # configure script would override the LC_ALL setting. Likewise for
8993 # LC_CTYPE, which is also set at the beginning of the configure script.
8994 # Test for the usual locale name.
8995 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
8996 gt_cv_locale_fr=fr_FR
8998 # Test for the locale name with explicit encoding suffix.
8999 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9000 gt_cv_locale_fr=fr_FR.ISO-8859-1
9002 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
9003 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9004 gt_cv_locale_fr=fr_FR.ISO8859-1
9006 # Test for the HP-UX locale name.
9007 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9008 gt_cv_locale_fr=fr_FR.iso88591
9010 # Test for the Solaris 7 locale name.
9011 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9015 gt_cv_locale_fr=none
9027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
9028 $as_echo "$gt_cv_locale_fr" >&6; }
9029 LOCALE_FR=$gt_cv_locale_fr
9035 GNULIB_CALLOC_POSIX=0;
9036 GNULIB_CANONICALIZE_FILE_NAME=0;
9037 GNULIB_GETLOADAVG=0;
9040 GNULIB_MALLOC_POSIX=0;
9047 GNULIB_POSIX_OPENPT=0;
9053 GNULIB_REALLOC_POSIX=0;
9056 GNULIB_SECURE_GETENV=0;
9061 GNULIB_SYSTEM_POSIX=0;
9067 HAVE_CANONICALIZE_FILE_NAME=1;
9068 HAVE_DECL_GETLOADAVG=1;
9076 HAVE_POSIX_OPENPT=1;
9084 HAVE_SECURE_GETENV=1;
9090 HAVE_STRUCT_RANDOM_DATA=1;
9091 HAVE_SYS_LOADAVG_H=0;
9093 HAVE_DECL_UNSETENV=1;
9095 REPLACE_CANONICALIZE_FILE_NAME=0;
9100 REPLACE_PTSNAME_R=0;
9118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
9119 $as_echo_n "checking whether // is distinct from /... " >&6; }
9120 if ${gl_cv_double_slash_root+:} false; then :
9121 $as_echo_n "(cached) " >&6
9123 if test x"$cross_compiling" = xyes ; then
9124 # When cross-compiling, there is no way to tell whether // is special
9125 # short of a list of hosts. However, the only known hosts to date
9126 # that have a distinct // are Apollo DomainOS (too old to port to),
9127 # Cygwin, and z/OS. If anyone knows of another system for which // has
9128 # special semantics and is distinct from /, please report it to
9129 # <bug-gnulib@gnu.org>.
9131 *-cygwin | i370-ibm-openedition)
9132 gl_cv_double_slash_root=yes ;;
9134 # Be optimistic and assume that / and // are the same when we
9136 gl_cv_double_slash_root='unknown, assuming no' ;;
9139 set x `ls -di / // 2>/dev/null`
9140 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
9141 gl_cv_double_slash_root=no
9143 gl_cv_double_slash_root=yes
9147 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
9148 $as_echo "$gl_cv_double_slash_root" >&6; }
9149 if test "$gl_cv_double_slash_root" = yes; then
9151 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
9159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
9160 $as_echo_n "checking whether realpath works... " >&6; }
9161 if ${gl_cv_func_realpath_works+:} false; then :
9162 $as_echo_n "(cached) " >&6
9167 if test "$cross_compiling" = yes; then :
9169 # Guess yes on glibc systems.
9170 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;;
9171 # If we don't know, assume the worst.
9172 *) gl_cv_func_realpath_works="guessing no" ;;
9176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9177 /* end confdefs.h. */
9182 #if defined __MACH__ && defined __APPLE__
9183 /* Avoid a crash on Mac OS X. */
9184 #include <mach/mach.h>
9185 #include <mach/mach_error.h>
9186 #include <mach/thread_status.h>
9187 #include <mach/exception.h>
9188 #include <mach/task.h>
9189 #include <pthread.h>
9190 /* The exception port on which our thread listens. */
9191 static mach_port_t our_exception_port;
9192 /* The main function of the thread listening for exceptions of type
9195 mach_exception_thread (void *arg)
9197 /* Buffer for a message to be received. */
9199 mach_msg_header_t head;
9200 mach_msg_body_t msgh_body;
9203 mach_msg_return_t retval;
9204 /* Wait for a message on the exception port. */
9205 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
9206 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
9207 if (retval != MACH_MSG_SUCCESS)
9214 mach_port_t self = mach_task_self ();
9215 /* Allocate a port on which the thread shall listen for exceptions. */
9216 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
9218 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
9219 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
9220 MACH_MSG_TYPE_MAKE_SEND)
9222 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
9224 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
9225 /* Create the thread listening on the exception port. */
9226 pthread_attr_t attr;
9228 if (pthread_attr_init (&attr) == 0
9229 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
9230 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
9231 pthread_attr_destroy (&attr);
9232 /* Replace the exception port info for these exceptions with our own.
9233 Note that we replace the exception port for the entire task, not only
9234 for a particular thread. This has the effect that when our exception
9235 port gets the message, the thread specific exception port has already
9236 been asked, and we don't need to bother about it.
9237 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
9238 task_set_exception_ports (self, mask, our_exception_port,
9239 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
9244 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9245 /* Avoid a crash on native Windows. */
9246 #define WIN32_LEAN_AND_MEAN
9247 #include <windows.h>
9248 #include <winerror.h>
9250 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
9252 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
9254 case EXCEPTION_ACCESS_VIOLATION:
9255 case EXCEPTION_IN_PAGE_ERROR:
9256 case EXCEPTION_STACK_OVERFLOW:
9257 case EXCEPTION_GUARD_PAGE:
9258 case EXCEPTION_PRIV_INSTRUCTION:
9259 case EXCEPTION_ILLEGAL_INSTRUCTION:
9260 case EXCEPTION_DATATYPE_MISALIGNMENT:
9261 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
9262 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
9265 return EXCEPTION_CONTINUE_SEARCH;
9270 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
9273 /* Avoid a crash on POSIX systems. */
9275 /* A POSIX signal handler. */
9277 exception_handler (int sig)
9285 signal (SIGSEGV, exception_handler);
9288 signal (SIGBUS, exception_handler);
9302 char *name = realpath ("conftest.a", NULL);
9303 if (!(name && *name == '/'))
9307 char *name = realpath ("conftest.b/../conftest.a", NULL);
9312 char *name = realpath ("conftest.a/", NULL);
9317 char *name1 = realpath (".", NULL);
9318 char *name2 = realpath ("conftest.d//./..", NULL);
9319 if (strcmp (name1, name2) != 0)
9329 if ac_fn_c_try_run "$LINENO"; then :
9330 gl_cv_func_realpath_works=yes
9332 gl_cv_func_realpath_works=no
9334 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9335 conftest.$ac_objext conftest.beam conftest.$ac_ext
9338 rm -rf conftest.a conftest.d
9341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
9342 $as_echo "$gl_cv_func_realpath_works" >&6; }
9343 case "$gl_cv_func_realpath_works" in
9346 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
9368 GNULIB_EUIDACCESS=0;
9376 GNULIB_GETDOMAINNAME=0;
9377 GNULIB_GETDTABLESIZE=0;
9379 GNULIB_GETHOSTNAME=0;
9381 GNULIB_GETLOGIN_R=0;
9382 GNULIB_GETPAGESIZE=0;
9383 GNULIB_GETUSERSHELL=0;
9384 GNULIB_GROUP_MEMBER=0;
9396 GNULIB_READLINKAT=0;
9398 GNULIB_SETHOSTNAME=0;
9403 GNULIB_UNISTD_H_NONBLOCKING=0;
9404 GNULIB_UNISTD_H_SIGPIPE=0;
9419 HAVE_GETDTABLESIZE=1;
9424 HAVE_GROUP_MEMBER=1;
9440 HAVE_DECL_ENVIRON=1;
9442 HAVE_DECL_FDATASYNC=1;
9443 HAVE_DECL_GETDOMAINNAME=1;
9444 HAVE_DECL_GETLOGIN_R=1;
9445 HAVE_DECL_GETPAGESIZE=1;
9446 HAVE_DECL_GETUSERSHELL=1;
9447 HAVE_DECL_SETHOSTNAME=1;
9448 HAVE_DECL_TTYNAME_R=1;
9456 REPLACE_FTRUNCATE=0;
9458 REPLACE_GETDOMAINNAME=0;
9459 REPLACE_GETLOGIN_R=0;
9460 REPLACE_GETGROUPS=0;
9461 REPLACE_GETPAGESIZE=0;
9474 REPLACE_TTYNAME_R=0;
9479 UNISTD_H_HAVE_WINSOCK2_H=0;
9480 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
9487 for ac_header in unistd.h
9489 ac_fn_c_check_header_mongrel "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
9490 if test "x$ac_cv_header_unistd_h" = xyes; then :
9491 cat >>confdefs.h <<_ACEOF
9492 #define HAVE_UNISTD_H 1
9499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
9500 $as_echo_n "checking for working chown... " >&6; }
9501 if ${ac_cv_func_chown_works+:} false; then :
9502 $as_echo_n "(cached) " >&6
9504 if test "$cross_compiling" = yes; then :
9505 case "$host_os" in # ((
9506 # Guess yes on glibc systems.
9507 *-gnu*) ac_cv_func_chown_works=yes ;;
9508 # If we don't know, assume the worst.
9509 *) ac_cv_func_chown_works=no ;;
9513 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9514 /* end confdefs.h. */
9515 $ac_includes_default
9522 char *f = "conftest.chown";
9523 struct stat before, after;
9525 if (creat (f, 0600) < 0)
9527 if (stat (f, &before) < 0)
9529 if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
9531 if (stat (f, &after) < 0)
9533 return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
9540 if ac_fn_c_try_run "$LINENO"; then :
9541 ac_cv_func_chown_works=yes
9543 ac_cv_func_chown_works=no
9545 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9546 conftest.$ac_objext conftest.beam conftest.$ac_ext
9549 rm -f conftest.chown
9552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
9553 $as_echo "$ac_cv_func_chown_works" >&6; }
9554 if test $ac_cv_func_chown_works = yes; then
9556 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
9561 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
9562 $as_echo_n "checking whether chown dereferences symlinks... " >&6; }
9563 if ${gl_cv_func_chown_follows_symlink+:} false; then :
9564 $as_echo_n "(cached) " >&6
9567 if test "$cross_compiling" = yes; then :
9568 gl_cv_func_chown_follows_symlink=yes
9571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9572 /* end confdefs.h. */
9582 char const *dangling_symlink = "conftest.dangle";
9584 unlink (dangling_symlink);
9585 if (symlink ("conftest.no-such", dangling_symlink))
9588 /* Exit successfully on a conforming system,
9589 i.e., where chown must fail with ENOENT. */
9590 if (chown (dangling_symlink, getuid (), getgid ()) == 0)
9592 if (errno != ENOENT)
9598 if ac_fn_c_try_run "$LINENO"; then :
9599 gl_cv_func_chown_follows_symlink=yes
9601 gl_cv_func_chown_follows_symlink=no
9603 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9604 conftest.$ac_objext conftest.beam conftest.$ac_ext
9610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
9611 $as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
9613 if test $gl_cv_func_chown_follows_symlink = no; then
9615 $as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
9630 if test $ac_cv_func_chown = no; then
9633 if test $gl_cv_func_chown_follows_symlink = no; then
9637 if test $ac_cv_func_chown_works = no; then
9639 $as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
9644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
9645 $as_echo_n "checking whether chown honors trailing slash... " >&6; }
9646 if ${gl_cv_func_chown_slash_works+:} false; then :
9647 $as_echo_n "(cached) " >&6
9649 touch conftest.file && rm -f conftest.link
9650 if test "$cross_compiling" = yes; then :
9652 # Guess yes on glibc systems.
9653 *-gnu*) gl_cv_func_chown_slash_works="guessing yes" ;;
9654 # If we don't know, assume the worst.
9655 *) gl_cv_func_chown_slash_works="guessing no" ;;
9659 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9660 /* end confdefs.h. */
9669 if (symlink ("conftest.file", "conftest.link")) return 1;
9670 if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
9676 if ac_fn_c_try_run "$LINENO"; then :
9677 gl_cv_func_chown_slash_works=yes
9679 gl_cv_func_chown_slash_works=no
9681 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9682 conftest.$ac_objext conftest.beam conftest.$ac_ext
9685 rm -f conftest.link conftest.file
9687 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
9688 $as_echo "$gl_cv_func_chown_slash_works" >&6; }
9689 case "$gl_cv_func_chown_slash_works" in
9693 $as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
9699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
9700 $as_echo_n "checking whether chown always updates ctime... " >&6; }
9701 if ${gl_cv_func_chown_ctime_works+:} false; then :
9702 $as_echo_n "(cached) " >&6
9704 if test "$cross_compiling" = yes; then :
9706 # Guess yes on glibc systems.
9707 *-gnu*) gl_cv_func_chown_ctime_works="guessing yes" ;;
9708 # If we don't know, assume the worst.
9709 *) gl_cv_func_chown_ctime_works="guessing no" ;;
9713 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9714 /* end confdefs.h. */
9720 #include <sys/stat.h>
9725 struct stat st1, st2;
9726 if (close (creat ("conftest.file", 0600))) return 1;
9727 if (stat ("conftest.file", &st1)) return 2;
9729 if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
9730 if (stat ("conftest.file", &st2)) return 4;
9731 if (st2.st_ctime <= st1.st_ctime) return 5;
9737 if ac_fn_c_try_run "$LINENO"; then :
9738 gl_cv_func_chown_ctime_works=yes
9740 gl_cv_func_chown_ctime_works=no
9742 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9743 conftest.$ac_objext conftest.beam conftest.$ac_ext
9748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
9749 $as_echo "$gl_cv_func_chown_ctime_works" >&6; }
9750 case "$gl_cv_func_chown_ctime_works" in
9754 $as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
9765 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
9766 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
9768 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
9771 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
9793 HAVE_DECL_FDOPENDIR=1;
9800 REPLACE_FDOPENDIR=0;
9804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
9805 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
9806 if ${gl_cv_have_include_next+:} false; then :
9807 $as_echo_n "(cached) " >&6
9809 rm -rf conftestd1a conftestd1b conftestd2
9810 mkdir conftestd1a conftestd1b conftestd2
9811 cat <<EOF > conftestd1a/conftest.h
9812 #define DEFINED_IN_CONFTESTD1
9813 #include_next <conftest.h>
9814 #ifdef DEFINED_IN_CONFTESTD2
9817 #error "include_next doesn't work"
9820 cat <<EOF > conftestd1b/conftest.h
9821 #define DEFINED_IN_CONFTESTD1
9823 #include_next <conftest.h>
9824 #ifdef DEFINED_IN_CONFTESTD2
9827 #error "include_next doesn't work"
9830 cat <<EOF > conftestd2/conftest.h
9831 #ifndef DEFINED_IN_CONFTESTD1
9832 #error "include_next test doesn't work"
9834 #define DEFINED_IN_CONFTESTD2
9836 gl_save_CPPFLAGS="$CPPFLAGS"
9837 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
9838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9839 /* end confdefs.h. */
9840 #include <conftest.h>
9842 if ac_fn_c_try_compile "$LINENO"; then :
9843 gl_cv_have_include_next=yes
9845 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
9846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9847 /* end confdefs.h. */
9848 #include <conftest.h>
9850 if ac_fn_c_try_compile "$LINENO"; then :
9851 gl_cv_have_include_next=buggy
9853 gl_cv_have_include_next=no
9855 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9858 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9859 CPPFLAGS="$gl_save_CPPFLAGS"
9860 rm -rf conftestd1a conftestd1b conftestd2
9863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
9864 $as_echo "$gl_cv_have_include_next" >&6; }
9865 PRAGMA_SYSTEM_HEADER=
9866 if test $gl_cv_have_include_next = yes; then
9867 INCLUDE_NEXT=include_next
9868 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9869 if test -n "$GCC"; then
9870 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
9873 if test $gl_cv_have_include_next = buggy; then
9874 INCLUDE_NEXT=include
9875 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
9877 INCLUDE_NEXT=include
9878 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
9884 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
9885 $as_echo_n "checking whether system header files limit the line length... " >&6; }
9886 if ${gl_cv_pragma_columns+:} false; then :
9887 $as_echo_n "(cached) " >&6
9889 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9890 /* end confdefs.h. */
9897 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9898 $EGREP "choke me" >/dev/null 2>&1; then :
9899 gl_cv_pragma_columns=yes
9901 gl_cv_pragma_columns=no
9907 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
9908 $as_echo "$gl_cv_pragma_columns" >&6; }
9909 if test $gl_cv_pragma_columns = yes; then
9910 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
9931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
9932 $as_echo_n "checking if environ is properly declared... " >&6; }
9933 if ${gt_cv_var_environ_declaration+:} false; then :
9934 $as_echo_n "(cached) " >&6
9937 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9938 /* end confdefs.h. */
9942 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
9945 extern struct { int foo; } environ;
9954 if ac_fn_c_try_compile "$LINENO"; then :
9955 gt_cv_var_environ_declaration=no
9957 gt_cv_var_environ_declaration=yes
9959 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
9963 $as_echo "$gt_cv_var_environ_declaration" >&6; }
9964 if test $gt_cv_var_environ_declaration = yes; then
9966 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
9971 if test $gt_cv_var_environ_declaration != yes; then
9977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
9978 $as_echo_n "checking for complete errno.h... " >&6; }
9979 if ${gl_cv_header_errno_h_complete+:} false; then :
9980 $as_echo_n "(cached) " >&6
9983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9984 /* end confdefs.h. */
9987 #if !defined ETXTBSY
9996 #if !defined ENOLINK
10002 #if !defined EMULTIHOP
10005 #if !defined EBADMSG
10008 #if !defined EOVERFLOW
10011 #if !defined ENOTSUP
10014 #if !defined ENETRESET
10017 #if !defined ECONNABORTED
10020 #if !defined ESTALE
10023 #if !defined EDQUOT
10026 #if !defined ECANCELED
10029 #if !defined EOWNERDEAD
10032 #if !defined ENOTRECOVERABLE
10035 #if !defined EILSEQ
10040 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10041 $EGREP "booboo" >/dev/null 2>&1; then :
10042 gl_cv_header_errno_h_complete=no
10044 gl_cv_header_errno_h_complete=yes
10050 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
10051 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
10052 if test $gl_cv_header_errno_h_complete = yes; then
10063 if test $gl_cv_have_include_next = yes; then
10064 gl_cv_next_errno_h='<'errno.h'>'
10066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
10067 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
10068 if ${gl_cv_next_errno_h+:} false; then :
10069 $as_echo_n "(cached) " >&6
10072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10073 /* end confdefs.h. */
10078 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10079 *) gl_absname_cpp="$ac_cpp" ;;
10084 gl_dirsep_regex='[/\\]'
10087 gl_dirsep_regex='\/'
10090 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10092 gl_header_literal_regex=`echo 'errno.h' \
10093 | sed -e "$gl_make_literal_regex_sed"`
10094 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10095 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10100 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10101 sed -n "$gl_absolute_header_sed"`'"'
10105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
10106 $as_echo "$gl_cv_next_errno_h" >&6; }
10108 NEXT_ERRNO_H=$gl_cv_next_errno_h
10110 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10111 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10112 gl_next_as_first_directive='<'errno.h'>'
10114 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10115 gl_next_as_first_directive=$gl_cv_next_errno_h
10117 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
10125 if test -n "$ERRNO_H"; then
10126 GL_GENERATE_ERRNO_H_TRUE=
10127 GL_GENERATE_ERRNO_H_FALSE='#'
10129 GL_GENERATE_ERRNO_H_TRUE='#'
10130 GL_GENERATE_ERRNO_H_FALSE=
10134 if test -n "$ERRNO_H"; then
10135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
10136 $as_echo_n "checking for EMULTIHOP value... " >&6; }
10137 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
10138 $as_echo_n "(cached) " >&6
10141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10142 /* end confdefs.h. */
10150 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10151 $EGREP "yes" >/dev/null 2>&1; then :
10152 gl_cv_header_errno_h_EMULTIHOP=yes
10154 gl_cv_header_errno_h_EMULTIHOP=no
10158 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
10159 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10160 /* end confdefs.h. */
10162 #define _XOPEN_SOURCE_EXTENDED 1
10169 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10170 $EGREP "yes" >/dev/null 2>&1; then :
10171 gl_cv_header_errno_h_EMULTIHOP=hidden
10175 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
10176 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
10177 #define _XOPEN_SOURCE_EXTENDED 1
10179 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10181 #include <stdlib.h>
10190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
10191 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
10192 case $gl_cv_header_errno_h_EMULTIHOP in
10194 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
10197 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
10205 if test -n "$ERRNO_H"; then
10206 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
10207 $as_echo_n "checking for ENOLINK value... " >&6; }
10208 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
10209 $as_echo_n "(cached) " >&6
10212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10213 /* end confdefs.h. */
10221 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10222 $EGREP "yes" >/dev/null 2>&1; then :
10223 gl_cv_header_errno_h_ENOLINK=yes
10225 gl_cv_header_errno_h_ENOLINK=no
10229 if test $gl_cv_header_errno_h_ENOLINK = no; then
10230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10231 /* end confdefs.h. */
10233 #define _XOPEN_SOURCE_EXTENDED 1
10240 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10241 $EGREP "yes" >/dev/null 2>&1; then :
10242 gl_cv_header_errno_h_ENOLINK=hidden
10246 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
10247 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
10248 #define _XOPEN_SOURCE_EXTENDED 1
10250 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10252 #include <stdlib.h>
10261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
10262 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
10263 case $gl_cv_header_errno_h_ENOLINK in
10265 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
10268 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
10276 if test -n "$ERRNO_H"; then
10277 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
10278 $as_echo_n "checking for EOVERFLOW value... " >&6; }
10279 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
10280 $as_echo_n "(cached) " >&6
10283 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10284 /* end confdefs.h. */
10292 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10293 $EGREP "yes" >/dev/null 2>&1; then :
10294 gl_cv_header_errno_h_EOVERFLOW=yes
10296 gl_cv_header_errno_h_EOVERFLOW=no
10300 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
10301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10302 /* end confdefs.h. */
10304 #define _XOPEN_SOURCE_EXTENDED 1
10311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10312 $EGREP "yes" >/dev/null 2>&1; then :
10313 gl_cv_header_errno_h_EOVERFLOW=hidden
10317 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
10318 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
10319 #define _XOPEN_SOURCE_EXTENDED 1
10321 /* The following two lines are a workaround against an autoconf-2.52 bug. */
10323 #include <stdlib.h>
10332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
10333 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
10334 case $gl_cv_header_errno_h_EOVERFLOW in
10336 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
10339 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
10347 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
10348 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
10354 cat >>confdefs.h <<_ACEOF
10355 #define HAVE_DECL_STRERROR_R $ac_have_decl
10358 for ac_func in strerror_r
10360 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
10361 if test "x$ac_cv_func_strerror_r" = xyes; then :
10362 cat >>confdefs.h <<_ACEOF
10363 #define HAVE_STRERROR_R 1
10369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
10370 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
10371 if ${ac_cv_func_strerror_r_char_p+:} false; then :
10372 $as_echo_n "(cached) " >&6
10375 ac_cv_func_strerror_r_char_p=no
10376 if test $ac_cv_have_decl_strerror_r = yes; then
10377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10378 /* end confdefs.h. */
10379 $ac_includes_default
10385 char x = *strerror_r (0, buf, sizeof buf);
10386 char *p = strerror_r (0, buf, sizeof buf);
10393 if ac_fn_c_try_compile "$LINENO"; then :
10394 ac_cv_func_strerror_r_char_p=yes
10396 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10398 # strerror_r is not declared. Choose between
10399 # systems that have relatively inaccessible declarations for the
10400 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
10401 # former has a strerror_r that returns char*, while the latter
10402 # has a strerror_r that returns `int'.
10403 # This test should segfault on the DEC system.
10404 if test "$cross_compiling" = yes; then :
10407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10408 /* end confdefs.h. */
10409 $ac_includes_default
10410 extern char *strerror_r ();
10415 char x = *strerror_r (0, buf, sizeof buf);
10416 return ! isalpha (x);
10421 if ac_fn_c_try_run "$LINENO"; then :
10422 ac_cv_func_strerror_r_char_p=yes
10424 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10425 conftest.$ac_objext conftest.beam conftest.$ac_ext
10431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
10432 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
10433 if test $ac_cv_func_strerror_r_char_p = yes; then
10435 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
10442 ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
10443 if test "x$ac_cv_have_decl_fchdir" = xyes; then :
10449 cat >>confdefs.h <<_ACEOF
10450 #define HAVE_DECL_FCHDIR $ac_have_decl
10466 GNULIB_UTIMENSAT=0;
10480 REPLACE_FUTIMENS=0;
10486 REPLACE_UTIMENSAT=0;
10494 GNULIB_NONBLOCKING=0;
10512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
10513 $as_echo_n "checking for working fcntl.h... " >&6; }
10514 if ${gl_cv_header_working_fcntl_h+:} false; then :
10515 $as_echo_n "(cached) " >&6
10517 if test "$cross_compiling" = yes; then :
10518 gl_cv_header_working_fcntl_h=cross-compiling
10520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10521 /* end confdefs.h. */
10522 #include <sys/types.h>
10523 #include <sys/stat.h>
10525 # include <unistd.h>
10526 #else /* on Windows with MSVC */
10528 # include <stdlib.h>
10529 # defined sleep(n) _sleep ((n) * 1000)
10533 #define O_NOATIME 0
10536 #define O_NOFOLLOW 0
10538 static int const constants[] =
10540 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
10541 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
10548 int result = !constants;
10551 static char const sym[] = "conftest.sym";
10552 if (symlink ("/dev/null", sym) != 0)
10556 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
10563 if (unlink (sym) != 0 || symlink (".", sym) != 0)
10567 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
10578 static char const file[] = "confdefs.h";
10579 int fd = open (file, O_RDONLY | O_NOATIME);
10585 if (fstat (fd, &st0) != 0)
10591 if (read (fd, &c, 1) != 1)
10595 if (close (fd) != 0)
10600 if (stat (file, &st1) != 0)
10603 if (st0.st_atime != st1.st_atime)
10615 if ac_fn_c_try_run "$LINENO"; then :
10616 gl_cv_header_working_fcntl_h=yes
10619 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
10620 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
10621 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
10622 *) gl_cv_header_working_fcntl_h='no';;
10625 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10626 conftest.$ac_objext conftest.beam conftest.$ac_ext
10630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
10631 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
10633 case $gl_cv_header_working_fcntl_h in #(
10634 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
10638 cat >>confdefs.h <<_ACEOF
10639 #define HAVE_WORKING_O_NOATIME $ac_val
10643 case $gl_cv_header_working_fcntl_h in #(
10644 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
10648 cat >>confdefs.h <<_ACEOF
10649 #define HAVE_WORKING_O_NOFOLLOW $ac_val
10657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
10658 $as_echo_n "checking for mbstate_t... " >&6; }
10659 if ${ac_cv_type_mbstate_t+:} false; then :
10660 $as_echo_n "(cached) " >&6
10662 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10663 /* end confdefs.h. */
10664 $ac_includes_default
10665 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
10667 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10668 included before <wchar.h>. */
10669 #include <stddef.h>
10676 mbstate_t x; return sizeof x;
10681 if ac_fn_c_try_compile "$LINENO"; then :
10682 ac_cv_type_mbstate_t=yes
10684 ac_cv_type_mbstate_t=no
10686 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
10689 $as_echo "$ac_cv_type_mbstate_t" >&6; }
10690 if test $ac_cv_type_mbstate_t = yes; then
10692 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
10696 $as_echo "#define mbstate_t int" >>confdefs.h
10727 GNULIB_FPRINTF_POSIX=0;
10743 GNULIB_OBSTACK_PRINTF=0;
10744 GNULIB_OBSTACK_PRINTF_POSIX=0;
10749 GNULIB_PRINTF_POSIX=0;
10758 GNULIB_SPRINTF_POSIX=0;
10759 GNULIB_STDIO_H_NONBLOCKING=0;
10760 GNULIB_STDIO_H_SIGPIPE=0;
10762 GNULIB_VASPRINTF=0;
10767 GNULIB_VFPRINTF_POSIX=0;
10769 GNULIB_VPRINTF_POSIX=0;
10770 GNULIB_VSNPRINTF=0;
10771 GNULIB_VSPRINTF_POSIX=0;
10772 HAVE_DECL_FPURGE=1;
10773 HAVE_DECL_FSEEKO=1;
10774 HAVE_DECL_FTELLO=1;
10775 HAVE_DECL_GETDELIM=1;
10776 HAVE_DECL_GETLINE=1;
10777 HAVE_DECL_OBSTACK_PRINTF=1;
10778 HAVE_DECL_SNPRINTF=1;
10779 HAVE_DECL_VSNPRINTF=1;
10800 REPLACE_GETDELIM=0;
10802 REPLACE_OBSTACK_PRINTF=0;
10808 REPLACE_RENAMEAT=0;
10809 REPLACE_SNPRINTF=0;
10811 REPLACE_STDIO_READ_FUNCS=0;
10812 REPLACE_STDIO_WRITE_FUNCS=0;
10814 REPLACE_VASPRINTF=0;
10815 REPLACE_VDPRINTF=0;
10816 REPLACE_VFPRINTF=0;
10818 REPLACE_VSNPRINTF=0;
10819 REPLACE_VSPRINTF=0;
10822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdin defaults to large file offsets" >&5
10823 $as_echo_n "checking whether stdin defaults to large file offsets... " >&6; }
10824 if ${gl_cv_var_stdin_large_offset+:} false; then :
10825 $as_echo_n "(cached) " >&6
10827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10828 /* end confdefs.h. */
10833 #if defined __SL64 && defined __SCLE /* cygwin */
10834 /* Cygwin 1.5.24 and earlier fail to put stdin in 64-bit mode, making
10835 fseeko/ftello needlessly fail. This bug was fixed in 1.5.25, and
10836 it is easier to do a version check than building a runtime test. */
10837 # include <cygwin/version.h>
10838 # if CYGWIN_VERSION_DLL_COMBINED < CYGWIN_VERSION_DLL_MAKE_COMBINED (1005, 25)
10846 if ac_fn_c_try_link "$LINENO"; then :
10847 gl_cv_var_stdin_large_offset=yes
10849 gl_cv_var_stdin_large_offset=no
10851 rm -f core conftest.err conftest.$ac_objext \
10852 conftest$ac_exeext conftest.$ac_ext
10854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var_stdin_large_offset" >&5
10855 $as_echo "$gl_cv_var_stdin_large_offset" >&6; }
10863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
10864 $as_echo_n "checking for 64-bit off_t... " >&6; }
10865 if ${gl_cv_type_off_t_64+:} false; then :
10866 $as_echo_n "(cached) " >&6
10868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10869 /* end confdefs.h. */
10870 #include <sys/types.h>
10871 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
10881 if ac_fn_c_try_compile "$LINENO"; then :
10882 gl_cv_type_off_t_64=yes
10884 gl_cv_type_off_t_64=no
10886 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
10890 $as_echo "$gl_cv_type_off_t_64" >&6; }
10891 if test $gl_cv_type_off_t_64 = no; then
10892 WINDOWS_64_BIT_OFF_T=1
10894 WINDOWS_64_BIT_OFF_T=0
10896 WINDOWS_64_BIT_ST_SIZE=1
10899 WINDOWS_64_BIT_OFF_T=0
10900 WINDOWS_64_BIT_ST_SIZE=0
10920 if test $gl_cv_have_include_next = yes; then
10921 gl_cv_next_sys_types_h='<'sys/types.h'>'
10923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
10924 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
10925 if ${gl_cv_next_sys_types_h+:} false; then :
10926 $as_echo_n "(cached) " >&6
10929 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10930 /* end confdefs.h. */
10931 #include <sys/types.h>
10935 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10936 *) gl_absname_cpp="$ac_cpp" ;;
10941 gl_dirsep_regex='[/\\]'
10944 gl_dirsep_regex='\/'
10947 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10949 gl_header_literal_regex=`echo 'sys/types.h' \
10950 | sed -e "$gl_make_literal_regex_sed"`
10951 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10952 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10957 gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10958 sed -n "$gl_absolute_header_sed"`'"'
10962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
10963 $as_echo "$gl_cv_next_sys_types_h" >&6; }
10965 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h
10967 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10968 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10969 gl_next_as_first_directive='<'sys/types.h'>'
10971 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10972 gl_next_as_first_directive=$gl_cv_next_sys_types_h
10974 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive
10986 ac_fn_c_check_decl "$LINENO" "fseeko" "ac_cv_have_decl_fseeko" "$ac_includes_default"
10987 if test "x$ac_cv_have_decl_fseeko" = xyes; then :
10993 cat >>confdefs.h <<_ACEOF
10994 #define HAVE_DECL_FSEEKO $ac_have_decl
11005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
11006 $as_echo_n "checking for fseeko... " >&6; }
11007 if ${gl_cv_func_fseeko+:} false; then :
11008 $as_echo_n "(cached) " >&6
11011 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11012 /* end confdefs.h. */
11018 fseeko (stdin, 0, 0);
11023 if ac_fn_c_try_link "$LINENO"; then :
11024 gl_cv_func_fseeko=yes
11026 gl_cv_func_fseeko=no
11028 rm -f core conftest.err conftest.$ac_objext \
11029 conftest$ac_exeext conftest.$ac_ext
11032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
11033 $as_echo "$gl_cv_func_fseeko" >&6; }
11036 if test $ac_cv_have_decl_fseeko = no; then
11040 if test $gl_cv_func_fseeko = no; then
11043 if test $WINDOWS_64_BIT_OFF_T = 1; then
11046 if test $gl_cv_var_stdin_large_offset = no; then
11068 if test $gl_cv_have_include_next = yes; then
11069 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
11072 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
11073 if ${gl_cv_next_sys_stat_h+:} false; then :
11074 $as_echo_n "(cached) " >&6
11077 if test $ac_cv_header_sys_stat_h = yes; then
11080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11081 /* end confdefs.h. */
11082 #include <sys/stat.h>
11086 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11087 *) gl_absname_cpp="$ac_cpp" ;;
11092 gl_dirsep_regex='[/\\]'
11095 gl_dirsep_regex='\/'
11098 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11100 gl_header_literal_regex=`echo 'sys/stat.h' \
11101 | sed -e "$gl_make_literal_regex_sed"`
11102 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11103 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11108 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11109 sed -n "$gl_absolute_header_sed"`'"'
11111 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
11116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
11117 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
11119 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
11121 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11122 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11123 gl_next_as_first_directive='<'sys/stat.h'>'
11125 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11126 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
11128 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
11140 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
11142 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
11146 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
11147 #include <sys/stat.h>
11149 if test "x$ac_cv_type_nlink_t" = xyes; then :
11153 $as_echo "#define nlink_t int" >>confdefs.h
11159 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
11160 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11161 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11162 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11163 if eval \${$as_gl_Symbol+:} false; then :
11164 $as_echo_n "(cached) " >&6
11166 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11167 /* end confdefs.h. */
11168 #include <sys/stat.h>
11179 if ac_fn_c_try_compile "$LINENO"; then :
11180 eval "$as_gl_Symbol=yes"
11182 eval "$as_gl_Symbol=no"
11184 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11186 eval ac_res=\$$as_gl_Symbol
11187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11188 $as_echo "$ac_res" >&6; }
11189 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11190 cat >>confdefs.h <<_ACEOF
11191 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11194 eval ac_cv_have_decl_$gl_func=yes
11200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
11201 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
11202 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
11203 $as_echo_n "(cached) " >&6
11205 rm -f conftest.sym conftest.file
11206 echo >conftest.file
11207 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
11208 if test "$cross_compiling" = yes; then :
11210 # Guess yes on glibc systems.
11211 *-gnu*) gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;;
11212 # If we don't know, assume the worst.
11213 *) gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;;
11217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11218 /* end confdefs.h. */
11219 $ac_includes_default
11224 /* Linux will dereference the symlink and fail, as required by
11225 POSIX. That is better in the sense that it means we will not
11226 have to compile and use the lstat wrapper. */
11227 return lstat ("conftest.sym/", &sbuf) == 0;
11233 if ac_fn_c_try_run "$LINENO"; then :
11234 gl_cv_func_lstat_dereferences_slashed_symlink=yes
11236 gl_cv_func_lstat_dereferences_slashed_symlink=no
11238 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11239 conftest.$ac_objext conftest.beam conftest.$ac_ext
11243 # If the 'ln -s' command failed, then we probably don't even
11244 # have an lstat function.
11245 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no"
11247 rm -f conftest.sym conftest.file
11250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
11251 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
11252 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
11255 cat >>confdefs.h <<_ACEOF
11256 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
11268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
11269 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
11270 if ${gl_cv_func_getcwd_null+:} false; then :
11271 $as_echo_n "(cached) " >&6
11273 if test "$cross_compiling" = yes; then :
11275 # Guess yes on glibc systems.
11276 *-gnu*) gl_cv_func_getcwd_null="guessing yes";;
11277 # Guess yes on Cygwin.
11278 cygwin*) gl_cv_func_getcwd_null="guessing yes";;
11279 # If we don't know, assume the worst.
11280 *) gl_cv_func_getcwd_null="guessing no";;
11284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11285 /* end confdefs.h. */
11288 # include <unistd.h>
11289 # else /* on Windows with MSVC */
11290 # include <direct.h>
11300 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
11301 /* mingw cwd does not start with '/', but getcwd does allocate.
11302 However, mingw fails to honor non-zero size. */
11304 if (chdir ("/") != 0)
11308 char *f = getcwd (NULL, 0);
11323 if ac_fn_c_try_run "$LINENO"; then :
11324 gl_cv_func_getcwd_null=yes
11326 gl_cv_func_getcwd_null=no
11328 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11329 conftest.$ac_objext conftest.beam conftest.$ac_ext
11333 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
11334 $as_echo "$gl_cv_func_getcwd_null" >&6; }
11337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
11338 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
11339 if ${gl_cv_func_getcwd_posix_signature+:} false; then :
11340 $as_echo_n "(cached) " >&6
11342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11343 /* end confdefs.h. */
11344 #include <unistd.h>
11352 char *getcwd (char *, size_t);
11359 if ac_fn_c_try_compile "$LINENO"; then :
11360 gl_cv_func_getcwd_posix_signature=yes
11362 gl_cv_func_getcwd_posix_signature=no
11364 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
11368 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
11370 ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
11371 if test "x$ac_cv_have_decl_getcwd" = xyes; then :
11377 cat >>confdefs.h <<_ACEOF
11378 #define HAVE_DECL_GETCWD $ac_have_decl
11381 ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
11382 if test "x$ac_cv_have_decl_getdelim" = xyes; then :
11388 cat >>confdefs.h <<_ACEOF
11389 #define HAVE_DECL_GETDELIM $ac_have_decl
11396 ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
11397 if test "x$ac_cv_have_decl_getline" = xyes; then :
11403 cat >>confdefs.h <<_ACEOF
11404 #define HAVE_DECL_GETLINE $ac_have_decl
11422 if test $gl_cv_have_include_next = yes; then
11423 gl_cv_next_getopt_h='<'getopt.h'>'
11425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
11426 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
11427 if ${gl_cv_next_getopt_h+:} false; then :
11428 $as_echo_n "(cached) " >&6
11431 if test $ac_cv_header_getopt_h = yes; then
11434 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11435 /* end confdefs.h. */
11436 #include <getopt.h>
11440 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11441 *) gl_absname_cpp="$ac_cpp" ;;
11446 gl_dirsep_regex='[/\\]'
11449 gl_dirsep_regex='\/'
11452 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11454 gl_header_literal_regex=`echo 'getopt.h' \
11455 | sed -e "$gl_make_literal_regex_sed"`
11456 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11457 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11462 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11463 sed -n "$gl_absolute_header_sed"`'"'
11465 gl_cv_next_getopt_h='<'getopt.h'>'
11470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
11471 $as_echo "$gl_cv_next_getopt_h" >&6; }
11473 NEXT_GETOPT_H=$gl_cv_next_getopt_h
11475 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11476 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11477 gl_next_as_first_directive='<'getopt.h'>'
11479 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11480 gl_next_as_first_directive=$gl_cv_next_getopt_h
11482 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
11487 if test $ac_cv_header_getopt_h = yes; then
11496 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11497 for ac_header in getopt.h
11499 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
11500 if test "x$ac_cv_header_getopt_h" = xyes; then :
11501 cat >>confdefs.h <<_ACEOF
11502 #define HAVE_GETOPT_H 1
11506 gl_replace_getopt=yes
11513 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11514 for ac_func in getopt_long_only
11516 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
11517 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
11518 cat >>confdefs.h <<_ACEOF
11519 #define HAVE_GETOPT_LONG_ONLY 1
11523 gl_replace_getopt=yes
11529 if test -z "$gl_replace_getopt"; then
11530 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
11531 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
11532 if ${gl_cv_func_getopt_posix+:} false; then :
11533 $as_echo_n "(cached) " >&6
11536 if test $cross_compiling = no; then
11537 if test "$cross_compiling" = yes; then :
11538 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11539 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11540 as_fn_error $? "cannot run test program while cross compiling
11541 See \`config.log' for more details" "$LINENO" 5; }
11543 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11544 /* end confdefs.h. */
11546 #include <unistd.h>
11547 #include <stdlib.h>
11548 #include <string.h>
11553 static char program[] = "program";
11554 static char a[] = "-a";
11555 static char foo[] = "foo";
11556 static char bar[] = "bar";
11557 char *argv[] = { program, a, foo, bar, NULL };
11560 c = getopt (4, argv, "ab");
11563 c = getopt (4, argv, "ab");
11566 if (!(optind == 2))
11572 if ac_fn_c_try_run "$LINENO"; then :
11573 gl_cv_func_getopt_posix=maybe
11575 gl_cv_func_getopt_posix=no
11577 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11578 conftest.$ac_objext conftest.beam conftest.$ac_ext
11581 if test $gl_cv_func_getopt_posix = maybe; then
11582 if test "$cross_compiling" = yes; then :
11583 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11584 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11585 as_fn_error $? "cannot run test program while cross compiling
11586 See \`config.log' for more details" "$LINENO" 5; }
11588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11589 /* end confdefs.h. */
11591 #include <unistd.h>
11592 #include <stdlib.h>
11593 #include <string.h>
11598 static char program[] = "program";
11599 static char donald[] = "donald";
11600 static char p[] = "-p";
11601 static char billy[] = "billy";
11602 static char duck[] = "duck";
11603 static char a[] = "-a";
11604 static char bar[] = "bar";
11605 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
11608 c = getopt (7, argv, "+abp:q:");
11611 if (!(strcmp (argv[0], "program") == 0))
11613 if (!(strcmp (argv[1], "donald") == 0))
11615 if (!(strcmp (argv[2], "-p") == 0))
11617 if (!(strcmp (argv[3], "billy") == 0))
11619 if (!(strcmp (argv[4], "duck") == 0))
11621 if (!(strcmp (argv[5], "-a") == 0))
11623 if (!(strcmp (argv[6], "bar") == 0))
11625 if (!(optind == 1))
11631 if ac_fn_c_try_run "$LINENO"; then :
11632 gl_cv_func_getopt_posix=maybe
11634 gl_cv_func_getopt_posix=no
11636 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11637 conftest.$ac_objext conftest.beam conftest.$ac_ext
11641 if test $gl_cv_func_getopt_posix = maybe; then
11642 if test "$cross_compiling" = yes; then :
11643 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11644 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11645 as_fn_error $? "cannot run test program while cross compiling
11646 See \`config.log' for more details" "$LINENO" 5; }
11648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11649 /* end confdefs.h. */
11651 #include <unistd.h>
11652 #include <stdlib.h>
11653 #include <string.h>
11658 static char program[] = "program";
11659 static char ab[] = "-ab";
11660 char *argv[3] = { program, ab, NULL };
11661 if (getopt (2, argv, "ab:") != 'a')
11663 if (getopt (2, argv, "ab:") != '?')
11673 if ac_fn_c_try_run "$LINENO"; then :
11674 gl_cv_func_getopt_posix=yes
11676 gl_cv_func_getopt_posix=no
11678 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11679 conftest.$ac_objext conftest.beam conftest.$ac_ext
11685 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";;
11686 *) gl_cv_func_getopt_posix="guessing yes";;
11691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
11692 $as_echo "$gl_cv_func_getopt_posix" >&6; }
11693 case "$gl_cv_func_getopt_posix" in
11694 *no) gl_replace_getopt=yes ;;
11698 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
11699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
11700 $as_echo_n "checking for working GNU getopt function... " >&6; }
11701 if ${gl_cv_func_getopt_gnu+:} false; then :
11702 $as_echo_n "(cached) " >&6
11704 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
11705 # optstring is necessary for programs like m4 that have POSIX-mandated
11706 # semantics for supporting options interspersed with files.
11707 # Also, since getopt_long is a GNU extension, we require optind=0.
11708 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
11709 # so take care to revert to the correct (non-)export state.
11710 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
11711 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
11712 xx) gl_had_POSIXLY_CORRECT=exported ;;
11713 x) gl_had_POSIXLY_CORRECT=yes ;;
11714 *) gl_had_POSIXLY_CORRECT= ;;
11717 export POSIXLY_CORRECT
11718 if test "$cross_compiling" = yes; then :
11719 gl_cv_func_getopt_gnu="guessing no"
11722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11723 /* end confdefs.h. */
11724 #include <getopt.h>
11725 #include <stddef.h>
11726 #include <string.h>
11728 #include <stdlib.h>
11729 #if defined __MACH__ && defined __APPLE__
11730 /* Avoid a crash on Mac OS X. */
11731 #include <mach/mach.h>
11732 #include <mach/mach_error.h>
11733 #include <mach/thread_status.h>
11734 #include <mach/exception.h>
11735 #include <mach/task.h>
11736 #include <pthread.h>
11737 /* The exception port on which our thread listens. */
11738 static mach_port_t our_exception_port;
11739 /* The main function of the thread listening for exceptions of type
11742 mach_exception_thread (void *arg)
11744 /* Buffer for a message to be received. */
11746 mach_msg_header_t head;
11747 mach_msg_body_t msgh_body;
11750 mach_msg_return_t retval;
11751 /* Wait for a message on the exception port. */
11752 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
11753 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
11754 if (retval != MACH_MSG_SUCCESS)
11759 nocrash_init (void)
11761 mach_port_t self = mach_task_self ();
11762 /* Allocate a port on which the thread shall listen for exceptions. */
11763 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
11765 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
11766 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
11767 MACH_MSG_TYPE_MAKE_SEND)
11769 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
11771 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
11772 /* Create the thread listening on the exception port. */
11773 pthread_attr_t attr;
11775 if (pthread_attr_init (&attr) == 0
11776 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
11777 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
11778 pthread_attr_destroy (&attr);
11779 /* Replace the exception port info for these exceptions with our own.
11780 Note that we replace the exception port for the entire task, not only
11781 for a particular thread. This has the effect that when our exception
11782 port gets the message, the thread specific exception port has already
11783 been asked, and we don't need to bother about it.
11784 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
11785 task_set_exception_ports (self, mask, our_exception_port,
11786 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
11791 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
11792 /* Avoid a crash on native Windows. */
11793 #define WIN32_LEAN_AND_MEAN
11794 #include <windows.h>
11795 #include <winerror.h>
11797 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
11799 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
11801 case EXCEPTION_ACCESS_VIOLATION:
11802 case EXCEPTION_IN_PAGE_ERROR:
11803 case EXCEPTION_STACK_OVERFLOW:
11804 case EXCEPTION_GUARD_PAGE:
11805 case EXCEPTION_PRIV_INSTRUCTION:
11806 case EXCEPTION_ILLEGAL_INSTRUCTION:
11807 case EXCEPTION_DATATYPE_MISALIGNMENT:
11808 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
11809 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
11812 return EXCEPTION_CONTINUE_SEARCH;
11815 nocrash_init (void)
11817 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
11820 /* Avoid a crash on POSIX systems. */
11821 #include <signal.h>
11822 /* A POSIX signal handler. */
11824 exception_handler (int sig)
11829 nocrash_init (void)
11832 signal (SIGSEGV, exception_handler);
11835 signal (SIGBUS, exception_handler);
11849 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
11850 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
11851 OSF/1 5.1, Solaris 10. */
11853 static char conftest[] = "conftest";
11854 static char plus[] = "-+";
11855 char *argv[3] = { conftest, plus, NULL };
11857 if (getopt (2, argv, "+a") != '?')
11860 /* This code succeeds on glibc 2.8, mingw,
11861 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
11862 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
11864 static char program[] = "program";
11865 static char p[] = "-p";
11866 static char foo[] = "foo";
11867 static char bar[] = "bar";
11868 char *argv[] = { program, p, foo, bar, NULL };
11871 if (getopt (4, argv, "p::") != 'p')
11873 else if (optarg != NULL)
11875 else if (getopt (4, argv, "p::") != -1)
11877 else if (optind != 2)
11880 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
11882 static char program[] = "program";
11883 static char foo[] = "foo";
11884 static char p[] = "-p";
11885 char *argv[] = { program, foo, p, NULL };
11887 if (getopt (3, argv, "-p") != 1)
11889 else if (getopt (3, argv, "-p") != 'p')
11892 /* This code fails on glibc 2.11. */
11894 static char program[] = "program";
11895 static char b[] = "-b";
11896 static char a[] = "-a";
11897 char *argv[] = { program, b, a, NULL };
11898 optind = opterr = 0;
11899 if (getopt (3, argv, "+:a:b") != 'b')
11901 else if (getopt (3, argv, "+:a:b") != ':')
11904 /* This code dumps core on glibc 2.14. */
11906 static char program[] = "program";
11907 static char w[] = "-W";
11908 static char dummy[] = "dummy";
11909 char *argv[] = { program, w, dummy, NULL };
11910 optind = opterr = 1;
11911 if (getopt (3, argv, "W;") != 'W')
11920 if ac_fn_c_try_run "$LINENO"; then :
11921 gl_cv_func_getopt_gnu=yes
11923 gl_cv_func_getopt_gnu=no
11925 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11926 conftest.$ac_objext conftest.beam conftest.$ac_ext
11929 case $gl_had_POSIXLY_CORRECT in
11931 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
11932 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
11936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
11937 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
11938 if test "$gl_cv_func_getopt_gnu" != yes; then
11939 gl_replace_getopt=yes
11941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5
11942 $as_echo_n "checking for working GNU getopt_long function... " >&6; }
11943 if ${gl_cv_func_getopt_long_gnu+:} false; then :
11944 $as_echo_n "(cached) " >&6
11946 if test "$cross_compiling" = yes; then :
11948 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";;
11949 *) gl_cv_func_getopt_long_gnu="guessing yes";;
11953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11954 /* end confdefs.h. */
11955 #include <getopt.h>
11956 #include <stddef.h>
11957 #include <string.h>
11962 static const struct option long_options[] =
11964 { "xtremely-",no_argument, NULL, 1003 },
11965 { "xtra", no_argument, NULL, 1001 },
11966 { "xtreme", no_argument, NULL, 1002 },
11967 { "xtremely", no_argument, NULL, 1003 },
11968 { NULL, 0, NULL, 0 }
11970 /* This code fails on OpenBSD 5.0. */
11972 static char program[] = "program";
11973 static char xtremel[] = "--xtremel";
11974 char *argv[] = { program, xtremel, NULL };
11976 optind = 1; opterr = 0;
11977 if (getopt_long (2, argv, "", long_options, &option_index) != 1003)
11986 if ac_fn_c_try_run "$LINENO"; then :
11987 gl_cv_func_getopt_long_gnu=yes
11989 gl_cv_func_getopt_long_gnu=no
11991 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11992 conftest.$ac_objext conftest.beam conftest.$ac_ext
11997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5
11998 $as_echo "$gl_cv_func_getopt_long_gnu" >&6; }
11999 case "$gl_cv_func_getopt_long_gnu" in
12001 *) gl_replace_getopt=yes ;;
12013 if test $REPLACE_GETOPT = 1; then
12017 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
12023 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
12024 if test "x$ac_cv_have_decl_getenv" = xyes; then :
12030 cat >>confdefs.h <<_ACEOF
12031 #define HAVE_DECL_GETENV $ac_have_decl
12040 GNULIB_GETTIMEOFDAY=0;
12041 HAVE_GETTIMEOFDAY=1;
12042 HAVE_STRUCT_TIMEVAL=1;
12044 REPLACE_GETTIMEOFDAY=0;
12045 REPLACE_STRUCT_TIMEVAL=0;
12060 if test $gl_cv_have_include_next = yes; then
12061 gl_cv_next_sys_time_h='<'sys/time.h'>'
12063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
12064 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
12065 if ${gl_cv_next_sys_time_h+:} false; then :
12066 $as_echo_n "(cached) " >&6
12069 if test $ac_cv_header_sys_time_h = yes; then
12072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12073 /* end confdefs.h. */
12074 #include <sys/time.h>
12078 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12079 *) gl_absname_cpp="$ac_cpp" ;;
12084 gl_dirsep_regex='[/\\]'
12087 gl_dirsep_regex='\/'
12090 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12092 gl_header_literal_regex=`echo 'sys/time.h' \
12093 | sed -e "$gl_make_literal_regex_sed"`
12094 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12095 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12100 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12101 sed -n "$gl_absolute_header_sed"`'"'
12103 gl_cv_next_sys_time_h='<'sys/time.h'>'
12108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
12109 $as_echo "$gl_cv_next_sys_time_h" >&6; }
12111 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
12113 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12114 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12115 gl_next_as_first_directive='<'sys/time.h'>'
12117 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12118 gl_next_as_first_directive=$gl_cv_next_sys_time_h
12120 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
12126 if test $ac_cv_header_sys_time_h != yes; then
12134 if test $ac_cv_header_sys_socket_h != yes; then
12135 for ac_header in winsock2.h
12137 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12138 if test "x$ac_cv_header_winsock2_h" = xyes; then :
12139 cat >>confdefs.h <<_ACEOF
12140 #define HAVE_WINSOCK2_H 1
12148 if test "$ac_cv_header_winsock2_h" = yes; then
12150 UNISTD_H_HAVE_WINSOCK2_H=1
12151 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
12157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
12158 $as_echo_n "checking for struct timeval... " >&6; }
12159 if ${gl_cv_sys_struct_timeval+:} false; then :
12160 $as_echo_n "(cached) " >&6
12162 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12163 /* end confdefs.h. */
12164 #if HAVE_SYS_TIME_H
12165 #include <sys/time.h>
12168 #if HAVE_WINSOCK2_H
12169 # include <winsock2.h>
12175 static struct timeval x; x.tv_sec = x.tv_usec;
12180 if ac_fn_c_try_compile "$LINENO"; then :
12181 gl_cv_sys_struct_timeval=yes
12183 gl_cv_sys_struct_timeval=no
12185 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12188 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
12189 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
12190 if test $gl_cv_sys_struct_timeval != yes; then
12191 HAVE_STRUCT_TIMEVAL=0
12193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
12194 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
12195 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
12196 $as_echo_n "(cached) " >&6
12198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12199 /* end confdefs.h. */
12200 #if HAVE_SYS_TIME_H
12201 #include <sys/time.h>
12204 #if HAVE_WINSOCK2_H
12205 # include <winsock2.h>
12211 static struct timeval x;
12212 typedef int verify_tv_sec_type[
12213 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
12220 if ac_fn_c_try_compile "$LINENO"; then :
12221 gl_cv_sys_struct_timeval_tv_sec=yes
12223 gl_cv_sys_struct_timeval_tv_sec=no
12225 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12228 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
12229 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
12230 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
12231 REPLACE_STRUCT_TIMEVAL=1
12236 for gl_func in gettimeofday; do
12237 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
12238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
12239 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
12240 if eval \${$as_gl_Symbol+:} false; then :
12241 $as_echo_n "(cached) " >&6
12243 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12244 /* end confdefs.h. */
12246 #if HAVE_SYS_TIME_H
12247 # include <sys/time.h>
12260 if ac_fn_c_try_compile "$LINENO"; then :
12261 eval "$as_gl_Symbol=yes"
12263 eval "$as_gl_Symbol=no"
12265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12267 eval ac_res=\$$as_gl_Symbol
12268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12269 $as_echo "$ac_res" >&6; }
12270 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
12271 cat >>confdefs.h <<_ACEOF
12272 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
12275 eval ac_cv_have_decl_$gl_func=yes
12284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
12285 $as_echo_n "checking for unsigned long long int... " >&6; }
12286 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
12287 $as_echo_n "(cached) " >&6
12289 ac_cv_type_unsigned_long_long_int=yes
12290 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12292 /* end confdefs.h. */
12294 /* For now, do not test the preprocessor; as of 2007 there are too many
12295 implementations with broken preprocessors. Perhaps this can
12296 be revisited in 2012. In the meantime, code should not expect
12297 #if to work with literals wider than 32 bits. */
12298 /* Test literals. */
12299 long long int ll = 9223372036854775807ll;
12300 long long int nll = -9223372036854775807LL;
12301 unsigned long long int ull = 18446744073709551615ULL;
12302 /* Test constant expressions. */
12303 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
12305 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
12311 /* Test availability of runtime routines for shift and division. */
12312 long long int llmax = 9223372036854775807ll;
12313 unsigned long long int ullmax = 18446744073709551615ull;
12314 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
12315 | (llmax / ll) | (llmax % ll)
12316 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
12317 | (ullmax / ull) | (ullmax % ull));
12323 if ac_fn_c_try_link "$LINENO"; then :
12326 ac_cv_type_unsigned_long_long_int=no
12328 rm -f core conftest.err conftest.$ac_objext \
12329 conftest$ac_exeext conftest.$ac_ext
12332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
12333 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
12334 if test $ac_cv_type_unsigned_long_long_int = yes; then
12336 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
12343 $as_echo_n "checking for long long int... " >&6; }
12344 if ${ac_cv_type_long_long_int+:} false; then :
12345 $as_echo_n "(cached) " >&6
12347 ac_cv_type_long_long_int=yes
12348 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
12349 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
12350 if test $ac_cv_type_long_long_int = yes; then
12351 if test "$cross_compiling" = yes; then :
12354 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12355 /* end confdefs.h. */
12356 #include <limits.h>
12359 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
12360 # define LLONG_MAX (HALF - 1 + HALF)
12365 long long int n = 1;
12369 long long int m = n << i;
12372 if (LLONG_MAX / 2 < m)
12380 if ac_fn_c_try_run "$LINENO"; then :
12383 ac_cv_type_long_long_int=no
12385 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12386 conftest.$ac_objext conftest.beam conftest.$ac_ext
12392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
12393 $as_echo "$ac_cv_type_long_long_int" >&6; }
12394 if test $ac_cv_type_long_long_int = yes; then
12396 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12405 gl_cv_c_multiarch=no
12406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12407 /* end confdefs.h. */
12408 #ifndef __APPLE_CC__
12409 not a universal capable compiler
12414 if ac_fn_c_try_compile "$LINENO"; then :
12418 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12419 if test -n "$prev"; then
12421 i?86 | x86_64 | ppc | ppc64)
12422 if test -z "$arch" || test "$arch" = "$word"; then
12425 gl_cv_c_multiarch=yes
12431 if test "x$word" = "x-arch"; then
12438 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12439 if test $gl_cv_c_multiarch = yes; then
12440 APPLE_UNIVERSAL_BUILD=1
12442 APPLE_UNIVERSAL_BUILD=0
12449 if test $ac_cv_type_long_long_int = yes; then
12450 HAVE_LONG_LONG_INT=1
12452 HAVE_LONG_LONG_INT=0
12456 if test $ac_cv_type_unsigned_long_long_int = yes; then
12457 HAVE_UNSIGNED_LONG_LONG_INT=1
12459 HAVE_UNSIGNED_LONG_LONG_INT=0
12464 if test $ac_cv_header_wchar_h = yes; then
12471 if test $ac_cv_header_inttypes_h = yes; then
12478 if test $ac_cv_header_sys_types_h = yes; then
12494 if test $gl_cv_have_include_next = yes; then
12495 gl_cv_next_stdint_h='<'stdint.h'>'
12497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
12498 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
12499 if ${gl_cv_next_stdint_h+:} false; then :
12500 $as_echo_n "(cached) " >&6
12503 if test $ac_cv_header_stdint_h = yes; then
12506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12507 /* end confdefs.h. */
12508 #include <stdint.h>
12512 aix*) gl_absname_cpp="$ac_cpp -C" ;;
12513 *) gl_absname_cpp="$ac_cpp" ;;
12518 gl_dirsep_regex='[/\\]'
12521 gl_dirsep_regex='\/'
12524 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
12526 gl_header_literal_regex=`echo 'stdint.h' \
12527 | sed -e "$gl_make_literal_regex_sed"`
12528 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12529 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12534 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12535 sed -n "$gl_absolute_header_sed"`'"'
12537 gl_cv_next_stdint_h='<'stdint.h'>'
12542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
12543 $as_echo "$gl_cv_next_stdint_h" >&6; }
12545 NEXT_STDINT_H=$gl_cv_next_stdint_h
12547 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
12548 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12549 gl_next_as_first_directive='<'stdint.h'>'
12551 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12552 gl_next_as_first_directive=$gl_cv_next_stdint_h
12554 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
12559 if test $ac_cv_header_stdint_h = yes; then
12566 if test $ac_cv_header_stdint_h = yes; then
12567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
12568 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
12569 if ${gl_cv_header_working_stdint_h+:} false; then :
12570 $as_echo_n "(cached) " >&6
12572 gl_cv_header_working_stdint_h=no
12573 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12574 /* end confdefs.h. */
12577 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12578 #include <stdint.h>
12579 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
12580 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
12581 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
12585 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12586 included before <wchar.h>. */
12587 #include <stddef.h>
12588 #include <signal.h>
12590 # include <stdio.h>
12592 # include <wchar.h>
12597 int8_t a1 = INT8_MAX;
12598 int8_t a1min = INT8_MIN;
12601 int16_t a2 = INT16_MAX;
12602 int16_t a2min = INT16_MIN;
12605 int32_t a3 = INT32_MAX;
12606 int32_t a3min = INT32_MIN;
12609 int64_t a4 = INT64_MAX;
12610 int64_t a4min = INT64_MIN;
12613 uint8_t b1 = UINT8_MAX;
12615 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
12618 uint16_t b2 = UINT16_MAX;
12621 uint32_t b3 = UINT32_MAX;
12624 uint64_t b4 = UINT64_MAX;
12626 int_least8_t c1 = INT8_C (0x7f);
12627 int_least8_t c1max = INT_LEAST8_MAX;
12628 int_least8_t c1min = INT_LEAST8_MIN;
12629 int_least16_t c2 = INT16_C (0x7fff);
12630 int_least16_t c2max = INT_LEAST16_MAX;
12631 int_least16_t c2min = INT_LEAST16_MIN;
12632 int_least32_t c3 = INT32_C (0x7fffffff);
12633 int_least32_t c3max = INT_LEAST32_MAX;
12634 int_least32_t c3min = INT_LEAST32_MIN;
12635 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
12636 int_least64_t c4max = INT_LEAST64_MAX;
12637 int_least64_t c4min = INT_LEAST64_MIN;
12638 uint_least8_t d1 = UINT8_C (0xff);
12639 uint_least8_t d1max = UINT_LEAST8_MAX;
12640 uint_least16_t d2 = UINT16_C (0xffff);
12641 uint_least16_t d2max = UINT_LEAST16_MAX;
12642 uint_least32_t d3 = UINT32_C (0xffffffff);
12643 uint_least32_t d3max = UINT_LEAST32_MAX;
12644 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
12645 uint_least64_t d4max = UINT_LEAST64_MAX;
12646 int_fast8_t e1 = INT_FAST8_MAX;
12647 int_fast8_t e1min = INT_FAST8_MIN;
12648 int_fast16_t e2 = INT_FAST16_MAX;
12649 int_fast16_t e2min = INT_FAST16_MIN;
12650 int_fast32_t e3 = INT_FAST32_MAX;
12651 int_fast32_t e3min = INT_FAST32_MIN;
12652 int_fast64_t e4 = INT_FAST64_MAX;
12653 int_fast64_t e4min = INT_FAST64_MIN;
12654 uint_fast8_t f1 = UINT_FAST8_MAX;
12655 uint_fast16_t f2 = UINT_FAST16_MAX;
12656 uint_fast32_t f3 = UINT_FAST32_MAX;
12657 uint_fast64_t f4 = UINT_FAST64_MAX;
12659 intptr_t g = INTPTR_MAX;
12660 intptr_t gmin = INTPTR_MIN;
12663 uintptr_t h = UINTPTR_MAX;
12665 intmax_t i = INTMAX_MAX;
12666 uintmax_t j = UINTMAX_MAX;
12668 #include <limits.h> /* for CHAR_BIT */
12669 #define TYPE_MINIMUM(t) \
12670 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
12671 #define TYPE_MAXIMUM(t) \
12672 ((t) ((t) 0 < (t) -1 \
12674 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
12677 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
12678 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
12680 /* Detect bug in FreeBSD 6.0 / ia64. */
12681 int check_SIG_ATOMIC:
12682 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
12683 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
12685 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
12687 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
12688 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
12690 /* Detect bug in mingw. */
12692 WINT_MIN == TYPE_MINIMUM (wint_t)
12693 && WINT_MAX == TYPE_MAXIMUM (wint_t)
12696 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
12698 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
12699 int check_UINT16_C:
12700 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
12702 /* Detect bugs in OpenBSD 3.9 stdint.h. */
12704 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
12707 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
12710 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
12713 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
12715 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
12716 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
12717 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
12718 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
12719 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
12720 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
12721 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
12722 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
12723 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
12724 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
12725 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
12736 if ac_fn_c_try_compile "$LINENO"; then :
12737 if test "$cross_compiling" = yes; then :
12738 gl_cv_header_working_stdint_h=yes
12741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12742 /* end confdefs.h. */
12745 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12746 #include <stdint.h>
12749 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12750 included before <wchar.h>. */
12751 #include <stddef.h>
12752 #include <signal.h>
12754 # include <stdio.h>
12756 # include <wchar.h>
12761 #include <string.h>
12762 #define MVAL(macro) MVAL1(macro)
12763 #define MVAL1(expression) #expression
12764 static const char *macro_values[] =
12798 for (mv = macro_values; *mv != NULL; mv++)
12800 const char *value = *mv;
12801 /* Test whether it looks like a cast expression. */
12802 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
12803 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
12804 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
12805 || strncmp (value, "((int)"/*)*/, 6) == 0
12806 || strncmp (value, "((signed short)"/*)*/, 15) == 0
12807 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
12808 return mv - macro_values + 1;
12816 if ac_fn_c_try_run "$LINENO"; then :
12817 gl_cv_header_working_stdint_h=yes
12819 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12820 conftest.$ac_objext conftest.beam conftest.$ac_ext
12825 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
12829 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
12831 if test "$gl_cv_header_working_stdint_h" = yes; then
12834 for ac_header in sys/inttypes.h sys/bitypes.h
12836 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12837 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12838 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12839 cat >>confdefs.h <<_ACEOF
12840 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12847 if test $ac_cv_header_sys_inttypes_h = yes; then
12848 HAVE_SYS_INTTYPES_H=1
12850 HAVE_SYS_INTTYPES_H=0
12853 if test $ac_cv_header_sys_bitypes_h = yes; then
12854 HAVE_SYS_BITYPES_H=1
12856 HAVE_SYS_BITYPES_H=0
12862 if test $APPLE_UNIVERSAL_BUILD = 0; then
12865 for gltype in ptrdiff_t size_t ; do
12866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12867 $as_echo_n "checking for bit size of $gltype... " >&6; }
12868 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12869 $as_echo_n "(cached) " >&6
12871 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
12872 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12873 included before <wchar.h>. */
12874 #include <stddef.h>
12875 #include <signal.h>
12877 # include <stdio.h>
12879 # include <wchar.h>
12882 #include <limits.h>"; then :
12888 eval gl_cv_bitsizeof_${gltype}=\$result
12891 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12893 $as_echo "$ac_res" >&6; }
12894 eval result=\$gl_cv_bitsizeof_${gltype}
12895 if test $result = unknown; then
12898 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12899 cat >>confdefs.h <<_ACEOF
12900 #define BITSIZEOF_${GLTYPE} $result
12903 eval BITSIZEOF_${GLTYPE}=\$result
12910 for gltype in sig_atomic_t wchar_t wint_t ; do
12911 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
12912 $as_echo_n "checking for bit size of $gltype... " >&6; }
12913 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
12914 $as_echo_n "(cached) " >&6
12916 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
12917 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12918 included before <wchar.h>. */
12919 #include <stddef.h>
12920 #include <signal.h>
12922 # include <stdio.h>
12924 # include <wchar.h>
12927 #include <limits.h>"; then :
12933 eval gl_cv_bitsizeof_${gltype}=\$result
12936 eval ac_res=\$gl_cv_bitsizeof_${gltype}
12937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12938 $as_echo "$ac_res" >&6; }
12939 eval result=\$gl_cv_bitsizeof_${gltype}
12940 if test $result = unknown; then
12943 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12944 cat >>confdefs.h <<_ACEOF
12945 #define BITSIZEOF_${GLTYPE} $result
12948 eval BITSIZEOF_${GLTYPE}=\$result
12954 for gltype in sig_atomic_t wchar_t wint_t ; do
12955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
12956 $as_echo_n "checking whether $gltype is signed... " >&6; }
12957 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
12958 $as_echo_n "(cached) " >&6
12960 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12961 /* end confdefs.h. */
12963 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12964 included before <wchar.h>. */
12965 #include <stddef.h>
12966 #include <signal.h>
12968 # include <stdio.h>
12970 # include <wchar.h>
12973 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
12982 if ac_fn_c_try_compile "$LINENO"; then :
12987 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12988 eval gl_cv_type_${gltype}_signed=\$result
12991 eval ac_res=\$gl_cv_type_${gltype}_signed
12992 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
12993 $as_echo "$ac_res" >&6; }
12994 eval result=\$gl_cv_type_${gltype}_signed
12995 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
12996 if test "$result" = yes; then
12997 cat >>confdefs.h <<_ACEOF
12998 #define HAVE_SIGNED_${GLTYPE} 1
13001 eval HAVE_SIGNED_${GLTYPE}=1
13003 eval HAVE_SIGNED_${GLTYPE}=0
13008 gl_cv_type_ptrdiff_t_signed=yes
13009 gl_cv_type_size_t_signed=no
13010 if test $APPLE_UNIVERSAL_BUILD = 0; then
13013 for gltype in ptrdiff_t size_t ; do
13014 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13015 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13016 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
13017 $as_echo_n "(cached) " >&6
13019 eval gl_cv_type_${gltype}_suffix=no
13020 eval result=\$gl_cv_type_${gltype}_signed
13021 if test "$result" = yes; then
13026 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13028 '') gltype1='int';;
13029 l) gltype1='long int';;
13030 ll) gltype1='long long int';;
13031 i64) gltype1='__int64';;
13032 u) gltype1='unsigned int';;
13033 ul) gltype1='unsigned long int';;
13034 ull) gltype1='unsigned long long int';;
13035 ui64)gltype1='unsigned __int64';;
13037 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13038 /* end confdefs.h. */
13040 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13041 included before <wchar.h>. */
13042 #include <stddef.h>
13043 #include <signal.h>
13045 # include <stdio.h>
13047 # include <wchar.h>
13050 extern $gltype foo;
13051 extern $gltype1 foo;
13060 if ac_fn_c_try_compile "$LINENO"; then :
13061 eval gl_cv_type_${gltype}_suffix=\$glsuf
13063 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13064 eval result=\$gl_cv_type_${gltype}_suffix
13065 test "$result" != no && break
13068 eval ac_res=\$gl_cv_type_${gltype}_suffix
13069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13070 $as_echo "$ac_res" >&6; }
13071 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13072 eval result=\$gl_cv_type_${gltype}_suffix
13073 test "$result" = no && result=
13074 eval ${GLTYPE}_SUFFIX=\$result
13075 cat >>confdefs.h <<_ACEOF
13076 #define ${GLTYPE}_SUFFIX $result
13085 for gltype in sig_atomic_t wchar_t wint_t ; do
13086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13087 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13088 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
13089 $as_echo_n "(cached) " >&6
13091 eval gl_cv_type_${gltype}_suffix=no
13092 eval result=\$gl_cv_type_${gltype}_signed
13093 if test "$result" = yes; then
13098 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
13100 '') gltype1='int';;
13101 l) gltype1='long int';;
13102 ll) gltype1='long long int';;
13103 i64) gltype1='__int64';;
13104 u) gltype1='unsigned int';;
13105 ul) gltype1='unsigned long int';;
13106 ull) gltype1='unsigned long long int';;
13107 ui64)gltype1='unsigned __int64';;
13109 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13110 /* end confdefs.h. */
13112 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13113 included before <wchar.h>. */
13114 #include <stddef.h>
13115 #include <signal.h>
13117 # include <stdio.h>
13119 # include <wchar.h>
13122 extern $gltype foo;
13123 extern $gltype1 foo;
13132 if ac_fn_c_try_compile "$LINENO"; then :
13133 eval gl_cv_type_${gltype}_suffix=\$glsuf
13135 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13136 eval result=\$gl_cv_type_${gltype}_suffix
13137 test "$result" != no && break
13140 eval ac_res=\$gl_cv_type_${gltype}_suffix
13141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13142 $as_echo "$ac_res" >&6; }
13143 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13144 eval result=\$gl_cv_type_${gltype}_suffix
13145 test "$result" = no && result=
13146 eval ${GLTYPE}_SUFFIX=\$result
13147 cat >>confdefs.h <<_ACEOF
13148 #define ${GLTYPE}_SUFFIX $result
13155 if test $BITSIZEOF_WINT_T -lt 32; then
13156 BITSIZEOF_WINT_T=32
13162 if test -n "$STDINT_H"; then
13163 GL_GENERATE_STDINT_H_TRUE=
13164 GL_GENERATE_STDINT_H_FALSE='#'
13166 GL_GENERATE_STDINT_H_TRUE='#'
13167 GL_GENERATE_STDINT_H_FALSE=
13176 GNULIB_STRTOIMAX=0;
13177 GNULIB_STRTOUMAX=0;
13178 HAVE_DECL_IMAXABS=1;
13179 HAVE_DECL_IMAXDIV=1;
13180 HAVE_DECL_STRTOIMAX=1;
13181 HAVE_DECL_STRTOUMAX=1;
13182 REPLACE_STRTOIMAX=0;
13183 INT32_MAX_LT_INTMAX_MAX=1;
13184 INT64_MAX_EQ_LONG_MAX='defined _LP64';
13185 PRI_MACROS_BROKEN=0;
13186 PRIPTR_PREFIX=__PRIPTR_PREFIX;
13187 UINT32_MAX_LT_UINTMAX_MAX=1;
13188 UINT64_MAX_EQ_ULONG_MAX='defined _LP64';
13204 if test $gl_cv_have_include_next = yes; then
13205 gl_cv_next_inttypes_h='<'inttypes.h'>'
13207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
13208 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
13209 if ${gl_cv_next_inttypes_h+:} false; then :
13210 $as_echo_n "(cached) " >&6
13213 if test $ac_cv_header_inttypes_h = yes; then
13216 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13217 /* end confdefs.h. */
13218 #include <inttypes.h>
13222 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13223 *) gl_absname_cpp="$ac_cpp" ;;
13228 gl_dirsep_regex='[/\\]'
13231 gl_dirsep_regex='\/'
13234 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13236 gl_header_literal_regex=`echo 'inttypes.h' \
13237 | sed -e "$gl_make_literal_regex_sed"`
13238 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13239 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13244 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13245 sed -n "$gl_absolute_header_sed"`'"'
13247 gl_cv_next_inttypes_h='<'inttypes.h'>'
13252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
13253 $as_echo "$gl_cv_next_inttypes_h" >&6; }
13255 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h
13257 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13258 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13259 gl_next_as_first_directive='<'inttypes.h'>'
13261 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13262 gl_next_as_first_directive=$gl_cv_next_inttypes_h
13264 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive
13273 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do
13274 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13276 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13277 if eval \${$as_gl_Symbol+:} false; then :
13278 $as_echo_n "(cached) " >&6
13280 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13281 /* end confdefs.h. */
13282 #include <inttypes.h>
13293 if ac_fn_c_try_compile "$LINENO"; then :
13294 eval "$as_gl_Symbol=yes"
13296 eval "$as_gl_Symbol=no"
13298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13300 eval ac_res=\$$as_gl_Symbol
13301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13302 $as_echo "$ac_res" >&6; }
13303 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13304 cat >>confdefs.h <<_ACEOF
13305 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13308 eval ac_cv_have_decl_$gl_func=yes
13314 for ac_header in inttypes.h
13316 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default"
13317 if test "x$ac_cv_header_inttypes_h" = xyes; then :
13318 cat >>confdefs.h <<_ACEOF
13319 #define HAVE_INTTYPES_H 1
13326 if test $ac_cv_header_inttypes_h = yes; then
13327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5
13328 $as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; }
13329 if ${gt_cv_inttypes_pri_broken+:} false; then :
13330 $as_echo_n "(cached) " >&6
13333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13334 /* end confdefs.h. */
13336 #include <inttypes.h>
13349 if ac_fn_c_try_compile "$LINENO"; then :
13350 gt_cv_inttypes_pri_broken=no
13352 gt_cv_inttypes_pri_broken=yes
13354 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13357 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5
13358 $as_echo "$gt_cv_inttypes_pri_broken" >&6; }
13360 if test "$gt_cv_inttypes_pri_broken" = yes; then
13362 cat >>confdefs.h <<_ACEOF
13363 #define PRI_MACROS_BROKEN 1
13366 PRI_MACROS_BROKEN=1
13368 PRI_MACROS_BROKEN=0
13377 GNULIB_TOWCTRANS=0;
13381 REPLACE_ISWBLANK=0;
13386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
13387 $as_echo_n "checking for wint_t... " >&6; }
13388 if ${gt_cv_c_wint_t+:} false; then :
13389 $as_echo_n "(cached) " >&6
13391 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13392 /* end confdefs.h. */
13394 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13396 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
13397 before <wchar.h>. */
13398 #include <stddef.h>
13402 wint_t foo = (wchar_t)'\0';
13411 if ac_fn_c_try_compile "$LINENO"; then :
13416 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
13419 $as_echo "$gt_cv_c_wint_t" >&6; }
13420 if test $gt_cv_c_wint_t = yes; then
13422 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
13431 if test $ac_cv_func_iswcntrl = yes; then
13439 if test $gt_cv_c_wint_t = yes; then
13455 if test $gl_cv_have_include_next = yes; then
13456 gl_cv_next_wctype_h='<'wctype.h'>'
13458 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
13459 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
13460 if ${gl_cv_next_wctype_h+:} false; then :
13461 $as_echo_n "(cached) " >&6
13464 if test $ac_cv_header_wctype_h = yes; then
13467 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13468 /* end confdefs.h. */
13469 #include <wctype.h>
13473 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13474 *) gl_absname_cpp="$ac_cpp" ;;
13479 gl_dirsep_regex='[/\\]'
13482 gl_dirsep_regex='\/'
13485 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13487 gl_header_literal_regex=`echo 'wctype.h' \
13488 | sed -e "$gl_make_literal_regex_sed"`
13489 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13490 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13495 gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13496 sed -n "$gl_absolute_header_sed"`'"'
13498 gl_cv_next_wctype_h='<'wctype.h'>'
13503 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
13504 $as_echo "$gl_cv_next_wctype_h" >&6; }
13506 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
13508 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13509 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13510 gl_next_as_first_directive='<'wctype.h'>'
13512 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13513 gl_next_as_first_directive=$gl_cv_next_wctype_h
13515 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
13520 if test $ac_cv_header_wctype_h = yes; then
13521 if test $ac_cv_func_iswcntrl = yes; then
13522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
13523 $as_echo_n "checking whether iswcntrl works... " >&6; }
13524 if ${gl_cv_func_iswcntrl_works+:} false; then :
13525 $as_echo_n "(cached) " >&6
13528 if test "$cross_compiling" = yes; then :
13529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13530 /* end confdefs.h. */
13531 #include <stdlib.h>
13532 #if __GNU_LIBRARY__ == 1
13533 Linux libc5 i18n is broken.
13543 if ac_fn_c_try_compile "$LINENO"; then :
13544 gl_cv_func_iswcntrl_works="guessing yes"
13546 gl_cv_func_iswcntrl_works="guessing no"
13548 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13551 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13552 /* end confdefs.h. */
13554 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13555 included before <wchar.h>.
13556 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13557 must be included before <wchar.h>. */
13558 #include <stddef.h>
13562 #include <wctype.h>
13563 int main () { return iswprint ('x') == 0; }
13566 if ac_fn_c_try_run "$LINENO"; then :
13567 gl_cv_func_iswcntrl_works=yes
13569 gl_cv_func_iswcntrl_works=no
13571 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13572 conftest.$ac_objext conftest.beam conftest.$ac_ext
13577 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
13578 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
13586 case "$gl_cv_func_iswcntrl_works" in
13587 *yes) REPLACE_ISWCNTRL=0 ;;
13588 *) REPLACE_ISWCNTRL=1 ;;
13592 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
13596 if test $REPLACE_ISWCNTRL = 1; then
13599 for ac_func in towlower
13601 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
13602 if test "x$ac_cv_func_towlower" = xyes; then :
13603 cat >>confdefs.h <<_ACEOF
13604 #define HAVE_TOWLOWER 1
13610 if test $ac_cv_func_towlower = yes; then
13613 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13614 included before <wchar.h>.
13615 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13616 must be included before <wchar.h>. */
13617 #include <stddef.h>
13622 # include <wctype.h>
13626 if test "x$ac_cv_have_decl_towlower" = xyes; then :
13632 cat >>confdefs.h <<_ACEOF
13633 #define HAVE_DECL_TOWLOWER $ac_have_decl
13636 if test $ac_cv_have_decl_towlower = yes; then
13645 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
13649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
13650 $as_echo_n "checking for wctype_t... " >&6; }
13651 if ${gl_cv_type_wctype_t+:} false; then :
13652 $as_echo_n "(cached) " >&6
13654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13655 /* end confdefs.h. */
13656 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13657 included before <wchar.h>.
13658 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13659 must be included before <wchar.h>. */
13660 #include <stddef.h>
13665 # include <wctype.h>
13677 if ac_fn_c_try_compile "$LINENO"; then :
13678 gl_cv_type_wctype_t=yes
13680 gl_cv_type_wctype_t=no
13682 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
13686 $as_echo "$gl_cv_type_wctype_t" >&6; }
13687 if test $gl_cv_type_wctype_t = no; then
13691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
13692 $as_echo_n "checking for wctrans_t... " >&6; }
13693 if ${gl_cv_type_wctrans_t+:} false; then :
13694 $as_echo_n "(cached) " >&6
13696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13697 /* end confdefs.h. */
13698 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
13699 included before <wchar.h>.
13700 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
13701 must be included before <wchar.h>. */
13702 #include <stddef.h>
13706 #include <wctype.h>
13717 if ac_fn_c_try_compile "$LINENO"; then :
13718 gl_cv_type_wctrans_t=yes
13720 gl_cv_type_wctrans_t=no
13722 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
13726 $as_echo "$gl_cv_type_wctrans_t" >&6; }
13727 if test $gl_cv_type_wctrans_t = no; then
13732 for gl_func in wctype iswctype wctrans towctrans ; do
13733 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13734 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13735 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13736 if eval \${$as_gl_Symbol+:} false; then :
13737 $as_echo_n "(cached) " >&6
13739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13740 /* end confdefs.h. */
13742 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
13744 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
13745 included before <wchar.h>. */
13746 #if !(defined __GLIBC__ && !defined __UCLIBC__)
13747 # include <stddef.h>
13748 # include <stdio.h>
13750 # include <wchar.h>
13752 #include <wctype.h>
13763 if ac_fn_c_try_compile "$LINENO"; then :
13764 eval "$as_gl_Symbol=yes"
13766 eval "$as_gl_Symbol=no"
13768 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13770 eval ac_res=\$$as_gl_Symbol
13771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13772 $as_echo "$ac_res" >&6; }
13773 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13774 cat >>confdefs.h <<_ACEOF
13775 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13778 eval ac_cv_have_decl_$gl_func=yes
13786 GNULIB_NL_LANGINFO=0;
13787 HAVE_NL_LANGINFO=1;
13788 REPLACE_NL_LANGINFO=0;
13801 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
13805 # Solaris 9 has *at functions, but uniformly mishandles trailing
13806 # slash in all of them.
13817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
13818 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
13819 if ${ac_cv_gnu_library_2_1+:} false; then :
13820 $as_echo_n "(cached) " >&6
13822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13823 /* end confdefs.h. */
13825 #include <features.h>
13826 #ifdef __GNU_LIBRARY__
13827 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
13836 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13837 $EGREP "Lucky" >/dev/null 2>&1; then :
13838 ac_cv_gnu_library_2_1=yes
13840 ac_cv_gnu_library_2_1=no
13847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
13848 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
13850 GLIBC21="$ac_cv_gnu_library_2_1"
13854 GNULIB_LOCALECONV=0;
13855 GNULIB_SETLOCALE=0;
13856 GNULIB_DUPLOCALE=0;
13858 REPLACE_LOCALECONV=0;
13859 REPLACE_SETLOCALE=0;
13860 REPLACE_DUPLOCALE=0;
13861 REPLACE_STRUCT_LCONV=0;
13868 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
13869 $as_echo_n "checking for wchar_t... " >&6; }
13870 if ${gt_cv_c_wchar_t+:} false; then :
13871 $as_echo_n "(cached) " >&6
13873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13874 /* end confdefs.h. */
13875 #include <stddef.h>
13876 wchar_t foo = (wchar_t)'\0';
13885 if ac_fn_c_try_compile "$LINENO"; then :
13886 gt_cv_c_wchar_t=yes
13890 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13892 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
13893 $as_echo "$gt_cv_c_wchar_t" >&6; }
13894 if test $gt_cv_c_wchar_t = yes; then
13896 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
13904 if test $gt_cv_c_wchar_t = no; then
13908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
13909 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
13910 if ${gl_cv_decl_null_works+:} false; then :
13911 $as_echo_n "(cached) " >&6
13913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13914 /* end confdefs.h. */
13915 #include <stddef.h>
13916 int test[2 * (sizeof NULL == sizeof (void *)) -1];
13926 if ac_fn_c_try_compile "$LINENO"; then :
13927 gl_cv_decl_null_works=yes
13929 gl_cv_decl_null_works=no
13931 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
13934 $as_echo "$gl_cv_decl_null_works" >&6; }
13935 if test $gl_cv_decl_null_works = no; then
13940 if test -n "$STDDEF_H"; then
13941 GL_GENERATE_STDDEF_H_TRUE=
13942 GL_GENERATE_STDDEF_H_FALSE='#'
13944 GL_GENERATE_STDDEF_H_TRUE='#'
13945 GL_GENERATE_STDDEF_H_FALSE=
13948 if test -n "$STDDEF_H"; then
13957 if test $gl_cv_have_include_next = yes; then
13958 gl_cv_next_stddef_h='<'stddef.h'>'
13960 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
13961 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
13962 if ${gl_cv_next_stddef_h+:} false; then :
13963 $as_echo_n "(cached) " >&6
13966 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13967 /* end confdefs.h. */
13968 #include <stddef.h>
13972 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13973 *) gl_absname_cpp="$ac_cpp" ;;
13978 gl_dirsep_regex='[/\\]'
13981 gl_dirsep_regex='\/'
13984 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13986 gl_header_literal_regex=`echo 'stddef.h' \
13987 | sed -e "$gl_make_literal_regex_sed"`
13988 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13989 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13994 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13995 sed -n "$gl_absolute_header_sed"`'"'
13999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
14000 $as_echo "$gl_cv_next_stddef_h" >&6; }
14002 NEXT_STDDEF_H=$gl_cv_next_stddef_h
14004 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14005 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14006 gl_next_as_first_directive='<'stddef.h'>'
14008 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14009 gl_next_as_first_directive=$gl_cv_next_stddef_h
14011 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
14023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
14024 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
14025 if ${gl_cv_func_malloc_posix+:} false; then :
14026 $as_echo_n "(cached) " >&6
14029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14030 /* end confdefs.h. */
14035 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
14043 if ac_fn_c_try_compile "$LINENO"; then :
14044 gl_cv_func_malloc_posix=yes
14046 gl_cv_func_malloc_posix=no
14048 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
14052 $as_echo "$gl_cv_func_malloc_posix" >&6; }
14056 for ac_header in stdlib.h
14058 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
14059 if test "x$ac_cv_header_stdlib_h" = xyes; then :
14060 cat >>confdefs.h <<_ACEOF
14061 #define HAVE_STDLIB_H 1
14068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
14069 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
14070 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
14071 $as_echo_n "(cached) " >&6
14073 if test "$cross_compiling" = yes; then :
14075 # Guess yes on platforms where we know the result.
14076 *-gnu* | freebsd* | netbsd* | openbsd* \
14077 | hpux* | solaris* | cygwin* | mingw*)
14078 ac_cv_func_malloc_0_nonnull=yes ;;
14079 # If we don't know, assume the worst.
14080 *) ac_cv_func_malloc_0_nonnull=no ;;
14084 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14085 /* end confdefs.h. */
14086 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
14087 # include <stdlib.h>
14095 return ! malloc (0);
14101 if ac_fn_c_try_run "$LINENO"; then :
14102 ac_cv_func_malloc_0_nonnull=yes
14104 ac_cv_func_malloc_0_nonnull=no
14106 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14107 conftest.$ac_objext conftest.beam conftest.$ac_ext
14112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
14113 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
14114 if test $ac_cv_func_malloc_0_nonnull = yes; then :
14115 gl_cv_func_malloc_0_nonnull=1
14117 gl_cv_func_malloc_0_nonnull=0
14121 cat >>confdefs.h <<_ACEOF
14122 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
14133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
14134 $as_echo_n "checking for a traditional japanese locale... " >&6; }
14135 if ${gt_cv_locale_ja+:} false; then :
14136 $as_echo_n "(cached) " >&6
14139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14140 /* end confdefs.h. */
14142 #include <locale.h>
14144 #if HAVE_LANGINFO_CODESET
14145 # include <langinfo.h>
14147 #include <stdlib.h>
14148 #include <string.h>
14154 /* Check whether the given locale name is recognized by the system. */
14155 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14156 /* On native Windows, setlocale(category, "") looks at the system settings,
14157 not at the environment variables. Also, when an encoding suffix such
14158 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14159 category of the locale to "C". */
14160 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14161 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14164 if (setlocale (LC_ALL, "") == NULL) return 1;
14166 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14167 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14168 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14169 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14170 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14171 some unit tests fail.
14172 On MirBSD 10, when an unsupported locale is specified, setlocale()
14173 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
14174 #if HAVE_LANGINFO_CODESET
14176 const char *cs = nl_langinfo (CODESET);
14177 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14178 || strcmp (cs, "UTF-8") == 0)
14183 /* On Cygwin, avoid locale names without encoding suffix, because the
14184 locale_charset() function relies on the encoding suffix. Note that
14185 LC_ALL is set on the command line. */
14186 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14188 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
14189 on Cygwin 1.5.x. */
14190 if (MB_CUR_MAX == 1)
14192 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14193 This excludes the UTF-8 encoding (except on MirBSD). */
14194 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14195 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14196 for (p = buf; *p != '\0'; p++)
14197 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14203 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14204 (eval $ac_link) 2>&5
14206 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14207 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14209 # Handle native Windows specially, because there setlocale() interprets
14210 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14211 # "fr" or "fra" as "French" or "French_France.1252",
14212 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14213 # "ja" as "Japanese" or "Japanese_Japan.932",
14216 # Note that on native Windows, the Japanese locale is
14217 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
14218 # cannot use it here.
14219 gt_cv_locale_ja=none
14222 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14223 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14224 # configure script would override the LC_ALL setting. Likewise for
14225 # LC_CTYPE, which is also set at the beginning of the configure script.
14226 # Test for the AIX locale name.
14227 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14228 gt_cv_locale_ja=ja_JP
14230 # Test for the locale name with explicit encoding suffix.
14231 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14232 gt_cv_locale_ja=ja_JP.EUC-JP
14234 # Test for the HP-UX, OSF/1, NetBSD locale name.
14235 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14236 gt_cv_locale_ja=ja_JP.eucJP
14238 # Test for the IRIX, FreeBSD locale name.
14239 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14240 gt_cv_locale_ja=ja_JP.EUC
14242 # Test for the Solaris 7 locale name.
14243 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14246 # Special test for NetBSD 1.6.
14247 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
14248 gt_cv_locale_ja=ja_JP.eucJP
14251 gt_cv_locale_ja=none
14264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
14265 $as_echo "$gt_cv_locale_ja" >&6; }
14266 LOCALE_JA=$gt_cv_locale_ja
14272 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
14273 $as_echo_n "checking for a transitional chinese locale... " >&6; }
14274 if ${gt_cv_locale_zh_CN+:} false; then :
14275 $as_echo_n "(cached) " >&6
14278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14279 /* end confdefs.h. */
14281 #include <locale.h>
14282 #include <stdlib.h>
14284 #if HAVE_LANGINFO_CODESET
14285 # include <langinfo.h>
14287 #include <stdlib.h>
14288 #include <string.h>
14294 /* Check whether the given locale name is recognized by the system. */
14295 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14296 /* On native Windows, setlocale(category, "") looks at the system settings,
14297 not at the environment variables. Also, when an encoding suffix such
14298 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14299 category of the locale to "C". */
14300 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14301 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14304 if (setlocale (LC_ALL, "") == NULL) return 1;
14306 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14307 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14308 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14309 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14310 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14311 some unit tests fail.
14312 On MirBSD 10, when an unsupported locale is specified, setlocale()
14313 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
14314 #if HAVE_LANGINFO_CODESET
14316 const char *cs = nl_langinfo (CODESET);
14317 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
14318 || strcmp (cs, "UTF-8") == 0)
14323 /* On Cygwin, avoid locale names without encoding suffix, because the
14324 locale_charset() function relies on the encoding suffix. Note that
14325 LC_ALL is set on the command line. */
14326 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14328 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
14329 This excludes the UTF-8 encoding (except on MirBSD). */
14330 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14331 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
14332 for (p = buf; *p != '\0'; p++)
14333 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
14335 /* Check whether a typical GB18030 multibyte sequence is recognized as a
14336 single wide character. This excludes the GB2312 and GBK encodings. */
14337 if (mblen ("\203\062\332\066", 5) != 4)
14343 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14344 (eval $ac_link) 2>&5
14346 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14347 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14349 # Handle native Windows specially, because there setlocale() interprets
14350 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14351 # "fr" or "fra" as "French" or "French_France.1252",
14352 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14353 # "ja" as "Japanese" or "Japanese_Japan.932",
14356 # Test for the hypothetical native Windows locale name.
14357 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14358 gt_cv_locale_zh_CN=Chinese_China.54936
14361 gt_cv_locale_zh_CN=none
14365 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
14366 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
14367 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
14368 gt_cv_locale_zh_CN=none
14371 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14372 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14373 # configure script would override the LC_ALL setting. Likewise for
14374 # LC_CTYPE, which is also set at the beginning of the configure script.
14375 # Test for the locale name without encoding suffix.
14376 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14377 gt_cv_locale_zh_CN=zh_CN
14379 # Test for the locale name with explicit encoding suffix.
14380 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14381 gt_cv_locale_zh_CN=zh_CN.GB18030
14384 gt_cv_locale_zh_CN=none
14390 # If there was a link error, due to mblen(), the system is so old that
14391 # it certainly doesn't have a chinese locale.
14392 gt_cv_locale_zh_CN=none
14397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
14398 $as_echo "$gt_cv_locale_zh_CN" >&6; }
14399 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
14404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
14405 $as_echo_n "checking for a french Unicode locale... " >&6; }
14406 if ${gt_cv_locale_fr_utf8+:} false; then :
14407 $as_echo_n "(cached) " >&6
14410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14411 /* end confdefs.h. */
14413 #include <locale.h>
14415 #if HAVE_LANGINFO_CODESET
14416 # include <langinfo.h>
14418 #include <stdlib.h>
14419 #include <string.h>
14423 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
14424 imitates locale dependent behaviour by looking at the environment
14425 variables, and all locales use the UTF-8 encoding. */
14426 #if !(defined __BEOS__ || defined __HAIKU__)
14427 /* Check whether the given locale name is recognized by the system. */
14428 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
14429 /* On native Windows, setlocale(category, "") looks at the system settings,
14430 not at the environment variables. Also, when an encoding suffix such
14431 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
14432 category of the locale to "C". */
14433 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
14434 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
14437 if (setlocale (LC_ALL, "") == NULL) return 1;
14439 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
14440 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
14441 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
14442 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
14443 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
14444 some unit tests fail. */
14445 # if HAVE_LANGINFO_CODESET
14447 const char *cs = nl_langinfo (CODESET);
14448 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
14453 /* On Cygwin, avoid locale names without encoding suffix, because the
14454 locale_charset() function relies on the encoding suffix. Note that
14455 LC_ALL is set on the command line. */
14456 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
14458 /* Check whether in the abbreviation of the second month, the second
14459 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
14460 two bytes long, with UTF-8 encoding. */
14461 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
14462 if (strftime (buf, sizeof (buf), "%b", &t) < 4
14463 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
14466 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
14467 /* Check whether the decimal separator is a comma.
14468 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
14469 are nl_langinfo(RADIXCHAR) are both ".". */
14470 if (localeconv () ->decimal_point[0] != ',') return 1;
14476 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
14477 (eval $ac_link) 2>&5
14479 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
14480 test $ac_status = 0; } && test -s conftest$ac_exeext; then
14482 # Handle native Windows specially, because there setlocale() interprets
14483 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
14484 # "fr" or "fra" as "French" or "French_France.1252",
14485 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
14486 # "ja" as "Japanese" or "Japanese_Japan.932",
14489 # Test for the hypothetical native Windows locale name.
14490 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14491 gt_cv_locale_fr_utf8=French_France.65001
14494 gt_cv_locale_fr_utf8=none
14498 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
14499 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
14500 # configure script would override the LC_ALL setting. Likewise for
14501 # LC_CTYPE, which is also set at the beginning of the configure script.
14502 # Test for the usual locale name.
14503 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14504 gt_cv_locale_fr_utf8=fr_FR
14506 # Test for the locale name with explicit encoding suffix.
14507 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14508 gt_cv_locale_fr_utf8=fr_FR.UTF-8
14510 # Test for the Solaris 7 locale name.
14511 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
14512 gt_cv_locale_fr_utf8=fr.UTF-8
14515 gt_cv_locale_fr_utf8=none
14525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
14526 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
14527 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
14537 GNULIB_RAWMEMCHR=0;
14540 GNULIB_STRCHRNUL=0;
14548 GNULIB_STRCASESTR=0;
14555 GNULIB_MBSCASECMP=0;
14556 GNULIB_MBSNCASECMP=0;
14557 GNULIB_MBSPCASECMP=0;
14558 GNULIB_MBSCASESTR=0;
14565 GNULIB_STRERROR_R=0;
14566 GNULIB_STRSIGNAL=0;
14567 GNULIB_STRVERSCMP=0;
14572 HAVE_DECL_MEMMEM=1;
14574 HAVE_DECL_MEMRCHR=1;
14579 HAVE_DECL_STRDUP=1;
14580 HAVE_DECL_STRNDUP=1;
14581 HAVE_DECL_STRNLEN=1;
14585 HAVE_DECL_STRTOK_R=1;
14586 HAVE_DECL_STRERROR_R=1;
14587 HAVE_DECL_STRSIGNAL=1;
14594 REPLACE_STRCASESTR=0;
14595 REPLACE_STRCHRNUL=0;
14596 REPLACE_STRERROR=0;
14597 REPLACE_STRERROR_R=0;
14601 REPLACE_STRSIGNAL=0;
14602 REPLACE_STRTOK_R=0;
14603 UNDEFINE_STRTOK_R=0;
14613 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
14614 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
14615 # irrelevant for anonymous mappings.
14616 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
14617 if test "x$ac_cv_func_mmap" = xyes; then :
14624 # Try to allow MAP_ANONYMOUS.
14625 gl_have_mmap_anonymous=no
14626 if test $gl_have_mmap = yes; then
14627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
14628 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
14629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14630 /* end confdefs.h. */
14632 #include <sys/mman.h>
14633 #ifdef MAP_ANONYMOUS
14634 I cannot identify this map
14638 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14639 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14640 gl_have_mmap_anonymous=yes
14644 if test $gl_have_mmap_anonymous != yes; then
14645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14646 /* end confdefs.h. */
14648 #include <sys/mman.h>
14650 I cannot identify this map
14654 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14655 $EGREP "I cannot identify this map" >/dev/null 2>&1; then :
14657 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
14659 gl_have_mmap_anonymous=yes
14664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
14665 $as_echo "$gl_have_mmap_anonymous" >&6; }
14666 if test $gl_have_mmap_anonymous = yes; then
14668 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
14678 if test $HAVE_MEMCHR = 1; then
14679 # Detect platform-specific bugs in some versions of glibc:
14680 # memchr should not dereference anything with length 0
14681 # http://bugzilla.redhat.com/499689
14682 # memchr should not dereference overestimated length after a match
14683 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
14684 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
14685 # Assume that memchr works on platforms that lack mprotect.
14686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
14687 $as_echo_n "checking whether memchr works... " >&6; }
14688 if ${gl_cv_func_memchr_works+:} false; then :
14689 $as_echo_n "(cached) " >&6
14691 if test "$cross_compiling" = yes; then :
14692 gl_cv_func_memchr_works="guessing no"
14694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14695 /* end confdefs.h. */
14697 #include <string.h>
14698 #if HAVE_SYS_MMAN_H
14699 # include <fcntl.h>
14700 # include <unistd.h>
14701 # include <sys/types.h>
14702 # include <sys/mman.h>
14704 # define MAP_FILE 0
14713 char *fence = NULL;
14714 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
14715 # if HAVE_MAP_ANONYMOUS
14716 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
14718 # else /* !HAVE_MAP_ANONYMOUS */
14719 const int flags = MAP_FILE | MAP_PRIVATE;
14720 int fd = open ("/dev/zero", O_RDONLY, 0666);
14724 int pagesize = getpagesize ();
14726 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
14728 if (two_pages != (char *)(-1)
14729 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
14730 fence = two_pages + pagesize;
14735 if (memchr (fence, 0, 0))
14737 strcpy (fence - 9, "12345678");
14738 if (memchr (fence - 9, 0, 79) != fence - 1)
14740 if (memchr (fence - 1, 0, 3) != fence - 1)
14749 if ac_fn_c_try_run "$LINENO"; then :
14750 gl_cv_func_memchr_works=yes
14752 gl_cv_func_memchr_works=no
14754 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14755 conftest.$ac_objext conftest.beam conftest.$ac_ext
14759 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
14760 $as_echo "$gl_cv_func_memchr_works" >&6; }
14761 if test "$gl_cv_func_memchr_works" != yes; then
14766 ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
14767 if test "x$ac_cv_have_decl_memrchr" = xyes; then :
14773 cat >>confdefs.h <<_ACEOF
14774 #define HAVE_DECL_MEMRCHR $ac_have_decl
14789 GNULIB_NANOSLEEP=0;
14793 HAVE_DECL_LOCALTIME_R=1;
14797 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
14798 REPLACE_MKTIME=GNULIB_PORTCHECK;
14799 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
14800 REPLACE_TIMEGM=GNULIB_PORTCHECK;
14802 ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
14803 if test "x$ac_cv_have_decl_alarm" = xyes; then :
14809 cat >>confdefs.h <<_ACEOF
14810 #define HAVE_DECL_ALARM $ac_have_decl
14817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
14818 $as_echo_n "checking for promoted mode_t type... " >&6; }
14819 if ${gl_cv_promoted_mode_t+:} false; then :
14820 $as_echo_n "(cached) " >&6
14823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14824 /* end confdefs.h. */
14825 #include <sys/types.h>
14829 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
14834 if ac_fn_c_try_compile "$LINENO"; then :
14835 gl_cv_promoted_mode_t='int'
14837 gl_cv_promoted_mode_t='mode_t'
14839 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14842 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
14843 $as_echo "$gl_cv_promoted_mode_t" >&6; }
14845 cat >>confdefs.h <<_ACEOF
14846 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
14850 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
14851 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
14852 if ${ac_cv_header_stdbool_h+:} false; then :
14853 $as_echo_n "(cached) " >&6
14855 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14856 /* end confdefs.h. */
14858 #include <stdbool.h>
14860 "error: bool is not defined"
14863 "error: false is not defined"
14866 "error: false is not 0"
14869 "error: true is not defined"
14872 "error: true is not 1"
14874 #ifndef __bool_true_false_are_defined
14875 "error: __bool_true_false_are_defined is not defined"
14878 struct s { _Bool s: 1; _Bool t; } s;
14880 char a[true == 1 ? 1 : -1];
14881 char b[false == 0 ? 1 : -1];
14882 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
14883 char d[(bool) 0.5 == true ? 1 : -1];
14884 /* See body of main program for 'e'. */
14885 char f[(_Bool) 0.0 == false ? 1 : -1];
14887 char h[sizeof (_Bool)];
14888 char i[sizeof s.t];
14889 enum { j = false, k = true, l = false * true, m = true * 256 };
14890 /* The following fails for
14891 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
14893 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
14894 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
14895 /* Catch a bug in an HP-UX C compiler. See
14896 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
14897 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
14909 /* Refer to every declared value, to avoid compiler optimizations. */
14910 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
14911 + !m + !n + !o + !p + !q + !pq);
14917 if ac_fn_c_try_compile "$LINENO"; then :
14918 ac_cv_header_stdbool_h=yes
14920 ac_cv_header_stdbool_h=no
14922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14924 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
14925 $as_echo "$ac_cv_header_stdbool_h" >&6; }
14926 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
14927 if test "x$ac_cv_type__Bool" = xyes; then :
14929 cat >>confdefs.h <<_ACEOF
14930 #define HAVE__BOOL 1
14940 # Define two additional variables used in the Makefile substitution.
14942 if test "$ac_cv_header_stdbool_h" = yes; then
14945 STDBOOL_H='stdbool.h'
14948 if test -n "$STDBOOL_H"; then
14949 GL_GENERATE_STDBOOL_H_TRUE=
14950 GL_GENERATE_STDBOOL_H_FALSE='#'
14952 GL_GENERATE_STDBOOL_H_TRUE='#'
14953 GL_GENERATE_STDBOOL_H_FALSE=
14957 if test "$ac_cv_type__Bool" = yes; then
14965 # parse-datetime.y works with bison only.
14966 : ${YACC='bison -y'}
14969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compound literals" >&5
14970 $as_echo_n "checking for compound literals... " >&6; }
14971 if ${gl_cv_compound_literals+:} false; then :
14972 $as_echo_n "(cached) " >&6
14974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14975 /* end confdefs.h. */
14976 struct s { int i, j; };
14980 struct s t = (struct s) { 3, 4 };
14981 if (t.i != 0) return 0;
14986 if ac_fn_c_try_compile "$LINENO"; then :
14987 gl_cv_compound_literals=yes
14989 gl_cv_compound_literals=no
14991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compound_literals" >&5
14994 $as_echo "$gl_cv_compound_literals" >&6; }
14995 if test $gl_cv_compound_literals = yes; then
14997 $as_echo "#define HAVE_COMPOUND_LITERALS 1" >>confdefs.h
15001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
15002 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
15003 if ${ac_cv_struct_tm+:} false; then :
15004 $as_echo_n "(cached) " >&6
15006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15007 /* end confdefs.h. */
15008 #include <sys/types.h>
15015 int *p = &tm.tm_sec;
15021 if ac_fn_c_try_compile "$LINENO"; then :
15022 ac_cv_struct_tm=time.h
15024 ac_cv_struct_tm=sys/time.h
15026 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
15029 $as_echo "$ac_cv_struct_tm" >&6; }
15030 if test $ac_cv_struct_tm = sys/time.h; then
15032 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
15037 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
15039 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then :
15041 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
15049 GNULIB_PTHREAD_SIGMASK=0;
15051 GNULIB_SIGNAL_H_SIGPIPE=0;
15052 GNULIB_SIGPROCMASK=0;
15053 GNULIB_SIGACTION=0;
15054 HAVE_POSIX_SIGNALBLOCKING=1;
15055 HAVE_PTHREAD_SIGMASK=1;
15060 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
15062 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
15064 HAVE_SIGHANDLER_T=1;
15065 REPLACE_PTHREAD_SIGMASK=0;
15079 # Check whether --with-selinux was given.
15080 if test "${with_selinux+set}" = set; then :
15081 withval=$with_selinux;
15088 if test "$with_selinux" != no; then
15090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setfilecon" >&5
15091 $as_echo_n "checking for library containing setfilecon... " >&6; }
15092 if ${ac_cv_search_setfilecon+:} false; then :
15093 $as_echo_n "(cached) " >&6
15095 ac_func_search_save_LIBS=$LIBS
15096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15097 /* end confdefs.h. */
15099 /* Override any GCC internal prototype to avoid an error.
15100 Use char because int might match the return type of a GCC
15101 builtin and then its argument prototype would still apply. */
15105 char setfilecon ();
15109 return setfilecon ();
15114 for ac_lib in '' selinux; do
15115 if test -z "$ac_lib"; then
15116 ac_res="none required"
15119 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
15121 if ac_fn_c_try_link "$LINENO"; then :
15122 ac_cv_search_setfilecon=$ac_res
15124 rm -f core conftest.err conftest.$ac_objext \
15126 if ${ac_cv_search_setfilecon+:} false; then :
15130 if ${ac_cv_search_setfilecon+:} false; then :
15133 ac_cv_search_setfilecon=no
15135 rm conftest.$ac_ext
15136 LIBS=$ac_func_search_save_LIBS
15138 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setfilecon" >&5
15139 $as_echo "$ac_cv_search_setfilecon" >&6; }
15140 ac_res=$ac_cv_search_setfilecon
15141 if test "$ac_res" != no; then :
15142 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
15143 test "$ac_cv_search_setfilecon" = "none required" ||
15144 LIB_SELINUX=$ac_cv_search_setfilecon
15151 # Warn if SELinux is found but libselinux is absent;
15152 if test "$ac_cv_search_setfilecon" = no &&
15153 test "$host" = "$build" && test -d /selinux; then
15154 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This system supports SELinux but libselinux is missing." >&5
15155 $as_echo "$as_me: WARNING: This system supports SELinux but libselinux is missing." >&2;}
15156 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be compiled without SELinux support." >&5
15157 $as_echo "$as_me: WARNING: GNU tar will be compiled without SELinux support." >&2;}
15162 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
15163 if test "x$ac_cv_have_decl_setenv" = xyes; then :
15169 cat >>confdefs.h <<_ACEOF
15170 #define HAVE_DECL_SETENV $ac_have_decl
15178 if test $ac_cv_have_decl_setenv = no; then
15186 for ac_header in search.h
15188 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
15189 if test "x$ac_cv_header_search_h" = xyes; then :
15190 cat >>confdefs.h <<_ACEOF
15191 #define HAVE_SEARCH_H 1
15198 for ac_func in tsearch
15200 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
15201 if test "x$ac_cv_func_tsearch" = xyes; then :
15202 cat >>confdefs.h <<_ACEOF
15203 #define HAVE_TSEARCH 1
15212 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
15213 #include <signal.h>
15214 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
15215 #include <sys/types.h>
15218 if test "x$ac_cv_type_sigset_t" = xyes; then :
15220 cat >>confdefs.h <<_ACEOF
15221 #define HAVE_SIGSET_T 1
15224 gl_cv_type_sigset_t=yes
15226 gl_cv_type_sigset_t=no
15229 if test $gl_cv_type_sigset_t != yes; then
15243 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
15244 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
15245 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
15246 $as_echo_n "(cached) " >&6
15249 if test "$cross_compiling" = yes; then :
15252 # Guess yes on glibc systems.
15253 *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
15254 # Guess yes on FreeBSD >= 5.
15255 freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
15256 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
15257 # Guess yes on Mac OS X >= 10.3.
15258 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
15259 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
15260 # Guess yes on OpenBSD >= 3.9.
15261 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
15262 gl_cv_func_snprintf_retval_c99="guessing no";;
15263 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
15264 # Guess yes on Solaris >= 2.10.
15265 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
15266 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
15267 # Guess yes on AIX >= 4.
15268 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
15269 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
15270 # Guess yes on NetBSD >= 3.
15271 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
15272 gl_cv_func_snprintf_retval_c99="guessing no";;
15273 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
15274 # Guess yes on BeOS.
15275 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
15276 # If we don't know, assume the worst.
15277 *) gl_cv_func_snprintf_retval_c99="guessing no";;
15281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15282 /* end confdefs.h. */
15285 #include <string.h>
15287 # define my_snprintf snprintf
15289 # include <stdarg.h>
15290 static int my_snprintf (char *buf, int size, const char *format, ...)
15294 va_start (args, format);
15295 ret = vsnprintf (buf, size, format, args);
15300 static char buf[100];
15303 strcpy (buf, "ABCDEF");
15304 if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
15306 if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
15308 if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
15313 if ac_fn_c_try_run "$LINENO"; then :
15314 gl_cv_func_snprintf_retval_c99=yes
15316 gl_cv_func_snprintf_retval_c99=no
15318 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15319 conftest.$ac_objext conftest.beam conftest.$ac_ext
15324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
15325 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
15327 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
15328 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
15334 cat >>confdefs.h <<_ACEOF
15335 #define HAVE_DECL_SNPRINTF $ac_have_decl
15342 HAVE_DECL_STRNCASECMP=1;
15346 ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
15347 if test "x$ac_cv_have_decl_strdup" = xyes; then :
15353 cat >>confdefs.h <<_ACEOF
15354 #define HAVE_DECL_STRDUP $ac_have_decl
15358 REPLACE_STRERROR_0=0
15359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
15360 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
15361 if ${gl_cv_func_strerror_0_works+:} false; then :
15362 $as_echo_n "(cached) " >&6
15364 if test "$cross_compiling" = yes; then :
15366 # Guess yes on glibc systems.
15367 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;;
15368 # If we don't know, assume the worst.
15369 *) gl_cv_func_strerror_0_works="guessing no" ;;
15373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15374 /* end confdefs.h. */
15375 #include <string.h>
15384 str = strerror (0);
15385 if (!*str) result |= 1;
15386 if (errno) result |= 2;
15387 if (strstr (str, "nknown") || strstr (str, "ndefined"))
15394 if ac_fn_c_try_run "$LINENO"; then :
15395 gl_cv_func_strerror_0_works=yes
15397 gl_cv_func_strerror_0_works=no
15399 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15400 conftest.$ac_objext conftest.beam conftest.$ac_ext
15405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
15406 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
15407 case "$gl_cv_func_strerror_0_works" in
15410 REPLACE_STRERROR_0=1
15412 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
15428 if test $gl_cv_have_include_next = yes; then
15429 gl_cv_next_string_h='<'string.h'>'
15431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
15432 $as_echo_n "checking absolute name of <string.h>... " >&6; }
15433 if ${gl_cv_next_string_h+:} false; then :
15434 $as_echo_n "(cached) " >&6
15437 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15438 /* end confdefs.h. */
15439 #include <string.h>
15443 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15444 *) gl_absname_cpp="$ac_cpp" ;;
15449 gl_dirsep_regex='[/\\]'
15452 gl_dirsep_regex='\/'
15455 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15457 gl_header_literal_regex=`echo 'string.h' \
15458 | sed -e "$gl_make_literal_regex_sed"`
15459 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15460 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15465 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15466 sed -n "$gl_absolute_header_sed"`'"'
15470 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
15471 $as_echo "$gl_cv_next_string_h" >&6; }
15473 NEXT_STRING_H=$gl_cv_next_string_h
15475 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15476 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15477 gl_next_as_first_directive='<'string.h'>'
15479 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15480 gl_next_as_first_directive=$gl_cv_next_string_h
15482 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
15489 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
15490 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15492 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15493 if eval \${$as_gl_Symbol+:} false; then :
15494 $as_echo_n "(cached) " >&6
15496 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15497 /* end confdefs.h. */
15498 #include <string.h>
15509 if ac_fn_c_try_compile "$LINENO"; then :
15510 eval "$as_gl_Symbol=yes"
15512 eval "$as_gl_Symbol=no"
15514 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15516 eval ac_res=\$$as_gl_Symbol
15517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15518 $as_echo "$ac_res" >&6; }
15519 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15520 cat >>confdefs.h <<_ACEOF
15521 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15524 eval ac_cv_have_decl_$gl_func=yes
15543 if test $gl_cv_have_include_next = yes; then
15544 gl_cv_next_strings_h='<'strings.h'>'
15546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
15547 $as_echo_n "checking absolute name of <strings.h>... " >&6; }
15548 if ${gl_cv_next_strings_h+:} false; then :
15549 $as_echo_n "(cached) " >&6
15552 if test $ac_cv_header_strings_h = yes; then
15555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15556 /* end confdefs.h. */
15557 #include <strings.h>
15561 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15562 *) gl_absname_cpp="$ac_cpp" ;;
15567 gl_dirsep_regex='[/\\]'
15570 gl_dirsep_regex='\/'
15573 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15575 gl_header_literal_regex=`echo 'strings.h' \
15576 | sed -e "$gl_make_literal_regex_sed"`
15577 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15578 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15583 gl_cv_next_strings_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15584 sed -n "$gl_absolute_header_sed"`'"'
15586 gl_cv_next_strings_h='<'strings.h'>'
15591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
15592 $as_echo "$gl_cv_next_strings_h" >&6; }
15594 NEXT_STRINGS_H=$gl_cv_next_strings_h
15596 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15597 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15598 gl_next_as_first_directive='<'strings.h'>'
15600 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15601 gl_next_as_first_directive=$gl_cv_next_strings_h
15603 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H=$gl_next_as_first_directive
15608 if test $ac_cv_header_strings_h = yes; then
15616 for gl_func in ffs strcasecmp strncasecmp; do
15617 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
15618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
15619 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
15620 if eval \${$as_gl_Symbol+:} false; then :
15621 $as_echo_n "(cached) " >&6
15623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15624 /* end confdefs.h. */
15626 /* Minix 3.1.8 has a bug: <sys/types.h> must be included before
15628 #include <sys/types.h>
15629 #include <strings.h>
15640 if ac_fn_c_try_compile "$LINENO"; then :
15641 eval "$as_gl_Symbol=yes"
15643 eval "$as_gl_Symbol=no"
15645 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15647 eval ac_res=\$$as_gl_Symbol
15648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
15649 $as_echo "$ac_res" >&6; }
15650 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
15651 cat >>confdefs.h <<_ACEOF
15652 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
15655 eval ac_cv_have_decl_$gl_func=yes
15660 ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
15661 if test "x$ac_cv_have_decl_strndup" = xyes; then :
15667 cat >>confdefs.h <<_ACEOF
15668 #define HAVE_DECL_STRNDUP $ac_have_decl
15673 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
15674 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
15680 cat >>confdefs.h <<_ACEOF
15681 #define HAVE_DECL_STRNLEN $ac_have_decl
15686 ac_fn_c_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default"
15687 if test "x$ac_cv_have_decl_strtoumax" = xyes; then :
15693 cat >>confdefs.h <<_ACEOF
15694 #define HAVE_DECL_STRTOUMAX $ac_have_decl
15703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
15704 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
15705 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
15706 $as_echo_n "(cached) " >&6
15708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15709 /* end confdefs.h. */
15715 static struct timespec x; x.tv_sec = x.tv_nsec;
15720 if ac_fn_c_try_compile "$LINENO"; then :
15721 gl_cv_sys_struct_timespec_in_time_h=yes
15723 gl_cv_sys_struct_timespec_in_time_h=no
15725 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
15728 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
15730 TIME_H_DEFINES_STRUCT_TIMESPEC=0
15731 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
15732 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
15733 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
15734 TIME_H_DEFINES_STRUCT_TIMESPEC=1
15736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
15737 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
15738 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
15739 $as_echo_n "(cached) " >&6
15741 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15742 /* end confdefs.h. */
15743 #include <sys/time.h>
15748 static struct timespec x; x.tv_sec = x.tv_nsec;
15753 if ac_fn_c_try_compile "$LINENO"; then :
15754 gl_cv_sys_struct_timespec_in_sys_time_h=yes
15756 gl_cv_sys_struct_timespec_in_sys_time_h=no
15758 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
15761 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
15762 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
15763 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
15765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
15766 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
15767 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
15768 $as_echo_n "(cached) " >&6
15770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15771 /* end confdefs.h. */
15772 #include <pthread.h>
15777 static struct timespec x; x.tv_sec = x.tv_nsec;
15782 if ac_fn_c_try_compile "$LINENO"; then :
15783 gl_cv_sys_struct_timespec_in_pthread_h=yes
15785 gl_cv_sys_struct_timespec_in_pthread_h=no
15787 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
15790 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
15791 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
15792 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
15811 if test $gl_cv_have_include_next = yes; then
15812 gl_cv_next_time_h='<'time.h'>'
15814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
15815 $as_echo_n "checking absolute name of <time.h>... " >&6; }
15816 if ${gl_cv_next_time_h+:} false; then :
15817 $as_echo_n "(cached) " >&6
15820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15821 /* end confdefs.h. */
15826 aix*) gl_absname_cpp="$ac_cpp -C" ;;
15827 *) gl_absname_cpp="$ac_cpp" ;;
15832 gl_dirsep_regex='[/\\]'
15835 gl_dirsep_regex='\/'
15838 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
15840 gl_header_literal_regex=`echo 'time.h' \
15841 | sed -e "$gl_make_literal_regex_sed"`
15842 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
15843 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
15848 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
15849 sed -n "$gl_absolute_header_sed"`'"'
15853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
15854 $as_echo "$gl_cv_next_time_h" >&6; }
15856 NEXT_TIME_H=$gl_cv_next_time_h
15858 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
15859 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
15860 gl_next_as_first_directive='<'time.h'>'
15862 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
15863 gl_next_as_first_directive=$gl_cv_next_time_h
15865 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
15882 gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;}
15887 gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;}
15892 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;}
15899 if test "$HAVE_LIBUNISTRING" = yes; then
15900 LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"`
15901 LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"`
15902 LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"`
15907 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
15908 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
15914 cat >>confdefs.h <<_ACEOF
15915 #define HAVE_DECL_UNSETENV $ac_have_decl
15919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
15920 $as_echo_n "checking whether the utimes function works... " >&6; }
15921 if ${gl_cv_func_working_utimes+:} false; then :
15922 $as_echo_n "(cached) " >&6
15925 if test "$cross_compiling" = yes; then :
15926 gl_cv_func_working_utimes=no
15928 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15929 /* end confdefs.h. */
15931 #include <sys/types.h>
15932 #include <sys/stat.h>
15934 #include <sys/time.h>
15936 #include <unistd.h>
15937 #include <stdlib.h>
15942 inorder (time_t a, time_t b, time_t c)
15944 return a <= b && b <= c;
15951 char const *file = "conftest.utimes";
15952 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
15954 /* Test whether utimes() essentially works. */
15957 FILE *f = fopen (file, "w");
15960 else if (fclose (f) != 0)
15962 else if (utimes (file, timeval) != 0)
15964 else if (lstat (file, &sbuf) != 0)
15966 else if (!(sbuf.st_atime == timeval[0].tv_sec
15967 && sbuf.st_mtime == timeval[1].tv_sec))
15969 if (unlink (file) != 0)
15973 /* Test whether utimes() with a NULL argument sets the file's timestamp
15974 to the current time. Use 'fstat' as well as 'time' to
15975 determine the "current" time, to accommodate NFS file systems
15976 if there is a time skew between the host and the NFS server. */
15978 int fd = open (file, O_WRONLY|O_CREAT, 0644);
15984 struct stat st0, st1, st2;
15985 if (time (&t0) == (time_t) -1)
15987 else if (fstat (fd, &st0) != 0)
15989 else if (utimes (file, timeval) != 0)
15991 else if (utimes (file, NULL) != 0)
15993 else if (fstat (fd, &st1) != 0)
15995 else if (write (fd, "\n", 1) != 1)
15997 else if (fstat (fd, &st2) != 0)
15999 else if (time (&t2) == (time_t) -1)
16003 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
16004 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
16005 if (! (st1.st_atime == st1.st_mtime))
16007 if (! (m_ok_POSIX || m_ok_NFS))
16010 if (close (fd) != 0)
16013 if (unlink (file) != 0)
16017 /* Test whether utimes() with a NULL argument works on read-only files. */
16019 int fd = open (file, O_WRONLY|O_CREAT, 0444);
16022 else if (close (fd) != 0)
16024 else if (utimes (file, NULL) != 0)
16026 if (unlink (file) != 0)
16034 if ac_fn_c_try_run "$LINENO"; then :
16035 gl_cv_func_working_utimes=yes
16037 gl_cv_func_working_utimes=no
16039 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16040 conftest.$ac_objext conftest.beam conftest.$ac_ext
16044 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
16045 $as_echo "$gl_cv_func_working_utimes" >&6; }
16047 if test $gl_cv_func_working_utimes = yes; then
16049 $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
16057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
16058 $as_echo_n "checking for struct utimbuf... " >&6; }
16059 if ${gl_cv_sys_struct_utimbuf+:} false; then :
16060 $as_echo_n "(cached) " >&6
16062 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16063 /* end confdefs.h. */
16064 #if HAVE_SYS_TIME_H
16065 #include <sys/time.h>
16068 #ifdef HAVE_UTIME_H
16075 static struct utimbuf x; x.actime = x.modtime;
16080 if ac_fn_c_try_compile "$LINENO"; then :
16081 gl_cv_sys_struct_utimbuf=yes
16083 gl_cv_sys_struct_utimbuf=no
16085 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
16088 $as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
16090 if test $gl_cv_sys_struct_utimbuf = yes; then
16092 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
16108 if test $ac_cv_header_features_h = yes; then
16116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
16117 $as_echo_n "checking for inttypes.h... " >&6; }
16118 if ${gl_cv_header_inttypes_h+:} false; then :
16119 $as_echo_n "(cached) " >&6
16121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16122 /* end confdefs.h. */
16124 #include <sys/types.h>
16125 #include <inttypes.h>
16130 uintmax_t i = (uintmax_t) -1; return !i;
16135 if ac_fn_c_try_compile "$LINENO"; then :
16136 gl_cv_header_inttypes_h=yes
16138 gl_cv_header_inttypes_h=no
16140 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
16143 $as_echo "$gl_cv_header_inttypes_h" >&6; }
16144 if test $gl_cv_header_inttypes_h = yes; then
16146 cat >>confdefs.h <<_ACEOF
16147 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
16153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
16154 $as_echo_n "checking for stdint.h... " >&6; }
16155 if ${gl_cv_header_stdint_h+:} false; then :
16156 $as_echo_n "(cached) " >&6
16158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16159 /* end confdefs.h. */
16160 #include <sys/types.h>
16161 #include <stdint.h>
16165 uintmax_t i = (uintmax_t) -1; return !i;
16170 if ac_fn_c_try_compile "$LINENO"; then :
16171 gl_cv_header_stdint_h=yes
16173 gl_cv_header_stdint_h=no
16175 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
16178 $as_echo "$gl_cv_header_stdint_h" >&6; }
16179 if test $gl_cv_header_stdint_h = yes; then
16181 cat >>confdefs.h <<_ACEOF
16182 #define HAVE_STDINT_H_WITH_UINTMAX 1
16190 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
16191 $as_echo_n "checking for intmax_t... " >&6; }
16192 if ${gt_cv_c_intmax_t+:} false; then :
16193 $as_echo_n "(cached) " >&6
16195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16196 /* end confdefs.h. */
16198 #include <stddef.h>
16199 #include <stdlib.h>
16200 #if HAVE_STDINT_H_WITH_UINTMAX
16201 #include <stdint.h>
16203 #if HAVE_INTTYPES_H_WITH_UINTMAX
16204 #include <inttypes.h>
16210 intmax_t x = -1; return !x;
16215 if ac_fn_c_try_compile "$LINENO"; then :
16216 gt_cv_c_intmax_t=yes
16218 gt_cv_c_intmax_t=no
16220 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
16223 $as_echo "$gt_cv_c_intmax_t" >&6; }
16224 if test $gt_cv_c_intmax_t = yes; then
16226 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
16230 test $ac_cv_type_long_long_int = yes \
16231 && ac_type='long long' \
16234 cat >>confdefs.h <<_ACEOF
16235 #define intmax_t $ac_type
16241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
16242 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
16243 if ${gl_cv_cc_double_expbit0+:} false; then :
16244 $as_echo_n "(cached) " >&6
16247 if test "$cross_compiling" = yes; then :
16249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16250 /* end confdefs.h. */
16252 #if defined arm || defined __arm || defined __arm__
16257 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16258 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
16259 gl_cv_cc_double_expbit0="unknown"
16263 if ${ac_cv_c_bigendian+:} false; then :
16264 $as_echo_n "(cached) " >&6
16266 ac_cv_c_bigendian=unknown
16267 # See if we're dealing with a universal compiler.
16268 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16269 /* end confdefs.h. */
16270 #ifndef __APPLE_CC__
16271 not a universal capable compiler
16276 if ac_fn_c_try_compile "$LINENO"; then :
16278 # Check for potential -arch flags. It is not universal unless
16279 # there are at least two -arch flags with different values.
16282 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
16283 if test -n "$ac_prev"; then
16285 i?86 | x86_64 | ppc | ppc64)
16286 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
16289 ac_cv_c_bigendian=universal
16295 elif test "x$ac_word" = "x-arch"; then
16300 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16301 if test $ac_cv_c_bigendian = unknown; then
16302 # See if sys/param.h defines the BYTE_ORDER macro.
16303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16304 /* end confdefs.h. */
16305 #include <sys/types.h>
16306 #include <sys/param.h>
16311 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
16312 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
16314 bogus endian macros
16321 if ac_fn_c_try_compile "$LINENO"; then :
16322 # It does; now see whether it defined to BIG_ENDIAN or not.
16323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16324 /* end confdefs.h. */
16325 #include <sys/types.h>
16326 #include <sys/param.h>
16331 #if BYTE_ORDER != BIG_ENDIAN
16339 if ac_fn_c_try_compile "$LINENO"; then :
16340 ac_cv_c_bigendian=yes
16342 ac_cv_c_bigendian=no
16344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16346 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16348 if test $ac_cv_c_bigendian = unknown; then
16349 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
16350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16351 /* end confdefs.h. */
16352 #include <limits.h>
16357 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
16358 bogus endian macros
16365 if ac_fn_c_try_compile "$LINENO"; then :
16366 # It does; now see whether it defined to _BIG_ENDIAN or not.
16367 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16368 /* end confdefs.h. */
16369 #include <limits.h>
16374 #ifndef _BIG_ENDIAN
16382 if ac_fn_c_try_compile "$LINENO"; then :
16383 ac_cv_c_bigendian=yes
16385 ac_cv_c_bigendian=no
16387 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16389 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16391 if test $ac_cv_c_bigendian = unknown; then
16392 # Compile a test program.
16393 if test "$cross_compiling" = yes; then :
16394 # Try to guess by grepping values from an object file.
16395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16396 /* end confdefs.h. */
16397 short int ascii_mm[] =
16398 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
16399 short int ascii_ii[] =
16400 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
16401 int use_ascii (int i) {
16402 return ascii_mm[i] + ascii_ii[i];
16404 short int ebcdic_ii[] =
16405 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
16406 short int ebcdic_mm[] =
16407 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
16408 int use_ebcdic (int i) {
16409 return ebcdic_mm[i] + ebcdic_ii[i];
16416 return use_ascii (foo) == use_ebcdic (foo);
16421 if ac_fn_c_try_compile "$LINENO"; then :
16422 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
16423 ac_cv_c_bigendian=yes
16425 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
16426 if test "$ac_cv_c_bigendian" = unknown; then
16427 ac_cv_c_bigendian=no
16429 # finding both strings is unlikely to happen, but who knows?
16430 ac_cv_c_bigendian=unknown
16434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16437 /* end confdefs.h. */
16438 $ac_includes_default
16443 /* Are we little or big endian? From Harbison&Steele. */
16447 char c[sizeof (long int)];
16450 return u.c[sizeof (long int) - 1] == 1;
16456 if ac_fn_c_try_run "$LINENO"; then :
16457 ac_cv_c_bigendian=no
16459 ac_cv_c_bigendian=yes
16461 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16462 conftest.$ac_objext conftest.beam conftest.$ac_ext
16468 case $ac_cv_c_bigendian in #(
16470 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
16472 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
16475 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
16479 gl_cv_cc_double_expbit0="unknown" ;;
16488 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16489 /* end confdefs.h. */
16492 #include <stddef.h>
16494 #include <string.h>
16496 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
16497 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
16498 static unsigned int ored_words[NWORDS];
16499 static unsigned int anded_words[NWORDS];
16500 static void add_to_ored_words (double x)
16504 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
16505 memset (&m, 0, sizeof (memory_double));
16507 for (i = 0; i < NWORDS; i++)
16509 ored_words[i] |= m.word[i];
16510 anded_words[i] &= m.word[i];
16516 FILE *fp = fopen ("conftest.out", "w");
16519 for (j = 0; j < NWORDS; j++)
16520 anded_words[j] = ~ (unsigned int) 0;
16521 add_to_ored_words (0.25);
16522 add_to_ored_words (0.5);
16523 add_to_ored_words (1.0);
16524 add_to_ored_words (2.0);
16525 add_to_ored_words (4.0);
16526 /* Remove bits that are common (e.g. if representation of the first mantissa
16527 bit is explicit). */
16528 for (j = 0; j < NWORDS; j++)
16529 ored_words[j] &= ~anded_words[j];
16530 /* Now find the nonzero word. */
16531 for (j = 0; j < NWORDS; j++)
16532 if (ored_words[j] != 0)
16537 for (i = j + 1; i < NWORDS; i++)
16538 if (ored_words[i] != 0)
16540 fprintf (fp, "unknown");
16541 return (fclose (fp) != 0);
16544 if ((ored_words[j] >> i) & 1)
16546 fprintf (fp, "word %d bit %d", (int) j, (int) i);
16547 return (fclose (fp) != 0);
16550 fprintf (fp, "unknown");
16551 return (fclose (fp) != 0);
16555 if ac_fn_c_try_run "$LINENO"; then :
16556 gl_cv_cc_double_expbit0=`cat conftest.out`
16558 gl_cv_cc_double_expbit0="unknown"
16560 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16561 conftest.$ac_objext conftest.beam conftest.$ac_ext
16567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
16568 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
16569 case "$gl_cv_cc_double_expbit0" in
16571 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
16572 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
16574 cat >>confdefs.h <<_ACEOF
16575 #define DBL_EXPBIT0_WORD $word
16579 cat >>confdefs.h <<_ACEOF
16580 #define DBL_EXPBIT0_BIT $bit
16591 for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
16593 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
16594 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
16595 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
16596 cat >>confdefs.h <<_ACEOF
16597 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
16603 ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
16605 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
16611 cat >>confdefs.h <<_ACEOF
16612 #define HAVE_DECL__SNPRINTF $ac_have_decl
16617 case "$gl_cv_func_snprintf_retval_c99" in
16620 $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
16625 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
16626 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
16632 cat >>confdefs.h <<_ACEOF
16633 #define HAVE_DECL_VSNPRINTF $ac_have_decl
16642 GL_COND_LIBTOOL_TRUE=
16643 GL_COND_LIBTOOL_FALSE='#'
16645 GL_COND_LIBTOOL_TRUE='#'
16646 GL_COND_LIBTOOL_FALSE=
16649 gl_cond_libtool=false
16662 gl_source_base='gnu'
16665 if test $ac_cv_func_alloca_works = no; then
16669 # Define an additional variable used in the Makefile substitution.
16670 if test $ac_cv_working_alloca_h = yes; then
16671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
16672 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
16673 if ${gl_cv_rpl_alloca+:} false; then :
16674 $as_echo_n "(cached) " >&6
16677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16678 /* end confdefs.h. */
16680 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
16685 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16686 $EGREP "Need own alloca" >/dev/null 2>&1; then :
16687 gl_cv_rpl_alloca=yes
16689 gl_cv_rpl_alloca=no
16695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
16696 $as_echo "$gl_cv_rpl_alloca" >&6; }
16697 if test $gl_cv_rpl_alloca = yes; then
16699 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
16709 if test -n "$ALLOCA_H"; then
16710 GL_GENERATE_ALLOCA_H_TRUE=
16711 GL_GENERATE_ALLOCA_H_FALSE='#'
16713 GL_GENERATE_ALLOCA_H_TRUE='#'
16714 GL_GENERATE_ALLOCA_H_FALSE=
16720 cat >>confdefs.h <<_ACEOF
16721 #define GNULIB_AREADLINKAT 1
16730 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
16732 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
16738 cat >>confdefs.h <<_ACEOF
16739 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
16741 if test $ac_have_decl = 1; then :
16745 $as_echo "#define GNULIB_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
16749 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
16751 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
16757 cat >>confdefs.h <<_ACEOF
16758 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
16760 if test $ac_have_decl = 1; then :
16764 $as_echo "#define GNULIB_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
16769 # Check if program_invocation_name and program_invocation_short_name
16770 # are defined elsewhere. It is improbable that only one of them will
16771 # be defined and other not, I prefer to stay on the safe side and to
16772 # test each one separately.
16773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_name is defined" >&5
16774 $as_echo_n "checking whether program_invocation_name is defined... " >&6; }
16775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16776 /* end confdefs.h. */
16781 program_invocation_name = "test";
16786 if ac_fn_c_try_link "$LINENO"; then :
16788 $as_echo "#define HAVE_PROGRAM_INVOCATION_NAME 1" >>confdefs.h
16790 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16791 $as_echo "yes" >&6; }
16793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16794 $as_echo "no" >&6; }
16796 rm -f core conftest.err conftest.$ac_objext \
16797 conftest$ac_exeext conftest.$ac_ext
16799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether program_invocation_short_name is defined" >&5
16800 $as_echo_n "checking whether program_invocation_short_name is defined... " >&6; }
16801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16802 /* end confdefs.h. */
16807 program_invocation_short_name = "test";
16812 if ac_fn_c_try_link "$LINENO"; then :
16814 $as_echo "#define HAVE_PROGRAM_INVOCATION_SHORT_NAME 1" >>confdefs.h
16816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
16817 $as_echo "yes" >&6; }
16819 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16820 $as_echo "no" >&6; }
16822 rm -f core conftest.err conftest.$ac_objext \
16823 conftest$ac_exeext conftest.$ac_ext
16843 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_error:2:c-format"
16847 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=argp_failure:4:c-format"
16857 gl_LIBOBJS="$gl_LIBOBJS openat-proc.$ac_objext"
16870 if test $ac_cv_func_btowc = no; then
16877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
16878 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
16879 if ${gl_cv_func_btowc_nul+:} false; then :
16880 $as_echo_n "(cached) " >&6
16883 if test "$cross_compiling" = yes; then :
16886 # Guess no on Cygwin.
16887 cygwin*) gl_cv_func_btowc_nul="guessing no" ;;
16888 # Guess yes otherwise.
16889 *) gl_cv_func_btowc_nul="guessing yes" ;;
16893 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16894 /* end confdefs.h. */
16896 #include <string.h>
16897 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16899 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16900 included before <wchar.h>. */
16901 #include <stddef.h>
16907 if (btowc ('\0') != 0)
16912 if ac_fn_c_try_run "$LINENO"; then :
16913 gl_cv_func_btowc_nul=yes
16915 gl_cv_func_btowc_nul=no
16917 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16918 conftest.$ac_objext conftest.beam conftest.$ac_ext
16923 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
16924 $as_echo "$gl_cv_func_btowc_nul" >&6; }
16926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
16927 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
16928 if ${gl_cv_func_btowc_eof+:} false; then :
16929 $as_echo_n "(cached) " >&6
16933 # Guess no on IRIX.
16934 irix*) gl_cv_func_btowc_eof="guessing no" ;;
16935 # Guess yes otherwise.
16936 *) gl_cv_func_btowc_eof="guessing yes" ;;
16938 if test $LOCALE_FR != none; then
16939 if test "$cross_compiling" = yes; then :
16942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16943 /* end confdefs.h. */
16945 #include <locale.h>
16946 #include <string.h>
16947 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
16949 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
16950 included before <wchar.h>. */
16951 #include <stddef.h>
16957 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
16959 if (btowc (EOF) != WEOF)
16965 if ac_fn_c_try_run "$LINENO"; then :
16966 gl_cv_func_btowc_eof=yes
16968 gl_cv_func_btowc_eof=no
16970 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16971 conftest.$ac_objext conftest.beam conftest.$ac_ext
16977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
16978 $as_echo "$gl_cv_func_btowc_eof" >&6; }
16980 case "$gl_cv_func_btowc_nul" in
16982 *) REPLACE_BTOWC=1 ;;
16984 case "$gl_cv_func_btowc_eof" in
16986 *) REPLACE_BTOWC=1 ;;
16990 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then
16999 gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext"
17016 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
17023 if test $ac_cv_func_canonicalize_file_name = no; then
17024 HAVE_CANONICALIZE_FILE_NAME=0
17025 if test $ac_cv_func_realpath = no; then
17028 case "$gl_cv_func_realpath_works" in
17030 *) REPLACE_REALPATH=1 ;;
17034 case "$gl_cv_func_realpath_works" in
17038 REPLACE_CANONICALIZE_FILE_NAME=1
17044 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
17053 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
17058 cat >>confdefs.h <<_ACEOF
17059 #define GNULIB_CANONICALIZE_LGPL 1
17068 GNULIB_CANONICALIZE_FILE_NAME=1
17074 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
17089 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
17105 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
17111 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5
17112 $as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; }
17113 if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then :
17114 $as_echo_n "(cached) " >&6
17116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17117 /* end confdefs.h. */
17119 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
17121 # include <unistd.h>
17123 #include <limits.h>
17124 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
17125 # include <sys/param.h>
17127 #if !defined PATH_MAX && defined MAXPATHLEN
17128 # define PATH_MAX MAXPATHLEN
17132 # define PATH_MAX 1024
17134 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
17136 # define PATH_MAX 260
17140 have_arbitrary_file_name_length_limit
17143 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17144 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then :
17145 gl_cv_have_arbitrary_file_name_length_limit=yes
17147 gl_cv_have_arbitrary_file_name_length_limit=no
17152 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5
17153 $as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; }
17155 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then
17164 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext"
17169 if test $HAVE_CHOWN = 0 || test $REPLACE_CHOWN = 1; then
17178 gl_LIBOBJS="$gl_LIBOBJS chown.$ac_objext"
17181 if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no; then
17190 gl_LIBOBJS="$gl_LIBOBJS fchown-stub.$ac_objext"
17204 $as_echo "#define GNULIB_TEST_CHOWN 1" >>confdefs.h
17211 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
17212 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
17214 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
17215 # programs in the package would end up linked with that potentially-shared
17216 # library, inducing unnecessary run-time overhead.
17219 gl_saved_libs=$LIBS
17220 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
17221 $as_echo_n "checking for library containing clock_gettime... " >&6; }
17222 if ${ac_cv_search_clock_gettime+:} false; then :
17223 $as_echo_n "(cached) " >&6
17225 ac_func_search_save_LIBS=$LIBS
17226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17227 /* end confdefs.h. */
17229 /* Override any GCC internal prototype to avoid an error.
17230 Use char because int might match the return type of a GCC
17231 builtin and then its argument prototype would still apply. */
17235 char clock_gettime ();
17239 return clock_gettime ();
17244 for ac_lib in '' rt posix4; do
17245 if test -z "$ac_lib"; then
17246 ac_res="none required"
17249 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
17251 if ac_fn_c_try_link "$LINENO"; then :
17252 ac_cv_search_clock_gettime=$ac_res
17254 rm -f core conftest.err conftest.$ac_objext \
17256 if ${ac_cv_search_clock_gettime+:} false; then :
17260 if ${ac_cv_search_clock_gettime+:} false; then :
17263 ac_cv_search_clock_gettime=no
17265 rm conftest.$ac_ext
17266 LIBS=$ac_func_search_save_LIBS
17268 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
17269 $as_echo "$ac_cv_search_clock_gettime" >&6; }
17270 ac_res=$ac_cv_search_clock_gettime
17271 if test "$ac_res" != no; then :
17272 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
17273 test "$ac_cv_search_clock_gettime" = "none required" ||
17274 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
17277 for ac_func in clock_gettime clock_settime
17279 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
17280 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
17281 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
17282 cat >>confdefs.h <<_ACEOF
17283 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
17289 LIBS=$gl_saved_libs
17293 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
17299 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17307 if test $ac_cv_header_sys_socket_h != yes; then
17308 for ac_header in winsock2.h
17310 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
17311 if test "x$ac_cv_header_winsock2_h" = xyes; then :
17312 cat >>confdefs.h <<_ACEOF
17313 #define HAVE_WINSOCK2_H 1
17321 if test "$ac_cv_header_winsock2_h" = yes; then
17323 UNISTD_H_HAVE_WINSOCK2_H=1
17324 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
17330 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
17335 if test $REPLACE_CLOSE = 0; then
17339 if test $ac_cv_func_fchdir = no; then
17343 if test $HAVE_FCHDIR = 0; then
17349 if test $REPLACE_CLOSE = 1; then
17358 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
17372 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
17381 cat >>confdefs.h <<_ACEOF
17382 #define GNULIB_CLOSE_STREAM 1
17389 for ac_func in closedir
17391 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
17392 if test "x$ac_cv_func_closedir" = xyes; then :
17393 cat >>confdefs.h <<_ACEOF
17394 #define HAVE_CLOSEDIR 1
17400 if test $ac_cv_func_closedir = no; then
17407 if test $ac_cv_func_fchdir = no; then
17411 if test $HAVE_FCHDIR = 0; then
17412 if test $HAVE_CLOSEDIR = 1; then
17418 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
17427 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
17441 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
17449 if test "x$datarootdir" = x; then
17450 datarootdir='${datadir}'
17453 if test "x$docdir" = x; then
17454 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
17457 if test "x$htmldir" = x; then
17458 htmldir='${docdir}'
17461 if test "x$dvidir" = x; then
17465 if test "x$pdfdir" = x; then
17469 if test "x$psdir" = x; then
17473 if test "x$lispdir" = x; then
17474 lispdir='${datarootdir}/emacs/site-lisp'
17477 if test "x$localedir" = x; then
17478 localedir='${datarootdir}/locale'
17482 pkglibexecdir='${libexecdir}/${PACKAGE}'
17485 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
17486 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
17487 if ${gl_cv_struct_dirent_d_ino+:} false; then :
17488 $as_echo_n "(cached) " >&6
17490 if test "$cross_compiling" = yes; then :
17492 # Guess yes on glibc systems with Linux kernel.
17493 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;;
17494 # If we don't know, assume the worst.
17495 *) gl_cv_struct_dirent_d_ino="guessing no" ;;
17499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17500 /* end confdefs.h. */
17501 #include <sys/types.h>
17502 #include <sys/stat.h>
17503 #include <dirent.h>
17508 DIR *dp = opendir (".");
17516 if (stat (e->d_name, &st) != 0)
17518 if (e->d_ino != st.st_ino)
17526 if ac_fn_c_try_run "$LINENO"; then :
17527 gl_cv_struct_dirent_d_ino=yes
17529 gl_cv_struct_dirent_d_ino=no
17531 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17532 conftest.$ac_objext conftest.beam conftest.$ac_ext
17536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
17537 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
17538 case "$gl_cv_struct_dirent_d_ino" in
17541 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
17559 if test $gl_cv_have_include_next = yes; then
17560 gl_cv_next_dirent_h='<'dirent.h'>'
17562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
17563 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
17564 if ${gl_cv_next_dirent_h+:} false; then :
17565 $as_echo_n "(cached) " >&6
17568 if test $ac_cv_header_dirent_h = yes; then
17571 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17572 /* end confdefs.h. */
17573 #include <dirent.h>
17577 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17578 *) gl_absname_cpp="$ac_cpp" ;;
17583 gl_dirsep_regex='[/\\]'
17586 gl_dirsep_regex='\/'
17589 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17591 gl_header_literal_regex=`echo 'dirent.h' \
17592 | sed -e "$gl_make_literal_regex_sed"`
17593 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17594 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17599 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17600 sed -n "$gl_absolute_header_sed"`'"'
17602 gl_cv_next_dirent_h='<'dirent.h'>'
17607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
17608 $as_echo "$gl_cv_next_dirent_h" >&6; }
17610 NEXT_DIRENT_H=$gl_cv_next_dirent_h
17612 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17613 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17614 gl_next_as_first_directive='<'dirent.h'>'
17616 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17617 gl_next_as_first_directive=$gl_cv_next_dirent_h
17619 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
17624 if test $ac_cv_header_dirent_h = yes; then
17632 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
17633 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17635 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17636 if eval \${$as_gl_Symbol+:} false; then :
17637 $as_echo_n "(cached) " >&6
17639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17640 /* end confdefs.h. */
17641 #include <dirent.h>
17652 if ac_fn_c_try_compile "$LINENO"; then :
17653 eval "$as_gl_Symbol=yes"
17655 eval "$as_gl_Symbol=no"
17657 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17659 eval ac_res=\$$as_gl_Symbol
17660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17661 $as_echo "$ac_res" >&6; }
17662 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
17663 cat >>confdefs.h <<_ACEOF
17664 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17667 eval ac_cv_have_decl_$gl_func=yes
17677 cat >>confdefs.h <<_ACEOF
17678 #define GNULIB_DIRENT_SAFER 1
17687 for ac_func in dirfd
17689 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
17690 if test "x$ac_cv_func_dirfd" = xyes; then :
17691 cat >>confdefs.h <<_ACEOF
17692 #define HAVE_DIRFD 1
17698 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
17699 #include <dirent.h>
17701 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
17707 cat >>confdefs.h <<_ACEOF
17708 #define HAVE_DECL_DIRFD $ac_have_decl
17711 if test $ac_cv_have_decl_dirfd = no; then
17715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
17716 $as_echo_n "checking whether dirfd is a macro... " >&6; }
17717 if ${gl_cv_func_dirfd_macro+:} false; then :
17718 $as_echo_n "(cached) " >&6
17720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17721 /* end confdefs.h. */
17723 #include <sys/types.h>
17724 #include <dirent.h>
17726 dirent_header_defines_dirfd
17729 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17730 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
17731 gl_cv_func_dirfd_macro=yes
17733 gl_cv_func_dirfd_macro=no
17738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
17739 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
17741 # Use the replacement only if we have no function or macro with that name.
17742 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
17743 if test $ac_cv_have_decl_dirfd = yes; then
17744 # If the system declares dirfd already, let's declare rpl_dirfd instead.
17749 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
17758 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
17761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
17762 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
17763 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
17764 $as_echo_n "(cached) " >&6
17767 dirfd_save_CFLAGS=$CFLAGS
17768 for ac_expr in d_fd dd_fd; do
17770 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
17771 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17772 /* end confdefs.h. */
17774 #include <sys/types.h>
17775 #include <dirent.h>
17779 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
17784 if ac_fn_c_try_compile "$LINENO"; then :
17788 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17789 CFLAGS=$dirfd_save_CFLAGS
17790 test "$dir_fd_found" = yes && break
17792 test "$dir_fd_found" = yes || ac_expr=no_such_member
17794 gl_cv_sys_dir_fd_member_name=$ac_expr
17798 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
17799 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
17800 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
17802 cat >>confdefs.h <<_ACEOF
17803 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
17821 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
17830 cat >>confdefs.h <<_ACEOF
17831 #define GNULIB_DIRNAME 1
17841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
17842 $as_echo_n "checking whether // is distinct from /... " >&6; }
17843 if ${gl_cv_double_slash_root+:} false; then :
17844 $as_echo_n "(cached) " >&6
17846 if test x"$cross_compiling" = xyes ; then
17847 # When cross-compiling, there is no way to tell whether // is special
17848 # short of a list of hosts. However, the only known hosts to date
17849 # that have a distinct // are Apollo DomainOS (too old to port to),
17850 # Cygwin, and z/OS. If anyone knows of another system for which // has
17851 # special semantics and is distinct from /, please report it to
17852 # <bug-gnulib@gnu.org>.
17854 *-cygwin | i370-ibm-openedition)
17855 gl_cv_double_slash_root=yes ;;
17857 # Be optimistic and assume that / and // are the same when we
17859 gl_cv_double_slash_root='unknown, assuming no' ;;
17862 set x `ls -di / // 2>/dev/null`
17863 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
17864 gl_cv_double_slash_root=no
17866 gl_cv_double_slash_root=yes
17870 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
17871 $as_echo "$gl_cv_double_slash_root" >&6; }
17872 if test "$gl_cv_double_slash_root" = yes; then
17874 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
17881 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
17888 if test $ac_cv_func_fchdir = no; then
17892 if test $HAVE_FCHDIR = 0; then
17897 if test $REPLACE_DUP = 1; then
17906 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext"
17921 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
17930 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
17933 if test $HAVE_DUP2 = 1; then
17934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
17935 $as_echo_n "checking whether dup2 works... " >&6; }
17936 if ${gl_cv_func_dup2_works+:} false; then :
17937 $as_echo_n "(cached) " >&6
17939 if test "$cross_compiling" = yes; then :
17941 mingw*) # on this platform, dup2 always returns 0 for success
17942 gl_cv_func_dup2_works="guessing no" ;;
17943 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
17944 gl_cv_func_dup2_works="guessing no" ;;
17945 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
17946 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
17947 gl_cv_func_dup2_works="guessing no" ;;
17948 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
17949 gl_cv_func_dup2_works="guessing no" ;;
17950 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
17951 gl_cv_func_dup2_works="guessing no" ;;
17952 *) gl_cv_func_dup2_works="guessing yes" ;;
17955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17956 /* end confdefs.h. */
17958 #include <unistd.h>
17966 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
17969 if (dup2 (1, 1) == 0)
17972 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
17976 if (dup2 (0, 0) != -1)
17978 /* Many gnulib modules require POSIX conformance of EBADF. */
17979 if (dup2 (2, 1000000) == -1 && errno != EBADF)
17981 /* Flush out a cygwin core dump. */
17982 if (dup2 (2, -1) != -1 || errno != EBADF)
17991 if ac_fn_c_try_run "$LINENO"; then :
17992 gl_cv_func_dup2_works=yes
17994 gl_cv_func_dup2_works=no
17996 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17997 conftest.$ac_objext conftest.beam conftest.$ac_ext
18002 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
18003 $as_echo "$gl_cv_func_dup2_works" >&6; }
18004 case "$gl_cv_func_dup2_works" in
18015 if test $ac_cv_func_fchdir = no; then
18019 if test $HAVE_FCHDIR = 0; then
18020 if test $HAVE_DUP2 = 1; then
18026 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
18035 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
18050 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
18066 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
18072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
18073 $as_echo_n "checking for error_at_line... " >&6; }
18074 if ${ac_cv_lib_error_at_line+:} false; then :
18075 $as_echo_n "(cached) " >&6
18077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18078 /* end confdefs.h. */
18083 error_at_line (0, 0, "", 0, "an error occurred");
18088 if ac_fn_c_try_link "$LINENO"; then :
18089 ac_cv_lib_error_at_line=yes
18091 ac_cv_lib_error_at_line=no
18093 rm -f core conftest.err conftest.$ac_objext \
18094 conftest$ac_exeext conftest.$ac_ext
18096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
18097 $as_echo "$ac_cv_lib_error_at_line" >&6; }
18099 if test $ac_cv_lib_error_at_line = no; then
18108 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
18117 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format"
18121 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format"
18129 if test $ac_cv_have_decl_fchdir = no; then
18134 if test $HAVE_FCHDIR = 0; then
18143 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext"
18147 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
18149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
18150 $as_echo_n "checking whether open can visit directories... " >&6; }
18151 if ${gl_cv_func_open_directory_works+:} false; then :
18152 $as_echo_n "(cached) " >&6
18154 if test "$cross_compiling" = yes; then :
18156 # Guess yes on glibc systems.
18157 *-gnu*) gl_cv_func_open_directory_works="guessing yes" ;;
18158 # If we don't know, assume the worst.
18159 *) gl_cv_func_open_directory_works="guessing no" ;;
18163 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18164 /* end confdefs.h. */
18170 return open(".", O_RDONLY) < 0;
18175 if ac_fn_c_try_run "$LINENO"; then :
18176 gl_cv_func_open_directory_works=yes
18178 gl_cv_func_open_directory_works=no
18180 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18181 conftest.$ac_objext conftest.beam conftest.$ac_ext
18185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
18186 $as_echo "$gl_cv_func_open_directory_works" >&6; }
18187 case "$gl_cv_func_open_directory_works" in
18191 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
18208 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
18216 if test $ac_cv_func_fchmodat != yes; then
18220 if test $HAVE_FCHMODAT = 0; then
18229 gl_LIBOBJS="$gl_LIBOBJS fchmodat.$ac_objext"
18234 cat >>confdefs.h <<_ACEOF
18235 #define GNULIB_FCHMODAT 1
18249 $as_echo "#define GNULIB_TEST_FCHMODAT 1" >>confdefs.h
18257 ac_fn_c_check_func "$LINENO" "fchownat" "ac_cv_func_fchownat"
18258 if test "x$ac_cv_func_fchownat" = xyes; then :
18262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with AT_SYMLINK_NOFOLLOW" >&5
18263 $as_echo_n "checking whether fchownat works with AT_SYMLINK_NOFOLLOW... " >&6; }
18264 if ${gl_cv_func_fchownat_nofollow_works+:} false; then :
18265 $as_echo_n "(cached) " >&6
18268 gl_dangle=conftest.dangle
18269 # Remove any remnants of a previous test.
18271 # Arrange for deletion of the temporary file this test creates.
18272 ac_clean_files="$ac_clean_files $gl_dangle"
18273 ln -s conftest.no-such $gl_dangle
18274 if test "$cross_compiling" = yes; then :
18275 gl_cv_func_fchownat_nofollow_works=no
18277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18278 /* end confdefs.h. */
18281 #include <unistd.h>
18282 #include <stdlib.h>
18284 #include <sys/types.h>
18288 return (fchownat (AT_FDCWD, "$gl_dangle", -1, getgid (),
18289 AT_SYMLINK_NOFOLLOW) != 0
18290 && errno == ENOENT);
18294 if ac_fn_c_try_run "$LINENO"; then :
18295 gl_cv_func_fchownat_nofollow_works=yes
18297 gl_cv_func_fchownat_nofollow_works=no
18299 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18300 conftest.$ac_objext conftest.beam conftest.$ac_ext
18305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_nofollow_works" >&5
18306 $as_echo "$gl_cv_func_fchownat_nofollow_works" >&6; }
18307 if test $gl_cv_func_fchownat_nofollow_works = no; then :
18310 $as_echo "#define FCHOWNAT_NOFOLLOW_BUG 1" >>confdefs.h
18318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fchownat works with an empty file name" >&5
18319 $as_echo_n "checking whether fchownat works with an empty file name... " >&6; }
18320 if ${gl_cv_func_fchownat_empty_filename_works+:} false; then :
18321 $as_echo_n "(cached) " >&6
18323 if test "$cross_compiling" = yes; then :
18324 gl_cv_func_fchownat_empty_filename_works="guessing no"
18326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18327 /* end confdefs.h. */
18328 #include <unistd.h>
18336 if (mkdir ("conftestdir", 0700) < 0)
18338 fd = open ("conftestdir", O_RDONLY);
18341 ret = fchownat (fd, "", -1, -1, 0);
18343 rmdir ("conftestdir");
18350 if ac_fn_c_try_run "$LINENO"; then :
18351 gl_cv_func_fchownat_empty_filename_works=yes
18353 gl_cv_func_fchownat_empty_filename_works=no
18355 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18356 conftest.$ac_objext conftest.beam conftest.$ac_ext
18361 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fchownat_empty_filename_works" >&5
18362 $as_echo "$gl_cv_func_fchownat_empty_filename_works" >&6; }
18363 if test "$gl_cv_func_fchownat_empty_filename_works" != yes; then :
18366 $as_echo "#define FCHOWNAT_EMPTY_FILENAME_BUG 1" >>confdefs.h
18371 if test $REPLACE_CHOWN = 1; then
18379 if test $HAVE_FCHOWNAT = 0 || test $REPLACE_FCHOWNAT = 1; then
18388 gl_LIBOBJS="$gl_LIBOBJS fchownat.$ac_objext"
18393 cat >>confdefs.h <<_ACEOF
18394 #define GNULIB_FCHOWNAT 1
18408 $as_echo "#define GNULIB_TEST_FCHOWNAT 1" >>confdefs.h
18417 if test $ac_cv_func_fcntl = no; then
18421 if test $ac_cv_func_fcntl = no; then
18428 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
18429 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
18430 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
18431 $as_echo_n "(cached) " >&6
18433 if test "$cross_compiling" = yes; then :
18434 # Guess that it works on glibc systems
18435 case $host_os in #((
18436 *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
18437 *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
18440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18441 /* end confdefs.h. */
18450 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
18451 if (errno != EINVAL) result |= 2;
18458 if ac_fn_c_try_run "$LINENO"; then :
18459 gl_cv_func_fcntl_f_dupfd_works=yes
18461 gl_cv_func_fcntl_f_dupfd_works=no
18463 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18464 conftest.$ac_objext conftest.beam conftest.$ac_ext
18468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
18469 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
18470 case $gl_cv_func_fcntl_f_dupfd_works in
18475 if test $ac_cv_func_fcntl = no; then
18482 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
18486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
18487 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
18488 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
18489 $as_echo_n "(cached) " >&6
18491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18492 /* end confdefs.h. */
18495 #ifndef F_DUPFD_CLOEXEC
18507 if ac_fn_c_try_compile "$LINENO"; then :
18508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18509 /* end confdefs.h. */
18512 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
18513 it to support the semantics on older kernels that failed with EINVAL. */
18525 if ac_fn_c_try_compile "$LINENO"; then :
18526 gl_cv_func_fcntl_f_dupfd_cloexec=yes
18528 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
18530 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18532 gl_cv_func_fcntl_f_dupfd_cloexec=no
18534 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
18537 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
18538 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
18542 if test $ac_cv_func_fcntl = no; then
18554 if test $ac_cv_func_fchdir = no; then
18558 if test $HAVE_FCHDIR = 0; then
18562 if test $ac_cv_func_fcntl = no; then
18571 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
18580 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
18594 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
18609 if test $gl_cv_have_include_next = yes; then
18610 gl_cv_next_fcntl_h='<'fcntl.h'>'
18612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
18613 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
18614 if ${gl_cv_next_fcntl_h+:} false; then :
18615 $as_echo_n "(cached) " >&6
18618 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18619 /* end confdefs.h. */
18624 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18625 *) gl_absname_cpp="$ac_cpp" ;;
18630 gl_dirsep_regex='[/\\]'
18633 gl_dirsep_regex='\/'
18636 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18638 gl_header_literal_regex=`echo 'fcntl.h' \
18639 | sed -e "$gl_make_literal_regex_sed"`
18640 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18641 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18646 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18647 sed -n "$gl_absolute_header_sed"`'"'
18651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
18652 $as_echo "$gl_cv_next_fcntl_h" >&6; }
18654 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
18656 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18657 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18658 gl_next_as_first_directive='<'fcntl.h'>'
18660 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18661 gl_next_as_first_directive=$gl_cv_next_fcntl_h
18663 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
18674 for gl_func in fcntl openat; do
18675 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18677 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18678 if eval \${$as_gl_Symbol+:} false; then :
18679 $as_echo_n "(cached) " >&6
18681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18682 /* end confdefs.h. */
18694 if ac_fn_c_try_compile "$LINENO"; then :
18695 eval "$as_gl_Symbol=yes"
18697 eval "$as_gl_Symbol=no"
18699 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18701 eval ac_res=\$$as_gl_Symbol
18702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18703 $as_echo "$ac_res" >&6; }
18704 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18705 cat >>confdefs.h <<_ACEOF
18706 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18709 eval ac_cv_have_decl_$gl_func=yes
18719 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
18720 #include <dirent.h>
18723 if test "x$ac_cv_have_decl_fdopendir" = xyes; then :
18729 cat >>confdefs.h <<_ACEOF
18730 #define HAVE_DECL_FDOPENDIR $ac_have_decl
18732 if test $ac_have_decl = 1; then :
18735 HAVE_DECL_FDOPENDIR=0
18739 if test $ac_cv_func_fdopendir = no; then
18742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
18743 $as_echo_n "checking whether fdopendir works... " >&6; }
18744 if ${gl_cv_func_fdopendir_works+:} false; then :
18745 $as_echo_n "(cached) " >&6
18747 if test "$cross_compiling" = yes; then :
18749 # Guess yes on glibc systems.
18750 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;;
18751 # If we don't know, assume the worst.
18752 *) gl_cv_func_fdopendir_works="guessing no" ;;
18756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18757 /* end confdefs.h. */
18759 #include <dirent.h>
18761 #include <unistd.h>
18762 #if !HAVE_DECL_FDOPENDIR
18764 # ifdef __cplusplus
18767 DIR *fdopendir (int);
18774 int fd = open ("conftest.c", O_RDONLY);
18775 if (fd < 0) result |= 1;
18776 if (fdopendir (fd)) result |= 2;
18777 if (close (fd)) result |= 4;
18783 if ac_fn_c_try_run "$LINENO"; then :
18784 gl_cv_func_fdopendir_works=yes
18786 gl_cv_func_fdopendir_works=no
18788 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18789 conftest.$ac_objext conftest.beam conftest.$ac_ext
18793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
18794 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
18795 case "$gl_cv_func_fdopendir_works" in
18798 REPLACE_FDOPENDIR=1
18803 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then
18812 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext"
18826 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
18832 cat >>confdefs.h <<_ACEOF
18833 #define GNULIB_FDOPENDIR 1
18839 cat >>confdefs.h <<_ACEOF
18840 #define GNULIB_FDUTIMENSAT 1
18846 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
18847 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
18849 cat >>confdefs.h <<_ACEOF
18850 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
18854 $as_echo "#define HAVE_ST_BLOCKS 1" >>confdefs.h
18863 if test $ac_cv_member_struct_stat_st_blocks = no; then
18872 gl_LIBOBJS="$gl_LIBOBJS fileblocks.$ac_objext"
18886 REPLACE_FLOAT_LDBL=0
18888 aix* | beos* | openbsd* | mirbsd* | irix*)
18892 case "$host_cpu" in
18897 # On x86_64 systems, the C compiler may still be generating
18899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18900 /* end confdefs.h. */
18901 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
18905 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18906 $EGREP "yes" >/dev/null 2>&1; then :
18917 case "$host_cpu" in
18925 aix* | freebsd* | linux*)
18926 if test -n "$FLOAT_H"; then
18927 REPLACE_FLOAT_LDBL=1
18933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
18934 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
18935 if ${gl_cv_func_itold_works+:} false; then :
18936 $as_echo_n "(cached) " >&6
18939 if test "$cross_compiling" = yes; then :
18942 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18943 /* end confdefs.h. */
18944 #if defined __LP64__ || defined __arch64__
18948 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18949 $EGREP "yes" >/dev/null 2>&1; then :
18950 gl_cv_func_itold_works="guessing no"
18952 gl_cv_func_itold_works="guessing yes"
18957 *) gl_cv_func_itold_works="guessing yes" ;;
18961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18962 /* end confdefs.h. */
18965 volatile long double ld;
18974 if ac_fn_c_try_run "$LINENO"; then :
18975 gl_cv_func_itold_works=yes
18977 gl_cv_func_itold_works=no
18979 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18980 conftest.$ac_objext conftest.beam conftest.$ac_ext
18985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
18986 $as_echo "$gl_cv_func_itold_works" >&6; }
18987 case "$gl_cv_func_itold_works" in
18994 if test -n "$FLOAT_H"; then
19003 if test $gl_cv_have_include_next = yes; then
19004 gl_cv_next_float_h='<'float.h'>'
19006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
19007 $as_echo_n "checking absolute name of <float.h>... " >&6; }
19008 if ${gl_cv_next_float_h+:} false; then :
19009 $as_echo_n "(cached) " >&6
19012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19013 /* end confdefs.h. */
19018 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19019 *) gl_absname_cpp="$ac_cpp" ;;
19024 gl_dirsep_regex='[/\\]'
19027 gl_dirsep_regex='\/'
19030 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19032 gl_header_literal_regex=`echo 'float.h' \
19033 | sed -e "$gl_make_literal_regex_sed"`
19034 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19035 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19040 gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19041 sed -n "$gl_absolute_header_sed"`'"'
19045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
19046 $as_echo "$gl_cv_next_float_h" >&6; }
19048 NEXT_FLOAT_H=$gl_cv_next_float_h
19050 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19051 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19052 gl_next_as_first_directive='<'float.h'>'
19054 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19055 gl_next_as_first_directive=$gl_cv_next_float_h
19057 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
19064 if test -n "$FLOAT_H"; then
19065 GL_GENERATE_FLOAT_H_TRUE=
19066 GL_GENERATE_FLOAT_H_FALSE='#'
19068 GL_GENERATE_FLOAT_H_TRUE='#'
19069 GL_GENERATE_FLOAT_H_FALSE=
19074 if test $REPLACE_FLOAT_LDBL = 1; then
19083 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
19086 if test $REPLACE_ITOLD = 1; then
19095 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
19104 gl_fnmatch_required_lowercase=`
19105 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
19107 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
19108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
19109 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
19110 if eval \${$gl_fnmatch_cache_var+:} false; then :
19111 $as_echo_n "(cached) " >&6
19113 if test $gl_fnmatch_required = GNU; then
19114 gl_fnmatch_gnu_start=
19115 gl_fnmatch_gnu_end=
19117 gl_fnmatch_gnu_start='#if 0'
19118 gl_fnmatch_gnu_end='#endif'
19120 if test "$cross_compiling" = yes; then :
19121 eval "$gl_fnmatch_cache_var=\"guessing no\""
19123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19124 /* end confdefs.h. */
19125 #include <fnmatch.h>
19127 y (char const *pattern, char const *string, int flags)
19129 return fnmatch (pattern, string, flags) == 0;
19132 n (char const *pattern, char const *string, int flags)
19134 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
19140 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
19141 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
19142 static char const A_1[] = { 'A' - 1, 0 };
19143 static char const A01[] = { 'A' + 1, 0 };
19144 static char const a_1[] = { 'a' - 1, 0 };
19145 static char const a01[] = { 'a' + 1, 0 };
19146 static char const bs_1[] = { '\\\\' - 1, 0 };
19147 static char const bs01[] = { '\\\\' + 1, 0 };
19149 if (!n ("a*", "", 0))
19151 if (!y ("a*", "abc", 0))
19153 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
19155 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
19157 if (!y ("a\\\\bc", "abc", 0))
19159 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
19161 if (!y ("*x", ".x", 0))
19163 if (!n ("*x", ".x", FNM_PERIOD))
19165 if (!y (Apat, "\\\\", 0))
19167 if (!y (Apat, "A", 0))
19169 if (!y (apat, "\\\\", 0))
19171 if (!y (apat, "a", 0))
19173 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
19175 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
19177 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
19179 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
19181 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
19183 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
19185 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
19187 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
19189 $gl_fnmatch_gnu_start
19190 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
19192 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
19194 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
19196 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
19198 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
19200 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
19202 $gl_fnmatch_gnu_end
19209 if ac_fn_c_try_run "$LINENO"; then :
19210 eval "$gl_fnmatch_cache_var=yes"
19212 eval "$gl_fnmatch_cache_var=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 eval ac_res=\$$gl_fnmatch_cache_var
19221 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19222 $as_echo "$ac_res" >&6; }
19223 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
19224 if test "$gl_fnmatch_result" = yes; then
19225 rm -f "$gl_source_base/fnmatch.h"
19227 FNMATCH_H=fnmatch.h
19230 if test -n "$FNMATCH_H"; then
19231 GL_GENERATE_FNMATCH_H_TRUE=
19232 GL_GENERATE_FNMATCH_H_FALSE='#'
19234 GL_GENERATE_FNMATCH_H_TRUE='#'
19235 GL_GENERATE_FNMATCH_H_FALSE=
19239 if test -n "$FNMATCH_H"; then
19248 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
19252 cat >>confdefs.h <<_ACEOF
19253 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
19257 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
19259 if test "x$ac_cv_have_decl_isblank" = xyes; then :
19265 cat >>confdefs.h <<_ACEOF
19266 #define HAVE_DECL_ISBLANK $ac_have_decl
19278 if test -n "$FNMATCH_H"; then
19287 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext"
19291 cat >>confdefs.h <<_ACEOF
19292 #define fnmatch ${gl_fnmatch_required_lowercase}_fnmatch
19296 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
19298 if test "x$ac_cv_have_decl_isblank" = xyes; then :
19304 cat >>confdefs.h <<_ACEOF
19305 #define HAVE_DECL_ISBLANK $ac_have_decl
19316 # include <stdio.h>
19317 # if HAVE_STDIO_EXT_H
19318 # include <stdio_ext.h>
19321 ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers
19323 if test "x$ac_cv_have_decl___fpending" = xyes; then :
19329 cat >>confdefs.h <<_ACEOF
19330 #define HAVE_DECL___FPENDING $ac_have_decl
19334 if test $ac_cv_func___fpending = no; then
19343 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext"
19346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5
19347 $as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; }
19348 if ${ac_cv_sys_pending_output_n_bytes+:} false; then :
19349 $as_echo_n "(cached) " >&6
19355 'fp->_IO_write_ptr - fp->_IO_write_base' \
19357 '# traditional Unix' \
19358 'fp->_ptr - fp->_base' \
19361 'fp->_p - fp->_bf._base' \
19363 '# SCO, Unixware' \
19364 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \
19367 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \
19370 'fp->__bufp - fp->__buffer' \
19372 '# old glibc iostream?' \
19373 'fp->_pptr - fp->_pbase' \
19376 'fp->_ptr - fp->_buffer' \
19379 'fp->_ptr - fp->_buf' \
19382 'fp->wp - fp->buf' \
19385 '(*fp)->_ptr - (*fp)->_base' \
19387 '# e.g., DGUX R4.11; the info is not available' \
19391 # Skip each embedded comment.
19392 case "$ac_expr" in '#'*) continue;; esac
19394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19395 /* end confdefs.h. */
19400 FILE *fp = stdin; (void) ($ac_expr);
19405 if ac_fn_c_try_compile "$LINENO"; then :
19409 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19410 test "$fp_done" = yes && break
19413 ac_cv_sys_pending_output_n_bytes=$ac_expr
19417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5
19418 $as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; }
19420 cat >>confdefs.h <<_ACEOF
19421 #define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes
19429 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
19433 if test $REPLACE_FSEEK = 1; then
19442 gl_LIBOBJS="$gl_LIBOBJS fseek.$ac_objext"
19456 $as_echo "#define GNULIB_TEST_FSEEK 1" >>confdefs.h
19468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fseeko" >&5
19469 $as_echo_n "checking for fseeko... " >&6; }
19470 if ${gl_cv_func_fseeko+:} false; then :
19471 $as_echo_n "(cached) " >&6
19474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19475 /* end confdefs.h. */
19481 fseeko (stdin, 0, 0);
19486 if ac_fn_c_try_link "$LINENO"; then :
19487 gl_cv_func_fseeko=yes
19489 gl_cv_func_fseeko=no
19491 rm -f core conftest.err conftest.$ac_objext \
19492 conftest$ac_exeext conftest.$ac_ext
19495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fseeko" >&5
19496 $as_echo "$gl_cv_func_fseeko" >&6; }
19499 if test $ac_cv_have_decl_fseeko = no; then
19503 if test $gl_cv_func_fseeko = no; then
19506 if test $WINDOWS_64_BIT_OFF_T = 1; then
19509 if test $gl_cv_var_stdin_large_offset = no; then
19515 if test $HAVE_FSEEKO = 0 || test $REPLACE_FSEEKO = 1; then
19524 gl_LIBOBJS="$gl_LIBOBJS fseeko.$ac_objext"
19527 for ac_func in _fseeki64
19529 ac_fn_c_check_func "$LINENO" "_fseeki64" "ac_cv_func__fseeki64"
19530 if test "x$ac_cv_func__fseeki64" = xyes; then :
19531 cat >>confdefs.h <<_ACEOF
19532 #define HAVE__FSEEKI64 1
19551 $as_echo "#define GNULIB_TEST_FSEEKO 1" >>confdefs.h
19559 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19564 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
19572 if test $ac_cv_func_fchdir = no; then
19576 if test $HAVE_FCHDIR = 0; then
19577 case "$gl_cv_func_open_directory_works" in
19586 if test $REPLACE_FSTAT = 1; then
19595 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
19610 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
19620 if test $ac_cv_func_fstatat = no; then
19623 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
19624 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
19625 if ${gl_cv_func_fstatat_zero_flag+:} false; then :
19626 $as_echo_n "(cached) " >&6
19628 if test "$cross_compiling" = yes; then :
19630 aix*) gl_cv_func_fstatat_zero_flag="guessing no";;
19631 *) gl_cv_func_fstatat_zero_flag="guessing yes";;
19635 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19636 /* end confdefs.h. */
19639 #include <sys/stat.h>
19644 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
19648 if ac_fn_c_try_run "$LINENO"; then :
19649 gl_cv_func_fstatat_zero_flag=yes
19651 gl_cv_func_fstatat_zero_flag=no
19653 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19654 conftest.$ac_objext conftest.beam conftest.$ac_ext
19659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
19660 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
19662 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
19664 *) REPLACE_FSTATAT=1
19665 case $gl_cv_func_fstatat_zero_flag in
19668 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
19676 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then
19685 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext"
19699 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
19707 if test $ac_cv_func_futimens = no; then
19710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimens works" >&5
19711 $as_echo_n "checking whether futimens works... " >&6; }
19712 if ${gl_cv_func_futimens_works+:} false; then :
19713 $as_echo_n "(cached) " >&6
19715 if test "$cross_compiling" = yes; then :
19716 gl_cv_func_futimens_works="guessing no"
19718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19719 /* end confdefs.h. */
19722 #include <sys/stat.h>
19723 #include <unistd.h>
19729 struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } };
19730 int fd = creat ("conftest.file", 0600);
19732 if (fd < 0) return 1;
19734 if (futimens (AT_FDCWD, NULL) == 0) return 2;
19735 if (errno != EBADF) return 3;
19736 if (futimens (fd, ts)) return 4;
19738 ts[0].tv_nsec = UTIME_NOW;
19739 ts[1].tv_nsec = UTIME_OMIT;
19740 if (futimens (fd, ts)) return 5;
19741 if (fstat (fd, &st)) return 6;
19742 if (st.st_ctime < st.st_atime) return 7;
19748 if ac_fn_c_try_run "$LINENO"; then :
19749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19750 /* end confdefs.h. */
19753 /* The Linux kernel added futimens in 2.6.22, but has bugs with UTIME_OMIT
19754 in several file systems as recently as 2.6.32. Always replace futimens
19755 to support older kernels. */
19767 if ac_fn_c_try_compile "$LINENO"; then :
19768 gl_cv_func_futimens_works=yes
19770 gl_cv_func_futimens_works="needs runtime check"
19772 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19774 gl_cv_func_futimens_works=no
19776 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19777 conftest.$ac_objext conftest.beam conftest.$ac_ext
19780 rm -f conftest.file
19782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimens_works" >&5
19783 $as_echo "$gl_cv_func_futimens_works" >&6; }
19784 if test "$gl_cv_func_futimens_works" != yes; then
19789 if test $HAVE_FUTIMENS = 0 || test $REPLACE_FUTIMENS = 1; then
19798 gl_LIBOBJS="$gl_LIBOBJS futimens.$ac_objext"
19812 $as_echo "#define GNULIB_TEST_FUTIMENS 1" >>confdefs.h
19824 gl_cv_func_getcwd_path_max=yes
19832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
19833 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
19834 if ${gl_cv_func_getcwd_path_max+:} false; then :
19835 $as_echo_n "(cached) " >&6
19837 # Arrange for deletion of the temporary directory this test creates.
19838 ac_clean_files="$ac_clean_files confdir3"
19839 if test "$cross_compiling" = yes; then :
19841 aix*) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
19842 *) gl_cv_func_getcwd_path_max=no;;
19845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19846 /* end confdefs.h. */
19849 #include <stdlib.h>
19851 # include <unistd.h>
19853 # include <direct.h>
19855 #include <string.h>
19856 #include <limits.h>
19857 #include <sys/stat.h>
19858 #include <sys/types.h>
19862 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
19864 # include <unistd.h>
19866 #include <limits.h>
19867 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
19868 # include <sys/param.h>
19870 #if !defined PATH_MAX && defined MAXPATHLEN
19871 # define PATH_MAX MAXPATHLEN
19875 # define PATH_MAX 1024
19877 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
19879 # define PATH_MAX 260
19884 # define AT_FDCWD 0
19886 #ifdef ENAMETOOLONG
19887 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
19889 # define is_ENAMETOOLONG(x) 0
19892 /* Use the getcwd function, not any macro. */
19895 /* Don't get link errors because mkdir is redefined to rpl_mkdir. */
19899 # define S_IRWXU 0700
19902 /* The length of this name must be 8. */
19903 #define DIR_NAME "confdir3"
19904 #define DIR_NAME_LEN 8
19905 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
19907 /* The length of "../". */
19908 #define DOTDOTSLASH_LEN 3
19910 /* Leftover bytes in the buffer, to work around library or OS bugs. */
19911 #define BUF_SLOP 20
19917 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
19918 at least not on a local file system. And if we were to start worrying
19919 about remote file systems, we'd have to enable the wrapper function
19920 all of the time, just to be safe. That's not worth the cost. */
19922 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
19923 - DIR_NAME_SIZE - BUF_SLOP) \
19925 /* FIXME: Assuming there's a system for which this is true,
19926 this should be done in a compile test. */
19929 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
19930 + DIR_NAME_SIZE + BUF_SLOP];
19931 char *cwd = getcwd (buf, PATH_MAX);
19932 size_t initial_cwd_len;
19935 size_t n_chdirs = 0;
19940 cwd_len = initial_cwd_len = strlen (cwd);
19944 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
19947 cwd_len += DIR_NAME_SIZE;
19948 /* If mkdir or chdir fails, it could be that this system cannot create
19949 any file with an absolute name longer than PATH_MAX, such as cygwin.
19950 If so, leave fail as 0, because the current working directory can't
19951 be too long for getcwd if it can't even be created. For other
19952 errors, be pessimistic and consider that as a failure, too. */
19953 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
19955 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19960 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
19962 c = getcwd (buf, PATH_MAX);
19963 if (!c && errno == ENOENT)
19973 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
19980 if (dotdot_max <= cwd_len - initial_cwd_len)
19982 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
19984 c = getcwd (buf, cwd_len + 1);
19987 if (! (errno == ERANGE || errno == ENOENT
19988 || is_ENAMETOOLONG (errno)))
19993 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
20001 if (c && strlen (c) != cwd_len)
20009 /* Leaving behind such a deep directory is not polite.
20010 So clean up here, right away, even though the driving
20011 shell script would also clean up. */
20015 /* Try rmdir first, in case the chdir failed. */
20017 for (i = 0; i <= n_chdirs; i++)
20019 if (chdir ("..") < 0)
20021 if (rmdir (DIR_NAME) != 0)
20031 if ac_fn_c_try_run "$LINENO"; then :
20032 gl_cv_func_getcwd_path_max=yes
20035 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';;
20036 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';;
20037 *) gl_cv_func_getcwd_path_max=no;;
20040 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20041 conftest.$ac_objext conftest.beam conftest.$ac_ext
20046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
20047 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
20049 case "$gl_cv_func_getcwd_null" in
20055 for ac_func in getpagesize
20057 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
20058 if test "x$ac_cv_func_getpagesize" = xyes; then :
20059 cat >>confdefs.h <<_ACEOF
20060 #define HAVE_GETPAGESIZE 1
20066 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5
20067 $as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; }
20068 if ${gl_cv_func_getcwd_abort_bug+:} false; then :
20069 $as_echo_n "(cached) " >&6
20071 # Remove any remnants of a previous test.
20072 rm -rf confdir-14B---
20073 # Arrange for deletion of the temporary directory this test creates.
20074 ac_clean_files="$ac_clean_files confdir-14B---"
20075 if test "$cross_compiling" = yes; then :
20076 gl_cv_func_getcwd_abort_bug=yes
20078 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20079 /* end confdefs.h. */
20081 #include <stdlib.h>
20083 # include <unistd.h>
20084 #else /* on Windows with MSVC */
20085 # include <direct.h>
20087 #include <string.h>
20088 #include <sys/stat.h>
20091 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
20093 # include <unistd.h>
20095 #include <limits.h>
20096 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
20097 # include <sys/param.h>
20099 #if !defined PATH_MAX && defined MAXPATHLEN
20100 # define PATH_MAX MAXPATHLEN
20104 # define PATH_MAX 1024
20106 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
20108 # define PATH_MAX 260
20112 /* Don't get link errors because mkdir is redefined to rpl_mkdir. */
20116 # define S_IRWXU 0700
20119 /* FIXME: skip the run-test altogether on systems without getpagesize. */
20120 #if ! HAVE_GETPAGESIZE
20121 # define getpagesize() 0
20124 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
20125 the 16kB pagesize on ia64 linux. Those conditions make the code below
20126 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
20127 #define TARGET_LEN (5 * 1024)
20133 size_t initial_cwd_len;
20136 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
20137 this relatively expensive and invasive test if that's not true. */
20139 int bug_possible = PATH_MAX < getpagesize ();
20141 int bug_possible = 0;
20143 if (! bug_possible)
20146 cwd = getcwd (NULL, 0);
20150 initial_cwd_len = strlen (cwd);
20155 static char const dir_name[] = "confdir-14B---";
20156 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
20157 / sizeof dir_name);
20159 for (d = 0; d < desired_depth; d++)
20161 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
20163 if (! (errno == ERANGE || errno == ENAMETOOLONG
20164 || errno == ENOENT))
20165 fail = 3; /* Unable to construct deep hierarchy. */
20170 /* If libc has the bug in question, this invocation of getcwd
20171 results in a failed assertion. */
20172 cwd = getcwd (NULL, 0);
20174 fail = 4; /* getcwd didn't assert, but it failed for a long name
20175 where the answer could have been learned. */
20178 /* Call rmdir first, in case the above chdir failed. */
20182 if (chdir ("..") < 0)
20195 if ac_fn_c_try_run "$LINENO"; then :
20196 gl_cv_func_getcwd_abort_bug=no
20199 if test $ret -ge 128 || test $ret = 4; then
20200 gl_cv_func_getcwd_abort_bug=yes
20202 gl_cv_func_getcwd_abort_bug=no
20205 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20206 conftest.$ac_objext conftest.beam conftest.$ac_ext
20211 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5
20212 $as_echo "$gl_cv_func_getcwd_abort_bug" >&6; }
20213 if test $gl_cv_func_getcwd_abort_bug = yes; then :
20221 case "$gl_cv_func_getcwd_path_max" in
20222 "no"|"no, it has the AIX bug") ;;
20225 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
20229 case "$gl_cv_func_getcwd_path_max" in
20230 "no, but it is partly working")
20232 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
20237 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \
20238 || test $gl_cv_func_getcwd_posix_signature != yes \
20239 || test "$gl_cv_func_getcwd_path_max" != yes \
20240 || test $gl_abort_bug = yes; then
20244 if test $REPLACE_GETCWD = 1; then
20253 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext"
20263 cat >>confdefs.h <<_ACEOF
20264 #define GNULIB_GETCWD 1
20279 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20288 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
20295 if test $REPLACE_GETCWD = 1; then
20304 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
20318 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
20330 if test $ac_cv_func_getdelim = yes; then
20332 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
20333 $as_echo_n "checking for working getdelim function... " >&6; }
20334 if ${gl_cv_func_working_getdelim+:} false; then :
20335 $as_echo_n "(cached) " >&6
20337 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
20338 if test "$cross_compiling" = yes; then :
20339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20340 /* end confdefs.h. */
20342 #include <features.h>
20343 #ifdef __GNU_LIBRARY__
20344 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
20350 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20351 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
20352 gl_cv_func_working_getdelim="guessing yes"
20354 gl_cv_func_working_getdelim="guessing no"
20360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20361 /* end confdefs.h. */
20363 # include <stdio.h>
20364 # include <stdlib.h>
20365 # include <string.h>
20368 FILE *in = fopen ("./conftest.data", "r");
20372 /* Test result for a NULL buffer and a zero size.
20373 Based on a test program from Karl Heuer. */
20376 int len = getdelim (&line, &siz, '\n', in);
20377 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
20381 /* Test result for a NULL buffer and a non-zero size.
20382 This crashes on FreeBSD 8.0. */
20384 size_t siz = (size_t)(~0) / 4;
20385 if (getdelim (&line, &siz, '\n', in) == -1)
20392 if ac_fn_c_try_run "$LINENO"; then :
20393 gl_cv_func_working_getdelim=yes
20395 gl_cv_func_working_getdelim=no
20397 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20398 conftest.$ac_objext conftest.beam conftest.$ac_ext
20402 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
20403 $as_echo "$gl_cv_func_working_getdelim" >&6; }
20404 case "$gl_cv_func_working_getdelim" in
20413 if test $ac_cv_have_decl_getdelim = no; then
20414 HAVE_DECL_GETDELIM=0
20417 if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then
20426 gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext"
20429 for ac_func in flockfile funlockfile
20431 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20432 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20433 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20434 cat >>confdefs.h <<_ACEOF
20435 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
20441 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
20442 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
20448 cat >>confdefs.h <<_ACEOF
20449 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
20465 $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
20472 if test $ac_cv_func_getdtablesize != yes; then
20473 HAVE_GETDTABLESIZE=0
20476 if test $HAVE_GETDTABLESIZE = 0; then
20485 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
20494 GNULIB_GETDTABLESIZE=1
20500 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
20511 gl_getline_needs_run_time_check=no
20512 ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline"
20513 if test "x$ac_cv_func_getline" = xyes; then :
20514 gl_getline_needs_run_time_check=yes
20516 am_cv_func_working_getline=no
20519 if test $gl_getline_needs_run_time_check = yes; then
20520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
20521 $as_echo_n "checking for working getline function... " >&6; }
20522 if ${am_cv_func_working_getline+:} false; then :
20523 $as_echo_n "(cached) " >&6
20525 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data
20526 if test "$cross_compiling" = yes; then :
20527 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20528 /* end confdefs.h. */
20530 #include <features.h>
20531 #ifdef __GNU_LIBRARY__
20532 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
20538 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20539 $EGREP "Lucky GNU user" >/dev/null 2>&1; then :
20540 am_cv_func_working_getline="guessing yes"
20542 am_cv_func_working_getline="guessing no"
20548 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20549 /* end confdefs.h. */
20551 # include <stdio.h>
20552 # include <stdlib.h>
20553 # include <string.h>
20556 FILE *in = fopen ("./conftest.data", "r");
20560 /* Test result for a NULL buffer and a zero size.
20561 Based on a test program from Karl Heuer. */
20564 int len = getline (&line, &siz, in);
20565 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
20569 /* Test result for a NULL buffer and a non-zero size.
20570 This crashes on FreeBSD 8.0. */
20572 size_t siz = (size_t)(~0) / 4;
20573 if (getline (&line, &siz, in) == -1)
20580 if ac_fn_c_try_run "$LINENO"; then :
20581 am_cv_func_working_getline=yes
20583 am_cv_func_working_getline=no
20585 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20586 conftest.$ac_objext conftest.beam conftest.$ac_ext
20590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
20591 $as_echo "$am_cv_func_working_getline" >&6; }
20594 if test $ac_cv_have_decl_getline = no; then
20595 HAVE_DECL_GETLINE=0
20598 case "$am_cv_func_working_getline" in
20604 if test $REPLACE_GETLINE = 1; then
20613 gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext"
20630 $as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
20639 if test $REPLACE_GETOPT = 1; then
20648 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
20658 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
20663 GNULIB_GL_UNISTD_H_GETOPT=1
20668 $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
20678 if test $REPLACE_GETOPT = 1; then
20682 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
20688 if test $REPLACE_GETOPT = 1; then
20697 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
20707 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
20712 GNULIB_GL_UNISTD_H_GETOPT=1
20718 for ac_func in getpagesize
20720 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
20721 if test "x$ac_cv_func_getpagesize" = xyes; then :
20722 cat >>confdefs.h <<_ACEOF
20723 #define HAVE_GETPAGESIZE 1
20729 if test $ac_cv_func_getpagesize = no; then
20731 for ac_header in OS.h
20733 ac_fn_c_check_header_mongrel "$LINENO" "OS.h" "ac_cv_header_OS_h" "$ac_includes_default"
20734 if test "x$ac_cv_header_OS_h" = xyes; then :
20735 cat >>confdefs.h <<_ACEOF
20736 #define HAVE_OS_H 1
20743 if test $ac_cv_header_OS_h = yes; then
20746 for ac_header in sys/param.h
20748 ac_fn_c_check_header_mongrel "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default"
20749 if test "x$ac_cv_header_sys_param_h" = xyes; then :
20750 cat >>confdefs.h <<_ACEOF
20751 #define HAVE_SYS_PARAM_H 1
20758 if test $ac_cv_header_sys_param_h = yes; then
20764 REPLACE_GETPAGESIZE=1
20767 ac_fn_c_check_decl "$LINENO" "getpagesize" "ac_cv_have_decl_getpagesize" "$ac_includes_default"
20768 if test "x$ac_cv_have_decl_getpagesize" = xyes; then :
20771 HAVE_DECL_GETPAGESIZE=0
20775 if test $REPLACE_GETPAGESIZE = 1; then
20784 gl_LIBOBJS="$gl_LIBOBJS getpagesize.$ac_objext"
20792 GNULIB_GETPAGESIZE=1
20798 $as_echo "#define GNULIB_TEST_GETPAGESIZE 1" >>confdefs.h
20816 gl_gettimeofday_timezone=void
20817 if test $ac_cv_func_gettimeofday != yes; then
20818 HAVE_GETTIMEOFDAY=0
20823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
20824 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
20825 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
20826 $as_echo_n "(cached) " >&6
20828 if test "$cross_compiling" = yes; then :
20829 # When cross-compiling:
20831 # Guess all is fine on glibc systems.
20832 *-gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;;
20833 # If we don't know, assume the worst.
20834 *) gl_cv_func_gettimeofday_clobber="guessing yes" ;;
20838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20839 /* end confdefs.h. */
20840 #include <string.h>
20841 #include <sys/time.h>
20843 #include <stdlib.h>
20851 struct tm saved_lt;
20853 lt = localtime (&t);
20855 gettimeofday (&tv, NULL);
20856 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
20862 if ac_fn_c_try_run "$LINENO"; then :
20863 gl_cv_func_gettimeofday_clobber=no
20865 gl_cv_func_gettimeofday_clobber=yes
20867 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
20868 conftest.$ac_objext conftest.beam conftest.$ac_ext
20872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
20873 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
20875 case "$gl_cv_func_gettimeofday_clobber" in
20877 REPLACE_GETTIMEOFDAY=1
20880 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
20883 $as_echo "#define localtime rpl_localtime" >>confdefs.h
20887 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
20892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
20893 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
20894 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
20895 $as_echo_n "(cached) " >&6
20897 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20898 /* end confdefs.h. */
20899 #include <sys/time.h>
20901 int gettimeofday (struct timeval *restrict, void *restrict);
20906 /* glibc uses struct timezone * rather than the POSIX void *
20907 if _GNU_SOURCE is defined. However, since the only portable
20908 use of gettimeofday uses NULL as the second parameter, and
20909 since the glibc definition is actually more typesafe, it is
20910 not worth wrapping this to get a compliant signature. */
20911 int (*f) (struct timeval *restrict, void *restrict)
20914 return !(x | c.tv_sec | c.tv_usec);
20920 if ac_fn_c_try_compile "$LINENO"; then :
20921 gl_cv_func_gettimeofday_posix_signature=yes
20923 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20924 /* end confdefs.h. */
20925 #include <sys/time.h>
20926 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
20936 if ac_fn_c_try_compile "$LINENO"; then :
20937 gl_cv_func_gettimeofday_posix_signature=almost
20939 gl_cv_func_gettimeofday_posix_signature=no
20941 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20943 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
20946 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
20947 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
20948 gl_gettimeofday_timezone='struct timezone'
20949 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
20950 REPLACE_GETTIMEOFDAY=1
20952 if test $REPLACE_STRUCT_TIMEVAL = 1; then
20953 REPLACE_GETTIMEOFDAY=1
20958 cat >>confdefs.h <<_ACEOF
20959 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
20963 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
20972 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
20975 for ac_header in sys/timeb.h
20977 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
20978 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
20979 cat >>confdefs.h <<_ACEOF
20980 #define HAVE_SYS_TIMEB_H 1
20987 for ac_func in _ftime
20989 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
20990 if test "x$ac_cv_func__ftime" = xyes; then :
20991 cat >>confdefs.h <<_ACEOF
20992 #define HAVE__FTIME 1
21005 GNULIB_GETTIMEOFDAY=1
21011 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
21034 if test -n "$STDINT_H"; then
21035 PRIPTR_PREFIX='"l"'
21037 for glpfx in '' l ll I64; do
21039 '') gltype1='int';;
21040 l) gltype1='long int';;
21041 ll) gltype1='long long int';;
21042 I64) gltype1='__int64';;
21044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21045 /* end confdefs.h. */
21046 #include <stdint.h>
21047 extern intptr_t foo;
21048 extern $gltype1 foo;
21057 if ac_fn_c_try_compile "$LINENO"; then :
21058 PRIPTR_PREFIX='"'$glpfx'"'
21060 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21061 test -n "$PRIPTR_PREFIX" && break
21067 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
21068 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
21069 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then :
21070 $as_echo_n "(cached) " >&6
21072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21073 /* end confdefs.h. */
21074 /* Work also in C++ mode. */
21075 #define __STDC_LIMIT_MACROS 1
21077 /* Work if build is not clean. */
21078 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21080 #include <limits.h>
21082 #include <stdint.h>
21085 #if defined INT32_MAX && defined INTMAX_MAX
21086 #define CONDITION (INT32_MAX < INTMAX_MAX)
21087 #elif HAVE_LONG_LONG_INT
21088 #define CONDITION (sizeof (int) < sizeof (long long int))
21090 #define CONDITION 0
21092 int test[CONDITION ? 1 : -1];
21101 if ac_fn_c_try_compile "$LINENO"; then :
21102 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes
21104 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no
21106 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
21109 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
21110 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
21111 INT32_MAX_LT_INTMAX_MAX=1;
21113 INT32_MAX_LT_INTMAX_MAX=0;
21117 if test $APPLE_UNIVERSAL_BUILD = 0; then
21119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
21120 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
21121 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then :
21122 $as_echo_n "(cached) " >&6
21124 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21125 /* end confdefs.h. */
21126 /* Work also in C++ mode. */
21127 #define __STDC_LIMIT_MACROS 1
21129 /* Work if build is not clean. */
21130 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21132 #include <limits.h>
21134 #include <stdint.h>
21137 #if defined INT64_MAX
21138 #define CONDITION (INT64_MAX == LONG_MAX)
21139 #elif HAVE_LONG_LONG_INT
21140 #define CONDITION (sizeof (long long int) == sizeof (long int))
21142 #define CONDITION 0
21144 int test[CONDITION ? 1 : -1];
21153 if ac_fn_c_try_compile "$LINENO"; then :
21154 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes
21156 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no
21158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
21161 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
21162 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
21163 INT64_MAX_EQ_LONG_MAX=1;
21165 INT64_MAX_EQ_LONG_MAX=0;
21170 INT64_MAX_EQ_LONG_MAX=-1
21173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
21174 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
21175 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then :
21176 $as_echo_n "(cached) " >&6
21178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21179 /* end confdefs.h. */
21180 /* Work also in C++ mode. */
21181 #define __STDC_LIMIT_MACROS 1
21183 /* Work if build is not clean. */
21184 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21186 #include <limits.h>
21188 #include <stdint.h>
21191 #if defined UINT32_MAX && defined UINTMAX_MAX
21192 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
21193 #elif HAVE_LONG_LONG_INT
21194 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
21196 #define CONDITION 0
21198 int test[CONDITION ? 1 : -1];
21207 if ac_fn_c_try_compile "$LINENO"; then :
21208 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes
21210 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no
21212 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
21215 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
21216 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
21217 UINT32_MAX_LT_UINTMAX_MAX=1;
21219 UINT32_MAX_LT_UINTMAX_MAX=0;
21223 if test $APPLE_UNIVERSAL_BUILD = 0; then
21225 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
21226 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
21227 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then :
21228 $as_echo_n "(cached) " >&6
21230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21231 /* end confdefs.h. */
21232 /* Work also in C++ mode. */
21233 #define __STDC_LIMIT_MACROS 1
21235 /* Work if build is not clean. */
21236 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
21238 #include <limits.h>
21240 #include <stdint.h>
21243 #if defined UINT64_MAX
21244 #define CONDITION (UINT64_MAX == ULONG_MAX)
21245 #elif HAVE_LONG_LONG_INT
21246 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
21248 #define CONDITION 0
21250 int test[CONDITION ? 1 : -1];
21259 if ac_fn_c_try_compile "$LINENO"; then :
21260 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes
21262 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no
21264 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
21267 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
21268 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
21269 UINT64_MAX_EQ_ULONG_MAX=1;
21271 UINT64_MAX_EQ_ULONG_MAX=0;
21276 UINT64_MAX_EQ_ULONG_MAX=-1
21286 ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" "
21287 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
21289 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
21290 before <wchar.h>. */
21291 #include <stddef.h>
21295 #include <wctype.h>
21298 if test "x$ac_cv_have_decl_iswblank" = xyes; then :
21304 cat >>confdefs.h <<_ACEOF
21305 #define HAVE_DECL_ISWBLANK $ac_have_decl
21308 if test $ac_cv_func_iswblank = no; then
21310 if test $ac_cv_have_decl_iswblank = yes; then
21314 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
21317 if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
21323 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
21326 if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then
21335 gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext"
21350 $as_echo "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h
21368 if test $gl_cv_have_include_next = yes; then
21369 gl_cv_next_langinfo_h='<'langinfo.h'>'
21371 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <langinfo.h>" >&5
21372 $as_echo_n "checking absolute name of <langinfo.h>... " >&6; }
21373 if ${gl_cv_next_langinfo_h+:} false; then :
21374 $as_echo_n "(cached) " >&6
21377 if test $ac_cv_header_langinfo_h = yes; then
21380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21381 /* end confdefs.h. */
21382 #include <langinfo.h>
21386 aix*) gl_absname_cpp="$ac_cpp -C" ;;
21387 *) gl_absname_cpp="$ac_cpp" ;;
21392 gl_dirsep_regex='[/\\]'
21395 gl_dirsep_regex='\/'
21398 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
21400 gl_header_literal_regex=`echo 'langinfo.h' \
21401 | sed -e "$gl_make_literal_regex_sed"`
21402 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
21403 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
21408 gl_cv_next_langinfo_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
21409 sed -n "$gl_absolute_header_sed"`'"'
21411 gl_cv_next_langinfo_h='<'langinfo.h'>'
21416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_langinfo_h" >&5
21417 $as_echo "$gl_cv_next_langinfo_h" >&6; }
21419 NEXT_LANGINFO_H=$gl_cv_next_langinfo_h
21421 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
21422 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
21423 gl_next_as_first_directive='<'langinfo.h'>'
21425 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
21426 gl_next_as_first_directive=$gl_cv_next_langinfo_h
21428 NEXT_AS_FIRST_DIRECTIVE_LANGINFO_H=$gl_next_as_first_directive
21434 HAVE_LANGINFO_CODESET=0
21435 HAVE_LANGINFO_T_FMT_AMPM=0
21436 HAVE_LANGINFO_ERA=0
21437 HAVE_LANGINFO_YESEXPR=0
21439 if test $ac_cv_header_langinfo_h = yes; then
21441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines CODESET" >&5
21442 $as_echo_n "checking whether langinfo.h defines CODESET... " >&6; }
21443 if ${gl_cv_header_langinfo_codeset+:} false; then :
21444 $as_echo_n "(cached) " >&6
21446 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21447 /* end confdefs.h. */
21448 #include <langinfo.h>
21459 if ac_fn_c_try_compile "$LINENO"; then :
21460 gl_cv_header_langinfo_codeset=yes
21462 gl_cv_header_langinfo_codeset=no
21464 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21467 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_codeset" >&5
21468 $as_echo "$gl_cv_header_langinfo_codeset" >&6; }
21469 if test $gl_cv_header_langinfo_codeset = yes; then
21470 HAVE_LANGINFO_CODESET=1
21472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines T_FMT_AMPM" >&5
21473 $as_echo_n "checking whether langinfo.h defines T_FMT_AMPM... " >&6; }
21474 if ${gl_cv_header_langinfo_t_fmt_ampm+:} false; then :
21475 $as_echo_n "(cached) " >&6
21477 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21478 /* end confdefs.h. */
21479 #include <langinfo.h>
21480 int a = T_FMT_AMPM;
21490 if ac_fn_c_try_compile "$LINENO"; then :
21491 gl_cv_header_langinfo_t_fmt_ampm=yes
21493 gl_cv_header_langinfo_t_fmt_ampm=no
21495 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_t_fmt_ampm" >&5
21499 $as_echo "$gl_cv_header_langinfo_t_fmt_ampm" >&6; }
21500 if test $gl_cv_header_langinfo_t_fmt_ampm = yes; then
21501 HAVE_LANGINFO_T_FMT_AMPM=1
21503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines ERA" >&5
21504 $as_echo_n "checking whether langinfo.h defines ERA... " >&6; }
21505 if ${gl_cv_header_langinfo_era+:} false; then :
21506 $as_echo_n "(cached) " >&6
21508 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21509 /* end confdefs.h. */
21510 #include <langinfo.h>
21521 if ac_fn_c_try_compile "$LINENO"; then :
21522 gl_cv_header_langinfo_era=yes
21524 gl_cv_header_langinfo_era=no
21526 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_era" >&5
21530 $as_echo "$gl_cv_header_langinfo_era" >&6; }
21531 if test $gl_cv_header_langinfo_era = yes; then
21532 HAVE_LANGINFO_ERA=1
21534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether langinfo.h defines YESEXPR" >&5
21535 $as_echo_n "checking whether langinfo.h defines YESEXPR... " >&6; }
21536 if ${gl_cv_header_langinfo_yesexpr+:} false; then :
21537 $as_echo_n "(cached) " >&6
21539 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21540 /* end confdefs.h. */
21541 #include <langinfo.h>
21552 if ac_fn_c_try_compile "$LINENO"; then :
21553 gl_cv_header_langinfo_yesexpr=yes
21555 gl_cv_header_langinfo_yesexpr=no
21557 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_langinfo_yesexpr" >&5
21561 $as_echo "$gl_cv_header_langinfo_yesexpr" >&6; }
21562 if test $gl_cv_header_langinfo_yesexpr = yes; then
21563 HAVE_LANGINFO_YESEXPR=1
21575 for gl_func in nl_langinfo; do
21576 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
21577 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
21578 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
21579 if eval \${$as_gl_Symbol+:} false; then :
21580 $as_echo_n "(cached) " >&6
21582 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21583 /* end confdefs.h. */
21584 #include <langinfo.h>
21595 if ac_fn_c_try_compile "$LINENO"; then :
21596 eval "$as_gl_Symbol=yes"
21598 eval "$as_gl_Symbol=no"
21600 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21602 eval ac_res=\$$as_gl_Symbol
21603 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
21604 $as_echo "$ac_res" >&6; }
21605 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
21606 cat >>confdefs.h <<_ACEOF
21607 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
21610 eval ac_cv_have_decl_$gl_func=yes
21620 for ac_func in lchown
21622 ac_fn_c_check_func "$LINENO" "lchown" "ac_cv_func_lchown"
21623 if test "x$ac_cv_func_lchown" = xyes; then :
21624 cat >>confdefs.h <<_ACEOF
21625 #define HAVE_LCHOWN 1
21631 if test $ac_cv_func_lchown = no; then
21634 case "$gl_cv_func_chown_slash_works" in
21640 case "$gl_cv_func_chown_ctime_works" in
21648 if test $HAVE_LCHOWN = 0 || test $REPLACE_LCHOWN = 1; then
21657 gl_LIBOBJS="$gl_LIBOBJS lchown.$ac_objext"
21671 $as_echo "#define GNULIB_TEST_LCHOWN 1" >>confdefs.h
21678 if test $ac_cv_func_link = no; then
21681 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link obeys POSIX" >&5
21682 $as_echo_n "checking whether link obeys POSIX... " >&6; }
21683 if ${gl_cv_func_link_works+:} false; then :
21684 $as_echo_n "(cached) " >&6
21687 # Assume that if we have lstat, we can also check symlinks.
21688 if test $ac_cv_func_lstat = yes; then
21689 ln -s conftest.a conftest.lnk
21691 if test "$cross_compiling" = yes; then :
21693 # Guess yes on glibc systems.
21694 *-gnu*) gl_cv_func_link_works="guessing yes" ;;
21695 # If we don't know, assume the worst.
21696 *) gl_cv_func_link_works="guessing no" ;;
21700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21701 /* end confdefs.h. */
21702 #include <unistd.h>
21708 if (!link ("conftest.a", "conftest.b/"))
21711 if (!link ("conftest.lnk/", "conftest.b"))
21713 if (rename ("conftest.a", "conftest.b"))
21715 if (!link ("conftest.b", "conftest.lnk"))
21724 if ac_fn_c_try_run "$LINENO"; then :
21725 gl_cv_func_link_works=yes
21727 gl_cv_func_link_works=no
21729 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21730 conftest.$ac_objext conftest.beam conftest.$ac_ext
21733 rm -f conftest.a conftest.b conftest.lnk
21735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_works" >&5
21736 $as_echo "$gl_cv_func_link_works" >&6; }
21737 case "$gl_cv_func_link_works" in
21745 if test $HAVE_LINK = 0 || test $REPLACE_LINK = 1; then
21754 gl_LIBOBJS="$gl_LIBOBJS link.$ac_objext"
21768 $as_echo "#define GNULIB_TEST_LINK 1" >>confdefs.h
21773 gl_link_follows_symlinks=0 # assume GNU behavior
21774 if test $ac_cv_func_readlink = yes; then
21775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __xpg4" >&5
21776 $as_echo_n "checking for __xpg4... " >&6; }
21777 if ${gl_cv_have___xpg4+:} false; then :
21778 $as_echo_n "(cached) " >&6
21780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21781 /* end confdefs.h. */
21791 if ac_fn_c_try_link "$LINENO"; then :
21792 gl_cv_have___xpg4=yes
21794 gl_cv_have___xpg4=no
21796 rm -f core conftest.err conftest.$ac_objext \
21797 conftest$ac_exeext conftest.$ac_ext
21800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have___xpg4" >&5
21801 $as_echo "$gl_cv_have___xpg4" >&6; }
21802 if test $gl_cv_have___xpg4 = yes; then
21803 gl_link_follows_symlinks=-1
21805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether link(2) dereferences a symlink" >&5
21806 $as_echo_n "checking whether link(2) dereferences a symlink... " >&6; }
21807 if ${gl_cv_func_link_follows_symlink+:} false; then :
21808 $as_echo_n "(cached) " >&6
21811 # Create a regular file.
21812 echo > conftest.file
21813 if test "$cross_compiling" = yes; then :
21815 # On glibc/Linux we know the result.
21816 linux*-gnu*) gl_cv_func_link_follows_symlink="guessing no" ;;
21817 # Otherwise, we don't know.
21818 *) gl_cv_func_link_follows_symlink=unknown ;;
21822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21823 /* end confdefs.h. */
21825 # include <sys/types.h>
21826 # include <sys/stat.h>
21827 # include <unistd.h>
21828 # include <stdlib.h>
21830 # define SAME_INODE(Stat_buf_1, Stat_buf_2) \
21831 ((Stat_buf_1).st_ino == (Stat_buf_2).st_ino \
21832 && (Stat_buf_1).st_dev == (Stat_buf_2).st_dev)
21837 const char *file = "conftest.file";
21838 const char *sym = "conftest.sym";
21839 const char *hard = "conftest.hard";
21840 struct stat sb_file, sb_hard;
21842 /* Create a symlink to the regular file. */
21843 if (symlink (file, sym))
21846 /* Create a hard link to that symlink. */
21847 if (link (sym, hard))
21850 if (lstat (hard, &sb_hard))
21852 if (lstat (file, &sb_file))
21855 /* If the dev/inode of hard and file are the same, then
21856 the link call followed the symlink. */
21857 return SAME_INODE (sb_hard, sb_file) ? 1 : 0;
21861 if ac_fn_c_try_run "$LINENO"; then :
21862 gl_cv_func_link_follows_symlink=no
21864 gl_cv_func_link_follows_symlink=yes
21866 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21867 conftest.$ac_objext conftest.beam conftest.$ac_ext
21870 rm -f conftest.file conftest.sym conftest.hard
21873 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_link_follows_symlink" >&5
21874 $as_echo "$gl_cv_func_link_follows_symlink" >&6; }
21875 case "$gl_cv_func_link_follows_symlink" in
21876 *yes) gl_link_follows_symlinks=1 ;;
21877 *no) ;; # already defaulted to 0
21878 *) gl_link_follows_symlinks=-2 ;;
21883 cat >>confdefs.h <<_ACEOF
21884 #define LINK_FOLLOWS_SYMLINKS $gl_link_follows_symlinks
21895 if test $ac_cv_func_linkat = no; then
21898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat(,AT_SYMLINK_FOLLOW) works" >&5
21899 $as_echo_n "checking whether linkat(,AT_SYMLINK_FOLLOW) works... " >&6; }
21900 if ${gl_cv_func_linkat_follow+:} false; then :
21901 $as_echo_n "(cached) " >&6
21903 rm -rf conftest.f1 conftest.f2
21905 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21906 /* end confdefs.h. */
21909 #include <unistd.h>
21911 /* Linux added linkat in 2.6.16, but did not add AT_SYMLINK_FOLLOW
21912 until 2.6.18. Always replace linkat to support older kernels. */
21919 return linkat (AT_FDCWD, "conftest.f1", AT_FDCWD, "conftest.f2",
21920 AT_SYMLINK_FOLLOW);
21925 if ac_fn_c_try_compile "$LINENO"; then :
21926 gl_cv_func_linkat_follow=yes
21928 gl_cv_func_linkat_follow="need runtime check"
21930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
21931 rm -rf conftest.f1 conftest.f2
21933 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_follow" >&5
21934 $as_echo "$gl_cv_func_linkat_follow" >&6; }
21935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether linkat handles trailing slash correctly" >&5
21936 $as_echo_n "checking whether linkat handles trailing slash correctly... " >&6; }
21937 if ${gl_cv_func_linkat_slash+:} false; then :
21938 $as_echo_n "(cached) " >&6
21940 rm -rf conftest.a conftest.b conftest.c conftest.d
21941 if test "$cross_compiling" = yes; then :
21942 # Guess yes on glibc systems, no otherwise.
21944 *-gnu*) gl_cv_func_linkat_slash="guessing yes";;
21945 *) gl_cv_func_linkat_slash="guessing no";;
21949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21950 /* end confdefs.h. */
21951 #include <unistd.h>
21961 /* Create a regular file. */
21962 fd = open ("conftest.a", O_CREAT | O_EXCL | O_WRONLY, 0600);
21965 if (write (fd, "hello", 5) < 5)
21967 if (close (fd) < 0)
21969 /* Test whether hard links are supported on the current
21971 if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.b",
21972 AT_SYMLINK_FOLLOW) < 0)
21975 /* Test whether a trailing "/" is treated like "/.". */
21976 if (linkat (AT_FDCWD, "conftest.a/", AT_FDCWD, "conftest.c",
21977 AT_SYMLINK_FOLLOW) == 0)
21979 if (linkat (AT_FDCWD, "conftest.a", AT_FDCWD, "conftest.d/",
21980 AT_SYMLINK_FOLLOW) == 0)
21988 if ac_fn_c_try_run "$LINENO"; then :
21989 gl_cv_func_linkat_slash=yes
21991 gl_cv_func_linkat_slash=no
21993 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
21994 conftest.$ac_objext conftest.beam conftest.$ac_ext
21997 rm -rf conftest.a conftest.b conftest.c conftest.d
21999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_linkat_slash" >&5
22000 $as_echo "$gl_cv_func_linkat_slash" >&6; }
22001 case "$gl_cv_func_linkat_slash" in
22002 *yes) gl_linkat_slash_bug=0 ;;
22003 *) gl_linkat_slash_bug=1 ;;
22005 if test "$gl_cv_func_linkat_follow" != yes \
22006 || test $gl_linkat_slash_bug = 1; then
22009 cat >>confdefs.h <<_ACEOF
22010 #define LINKAT_TRAILING_SLASH_BUG $gl_linkat_slash_bug
22016 if test $HAVE_LINKAT = 0 || test $REPLACE_LINKAT = 1; then
22025 gl_LIBOBJS="$gl_LIBOBJS linkat.$ac_objext"
22028 if test $HAVE_LINKAT = 0; then
22037 gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext"
22051 $as_echo "#define GNULIB_TEST_LINKAT 1" >>confdefs.h
22063 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
22076 $as_echo "#define _LCONV_C99 1" >>confdefs.h
22081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
22082 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
22083 if ${gl_cv_header_locale_h_posix2001+:} false; then :
22084 $as_echo_n "(cached) " >&6
22086 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22087 /* end confdefs.h. */
22088 #include <locale.h>
22089 int x = LC_MESSAGES;
22090 int y = sizeof (((struct lconv *) 0)->decimal_point);
22099 if ac_fn_c_try_compile "$LINENO"; then :
22100 gl_cv_header_locale_h_posix2001=yes
22102 gl_cv_header_locale_h_posix2001=no
22104 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22106 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
22107 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
22110 if test $ac_cv_header_xlocale_h = yes; then
22112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
22113 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
22114 if ${gl_cv_header_locale_has_locale_t+:} false; then :
22115 $as_echo_n "(cached) " >&6
22117 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22118 /* end confdefs.h. */
22119 #include <locale.h>
22129 if ac_fn_c_try_compile "$LINENO"; then :
22130 gl_cv_header_locale_has_locale_t=yes
22132 gl_cv_header_locale_has_locale_t=no
22134 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
22138 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
22139 if test $gl_cv_header_locale_has_locale_t = yes; then
22140 gl_cv_header_locale_h_needs_xlocale_h=no
22142 gl_cv_header_locale_h_needs_xlocale_h=yes
22146 gl_cv_header_locale_h_needs_xlocale_h=no
22150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
22151 $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
22152 if ${gl_cv_sys_struct_lconv_ok+:} false; then :
22153 $as_echo_n "(cached) " >&6
22155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22156 /* end confdefs.h. */
22157 #include <locale.h>
22159 int x = sizeof (l.decimal_point);
22160 int y = sizeof (l.int_p_cs_precedes);
22169 if ac_fn_c_try_compile "$LINENO"; then :
22170 gl_cv_sys_struct_lconv_ok=yes
22172 gl_cv_sys_struct_lconv_ok=no
22174 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22177 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
22178 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
22179 if test $gl_cv_sys_struct_lconv_ok = no; then
22180 REPLACE_STRUCT_LCONV=1
22191 if test $gl_cv_have_include_next = yes; then
22192 gl_cv_next_locale_h='<'locale.h'>'
22194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
22195 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
22196 if ${gl_cv_next_locale_h+:} false; then :
22197 $as_echo_n "(cached) " >&6
22200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22201 /* end confdefs.h. */
22202 #include <locale.h>
22206 aix*) gl_absname_cpp="$ac_cpp -C" ;;
22207 *) gl_absname_cpp="$ac_cpp" ;;
22212 gl_dirsep_regex='[/\\]'
22215 gl_dirsep_regex='\/'
22218 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
22220 gl_header_literal_regex=`echo 'locale.h' \
22221 | sed -e "$gl_make_literal_regex_sed"`
22222 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
22223 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
22228 gl_cv_next_locale_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
22229 sed -n "$gl_absolute_header_sed"`'"'
22233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
22234 $as_echo "$gl_cv_next_locale_h" >&6; }
22236 NEXT_LOCALE_H=$gl_cv_next_locale_h
22238 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
22239 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
22240 gl_next_as_first_directive='<'locale.h'>'
22242 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
22243 gl_next_as_first_directive=$gl_cv_next_locale_h
22245 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive
22252 for gl_func in setlocale duplocale; do
22253 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
22254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
22255 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
22256 if eval \${$as_gl_Symbol+:} false; then :
22257 $as_echo_n "(cached) " >&6
22259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22260 /* end confdefs.h. */
22261 #include <locale.h>
22262 /* Some systems provide declarations in a non-standard header. */
22264 # include <xlocale.h>
22276 if ac_fn_c_try_compile "$LINENO"; then :
22277 eval "$as_gl_Symbol=yes"
22279 eval "$as_gl_Symbol=no"
22281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22283 eval ac_res=\$$as_gl_Symbol
22284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
22285 $as_echo "$ac_res" >&6; }
22286 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
22287 cat >>confdefs.h <<_ACEOF
22288 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
22291 eval ac_cv_have_decl_$gl_func=yes
22300 if test $REPLACE_STRUCT_LCONV = 1; then
22301 REPLACE_LOCALECONV=1
22304 if test $REPLACE_LOCALECONV = 1; then
22313 gl_LIBOBJS="$gl_LIBOBJS localeconv.$ac_objext"
22316 ac_fn_c_check_member "$LINENO" "struct lconv" "decimal_point" "ac_cv_member_struct_lconv_decimal_point" "#include <locale.h>
22318 if test "x$ac_cv_member_struct_lconv_decimal_point" = xyes; then :
22320 cat >>confdefs.h <<_ACEOF
22321 #define HAVE_STRUCT_LCONV_DECIMAL_POINT 1
22334 GNULIB_LOCALECONV=1
22340 $as_echo "#define GNULIB_TEST_LOCALECONV 1" >>confdefs.h
22350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lseek detects pipes" >&5
22351 $as_echo_n "checking whether lseek detects pipes... " >&6; }
22352 if ${gl_cv_func_lseek_pipe+:} false; then :
22353 $as_echo_n "(cached) " >&6
22357 gl_cv_func_lseek_pipe=no
22360 if test $cross_compiling = no; then
22361 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22362 /* end confdefs.h. */
22364 #include <sys/types.h> /* for off_t */
22365 #include <stdio.h> /* for SEEK_CUR */
22367 # include <unistd.h>
22368 #else /* on Windows with MSVC */
22376 /* Exit with success only if stdin is seekable. */
22377 return lseek (0, (off_t)0, SEEK_CUR) < 0;
22383 if ac_fn_c_try_link "$LINENO"; then :
22384 if test -s conftest$ac_exeext \
22385 && ./conftest$ac_exeext < conftest.$ac_ext \
22386 && test 1 = "`echo hi \
22387 | { ./conftest$ac_exeext; echo $?; cat >/dev/null; }`"; then
22388 gl_cv_func_lseek_pipe=yes
22390 gl_cv_func_lseek_pipe=no
22394 gl_cv_func_lseek_pipe=no
22396 rm -f core conftest.err conftest.$ac_objext \
22397 conftest$ac_exeext conftest.$ac_ext
22399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22400 /* end confdefs.h. */
22402 #if defined __BEOS__
22403 /* BeOS mistakenly return 0 when trying to seek on pipes. */
22407 if ac_fn_c_try_compile "$LINENO"; then :
22408 gl_cv_func_lseek_pipe=yes
22410 gl_cv_func_lseek_pipe=no
22412 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
22418 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lseek_pipe" >&5
22419 $as_echo "$gl_cv_func_lseek_pipe" >&6; }
22420 if test $gl_cv_func_lseek_pipe = no; then
22423 $as_echo "#define LSEEK_PIPE_BROKEN 1" >>confdefs.h
22428 if test $WINDOWS_64_BIT_OFF_T = 1; then
22432 if test $REPLACE_LSEEK = 1; then
22441 gl_LIBOBJS="$gl_LIBOBJS lseek.$ac_objext"
22455 $as_echo "#define GNULIB_TEST_LSEEK 1" >>confdefs.h
22462 if test $ac_cv_func_lstat = yes; then
22464 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
22473 if test $REPLACE_LSTAT = 1; then
22482 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
22497 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
22504 for ac_header in stdlib.h
22506 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
22507 if test "x$ac_cv_header_stdlib_h" = xyes; then :
22508 cat >>confdefs.h <<_ACEOF
22509 #define HAVE_STDLIB_H 1
22516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
22517 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
22518 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
22519 $as_echo_n "(cached) " >&6
22521 if test "$cross_compiling" = yes; then :
22523 # Guess yes on platforms where we know the result.
22524 *-gnu* | freebsd* | netbsd* | openbsd* \
22525 | hpux* | solaris* | cygwin* | mingw*)
22526 ac_cv_func_malloc_0_nonnull=yes ;;
22527 # If we don't know, assume the worst.
22528 *) ac_cv_func_malloc_0_nonnull=no ;;
22532 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22533 /* end confdefs.h. */
22534 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
22535 # include <stdlib.h>
22543 return ! malloc (0);
22549 if ac_fn_c_try_run "$LINENO"; then :
22550 ac_cv_func_malloc_0_nonnull=yes
22552 ac_cv_func_malloc_0_nonnull=no
22554 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22555 conftest.$ac_objext conftest.beam conftest.$ac_ext
22560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
22561 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
22562 if test $ac_cv_func_malloc_0_nonnull = yes; then :
22564 $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
22567 $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
22574 if test $REPLACE_MALLOC = 1; then
22583 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22588 cat >>confdefs.h <<_ACEOF
22589 #define GNULIB_MALLOC_GNU 1
22596 if test $gl_cv_func_malloc_posix = yes; then
22598 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
22604 if test $REPLACE_MALLOC = 1; then
22613 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
22621 GNULIB_MALLOC_POSIX=1
22627 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
22648 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
22652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
22653 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
22654 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
22655 $as_echo_n "(cached) " >&6
22659 # Guess no on AIX and OSF/1.
22660 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
22661 # Guess yes otherwise.
22662 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
22664 if test $LOCALE_JA != none; then
22665 if test "$cross_compiling" = yes; then :
22668 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22669 /* end confdefs.h. */
22671 #include <locale.h>
22672 #include <string.h>
22673 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22675 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22676 included before <wchar.h>. */
22677 #include <stddef.h>
22683 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
22685 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
22689 memset (&state, '\0', sizeof (mbstate_t));
22690 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
22691 if (mbsinit (&state))
22697 if ac_fn_c_try_run "$LINENO"; then :
22698 gl_cv_func_mbrtowc_incomplete_state=yes
22700 gl_cv_func_mbrtowc_incomplete_state=no
22702 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22703 conftest.$ac_objext conftest.beam conftest.$ac_ext
22709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
22710 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
22715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
22716 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
22717 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
22718 $as_echo_n "(cached) " >&6
22722 # Guess no on Solaris 8.
22723 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
22724 # Guess yes otherwise.
22725 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
22727 if test $LOCALE_ZH_CN != none; then
22728 if test "$cross_compiling" = yes; then :
22731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22732 /* end confdefs.h. */
22734 #include <locale.h>
22735 #include <stdlib.h>
22736 #include <string.h>
22737 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22739 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22740 included before <wchar.h>. */
22741 #include <stddef.h>
22747 /* This fails on Solaris 8:
22748 mbrtowc returns 2, and sets wc to 0x00F0.
22749 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
22750 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
22752 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
22756 memset (&state, '\0', sizeof (mbstate_t));
22757 if (mbrtowc (&wc, input + 3, 6, &state) != 4
22758 && mbtowc (&wc, input + 3, 6) == 4)
22764 if ac_fn_c_try_run "$LINENO"; then :
22765 gl_cv_func_mbrtowc_sanitycheck=yes
22767 gl_cv_func_mbrtowc_sanitycheck=no
22769 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22770 conftest.$ac_objext conftest.beam conftest.$ac_ext
22776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
22777 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
22779 REPLACE_MBSTATE_T=0
22780 case "$gl_cv_func_mbrtowc_incomplete_state" in
22782 *) REPLACE_MBSTATE_T=1 ;;
22784 case "$gl_cv_func_mbrtowc_sanitycheck" in
22786 *) REPLACE_MBSTATE_T=1 ;;
22789 REPLACE_MBSTATE_T=1
22794 if test $ac_cv_func_mbrtowc = no; then
22796 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
22797 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22799 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22800 included before <wchar.h>. */
22801 #include <stddef.h>
22807 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
22813 cat >>confdefs.h <<_ACEOF
22814 #define HAVE_DECL_MBRTOWC $ac_have_decl
22817 if test $ac_cv_have_decl_mbrtowc = yes; then
22821 if test $REPLACE_MBSTATE_T = 1; then
22827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
22828 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
22829 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
22830 $as_echo_n "(cached) " >&6
22834 # Guess no on Solaris.
22835 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
22836 # Guess yes otherwise.
22837 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
22839 if test $LOCALE_FR_UTF8 != none; then
22840 if test "$cross_compiling" = yes; then :
22843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22844 /* end confdefs.h. */
22846 #include <locale.h>
22847 #include <stdlib.h>
22848 #include <string.h>
22849 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22851 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22852 included before <wchar.h>. */
22853 #include <stddef.h>
22861 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22863 char input[] = "\303\237er";
22868 memset (&state, '\0', sizeof (mbstate_t));
22869 wc = (wchar_t) 0xBADFACE;
22870 ret = mbrtowc (&wc, input, 5, &state);
22873 if (!mbsinit (&state))
22876 memset (&state, '\0', sizeof (mbstate_t));
22877 ret = mbrtowc (NULL, input, 5, &state);
22878 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
22880 if (!mbsinit (&state))
22886 if ac_fn_c_try_run "$LINENO"; then :
22887 gl_cv_func_mbrtowc_null_arg1=yes
22889 gl_cv_func_mbrtowc_null_arg1=no
22891 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22892 conftest.$ac_objext conftest.beam conftest.$ac_ext
22898 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
22899 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
22904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
22905 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
22906 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
22907 $as_echo_n "(cached) " >&6
22911 # Guess no on OSF/1.
22912 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
22913 # Guess yes otherwise.
22914 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
22916 if test $LOCALE_FR_UTF8 != none; then
22917 if test "$cross_compiling" = yes; then :
22920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22921 /* end confdefs.h. */
22923 #include <locale.h>
22924 #include <string.h>
22925 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22927 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22928 included before <wchar.h>. */
22929 #include <stddef.h>
22935 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
22941 memset (&state, '\0', sizeof (mbstate_t));
22942 wc = (wchar_t) 0xBADFACE;
22943 mbrtowc (&wc, NULL, 5, &state);
22944 /* Check that wc was not modified. */
22945 if (wc != (wchar_t) 0xBADFACE)
22951 if ac_fn_c_try_run "$LINENO"; then :
22952 gl_cv_func_mbrtowc_null_arg2=yes
22954 gl_cv_func_mbrtowc_null_arg2=no
22956 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
22957 conftest.$ac_objext conftest.beam conftest.$ac_ext
22963 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
22964 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
22971 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
22972 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
22973 if ${gl_cv_func_mbrtowc_retval+:} false; then :
22974 $as_echo_n "(cached) " >&6
22978 # Guess no on HP-UX, Solaris, native Windows.
22979 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
22980 # Guess yes otherwise.
22981 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
22983 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
22984 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
22985 if test "$cross_compiling" = yes; then :
22988 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
22989 /* end confdefs.h. */
22991 #include <locale.h>
22992 #include <string.h>
22993 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
22995 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
22996 included before <wchar.h>. */
22997 #include <stddef.h>
23004 int found_some_locale = 0;
23005 /* This fails on Solaris. */
23006 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23008 char input[] = "B\303\274\303\237er"; /* "Büßer" */
23012 memset (&state, '\0', sizeof (mbstate_t));
23013 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23016 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
23019 found_some_locale = 1;
23021 /* This fails on HP-UX 11.11. */
23022 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23024 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23028 memset (&state, '\0', sizeof (mbstate_t));
23029 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23032 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
23035 found_some_locale = 1;
23037 /* This fails on native Windows. */
23038 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
23040 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
23044 memset (&state, '\0', sizeof (mbstate_t));
23045 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23048 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23051 found_some_locale = 1;
23053 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
23055 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
23059 memset (&state, '\0', sizeof (mbstate_t));
23060 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23063 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23066 found_some_locale = 1;
23068 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
23070 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
23074 memset (&state, '\0', sizeof (mbstate_t));
23075 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
23078 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
23081 found_some_locale = 1;
23083 return (found_some_locale ? result : 77);
23086 if ac_fn_c_try_run "$LINENO"; then :
23087 gl_cv_func_mbrtowc_retval=yes
23089 if test $? != 77; then
23090 gl_cv_func_mbrtowc_retval=no
23094 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23095 conftest.$ac_objext conftest.beam conftest.$ac_ext
23101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
23102 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
23107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
23108 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
23109 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
23110 $as_echo_n "(cached) " >&6
23114 # Guess no on Solaris 8 and 9.
23115 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
23116 # Guess yes otherwise.
23117 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
23119 if test $LOCALE_ZH_CN != none; then
23120 if test "$cross_compiling" = yes; then :
23123 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23124 /* end confdefs.h. */
23126 #include <locale.h>
23127 #include <string.h>
23128 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23130 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23131 included before <wchar.h>. */
23132 #include <stddef.h>
23138 /* This fails on Solaris 8 and 9. */
23139 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23144 memset (&state, '\0', sizeof (mbstate_t));
23145 if (mbrtowc (&wc, "", 1, &state) != 0)
23151 if ac_fn_c_try_run "$LINENO"; then :
23152 gl_cv_func_mbrtowc_nul_retval=yes
23154 gl_cv_func_mbrtowc_nul_retval=no
23156 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23157 conftest.$ac_objext conftest.beam conftest.$ac_ext
23163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
23164 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
23166 case "$gl_cv_func_mbrtowc_null_arg1" in
23169 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
23174 case "$gl_cv_func_mbrtowc_null_arg2" in
23177 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
23182 case "$gl_cv_func_mbrtowc_retval" in
23185 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
23190 case "$gl_cv_func_mbrtowc_nul_retval" in
23193 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
23201 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
23210 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
23227 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
23236 GNULIB_MBSCASECMP=1
23242 $as_echo "#define GNULIB_TEST_MBSCASECMP 1" >>confdefs.h
23257 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
23261 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23262 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
23263 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23264 $as_echo_n "(cached) " >&6
23268 # Guess no on AIX and OSF/1.
23269 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23270 # Guess yes otherwise.
23271 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23273 if test $LOCALE_JA != none; then
23274 if test "$cross_compiling" = yes; then :
23277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23278 /* end confdefs.h. */
23280 #include <locale.h>
23281 #include <string.h>
23282 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23284 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23285 included before <wchar.h>. */
23286 #include <stddef.h>
23292 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23294 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23298 memset (&state, '\0', sizeof (mbstate_t));
23299 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23300 if (mbsinit (&state))
23306 if ac_fn_c_try_run "$LINENO"; then :
23307 gl_cv_func_mbrtowc_incomplete_state=yes
23309 gl_cv_func_mbrtowc_incomplete_state=no
23311 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23312 conftest.$ac_objext conftest.beam conftest.$ac_ext
23318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23319 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23325 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
23326 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23327 $as_echo_n "(cached) " >&6
23331 # Guess no on Solaris 8.
23332 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23333 # Guess yes otherwise.
23334 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
23336 if test $LOCALE_ZH_CN != none; then
23337 if test "$cross_compiling" = yes; then :
23340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23341 /* end confdefs.h. */
23343 #include <locale.h>
23344 #include <stdlib.h>
23345 #include <string.h>
23346 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23348 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23349 included before <wchar.h>. */
23350 #include <stddef.h>
23356 /* This fails on Solaris 8:
23357 mbrtowc returns 2, and sets wc to 0x00F0.
23358 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
23359 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23361 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
23365 memset (&state, '\0', sizeof (mbstate_t));
23366 if (mbrtowc (&wc, input + 3, 6, &state) != 4
23367 && mbtowc (&wc, input + 3, 6) == 4)
23373 if ac_fn_c_try_run "$LINENO"; then :
23374 gl_cv_func_mbrtowc_sanitycheck=yes
23376 gl_cv_func_mbrtowc_sanitycheck=no
23378 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23379 conftest.$ac_objext conftest.beam conftest.$ac_ext
23385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23386 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
23388 REPLACE_MBSTATE_T=0
23389 case "$gl_cv_func_mbrtowc_incomplete_state" in
23391 *) REPLACE_MBSTATE_T=1 ;;
23393 case "$gl_cv_func_mbrtowc_sanitycheck" in
23395 *) REPLACE_MBSTATE_T=1 ;;
23398 REPLACE_MBSTATE_T=1
23403 if test $ac_cv_func_mbsinit = no; then
23405 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
23406 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23408 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23409 included before <wchar.h>. */
23410 #include <stddef.h>
23416 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
23422 cat >>confdefs.h <<_ACEOF
23423 #define HAVE_DECL_MBSINIT $ac_have_decl
23426 if test $ac_cv_have_decl_mbsinit = yes; then
23430 if test $REPLACE_MBSTATE_T = 1; then
23434 mingw*) REPLACE_MBSINIT=1 ;;
23439 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
23448 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
23465 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
23479 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
23483 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23484 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
23485 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
23486 $as_echo_n "(cached) " >&6
23490 # Guess no on AIX and OSF/1.
23491 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
23492 # Guess yes otherwise.
23493 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
23495 if test $LOCALE_JA != none; then
23496 if test "$cross_compiling" = yes; then :
23499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23500 /* end confdefs.h. */
23502 #include <locale.h>
23503 #include <string.h>
23504 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23506 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23507 included before <wchar.h>. */
23508 #include <stddef.h>
23514 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23516 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23520 memset (&state, '\0', sizeof (mbstate_t));
23521 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23522 if (mbsinit (&state))
23528 if ac_fn_c_try_run "$LINENO"; then :
23529 gl_cv_func_mbrtowc_incomplete_state=yes
23531 gl_cv_func_mbrtowc_incomplete_state=no
23533 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23534 conftest.$ac_objext conftest.beam conftest.$ac_ext
23540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23541 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23547 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
23548 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
23549 $as_echo_n "(cached) " >&6
23553 # Guess no on Solaris 8.
23554 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
23555 # Guess yes otherwise.
23556 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
23558 if test $LOCALE_ZH_CN != none; then
23559 if test "$cross_compiling" = yes; then :
23562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23563 /* end confdefs.h. */
23565 #include <locale.h>
23566 #include <stdlib.h>
23567 #include <string.h>
23568 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23570 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23571 included before <wchar.h>. */
23572 #include <stddef.h>
23578 /* This fails on Solaris 8:
23579 mbrtowc returns 2, and sets wc to 0x00F0.
23580 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
23581 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23583 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
23587 memset (&state, '\0', sizeof (mbstate_t));
23588 if (mbrtowc (&wc, input + 3, 6, &state) != 4
23589 && mbtowc (&wc, input + 3, 6) == 4)
23595 if ac_fn_c_try_run "$LINENO"; then :
23596 gl_cv_func_mbrtowc_sanitycheck=yes
23598 gl_cv_func_mbrtowc_sanitycheck=no
23600 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23601 conftest.$ac_objext conftest.beam conftest.$ac_ext
23607 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
23608 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
23610 REPLACE_MBSTATE_T=0
23611 case "$gl_cv_func_mbrtowc_incomplete_state" in
23613 *) REPLACE_MBSTATE_T=1 ;;
23615 case "$gl_cv_func_mbrtowc_sanitycheck" in
23617 *) REPLACE_MBSTATE_T=1 ;;
23620 REPLACE_MBSTATE_T=1
23625 if test $ac_cv_func_mbsrtowcs = no; then
23627 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
23628 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23630 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23631 included before <wchar.h>. */
23632 #include <stddef.h>
23638 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then :
23644 cat >>confdefs.h <<_ACEOF
23645 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
23648 if test $ac_cv_have_decl_mbsrtowcs = yes; then
23649 REPLACE_MBSRTOWCS=1
23652 if test $REPLACE_MBSTATE_T = 1; then
23653 REPLACE_MBSRTOWCS=1
23661 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
23662 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
23663 if ${gl_cv_func_mbsrtowcs_works+:} false; then :
23664 $as_echo_n "(cached) " >&6
23668 # Guess no on HP-UX, Solaris, mingw.
23669 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;;
23670 # Guess yes otherwise.
23671 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;;
23673 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
23674 if test "$cross_compiling" = yes; then :
23677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
23678 /* end confdefs.h. */
23680 #include <locale.h>
23681 #include <string.h>
23682 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
23684 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
23685 included before <wchar.h>. */
23686 #include <stddef.h>
23693 /* Test whether the function supports a NULL destination argument.
23694 This fails on native Windows. */
23695 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
23697 const char input[] = "\337er";
23698 const char *src = input;
23701 memset (&state, '\0', sizeof (mbstate_t));
23702 if (mbsrtowcs (NULL, &src, 1, &state) != 3
23706 /* Test whether the function works when started with a conversion state
23707 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
23708 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23710 const char input[] = "B\303\274\303\237er";
23713 memset (&state, '\0', sizeof (mbstate_t));
23714 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
23715 if (!mbsinit (&state))
23717 const char *src = input + 2;
23718 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
23722 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23724 const char input[] = "<\306\374\313\334\270\354>";
23727 memset (&state, '\0', sizeof (mbstate_t));
23728 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
23729 if (!mbsinit (&state))
23731 const char *src = input + 4;
23732 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
23736 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
23738 const char input[] = "B\250\271\201\060\211\070er";
23741 memset (&state, '\0', sizeof (mbstate_t));
23742 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
23743 if (!mbsinit (&state))
23745 const char *src = input + 2;
23746 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
23753 if ac_fn_c_try_run "$LINENO"; then :
23754 gl_cv_func_mbsrtowcs_works=yes
23756 gl_cv_func_mbsrtowcs_works=no
23758 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
23759 conftest.$ac_objext conftest.beam conftest.$ac_ext
23765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
23766 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
23768 case "$gl_cv_func_mbsrtowcs_works" in
23770 *) REPLACE_MBSRTOWCS=1 ;;
23775 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then
23784 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext"
23794 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
23811 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
23822 if test $REPLACE_MBTOWC = 1; then
23831 gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext"
23848 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
23857 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
23866 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
23869 for ac_header in bp-sym.h
23871 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
23872 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
23873 cat >>confdefs.h <<_ACEOF
23874 #define HAVE_BP_SYM_H 1
23894 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
23904 for ac_func in mempcpy
23906 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy"
23907 if test "x$ac_cv_func_mempcpy" = xyes; then :
23908 cat >>confdefs.h <<_ACEOF
23909 #define HAVE_MEMPCPY 1
23915 if test $ac_cv_func_mempcpy = no; then
23919 if test $HAVE_MEMPCPY = 0; then
23928 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext"
23945 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
23954 if test $ac_cv_have_decl_memrchr = no; then
23955 HAVE_DECL_MEMRCHR=0
23958 for ac_func in memrchr
23960 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr"
23961 if test "x$ac_cv_func_memrchr" = xyes; then :
23962 cat >>confdefs.h <<_ACEOF
23963 #define HAVE_MEMRCHR 1
23970 if test $ac_cv_func_memrchr = no; then
23979 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext"
23994 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
24000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
24001 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
24002 if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
24003 $as_echo_n "(cached) " >&6
24005 rm -rf conftest.dir
24006 if test "$cross_compiling" = yes; then :
24008 # Guess yes on glibc systems.
24009 *-gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;;
24010 # If we don't know, assume the worst.
24011 *) gl_cv_func_mkdir_trailing_slash_works="guessing no" ;;
24015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24016 /* end confdefs.h. */
24018 # include <sys/types.h>
24019 # include <sys/stat.h>
24024 return mkdir ("conftest.dir/", 0700);
24029 if ac_fn_c_try_run "$LINENO"; then :
24030 gl_cv_func_mkdir_trailing_slash_works=yes
24032 gl_cv_func_mkdir_trailing_slash_works=no
24034 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24035 conftest.$ac_objext conftest.beam conftest.$ac_ext
24038 rm -rf conftest.dir
24042 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
24043 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
24044 case "$gl_cv_func_mkdir_trailing_slash_works" in
24051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
24052 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
24053 if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
24054 $as_echo_n "(cached) " >&6
24056 rm -rf conftest.dir
24057 if test "$cross_compiling" = yes; then :
24059 # Guess yes on glibc systems.
24060 *-gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;;
24061 # If we don't know, assume the worst.
24062 *) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;;
24066 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24067 /* end confdefs.h. */
24069 # include <sys/types.h>
24070 # include <sys/stat.h>
24075 return !mkdir ("conftest.dir/./", 0700);
24080 if ac_fn_c_try_run "$LINENO"; then :
24081 gl_cv_func_mkdir_trailing_dot_works=yes
24083 gl_cv_func_mkdir_trailing_dot_works=no
24085 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24086 conftest.$ac_objext conftest.beam conftest.$ac_ext
24089 rm -rf conftest.dir
24093 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
24094 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
24095 case "$gl_cv_func_mkdir_trailing_dot_works" in
24100 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
24105 if test $REPLACE_MKDIR = 1; then
24114 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
24121 if test $ac_cv_func_mkdirat != yes; then
24125 if test $HAVE_MKDIRAT = 0; then
24134 gl_LIBOBJS="$gl_LIBOBJS mkdirat.$ac_objext"
24151 $as_echo "#define GNULIB_TEST_MKDIRAT 1" >>confdefs.h
24157 for ac_func in mkdtemp
24159 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
24160 if test "x$ac_cv_func_mkdtemp" = xyes; then :
24161 cat >>confdefs.h <<_ACEOF
24162 #define HAVE_MKDTEMP 1
24168 if test $ac_cv_func_mkdtemp = no; then
24172 if test $HAVE_MKDTEMP = 0; then
24181 gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext"
24197 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
24204 if test $ac_cv_func_mkfifo = no; then
24208 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkfifo rejects trailing slashes" >&5
24209 $as_echo_n "checking whether mkfifo rejects trailing slashes... " >&6; }
24210 if ${gl_cv_func_mkfifo_works+:} false; then :
24211 $as_echo_n "(cached) " >&6
24213 # Assume that if we have lstat, we can also check symlinks.
24214 if test $ac_cv_func_lstat = yes; then
24215 ln -s conftest.tmp conftest.lnk
24217 if test "$cross_compiling" = yes; then :
24219 # Guess yes on glibc systems.
24220 *-gnu*) gl_cv_func_mkfifo_works="guessing yes" ;;
24221 # If we don't know, assume the worst.
24222 *) gl_cv_func_mkfifo_works="guessing no" ;;
24226 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24227 /* end confdefs.h. */
24228 #include <sys/stat.h>
24234 if (!mkfifo ("conftest.tmp/", 0600))
24237 if (!mkfifo ("conftest.lnk/", 0600))
24246 if ac_fn_c_try_run "$LINENO"; then :
24247 gl_cv_func_mkfifo_works=yes
24249 gl_cv_func_mkfifo_works=no
24251 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24252 conftest.$ac_objext conftest.beam conftest.$ac_ext
24255 rm -f conftest.tmp conftest.lnk
24257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkfifo_works" >&5
24258 $as_echo "$gl_cv_func_mkfifo_works" >&6; }
24259 case "$gl_cv_func_mkfifo_works" in
24263 $as_echo "#define MKFIFO_TRAILING_SLASH_BUG 1" >>confdefs.h
24270 if test $HAVE_MKFIFO = 0 || test $REPLACE_MKFIFO = 1; then
24279 gl_LIBOBJS="$gl_LIBOBJS mkfifo.$ac_objext"
24293 $as_echo "#define GNULIB_TEST_MKFIFO 1" >>confdefs.h
24302 if test $ac_cv_func_mkfifoat = no; then
24303 # No known system has mkfifoat but not mknodat
24308 if test $HAVE_MKFIFOAT = 0; then
24317 gl_LIBOBJS="$gl_LIBOBJS mkfifoat.$ac_objext"
24320 if test $HAVE_MKNODAT = 0; then
24329 gl_LIBOBJS="$gl_LIBOBJS mknodat.$ac_objext"
24343 $as_echo "#define GNULIB_TEST_MKFIFOAT 1" >>confdefs.h
24358 $as_echo "#define GNULIB_TEST_MKNODAT 1" >>confdefs.h
24367 if test $ac_cv_func_mknod = no; then
24370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mknod can create fifo without root privileges" >&5
24371 $as_echo_n "checking whether mknod can create fifo without root privileges... " >&6; }
24372 if ${gl_cv_func_mknod_works+:} false; then :
24373 $as_echo_n "(cached) " >&6
24375 if test "$cross_compiling" = yes; then :
24377 # Guess yes on glibc systems.
24378 *-gnu*) gl_cv_func_mknod_works="guessing yes" ;;
24379 # If we don't know, assume the worst.
24380 *) gl_cv_func_mknod_works="guessing no" ;;
24384 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24385 /* end confdefs.h. */
24386 #include <sys/stat.h>
24387 #include <unistd.h>
24389 /* Copied from root-uid.h. FIXME: Just use root-uid.h. */
24391 # define ROOT_UID 65535
24393 # define ROOT_UID 0
24399 /* Indeterminate for super-user, assume no. Why are you running
24400 configure as root, anyway? */
24401 if (geteuid () == ROOT_UID) return 99;
24402 if (mknod ("conftest.fifo", S_IFIFO | 0600, 0)) return 2;
24407 if ac_fn_c_try_run "$LINENO"; then :
24408 gl_cv_func_mknod_works=yes
24410 if test $? = 99 && test x"$FORCE_UNSAFE_CONFIGURE" = x; then
24411 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
24412 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
24413 as_fn_error $? "you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
24414 See \`config.log' for more details" "$LINENO" 5; }
24416 gl_cv_func_mknod_works=no
24418 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24419 conftest.$ac_objext conftest.beam conftest.$ac_ext
24422 rm -f conftest.fifo
24424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mknod_works" >&5
24425 $as_echo "$gl_cv_func_mknod_works" >&6; }
24426 case "$gl_cv_func_mknod_works" in
24431 $as_echo "#define MKNOD_FIFO_BUG 1" >>confdefs.h
24435 if test $REPLACE_MKFIFO = 1; then
24440 if test $HAVE_MKNOD = 0 || test $REPLACE_MKNOD = 1; then
24449 gl_LIBOBJS="$gl_LIBOBJS mknod.$ac_objext"
24463 $as_echo "#define GNULIB_TEST_MKNOD 1" >>confdefs.h
24473 if test $APPLE_UNIVERSAL_BUILD = 1; then
24474 # A universal build on Apple Mac OS X platforms.
24475 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
24476 # But we need a configuration result that is valid in both modes.
24477 gl_cv_func_working_mktime=no
24479 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
24480 $as_echo_n "checking for working mktime... " >&6; }
24481 if ${gl_cv_func_working_mktime+:} false; then :
24482 $as_echo_n "(cached) " >&6
24484 if test "$cross_compiling" = yes; then :
24485 gl_cv_func_working_mktime=no
24487 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24488 /* end confdefs.h. */
24489 /* Test program from Paul Eggert and Tony Leneis. */
24490 #include <limits.h>
24491 #include <stdlib.h>
24494 #ifdef HAVE_UNISTD_H
24495 # include <unistd.h>
24498 #if HAVE_DECL_ALARM
24499 # include <signal.h>
24502 /* Work around redefinition to rpl_putenv by other config tests. */
24505 static time_t time_t_max;
24506 static time_t time_t_min;
24508 /* Values we'll use to set the TZ environment variable. */
24509 static char *tz_strings[] = {
24510 (char *) 0, "TZ=GMT0", "TZ=JST-9",
24511 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
24513 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
24515 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
24516 Based on a problem report from Andreas Jaeger. */
24518 spring_forward_gap ()
24520 /* glibc (up to about 1998-10-07) failed this test. */
24523 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24524 instead of "TZ=America/Vancouver" in order to detect the bug even
24525 on systems that don't support the Olson extension, or don't have the
24526 full zoneinfo tables installed. */
24527 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
24536 return mktime (&tm) != (time_t) -1;
24540 mktime_test1 (time_t now)
24543 return ! (lt = localtime (&now)) || mktime (lt) == now;
24547 mktime_test (time_t now)
24549 return (mktime_test1 (now)
24550 && mktime_test1 ((time_t) (time_t_max - now))
24551 && mktime_test1 ((time_t) (time_t_min + now)));
24557 /* Based on code from Ariel Faigon. */
24567 return tm.tm_mon == 2 && tm.tm_mday == 31;
24571 bigtime_test (int j)
24575 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
24576 now = mktime (&tm);
24577 if (now != (time_t) -1)
24579 struct tm *lt = localtime (&now);
24581 && lt->tm_year == tm.tm_year
24582 && lt->tm_mon == tm.tm_mon
24583 && lt->tm_mday == tm.tm_mday
24584 && lt->tm_hour == tm.tm_hour
24585 && lt->tm_min == tm.tm_min
24586 && lt->tm_sec == tm.tm_sec
24587 && lt->tm_yday == tm.tm_yday
24588 && lt->tm_wday == tm.tm_wday
24589 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
24590 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
24599 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
24600 ignoring leap seconds. */
24601 unsigned long int answer = 2527315200UL;
24605 tm.tm_year = 2050 - 1900;
24608 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
24611 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
24612 instead of "TZ=America/Vancouver" in order to detect the bug even
24613 on systems that don't support the Olson extension, or don't have the
24614 full zoneinfo tables installed. */
24615 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
24619 /* Check that the result is either a failure, or close enough
24620 to the correct answer that we can assume the discrepancy is
24621 due to leap seconds. */
24622 return (t == (time_t) -1
24623 || (0 < t && answer - 120 <= t && t <= answer + 120));
24632 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
24633 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
24635 #if HAVE_DECL_ALARM
24636 /* This test makes some buggy mktime implementations loop.
24637 Give up after 60 seconds; a mktime slower than that
24638 isn't worth using anyway. */
24639 signal (SIGALRM, SIG_DFL);
24643 time_t_max = (! time_t_signed
24645 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
24647 time_t_min = (! time_t_signed
24649 : time_t_signed_magnitude
24653 delta = time_t_max / 997; /* a suitable prime number */
24654 for (i = 0; i < N_STRINGS; i++)
24657 putenv (tz_strings[i]);
24659 for (t = 0; t <= time_t_max - delta && (result & 1) == 0; t += delta)
24660 if (! mktime_test (t))
24662 if ((result & 2) == 0
24663 && ! (mktime_test ((time_t) 1)
24664 && mktime_test ((time_t) (60 * 60))
24665 && mktime_test ((time_t) (60 * 60 * 24))))
24668 for (j = 1; (result & 4) == 0; j <<= 1)
24670 if (! bigtime_test (j))
24672 if (INT_MAX / 2 < j)
24675 if ((result & 8) == 0 && ! bigtime_test (INT_MAX))
24678 if (! irix_6_4_bug ())
24680 if (! spring_forward_gap ())
24682 if (! year_2050_test ())
24687 if ac_fn_c_try_run "$LINENO"; then :
24688 gl_cv_func_working_mktime=yes
24690 gl_cv_func_working_mktime=no
24692 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24693 conftest.$ac_objext conftest.beam conftest.$ac_ext
24698 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
24699 $as_echo "$gl_cv_func_working_mktime" >&6; }
24701 if test $gl_cv_func_working_mktime = no; then
24707 if test $REPLACE_MKTIME = 1; then
24716 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
24731 $as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
24740 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
24741 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
24743 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
24746 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
24750 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
24759 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
24765 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
24774 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
24782 if test $ac_cv_func_nl_langinfo = yes; then
24783 # On Irix 6.5, YESEXPR is defined, but nl_langinfo(YESEXPR) is broken.
24784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether YESEXPR works" >&5
24785 $as_echo_n "checking whether YESEXPR works... " >&6; }
24786 if ${gl_cv_func_nl_langinfo_yesexpr_works+:} false; then :
24787 $as_echo_n "(cached) " >&6
24789 if test "$cross_compiling" = yes; then :
24792 # Guess no on irix systems.
24793 irix*) gl_cv_func_nl_langinfo_yesexpr_works="guessing no";;
24794 # Guess yes elsewhere.
24795 *) gl_cv_func_nl_langinfo_yesexpr_works="guessing yes";;
24799 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24800 /* end confdefs.h. */
24801 #include <langinfo.h>
24806 return !*nl_langinfo(YESEXPR);
24812 if ac_fn_c_try_run "$LINENO"; then :
24813 gl_cv_func_nl_langinfo_yesexpr_works=yes
24815 gl_cv_func_nl_langinfo_yesexpr_works=no
24817 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24818 conftest.$ac_objext conftest.beam conftest.$ac_ext
24823 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_nl_langinfo_yesexpr_works" >&5
24824 $as_echo "$gl_cv_func_nl_langinfo_yesexpr_works" >&6; }
24825 case $gl_cv_func_nl_langinfo_yesexpr_works in
24826 *yes) FUNC_NL_LANGINFO_YESEXPR_WORKS=1 ;;
24827 *) FUNC_NL_LANGINFO_YESEXPR_WORKS=0 ;;
24830 cat >>confdefs.h <<_ACEOF
24831 #define FUNC_NL_LANGINFO_YESEXPR_WORKS $FUNC_NL_LANGINFO_YESEXPR_WORKS
24834 if test $HAVE_LANGINFO_CODESET = 1 && test $HAVE_LANGINFO_ERA = 1 \
24835 && test $FUNC_NL_LANGINFO_YESEXPR_WORKS = 1; then
24838 REPLACE_NL_LANGINFO=1
24840 $as_echo "#define REPLACE_NL_LANGINFO 1" >>confdefs.h
24847 if test $HAVE_NL_LANGINFO = 0 || test $REPLACE_NL_LANGINFO = 1; then
24856 gl_LIBOBJS="$gl_LIBOBJS nl_langinfo.$ac_objext"
24864 GNULIB_NL_LANGINFO=1
24870 $as_echo "#define GNULIB_TEST_NL_LANGINFO 1" >>confdefs.h
24886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5
24887 $as_echo_n "checking for obstacks... " >&6; }
24888 if ${ac_cv_func_obstack+:} false; then :
24889 $as_echo_n "(cached) " >&6
24891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24892 /* end confdefs.h. */
24893 $ac_includes_default
24894 #include "obstack.h"
24898 struct obstack mem;
24899 #define obstack_chunk_alloc malloc
24900 #define obstack_chunk_free free
24901 obstack_init (&mem);
24902 obstack_free (&mem, 0);
24907 if ac_fn_c_try_link "$LINENO"; then :
24908 ac_cv_func_obstack=yes
24910 ac_cv_func_obstack=no
24912 rm -f core conftest.err conftest.$ac_objext \
24913 conftest$ac_exeext conftest.$ac_ext
24915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5
24916 $as_echo "$ac_cv_func_obstack" >&6; }
24917 if test $ac_cv_func_obstack = yes; then
24919 $as_echo "#define HAVE_OBSTACK 1" >>confdefs.h
24930 gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext"
24942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
24943 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
24944 if ${gl_cv_func_open_slash+:} false; then :
24945 $as_echo_n "(cached) " >&6
24947 # Assume that if we have lstat, we can also check symlinks.
24948 if test $ac_cv_func_lstat = yes; then
24950 ln -s conftest.tmp conftest.lnk
24952 if test "$cross_compiling" = yes; then :
24955 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*)
24956 gl_cv_func_open_slash="guessing no" ;;
24958 gl_cv_func_open_slash="guessing yes" ;;
24962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
24963 /* end confdefs.h. */
24967 # include <unistd.h>
24973 if (open ("conftest.lnk/", O_RDONLY) != -1)
24976 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
24981 if ac_fn_c_try_run "$LINENO"; then :
24982 gl_cv_func_open_slash=yes
24984 gl_cv_func_open_slash=no
24986 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
24987 conftest.$ac_objext conftest.beam conftest.$ac_ext
24990 rm -f conftest.sl conftest.tmp conftest.lnk
24993 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
24994 $as_echo "$gl_cv_func_open_slash" >&6; }
24995 case "$gl_cv_func_open_slash" in
24998 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
25006 if test $REPLACE_OPEN = 0; then
25010 if test $ac_cv_func_fchdir = no; then
25014 if test $HAVE_FCHDIR = 0; then
25021 if test $REPLACE_OPEN = 1; then
25030 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext"
25048 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
25057 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink in
25061 # Solaris 9 has *at functions, but uniformly mishandles trailing
25062 # slash in all of them.
25070 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then
25079 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext"
25088 cat >>confdefs.h <<_ACEOF
25089 #define GNULIB_OPENAT 1
25103 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
25110 for ac_func in opendir
25112 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
25113 if test "x$ac_cv_func_opendir" = xyes; then :
25114 cat >>confdefs.h <<_ACEOF
25115 #define HAVE_OPENDIR 1
25121 if test $ac_cv_func_opendir = no; then
25128 if test $ac_cv_func_fchdir = no; then
25132 if test $HAVE_FCHDIR = 0; then
25133 if test $HAVE_OPENDIR = 1; then
25139 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
25148 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
25162 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
25172 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
25173 #include <$ac_cv_struct_tm>
25176 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
25178 cat >>confdefs.h <<_ACEOF
25179 #define HAVE_STRUCT_TM_TM_ZONE 1
25185 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
25187 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
25190 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
25192 if test "x$ac_cv_have_decl_tzname" = xyes; then :
25198 cat >>confdefs.h <<_ACEOF
25199 #define HAVE_DECL_TZNAME $ac_have_decl
25202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
25203 $as_echo_n "checking for tzname... " >&6; }
25204 if ${ac_cv_var_tzname+:} false; then :
25205 $as_echo_n "(cached) " >&6
25207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25208 /* end confdefs.h. */
25210 #if !HAVE_DECL_TZNAME
25211 extern char *tzname[];
25217 return tzname[0][0];
25222 if ac_fn_c_try_link "$LINENO"; then :
25223 ac_cv_var_tzname=yes
25225 ac_cv_var_tzname=no
25227 rm -f core conftest.err conftest.$ac_objext \
25228 conftest$ac_exeext conftest.$ac_ext
25230 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
25231 $as_echo "$ac_cv_var_tzname" >&6; }
25232 if test $ac_cv_var_tzname = yes; then
25234 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
25241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25242 /* end confdefs.h. */
25244 #include <time.h> /* for time_t */
25245 #include <limits.h> /* for CHAR_BIT, LONG_MIN, LONG_MAX */
25246 #define TYPE_MINIMUM(t) \
25247 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
25248 #define TYPE_MAXIMUM(t) \
25249 ((t) ((t) 0 < (t) -1 \
25251 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
25252 typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1];
25253 typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1];
25256 if ac_fn_c_try_compile "$LINENO"; then :
25258 $as_echo "#define TIME_T_FITS_IN_LONG_INT 1" >>confdefs.h
25262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25268 for ac_func in getppriv
25270 ac_fn_c_check_func "$LINENO" "getppriv" "ac_cv_func_getppriv"
25271 if test "x$ac_cv_func_getppriv" = xyes; then :
25272 cat >>confdefs.h <<_ACEOF
25273 #define HAVE_GETPPRIV 1
25281 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
25283 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
25289 cat >>confdefs.h <<_ACEOF
25290 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
25293 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
25295 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
25301 cat >>confdefs.h <<_ACEOF
25302 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
25306 # Check whether --enable-acl was given.
25307 if test "${enable_acl+set}" = set; then :
25308 enableval=$enable_acl;
25316 if test "x$enable_acl" != "xno"; then
25317 for ac_header in sys/acl.h
25319 ac_fn_c_check_header_mongrel "$LINENO" "sys/acl.h" "ac_cv_header_sys_acl_h" "$ac_includes_default"
25320 if test "x$ac_cv_header_sys_acl_h" = xyes; then :
25321 cat >>confdefs.h <<_ACEOF
25322 #define HAVE_SYS_ACL_H 1
25329 if test $ac_cv_header_sys_acl_h = yes; then
25332 if test $use_acl = 0; then
25333 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_get_file" >&5
25334 $as_echo_n "checking for library containing acl_get_file... " >&6; }
25335 if ${ac_cv_search_acl_get_file+:} false; then :
25336 $as_echo_n "(cached) " >&6
25338 ac_func_search_save_LIBS=$LIBS
25339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25340 /* end confdefs.h. */
25342 /* Override any GCC internal prototype to avoid an error.
25343 Use char because int might match the return type of a GCC
25344 builtin and then its argument prototype would still apply. */
25348 char acl_get_file ();
25352 return acl_get_file ();
25357 for ac_lib in '' acl pacl; do
25358 if test -z "$ac_lib"; then
25359 ac_res="none required"
25362 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25364 if ac_fn_c_try_link "$LINENO"; then :
25365 ac_cv_search_acl_get_file=$ac_res
25367 rm -f core conftest.err conftest.$ac_objext \
25369 if ${ac_cv_search_acl_get_file+:} false; then :
25373 if ${ac_cv_search_acl_get_file+:} false; then :
25376 ac_cv_search_acl_get_file=no
25378 rm conftest.$ac_ext
25379 LIBS=$ac_func_search_save_LIBS
25381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_get_file" >&5
25382 $as_echo "$ac_cv_search_acl_get_file" >&6; }
25383 ac_res=$ac_cv_search_acl_get_file
25384 if test "$ac_res" != no; then :
25385 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25386 if test "$ac_cv_search_acl_get_file" != "none required"; then
25387 LIB_ACL=$ac_cv_search_acl_get_file
25389 for ac_func in acl_get_file acl_get_fd acl_set_file acl_set_fd \
25390 acl_free acl_from_mode acl_from_text \
25391 acl_delete_def_file acl_extended_file \
25392 acl_delete_fd_np acl_delete_file_np \
25393 acl_copy_ext_native acl_create_entry_np \
25394 acl_to_short_text acl_free_text
25396 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
25397 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
25398 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
25399 cat >>confdefs.h <<_ACEOF
25400 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
25406 # If the acl_get_file bug is detected, don't enable the ACL support.
25408 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working acl_get_file" >&5
25409 $as_echo_n "checking for working acl_get_file... " >&6; }
25410 if ${gl_cv_func_working_acl_get_file+:} false; then :
25411 $as_echo_n "(cached) " >&6
25413 if test "$cross_compiling" = yes; then :
25414 gl_cv_func_working_acl_get_file=cross-compiling
25416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25417 /* end confdefs.h. */
25418 #include <sys/types.h>
25419 #include <sys/acl.h>
25425 if (!acl_get_file (".", ACL_TYPE_ACCESS) && errno == ENOENT)
25433 if ac_fn_c_try_run "$LINENO"; then :
25434 gl_cv_func_working_acl_get_file=yes
25436 gl_cv_func_working_acl_get_file=no
25438 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
25439 conftest.$ac_objext conftest.beam conftest.$ac_ext
25443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_acl_get_file" >&5
25444 $as_echo "$gl_cv_func_working_acl_get_file" >&6; }
25446 if test $gl_cv_func_working_acl_get_file = yes; then :
25450 if test $use_acl = 1; then
25451 for ac_header in acl/libacl.h
25453 ac_fn_c_check_header_mongrel "$LINENO" "acl/libacl.h" "ac_cv_header_acl_libacl_h" "$ac_includes_default"
25454 if test "x$ac_cv_header_acl_libacl_h" = xyes; then :
25455 cat >>confdefs.h <<_ACEOF
25456 #define HAVE_ACL_LIBACL_H 1
25471 for ac_func in acl_entries
25473 ac_fn_c_check_func "$LINENO" "acl_entries" "ac_cv_func_acl_entries"
25474 if test "x$ac_cv_func_acl_entries" = xyes; then :
25475 cat >>confdefs.h <<_ACEOF
25476 #define HAVE_ACL_ENTRIES 1
25481 gl_LIBOBJS="$gl_LIBOBJS $ac_func.$ac_objext"
25487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_FIRST_ENTRY" >&5
25488 $as_echo_n "checking for ACL_FIRST_ENTRY... " >&6; }
25489 if ${gl_cv_acl_ACL_FIRST_ENTRY+:} false; then :
25490 $as_echo_n "(cached) " >&6
25492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25493 /* end confdefs.h. */
25494 #include <sys/types.h>
25495 #include <sys/acl.h>
25496 int type = ACL_FIRST_ENTRY;
25505 if ac_fn_c_try_compile "$LINENO"; then :
25506 gl_cv_acl_ACL_FIRST_ENTRY=yes
25508 gl_cv_acl_ACL_FIRST_ENTRY=no
25510 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_FIRST_ENTRY" >&5
25513 $as_echo "$gl_cv_acl_ACL_FIRST_ENTRY" >&6; }
25514 if test $gl_cv_acl_ACL_FIRST_ENTRY = yes; then
25516 $as_echo "#define HAVE_ACL_FIRST_ENTRY 1" >>confdefs.h
25519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ACL_TYPE_EXTENDED" >&5
25520 $as_echo_n "checking for ACL_TYPE_EXTENDED... " >&6; }
25521 if ${gl_cv_acl_ACL_TYPE_EXTENDED+:} false; then :
25522 $as_echo_n "(cached) " >&6
25524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25525 /* end confdefs.h. */
25526 #include <sys/types.h>
25527 #include <sys/acl.h>
25528 int type = ACL_TYPE_EXTENDED;
25537 if ac_fn_c_try_compile "$LINENO"; then :
25538 gl_cv_acl_ACL_TYPE_EXTENDED=yes
25540 gl_cv_acl_ACL_TYPE_EXTENDED=no
25542 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25544 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_acl_ACL_TYPE_EXTENDED" >&5
25545 $as_echo "$gl_cv_acl_ACL_TYPE_EXTENDED" >&6; }
25546 if test $gl_cv_acl_ACL_TYPE_EXTENDED = yes; then
25548 $as_echo "#define HAVE_ACL_TYPE_EXTENDED 1" >>confdefs.h
25559 if test $use_acl = 0; then
25560 for ac_func in facl
25562 ac_fn_c_check_func "$LINENO" "facl" "ac_cv_func_facl"
25563 if test "x$ac_cv_func_facl" = xyes; then :
25564 cat >>confdefs.h <<_ACEOF
25565 #define HAVE_FACL 1
25571 if test $ac_cv_func_facl = yes; then
25572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing acl_trivial" >&5
25573 $as_echo_n "checking for library containing acl_trivial... " >&6; }
25574 if ${ac_cv_search_acl_trivial+:} false; then :
25575 $as_echo_n "(cached) " >&6
25577 ac_func_search_save_LIBS=$LIBS
25578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25579 /* end confdefs.h. */
25581 /* Override any GCC internal prototype to avoid an error.
25582 Use char because int might match the return type of a GCC
25583 builtin and then its argument prototype would still apply. */
25587 char acl_trivial ();
25591 return acl_trivial ();
25596 for ac_lib in '' sec; do
25597 if test -z "$ac_lib"; then
25598 ac_res="none required"
25601 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
25603 if ac_fn_c_try_link "$LINENO"; then :
25604 ac_cv_search_acl_trivial=$ac_res
25606 rm -f core conftest.err conftest.$ac_objext \
25608 if ${ac_cv_search_acl_trivial+:} false; then :
25612 if ${ac_cv_search_acl_trivial+:} false; then :
25615 ac_cv_search_acl_trivial=no
25617 rm conftest.$ac_ext
25618 LIBS=$ac_func_search_save_LIBS
25620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_acl_trivial" >&5
25621 $as_echo "$ac_cv_search_acl_trivial" >&6; }
25622 ac_res=$ac_cv_search_acl_trivial
25623 if test "$ac_res" != no; then :
25624 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
25625 if test "$ac_cv_search_acl_trivial" != "none required"; then
25626 LIB_ACL=$ac_cv_search_acl_trivial
25631 for ac_func in acl_trivial
25633 ac_fn_c_check_func "$LINENO" "acl_trivial" "ac_cv_func_acl_trivial"
25634 if test "x$ac_cv_func_acl_trivial" = xyes; then :
25635 cat >>confdefs.h <<_ACEOF
25636 #define HAVE_ACL_TRIVIAL 1
25646 if test $use_acl = 0; then
25647 for ac_func in getacl
25649 ac_fn_c_check_func "$LINENO" "getacl" "ac_cv_func_getacl"
25650 if test "x$ac_cv_func_getacl" = xyes; then :
25651 cat >>confdefs.h <<_ACEOF
25652 #define HAVE_GETACL 1
25658 if test $ac_cv_func_getacl = yes; then
25661 for ac_header in aclv.h
25663 ac_fn_c_check_header_compile "$LINENO" "aclv.h" "ac_cv_header_aclv_h" "#include <sys/types.h>
25665 if test "x$ac_cv_header_aclv_h" = xyes; then :
25666 cat >>confdefs.h <<_ACEOF
25667 #define HAVE_ACLV_H 1
25676 if test $use_acl = 0; then
25677 for ac_func in aclx_get
25679 ac_fn_c_check_func "$LINENO" "aclx_get" "ac_cv_func_aclx_get"
25680 if test "x$ac_cv_func_aclx_get" = xyes; then :
25681 cat >>confdefs.h <<_ACEOF
25682 #define HAVE_ACLX_GET 1
25688 if test $ac_cv_func_aclx_get = yes; then
25693 if test $use_acl = 0 || test "$ac_cv_func_aclx_get" = yes; then
25694 for ac_func in statacl
25696 ac_fn_c_check_func "$LINENO" "statacl" "ac_cv_func_statacl"
25697 if test "x$ac_cv_func_statacl" = xyes; then :
25698 cat >>confdefs.h <<_ACEOF
25699 #define HAVE_STATACL 1
25705 if test $ac_cv_func_statacl = yes; then
25710 if test $use_acl = 0; then
25711 for ac_func in aclsort
25713 ac_fn_c_check_func "$LINENO" "aclsort" "ac_cv_func_aclsort"
25714 if test "x$ac_cv_func_aclsort" = xyes; then :
25715 cat >>confdefs.h <<_ACEOF
25716 #define HAVE_ACLSORT 1
25722 if test $ac_cv_func_aclsort = yes; then
25729 if test "x$enable_acl$use_acl" = "xyes0"; then
25730 as_fn_error $? "ACLs enabled but support not detected" "$LINENO" 5
25731 elif test "x$enable_acl$use_acl" = "xauto0"; then
25732 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libacl development library was not found or not usable." >&5
25733 $as_echo "$as_me: WARNING: libacl development library was not found or not usable." >&2;}
25734 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be built without ACL support." >&5
25735 $as_echo "$as_me: WARNING: GNU tar will be built without ACL support." >&2;}
25740 cat >>confdefs.h <<_ACEOF
25741 #define USE_ACL $use_acl
25757 for ac_func in raise
25759 ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
25760 if test "x$ac_cv_func_raise" = xyes; then :
25761 cat >>confdefs.h <<_ACEOF
25762 #define HAVE_RAISE 1
25768 if test $ac_cv_func_raise = no; then
25771 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25777 if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
25786 gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
25801 $as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
25809 for ac_func in rawmemchr
25811 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
25812 if test "x$ac_cv_func_rawmemchr" = xyes; then :
25813 cat >>confdefs.h <<_ACEOF
25814 #define HAVE_RAWMEMCHR 1
25820 if test $ac_cv_func_rawmemchr = no; then
25824 if test $HAVE_RAWMEMCHR = 0; then
25833 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext"
25848 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
25855 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
25860 if test $REPLACE_READ = 1; then
25869 gl_LIBOBJS="$gl_LIBOBJS read.$ac_objext"
25884 $as_echo "#define GNULIB_TEST_READ 1" >>confdefs.h
25891 for ac_func in readdir
25893 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
25894 if test "x$ac_cv_func_readdir" = xyes; then :
25895 cat >>confdefs.h <<_ACEOF
25896 #define HAVE_READDIR 1
25902 if test $ac_cv_func_readdir = no; then
25906 if test $HAVE_READDIR = 0; then
25915 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
25929 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
25936 if test $ac_cv_func_readlink = no; then
25939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
25940 $as_echo_n "checking whether readlink signature is correct... " >&6; }
25941 if ${gl_cv_decl_readlink_works+:} false; then :
25942 $as_echo_n "(cached) " >&6
25944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25945 /* end confdefs.h. */
25946 #include <unistd.h>
25947 /* Cause compilation failure if original declaration has wrong type. */
25948 ssize_t readlink (const char *, char *, size_t);
25957 if ac_fn_c_try_compile "$LINENO"; then :
25958 gl_cv_decl_readlink_works=yes
25960 gl_cv_decl_readlink_works=no
25962 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
25964 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
25965 $as_echo "$gl_cv_decl_readlink_works" >&6; }
25966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
25967 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
25968 if ${gl_cv_func_readlink_works+:} false; then :
25969 $as_echo_n "(cached) " >&6
25971 # We have readlink, so assume ln -s works.
25972 ln -s conftest.no-such conftest.link
25973 ln -s conftest.link conftest.lnk2
25974 if test "$cross_compiling" = yes; then :
25976 # Guess yes on glibc systems.
25977 *-gnu*) gl_cv_func_readlink_works="guessing yes" ;;
25978 # If we don't know, assume the worst.
25979 *) gl_cv_func_readlink_works="guessing no" ;;
25983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
25984 /* end confdefs.h. */
25985 #include <unistd.h>
25991 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
25996 if ac_fn_c_try_run "$LINENO"; then :
25997 gl_cv_func_readlink_works=yes
25999 gl_cv_func_readlink_works=no
26001 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26002 conftest.$ac_objext conftest.beam conftest.$ac_ext
26005 rm -f conftest.link conftest.lnk2
26007 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
26008 $as_echo "$gl_cv_func_readlink_works" >&6; }
26009 case "$gl_cv_func_readlink_works" in
26011 if test "$gl_cv_decl_readlink_works" != yes; then
26017 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
26024 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
26033 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
26050 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
26058 if test $ac_cv_func_readlinkat = no; then
26062 if test $HAVE_READLINKAT = 0; then
26071 gl_LIBOBJS="$gl_LIBOBJS readlinkat.$ac_objext"
26079 GNULIB_READLINKAT=1
26085 $as_echo "#define GNULIB_TEST_READLINKAT 1" >>confdefs.h
26092 if test $gl_cv_func_malloc_posix = yes; then
26094 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
26100 if test $REPLACE_REALLOC = 1; then
26109 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
26117 GNULIB_REALLOC_POSIX=1
26123 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
26129 # Check whether --with-included-regex was given.
26130 if test "${with_included_regex+set}" = set; then :
26131 withval=$with_included_regex;
26135 case $with_included_regex in #(
26136 yes|no) ac_use_included_regex=$with_included_regex
26139 # If the system regex support is good enough that it passes the
26140 # following run test, then default to *not* using the included regex.c.
26141 # If cross compiling, assume the test would fail and use the included
26144 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working re_compile_pattern" >&5
26145 $as_echo_n "checking for working re_compile_pattern... " >&6; }
26146 if ${gl_cv_func_re_compile_pattern_working+:} false; then :
26147 $as_echo_n "(cached) " >&6
26149 if test "$cross_compiling" = yes; then :
26150 gl_cv_func_re_compile_pattern_working=no
26152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26153 /* end confdefs.h. */
26156 #include <locale.h>
26157 #include <limits.h>
26158 #include <string.h>
26159 #if HAVE_DECL_ALARM
26160 # include <unistd.h>
26161 # include <signal.h>
26168 static struct re_pattern_buffer regex;
26169 unsigned char folded_chars[UCHAR_MAX + 1];
26172 struct re_registers regs;
26174 #if HAVE_DECL_ALARM
26175 /* Some builds of glibc go into an infinite loop on this test. */
26176 signal (SIGALRM, SIG_DFL);
26179 if (setlocale (LC_ALL, "en_US.UTF-8"))
26182 /* http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html
26183 This test needs valgrind to catch the bug on Debian
26184 GNU/Linux 3.1 x86, but it might catch the bug better
26185 on other platforms and it shouldn't hurt to try the
26187 static char const pat[] = "insert into";
26188 static char const data[] =
26189 "\xFF\0\x12\xA2\xAA\xC4\xB1,K\x12\xC4\xB1*\xACK";
26190 re_set_syntax (RE_SYNTAX_GREP | RE_HAT_LISTS_NOT_NEWLINE
26192 memset (®ex, 0, sizeof regex);
26193 s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
26196 else if (re_search (®ex, data, sizeof data - 1,
26197 0, sizeof data - 1, ®s)
26203 /* This test is from glibc bug 15078.
26204 The test case is from Andreas Schwab in
26205 <http://www.sourceware.org/ml/libc-alpha/2013-01/msg00967.html>.
26207 static char const pat[] = "[^x]x";
26208 static char const data[] =
26209 /* <U1000><U103B><U103D><U1014><U103A><U102F><U1015><U103A> */
26220 memset (®ex, 0, sizeof regex);
26221 s = re_compile_pattern (pat, sizeof pat - 1, ®ex);
26226 i = re_search (®ex, data, sizeof data - 1,
26227 0, sizeof data - 1, 0);
26228 if (i != 0 && i != 21)
26233 if (! setlocale (LC_ALL, "C"))
26237 /* This test is from glibc bug 3957, reported by Andrew Mackey. */
26238 re_set_syntax (RE_SYNTAX_EGREP | RE_HAT_LISTS_NOT_NEWLINE);
26239 memset (®ex, 0, sizeof regex);
26240 s = re_compile_pattern ("a[^x]b", 6, ®ex);
26243 /* This should fail, but succeeds for glibc-2.5. */
26244 else if (re_search (®ex, "a\nb", 3, 0, 3, ®s) != -1)
26247 /* This regular expression is from Spencer ere test number 75
26249 re_set_syntax (RE_SYNTAX_POSIX_EGREP);
26250 memset (®ex, 0, sizeof regex);
26251 for (i = 0; i <= UCHAR_MAX; i++)
26252 folded_chars[i] = i;
26253 regex.translate = folded_chars;
26254 s = re_compile_pattern ("a[[:]:]]b\n", 11, ®ex);
26255 /* This should fail with _Invalid character class name_ error. */
26259 /* Ensure that [b-a] is diagnosed as invalid, when
26260 using RE_NO_EMPTY_RANGES. */
26261 re_set_syntax (RE_SYNTAX_POSIX_EGREP | RE_NO_EMPTY_RANGES);
26262 memset (®ex, 0, sizeof regex);
26263 s = re_compile_pattern ("a[b-a]", 6, ®ex);
26267 /* This should succeed, but does not for glibc-2.1.3. */
26268 memset (®ex, 0, sizeof regex);
26269 s = re_compile_pattern ("{1", 2, ®ex);
26273 /* The following example is derived from a problem report
26274 against gawk from Jorge Stolfi <stolfi@ic.unicamp.br>. */
26275 memset (®ex, 0, sizeof regex);
26276 s = re_compile_pattern ("[an\371]*n", 7, ®ex);
26279 /* This should match, but does not for glibc-2.2.1. */
26280 else if (re_match (®ex, "an", 2, 0, ®s) != 2)
26283 memset (®ex, 0, sizeof regex);
26284 s = re_compile_pattern ("x", 1, ®ex);
26287 /* glibc-2.2.93 does not work with a negative RANGE argument. */
26288 else if (re_search (®ex, "wxy", 3, 2, -2, ®s) != 1)
26291 /* The version of regex.c in older versions of gnulib
26292 ignored RE_ICASE. Detect that problem too. */
26293 re_set_syntax (RE_SYNTAX_EMACS | RE_ICASE);
26294 memset (®ex, 0, sizeof regex);
26295 s = re_compile_pattern ("x", 1, ®ex);
26298 else if (re_search (®ex, "WXY", 3, 0, 3, ®s) < 0)
26301 /* Catch a bug reported by Vin Shelton in
26302 http://lists.gnu.org/archive/html/bug-coreutils/2007-06/msg00089.html
26304 re_set_syntax (RE_SYNTAX_POSIX_BASIC
26305 & ~RE_CONTEXT_INVALID_DUP
26306 & ~RE_NO_EMPTY_RANGES);
26307 memset (®ex, 0, sizeof regex);
26308 s = re_compile_pattern ("[[:alnum:]_-]\\\\+$", 16, ®ex);
26312 /* REG_STARTEND was added to glibc on 2004-01-15.
26313 Reject older versions. */
26314 if (! REG_STARTEND)
26318 /* It would be nice to reject hosts whose regoff_t values are too
26319 narrow (including glibc on hosts with 64-bit ptrdiff_t and
26320 32-bit int), but we should wait until glibc implements this
26321 feature. Otherwise, support for equivalence classes and
26322 multibyte collation symbols would always be broken except
26323 when compiling --without-included-regex. */
26324 if (sizeof (regoff_t) < sizeof (ptrdiff_t)
26325 || sizeof (regoff_t) < sizeof (ssize_t))
26335 if ac_fn_c_try_run "$LINENO"; then :
26336 gl_cv_func_re_compile_pattern_working=yes
26338 gl_cv_func_re_compile_pattern_working=no
26340 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26341 conftest.$ac_objext conftest.beam conftest.$ac_ext
26345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_re_compile_pattern_working" >&5
26346 $as_echo "$gl_cv_func_re_compile_pattern_working" >&6; }
26347 case $gl_cv_func_re_compile_pattern_working in #(
26348 yes) ac_use_included_regex=no;; #(
26349 no) ac_use_included_regex=yes;;
26352 *) as_fn_error $? "Invalid value for --with-included-regex: $with_included_regex" "$LINENO" 5
26356 if test $ac_use_included_regex = yes; then
26358 $as_echo "#define _REGEX_INCLUDE_LIMITS_H 1" >>confdefs.h
26361 $as_echo "#define _REGEX_LARGE_OFFSETS 1" >>confdefs.h
26364 $as_echo "#define re_syntax_options rpl_re_syntax_options" >>confdefs.h
26367 $as_echo "#define re_set_syntax rpl_re_set_syntax" >>confdefs.h
26370 $as_echo "#define re_compile_pattern rpl_re_compile_pattern" >>confdefs.h
26373 $as_echo "#define re_compile_fastmap rpl_re_compile_fastmap" >>confdefs.h
26376 $as_echo "#define re_search rpl_re_search" >>confdefs.h
26379 $as_echo "#define re_search_2 rpl_re_search_2" >>confdefs.h
26382 $as_echo "#define re_match rpl_re_match" >>confdefs.h
26385 $as_echo "#define re_match_2 rpl_re_match_2" >>confdefs.h
26388 $as_echo "#define re_set_registers rpl_re_set_registers" >>confdefs.h
26391 $as_echo "#define re_comp rpl_re_comp" >>confdefs.h
26394 $as_echo "#define re_exec rpl_re_exec" >>confdefs.h
26397 $as_echo "#define regcomp rpl_regcomp" >>confdefs.h
26400 $as_echo "#define regexec rpl_regexec" >>confdefs.h
26403 $as_echo "#define regerror rpl_regerror" >>confdefs.h
26406 $as_echo "#define regfree rpl_regfree" >>confdefs.h
26410 if test $ac_use_included_regex = yes; then
26419 gl_LIBOBJS="$gl_LIBOBJS regex.$ac_objext"
26427 for ac_header in libintl.h
26429 ac_fn_c_check_header_mongrel "$LINENO" "libintl.h" "ac_cv_header_libintl_h" "$ac_includes_default"
26430 if test "x$ac_cv_header_libintl_h" = xyes; then :
26431 cat >>confdefs.h <<_ACEOF
26432 #define HAVE_LIBINTL_H 1
26440 ac_fn_c_check_decl "$LINENO" "isblank" "ac_cv_have_decl_isblank" "#include <ctype.h>
26442 if test "x$ac_cv_have_decl_isblank" = xyes; then :
26448 cat >>confdefs.h <<_ACEOF
26449 #define HAVE_DECL_ISBLANK $ac_have_decl
26459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
26460 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
26461 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
26462 $as_echo_n "(cached) " >&6
26464 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
26465 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
26466 as_fn_error $? "cannot create temporary files" "$LINENO" 5
26467 # Assume that if we have lstat, we can also check symlinks.
26468 if test $ac_cv_func_lstat = yes; then
26469 ln -s conftest.f conftest.lnk
26471 if test "$cross_compiling" = yes; then :
26473 # Guess yes on glibc systems.
26474 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;;
26475 # If we don't know, assume the worst.
26476 *) gl_cv_func_rename_slash_dst_works="guessing no" ;;
26480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26481 /* end confdefs.h. */
26483 # include <stdio.h>
26484 # include <stdlib.h>
26490 if (rename ("conftest.f1", "conftest.f2/") == 0)
26492 if (rename ("conftest.d1", "conftest.d2/") != 0)
26495 if (rename ("conftest.f", "conftest.lnk/") == 0)
26504 if ac_fn_c_try_run "$LINENO"; then :
26505 gl_cv_func_rename_slash_dst_works=yes
26507 gl_cv_func_rename_slash_dst_works=no
26509 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26510 conftest.$ac_objext conftest.beam conftest.$ac_ext
26513 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
26516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
26517 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
26518 case "$gl_cv_func_rename_slash_dst_works" in
26523 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
26528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
26529 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
26530 if ${gl_cv_func_rename_slash_src_works+:} false; then :
26531 $as_echo_n "(cached) " >&6
26533 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
26534 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
26535 as_fn_error $? "cannot create temporary files" "$LINENO" 5
26536 # Assume that if we have lstat, we can also check symlinks.
26537 if test $ac_cv_func_lstat = yes; then
26538 ln -s conftest.f conftest.lnk
26540 if test "$cross_compiling" = yes; then :
26542 # Guess yes on glibc systems.
26543 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;;
26544 # If we don't know, assume the worst.
26545 *) gl_cv_func_rename_slash_src_works="guessing no" ;;
26549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26550 /* end confdefs.h. */
26552 # include <stdio.h>
26553 # include <stdlib.h>
26559 if (rename ("conftest.f1/", "conftest.d3") == 0)
26561 if (rename ("conftest.d1/", "conftest.d2") != 0)
26564 if (rename ("conftest.lnk/", "conftest.f") == 0)
26573 if ac_fn_c_try_run "$LINENO"; then :
26574 gl_cv_func_rename_slash_src_works=yes
26576 gl_cv_func_rename_slash_src_works=no
26578 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26579 conftest.$ac_objext conftest.beam conftest.$ac_ext
26582 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
26585 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
26586 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
26587 case "$gl_cv_func_rename_slash_src_works" in
26592 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
26598 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
26599 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
26600 if ${gl_cv_func_rename_link_works+:} false; then :
26601 $as_echo_n "(cached) " >&6
26603 if test $ac_cv_func_link = yes; then
26604 rm -rf conftest.f conftest.f1
26605 if touch conftest.f && ln conftest.f conftest.f1 &&
26606 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
26607 if test "$cross_compiling" = yes; then :
26609 # Guess yes on glibc systems.
26610 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;;
26611 # If we don't know, assume the worst.
26612 *) gl_cv_func_rename_link_works="guessing no" ;;
26616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26617 /* end confdefs.h. */
26619 # include <stdio.h>
26620 # include <stdlib.h>
26621 # include <unistd.h>
26627 if (rename ("conftest.f", "conftest.f1"))
26629 if (unlink ("conftest.f1"))
26631 if (rename ("conftest.f", "conftest.f"))
26633 if (rename ("conftest.f1", "conftest.f1") == 0)
26641 if ac_fn_c_try_run "$LINENO"; then :
26642 gl_cv_func_rename_link_works=yes
26644 gl_cv_func_rename_link_works=no
26646 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26647 conftest.$ac_objext conftest.beam conftest.$ac_ext
26651 gl_cv_func_rename_link_works="guessing no"
26653 rm -rf conftest.f conftest.f1
26655 gl_cv_func_rename_link_works=yes
26659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
26660 $as_echo "$gl_cv_func_rename_link_works" >&6; }
26661 case "$gl_cv_func_rename_link_works" in
26666 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
26671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
26672 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
26673 if ${gl_cv_func_rename_dest_works+:} false; then :
26674 $as_echo_n "(cached) " >&6
26676 rm -rf conftest.f conftest.d1 conftest.d2
26677 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
26678 as_fn_error $? "cannot create temporary files" "$LINENO" 5
26679 if test "$cross_compiling" = yes; then :
26681 # Guess yes on glibc systems.
26682 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;;
26683 # If we don't know, assume the worst.
26684 *) gl_cv_func_rename_dest_works="guessing no" ;;
26688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26689 /* end confdefs.h. */
26691 # include <stdio.h>
26692 # include <stdlib.h>
26698 if (rename ("conftest.d1", "conftest.d2") != 0)
26700 if (rename ("conftest.d2", "conftest.f") == 0)
26708 if ac_fn_c_try_run "$LINENO"; then :
26709 gl_cv_func_rename_dest_works=yes
26711 gl_cv_func_rename_dest_works=no
26713 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26714 conftest.$ac_objext conftest.beam conftest.$ac_ext
26717 rm -rf conftest.f conftest.d1 conftest.d2
26720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
26721 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
26722 case "$gl_cv_func_rename_dest_works" in
26727 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
26732 if test $REPLACE_RENAME = 1; then
26741 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
26755 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
26765 if test $ac_cv_func_renameat = no; then
26767 elif test $REPLACE_RENAME = 1; then
26771 if test $HAVE_RENAMEAT = 0 || test $REPLACE_RENAMEAT = 1; then
26780 gl_LIBOBJS="$gl_LIBOBJS renameat.$ac_objext"
26783 if test $HAVE_RENAMEAT = 0; then
26792 gl_LIBOBJS="$gl_LIBOBJS at-func2.$ac_objext"
26806 $as_echo "#define GNULIB_TEST_RENAMEAT 1" >>confdefs.h
26813 for ac_func in rewinddir
26815 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir"
26816 if test "x$ac_cv_func_rewinddir" = xyes; then :
26817 cat >>confdefs.h <<_ACEOF
26818 #define HAVE_REWINDDIR 1
26824 if test $ac_cv_func_rewinddir = no; then
26828 if test $HAVE_REWINDDIR = 0; then
26837 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext"
26851 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
26858 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
26859 $as_echo_n "checking whether rmdir works... " >&6; }
26860 if ${gl_cv_func_rmdir_works+:} false; then :
26861 $as_echo_n "(cached) " >&6
26864 touch conftest.file
26865 if test "$cross_compiling" = yes; then :
26867 # Guess yes on glibc systems.
26868 *-gnu*) gl_cv_func_rmdir_works="guessing yes" ;;
26869 # If we don't know, assume the worst.
26870 *) gl_cv_func_rmdir_works="guessing no" ;;
26874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26875 /* end confdefs.h. */
26879 # include <unistd.h>
26880 #else /* on Windows with MSVC */
26881 # include <direct.h>
26888 if (!rmdir ("conftest.file/"))
26890 else if (errno != ENOTDIR)
26892 if (!rmdir ("conftest.dir/./"))
26900 if ac_fn_c_try_run "$LINENO"; then :
26901 gl_cv_func_rmdir_works=yes
26903 gl_cv_func_rmdir_works=no
26905 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
26906 conftest.$ac_objext conftest.beam conftest.$ac_ext
26909 rm -rf conftest.dir conftest.file
26911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
26912 $as_echo "$gl_cv_func_rmdir_works" >&6; }
26913 case "$gl_cv_func_rmdir_works" in
26920 if test $REPLACE_RMDIR = 1; then
26929 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
26943 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
26951 for ac_func in rpmatch
26953 ac_fn_c_check_func "$LINENO" "rpmatch" "ac_cv_func_rpmatch"
26954 if test "x$ac_cv_func_rpmatch" = xyes; then :
26955 cat >>confdefs.h <<_ACEOF
26956 #define HAVE_RPMATCH 1
26962 if test $ac_cv_func_rpmatch = no; then
26966 if test $HAVE_RPMATCH = 0; then
26975 gl_LIBOBJS="$gl_LIBOBJS rpmatch.$ac_objext"
26978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and YESEXPR" >&5
26979 $as_echo_n "checking for nl_langinfo and YESEXPR... " >&6; }
26980 if ${gl_cv_langinfo_yesexpr+:} false; then :
26981 $as_echo_n "(cached) " >&6
26983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
26984 /* end confdefs.h. */
26985 #include <langinfo.h>
26989 char* cs = nl_langinfo(YESEXPR); return !cs;
26994 if ac_fn_c_try_link "$LINENO"; then :
26995 gl_cv_langinfo_yesexpr=yes
26997 gl_cv_langinfo_yesexpr=no
26999 rm -f core conftest.err conftest.$ac_objext \
27000 conftest$ac_exeext conftest.$ac_ext
27003 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_langinfo_yesexpr" >&5
27004 $as_echo "$gl_cv_langinfo_yesexpr" >&6; }
27005 if test $gl_cv_langinfo_yesexpr = yes; then
27007 $as_echo "#define HAVE_LANGINFO_YESEXPR 1" >>confdefs.h
27023 $as_echo "#define GNULIB_TEST_RPMATCH 1" >>confdefs.h
27046 if test $ac_cv_func_secure_getenv = no; then
27047 HAVE_SECURE_GETENV=0
27050 if test $HAVE_SECURE_GETENV = 0; then
27059 gl_LIBOBJS="$gl_LIBOBJS secure_getenv.$ac_objext"
27062 for ac_func in __secure_getenv
27064 ac_fn_c_check_func "$LINENO" "__secure_getenv" "ac_cv_func___secure_getenv"
27065 if test "x$ac_cv_func___secure_getenv" = xyes; then :
27066 cat >>confdefs.h <<_ACEOF
27067 #define HAVE___SECURE_GETENV 1
27073 if test $ac_cv_func___secure_getenv = no; then
27074 for ac_func in issetugid
27076 ac_fn_c_check_func "$LINENO" "issetugid" "ac_cv_func_issetugid"
27077 if test "x$ac_cv_func_issetugid" = xyes; then :
27078 cat >>confdefs.h <<_ACEOF
27079 #define HAVE_ISSETUGID 1
27093 GNULIB_SECURE_GETENV=1
27099 $as_echo "#define GNULIB_TEST_SECURE_GETENV 1" >>confdefs.h
27103 for ac_header in selinux/flask.h
27105 ac_fn_c_check_header_mongrel "$LINENO" "selinux/flask.h" "ac_cv_header_selinux_flask_h" "$ac_includes_default"
27106 if test "x$ac_cv_header_selinux_flask_h" = xyes; then :
27107 cat >>confdefs.h <<_ACEOF
27108 #define HAVE_SELINUX_FLASK_H 1
27123 gl_LIBOBJS="$gl_LIBOBJS selinux-at.$ac_objext"
27127 if test "$with_selinux" != no; then
27128 for ac_header in selinux/selinux.h
27130 ac_fn_c_check_header_mongrel "$LINENO" "selinux/selinux.h" "ac_cv_header_selinux_selinux_h" "$ac_includes_default"
27131 if test "x$ac_cv_header_selinux_selinux_h" = xyes; then :
27132 cat >>confdefs.h <<_ACEOF
27133 #define HAVE_SELINUX_SELINUX_H 1
27141 if test "$ac_cv_header_selinux_selinux_h" = yes; then
27142 # We do have <selinux/selinux.h>, so do compile getfilecon.c
27143 # and arrange to use its wrappers.
27153 if test $gl_cv_have_include_next = yes; then
27154 gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
27156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <selinux/selinux.h>" >&5
27157 $as_echo_n "checking absolute name of <selinux/selinux.h>... " >&6; }
27158 if ${gl_cv_next_selinux_selinux_h+:} false; then :
27159 $as_echo_n "(cached) " >&6
27162 if test $ac_cv_header_selinux_selinux_h = yes; then
27165 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27166 /* end confdefs.h. */
27167 #include <selinux/selinux.h>
27171 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27172 *) gl_absname_cpp="$ac_cpp" ;;
27177 gl_dirsep_regex='[/\\]'
27180 gl_dirsep_regex='\/'
27183 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27185 gl_header_literal_regex=`echo 'selinux/selinux.h' \
27186 | sed -e "$gl_make_literal_regex_sed"`
27187 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27188 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27193 gl_cv_next_selinux_selinux_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27194 sed -n "$gl_absolute_header_sed"`'"'
27196 gl_cv_next_selinux_selinux_h='<'selinux/selinux.h'>'
27201 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_selinux_selinux_h" >&5
27202 $as_echo "$gl_cv_next_selinux_selinux_h" >&6; }
27204 NEXT_SELINUX_SELINUX_H=$gl_cv_next_selinux_selinux_h
27206 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27207 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27208 gl_next_as_first_directive='<'selinux/selinux.h'>'
27210 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27211 gl_next_as_first_directive=$gl_cv_next_selinux_selinux_h
27213 NEXT_AS_FIRST_DIRECTIVE_SELINUX_SELINUX_H=$gl_next_as_first_directive
27219 $as_echo "#define getfilecon rpl_getfilecon" >>confdefs.h
27222 $as_echo "#define lgetfilecon rpl_lgetfilecon" >>confdefs.h
27225 $as_echo "#define fgetfilecon rpl_fgetfilecon" >>confdefs.h
27229 case "$ac_cv_search_setfilecon:$ac_cv_header_selinux_selinux_h" in
27230 no:*) # already warned
27233 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libselinux was found but selinux/selinux.h is missing." >&5
27234 $as_echo "$as_me: WARNING: libselinux was found but selinux/selinux.h is missing." >&2;}
27235 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU tar will be compiled without SELinux support." >&5
27236 $as_echo "$as_me: WARNING: GNU tar will be compiled without SELinux support." >&2;}
27239 # Do as if <selinux/selinux.h> does not exist, even if
27240 # AC_CHECK_HEADERS_ONCE has already determined that it exists.
27241 $as_echo "#define HAVE_SELINUX_SELINUX_H 0" >>confdefs.h
27247 if test "$with_selinux" != no; then
27248 for ac_header in selinux/context.h
27250 ac_fn_c_check_header_mongrel "$LINENO" "selinux/context.h" "ac_cv_header_selinux_context_h" "$ac_includes_default"
27251 if test "x$ac_cv_header_selinux_context_h" = xyes; then :
27252 cat >>confdefs.h <<_ACEOF
27253 #define HAVE_SELINUX_CONTEXT_H 1
27257 SELINUX_CONTEXT_H=selinux/context.h
27263 SELINUX_CONTEXT_H=selinux/context.h
27266 if test -n "$SELINUX_CONTEXT_H"; then
27267 GL_GENERATE_SELINUX_CONTEXT_H_TRUE=
27268 GL_GENERATE_SELINUX_CONTEXT_H_FALSE='#'
27270 GL_GENERATE_SELINUX_CONTEXT_H_TRUE='#'
27271 GL_GENERATE_SELINUX_CONTEXT_H_FALSE=
27275 if test "$with_selinux" != no && test "$ac_cv_header_selinux_selinux_h" = yes; then
27284 gl_LIBOBJS="$gl_LIBOBJS getfilecon.$ac_objext"
27289 if test $ac_cv_func_setenv = no; then
27292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
27293 $as_echo_n "checking whether setenv validates arguments... " >&6; }
27294 if ${gl_cv_func_setenv_works+:} false; then :
27295 $as_echo_n "(cached) " >&6
27297 if test "$cross_compiling" = yes; then :
27299 # Guess yes on glibc systems.
27300 *-gnu*) gl_cv_func_setenv_works="guessing yes" ;;
27301 # If we don't know, assume the worst.
27302 *) gl_cv_func_setenv_works="guessing no" ;;
27306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27307 /* end confdefs.h. */
27309 #include <stdlib.h>
27311 #include <string.h>
27319 if (setenv ("", "", 0) != -1)
27321 else if (errno != EINVAL)
27325 if (setenv ("a", "=", 1) != 0)
27327 else if (strcmp (getenv ("a"), "=") != 0)
27336 if ac_fn_c_try_run "$LINENO"; then :
27337 gl_cv_func_setenv_works=yes
27339 gl_cv_func_setenv_works=no
27341 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27342 conftest.$ac_objext conftest.beam conftest.$ac_ext
27346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
27347 $as_echo "$gl_cv_func_setenv_works" >&6; }
27348 case "$gl_cv_func_setenv_works" in
27356 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
27365 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
27379 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
27394 if test $gl_cv_have_include_next = yes; then
27395 gl_cv_next_signal_h='<'signal.h'>'
27397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
27398 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
27399 if ${gl_cv_next_signal_h+:} false; then :
27400 $as_echo_n "(cached) " >&6
27403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27404 /* end confdefs.h. */
27405 #include <signal.h>
27409 aix*) gl_absname_cpp="$ac_cpp -C" ;;
27410 *) gl_absname_cpp="$ac_cpp" ;;
27415 gl_dirsep_regex='[/\\]'
27418 gl_dirsep_regex='\/'
27421 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
27423 gl_header_literal_regex=`echo 'signal.h' \
27424 | sed -e "$gl_make_literal_regex_sed"`
27425 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
27426 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
27431 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
27432 sed -n "$gl_absolute_header_sed"`'"'
27436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
27437 $as_echo "$gl_cv_next_signal_h" >&6; }
27439 NEXT_SIGNAL_H=$gl_cv_next_signal_h
27441 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
27442 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
27443 gl_next_as_first_directive='<'signal.h'>'
27445 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
27446 gl_next_as_first_directive=$gl_cv_next_signal_h
27448 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
27454 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
27455 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
27456 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
27457 #include <signal.h>
27460 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
27463 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
27472 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
27473 #include <signal.h>
27476 if test "x$ac_cv_type_sighandler_t" = xyes; then :
27479 HAVE_SIGHANDLER_T=0
27484 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
27485 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
27486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
27487 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
27488 if eval \${$as_gl_Symbol+:} false; then :
27489 $as_echo_n "(cached) " >&6
27491 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27492 /* end confdefs.h. */
27493 #include <signal.h>
27504 if ac_fn_c_try_compile "$LINENO"; then :
27505 eval "$as_gl_Symbol=yes"
27507 eval "$as_gl_Symbol=no"
27509 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27511 eval ac_res=\$$as_gl_Symbol
27512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
27513 $as_echo "$ac_res" >&6; }
27514 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
27515 cat >>confdefs.h <<_ACEOF
27516 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
27519 eval ac_cv_have_decl_$gl_func=yes
27525 for ac_header in stdint.h
27527 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
27528 if test "x$ac_cv_header_stdint_h" = xyes; then :
27529 cat >>confdefs.h <<_ACEOF
27530 #define HAVE_STDINT_H 1
27537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
27538 $as_echo_n "checking for SIZE_MAX... " >&6; }
27539 if ${gl_cv_size_max+:} false; then :
27540 $as_echo_n "(cached) " >&6
27544 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27545 /* end confdefs.h. */
27547 #include <limits.h>
27549 #include <stdint.h>
27556 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27557 $EGREP "Found it" >/dev/null 2>&1; then :
27562 if test -z "$gl_cv_size_max"; then
27563 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
27564 #include <limits.h>"; then :
27567 size_t_bits_minus_1=
27570 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"; then :
27576 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
27577 if test $fits_in_uint = 1; then
27578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27579 /* end confdefs.h. */
27580 #include <stddef.h>
27582 extern unsigned long foo;
27592 if ac_fn_c_try_compile "$LINENO"; then :
27595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27597 if test $fits_in_uint = 1; then
27598 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
27600 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
27603 gl_cv_size_max='((size_t)~(size_t)0)'
27608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
27609 $as_echo "$gl_cv_size_max" >&6; }
27610 if test "$gl_cv_size_max" != yes; then
27612 cat >>confdefs.h <<_ACEOF
27613 #define SIZE_MAX $gl_cv_size_max
27621 ac_fn_c_check_decl "$LINENO" "sleep" "ac_cv_have_decl_sleep" "#include <unistd.h>
27623 if test "x$ac_cv_have_decl_sleep" = xyes; then :
27629 cat >>confdefs.h <<_ACEOF
27630 #define HAVE_DECL_SLEEP $ac_have_decl
27634 if test $ac_cv_have_decl_sleep != yes; then
27637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working sleep" >&5
27638 $as_echo_n "checking for working sleep... " >&6; }
27639 if ${gl_cv_func_sleep_works+:} false; then :
27640 $as_echo_n "(cached) " >&6
27642 if test "$cross_compiling" = yes; then :
27644 # Guess yes on glibc systems.
27645 *-gnu*) gl_cv_func_sleep_works="guessing yes" ;;
27646 # If we don't know, assume the worst.
27647 *) gl_cv_func_sleep_works="guessing no" ;;
27651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27652 /* end confdefs.h. */
27655 #include <unistd.h>
27656 #include <signal.h>
27658 handle_alarm (int sig)
27660 if (sig != SIGALRM)
27668 /* Failure to compile this test due to missing alarm is okay,
27669 since all such platforms (mingw) also lack sleep. */
27670 unsigned int pentecost = 50 * 24 * 60 * 60; /* 50 days. */
27671 unsigned int remaining;
27672 signal (SIGALRM, handle_alarm);
27674 remaining = sleep (pentecost);
27675 if (remaining > pentecost)
27677 if (remaining <= pentecost - 10)
27685 if ac_fn_c_try_run "$LINENO"; then :
27686 gl_cv_func_sleep_works=yes
27688 gl_cv_func_sleep_works=no
27690 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27691 conftest.$ac_objext conftest.beam conftest.$ac_ext
27695 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_sleep_works" >&5
27696 $as_echo "$gl_cv_func_sleep_works" >&6; }
27697 case "$gl_cv_func_sleep_works" in
27705 if test $HAVE_SLEEP = 0 || test $REPLACE_SLEEP = 1; then
27714 gl_LIBOBJS="$gl_LIBOBJS sleep.$ac_objext"
27728 $as_echo "#define GNULIB_TEST_SLEEP 1" >>confdefs.h
27734 gl_cv_func_snprintf_usable=no
27735 for ac_func in snprintf
27737 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf"
27738 if test "x$ac_cv_func_snprintf" = xyes; then :
27739 cat >>confdefs.h <<_ACEOF
27740 #define HAVE_SNPRINTF 1
27746 if test $ac_cv_func_snprintf = yes; then
27750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
27751 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
27752 if ${gl_cv_func_snprintf_size1+:} false; then :
27753 $as_echo_n "(cached) " >&6
27756 if test "$cross_compiling" = yes; then :
27757 gl_cv_func_snprintf_size1="guessing yes"
27759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27760 /* end confdefs.h. */
27764 # define my_snprintf snprintf
27766 # include <stdarg.h>
27767 static int my_snprintf (char *buf, int size, const char *format, ...)
27771 va_start (args, format);
27772 ret = vsnprintf (buf, size, format, args);
27779 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
27780 my_snprintf (buf, 1, "%d", 12345);
27781 return buf[1] != 'E';
27784 if ac_fn_c_try_run "$LINENO"; then :
27785 gl_cv_func_snprintf_size1=yes
27787 gl_cv_func_snprintf_size1=no
27789 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27790 conftest.$ac_objext conftest.beam conftest.$ac_ext
27795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
27796 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
27798 case "$gl_cv_func_snprintf_size1" in
27801 case "$gl_cv_func_snprintf_retval_c99" in
27805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
27806 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
27807 if ${gl_cv_func_printf_positions+:} false; then :
27808 $as_echo_n "(cached) " >&6
27811 if test "$cross_compiling" = yes; then :
27814 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
27815 gl_cv_func_printf_positions="guessing no";;
27816 beos*) gl_cv_func_printf_positions="guessing no";;
27817 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
27818 *) gl_cv_func_printf_positions="guessing yes";;
27822 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27823 /* end confdefs.h. */
27826 #include <string.h>
27827 /* The string "%2$d %1$d", with dollar characters protected from the shell's
27828 dollar expansion (possibly an autoconf bug). */
27829 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
27830 static char buf[100];
27833 sprintf (buf, format, 33, 55);
27834 return (strcmp (buf, "55 33") != 0);
27837 if ac_fn_c_try_run "$LINENO"; then :
27838 gl_cv_func_printf_positions=yes
27840 gl_cv_func_printf_positions=no
27842 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27843 conftest.$ac_objext conftest.beam conftest.$ac_ext
27848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
27849 $as_echo "$gl_cv_func_printf_positions" >&6; }
27851 case "$gl_cv_func_printf_positions" in
27853 gl_cv_func_snprintf_usable=yes
27861 if test $gl_cv_func_snprintf_usable = no; then
27872 gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext"
27874 if test $ac_cv_func_snprintf = yes; then
27881 if test $ac_cv_have_decl_snprintf = no; then
27882 HAVE_DECL_SNPRINTF=0
27896 $as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h
27902 cat >>confdefs.h <<_ACEOF
27903 #define GNULIB_SNPRINTF 1
27908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
27909 $as_echo_n "checking for ssize_t... " >&6; }
27910 if ${gt_cv_ssize_t+:} false; then :
27911 $as_echo_n "(cached) " >&6
27913 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27914 /* end confdefs.h. */
27915 #include <sys/types.h>
27919 int x = sizeof (ssize_t *) + sizeof (ssize_t);
27925 if ac_fn_c_try_compile "$LINENO"; then :
27930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
27932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
27933 $as_echo "$gt_cv_ssize_t" >&6; }
27934 if test $gt_cv_ssize_t = no; then
27936 $as_echo "#define ssize_t int" >>confdefs.h
27943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
27944 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
27945 if ${gl_cv_func_stat_dir_slash+:} false; then :
27946 $as_echo_n "(cached) " >&6
27948 if test "$cross_compiling" = yes; then :
27950 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
27951 *) gl_cv_func_stat_dir_slash="guessing yes";;
27954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27955 /* end confdefs.h. */
27956 #include <sys/stat.h>
27961 struct stat st; return stat (".", &st) != stat ("./", &st);
27966 if ac_fn_c_try_run "$LINENO"; then :
27967 gl_cv_func_stat_dir_slash=yes
27969 gl_cv_func_stat_dir_slash=no
27971 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
27972 conftest.$ac_objext conftest.beam conftest.$ac_ext
27976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
27977 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
27978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
27979 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
27980 if ${gl_cv_func_stat_file_slash+:} false; then :
27981 $as_echo_n "(cached) " >&6
27984 # Assume that if we have lstat, we can also check symlinks.
27985 if test $ac_cv_func_lstat = yes; then
27986 ln -s conftest.tmp conftest.lnk
27988 if test "$cross_compiling" = yes; then :
27990 # Guess yes on glibc systems.
27991 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;;
27992 # If we don't know, assume the worst.
27993 *) gl_cv_func_stat_file_slash="guessing no" ;;
27997 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
27998 /* end confdefs.h. */
27999 #include <sys/stat.h>
28006 if (!stat ("conftest.tmp/", &st))
28009 if (!stat ("conftest.lnk/", &st))
28018 if ac_fn_c_try_run "$LINENO"; then :
28019 gl_cv_func_stat_file_slash=yes
28021 gl_cv_func_stat_file_slash=no
28023 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
28024 conftest.$ac_objext conftest.beam conftest.$ac_ext
28027 rm -f conftest.tmp conftest.lnk
28029 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28030 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
28031 case $gl_cv_func_stat_dir_slash in
28032 *no) REPLACE_STAT=1
28034 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
28037 case $gl_cv_func_stat_file_slash in
28038 *no) REPLACE_STAT=1
28040 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28044 if test $REPLACE_STAT = 1; then
28053 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
28068 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
28076 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>
28077 #include <sys/stat.h>
28079 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
28081 cat >>confdefs.h <<_ACEOF
28082 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
28085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
28086 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
28087 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
28088 $as_echo_n "(cached) " >&6
28090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28091 /* end confdefs.h. */
28093 #include <sys/types.h>
28094 #include <sys/stat.h>
28095 #if HAVE_SYS_TIME_H
28096 # include <sys/time.h>
28099 struct timespec ts;
28112 if ac_fn_c_try_compile "$LINENO"; then :
28113 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
28115 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
28117 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28119 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
28120 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
28121 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
28123 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
28127 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>
28128 #include <sys/stat.h>
28130 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
28132 cat >>confdefs.h <<_ACEOF
28133 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
28138 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
28139 #include <sys/stat.h>
28141 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
28143 cat >>confdefs.h <<_ACEOF
28144 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
28149 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>
28150 #include <sys/stat.h>
28152 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
28154 cat >>confdefs.h <<_ACEOF
28155 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
28171 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>
28172 #include <sys/stat.h>
28174 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
28176 cat >>confdefs.h <<_ACEOF
28177 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
28182 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
28183 #include <sys/stat.h>
28185 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
28187 cat >>confdefs.h <<_ACEOF
28188 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
28193 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>
28194 #include <sys/stat.h>
28196 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
28198 cat >>confdefs.h <<_ACEOF
28199 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
28212 cat >>confdefs.h <<_ACEOF
28213 #define GNULIB_STATAT 1
28217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
28218 $as_echo_n "checking for working stdalign.h... " >&6; }
28219 if ${gl_cv_header_working_stdalign_h+:} false; then :
28220 $as_echo_n "(cached) " >&6
28222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28223 /* end confdefs.h. */
28224 #include <stdalign.h>
28225 #include <stddef.h>
28227 /* Test that alignof yields a result consistent with offsetof.
28228 This catches GCC bug 52023
28229 <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
28231 template <class t> struct alignof_helper { char a; t b; };
28232 # define ao(type) offsetof (alignof_helper<type>, b)
28234 # define ao(type) offsetof (struct { char a; type b; }, b)
28236 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
28237 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
28238 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
28240 /* Test _Alignas only on platforms where gnulib can help. */
28242 (__GNUC__ || __IBMC__ || __IBMCPP__ \
28243 || 0x5110 <= __SUNPRO_C || 1300 <= _MSC_VER)
28244 struct alignas_test { char c; char alignas (8) alignas_8; };
28245 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
28257 if ac_fn_c_try_compile "$LINENO"; then :
28258 gl_cv_header_working_stdalign_h=yes
28260 gl_cv_header_working_stdalign_h=no
28262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
28265 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
28267 if test $gl_cv_header_working_stdalign_h = yes; then
28270 STDALIGN_H='stdalign.h'
28274 if test -n "$STDALIGN_H"; then
28275 GL_GENERATE_STDALIGN_H_TRUE=
28276 GL_GENERATE_STDALIGN_H_FALSE='#'
28278 GL_GENERATE_STDALIGN_H_TRUE='#'
28279 GL_GENERATE_STDALIGN_H_FALSE=
28285 NEXT_STDARG_H='<stdarg.h>'
28286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
28287 $as_echo_n "checking for va_copy... " >&6; }
28288 if ${gl_cv_func_va_copy+:} false; then :
28289 $as_echo_n "(cached) " >&6
28292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28293 /* end confdefs.h. */
28294 #include <stdarg.h>
28300 void (*func) (va_list, va_list) = va_copy;
28307 if ac_fn_c_try_compile "$LINENO"; then :
28308 gl_cv_func_va_copy=yes
28310 gl_cv_func_va_copy=no
28312 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28315 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
28316 $as_echo "$gl_cv_func_va_copy" >&6; }
28317 if test $gl_cv_func_va_copy = no; then
28318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28319 /* end confdefs.h. */
28320 #if defined _AIX && !defined __GNUC__
28325 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28326 $EGREP "vaccine" >/dev/null 2>&1; then :
28333 if test $gl_aixcc = yes; then
28343 if test $gl_cv_have_include_next = yes; then
28344 gl_cv_next_stdarg_h='<'stdarg.h'>'
28346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
28347 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
28348 if ${gl_cv_next_stdarg_h+:} false; then :
28349 $as_echo_n "(cached) " >&6
28352 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28353 /* end confdefs.h. */
28354 #include <stdarg.h>
28358 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28359 *) gl_absname_cpp="$ac_cpp" ;;
28364 gl_dirsep_regex='[/\\]'
28367 gl_dirsep_regex='\/'
28370 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28372 gl_header_literal_regex=`echo 'stdarg.h' \
28373 | sed -e "$gl_make_literal_regex_sed"`
28374 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28375 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28380 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28381 sed -n "$gl_absolute_header_sed"`'"'
28385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
28386 $as_echo "$gl_cv_next_stdarg_h" >&6; }
28388 NEXT_STDARG_H=$gl_cv_next_stdarg_h
28390 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28391 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28392 gl_next_as_first_directive='<'stdarg.h'>'
28394 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28395 gl_next_as_first_directive=$gl_cv_next_stdarg_h
28397 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
28402 if test "$gl_cv_next_stdarg_h" = '""'; then
28403 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
28404 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
28408 saved_as_echo_n="$as_echo_n"
28410 if ${gl_cv_func___va_copy+:} false; then :
28411 $as_echo_n "(cached) " >&6
28414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28415 /* end confdefs.h. */
28416 #include <stdarg.h>
28429 if ac_fn_c_try_compile "$LINENO"; then :
28430 gl_cv_func___va_copy=yes
28432 gl_cv_func___va_copy=no
28434 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28437 as_echo_n="$saved_as_echo_n"
28439 if test $gl_cv_func___va_copy = yes; then
28441 $as_echo "#define va_copy __va_copy" >>confdefs.h
28446 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
28452 if test -n "$STDARG_H"; then
28453 GL_GENERATE_STDARG_H_TRUE=
28454 GL_GENERATE_STDARG_H_FALSE='#'
28456 GL_GENERATE_STDARG_H_TRUE='#'
28457 GL_GENERATE_STDARG_H_FALSE=
28465 # Define two additional variables used in the Makefile substitution.
28467 if test "$ac_cv_header_stdbool_h" = yes; then
28470 STDBOOL_H='stdbool.h'
28473 if test -n "$STDBOOL_H"; then
28474 GL_GENERATE_STDBOOL_H_TRUE=
28475 GL_GENERATE_STDBOOL_H_FALSE='#'
28477 GL_GENERATE_STDBOOL_H_TRUE='#'
28478 GL_GENERATE_STDBOOL_H_FALSE=
28482 if test "$ac_cv_type__Bool" = yes; then
28493 if test $gt_cv_c_wchar_t = no; then
28497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
28498 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
28499 if ${gl_cv_decl_null_works+:} false; then :
28500 $as_echo_n "(cached) " >&6
28502 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28503 /* end confdefs.h. */
28504 #include <stddef.h>
28505 int test[2 * (sizeof NULL == sizeof (void *)) -1];
28515 if ac_fn_c_try_compile "$LINENO"; then :
28516 gl_cv_decl_null_works=yes
28518 gl_cv_decl_null_works=no
28520 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
28523 $as_echo "$gl_cv_decl_null_works" >&6; }
28524 if test $gl_cv_decl_null_works = no; then
28529 if test -n "$STDDEF_H"; then
28530 GL_GENERATE_STDDEF_H_TRUE=
28531 GL_GENERATE_STDDEF_H_FALSE='#'
28533 GL_GENERATE_STDDEF_H_TRUE='#'
28534 GL_GENERATE_STDDEF_H_FALSE=
28537 if test -n "$STDDEF_H"; then
28546 if test $gl_cv_have_include_next = yes; then
28547 gl_cv_next_stddef_h='<'stddef.h'>'
28549 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
28550 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
28551 if ${gl_cv_next_stddef_h+:} false; then :
28552 $as_echo_n "(cached) " >&6
28555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28556 /* end confdefs.h. */
28557 #include <stddef.h>
28561 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28562 *) gl_absname_cpp="$ac_cpp" ;;
28567 gl_dirsep_regex='[/\\]'
28570 gl_dirsep_regex='\/'
28573 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28575 gl_header_literal_regex=`echo 'stddef.h' \
28576 | sed -e "$gl_make_literal_regex_sed"`
28577 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28578 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28583 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28584 sed -n "$gl_absolute_header_sed"`'"'
28588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
28589 $as_echo "$gl_cv_next_stddef_h" >&6; }
28591 NEXT_STDDEF_H=$gl_cv_next_stddef_h
28593 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28594 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28595 gl_next_as_first_directive='<'stddef.h'>'
28597 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28598 gl_next_as_first_directive=$gl_cv_next_stddef_h
28600 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
28618 if test $gl_cv_have_include_next = yes; then
28619 gl_cv_next_stdio_h='<'stdio.h'>'
28621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
28622 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
28623 if ${gl_cv_next_stdio_h+:} false; then :
28624 $as_echo_n "(cached) " >&6
28627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28628 /* end confdefs.h. */
28633 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28634 *) gl_absname_cpp="$ac_cpp" ;;
28639 gl_dirsep_regex='[/\\]'
28642 gl_dirsep_regex='\/'
28645 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28647 gl_header_literal_regex=`echo 'stdio.h' \
28648 | sed -e "$gl_make_literal_regex_sed"`
28649 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28650 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28655 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28656 sed -n "$gl_absolute_header_sed"`'"'
28660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
28661 $as_echo "$gl_cv_next_stdio_h" >&6; }
28663 NEXT_STDIO_H=$gl_cv_next_stdio_h
28665 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28666 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28667 gl_next_as_first_directive='<'stdio.h'>'
28669 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28670 gl_next_as_first_directive=$gl_cv_next_stdio_h
28672 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
28681 cat >>confdefs.h <<_ACEOF
28682 #define GNULIB_FSCANF 1
28689 cat >>confdefs.h <<_ACEOF
28690 #define GNULIB_SCANF 1
28715 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
28716 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
28717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
28718 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
28719 if eval \${$as_gl_Symbol+:} false; then :
28720 $as_echo_n "(cached) " >&6
28722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28723 /* end confdefs.h. */
28735 if ac_fn_c_try_compile "$LINENO"; then :
28736 eval "$as_gl_Symbol=yes"
28738 eval "$as_gl_Symbol=no"
28740 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28742 eval ac_res=\$$as_gl_Symbol
28743 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28744 $as_echo "$ac_res" >&6; }
28745 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
28746 cat >>confdefs.h <<_ACEOF
28747 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
28750 eval ac_cv_have_decl_$gl_func=yes
28765 if test $gl_cv_have_include_next = yes; then
28766 gl_cv_next_stdlib_h='<'stdlib.h'>'
28768 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
28769 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
28770 if ${gl_cv_next_stdlib_h+:} false; then :
28771 $as_echo_n "(cached) " >&6
28774 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28775 /* end confdefs.h. */
28776 #include <stdlib.h>
28780 aix*) gl_absname_cpp="$ac_cpp -C" ;;
28781 *) gl_absname_cpp="$ac_cpp" ;;
28786 gl_dirsep_regex='[/\\]'
28789 gl_dirsep_regex='\/'
28792 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
28794 gl_header_literal_regex=`echo 'stdlib.h' \
28795 | sed -e "$gl_make_literal_regex_sed"`
28796 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28797 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28802 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28803 sed -n "$gl_absolute_header_sed"`'"'
28807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
28808 $as_echo "$gl_cv_next_stdlib_h" >&6; }
28810 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
28812 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
28813 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28814 gl_next_as_first_directive='<'stdlib.h'>'
28816 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28817 gl_next_as_first_directive=$gl_cv_next_stdlib_h
28819 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
28826 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
28827 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
28828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
28829 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
28830 if eval \${$as_gl_Symbol+:} false; then :
28831 $as_echo_n "(cached) " >&6
28833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
28834 /* end confdefs.h. */
28835 #include <stdlib.h>
28836 #if HAVE_SYS_LOADAVG_H
28837 # include <sys/loadavg.h>
28840 # include <random.h>
28852 if ac_fn_c_try_compile "$LINENO"; then :
28853 eval "$as_gl_Symbol=yes"
28855 eval "$as_gl_Symbol=no"
28857 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
28859 eval ac_res=\$$as_gl_Symbol
28860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
28861 $as_echo "$ac_res" >&6; }
28862 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
28863 cat >>confdefs.h <<_ACEOF
28864 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
28867 eval ac_cv_have_decl_$gl_func=yes
28878 for ac_func in stpcpy
28880 ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy"
28881 if test "x$ac_cv_func_stpcpy" = xyes; then :
28882 cat >>confdefs.h <<_ACEOF
28883 #define HAVE_STPCPY 1
28889 if test $ac_cv_func_stpcpy = no; then
28893 if test $HAVE_STPCPY = 0; then
28902 gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext"
28919 $as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h
28926 for ac_func in strcasecmp
28928 ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp"
28929 if test "x$ac_cv_func_strcasecmp" = xyes; then :
28930 cat >>confdefs.h <<_ACEOF
28931 #define HAVE_STRCASECMP 1
28937 if test $ac_cv_func_strcasecmp = no; then
28943 for ac_func in strncasecmp
28945 ac_fn_c_check_func "$LINENO" "strncasecmp" "ac_cv_func_strncasecmp"
28946 if test "x$ac_cv_func_strncasecmp" = xyes; then :
28947 cat >>confdefs.h <<_ACEOF
28948 #define HAVE_STRNCASECMP 1
28954 if test $ac_cv_func_strncasecmp = yes; then
28959 ac_fn_c_check_decl "$LINENO" "strncasecmp" "ac_cv_have_decl_strncasecmp" "$ac_includes_default"
28960 if test "x$ac_cv_have_decl_strncasecmp" = xyes; then :
28966 cat >>confdefs.h <<_ACEOF
28967 #define HAVE_DECL_STRNCASECMP $ac_have_decl
28970 if test $ac_cv_have_decl_strncasecmp = no; then
28971 HAVE_DECL_STRNCASECMP=0
28975 if test $HAVE_STRCASECMP = 0; then
28984 gl_LIBOBJS="$gl_LIBOBJS strcasecmp.$ac_objext"
28990 if test $HAVE_STRNCASECMP = 0; then
28999 gl_LIBOBJS="$gl_LIBOBJS strncasecmp.$ac_objext"
29009 for ac_func in strchrnul
29011 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul"
29012 if test "x$ac_cv_func_strchrnul" = xyes; then :
29013 cat >>confdefs.h <<_ACEOF
29014 #define HAVE_STRCHRNUL 1
29020 if test $ac_cv_func_strchrnul = no; then
29023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
29024 $as_echo_n "checking whether strchrnul works... " >&6; }
29025 if ${gl_cv_func_strchrnul_works+:} false; then :
29026 $as_echo_n "(cached) " >&6
29028 if test "$cross_compiling" = yes; then :
29029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29030 /* end confdefs.h. */
29032 #if defined __CYGWIN__
29033 #include <cygwin/version.h>
29034 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
29042 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29043 $EGREP "Lucky user" >/dev/null 2>&1; then :
29044 gl_cv_func_strchrnul_works="guessing yes"
29046 gl_cv_func_strchrnul_works="guessing no"
29052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29053 /* end confdefs.h. */
29055 #include <string.h> /* for strchrnul */
29060 const char *buf = "a";
29061 return strchrnul (buf, 'b') != buf + 1;
29067 if ac_fn_c_try_run "$LINENO"; then :
29068 gl_cv_func_strchrnul_works=yes
29070 gl_cv_func_strchrnul_works=no
29072 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29073 conftest.$ac_objext conftest.beam conftest.$ac_ext
29078 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
29079 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
29080 case "$gl_cv_func_strchrnul_works" in
29082 *) REPLACE_STRCHRNUL=1 ;;
29086 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then
29095 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext"
29110 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
29118 if test $ac_cv_func_strdup = yes; then
29119 if test $gl_cv_func_malloc_posix != yes; then
29124 if test $ac_cv_have_decl_strdup = no; then
29128 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then
29137 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext"
29152 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
29161 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
29162 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
29163 $as_echo_n "checking for working strerror function... " >&6; }
29164 if ${gl_cv_func_working_strerror+:} false; then :
29165 $as_echo_n "(cached) " >&6
29167 if test "$cross_compiling" = yes; then :
29169 # Guess yes on glibc systems.
29170 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;;
29171 # If we don't know, assume the worst.
29172 *) gl_cv_func_working_strerror="guessing no" ;;
29176 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29177 /* end confdefs.h. */
29178 #include <string.h>
29183 if (!*strerror (-2)) return 1;
29188 if ac_fn_c_try_run "$LINENO"; then :
29189 gl_cv_func_working_strerror=yes
29191 gl_cv_func_working_strerror=no
29193 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29194 conftest.$ac_objext conftest.beam conftest.$ac_ext
29199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
29200 $as_echo "$gl_cv_func_working_strerror" >&6; }
29201 case "$gl_cv_func_working_strerror" in
29212 if test $REPLACE_STRERROR = 1; then
29221 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
29226 cat >>confdefs.h <<_ACEOF
29227 #define GNULIB_STRERROR 1
29242 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
29248 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
29257 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
29263 if test $ac_cv_header_sys_socket_h != yes; then
29264 for ac_header in winsock2.h
29266 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
29267 if test "x$ac_cv_header_winsock2_h" = xyes; then :
29268 cat >>confdefs.h <<_ACEOF
29269 #define HAVE_WINSOCK2_H 1
29277 if test "$ac_cv_header_winsock2_h" = yes; then
29279 UNISTD_H_HAVE_WINSOCK2_H=1
29280 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
29299 if test $ac_cv_have_decl_strndup = no; then
29300 HAVE_DECL_STRNDUP=0
29303 if test $ac_cv_func_strndup = yes; then
29305 # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
29306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
29307 $as_echo_n "checking for working strndup... " >&6; }
29308 if ${gl_cv_func_strndup_works+:} false; then :
29309 $as_echo_n "(cached) " >&6
29311 if test "$cross_compiling" = yes; then :
29314 aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
29315 *) gl_cv_func_strndup_works="guessing yes";;
29319 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29320 /* end confdefs.h. */
29322 #include <string.h>
29323 #include <stdlib.h>
29328 #if !HAVE_DECL_STRNDUP
29333 char *strndup (const char *, size_t);
29336 s = strndup ("some longer string", 15);
29338 s = strndup ("shorter string", 13);
29339 return s[13] != '\0';
29344 if ac_fn_c_try_run "$LINENO"; then :
29345 gl_cv_func_strndup_works=yes
29347 gl_cv_func_strndup_works=no
29349 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29350 conftest.$ac_objext conftest.beam conftest.$ac_ext
29354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
29355 $as_echo "$gl_cv_func_strndup_works" >&6; }
29356 case $gl_cv_func_strndup_works in
29357 *no) REPLACE_STRNDUP=1 ;;
29363 if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
29372 gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
29386 $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
29396 if test $ac_cv_have_decl_strnlen = no; then
29397 HAVE_DECL_STRNLEN=0
29400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
29401 $as_echo_n "checking for working strnlen... " >&6; }
29402 if ${ac_cv_func_strnlen_working+:} false; then :
29403 $as_echo_n "(cached) " >&6
29405 if test "$cross_compiling" = yes; then :
29406 # Guess no on AIX systems, yes otherwise.
29408 aix*) ac_cv_func_strnlen_working=no;;
29409 *) ac_cv_func_strnlen_working=yes;;
29412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29413 /* end confdefs.h. */
29414 $ac_includes_default
29420 #define S_LEN (sizeof S - 1)
29422 /* At least one implementation is buggy: that of AIX 4.3 would
29423 give strnlen (S, 1) == 3. */
29426 for (i = 0; i < S_LEN + 1; ++i)
29428 int expected = i <= S_LEN ? i : S_LEN;
29429 if (strnlen (S, i) != expected)
29438 if ac_fn_c_try_run "$LINENO"; then :
29439 ac_cv_func_strnlen_working=yes
29441 ac_cv_func_strnlen_working=no
29443 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29444 conftest.$ac_objext conftest.beam conftest.$ac_ext
29448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
29449 $as_echo "$ac_cv_func_strnlen_working" >&6; }
29450 test $ac_cv_func_strnlen_working = no && :
29453 if test $ac_cv_func_strnlen_working = no; then
29458 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
29467 gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
29482 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
29487 for ac_func in strtol
29489 ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol"
29490 if test "x$ac_cv_func_strtol" = xyes; then :
29491 cat >>confdefs.h <<_ACEOF
29492 #define HAVE_STRTOL 1
29499 if test $ac_cv_func_strtol = no; then
29508 gl_LIBOBJS="$gl_LIBOBJS strtol.$ac_objext"
29512 for ac_func in strtoul
29514 ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul"
29515 if test "x$ac_cv_func_strtoul" = xyes; then :
29516 cat >>confdefs.h <<_ACEOF
29517 #define HAVE_STRTOUL 1
29524 if test $ac_cv_func_strtoul = no; then
29533 gl_LIBOBJS="$gl_LIBOBJS strtoul.$ac_objext"
29539 if test "$ac_cv_type_unsigned_long_long_int" = yes; then
29540 for ac_func in strtoull
29542 ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull"
29543 if test "x$ac_cv_func_strtoull" = xyes; then :
29544 cat >>confdefs.h <<_ACEOF
29545 #define HAVE_STRTOULL 1
29551 if test $ac_cv_func_strtoull = no; then
29556 if test $HAVE_STRTOULL = 0; then
29565 gl_LIBOBJS="$gl_LIBOBJS strtoull.$ac_objext"
29582 $as_echo "#define GNULIB_TEST_STRTOULL 1" >>confdefs.h
29591 if test "$ac_cv_have_decl_strtoumax" != yes; then
29592 HAVE_DECL_STRTOUMAX=0
29595 if test $ac_cv_func_strtoumax = no; then
29604 gl_LIBOBJS="$gl_LIBOBJS strtoumax.$ac_objext"
29607 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
29608 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
29614 cat >>confdefs.h <<_ACEOF
29615 #define HAVE_DECL_STRTOULL $ac_have_decl
29634 if test $ac_cv_func_symlink = no; then
29637 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
29638 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
29639 if ${gl_cv_func_symlink_works+:} false; then :
29640 $as_echo_n "(cached) " >&6
29642 if test "$cross_compiling" = yes; then :
29644 # Guess yes on glibc systems.
29645 *-gnu*) gl_cv_func_symlink_works="guessing yes" ;;
29646 # If we don't know, assume the worst.
29647 *) gl_cv_func_symlink_works="guessing no" ;;
29651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29652 /* end confdefs.h. */
29653 #include <unistd.h>
29659 if (!symlink ("a", "conftest.link/"))
29661 if (symlink ("conftest.f", "conftest.lnk2"))
29663 else if (!symlink ("a", "conftest.lnk2/"))
29671 if ac_fn_c_try_run "$LINENO"; then :
29672 gl_cv_func_symlink_works=yes
29674 gl_cv_func_symlink_works=no
29676 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
29677 conftest.$ac_objext conftest.beam conftest.$ac_ext
29680 rm -f conftest.f conftest.link conftest.lnk2
29682 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
29683 $as_echo "$gl_cv_func_symlink_works" >&6; }
29684 case "$gl_cv_func_symlink_works" in
29692 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
29701 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
29715 $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
29724 if test $ac_cv_func_symlinkat = no; then
29728 if test $HAVE_SYMLINKAT = 0; then
29737 gl_LIBOBJS="$gl_LIBOBJS symlinkat.$ac_objext"
29751 $as_echo "#define GNULIB_TEST_SYMLINKAT 1" >>confdefs.h
29769 if test $gl_cv_have_include_next = yes; then
29770 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
29772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
29773 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
29774 if ${gl_cv_next_sys_stat_h+:} false; then :
29775 $as_echo_n "(cached) " >&6
29778 if test $ac_cv_header_sys_stat_h = yes; then
29781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29782 /* end confdefs.h. */
29783 #include <sys/stat.h>
29787 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29788 *) gl_absname_cpp="$ac_cpp" ;;
29793 gl_dirsep_regex='[/\\]'
29796 gl_dirsep_regex='\/'
29799 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29801 gl_header_literal_regex=`echo 'sys/stat.h' \
29802 | sed -e "$gl_make_literal_regex_sed"`
29803 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29804 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29809 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29810 sed -n "$gl_absolute_header_sed"`'"'
29812 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
29817 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
29818 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
29820 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
29822 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29823 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29824 gl_next_as_first_directive='<'sys/stat.h'>'
29826 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29827 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
29829 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
29841 if test $WINDOWS_64_BIT_ST_SIZE = 1; then
29843 $as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h
29847 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
29848 #include <sys/stat.h>
29850 if test "x$ac_cv_type_nlink_t" = xyes; then :
29854 $as_echo "#define nlink_t int" >>confdefs.h
29860 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
29861 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
29862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
29863 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
29864 if eval \${$as_gl_Symbol+:} false; then :
29865 $as_echo_n "(cached) " >&6
29867 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29868 /* end confdefs.h. */
29869 #include <sys/stat.h>
29880 if ac_fn_c_try_compile "$LINENO"; then :
29881 eval "$as_gl_Symbol=yes"
29883 eval "$as_gl_Symbol=no"
29885 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
29887 eval ac_res=\$$as_gl_Symbol
29888 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
29889 $as_echo "$ac_res" >&6; }
29890 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
29891 cat >>confdefs.h <<_ACEOF
29892 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
29895 eval ac_cv_have_decl_$gl_func=yes
29909 if test $ac_cv_header_sysexits_h = yes; then
29920 if test $gl_cv_have_include_next = yes; then
29921 gl_cv_next_sysexits_h='<'sysexits.h'>'
29923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sysexits.h>" >&5
29924 $as_echo_n "checking absolute name of <sysexits.h>... " >&6; }
29925 if ${gl_cv_next_sysexits_h+:} false; then :
29926 $as_echo_n "(cached) " >&6
29929 if test $ac_cv_header_sysexits_h = yes; then
29932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29933 /* end confdefs.h. */
29934 #include <sysexits.h>
29938 aix*) gl_absname_cpp="$ac_cpp -C" ;;
29939 *) gl_absname_cpp="$ac_cpp" ;;
29944 gl_dirsep_regex='[/\\]'
29947 gl_dirsep_regex='\/'
29950 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
29952 gl_header_literal_regex=`echo 'sysexits.h' \
29953 | sed -e "$gl_make_literal_regex_sed"`
29954 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29955 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29960 gl_cv_next_sysexits_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29961 sed -n "$gl_absolute_header_sed"`'"'
29963 gl_cv_next_sysexits_h='<'sysexits.h'>'
29968 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sysexits_h" >&5
29969 $as_echo "$gl_cv_next_sysexits_h" >&6; }
29971 NEXT_SYSEXITS_H=$gl_cv_next_sysexits_h
29973 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
29974 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29975 gl_next_as_first_directive='<'sysexits.h'>'
29977 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29978 gl_next_as_first_directive=$gl_cv_next_sysexits_h
29980 NEXT_AS_FIRST_DIRECTIVE_SYSEXITS_H=$gl_next_as_first_directive
29985 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
29986 /* end confdefs.h. */
29987 #include <sysexits.h>
29999 case EX_UNAVAILABLE:
30016 if ac_fn_c_try_compile "$LINENO"; then :
30019 SYSEXITS_H=sysexits.h
30021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30024 SYSEXITS_H=sysexits.h
30028 if test -n "$SYSEXITS_H"; then
30029 GL_GENERATE_SYSEXITS_H_TRUE=
30030 GL_GENERATE_SYSEXITS_H_FALSE='#'
30032 GL_GENERATE_SYSEXITS_H_TRUE='#'
30033 GL_GENERATE_SYSEXITS_H_FALSE=
30051 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "#include <time.h>
30053 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
30059 cat >>confdefs.h <<_ACEOF
30060 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
30063 if test $ac_cv_have_decl_localtime_r = no; then
30064 HAVE_DECL_LOCALTIME_R=0
30068 if test $ac_cv_func_localtime_r = yes; then
30070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
30071 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
30072 if ${gl_cv_time_r_posix+:} false; then :
30073 $as_echo_n "(cached) " >&6
30075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30076 /* end confdefs.h. */
30081 /* We don't need to append 'restrict's to the argument types,
30082 even though the POSIX signature has the 'restrict's,
30083 since C99 says they can't affect type compatibility. */
30084 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
30086 /* Check the return type is a pointer.
30087 On HP-UX 10 it is 'int'. */
30088 *localtime_r (0, 0);
30094 if ac_fn_c_try_compile "$LINENO"; then :
30095 gl_cv_time_r_posix=yes
30097 gl_cv_time_r_posix=no
30099 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
30103 $as_echo "$gl_cv_time_r_posix" >&6; }
30104 if test $gl_cv_time_r_posix = yes; then
30105 REPLACE_LOCALTIME_R=0
30107 REPLACE_LOCALTIME_R=1
30113 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
30122 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
30139 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
30156 if test $gl_cv_have_include_next = yes; then
30157 gl_cv_next_unistd_h='<'unistd.h'>'
30159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
30160 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
30161 if ${gl_cv_next_unistd_h+:} false; then :
30162 $as_echo_n "(cached) " >&6
30165 if test $ac_cv_header_unistd_h = yes; then
30168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30169 /* end confdefs.h. */
30170 #include <unistd.h>
30174 aix*) gl_absname_cpp="$ac_cpp -C" ;;
30175 *) gl_absname_cpp="$ac_cpp" ;;
30180 gl_dirsep_regex='[/\\]'
30183 gl_dirsep_regex='\/'
30186 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
30188 gl_header_literal_regex=`echo 'unistd.h' \
30189 | sed -e "$gl_make_literal_regex_sed"`
30190 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30191 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30196 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30197 sed -n "$gl_absolute_header_sed"`'"'
30199 gl_cv_next_unistd_h='<'unistd.h'>'
30204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
30205 $as_echo "$gl_cv_next_unistd_h" >&6; }
30207 NEXT_UNISTD_H=$gl_cv_next_unistd_h
30209 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
30210 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30211 gl_next_as_first_directive='<'unistd.h'>'
30213 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30214 gl_next_as_first_directive=$gl_cv_next_unistd_h
30216 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
30221 if test $ac_cv_header_unistd_h = yes; then
30233 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
30234 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
30235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
30236 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
30237 if eval \${$as_gl_Symbol+:} false; then :
30238 $as_echo_n "(cached) " >&6
30240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30241 /* end confdefs.h. */
30244 # include <unistd.h>
30246 /* Some systems declare various items in the wrong headers. */
30247 #if !(defined __GLIBC__ && !defined __UCLIBC__)
30248 # include <fcntl.h>
30249 # include <stdio.h>
30250 # include <stdlib.h>
30251 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
30265 if ac_fn_c_try_compile "$LINENO"; then :
30266 eval "$as_gl_Symbol=yes"
30268 eval "$as_gl_Symbol=no"
30270 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30272 eval ac_res=\$$as_gl_Symbol
30273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
30274 $as_echo "$ac_res" >&6; }
30275 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
30276 cat >>confdefs.h <<_ACEOF
30277 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
30280 eval ac_cv_have_decl_$gl_func=yes
30290 if { test "$HAVE_LIBUNISTRING" != yes \
30295 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
30296 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
30297 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
30298 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
30299 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
30309 LIBUNISTRING_UNITYPES_H='unitypes.h'
30311 LIBUNISTRING_UNITYPES_H=
30317 if { test "$HAVE_LIBUNISTRING" != yes \
30322 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
30323 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
30324 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
30325 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
30326 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0
30336 LIBUNISTRING_UNIWIDTH_H='uniwidth.h'
30338 LIBUNISTRING_UNIWIDTH_H=
30344 if { test "$HAVE_LIBUNISTRING" != yes \
30349 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \
30350 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \
30351 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \
30352 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \
30353 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4
30363 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE=
30364 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#'
30366 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#'
30367 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE=
30376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
30377 $as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
30378 if ${gl_cv_func_unlink_honors_slashes+:} false; then :
30379 $as_echo_n "(cached) " >&6
30381 touch conftest.file
30382 # Assume that if we have lstat, we can also check symlinks.
30383 if test $ac_cv_func_lstat = yes; then
30384 ln -s conftest.file conftest.lnk
30386 if test "$cross_compiling" = yes; then :
30388 # Guess yes on glibc systems.
30389 *-gnu*) gl_cv_func_unlink_honors_slashes="guessing yes" ;;
30390 # If we don't know, assume the worst.
30391 *) gl_cv_func_unlink_honors_slashes="guessing no" ;;
30395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30396 /* end confdefs.h. */
30398 # include <unistd.h>
30399 #else /* on Windows with MSVC */
30408 if (!unlink ("conftest.file/"))
30410 else if (errno != ENOTDIR)
30413 if (!unlink ("conftest.lnk/"))
30415 else if (errno != ENOTDIR)
30424 if ac_fn_c_try_run "$LINENO"; then :
30425 gl_cv_func_unlink_honors_slashes=yes
30427 gl_cv_func_unlink_honors_slashes=no
30429 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30430 conftest.$ac_objext conftest.beam conftest.$ac_ext
30433 rm -f conftest.file conftest.lnk
30435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
30436 $as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
30437 case "$gl_cv_func_unlink_honors_slashes" in
30443 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
30444 $as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
30445 if ${gl_cv_func_unlink_parent_fails+:} false; then :
30446 $as_echo_n "(cached) " >&6
30451 # Use the mktemp program if available. If not available, hide the error
30453 tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
30454 test -n "$tmp" && test -d "$tmp"
30457 # Use a simple mkdir command. It is guaranteed to fail if the directory
30458 # already exists. $RANDOM is bash specific and expands to empty in shells
30459 # other than bash, ksh and zsh. Its use does not increase security;
30460 # rather, it minimizes the probability of failure in a very cluttered /tmp
30462 tmp=/tmp/gt$$-$RANDOM
30463 (umask 077 && mkdir "$tmp")
30465 mkdir "$tmp/subdir"
30466 GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
30467 export GL_SUBDIR_FOR_UNLINK
30468 if test "$cross_compiling" = yes; then :
30469 # If we don't know, assume the worst.
30470 gl_cv_func_unlink_parent_fails="guessing no"
30473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30474 /* end confdefs.h. */
30476 #include <stdlib.h>
30478 # include <unistd.h>
30479 #else /* on Windows with MSVC */
30480 # include <direct.h>
30486 if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
30488 else if (unlink ("..") == 0)
30494 if ac_fn_c_try_run "$LINENO"; then :
30495 gl_cv_func_unlink_parent_fails=yes
30497 gl_cv_func_unlink_parent_fails=no
30499 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30500 conftest.$ac_objext conftest.beam conftest.$ac_ext
30503 unset GL_SUBDIR_FOR_UNLINK
30506 gl_cv_func_unlink_parent_fails="guessing no"
30510 gl_cv_func_unlink_parent_fails="guessing yes"
30515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
30516 $as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
30517 case "$gl_cv_func_unlink_parent_fails" in
30521 $as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
30526 if test $REPLACE_UNLINK = 1; then
30535 gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
30549 $as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
30559 if test $ac_cv_func_unlinkat = no; then
30562 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
30564 # Solaris 9 has *at functions, but uniformly mishandles trailing
30565 # slash in all of them.
30569 # GNU/Hurd has unlinkat, but it has the same bug as unlink.
30570 if test $REPLACE_UNLINK = 1; then
30577 if test $HAVE_UNLINKAT = 0 || test $REPLACE_UNLINKAT = 1; then
30586 gl_LIBOBJS="$gl_LIBOBJS unlinkat.$ac_objext"
30600 $as_echo "#define GNULIB_TEST_UNLINKAT 1" >>confdefs.h
30608 # The Hurd, the Linux kernel, the FreeBSD kernel version 2.2 and later,
30609 # Cygwin, and mingw never let anyone (even root) unlink directories.
30610 # If anyone knows of another system for which unlink can never
30611 # remove a directory, please report it to <bug-coreutils@gnu.org>.
30612 # Unfortunately this is difficult to test for, since it requires root access
30613 # and might create garbage in the file system,
30614 # so the code below simply relies on the kernel name and version number.
30617 linux-* | linux | \
30618 freebsd2.2* | freebsd[3-9]* | freebsd[1-9][0-9]* | \
30622 $as_echo "#define UNLINK_CANNOT_UNLINK_DIR 1" >>confdefs.h
30628 $as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h
30650 if test $ac_cv_have_decl_unsetenv = no; then
30651 HAVE_DECL_UNSETENV=0
30653 for ac_func in unsetenv
30655 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
30656 if test "x$ac_cv_func_unsetenv" = xyes; then :
30657 cat >>confdefs.h <<_ACEOF
30658 #define HAVE_UNSETENV 1
30664 if test $ac_cv_func_unsetenv = no; then
30668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
30669 $as_echo_n "checking for unsetenv() return type... " >&6; }
30670 if ${gt_cv_func_unsetenv_ret+:} false; then :
30671 $as_echo_n "(cached) " >&6
30673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30674 /* end confdefs.h. */
30677 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
30678 #include <stdlib.h>
30683 int unsetenv (const char *name);
30693 if ac_fn_c_try_compile "$LINENO"; then :
30694 gt_cv_func_unsetenv_ret='int'
30696 gt_cv_func_unsetenv_ret='void'
30698 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
30701 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
30702 if test $gt_cv_func_unsetenv_ret = 'void'; then
30704 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
30709 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
30710 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
30711 if ${gl_cv_func_unsetenv_works+:} false; then :
30712 $as_echo_n "(cached) " >&6
30714 if test "$cross_compiling" = yes; then :
30716 # Guess yes on glibc systems.
30717 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;;
30718 # If we don't know, assume the worst.
30719 *) gl_cv_func_unsetenv_works="guessing no" ;;
30723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30724 /* end confdefs.h. */
30726 #include <stdlib.h>
30728 extern char **environ;
30734 char entry1[] = "a=1";
30735 char entry2[] = "b=2";
30736 char *env[] = { entry1, entry2, NULL };
30737 if (putenv ((char *) "a=1")) return 1;
30738 if (putenv (entry2)) return 2;
30741 if (getenv ("a")) return 3;
30742 if (!unsetenv ("") || errno != EINVAL) return 4;
30745 if (!getenv ("a")) return 5;
30748 if (getenv ("a")) return 6;
30754 if ac_fn_c_try_run "$LINENO"; then :
30755 gl_cv_func_unsetenv_works=yes
30757 gl_cv_func_unsetenv_works=no
30759 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30760 conftest.$ac_objext conftest.beam conftest.$ac_ext
30764 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
30765 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
30766 case "$gl_cv_func_unsetenv_works" in
30774 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
30783 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
30801 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
30811 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
30812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
30813 $as_echo_n "checking whether futimesat handles NULL file... " >&6; }
30814 if ${gl_cv_func_futimesat_works+:} false; then :
30815 $as_echo_n "(cached) " >&6
30817 touch conftest.file
30818 if test "$cross_compiling" = yes; then :
30820 # Guess yes on glibc systems.
30821 *-gnu*) gl_cv_func_futimesat_works="guessing yes" ;;
30822 # If we don't know, assume the worst.
30823 *) gl_cv_func_futimesat_works="guessing no" ;;
30827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30828 /* end confdefs.h. */
30830 #include <stddef.h>
30831 #include <sys/times.h>
30837 int fd = open ("conftest.file", O_RDWR);
30838 if (fd < 0) return 1;
30839 if (futimesat (fd, NULL, NULL)) return 2;
30845 if ac_fn_c_try_run "$LINENO"; then :
30846 gl_cv_func_futimesat_works=yes
30848 gl_cv_func_futimesat_works=no
30850 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30851 conftest.$ac_objext conftest.beam conftest.$ac_ext
30854 rm -f conftest.file
30856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
30857 $as_echo "$gl_cv_func_futimesat_works" >&6; }
30858 case "$gl_cv_func_futimesat_works" in
30862 $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
30872 if test $ac_cv_func_utimensat = no; then
30875 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether utimensat works" >&5
30876 $as_echo_n "checking whether utimensat works... " >&6; }
30877 if ${gl_cv_func_utimensat_works+:} false; then :
30878 $as_echo_n "(cached) " >&6
30880 if test "$cross_compiling" = yes; then :
30881 gl_cv_func_utimensat_works="guessing no"
30883 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30884 /* end confdefs.h. */
30887 #include <sys/stat.h>
30888 #include <unistd.h>
30894 const char *f = "conftest.file";
30895 if (close (creat (f, 0600)))
30897 /* Test whether the AT_SYMLINK_NOFOLLOW flag is supported. */
30899 if (utimensat (AT_FDCWD, f, NULL, AT_SYMLINK_NOFOLLOW))
30902 /* Test whether UTIME_NOW and UTIME_OMIT work. */
30904 struct timespec ts[2] = { { 1, UTIME_OMIT }, { 1, UTIME_NOW } };
30905 if (utimensat (AT_FDCWD, f, ts, 0))
30910 struct timespec ts[2] = { { 1, UTIME_NOW }, { 1, UTIME_OMIT } };
30912 if (utimensat (AT_FDCWD, f, ts, 0))
30916 else if (st.st_ctime < st.st_atime)
30925 if ac_fn_c_try_run "$LINENO"; then :
30926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
30927 /* end confdefs.h. */
30930 /* The Linux kernel added utimensat in 2.6.22, but has bugs with UTIME_OMIT
30931 in several file systems as recently as 2.6.32. Always replace utimensat
30932 to support older kernels. */
30944 if ac_fn_c_try_compile "$LINENO"; then :
30945 gl_cv_func_utimensat_works=yes
30947 gl_cv_func_utimensat_works="needs runtime check"
30949 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
30951 gl_cv_func_utimensat_works=no
30953 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
30954 conftest.$ac_objext conftest.beam conftest.$ac_ext
30958 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_utimensat_works" >&5
30959 $as_echo "$gl_cv_func_utimensat_works" >&6; }
30960 if test "$gl_cv_func_utimensat_works" != yes; then
30961 REPLACE_UTIMENSAT=1
30965 if test $HAVE_UTIMENSAT = 0 || test $REPLACE_UTIMENSAT = 1; then
30974 gl_LIBOBJS="$gl_LIBOBJS utimensat.$ac_objext"
30988 $as_echo "#define GNULIB_TEST_UTIMENSAT 1" >>confdefs.h
30994 if test $ac_cv_func_vasnprintf = no; then
31005 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
31015 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
31025 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
31035 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
31037 if test $ac_cv_func_vasnprintf = yes; then
31039 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
31053 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
31054 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
31058 $as_echo "#define ptrdiff_t long" >>confdefs.h
31072 for ac_func in vasprintf
31074 ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
31075 if test "x$ac_cv_func_vasprintf" = xyes; then :
31076 cat >>confdefs.h <<_ACEOF
31077 #define HAVE_VASPRINTF 1
31083 if test $ac_cv_func_vasprintf = no; then
31093 gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
31103 gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
31106 if test $ac_cv_func_vasprintf = yes; then
31107 REPLACE_VASPRINTF=1
31132 $as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
31138 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=asprintf:2:c-format"
31142 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=vasprintf:2:c-format"
31145 # Check whether --with-packager was given.
31146 if test "${with_packager+set}" = set; then :
31147 withval=$with_packager; case $withval in
31150 cat >>confdefs.h <<_ACEOF
31151 #define PACKAGE_PACKAGER "$withval"
31160 # Check whether --with-packager-version was given.
31161 if test "${with_packager_version+set}" = set; then :
31162 withval=$with_packager_version; case $withval in
31165 cat >>confdefs.h <<_ACEOF
31166 #define PACKAGE_PACKAGER_VERSION "$withval"
31175 # Check whether --with-packager-bug-reports was given.
31176 if test "${with_packager_bug_reports+set}" = set; then :
31177 withval=$with_packager_bug_reports; case $withval in
31180 cat >>confdefs.h <<_ACEOF
31181 #define PACKAGE_PACKAGER_BUG_REPORTS "$withval"
31189 if test "X$with_packager" = "X" && \
31190 test "X$with_packager_version$with_packager_bug_reports" != "X"
31192 as_fn_error $? "The --with-packager-{bug-reports,version} options require --with-packager" "$LINENO" 5
31197 gl_cv_func_vsnprintf_usable=no
31198 for ac_func in vsnprintf
31200 ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf"
31201 if test "x$ac_cv_func_vsnprintf" = xyes; then :
31202 cat >>confdefs.h <<_ACEOF
31203 #define HAVE_VSNPRINTF 1
31209 if test $ac_cv_func_vsnprintf = yes; then
31213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5
31214 $as_echo_n "checking whether snprintf respects a size of 1... " >&6; }
31215 if ${gl_cv_func_snprintf_size1+:} false; then :
31216 $as_echo_n "(cached) " >&6
31219 if test "$cross_compiling" = yes; then :
31220 gl_cv_func_snprintf_size1="guessing yes"
31222 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31223 /* end confdefs.h. */
31227 # define my_snprintf snprintf
31229 # include <stdarg.h>
31230 static int my_snprintf (char *buf, int size, const char *format, ...)
31234 va_start (args, format);
31235 ret = vsnprintf (buf, size, format, args);
31242 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' };
31243 my_snprintf (buf, 1, "%d", 12345);
31244 return buf[1] != 'E';
31247 if ac_fn_c_try_run "$LINENO"; then :
31248 gl_cv_func_snprintf_size1=yes
31250 gl_cv_func_snprintf_size1=no
31252 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31253 conftest.$ac_objext conftest.beam conftest.$ac_ext
31258 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5
31259 $as_echo "$gl_cv_func_snprintf_size1" >&6; }
31261 case "$gl_cv_func_snprintf_size1" in
31264 case "$gl_cv_func_snprintf_retval_c99" in
31268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5
31269 $as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; }
31270 if ${gl_cv_func_printf_positions+:} false; then :
31271 $as_echo_n "(cached) " >&6
31274 if test "$cross_compiling" = yes; then :
31277 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*)
31278 gl_cv_func_printf_positions="guessing no";;
31279 beos*) gl_cv_func_printf_positions="guessing no";;
31280 mingw* | pw*) gl_cv_func_printf_positions="guessing no";;
31281 *) gl_cv_func_printf_positions="guessing yes";;
31285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31286 /* end confdefs.h. */
31289 #include <string.h>
31290 /* The string "%2$d %1$d", with dollar characters protected from the shell's
31291 dollar expansion (possibly an autoconf bug). */
31292 static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
31293 static char buf[100];
31296 sprintf (buf, format, 33, 55);
31297 return (strcmp (buf, "55 33") != 0);
31300 if ac_fn_c_try_run "$LINENO"; then :
31301 gl_cv_func_printf_positions=yes
31303 gl_cv_func_printf_positions=no
31305 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31306 conftest.$ac_objext conftest.beam conftest.$ac_ext
31311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5
31312 $as_echo "$gl_cv_func_printf_positions" >&6; }
31314 case "$gl_cv_func_printf_positions" in
31316 gl_cv_func_vsnprintf_usable=yes
31324 if test $gl_cv_func_vsnprintf_usable = no; then
31335 gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext"
31337 if test $ac_cv_func_vsnprintf = yes; then
31338 REPLACE_VSNPRINTF=1
31344 if test $ac_cv_have_decl_vsnprintf = no; then
31345 HAVE_DECL_VSNPRINTF=0
31359 $as_echo "#define GNULIB_TEST_VSNPRINTF 1" >>confdefs.h
31375 if test $gl_cv_have_include_next = yes; then
31376 gl_cv_next_wchar_h='<'wchar.h'>'
31378 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
31379 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
31380 if ${gl_cv_next_wchar_h+:} false; then :
31381 $as_echo_n "(cached) " >&6
31384 if test $ac_cv_header_wchar_h = yes; then
31387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31388 /* end confdefs.h. */
31393 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31394 *) gl_absname_cpp="$ac_cpp" ;;
31399 gl_dirsep_regex='[/\\]'
31402 gl_dirsep_regex='\/'
31405 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31407 gl_header_literal_regex=`echo 'wchar.h' \
31408 | sed -e "$gl_make_literal_regex_sed"`
31409 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31410 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31415 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31416 sed -n "$gl_absolute_header_sed"`'"'
31418 gl_cv_next_wchar_h='<'wchar.h'>'
31423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
31424 $as_echo "$gl_cv_next_wchar_h" >&6; }
31426 NEXT_WCHAR_H=$gl_cv_next_wchar_h
31428 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31429 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31430 gl_next_as_first_directive='<'wchar.h'>'
31432 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31433 gl_next_as_first_directive=$gl_cv_next_wchar_h
31435 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
31440 if test $ac_cv_header_wchar_h = yes; then
31450 if test $gt_cv_c_wint_t = yes; then
31458 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
31459 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
31460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
31461 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
31462 if eval \${$as_gl_Symbol+:} false; then :
31463 $as_echo_n "(cached) " >&6
31465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31466 /* end confdefs.h. */
31468 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31470 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31471 included before <wchar.h>. */
31472 #if !(defined __GLIBC__ && !defined __UCLIBC__)
31473 # include <stddef.h>
31474 # include <stdio.h>
31488 if ac_fn_c_try_compile "$LINENO"; then :
31489 eval "$as_gl_Symbol=yes"
31491 eval "$as_gl_Symbol=no"
31493 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31495 eval ac_res=\$$as_gl_Symbol
31496 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
31497 $as_echo "$ac_res" >&6; }
31498 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
31499 cat >>confdefs.h <<_ACEOF
31500 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
31503 eval ac_cv_have_decl_$gl_func=yes
31518 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
31522 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
31523 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
31524 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
31525 $as_echo_n "(cached) " >&6
31529 # Guess no on AIX and OSF/1.
31530 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
31531 # Guess yes otherwise.
31532 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
31534 if test $LOCALE_JA != none; then
31535 if test "$cross_compiling" = yes; then :
31538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31539 /* end confdefs.h. */
31541 #include <locale.h>
31542 #include <string.h>
31543 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31545 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31546 included before <wchar.h>. */
31547 #include <stddef.h>
31553 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
31555 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
31559 memset (&state, '\0', sizeof (mbstate_t));
31560 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
31561 if (mbsinit (&state))
31567 if ac_fn_c_try_run "$LINENO"; then :
31568 gl_cv_func_mbrtowc_incomplete_state=yes
31570 gl_cv_func_mbrtowc_incomplete_state=no
31572 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31573 conftest.$ac_objext conftest.beam conftest.$ac_ext
31579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
31580 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
31585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
31586 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
31587 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
31588 $as_echo_n "(cached) " >&6
31592 # Guess no on Solaris 8.
31593 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
31594 # Guess yes otherwise.
31595 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
31597 if test $LOCALE_ZH_CN != none; then
31598 if test "$cross_compiling" = yes; then :
31601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31602 /* end confdefs.h. */
31604 #include <locale.h>
31605 #include <stdlib.h>
31606 #include <string.h>
31607 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31609 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31610 included before <wchar.h>. */
31611 #include <stddef.h>
31617 /* This fails on Solaris 8:
31618 mbrtowc returns 2, and sets wc to 0x00F0.
31619 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
31620 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
31622 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
31626 memset (&state, '\0', sizeof (mbstate_t));
31627 if (mbrtowc (&wc, input + 3, 6, &state) != 4
31628 && mbtowc (&wc, input + 3, 6) == 4)
31634 if ac_fn_c_try_run "$LINENO"; then :
31635 gl_cv_func_mbrtowc_sanitycheck=yes
31637 gl_cv_func_mbrtowc_sanitycheck=no
31639 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31640 conftest.$ac_objext conftest.beam conftest.$ac_ext
31646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
31647 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
31649 REPLACE_MBSTATE_T=0
31650 case "$gl_cv_func_mbrtowc_incomplete_state" in
31652 *) REPLACE_MBSTATE_T=1 ;;
31654 case "$gl_cv_func_mbrtowc_sanitycheck" in
31656 *) REPLACE_MBSTATE_T=1 ;;
31659 REPLACE_MBSTATE_T=1
31664 if test $ac_cv_func_wcrtomb = no; then
31666 ac_fn_c_check_decl "$LINENO" "wcrtomb" "ac_cv_have_decl_wcrtomb" "
31667 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31669 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31670 included before <wchar.h>. */
31671 #include <stddef.h>
31677 if test "x$ac_cv_have_decl_wcrtomb" = xyes; then :
31683 cat >>confdefs.h <<_ACEOF
31684 #define HAVE_DECL_WCRTOMB $ac_have_decl
31687 if test $ac_cv_have_decl_wcrtomb = yes; then
31691 if test $REPLACE_MBSTATE_T = 1; then
31699 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcrtomb return value is correct" >&5
31700 $as_echo_n "checking whether wcrtomb return value is correct... " >&6; }
31701 if ${gl_cv_func_wcrtomb_retval+:} false; then :
31702 $as_echo_n "(cached) " >&6
31706 # Guess no on AIX 4, OSF/1 and Solaris.
31707 aix4* | osf* | solaris*) gl_cv_func_wcrtomb_retval="guessing no" ;;
31708 # Guess yes otherwise.
31709 *) gl_cv_func_wcrtomb_retval="guessing yes" ;;
31711 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then
31712 if test "$cross_compiling" = yes; then :
31715 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31716 /* end confdefs.h. */
31718 #include <locale.h>
31719 #include <string.h>
31720 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
31722 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
31723 included before <wchar.h>. */
31724 #include <stddef.h>
31731 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
31733 if (wcrtomb (NULL, 0, NULL) != 1)
31736 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
31738 if (wcrtomb (NULL, 0, NULL) != 1)
31741 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
31743 if (wcrtomb (NULL, 0, NULL) != 1)
31746 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
31748 if (wcrtomb (NULL, 0, NULL) != 1)
31754 if ac_fn_c_try_run "$LINENO"; then :
31755 gl_cv_func_wcrtomb_retval=yes
31757 gl_cv_func_wcrtomb_retval=no
31759 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31760 conftest.$ac_objext conftest.beam conftest.$ac_ext
31766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcrtomb_retval" >&5
31767 $as_echo "$gl_cv_func_wcrtomb_retval" >&6; }
31768 case "$gl_cv_func_wcrtomb_retval" in
31770 *) REPLACE_WCRTOMB=1 ;;
31775 if test $HAVE_WCRTOMB = 0 || test $REPLACE_WCRTOMB = 1; then
31784 gl_LIBOBJS="$gl_LIBOBJS wcrtomb.$ac_objext"
31801 $as_echo "#define GNULIB_TEST_WCRTOMB 1" >>confdefs.h
31810 if test $ac_cv_func_iswcntrl = yes; then
31818 if test $gt_cv_c_wint_t = yes; then
31834 if test $gl_cv_have_include_next = yes; then
31835 gl_cv_next_wctype_h='<'wctype.h'>'
31837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
31838 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
31839 if ${gl_cv_next_wctype_h+:} false; then :
31840 $as_echo_n "(cached) " >&6
31843 if test $ac_cv_header_wctype_h = yes; then
31846 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31847 /* end confdefs.h. */
31848 #include <wctype.h>
31852 aix*) gl_absname_cpp="$ac_cpp -C" ;;
31853 *) gl_absname_cpp="$ac_cpp" ;;
31858 gl_dirsep_regex='[/\\]'
31861 gl_dirsep_regex='\/'
31864 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
31866 gl_header_literal_regex=`echo 'wctype.h' \
31867 | sed -e "$gl_make_literal_regex_sed"`
31868 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
31869 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
31874 gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
31875 sed -n "$gl_absolute_header_sed"`'"'
31877 gl_cv_next_wctype_h='<'wctype.h'>'
31882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
31883 $as_echo "$gl_cv_next_wctype_h" >&6; }
31885 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
31887 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
31888 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
31889 gl_next_as_first_directive='<'wctype.h'>'
31891 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
31892 gl_next_as_first_directive=$gl_cv_next_wctype_h
31894 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
31899 if test $ac_cv_header_wctype_h = yes; then
31900 if test $ac_cv_func_iswcntrl = yes; then
31901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
31902 $as_echo_n "checking whether iswcntrl works... " >&6; }
31903 if ${gl_cv_func_iswcntrl_works+:} false; then :
31904 $as_echo_n "(cached) " >&6
31907 if test "$cross_compiling" = yes; then :
31908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31909 /* end confdefs.h. */
31910 #include <stdlib.h>
31911 #if __GNU_LIBRARY__ == 1
31912 Linux libc5 i18n is broken.
31922 if ac_fn_c_try_compile "$LINENO"; then :
31923 gl_cv_func_iswcntrl_works="guessing yes"
31925 gl_cv_func_iswcntrl_works="guessing no"
31927 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
31930 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
31931 /* end confdefs.h. */
31933 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
31934 included before <wchar.h>.
31935 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
31936 must be included before <wchar.h>. */
31937 #include <stddef.h>
31941 #include <wctype.h>
31942 int main () { return iswprint ('x') == 0; }
31945 if ac_fn_c_try_run "$LINENO"; then :
31946 gl_cv_func_iswcntrl_works=yes
31948 gl_cv_func_iswcntrl_works=no
31950 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
31951 conftest.$ac_objext conftest.beam conftest.$ac_ext
31956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
31957 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
31965 case "$gl_cv_func_iswcntrl_works" in
31966 *yes) REPLACE_ISWCNTRL=0 ;;
31967 *) REPLACE_ISWCNTRL=1 ;;
31971 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
31975 if test $REPLACE_ISWCNTRL = 1; then
31978 for ac_func in towlower
31980 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
31981 if test "x$ac_cv_func_towlower" = xyes; then :
31982 cat >>confdefs.h <<_ACEOF
31983 #define HAVE_TOWLOWER 1
31989 if test $ac_cv_func_towlower = yes; then
31992 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
31993 included before <wchar.h>.
31994 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
31995 must be included before <wchar.h>. */
31996 #include <stddef.h>
32001 # include <wctype.h>
32005 if test "x$ac_cv_have_decl_towlower" = xyes; then :
32011 cat >>confdefs.h <<_ACEOF
32012 #define HAVE_DECL_TOWLOWER $ac_have_decl
32015 if test $ac_cv_have_decl_towlower = yes; then
32024 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
32028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
32029 $as_echo_n "checking for wctype_t... " >&6; }
32030 if ${gl_cv_type_wctype_t+:} false; then :
32031 $as_echo_n "(cached) " >&6
32033 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32034 /* end confdefs.h. */
32035 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
32036 included before <wchar.h>.
32037 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
32038 must be included before <wchar.h>. */
32039 #include <stddef.h>
32044 # include <wctype.h>
32056 if ac_fn_c_try_compile "$LINENO"; then :
32057 gl_cv_type_wctype_t=yes
32059 gl_cv_type_wctype_t=no
32061 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32064 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
32065 $as_echo "$gl_cv_type_wctype_t" >&6; }
32066 if test $gl_cv_type_wctype_t = no; then
32070 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
32071 $as_echo_n "checking for wctrans_t... " >&6; }
32072 if ${gl_cv_type_wctrans_t+:} false; then :
32073 $as_echo_n "(cached) " >&6
32075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32076 /* end confdefs.h. */
32077 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
32078 included before <wchar.h>.
32079 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
32080 must be included before <wchar.h>. */
32081 #include <stddef.h>
32085 #include <wctype.h>
32096 if ac_fn_c_try_compile "$LINENO"; then :
32097 gl_cv_type_wctrans_t=yes
32099 gl_cv_type_wctrans_t=no
32101 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
32105 $as_echo "$gl_cv_type_wctrans_t" >&6; }
32106 if test $gl_cv_type_wctrans_t = no; then
32111 for gl_func in wctype iswctype wctrans towctrans ; do
32112 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
32113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
32114 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
32115 if eval \${$as_gl_Symbol+:} false; then :
32116 $as_echo_n "(cached) " >&6
32118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32119 /* end confdefs.h. */
32121 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32123 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
32124 included before <wchar.h>. */
32125 #if !(defined __GLIBC__ && !defined __UCLIBC__)
32126 # include <stddef.h>
32127 # include <stdio.h>
32129 # include <wchar.h>
32131 #include <wctype.h>
32142 if ac_fn_c_try_compile "$LINENO"; then :
32143 eval "$as_gl_Symbol=yes"
32145 eval "$as_gl_Symbol=no"
32147 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32149 eval ac_res=\$$as_gl_Symbol
32150 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
32151 $as_echo "$ac_res" >&6; }
32152 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
32153 cat >>confdefs.h <<_ACEOF
32154 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
32157 eval ac_cv_have_decl_$gl_func=yes
32173 ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" "
32174 /* AIX 3.2.5 declares wcwidth in <string.h>. */
32175 #include <string.h>
32176 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32178 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
32179 before <wchar.h>. */
32180 #include <stddef.h>
32186 if test "x$ac_cv_have_decl_wcwidth" = xyes; then :
32192 cat >>confdefs.h <<_ACEOF
32193 #define HAVE_DECL_WCWIDTH $ac_have_decl
32196 if test $ac_cv_have_decl_wcwidth != yes; then
32197 HAVE_DECL_WCWIDTH=0
32200 if test $ac_cv_func_wcwidth = yes; then
32202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5
32203 $as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; }
32204 if ${gl_cv_func_wcwidth_works+:} false; then :
32205 $as_echo_n "(cached) " >&6
32208 if test "$cross_compiling" = yes; then :
32211 # Guess yes on glibc and AIX 7 systems.
32212 *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";;
32213 *) gl_cv_func_wcwidth_works="guessing no";;
32217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32218 /* end confdefs.h. */
32220 #include <locale.h>
32221 /* AIX 3.2.5 declares wcwidth in <string.h>. */
32222 #include <string.h>
32223 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
32225 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
32226 before <wchar.h>. */
32227 #include <stddef.h>
32231 #if !HAVE_DECL_WCWIDTH
32233 # ifdef __cplusplus
32241 if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL)
32243 if (wcwidth (0x0301) > 0)
32245 if (wcwidth (0x05B0) > 0)
32247 if (wcwidth (0x200B) > 0)
32253 if ac_fn_c_try_run "$LINENO"; then :
32254 gl_cv_func_wcwidth_works=yes
32256 gl_cv_func_wcwidth_works=no
32258 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
32259 conftest.$ac_objext conftest.beam conftest.$ac_ext
32264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5
32265 $as_echo "$gl_cv_func_wcwidth_works" >&6; }
32266 case "$gl_cv_func_wcwidth_works" in
32268 *no) REPLACE_WCWIDTH=1 ;;
32274 if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then
32283 gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext"
32297 $as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h
32304 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
32310 if test $REPLACE_WRITE = 1; then
32319 gl_LIBOBJS="$gl_LIBOBJS write.$ac_objext"
32334 $as_echo "#define GNULIB_TEST_WRITE 1" >>confdefs.h
32344 for ac_header in stdint.h
32346 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
32347 if test "x$ac_cv_header_stdint_h" = xyes; then :
32348 cat >>confdefs.h <<_ACEOF
32349 #define HAVE_STDINT_H 1
32368 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=xasprintf:1:c-format"
32370 # End of code from modules
32391 gl_source_base='tests'
32392 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
32394 gl_module_indicator_condition=$gltests_WITNESS
32404 LIBGNU_LIBDEPS="$gl_libdeps"
32406 LIBGNU_LTLIBDEPS="$gl_ltlibdeps"
32418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5
32419 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; }
32420 if ${ac_cv_header_time+:} false; then :
32421 $as_echo_n "(cached) " >&6
32423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32424 /* end confdefs.h. */
32425 #include <sys/types.h>
32426 #include <sys/time.h>
32432 if ((struct tm *) 0)
32438 if ac_fn_c_try_compile "$LINENO"; then :
32439 ac_cv_header_time=yes
32441 ac_cv_header_time=no
32443 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32445 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5
32446 $as_echo "$ac_cv_header_time" >&6; }
32447 if test $ac_cv_header_time = yes; then
32449 $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h
32453 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
32454 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
32456 cat >>confdefs.h <<_ACEOF
32457 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
32461 $as_echo "#define HAVE_ST_BLKSIZE 1" >>confdefs.h
32470 # Set LIB_SETSOCKOPT to -lnsl -lsocket if necessary.
32473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
32474 $as_echo_n "checking for library containing setsockopt... " >&6; }
32475 if ${ac_cv_search_setsockopt+:} false; then :
32476 $as_echo_n "(cached) " >&6
32478 ac_func_search_save_LIBS=$LIBS
32479 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32480 /* end confdefs.h. */
32482 /* Override any GCC internal prototype to avoid an error.
32483 Use char because int might match the return type of a GCC
32484 builtin and then its argument prototype would still apply. */
32488 char setsockopt ();
32492 return setsockopt ();
32497 for ac_lib in '' socket; do
32498 if test -z "$ac_lib"; then
32499 ac_res="none required"
32502 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
32504 if ac_fn_c_try_link "$LINENO"; then :
32505 ac_cv_search_setsockopt=$ac_res
32507 rm -f core conftest.err conftest.$ac_objext \
32509 if ${ac_cv_search_setsockopt+:} false; then :
32513 if ${ac_cv_search_setsockopt+:} false; then :
32516 ac_cv_search_setsockopt=no
32518 rm conftest.$ac_ext
32519 LIBS=$ac_func_search_save_LIBS
32521 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
32522 $as_echo "$ac_cv_search_setsockopt" >&6; }
32523 ac_res=$ac_cv_search_setsockopt
32524 if test "$ac_res" != no; then :
32525 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
32528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
32529 $as_echo_n "checking for library containing setsockopt... " >&6; }
32530 if ${ac_cv_search_setsockopt+:} false; then :
32531 $as_echo_n "(cached) " >&6
32533 ac_func_search_save_LIBS=$LIBS
32534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32535 /* end confdefs.h. */
32537 /* Override any GCC internal prototype to avoid an error.
32538 Use char because int might match the return type of a GCC
32539 builtin and then its argument prototype would still apply. */
32543 char setsockopt ();
32547 return setsockopt ();
32552 for ac_lib in '' socket; do
32553 if test -z "$ac_lib"; then
32554 ac_res="none required"
32557 LIBS="-l$ac_lib -lnsl $ac_func_search_save_LIBS"
32559 if ac_fn_c_try_link "$LINENO"; then :
32560 ac_cv_search_setsockopt=$ac_res
32562 rm -f core conftest.err conftest.$ac_objext \
32564 if ${ac_cv_search_setsockopt+:} false; then :
32568 if ${ac_cv_search_setsockopt+:} false; then :
32571 ac_cv_search_setsockopt=no
32573 rm conftest.$ac_ext
32574 LIBS=$ac_func_search_save_LIBS
32576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
32577 $as_echo "$ac_cv_search_setsockopt" >&6; }
32578 ac_res=$ac_cv_search_setsockopt
32579 if test "$ac_res" != no; then :
32580 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
32586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing setsockopt" >&5
32587 $as_echo_n "checking for library containing setsockopt... " >&6; }
32588 if ${ac_cv_search_setsockopt+:} false; then :
32589 $as_echo_n "(cached) " >&6
32591 ac_func_search_save_LIBS=$LIBS
32592 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32593 /* end confdefs.h. */
32595 /* Override any GCC internal prototype to avoid an error.
32596 Use char because int might match the return type of a GCC
32597 builtin and then its argument prototype would still apply. */
32601 char setsockopt ();
32605 return setsockopt ();
32610 for ac_lib in '' nsl; do
32611 if test -z "$ac_lib"; then
32612 ac_res="none required"
32615 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
32617 if ac_fn_c_try_link "$LINENO"; then :
32618 ac_cv_search_setsockopt=$ac_res
32620 rm -f core conftest.err conftest.$ac_objext \
32622 if ${ac_cv_search_setsockopt+:} false; then :
32626 if ${ac_cv_search_setsockopt+:} false; then :
32629 ac_cv_search_setsockopt=no
32631 rm conftest.$ac_ext
32632 LIBS=$ac_func_search_save_LIBS
32634 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_setsockopt" >&5
32635 $as_echo "$ac_cv_search_setsockopt" >&6; }
32636 ac_res=$ac_cv_search_setsockopt
32637 if test "$ac_res" != no; then :
32638 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
32643 case "$ac_cv_search_setsockopt" in
32644 -l*) LIB_SETSOCKOPT=$ac_cv_search_setsockopt
32650 if test $ac_cv_header_sys_mtio_h = yes; then
32651 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remote tape header files" >&5
32652 $as_echo_n "checking for remote tape header files... " >&6; }
32653 if ${pu_cv_header_rmt+:} false; then :
32654 $as_echo_n "(cached) " >&6
32656 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32657 /* end confdefs.h. */
32660 # include <sgtty.h>
32662 #include <sys/socket.h>
32664 if ac_fn_c_try_cpp "$LINENO"; then :
32665 pu_cv_header_rmt=yes
32667 pu_cv_header_rmt=no
32669 rm -f conftest.err conftest.i conftest.$ac_ext
32671 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pu_cv_header_rmt" >&5
32672 $as_echo "$pu_cv_header_rmt" >&6; }
32673 test $pu_cv_header_rmt = yes && PU_RMT_PROG='rmt$(EXEEXT)'
32678 for ac_header in sys/mtio.h
32680 ac_fn_c_check_header_mongrel "$LINENO" "sys/mtio.h" "ac_cv_header_sys_mtio_h" "$ac_includes_default"
32681 if test "x$ac_cv_header_sys_mtio_h" = xyes; then :
32682 cat >>confdefs.h <<_ACEOF
32683 #define HAVE_SYS_MTIO_H 1
32690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which ioctl field to test for reversed bytes" >&5
32691 $as_echo_n "checking which ioctl field to test for reversed bytes... " >&6; }
32692 if ${pu_cv_header_mtio_check_field+:} false; then :
32693 $as_echo_n "(cached) " >&6
32695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32696 /* end confdefs.h. */
32697 #include <sys/mtio.h>
32700 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
32701 $EGREP "mt_model" >/dev/null 2>&1; then :
32702 pu_cv_header_mtio_check_field=mt_model
32704 pu_cv_header_mtio_check_field=mt_type
32709 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pu_cv_header_mtio_check_field" >&5
32710 $as_echo "$pu_cv_header_mtio_check_field" >&6; }
32712 cat >>confdefs.h <<_ACEOF
32713 #define MTIO_CHECK_FIELD $pu_cv_header_mtio_check_field
32719 if test "x$DEFAULT_RMT_DIR" != x; then
32720 DEFAULT_RMT_COMMAND=$DEFAULT_RMT_DIR/rmt
32722 DEFAULT_RMT_DIR='$(libexecdir)'
32725 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build rmt" >&5
32726 $as_echo_n "checking whether to build rmt... " >&6; }
32728 # Check whether --with-rmt was given.
32729 if test "${with_rmt+set}" = set; then :
32730 withval=$with_rmt; case $withval in
32731 yes|no) as_fn_error $? "Invalid argument to --with-rmt" "$LINENO" 5;;
32732 /*) DEFAULT_RMT_COMMAND=$withval
32733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, use $withval instead" >&5
32734 $as_echo "no, use $withval instead" >&6; };;
32735 *) as_fn_error $? "Argument to --with-rmt must be an absolute file name" "$LINENO" 5;;
32738 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
32739 $as_echo "yes" >&6; }
32741 if test "$PU_RMT_PROG" = ""; then
32742 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: not building rmt, required header files are missing" >&5
32743 $as_echo "$as_me: WARNING: not building rmt, required header files are missing" >&2;}
32749 if test "x$DEFAULT_RMT_COMMAND" != x; then
32751 cat >>confdefs.h <<_ACEOF
32752 #define DEFAULT_RMT_COMMAND "$DEFAULT_RMT_COMMAND"
32765 for ac_header in sys/buf.h
32767 ac_fn_c_check_header_compile "$LINENO" "sys/buf.h" "ac_cv_header_sys_buf_h" "#if HAVE_SYS_PARAM_H
32768 #include <sys/param.h>
32771 if test "x$ac_cv_header_sys_buf_h" = xyes; then :
32772 cat >>confdefs.h <<_ACEOF
32773 #define HAVE_SYS_BUF_H 1
32783 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
32784 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
32786 cat >>confdefs.h <<_ACEOF
32787 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
32799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
32800 $as_echo_n "checking for library containing gethostbyname... " >&6; }
32801 if ${ac_cv_search_gethostbyname+:} false; then :
32802 $as_echo_n "(cached) " >&6
32804 ac_func_search_save_LIBS=$LIBS
32805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32806 /* end confdefs.h. */
32808 /* Override any GCC internal prototype to avoid an error.
32809 Use char because int might match the return type of a GCC
32810 builtin and then its argument prototype would still apply. */
32814 char gethostbyname ();
32818 return gethostbyname ();
32823 for ac_lib in '' nsl; do
32824 if test -z "$ac_lib"; then
32825 ac_res="none required"
32828 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
32830 if ac_fn_c_try_link "$LINENO"; then :
32831 ac_cv_search_gethostbyname=$ac_res
32833 rm -f core conftest.err conftest.$ac_objext \
32835 if ${ac_cv_search_gethostbyname+:} false; then :
32839 if ${ac_cv_search_gethostbyname+:} false; then :
32842 ac_cv_search_gethostbyname=no
32844 rm conftest.$ac_ext
32845 LIBS=$ac_func_search_save_LIBS
32847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
32848 $as_echo "$ac_cv_search_gethostbyname" >&6; }
32849 ac_res=$ac_cv_search_gethostbyname
32850 if test "$ac_res" != no; then :
32851 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
32858 # gl_GCC_VERSION_IFELSE([major], [minor], [run-if-found], [run-if-not-found])
32859 # ------------------------------------------------
32860 # If $CPP is gcc-MAJOR.MINOR or newer, then run RUN-IF-FOUND.
32861 # Otherwise, run RUN-IF-NOT-FOUND.
32864 # Check whether --enable-gcc-warnings was given.
32865 if test "${enable_gcc_warnings+set}" = set; then :
32866 enableval=$enable_gcc_warnings; case $enableval in
32868 *) as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
32870 gl_gcc_warnings=$enableval
32873 if test -d "$srcdir"/.git; then
32874 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32875 /* end confdefs.h. */
32877 #if (4) < __GNUC__ || ((4) == __GNUC__ && (6) <= __GNUC_MINOR__)
32880 # error "your version of gcc is older than 4.6"
32892 if ac_fn_c_try_cpp "$LINENO"; then :
32893 gl_gcc_warnings=yes
32895 rm -f conftest.err conftest.i conftest.$ac_ext
32903 if test "$gl_gcc_warnings" = yes; then
32904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror -Wunknown-warning-option" >&5
32905 $as_echo_n "checking whether C compiler handles -Werror -Wunknown-warning-option... " >&6; }
32906 if ${gl_cv_warn_c__Werror__Wunknown_warning_option+:} false; then :
32907 $as_echo_n "(cached) " >&6
32910 gl_save_compiler_FLAGS="$CFLAGS"
32911 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror -Wunknown-warning-option"
32912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32913 /* end confdefs.h. */
32923 if ac_fn_c_try_compile "$LINENO"; then :
32924 gl_cv_warn_c__Werror__Wunknown_warning_option=yes
32926 gl_cv_warn_c__Werror__Wunknown_warning_option=no
32928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32929 CFLAGS="$gl_save_compiler_FLAGS"
32932 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror__Wunknown_warning_option" >&5
32933 $as_echo "$gl_cv_warn_c__Werror__Wunknown_warning_option" >&6; }
32934 if test "x$gl_cv_warn_c__Werror__Wunknown_warning_option" = xyes; then :
32935 gl_unknown_warnings_are_errors='-Wunknown-warning-option -Werror'
32937 gl_unknown_warnings_are_errors=
32941 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
32942 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
32943 if ${gl_cv_warn_c__Werror+:} false; then :
32944 $as_echo_n "(cached) " >&6
32947 gl_save_compiler_FLAGS="$CFLAGS"
32948 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Werror"
32949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
32950 /* end confdefs.h. */
32960 if ac_fn_c_try_compile "$LINENO"; then :
32961 gl_cv_warn_c__Werror=yes
32963 gl_cv_warn_c__Werror=no
32965 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
32966 CFLAGS="$gl_save_compiler_FLAGS"
32969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
32970 $as_echo "$gl_cv_warn_c__Werror" >&6; }
32971 if test "x$gl_cv_warn_c__Werror" = xyes; then :
32972 as_fn_append WERROR_CFLAGS " -Werror"
32979 # This, $nw, is the list of warnings we disable.
32980 nw="$nw -Wformat-nonliteral" # warnings in Fedora 17 stdio.h
32981 nw="$nw -Wvla" # warnings in gettext.h
32982 nw="$nw -Wswitch-default" # Too many warnings for now
32983 nw="$nw -Wunsafe-loop-optimizations" # It's OK to omit unsafe optimizations.
32984 nw="$nw -Winline" # It's OK to not inline.
32985 nw="$nw -Wstrict-overflow" # It's OK to optimize strictly.
32986 nw="$nw -Wsuggest-attribute=pure" # Too many warnings for now.
32990 if test -n "$GCC"; then
32992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
32993 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
32994 if ${gl_cv_cc_nomfi_supported+:} false; then :
32995 $as_echo_n "(cached) " >&6
32998 gl_save_CFLAGS="$CFLAGS"
32999 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
33000 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33001 /* end confdefs.h. */
33011 if ac_fn_c_try_compile "$LINENO"; then :
33012 gl_cv_cc_nomfi_supported=yes
33014 gl_cv_cc_nomfi_supported=no
33016 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33017 CFLAGS="$gl_save_CFLAGS"
33020 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
33021 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
33023 if test "$gl_cv_cc_nomfi_supported" = yes; then
33024 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
33025 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
33026 if ${gl_cv_cc_nomfi_needed+:} false; then :
33027 $as_echo_n "(cached) " >&6
33030 gl_save_CFLAGS="$CFLAGS"
33031 CFLAGS="$CFLAGS -W -Werror"
33032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33033 /* end confdefs.h. */
33036 typedef struct { int a; int b; } s_t;
33048 if ac_fn_c_try_compile "$LINENO"; then :
33049 gl_cv_cc_nomfi_needed=no
33051 gl_cv_cc_nomfi_needed=yes
33053 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33054 CFLAGS="$gl_save_CFLAGS"
33058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
33059 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
33062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wuninitialized is supported" >&5
33063 $as_echo_n "checking whether -Wuninitialized is supported... " >&6; }
33064 if ${gl_cv_cc_uninitialized_supported+:} false; then :
33065 $as_echo_n "(cached) " >&6
33068 gl_save_CFLAGS="$CFLAGS"
33069 CFLAGS="$CFLAGS -Werror -Wuninitialized"
33070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33071 /* end confdefs.h. */
33081 if ac_fn_c_try_compile "$LINENO"; then :
33082 gl_cv_cc_uninitialized_supported=yes
33084 gl_cv_cc_uninitialized_supported=no
33086 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33087 CFLAGS="$gl_save_CFLAGS"
33090 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_uninitialized_supported" >&5
33091 $as_echo "$gl_cv_cc_uninitialized_supported" >&6; }
33095 # List all gcc warning categories.
33097 for gl_manywarn_item in \
33101 -Waggressive-loop-optimizations \
33105 -Wbad-function-cast \
33106 -Wbuiltin-macro-redefined \
33108 -Wchar-subscripts \
33112 -Wcoverage-mismatch \
33115 -Wdeprecated-declarations \
33116 -Wdisabled-optimization \
33118 -Wdouble-promotion \
33123 -Wformat-contains-nul \
33124 -Wformat-extra-args \
33125 -Wformat-nonliteral \
33126 -Wformat-security \
33128 -Wformat-zero-length \
33129 -Wfree-nonheap-object \
33130 -Wignored-qualifiers \
33132 -Wimplicit-function-declaration \
33136 -Wint-to-pointer-cast \
33137 -Winvalid-memory-model \
33139 -Wjump-misses-init \
33142 -Wmaybe-uninitialized \
33144 -Wmissing-declarations \
33145 -Wmissing-field-initializers \
33146 -Wmissing-include-dirs \
33147 -Wmissing-parameter-type \
33148 -Wmissing-prototypes \
33155 -Wold-style-declaration \
33156 -Wold-style-definition \
33158 -Woverlength-strings \
33161 -Wpacked-bitfield-compat \
33165 -Wpointer-to-int-cast \
33167 -Wreturn-local-addr \
33171 -Wsizeof-pointer-memaccess \
33172 -Wstack-protector \
33173 -Wstrict-aliasing \
33174 -Wstrict-overflow \
33175 -Wstrict-prototypes \
33176 -Wsuggest-attribute=const \
33177 -Wsuggest-attribute=format \
33178 -Wsuggest-attribute=noreturn \
33179 -Wsuggest-attribute=pure \
33188 -Wunknown-pragmas \
33189 -Wunsafe-loop-optimizations \
33191 -Wunused-but-set-parameter \
33192 -Wunused-but-set-variable \
33193 -Wunused-function \
33195 -Wunused-local-typedefs \
33197 -Wunused-parameter \
33200 -Wunused-variable \
33202 -Wvariadic-macros \
33203 -Wvector-operation-performance \
33205 -Wvolatile-register-var \
33209 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
33212 # Disable specific options as needed.
33213 if test "$gl_cv_cc_nomfi_needed" = yes; then
33214 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
33217 if test "$gl_cv_cc_uninitialized_supported" = no; then
33218 gl_manywarn_set="$gl_manywarn_set -Wno-uninitialized"
33221 ws=$gl_manywarn_set
33229 *" $gl_warn_item "*)
33232 gl_warn_set="$gl_warn_set $gl_warn_item"
33240 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
33241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
33242 $as_echo_n "checking whether C compiler handles $w... " >&6; }
33243 if eval \${$as_gl_Warn+:} false; then :
33244 $as_echo_n "(cached) " >&6
33247 gl_save_compiler_FLAGS="$CFLAGS"
33248 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors $w"
33249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33250 /* end confdefs.h. */
33260 if ac_fn_c_try_compile "$LINENO"; then :
33261 eval "$as_gl_Warn=yes"
33263 eval "$as_gl_Warn=no"
33265 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33266 CFLAGS="$gl_save_compiler_FLAGS"
33269 eval ac_res=\$$as_gl_Warn
33270 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
33271 $as_echo "$ac_res" >&6; }
33272 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
33273 as_fn_append WARN_CFLAGS " $w"
33279 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
33280 $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
33281 if ${gl_cv_warn_c__Wno_sign_compare+:} false; then :
33282 $as_echo_n "(cached) " >&6
33285 gl_save_compiler_FLAGS="$CFLAGS"
33286 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-sign-compare"
33287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33288 /* end confdefs.h. */
33298 if ac_fn_c_try_compile "$LINENO"; then :
33299 gl_cv_warn_c__Wno_sign_compare=yes
33301 gl_cv_warn_c__Wno_sign_compare=no
33303 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33304 CFLAGS="$gl_save_compiler_FLAGS"
33307 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
33308 $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
33309 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes; then :
33310 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
33313 # Too many warnings for now
33315 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-type-limits" >&5
33316 $as_echo_n "checking whether C compiler handles -Wno-type-limits... " >&6; }
33317 if ${gl_cv_warn_c__Wno_type_limits+:} false; then :
33318 $as_echo_n "(cached) " >&6
33321 gl_save_compiler_FLAGS="$CFLAGS"
33322 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-type-limits"
33323 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33324 /* end confdefs.h. */
33334 if ac_fn_c_try_compile "$LINENO"; then :
33335 gl_cv_warn_c__Wno_type_limits=yes
33337 gl_cv_warn_c__Wno_type_limits=no
33339 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33340 CFLAGS="$gl_save_compiler_FLAGS"
33343 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_type_limits" >&5
33344 $as_echo "$gl_cv_warn_c__Wno_type_limits" >&6; }
33345 if test "x$gl_cv_warn_c__Wno_type_limits" = xyes; then :
33346 as_fn_append WARN_CFLAGS " -Wno-type-limits"
33349 # It's OK to optimize based on types.
33351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
33352 $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
33353 if ${gl_cv_warn_c__Wno_unused_parameter+:} false; then :
33354 $as_echo_n "(cached) " >&6
33357 gl_save_compiler_FLAGS="$CFLAGS"
33358 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-unused-parameter"
33359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33360 /* end confdefs.h. */
33370 if ac_fn_c_try_compile "$LINENO"; then :
33371 gl_cv_warn_c__Wno_unused_parameter=yes
33373 gl_cv_warn_c__Wno_unused_parameter=no
33375 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33376 CFLAGS="$gl_save_compiler_FLAGS"
33379 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
33380 $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
33381 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes; then :
33382 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
33385 # Too many warnings for now
33387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
33388 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
33389 if ${gl_cv_warn_c__Wno_format_nonliteral+:} false; then :
33390 $as_echo_n "(cached) " >&6
33393 gl_save_compiler_FLAGS="$CFLAGS"
33394 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-format-nonliteral"
33395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33396 /* end confdefs.h. */
33406 if ac_fn_c_try_compile "$LINENO"; then :
33407 gl_cv_warn_c__Wno_format_nonliteral=yes
33409 gl_cv_warn_c__Wno_format_nonliteral=no
33411 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33412 CFLAGS="$gl_save_compiler_FLAGS"
33415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
33416 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
33417 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes; then :
33418 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
33424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
33425 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
33426 if ${gl_cv_warn_c__fdiagnostics_show_option+:} false; then :
33427 $as_echo_n "(cached) " >&6
33430 gl_save_compiler_FLAGS="$CFLAGS"
33431 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -fdiagnostics-show-option"
33432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33433 /* end confdefs.h. */
33443 if ac_fn_c_try_compile "$LINENO"; then :
33444 gl_cv_warn_c__fdiagnostics_show_option=yes
33446 gl_cv_warn_c__fdiagnostics_show_option=no
33448 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33449 CFLAGS="$gl_save_compiler_FLAGS"
33452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
33453 $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
33454 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes; then :
33455 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
33460 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
33461 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
33462 if ${gl_cv_warn_c__funit_at_a_time+:} false; then :
33463 $as_echo_n "(cached) " >&6
33466 gl_save_compiler_FLAGS="$CFLAGS"
33467 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -funit-at-a-time"
33468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33469 /* end confdefs.h. */
33479 if ac_fn_c_try_compile "$LINENO"; then :
33480 gl_cv_warn_c__funit_at_a_time=yes
33482 gl_cv_warn_c__funit_at_a_time=no
33484 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33485 CFLAGS="$gl_save_compiler_FLAGS"
33488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
33489 $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
33490 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes; then :
33491 as_fn_append WARN_CFLAGS " -funit-at-a-time"
33499 $as_echo "#define lint 1" >>confdefs.h
33503 $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
33506 # Use a slightly smaller set of warning options for lib/.
33507 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
33509 nw="$nw -Wmissing-prototypes"
33510 nw="$nw -Wunused-macros"
33512 # These are for argp.
33513 nw="$nw -Wmissing-field-initializers"
33518 set x $WARN_CFLAGS; shift
33522 *" $gl_warn_item "*)
33525 gl_warn_set="$gl_warn_set $gl_warn_item"
33529 GNULIB_WARN_CFLAGS=$gl_warn_set
33532 # This is also for argp.
33534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
33535 $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
33536 if ${gl_cv_warn_c__Wno_missing_field_initializers+:} false; then :
33537 $as_echo_n "(cached) " >&6
33540 gl_save_compiler_FLAGS="$CFLAGS"
33541 as_fn_append CFLAGS " $gl_unknown_warnings_are_errors -Wno-missing-field-initializers"
33542 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33543 /* end confdefs.h. */
33553 if ac_fn_c_try_compile "$LINENO"; then :
33554 gl_cv_warn_c__Wno_missing_field_initializers=yes
33556 gl_cv_warn_c__Wno_missing_field_initializers=no
33558 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33559 CFLAGS="$gl_save_compiler_FLAGS"
33562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
33563 $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
33564 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = xyes; then :
33565 as_fn_append GNULIB_WARN_CFLAGS " -Wno-missing-field-initializers"
33572 # For gnulib-tests, the set is slightly smaller still.
33574 # It's not worth being this picky about test programs.
33575 nw="$nw -Wsuggest-attribute=const"
33578 set x $GNULIB_WARN_CFLAGS; shift
33582 *" $gl_warn_item "*)
33585 gl_warn_set="$gl_warn_set $gl_warn_item"
33589 GNULIB_TEST_WARN_CFLAGS=$gl_warn_set
33596 # Check whether --with-xattrs was given.
33597 if test "${with_xattrs+set}" = set; then :
33598 withval=$with_xattrs;
33605 for ac_header in attr/xattr.h
33607 ac_fn_c_check_header_mongrel "$LINENO" "attr/xattr.h" "ac_cv_header_attr_xattr_h" "$ac_includes_default"
33608 if test "x$ac_cv_header_attr_xattr_h" = xyes; then :
33609 cat >>confdefs.h <<_ACEOF
33610 #define HAVE_ATTR_XATTR_H 1
33617 if test "$ac_cv_header_attr_xattr_h" = yes; then
33618 TAR_COND_XATTR_H_TRUE=
33619 TAR_COND_XATTR_H_FALSE='#'
33621 TAR_COND_XATTR_H_TRUE='#'
33622 TAR_COND_XATTR_H_FALSE=
33625 if test "$ac_cv_header_attr_xattr_h" = yes; then
33626 for ac_func in getxattr fgetxattr lgetxattr \
33627 setxattr fsetxattr lsetxattr \
33628 listxattr flistxattr llistxattr
33630 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
33631 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
33632 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
33633 cat >>confdefs.h <<_ACEOF
33634 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
33636 # only when functions are present
33638 $as_echo "#define HAVE_ATTR_XATTR_H 1" >>confdefs.h
33640 if test "$with_xattrs" != no; then
33642 $as_echo "#define HAVE_XATTRS /**/" >>confdefs.h
33658 ac_fn_c_check_decl "$LINENO" "getgrgid" "ac_cv_have_decl_getgrgid" "#include <grp.h>
33660 if test "x$ac_cv_have_decl_getgrgid" = xyes; then :
33666 cat >>confdefs.h <<_ACEOF
33667 #define HAVE_DECL_GETGRGID $ac_have_decl
33670 ac_fn_c_check_decl "$LINENO" "getpwuid" "ac_cv_have_decl_getpwuid" "#include <pwd.h>
33672 if test "x$ac_cv_have_decl_getpwuid" = xyes; then :
33678 cat >>confdefs.h <<_ACEOF
33679 #define HAVE_DECL_GETPWUID $ac_have_decl
33682 ac_fn_c_check_decl "$LINENO" "time" "ac_cv_have_decl_time" "#include <time.h>
33684 if test "x$ac_cv_have_decl_time" = xyes; then :
33690 cat >>confdefs.h <<_ACEOF
33691 #define HAVE_DECL_TIME $ac_have_decl
33695 ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid"
33696 if test "x$ac_cv_func_waitpid" = xyes; then :
33697 $as_echo "#define HAVE_WAITPID 1" >>confdefs.h
33700 case " $LIBOBJS " in
33701 *" waitpid.$ac_objext "* ) ;;
33702 *) LIBOBJS="$LIBOBJS waitpid.$ac_objext"
33711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remote shell" >&5
33712 $as_echo_n "checking for remote shell... " >&6; }
33713 if ${tar_cv_path_RSH+:} false; then :
33714 $as_echo_n "(cached) " >&6
33716 if test -n "$RSH"; then
33717 tar_cv_path_RSH=$RSH
33720 for ac_file in /usr/ucb/rsh /usr/bin/remsh /usr/bin/rsh /usr/bsd/rsh \
33721 /usr/bin/nsh /usr/bin/rcmd
33723 # Prefer a non-symlink rsh to a symlink one, so that binaries built
33724 # on AIX 4.1.4, where /usr/ucb/rsh is a symlink to /usr/bin/rsh
33725 # will run on AIX 4.3.0, which has only /usr/bin/rsh.
33726 if test -f $ac_file; then
33727 if (test -h $ac_file) 2>/dev/null; then
33728 test $tar_cv_path_RSH = no && tar_cv_path_RSH=$ac_file
33730 tar_cv_path_RSH=$ac_file
33737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tar_cv_path_RSH" >&5
33738 $as_echo "$tar_cv_path_RSH" >&6; }
33739 if test $tar_cv_path_RSH = no; then
33740 for ac_header in netdb.h
33742 ac_fn_c_check_header_mongrel "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default"
33743 if test "x$ac_cv_header_netdb_h" = xyes; then :
33744 cat >>confdefs.h <<_ACEOF
33745 #define HAVE_NETDB_H 1
33754 cat >>confdefs.h <<_ACEOF
33755 #define REMOTE_SHELL "$tar_cv_path_RSH"
33764 # Check whether --with-compress was given.
33765 if test "${with_compress+set}" = set; then :
33766 withval=$with_compress; tar_cv_compressor_compress=${withval}
33768 tar_cv_compressor_compress=compress
33772 cat >>confdefs.h <<_ACEOF
33773 #define COMPRESS_PROGRAM "$tar_cv_compressor_compress"
33780 # Check whether --with-gzip was given.
33781 if test "${with_gzip+set}" = set; then :
33782 withval=$with_gzip; tar_cv_compressor_gzip=${withval}
33784 tar_cv_compressor_gzip=gzip
33788 cat >>confdefs.h <<_ACEOF
33789 #define GZIP_PROGRAM "$tar_cv_compressor_gzip"
33796 # Check whether --with-bzip2 was given.
33797 if test "${with_bzip2+set}" = set; then :
33798 withval=$with_bzip2; tar_cv_compressor_bzip2=${withval}
33800 tar_cv_compressor_bzip2=bzip2
33804 cat >>confdefs.h <<_ACEOF
33805 #define BZIP2_PROGRAM "$tar_cv_compressor_bzip2"
33812 # Check whether --with-lzip was given.
33813 if test "${with_lzip+set}" = set; then :
33814 withval=$with_lzip; tar_cv_compressor_lzip=${withval}
33816 tar_cv_compressor_lzip=lzip
33820 cat >>confdefs.h <<_ACEOF
33821 #define LZIP_PROGRAM "$tar_cv_compressor_lzip"
33828 # Check whether --with-lzma was given.
33829 if test "${with_lzma+set}" = set; then :
33830 withval=$with_lzma; tar_cv_compressor_lzma=${withval}
33832 tar_cv_compressor_lzma=lzma
33836 cat >>confdefs.h <<_ACEOF
33837 #define LZMA_PROGRAM "$tar_cv_compressor_lzma"
33844 # Check whether --with-lzop was given.
33845 if test "${with_lzop+set}" = set; then :
33846 withval=$with_lzop; tar_cv_compressor_lzop=${withval}
33848 tar_cv_compressor_lzop=lzop
33852 cat >>confdefs.h <<_ACEOF
33853 #define LZOP_PROGRAM "$tar_cv_compressor_lzop"
33860 # Check whether --with-xz was given.
33861 if test "${with_xz+set}" = set; then :
33862 withval=$with_xz; tar_cv_compressor_xz=${withval}
33864 tar_cv_compressor_xz=xz
33868 cat >>confdefs.h <<_ACEOF
33869 #define XZ_PROGRAM "$tar_cv_compressor_xz"
33873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default archive format" >&5
33874 $as_echo_n "checking for default archive format... " >&6; }
33878 if test -z "$DEFAULT_ARCHIVE_FORMAT"; then
33879 DEFAULT_ARCHIVE_FORMAT="GNU"
33881 case $DEFAULT_ARCHIVE_FORMAT in
33882 V7|OLDGNU|USTAR|POSIX|GNU) ;;
33883 *) as_fn_error $? "Invalid format name" "$LINENO" 5;;
33886 cat >>confdefs.h <<_ACEOF
33887 #define DEFAULT_ARCHIVE_FORMAT ${DEFAULT_ARCHIVE_FORMAT}_FORMAT
33890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_ARCHIVE_FORMAT" >&5
33891 $as_echo "$DEFAULT_ARCHIVE_FORMAT" >&6; }
33893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default archive" >&5
33894 $as_echo_n "checking for default archive... " >&6; }
33897 if test -z "$DEFAULT_ARCHIVE"; then
33900 if test -z "`ls $DEFAULT_ARCHIVE 2>/dev/null`"; then
33901 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: DEFAULT_ARCHIVE '$DEFAULT_ARCHIVE' not found on this system" >&5
33902 $as_echo "$as_me: WARNING: DEFAULT_ARCHIVE '$DEFAULT_ARCHIVE' not found on this system" >&2;}
33904 # FIXME: Look for DEFTAPE in <sys/mtio.h>.
33905 # FIXME: Let DEVICE_PREFIX be configured from the environment.
33906 # FIXME: Rearrange, here.
33907 case $DEFAULT_ARCHIVE in
33910 $as_echo "#define DENSITY_LETTER 1" >>confdefs.h
33912 device_prefix=`echo $DEFAULT_ARCHIVE | sed 's/0-7lmh$//'`
33915 device_prefix=`echo $DEFAULT_ARCHIVE | sed 's/0-7$//'`
33921 case "$device_prefix" in
33924 cat >>confdefs.h <<_ACEOF
33925 #define DEVICE_PREFIX "$device_prefix"
33932 cat >>confdefs.h <<_ACEOF
33933 #define DEFAULT_ARCHIVE "$DEFAULT_ARCHIVE"
33936 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_ARCHIVE" >&5
33937 $as_echo "$DEFAULT_ARCHIVE" >&6; }
33940 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default blocking" >&5
33941 $as_echo_n "checking for default blocking... " >&6; }
33942 DEFAULT_BLOCKING=${DEFAULT_BLOCKING-20}
33944 cat >>confdefs.h <<_ACEOF
33945 #define DEFAULT_BLOCKING $DEFAULT_BLOCKING
33948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_BLOCKING" >&5
33949 $as_echo "$DEFAULT_BLOCKING" >&6; }
33951 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default quoting style" >&5
33952 $as_echo_n "checking for default quoting style... " >&6; }
33955 DEFAULT_QUOTING_STYLE="escape"
33958 case $DEFAULT_QUOTING_STYLE in
33959 literal|shell|shell-always|c|escape|locale|clocale) ;;
33960 *) as_fn_error $? "Invalid quoting style" "$LINENO" 5;;
33962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEFAULT_QUOTING_STYLE" >&5
33963 $as_echo "$DEFAULT_QUOTING_STYLE" >&6; }
33964 DEFAULT_QUOTING_STYLE=`echo ${DEFAULT_QUOTING_STYLE}|sed 's/-/_/g'`_quoting_style
33966 cat >>confdefs.h <<_ACEOF
33967 #define DEFAULT_QUOTING_STYLE $DEFAULT_QUOTING_STYLE
33973 if test "X$prefix" = "XNONE"; then
33974 acl_final_prefix="$ac_default_prefix"
33976 acl_final_prefix="$prefix"
33978 if test "X$exec_prefix" = "XNONE"; then
33979 acl_final_exec_prefix='${prefix}'
33981 acl_final_exec_prefix="$exec_prefix"
33983 acl_save_prefix="$prefix"
33984 prefix="$acl_final_prefix"
33985 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
33986 prefix="$acl_save_prefix"
33990 # Check whether --with-gnu-ld was given.
33991 if test "${with_gnu_ld+set}" = set; then :
33992 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
33997 # Prepare PATH_SEPARATOR.
33998 # The user is always right.
33999 if test "${PATH_SEPARATOR+set}" != set; then
34000 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
34001 # contains only /bin. Note that ksh looks also at the FPATH variable,
34002 # so we have to set that as well for the test.
34004 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
34005 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
34006 || PATH_SEPARATOR=';'
34011 if test "$GCC" = yes; then
34012 # Check if gcc -print-prog-name=ld gives a path.
34013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5
34014 $as_echo_n "checking for ld used by $CC... " >&6; }
34017 # gcc leaves a trailing carriage return which upsets mingw
34018 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
34020 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
34023 # Accept absolute paths.
34025 re_direlt='/[^/][^/]*/\.\./'
34026 # Canonicalize the pathname of ld
34027 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'`
34028 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do
34029 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
34031 test -z "$LD" && LD="$ac_prog"
34034 # If it fails, then pretend we aren't using GCC.
34038 # If it is relative, then search for the first ld in PATH.
34039 with_gnu_ld=unknown
34042 elif test "$with_gnu_ld" = yes; then
34043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
34044 $as_echo_n "checking for GNU ld... " >&6; }
34046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
34047 $as_echo_n "checking for non-GNU ld... " >&6; }
34049 if ${acl_cv_path_LD+:} false; then :
34050 $as_echo_n "(cached) " >&6
34052 if test -z "$LD"; then
34053 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
34054 for ac_dir in $PATH; do
34055 IFS="$acl_save_ifs"
34056 test -z "$ac_dir" && ac_dir=.
34057 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
34058 acl_cv_path_LD="$ac_dir/$ac_prog"
34059 # Check to see if the program is GNU ld. I'd rather use --version,
34060 # but apparently some variants of GNU ld only accept -v.
34061 # Break only if it was the GNU/non-GNU ld that we prefer.
34062 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in
34063 *GNU* | *'with BFD'*)
34064 test "$with_gnu_ld" != no && break
34067 test "$with_gnu_ld" != yes && break
34072 IFS="$acl_save_ifs"
34074 acl_cv_path_LD="$LD" # Let the user override the test with a path.
34078 LD="$acl_cv_path_LD"
34079 if test -n "$LD"; then
34080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
34081 $as_echo "$LD" >&6; }
34083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34084 $as_echo "no" >&6; }
34086 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
34087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
34088 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
34089 if ${acl_cv_prog_gnu_ld+:} false; then :
34090 $as_echo_n "(cached) " >&6
34092 # I'd rather use --version here, but apparently some GNU lds only accept -v.
34093 case `$LD -v 2>&1 </dev/null` in
34094 *GNU* | *'with BFD'*)
34095 acl_cv_prog_gnu_ld=yes
34098 acl_cv_prog_gnu_ld=no
34102 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
34103 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
34104 with_gnu_ld=$acl_cv_prog_gnu_ld
34109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
34110 $as_echo_n "checking for shared library run path origin... " >&6; }
34111 if ${acl_cv_rpath+:} false; then :
34112 $as_echo_n "(cached) " >&6
34115 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
34116 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
34118 rm -f ./conftest.sh
34122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
34123 $as_echo "$acl_cv_rpath" >&6; }
34125 acl_libext="$acl_cv_libext"
34126 acl_shlibext="$acl_cv_shlibext"
34127 acl_libname_spec="$acl_cv_libname_spec"
34128 acl_library_names_spec="$acl_cv_library_names_spec"
34129 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
34130 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
34131 acl_hardcode_direct="$acl_cv_hardcode_direct"
34132 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L"
34133 # Check whether --enable-rpath was given.
34134 if test "${enable_rpath+set}" = set; then :
34135 enableval=$enable_rpath; :
34147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5
34148 $as_echo_n "checking for 64-bit host... " >&6; }
34149 if ${gl_cv_solaris_64bit+:} false; then :
34150 $as_echo_n "(cached) " >&6
34152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34153 /* end confdefs.h. */
34160 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
34161 $EGREP "sixtyfour bits" >/dev/null 2>&1; then :
34162 gl_cv_solaris_64bit=yes
34164 gl_cv_solaris_64bit=no
34170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5
34171 $as_echo "$gl_cv_solaris_64bit" >&6; }
34172 if test $gl_cv_solaris_64bit = yes; then
34173 acl_libdirstem=lib/64
34174 case "$host_cpu" in
34175 sparc*) acl_libdirstem2=lib/sparcv9 ;;
34176 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;;
34181 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'`
34182 if test -n "$searchpath"; then
34183 acl_save_IFS="${IFS= }"; IFS=":"
34184 for searchdir in $searchpath; do
34185 if test -d "$searchdir"; then
34186 case "$searchdir" in
34187 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;;
34189 # Better ignore directories of this form. They are misleading.
34191 *) searchdir=`cd "$searchdir" && pwd`
34192 case "$searchdir" in
34193 */lib64 ) acl_libdirstem=lib64 ;;
34198 IFS="$acl_save_IFS"
34202 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem"
34217 acl_save_prefix="$prefix"
34218 prefix="$acl_final_prefix"
34219 acl_save_exec_prefix="$exec_prefix"
34220 exec_prefix="$acl_final_exec_prefix"
34222 eval additional_includedir=\"$includedir\"
34223 eval additional_libdir=\"$libdir\"
34225 exec_prefix="$acl_save_exec_prefix"
34226 prefix="$acl_save_prefix"
34229 # Check whether --with-libiconv-prefix was given.
34230 if test "${with_libiconv_prefix+set}" = set; then :
34231 withval=$with_libiconv_prefix;
34232 if test "X$withval" = "Xno"; then
34235 if test "X$withval" = "X"; then
34237 acl_save_prefix="$prefix"
34238 prefix="$acl_final_prefix"
34239 acl_save_exec_prefix="$exec_prefix"
34240 exec_prefix="$acl_final_exec_prefix"
34242 eval additional_includedir=\"$includedir\"
34243 eval additional_libdir=\"$libdir\"
34245 exec_prefix="$acl_save_exec_prefix"
34246 prefix="$acl_save_prefix"
34249 additional_includedir="$withval/include"
34250 additional_libdir="$withval/$acl_libdirstem"
34251 if test "$acl_libdirstem2" != "$acl_libdirstem" \
34252 && ! test -d "$withval/$acl_libdirstem"; then
34253 additional_libdir="$withval/$acl_libdirstem2"
34267 names_already_handled=
34268 names_next_round='iconv '
34269 while test -n "$names_next_round"; do
34270 names_this_round="$names_next_round"
34272 for name in $names_this_round; do
34274 for n in $names_already_handled; do
34275 if test "$n" = "$name"; then
34276 already_handled=yes
34280 if test -z "$already_handled"; then
34281 names_already_handled="$names_already_handled $name"
34282 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
34283 eval value=\"\$HAVE_LIB$uppername\"
34284 if test -n "$value"; then
34285 if test "$value" = yes; then
34286 eval value=\"\$LIB$uppername\"
34287 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
34288 eval value=\"\$LTLIB$uppername\"
34289 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
34298 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
34299 if test -n "$acl_shlibext"; then
34300 shrext=".$acl_shlibext" # typically: shrext=.so
34304 if test $use_additional = yes; then
34305 dir="$additional_libdir"
34306 if test -n "$acl_shlibext"; then
34307 if test -f "$dir/$libname$shrext"; then
34309 found_so="$dir/$libname$shrext"
34311 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
34312 ver=`(cd "$dir" && \
34313 for f in "$libname$shrext".*; do echo "$f"; done \
34314 | sed -e "s,^$libname$shrext\\\\.,," \
34315 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
34316 | sed 1q ) 2>/dev/null`
34317 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
34319 found_so="$dir/$libname$shrext.$ver"
34322 eval library_names=\"$acl_library_names_spec\"
34323 for f in $library_names; do
34324 if test -f "$dir/$f"; then
34333 if test "X$found_dir" = "X"; then
34334 if test -f "$dir/$libname.$acl_libext"; then
34336 found_a="$dir/$libname.$acl_libext"
34339 if test "X$found_dir" != "X"; then
34340 if test -f "$dir/$libname.la"; then
34341 found_la="$dir/$libname.la"
34345 if test "X$found_dir" = "X"; then
34346 for x in $LDFLAGS $LTLIBICONV; do
34348 acl_save_prefix="$prefix"
34349 prefix="$acl_final_prefix"
34350 acl_save_exec_prefix="$exec_prefix"
34351 exec_prefix="$acl_final_exec_prefix"
34353 exec_prefix="$acl_save_exec_prefix"
34354 prefix="$acl_save_prefix"
34358 dir=`echo "X$x" | sed -e 's/^X-L//'`
34359 if test -n "$acl_shlibext"; then
34360 if test -f "$dir/$libname$shrext"; then
34362 found_so="$dir/$libname$shrext"
34364 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
34365 ver=`(cd "$dir" && \
34366 for f in "$libname$shrext".*; do echo "$f"; done \
34367 | sed -e "s,^$libname$shrext\\\\.,," \
34368 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
34369 | sed 1q ) 2>/dev/null`
34370 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
34372 found_so="$dir/$libname$shrext.$ver"
34375 eval library_names=\"$acl_library_names_spec\"
34376 for f in $library_names; do
34377 if test -f "$dir/$f"; then
34386 if test "X$found_dir" = "X"; then
34387 if test -f "$dir/$libname.$acl_libext"; then
34389 found_a="$dir/$libname.$acl_libext"
34392 if test "X$found_dir" != "X"; then
34393 if test -f "$dir/$libname.la"; then
34394 found_la="$dir/$libname.la"
34399 if test "X$found_dir" != "X"; then
34404 if test "X$found_dir" != "X"; then
34405 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
34406 if test "X$found_so" != "X"; then
34407 if test "$enable_rpath" = no \
34408 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
34409 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
34410 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
34413 for x in $ltrpathdirs; do
34414 if test "X$x" = "X$found_dir"; then
34419 if test -z "$haveit"; then
34420 ltrpathdirs="$ltrpathdirs $found_dir"
34422 if test "$acl_hardcode_direct" = yes; then
34423 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
34425 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
34426 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
34428 for x in $rpathdirs; do
34429 if test "X$x" = "X$found_dir"; then
34434 if test -z "$haveit"; then
34435 rpathdirs="$rpathdirs $found_dir"
34439 for x in $LDFLAGS $LIBICONV; do
34441 acl_save_prefix="$prefix"
34442 prefix="$acl_final_prefix"
34443 acl_save_exec_prefix="$exec_prefix"
34444 exec_prefix="$acl_final_exec_prefix"
34446 exec_prefix="$acl_save_exec_prefix"
34447 prefix="$acl_save_prefix"
34449 if test "X$x" = "X-L$found_dir"; then
34454 if test -z "$haveit"; then
34455 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
34457 if test "$acl_hardcode_minus_L" != no; then
34458 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
34460 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
34466 if test "X$found_a" != "X"; then
34467 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
34469 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
34472 additional_includedir=
34473 case "$found_dir" in
34474 */$acl_libdirstem | */$acl_libdirstem/)
34475 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
34476 if test "$name" = 'iconv'; then
34477 LIBICONV_PREFIX="$basedir"
34479 additional_includedir="$basedir/include"
34481 */$acl_libdirstem2 | */$acl_libdirstem2/)
34482 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
34483 if test "$name" = 'iconv'; then
34484 LIBICONV_PREFIX="$basedir"
34486 additional_includedir="$basedir/include"
34489 if test "X$additional_includedir" != "X"; then
34490 if test "X$additional_includedir" != "X/usr/include"; then
34492 if test "X$additional_includedir" = "X/usr/local/include"; then
34493 if test -n "$GCC"; then
34495 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
34499 if test -z "$haveit"; then
34500 for x in $CPPFLAGS $INCICONV; do
34502 acl_save_prefix="$prefix"
34503 prefix="$acl_final_prefix"
34504 acl_save_exec_prefix="$exec_prefix"
34505 exec_prefix="$acl_final_exec_prefix"
34507 exec_prefix="$acl_save_exec_prefix"
34508 prefix="$acl_save_prefix"
34510 if test "X$x" = "X-I$additional_includedir"; then
34515 if test -z "$haveit"; then
34516 if test -d "$additional_includedir"; then
34517 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
34523 if test -n "$found_la"; then
34524 save_libdir="$libdir"
34525 case "$found_la" in
34526 */* | *\\*) . "$found_la" ;;
34527 *) . "./$found_la" ;;
34529 libdir="$save_libdir"
34530 for dep in $dependency_libs; do
34533 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
34534 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
34535 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
34537 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
34538 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
34539 if test -n "$GCC"; then
34541 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
34545 if test -z "$haveit"; then
34547 for x in $LDFLAGS $LIBICONV; do
34549 acl_save_prefix="$prefix"
34550 prefix="$acl_final_prefix"
34551 acl_save_exec_prefix="$exec_prefix"
34552 exec_prefix="$acl_final_exec_prefix"
34554 exec_prefix="$acl_save_exec_prefix"
34555 prefix="$acl_save_prefix"
34557 if test "X$x" = "X-L$additional_libdir"; then
34562 if test -z "$haveit"; then
34563 if test -d "$additional_libdir"; then
34564 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
34568 for x in $LDFLAGS $LTLIBICONV; do
34570 acl_save_prefix="$prefix"
34571 prefix="$acl_final_prefix"
34572 acl_save_exec_prefix="$exec_prefix"
34573 exec_prefix="$acl_final_exec_prefix"
34575 exec_prefix="$acl_save_exec_prefix"
34576 prefix="$acl_save_prefix"
34578 if test "X$x" = "X-L$additional_libdir"; then
34583 if test -z "$haveit"; then
34584 if test -d "$additional_libdir"; then
34585 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
34592 dir=`echo "X$dep" | sed -e 's/^X-R//'`
34593 if test "$enable_rpath" != no; then
34595 for x in $rpathdirs; do
34596 if test "X$x" = "X$dir"; then
34601 if test -z "$haveit"; then
34602 rpathdirs="$rpathdirs $dir"
34605 for x in $ltrpathdirs; do
34606 if test "X$x" = "X$dir"; then
34611 if test -z "$haveit"; then
34612 ltrpathdirs="$ltrpathdirs $dir"
34617 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
34620 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
34623 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
34624 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
34630 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
34631 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
34637 if test "X$rpathdirs" != "X"; then
34638 if test -n "$acl_hardcode_libdir_separator"; then
34640 for found_dir in $rpathdirs; do
34641 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
34643 acl_save_libdir="$libdir"
34645 eval flag=\"$acl_hardcode_libdir_flag_spec\"
34646 libdir="$acl_save_libdir"
34647 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
34649 for found_dir in $rpathdirs; do
34650 acl_save_libdir="$libdir"
34651 libdir="$found_dir"
34652 eval flag=\"$acl_hardcode_libdir_flag_spec\"
34653 libdir="$acl_save_libdir"
34654 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
34658 if test "X$ltrpathdirs" != "X"; then
34659 for found_dir in $ltrpathdirs; do
34660 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
34675 am_save_CPPFLAGS="$CPPFLAGS"
34677 for element in $INCICONV; do
34679 for x in $CPPFLAGS; do
34681 acl_save_prefix="$prefix"
34682 prefix="$acl_final_prefix"
34683 acl_save_exec_prefix="$exec_prefix"
34684 exec_prefix="$acl_final_exec_prefix"
34686 exec_prefix="$acl_save_exec_prefix"
34687 prefix="$acl_save_prefix"
34689 if test "X$x" = "X$element"; then
34694 if test -z "$haveit"; then
34695 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
34700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
34701 $as_echo_n "checking for iconv... " >&6; }
34702 if ${am_cv_func_iconv+:} false; then :
34703 $as_echo_n "(cached) " >&6
34706 am_cv_func_iconv="no, consider installing GNU libiconv"
34708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34709 /* end confdefs.h. */
34711 #include <stdlib.h>
34717 iconv_t cd = iconv_open("","");
34718 iconv(cd,NULL,NULL,NULL,NULL);
34724 if ac_fn_c_try_link "$LINENO"; then :
34725 am_cv_func_iconv=yes
34727 rm -f core conftest.err conftest.$ac_objext \
34728 conftest$ac_exeext conftest.$ac_ext
34729 if test "$am_cv_func_iconv" != yes; then
34730 am_save_LIBS="$LIBS"
34731 LIBS="$LIBS $LIBICONV"
34732 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34733 /* end confdefs.h. */
34735 #include <stdlib.h>
34741 iconv_t cd = iconv_open("","");
34742 iconv(cd,NULL,NULL,NULL,NULL);
34748 if ac_fn_c_try_link "$LINENO"; then :
34749 am_cv_lib_iconv=yes
34750 am_cv_func_iconv=yes
34752 rm -f core conftest.err conftest.$ac_objext \
34753 conftest$ac_exeext conftest.$ac_ext
34754 LIBS="$am_save_LIBS"
34758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
34759 $as_echo "$am_cv_func_iconv" >&6; }
34760 if test "$am_cv_func_iconv" = yes; then
34761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
34762 $as_echo_n "checking for working iconv... " >&6; }
34763 if ${am_cv_func_iconv_works+:} false; then :
34764 $as_echo_n "(cached) " >&6
34767 am_save_LIBS="$LIBS"
34768 if test $am_cv_lib_iconv = yes; then
34769 LIBS="$LIBS $LIBICONV"
34771 if test "$cross_compiling" = yes; then :
34774 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
34775 *) am_cv_func_iconv_works="guessing yes" ;;
34779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34780 /* end confdefs.h. */
34783 #include <string.h>
34787 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
34790 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
34791 if (cd_utf8_to_88591 != (iconv_t)(-1))
34793 static const char input[] = "\342\202\254"; /* EURO SIGN */
34795 const char *inptr = input;
34796 size_t inbytesleft = strlen (input);
34797 char *outptr = buf;
34798 size_t outbytesleft = sizeof (buf);
34799 size_t res = iconv (cd_utf8_to_88591,
34800 (char **) &inptr, &inbytesleft,
34801 &outptr, &outbytesleft);
34804 iconv_close (cd_utf8_to_88591);
34807 /* Test against Solaris 10 bug: Failures are not distinguishable from
34808 successful returns. */
34810 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
34811 if (cd_ascii_to_88591 != (iconv_t)(-1))
34813 static const char input[] = "\263";
34815 const char *inptr = input;
34816 size_t inbytesleft = strlen (input);
34817 char *outptr = buf;
34818 size_t outbytesleft = sizeof (buf);
34819 size_t res = iconv (cd_ascii_to_88591,
34820 (char **) &inptr, &inbytesleft,
34821 &outptr, &outbytesleft);
34824 iconv_close (cd_ascii_to_88591);
34827 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
34829 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
34830 if (cd_88591_to_utf8 != (iconv_t)(-1))
34832 static const char input[] = "\304";
34833 static char buf[2] = { (char)0xDE, (char)0xAD };
34834 const char *inptr = input;
34835 size_t inbytesleft = 1;
34836 char *outptr = buf;
34837 size_t outbytesleft = 1;
34838 size_t res = iconv (cd_88591_to_utf8,
34839 (char **) &inptr, &inbytesleft,
34840 &outptr, &outbytesleft);
34841 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
34843 iconv_close (cd_88591_to_utf8);
34846 #if 0 /* This bug could be worked around by the caller. */
34847 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
34849 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
34850 if (cd_88591_to_utf8 != (iconv_t)(-1))
34852 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
34854 const char *inptr = input;
34855 size_t inbytesleft = strlen (input);
34856 char *outptr = buf;
34857 size_t outbytesleft = sizeof (buf);
34858 size_t res = iconv (cd_88591_to_utf8,
34859 (char **) &inptr, &inbytesleft,
34860 &outptr, &outbytesleft);
34863 iconv_close (cd_88591_to_utf8);
34867 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
34869 if (/* Try standardized names. */
34870 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
34871 /* Try IRIX, OSF/1 names. */
34872 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
34873 /* Try AIX names. */
34874 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
34875 /* Try HP-UX names. */
34876 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
34881 if ac_fn_c_try_run "$LINENO"; then :
34882 am_cv_func_iconv_works=yes
34884 am_cv_func_iconv_works=no
34886 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
34887 conftest.$ac_objext conftest.beam conftest.$ac_ext
34890 LIBS="$am_save_LIBS"
34893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
34894 $as_echo "$am_cv_func_iconv_works" >&6; }
34895 case "$am_cv_func_iconv_works" in
34896 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
34897 *) am_func_iconv=yes ;;
34900 am_func_iconv=no am_cv_lib_iconv=no
34902 if test "$am_func_iconv" = yes; then
34904 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
34907 if test "$am_cv_lib_iconv" = yes; then
34908 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
34909 $as_echo_n "checking how to link with libiconv... " >&6; }
34910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
34911 $as_echo "$LIBICONV" >&6; }
34913 CPPFLAGS="$am_save_CPPFLAGS"
34920 if test "$am_cv_func_iconv" = yes; then
34921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
34922 $as_echo_n "checking for iconv declaration... " >&6; }
34923 if ${am_cv_proto_iconv+:} false; then :
34924 $as_echo_n "(cached) " >&6
34927 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34928 /* end confdefs.h. */
34930 #include <stdlib.h>
34936 #if defined(__STDC__) || defined(_MSC_VER) || defined(__cplusplus)
34937 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
34950 if ac_fn_c_try_compile "$LINENO"; then :
34951 am_cv_proto_iconv_arg1=""
34953 am_cv_proto_iconv_arg1="const"
34955 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34956 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);"
34959 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
34960 { $as_echo "$as_me:${as_lineno-$LINENO}: result:
34961 $am_cv_proto_iconv" >&5
34963 $am_cv_proto_iconv" >&6; }
34965 cat >>confdefs.h <<_ACEOF
34966 #define ICONV_CONST $am_cv_proto_iconv_arg1
34972 for ac_header in iconv.h
34974 ac_fn_c_check_header_mongrel "$LINENO" "iconv.h" "ac_cv_header_iconv_h" "$ac_includes_default"
34975 if test "x$ac_cv_header_iconv_h" = xyes; then :
34976 cat >>confdefs.h <<_ACEOF
34977 #define HAVE_ICONV_H 1
34984 ac_fn_c_check_type "$LINENO" "iconv_t" "ac_cv_type_iconv_t" "
34985 #ifdef HAVE_ICONV_H
34986 # include <iconv.h>
34990 if test "x$ac_cv_type_iconv_t" = xyes; then :
34994 $as_echo "#define iconv_t int" >>confdefs.h
35001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
35002 $as_echo_n "checking whether NLS is requested... " >&6; }
35003 # Check whether --enable-nls was given.
35004 if test "${enable_nls+set}" = set; then :
35005 enableval=$enable_nls; USE_NLS=$enableval
35010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
35011 $as_echo "$USE_NLS" >&6; }
35016 GETTEXT_MACRO_VERSION=0.18
35021 # Prepare PATH_SEPARATOR.
35022 # The user is always right.
35023 if test "${PATH_SEPARATOR+set}" != set; then
35024 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
35025 # contains only /bin. Note that ksh looks also at the FPATH variable,
35026 # so we have to set that as well for the test.
35028 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35029 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35030 || PATH_SEPARATOR=';'
35034 # Find out how to test for executable files. Don't use a zero-byte file,
35035 # as systems may use methods other than mode bits to determine executability.
35036 cat >conf$$.file <<_ASEOF
35040 chmod +x conf$$.file
35041 if test -x conf$$.file >/dev/null 2>&1; then
35042 ac_executable_p="test -x"
35044 ac_executable_p="test -f"
35048 # Extract the first word of "msgfmt", so it can be a program name with args.
35049 set dummy msgfmt; ac_word=$2
35050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35051 $as_echo_n "checking for $ac_word... " >&6; }
35052 if ${ac_cv_path_MSGFMT+:} false; then :
35053 $as_echo_n "(cached) " >&6
35057 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
35060 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
35061 for ac_dir in $PATH; do
35063 test -z "$ac_dir" && ac_dir=.
35064 for ac_exec_ext in '' $ac_executable_extensions; do
35065 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
35066 echo "$as_me: trying $ac_dir/$ac_word..." >&5
35067 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 &&
35068 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
35069 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext"
35076 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
35080 MSGFMT="$ac_cv_path_MSGFMT"
35081 if test "$MSGFMT" != ":"; then
35082 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5
35083 $as_echo "$MSGFMT" >&6; }
35085 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35086 $as_echo "no" >&6; }
35089 # Extract the first word of "gmsgfmt", so it can be a program name with args.
35090 set dummy gmsgfmt; ac_word=$2
35091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35092 $as_echo_n "checking for $ac_word... " >&6; }
35093 if ${ac_cv_path_GMSGFMT+:} false; then :
35094 $as_echo_n "(cached) " >&6
35098 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
35101 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35102 for as_dir in $PATH
35105 test -z "$as_dir" && as_dir=.
35106 for ac_exec_ext in '' $ac_executable_extensions; do
35107 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35108 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext"
35109 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35116 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
35120 GMSGFMT=$ac_cv_path_GMSGFMT
35121 if test -n "$GMSGFMT"; then
35122 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5
35123 $as_echo "$GMSGFMT" >&6; }
35125 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35126 $as_echo "no" >&6; }
35131 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
35132 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;;
35133 *) MSGFMT_015=$MSGFMT ;;
35136 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
35137 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;;
35138 *) GMSGFMT_015=$GMSGFMT ;;
35143 # Prepare PATH_SEPARATOR.
35144 # The user is always right.
35145 if test "${PATH_SEPARATOR+set}" != set; then
35146 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
35147 # contains only /bin. Note that ksh looks also at the FPATH variable,
35148 # so we have to set that as well for the test.
35150 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35151 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35152 || PATH_SEPARATOR=';'
35156 # Find out how to test for executable files. Don't use a zero-byte file,
35157 # as systems may use methods other than mode bits to determine executability.
35158 cat >conf$$.file <<_ASEOF
35162 chmod +x conf$$.file
35163 if test -x conf$$.file >/dev/null 2>&1; then
35164 ac_executable_p="test -x"
35166 ac_executable_p="test -f"
35170 # Extract the first word of "xgettext", so it can be a program name with args.
35171 set dummy xgettext; ac_word=$2
35172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35173 $as_echo_n "checking for $ac_word... " >&6; }
35174 if ${ac_cv_path_XGETTEXT+:} false; then :
35175 $as_echo_n "(cached) " >&6
35177 case "$XGETTEXT" in
35179 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
35182 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
35183 for ac_dir in $PATH; do
35185 test -z "$ac_dir" && ac_dir=.
35186 for ac_exec_ext in '' $ac_executable_extensions; do
35187 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
35188 echo "$as_me: trying $ac_dir/$ac_word..." >&5
35189 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 &&
35190 (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
35191 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext"
35198 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
35202 XGETTEXT="$ac_cv_path_XGETTEXT"
35203 if test "$XGETTEXT" != ":"; then
35204 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5
35205 $as_echo "$XGETTEXT" >&6; }
35207 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35208 $as_echo "no" >&6; }
35213 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in
35214 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;;
35215 *) XGETTEXT_015=$XGETTEXT ;;
35220 # Prepare PATH_SEPARATOR.
35221 # The user is always right.
35222 if test "${PATH_SEPARATOR+set}" != set; then
35223 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which
35224 # contains only /bin. Note that ksh looks also at the FPATH variable,
35225 # so we have to set that as well for the test.
35227 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35228 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \
35229 || PATH_SEPARATOR=';'
35233 # Find out how to test for executable files. Don't use a zero-byte file,
35234 # as systems may use methods other than mode bits to determine executability.
35235 cat >conf$$.file <<_ASEOF
35239 chmod +x conf$$.file
35240 if test -x conf$$.file >/dev/null 2>&1; then
35241 ac_executable_p="test -x"
35243 ac_executable_p="test -f"
35247 # Extract the first word of "msgmerge", so it can be a program name with args.
35248 set dummy msgmerge; ac_word=$2
35249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35250 $as_echo_n "checking for $ac_word... " >&6; }
35251 if ${ac_cv_path_MSGMERGE+:} false; then :
35252 $as_echo_n "(cached) " >&6
35254 case "$MSGMERGE" in
35256 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path.
35259 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
35260 for ac_dir in $PATH; do
35262 test -z "$ac_dir" && ac_dir=.
35263 for ac_exec_ext in '' $ac_executable_extensions; do
35264 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
35265 echo "$as_me: trying $ac_dir/$ac_word..." >&5
35266 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then
35267 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext"
35274 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":"
35278 MSGMERGE="$ac_cv_path_MSGMERGE"
35279 if test "$MSGMERGE" != ":"; then
35280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5
35281 $as_echo "$MSGMERGE" >&6; }
35283 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35284 $as_echo "no" >&6; }
35288 test -n "$localedir" || localedir='${datadir}/locale'
35291 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS=
35294 ac_config_commands="$ac_config_commands po-directories"
35321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5
35322 $as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; }
35323 if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then :
35324 $as_echo_n "(cached) " >&6
35326 gt_save_LIBS="$LIBS"
35327 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
35328 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35329 /* end confdefs.h. */
35330 #include <CoreFoundation/CFPreferences.h>
35334 CFPreferencesCopyAppValue(NULL, NULL)
35339 if ac_fn_c_try_link "$LINENO"; then :
35340 gt_cv_func_CFPreferencesCopyAppValue=yes
35342 gt_cv_func_CFPreferencesCopyAppValue=no
35344 rm -f core conftest.err conftest.$ac_objext \
35345 conftest$ac_exeext conftest.$ac_ext
35346 LIBS="$gt_save_LIBS"
35348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5
35349 $as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; }
35350 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then
35352 $as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h
35355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5
35356 $as_echo_n "checking for CFLocaleCopyCurrent... " >&6; }
35357 if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then :
35358 $as_echo_n "(cached) " >&6
35360 gt_save_LIBS="$LIBS"
35361 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation"
35362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35363 /* end confdefs.h. */
35364 #include <CoreFoundation/CFLocale.h>
35368 CFLocaleCopyCurrent();
35373 if ac_fn_c_try_link "$LINENO"; then :
35374 gt_cv_func_CFLocaleCopyCurrent=yes
35376 gt_cv_func_CFLocaleCopyCurrent=no
35378 rm -f core conftest.err conftest.$ac_objext \
35379 conftest$ac_exeext conftest.$ac_ext
35380 LIBS="$gt_save_LIBS"
35382 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5
35383 $as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; }
35384 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then
35386 $as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h
35390 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then
35391 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation"
35403 case " $gt_needs " in
35404 *" need-formatstring-macros "*) gt_api_version=3 ;;
35405 *" need-ngettext "*) gt_api_version=2 ;;
35406 *) gt_api_version=1 ;;
35408 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc"
35409 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl"
35411 if test "$USE_NLS" = "yes"; then
35412 gt_use_preinstalled_gnugettext=no
35415 if test $gt_api_version -ge 3; then
35416 gt_revision_test_code='
35417 #ifndef __GNU_GETTEXT_SUPPORTED_REVISION
35418 #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
35420 typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
35423 gt_revision_test_code=
35425 if test $gt_api_version -ge 2; then
35426 gt_expression_test_code=' + * ngettext ("", "", 0)'
35428 gt_expression_test_code=
35431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5
35432 $as_echo_n "checking for GNU gettext in libc... " >&6; }
35433 if eval \${$gt_func_gnugettext_libc+:} false; then :
35434 $as_echo_n "(cached) " >&6
35436 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35437 /* end confdefs.h. */
35439 #include <libintl.h>
35440 $gt_revision_test_code
35441 extern int _nl_msg_cat_cntr;
35442 extern int *_nl_domain_bindings;
35448 bindtextdomain ("", "");
35449 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings
35455 if ac_fn_c_try_link "$LINENO"; then :
35456 eval "$gt_func_gnugettext_libc=yes"
35458 eval "$gt_func_gnugettext_libc=no"
35460 rm -f core conftest.err conftest.$ac_objext \
35461 conftest$ac_exeext conftest.$ac_ext
35463 eval ac_res=\$$gt_func_gnugettext_libc
35464 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
35465 $as_echo "$ac_res" >&6; }
35467 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then
35473 am_save_CPPFLAGS="$CPPFLAGS"
35475 for element in $INCICONV; do
35477 for x in $CPPFLAGS; do
35479 acl_save_prefix="$prefix"
35480 prefix="$acl_final_prefix"
35481 acl_save_exec_prefix="$exec_prefix"
35482 exec_prefix="$acl_final_exec_prefix"
35484 exec_prefix="$acl_save_exec_prefix"
35485 prefix="$acl_save_prefix"
35487 if test "X$x" = "X$element"; then
35492 if test -z "$haveit"; then
35493 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
35498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
35499 $as_echo_n "checking for iconv... " >&6; }
35500 if ${am_cv_func_iconv+:} false; then :
35501 $as_echo_n "(cached) " >&6
35504 am_cv_func_iconv="no, consider installing GNU libiconv"
35506 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35507 /* end confdefs.h. */
35509 #include <stdlib.h>
35515 iconv_t cd = iconv_open("","");
35516 iconv(cd,NULL,NULL,NULL,NULL);
35522 if ac_fn_c_try_link "$LINENO"; then :
35523 am_cv_func_iconv=yes
35525 rm -f core conftest.err conftest.$ac_objext \
35526 conftest$ac_exeext conftest.$ac_ext
35527 if test "$am_cv_func_iconv" != yes; then
35528 am_save_LIBS="$LIBS"
35529 LIBS="$LIBS $LIBICONV"
35530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35531 /* end confdefs.h. */
35533 #include <stdlib.h>
35539 iconv_t cd = iconv_open("","");
35540 iconv(cd,NULL,NULL,NULL,NULL);
35546 if ac_fn_c_try_link "$LINENO"; then :
35547 am_cv_lib_iconv=yes
35548 am_cv_func_iconv=yes
35550 rm -f core conftest.err conftest.$ac_objext \
35551 conftest$ac_exeext conftest.$ac_ext
35552 LIBS="$am_save_LIBS"
35556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
35557 $as_echo "$am_cv_func_iconv" >&6; }
35558 if test "$am_cv_func_iconv" = yes; then
35559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5
35560 $as_echo_n "checking for working iconv... " >&6; }
35561 if ${am_cv_func_iconv_works+:} false; then :
35562 $as_echo_n "(cached) " >&6
35565 am_save_LIBS="$LIBS"
35566 if test $am_cv_lib_iconv = yes; then
35567 LIBS="$LIBS $LIBICONV"
35569 if test "$cross_compiling" = yes; then :
35572 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;;
35573 *) am_cv_func_iconv_works="guessing yes" ;;
35577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35578 /* end confdefs.h. */
35581 #include <string.h>
35585 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful
35588 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8");
35589 if (cd_utf8_to_88591 != (iconv_t)(-1))
35591 static const char input[] = "\342\202\254"; /* EURO SIGN */
35593 const char *inptr = input;
35594 size_t inbytesleft = strlen (input);
35595 char *outptr = buf;
35596 size_t outbytesleft = sizeof (buf);
35597 size_t res = iconv (cd_utf8_to_88591,
35598 (char **) &inptr, &inbytesleft,
35599 &outptr, &outbytesleft);
35602 iconv_close (cd_utf8_to_88591);
35605 /* Test against Solaris 10 bug: Failures are not distinguishable from
35606 successful returns. */
35608 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646");
35609 if (cd_ascii_to_88591 != (iconv_t)(-1))
35611 static const char input[] = "\263";
35613 const char *inptr = input;
35614 size_t inbytesleft = strlen (input);
35615 char *outptr = buf;
35616 size_t outbytesleft = sizeof (buf);
35617 size_t res = iconv (cd_ascii_to_88591,
35618 (char **) &inptr, &inbytesleft,
35619 &outptr, &outbytesleft);
35622 iconv_close (cd_ascii_to_88591);
35625 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */
35627 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1");
35628 if (cd_88591_to_utf8 != (iconv_t)(-1))
35630 static const char input[] = "\304";
35631 static char buf[2] = { (char)0xDE, (char)0xAD };
35632 const char *inptr = input;
35633 size_t inbytesleft = 1;
35634 char *outptr = buf;
35635 size_t outbytesleft = 1;
35636 size_t res = iconv (cd_88591_to_utf8,
35637 (char **) &inptr, &inbytesleft,
35638 &outptr, &outbytesleft);
35639 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD)
35641 iconv_close (cd_88591_to_utf8);
35644 #if 0 /* This bug could be worked around by the caller. */
35645 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */
35647 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591");
35648 if (cd_88591_to_utf8 != (iconv_t)(-1))
35650 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337";
35652 const char *inptr = input;
35653 size_t inbytesleft = strlen (input);
35654 char *outptr = buf;
35655 size_t outbytesleft = sizeof (buf);
35656 size_t res = iconv (cd_88591_to_utf8,
35657 (char **) &inptr, &inbytesleft,
35658 &outptr, &outbytesleft);
35661 iconv_close (cd_88591_to_utf8);
35665 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is
35667 if (/* Try standardized names. */
35668 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1)
35669 /* Try IRIX, OSF/1 names. */
35670 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1)
35671 /* Try AIX names. */
35672 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1)
35673 /* Try HP-UX names. */
35674 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1))
35679 if ac_fn_c_try_run "$LINENO"; then :
35680 am_cv_func_iconv_works=yes
35682 am_cv_func_iconv_works=no
35684 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
35685 conftest.$ac_objext conftest.beam conftest.$ac_ext
35688 LIBS="$am_save_LIBS"
35691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5
35692 $as_echo "$am_cv_func_iconv_works" >&6; }
35693 case "$am_cv_func_iconv_works" in
35694 *no) am_func_iconv=no am_cv_lib_iconv=no ;;
35695 *) am_func_iconv=yes ;;
35698 am_func_iconv=no am_cv_lib_iconv=no
35700 if test "$am_func_iconv" = yes; then
35702 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
35705 if test "$am_cv_lib_iconv" = yes; then
35706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
35707 $as_echo_n "checking how to link with libiconv... " >&6; }
35708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
35709 $as_echo "$LIBICONV" >&6; }
35711 CPPFLAGS="$am_save_CPPFLAGS"
35728 acl_save_prefix="$prefix"
35729 prefix="$acl_final_prefix"
35730 acl_save_exec_prefix="$exec_prefix"
35731 exec_prefix="$acl_final_exec_prefix"
35733 eval additional_includedir=\"$includedir\"
35734 eval additional_libdir=\"$libdir\"
35736 exec_prefix="$acl_save_exec_prefix"
35737 prefix="$acl_save_prefix"
35740 # Check whether --with-libintl-prefix was given.
35741 if test "${with_libintl_prefix+set}" = set; then :
35742 withval=$with_libintl_prefix;
35743 if test "X$withval" = "Xno"; then
35746 if test "X$withval" = "X"; then
35748 acl_save_prefix="$prefix"
35749 prefix="$acl_final_prefix"
35750 acl_save_exec_prefix="$exec_prefix"
35751 exec_prefix="$acl_final_exec_prefix"
35753 eval additional_includedir=\"$includedir\"
35754 eval additional_libdir=\"$libdir\"
35756 exec_prefix="$acl_save_exec_prefix"
35757 prefix="$acl_save_prefix"
35760 additional_includedir="$withval/include"
35761 additional_libdir="$withval/$acl_libdirstem"
35762 if test "$acl_libdirstem2" != "$acl_libdirstem" \
35763 && ! test -d "$withval/$acl_libdirstem"; then
35764 additional_libdir="$withval/$acl_libdirstem2"
35778 names_already_handled=
35779 names_next_round='intl '
35780 while test -n "$names_next_round"; do
35781 names_this_round="$names_next_round"
35783 for name in $names_this_round; do
35785 for n in $names_already_handled; do
35786 if test "$n" = "$name"; then
35787 already_handled=yes
35791 if test -z "$already_handled"; then
35792 names_already_handled="$names_already_handled $name"
35793 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'`
35794 eval value=\"\$HAVE_LIB$uppername\"
35795 if test -n "$value"; then
35796 if test "$value" = yes; then
35797 eval value=\"\$LIB$uppername\"
35798 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value"
35799 eval value=\"\$LTLIB$uppername\"
35800 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value"
35809 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name
35810 if test -n "$acl_shlibext"; then
35811 shrext=".$acl_shlibext" # typically: shrext=.so
35815 if test $use_additional = yes; then
35816 dir="$additional_libdir"
35817 if test -n "$acl_shlibext"; then
35818 if test -f "$dir/$libname$shrext"; then
35820 found_so="$dir/$libname$shrext"
35822 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
35823 ver=`(cd "$dir" && \
35824 for f in "$libname$shrext".*; do echo "$f"; done \
35825 | sed -e "s,^$libname$shrext\\\\.,," \
35826 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
35827 | sed 1q ) 2>/dev/null`
35828 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
35830 found_so="$dir/$libname$shrext.$ver"
35833 eval library_names=\"$acl_library_names_spec\"
35834 for f in $library_names; do
35835 if test -f "$dir/$f"; then
35844 if test "X$found_dir" = "X"; then
35845 if test -f "$dir/$libname.$acl_libext"; then
35847 found_a="$dir/$libname.$acl_libext"
35850 if test "X$found_dir" != "X"; then
35851 if test -f "$dir/$libname.la"; then
35852 found_la="$dir/$libname.la"
35856 if test "X$found_dir" = "X"; then
35857 for x in $LDFLAGS $LTLIBINTL; do
35859 acl_save_prefix="$prefix"
35860 prefix="$acl_final_prefix"
35861 acl_save_exec_prefix="$exec_prefix"
35862 exec_prefix="$acl_final_exec_prefix"
35864 exec_prefix="$acl_save_exec_prefix"
35865 prefix="$acl_save_prefix"
35869 dir=`echo "X$x" | sed -e 's/^X-L//'`
35870 if test -n "$acl_shlibext"; then
35871 if test -f "$dir/$libname$shrext"; then
35873 found_so="$dir/$libname$shrext"
35875 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then
35876 ver=`(cd "$dir" && \
35877 for f in "$libname$shrext".*; do echo "$f"; done \
35878 | sed -e "s,^$libname$shrext\\\\.,," \
35879 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \
35880 | sed 1q ) 2>/dev/null`
35881 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then
35883 found_so="$dir/$libname$shrext.$ver"
35886 eval library_names=\"$acl_library_names_spec\"
35887 for f in $library_names; do
35888 if test -f "$dir/$f"; then
35897 if test "X$found_dir" = "X"; then
35898 if test -f "$dir/$libname.$acl_libext"; then
35900 found_a="$dir/$libname.$acl_libext"
35903 if test "X$found_dir" != "X"; then
35904 if test -f "$dir/$libname.la"; then
35905 found_la="$dir/$libname.la"
35910 if test "X$found_dir" != "X"; then
35915 if test "X$found_dir" != "X"; then
35916 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name"
35917 if test "X$found_so" != "X"; then
35918 if test "$enable_rpath" = no \
35919 || test "X$found_dir" = "X/usr/$acl_libdirstem" \
35920 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then
35921 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
35924 for x in $ltrpathdirs; do
35925 if test "X$x" = "X$found_dir"; then
35930 if test -z "$haveit"; then
35931 ltrpathdirs="$ltrpathdirs $found_dir"
35933 if test "$acl_hardcode_direct" = yes; then
35934 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
35936 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then
35937 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
35939 for x in $rpathdirs; do
35940 if test "X$x" = "X$found_dir"; then
35945 if test -z "$haveit"; then
35946 rpathdirs="$rpathdirs $found_dir"
35950 for x in $LDFLAGS $LIBINTL; do
35952 acl_save_prefix="$prefix"
35953 prefix="$acl_final_prefix"
35954 acl_save_exec_prefix="$exec_prefix"
35955 exec_prefix="$acl_final_exec_prefix"
35957 exec_prefix="$acl_save_exec_prefix"
35958 prefix="$acl_save_prefix"
35960 if test "X$x" = "X-L$found_dir"; then
35965 if test -z "$haveit"; then
35966 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir"
35968 if test "$acl_hardcode_minus_L" != no; then
35969 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so"
35971 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
35977 if test "X$found_a" != "X"; then
35978 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a"
35980 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name"
35983 additional_includedir=
35984 case "$found_dir" in
35985 */$acl_libdirstem | */$acl_libdirstem/)
35986 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'`
35987 if test "$name" = 'intl'; then
35988 LIBINTL_PREFIX="$basedir"
35990 additional_includedir="$basedir/include"
35992 */$acl_libdirstem2 | */$acl_libdirstem2/)
35993 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'`
35994 if test "$name" = 'intl'; then
35995 LIBINTL_PREFIX="$basedir"
35997 additional_includedir="$basedir/include"
36000 if test "X$additional_includedir" != "X"; then
36001 if test "X$additional_includedir" != "X/usr/include"; then
36003 if test "X$additional_includedir" = "X/usr/local/include"; then
36004 if test -n "$GCC"; then
36006 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
36010 if test -z "$haveit"; then
36011 for x in $CPPFLAGS $INCINTL; do
36013 acl_save_prefix="$prefix"
36014 prefix="$acl_final_prefix"
36015 acl_save_exec_prefix="$exec_prefix"
36016 exec_prefix="$acl_final_exec_prefix"
36018 exec_prefix="$acl_save_exec_prefix"
36019 prefix="$acl_save_prefix"
36021 if test "X$x" = "X-I$additional_includedir"; then
36026 if test -z "$haveit"; then
36027 if test -d "$additional_includedir"; then
36028 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir"
36034 if test -n "$found_la"; then
36035 save_libdir="$libdir"
36036 case "$found_la" in
36037 */* | *\\*) . "$found_la" ;;
36038 *) . "./$found_la" ;;
36040 libdir="$save_libdir"
36041 for dep in $dependency_libs; do
36044 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
36045 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \
36046 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then
36048 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \
36049 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then
36050 if test -n "$GCC"; then
36052 linux* | gnu* | k*bsd*-gnu) haveit=yes;;
36056 if test -z "$haveit"; then
36058 for x in $LDFLAGS $LIBINTL; 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 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir"
36079 for x in $LDFLAGS $LTLIBINTL; do
36081 acl_save_prefix="$prefix"
36082 prefix="$acl_final_prefix"
36083 acl_save_exec_prefix="$exec_prefix"
36084 exec_prefix="$acl_final_exec_prefix"
36086 exec_prefix="$acl_save_exec_prefix"
36087 prefix="$acl_save_prefix"
36089 if test "X$x" = "X-L$additional_libdir"; then
36094 if test -z "$haveit"; then
36095 if test -d "$additional_libdir"; then
36096 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir"
36103 dir=`echo "X$dep" | sed -e 's/^X-R//'`
36104 if test "$enable_rpath" != no; then
36106 for x in $rpathdirs; do
36107 if test "X$x" = "X$dir"; then
36112 if test -z "$haveit"; then
36113 rpathdirs="$rpathdirs $dir"
36116 for x in $ltrpathdirs; do
36117 if test "X$x" = "X$dir"; then
36122 if test -z "$haveit"; then
36123 ltrpathdirs="$ltrpathdirs $dir"
36128 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
36131 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
36134 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep"
36135 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep"
36141 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name"
36142 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name"
36148 if test "X$rpathdirs" != "X"; then
36149 if test -n "$acl_hardcode_libdir_separator"; then
36151 for found_dir in $rpathdirs; do
36152 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir"
36154 acl_save_libdir="$libdir"
36156 eval flag=\"$acl_hardcode_libdir_flag_spec\"
36157 libdir="$acl_save_libdir"
36158 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
36160 for found_dir in $rpathdirs; do
36161 acl_save_libdir="$libdir"
36162 libdir="$found_dir"
36163 eval flag=\"$acl_hardcode_libdir_flag_spec\"
36164 libdir="$acl_save_libdir"
36165 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag"
36169 if test "X$ltrpathdirs" != "X"; then
36170 for found_dir in $ltrpathdirs; do
36171 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir"
36180 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5
36181 $as_echo_n "checking for GNU gettext in libintl... " >&6; }
36182 if eval \${$gt_func_gnugettext_libintl+:} false; then :
36183 $as_echo_n "(cached) " >&6
36185 gt_save_CPPFLAGS="$CPPFLAGS"
36186 CPPFLAGS="$CPPFLAGS $INCINTL"
36187 gt_save_LIBS="$LIBS"
36188 LIBS="$LIBS $LIBINTL"
36189 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36190 /* end confdefs.h. */
36192 #include <libintl.h>
36193 $gt_revision_test_code
36194 extern int _nl_msg_cat_cntr;
36199 const char *_nl_expand_alias (const char *);
36205 bindtextdomain ("", "");
36206 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
36212 if ac_fn_c_try_link "$LINENO"; then :
36213 eval "$gt_func_gnugettext_libintl=yes"
36215 eval "$gt_func_gnugettext_libintl=no"
36217 rm -f core conftest.err conftest.$ac_objext \
36218 conftest$ac_exeext conftest.$ac_ext
36219 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then
36220 LIBS="$LIBS $LIBICONV"
36221 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36222 /* end confdefs.h. */
36224 #include <libintl.h>
36225 $gt_revision_test_code
36226 extern int _nl_msg_cat_cntr;
36231 const char *_nl_expand_alias (const char *);
36237 bindtextdomain ("", "");
36238 return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("")
36244 if ac_fn_c_try_link "$LINENO"; then :
36245 LIBINTL="$LIBINTL $LIBICONV"
36246 LTLIBINTL="$LTLIBINTL $LTLIBICONV"
36247 eval "$gt_func_gnugettext_libintl=yes"
36250 rm -f core conftest.err conftest.$ac_objext \
36251 conftest$ac_exeext conftest.$ac_ext
36253 CPPFLAGS="$gt_save_CPPFLAGS"
36254 LIBS="$gt_save_LIBS"
36256 eval ac_res=\$$gt_func_gnugettext_libintl
36257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
36258 $as_echo "$ac_res" >&6; }
36261 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \
36262 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \
36263 && test "$PACKAGE" != gettext-runtime \
36264 && test "$PACKAGE" != gettext-tools; }; then
36265 gt_use_preinstalled_gnugettext=yes
36274 if test -n "$INTL_MACOSX_LIBS"; then
36275 if test "$gt_use_preinstalled_gnugettext" = "yes" \
36276 || test "$nls_cv_use_gnu_gettext" = "yes"; then
36277 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS"
36278 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS"
36282 if test "$gt_use_preinstalled_gnugettext" = "yes" \
36283 || test "$nls_cv_use_gnu_gettext" = "yes"; then
36285 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
36292 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5
36293 $as_echo_n "checking whether to use NLS... " >&6; }
36294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5
36295 $as_echo "$USE_NLS" >&6; }
36296 if test "$USE_NLS" = "yes"; then
36297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5
36298 $as_echo_n "checking where the gettext function comes from... " >&6; }
36299 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
36300 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
36301 gt_source="external libintl"
36306 gt_source="included intl directory"
36308 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5
36309 $as_echo "$gt_source" >&6; }
36312 if test "$USE_NLS" = "yes"; then
36314 if test "$gt_use_preinstalled_gnugettext" = "yes"; then
36315 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then
36316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5
36317 $as_echo_n "checking how to link with libintl... " >&6; }
36318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5
36319 $as_echo "$LIBINTL" >&6; }
36321 for element in $INCINTL; do
36323 for x in $CPPFLAGS; do
36325 acl_save_prefix="$prefix"
36326 prefix="$acl_final_prefix"
36327 acl_save_exec_prefix="$exec_prefix"
36328 exec_prefix="$acl_final_exec_prefix"
36330 exec_prefix="$acl_save_exec_prefix"
36331 prefix="$acl_save_prefix"
36333 if test "X$x" = "X$element"; then
36338 if test -z "$haveit"; then
36339 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
36346 $as_echo "#define HAVE_GETTEXT 1" >>confdefs.h
36349 $as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h
36358 INTLLIBS="$LIBINTL"
36367 # Initialize the test suite.
36368 ac_config_commands="$ac_config_commands tests/atconfig"
36370 ac_config_files="$ac_config_files tests/Makefile tests/atlocal"
36371 # FIXME: tests/preset?
36373 AUTOM4TE=${AUTOM4TE-"${am_missing_run}autom4te"}
36378 # Check whether --enable-backup-scripts was given.
36379 if test "${enable_backup_scripts+set}" = set; then :
36380 enableval=$enable_backup_scripts; case $enableval in
36381 yes) BACKUP_LIBEXEC_SCRIPTS='$(BACKUP_LIBEXEC_SCRIPTS_LIST)'
36382 BACKUP_SBIN_SCRIPTS='$(BACKUP_SBIN_SCRIPTS_LIST)'
36389 if date +%Y-%m-%d 2>/dev/null >&2; then
36390 BACKUP_SED_COND='/^\#ELSE_DATE_FORMAT_OK/,/^\#ENDIF_DATE_FORMAT_OK/d;/^\#IF_DATE_FORMAT_OK/d'
36392 BACKUP_SED_COND='/^\#IF_DATE_FORMAT_OK/,/^\#ELSE_DATE_FORMAT_OK/d;/^\#ENDIF_DATE_FORMAT_OK/d'
36395 ac_config_files="$ac_config_files Makefile doc/Makefile gnu/Makefile lib/Makefile po/Makefile.in scripts/Makefile rmt/Makefile src/Makefile"
36397 cat >confcache <<\_ACEOF
36398 # This file is a shell script that caches the results of configure
36399 # tests run on this system so they can be shared between configure
36400 # scripts and configure runs, see configure's option --config-cache.
36401 # It is not useful on other systems. If it contains results you don't
36402 # want to keep, you may remove or edit it.
36404 # config.status only pays attention to the cache file if you give it
36405 # the --recheck option to rerun configure.
36407 # `ac_cv_env_foo' variables (set or unset) will be overridden when
36408 # loading this file, other *unset* `ac_cv_foo' will be assigned the
36409 # following values.
36413 # The following way of writing the cache mishandles newlines in values,
36414 # but we know of no workaround that is simple, portable, and efficient.
36415 # So, we kill variables containing newlines.
36416 # Ultrix sh set writes to stderr and can't be redirected directly,
36417 # and sets the high bit in the cache file unless we assign to the vars.
36419 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
36420 eval ac_val=\$$ac_var
36424 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
36425 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
36428 _ | IFS | as_nl) ;; #(
36429 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
36430 *) { eval $ac_var=; unset $ac_var;} ;;
36436 case $as_nl`(ac_space=' '; set) 2>&1` in #(
36437 *${as_nl}ac_space=\ *)
36438 # `set' does not quote correctly, so add quotes: double-quote
36439 # substitution turns \\\\ into \\, and sed turns \\ into \.
36442 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
36445 # `set' quotes correctly as required by POSIX, so do not add quotes.
36446 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
36455 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
36457 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
36459 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
36460 if test -w "$cache_file"; then
36461 if test "x$cache_file" != "x/dev/null"; then
36462 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
36463 $as_echo "$as_me: updating cache $cache_file" >&6;}
36464 if test ! -f "$cache_file" || test -h "$cache_file"; then
36465 cat confcache >"$cache_file"
36467 case $cache_file in #(
36469 mv -f confcache "$cache_file"$$ &&
36470 mv -f "$cache_file"$$ "$cache_file" ;; #(
36472 mv -f confcache "$cache_file" ;;
36477 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
36478 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
36483 test "x$prefix" = xNONE && prefix=$ac_default_prefix
36484 # Let make expand exec_prefix.
36485 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
36487 DEFS=-DHAVE_CONFIG_H
36492 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
36493 # 1. Remove the extension, and $U if already installed.
36494 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
36495 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
36496 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
36497 # will be set to the directory where LIBOBJS objects are built.
36498 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
36499 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
36501 LIBOBJS=$ac_libobjs
36503 LTLIBOBJS=$ac_ltlibobjs
36506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
36507 $as_echo_n "checking that generated files are newer than configure... " >&6; }
36508 if test -n "$am_sleep_pid"; then
36509 # Hide warnings about reused PIDs.
36510 wait $am_sleep_pid 2>/dev/null
36512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
36513 $as_echo "done" >&6; }
36514 if test -n "$EXEEXT"; then
36516 am__EXEEXT_FALSE='#'
36518 am__EXEEXT_TRUE='#'
36522 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
36523 as_fn_error $? "conditional \"AMDEP\" was never defined.
36524 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36526 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
36527 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
36528 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36530 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
36531 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
36532 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36534 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
36535 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
36536 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36538 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
36539 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
36540 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36542 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
36543 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
36544 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36546 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
36547 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
36548 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36550 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
36551 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
36552 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36554 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
36555 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
36556 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36558 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
36559 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
36560 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36562 if test -z "${GL_GENERATE_SELINUX_CONTEXT_H_TRUE}" && test -z "${GL_GENERATE_SELINUX_CONTEXT_H_FALSE}"; then
36563 as_fn_error $? "conditional \"GL_GENERATE_SELINUX_CONTEXT_H\" was never defined.
36564 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36566 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
36567 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
36568 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36570 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
36571 as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
36572 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36574 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
36575 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
36576 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36578 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
36579 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
36580 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36582 if test -z "${GL_GENERATE_SYSEXITS_H_TRUE}" && test -z "${GL_GENERATE_SYSEXITS_H_FALSE}"; then
36583 as_fn_error $? "conditional \"GL_GENERATE_SYSEXITS_H\" was never defined.
36584 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36586 if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then
36587 as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined.
36588 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36594 if test -n "$gl_LIBOBJS"; then
36595 # Remove the extension.
36596 sed_drop_objext='s/\.o$//;s/\.obj$//'
36597 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
36598 gl_libobjs="$gl_libobjs $i.$ac_objext"
36599 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
36602 gl_LIBOBJS=$gl_libobjs
36604 gl_LTLIBOBJS=$gl_ltlibobjs
36610 if test -n "$gltests_LIBOBJS"; then
36611 # Remove the extension.
36612 sed_drop_objext='s/\.o$//;s/\.obj$//'
36613 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
36614 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
36615 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
36618 gltests_LIBOBJS=$gltests_libobjs
36620 gltests_LTLIBOBJS=$gltests_ltlibobjs
36623 if test -z "${TAR_COND_XATTR_H_TRUE}" && test -z "${TAR_COND_XATTR_H_FALSE}"; then
36624 as_fn_error $? "conditional \"TAR_COND_XATTR_H\" was never defined.
36625 Usually this means the macro was only invoked conditionally." "$LINENO" 5
36628 : "${CONFIG_STATUS=./config.status}"
36630 ac_clean_files_save=$ac_clean_files
36631 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
36632 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
36633 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
36635 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
36637 # Generated by $as_me.
36638 # Run this file to recreate the current configuration.
36639 # Compiler output produced by configure, useful for debugging
36640 # configure, is in config.log if it exists.
36643 ac_cs_recheck=false
36646 SHELL=\${CONFIG_SHELL-$SHELL}
36649 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
36650 ## -------------------- ##
36651 ## M4sh Initialization. ##
36652 ## -------------------- ##
36654 # Be more Bourne compatible
36655 DUALCASE=1; export DUALCASE # for MKS sh
36656 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
36659 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
36660 # is contrary to our usage. Disable this feature.
36661 alias -g '${1+"$@"}'='"$@"'
36662 setopt NO_GLOB_SUBST
36664 case `(set -o) 2>/dev/null` in #(
36676 # Printing a long string crashes Solaris 7 /usr/bin/printf.
36677 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
36678 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
36679 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
36680 # Prefer a ksh shell builtin over an external printf program on Solaris,
36681 # but without wasting forks for bash or zsh.
36682 if test -z "$BASH_VERSION$ZSH_VERSION" \
36683 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
36684 as_echo='print -r --'
36685 as_echo_n='print -rn --'
36686 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
36687 as_echo='printf %s\n'
36688 as_echo_n='printf %s'
36690 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
36691 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
36692 as_echo_n='/usr/ucb/echo -n'
36694 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
36695 as_echo_n_body='eval
36699 expr "X$arg" : "X\\(.*\\)$as_nl";
36700 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
36702 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
36704 export as_echo_n_body
36705 as_echo_n='sh -c $as_echo_n_body as_echo'
36707 export as_echo_body
36708 as_echo='sh -c $as_echo_body as_echo'
36711 # The user is always right.
36712 if test "${PATH_SEPARATOR+set}" != set; then
36714 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
36715 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
36722 # We need space, tab and new line, in precisely that order. Quoting is
36723 # there to prevent editors from complaining about space-tab.
36724 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
36725 # splitting by setting IFS to empty value.)
36728 # Find who we are. Look in the path if we contain no directory separator.
36731 *[\\/]* ) as_myself=$0 ;;
36732 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36733 for as_dir in $PATH
36736 test -z "$as_dir" && as_dir=.
36737 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
36743 # We did not find ourselves, most probably we were run as `sh COMMAND'
36744 # in which case we are not to be found in the path.
36745 if test "x$as_myself" = x; then
36748 if test ! -f "$as_myself"; then
36749 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
36753 # Unset variables that we do not need and which cause bugs (e.g. in
36754 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
36755 # suppresses any "Segmentation fault" message there. '((' could
36756 # trigger a bug in pdksh 5.2.14.
36757 for as_var in BASH_ENV ENV MAIL MAILPATH
36758 do eval test x\${$as_var+set} = xset \
36759 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
36772 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
36775 # as_fn_error STATUS ERROR [LINENO LOG_FD]
36776 # ----------------------------------------
36777 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
36778 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
36779 # script with STATUS, using 1 if that was 0.
36782 as_status=$1; test $as_status -eq 0 && as_status=1
36784 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
36785 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
36787 $as_echo "$as_me: error: $2" >&2
36788 as_fn_exit $as_status
36792 # as_fn_set_status STATUS
36793 # -----------------------
36794 # Set $? to STATUS, without forking.
36795 as_fn_set_status ()
36798 } # as_fn_set_status
36800 # as_fn_exit STATUS
36801 # -----------------
36802 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
36806 as_fn_set_status $1
36812 # Portably unset VAR.
36815 { eval $1=; unset $1;}
36817 as_unset=as_fn_unset
36818 # as_fn_append VAR VALUE
36819 # ----------------------
36820 # Append the text in VALUE to the end of the definition contained in VAR. Take
36821 # advantage of any shell optimizations that allow amortized linear growth over
36822 # repeated appends, instead of the typical quadratic growth present in naive
36824 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
36825 eval 'as_fn_append ()
36836 # as_fn_arith ARG...
36837 # ------------------
36838 # Perform arithmetic evaluation on the ARGs, and store the result in the
36839 # global $as_val. Take advantage of shells that can avoid forks. The arguments
36840 # must be portable across $(()) and expr.
36841 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
36842 eval 'as_fn_arith ()
36849 as_val=`expr "$@" || test $? -eq 1`
36854 if expr a : '\(a\)' >/dev/null 2>&1 &&
36855 test "X`expr 00001 : '.*\(...\)'`" = X001; then
36861 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
36862 as_basename=basename
36867 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
36873 as_me=`$as_basename -- "$0" ||
36874 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
36875 X"$0" : 'X\(//\)$' \| \
36876 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
36878 sed '/^.*\/\([^/][^/]*\)\/*$/{
36892 # Avoid depending upon Character Ranges.
36893 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
36894 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
36895 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
36896 as_cr_digits='0123456789'
36897 as_cr_alnum=$as_cr_Letters$as_cr_digits
36899 ECHO_C= ECHO_N= ECHO_T=
36900 case `echo -n x` in #(((((
36902 case `echo 'xy\c'` in
36903 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
36905 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
36912 rm -f conf$$ conf$$.exe conf$$.file
36913 if test -d conf$$.dir; then
36914 rm -f conf$$.dir/conf$$.file
36917 mkdir conf$$.dir 2>/dev/null
36919 if (echo >conf$$.file) 2>/dev/null; then
36920 if ln -s conf$$.file conf$$ 2>/dev/null; then
36922 # ... but there are two gotchas:
36923 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
36924 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
36925 # In both cases, we have to default to `cp -pR'.
36926 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
36928 elif ln conf$$.file conf$$ 2>/dev/null; then
36936 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
36937 rmdir conf$$.dir 2>/dev/null
36942 # Create "$as_dir" as a directory, including parents if necessary.
36947 -*) as_dir=./$as_dir;;
36949 test -d "$as_dir" || eval $as_mkdir_p || {
36953 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
36954 *) as_qdir=$as_dir;;
36956 as_dirs="'$as_qdir' $as_dirs"
36957 as_dir=`$as_dirname -- "$as_dir" ||
36958 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36959 X"$as_dir" : 'X\(//\)[^/]' \| \
36960 X"$as_dir" : 'X\(//\)$' \| \
36961 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
36962 $as_echo X"$as_dir" |
36963 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
36967 /^X\(\/\/\)[^/].*/{
36980 test -d "$as_dir" && break
36982 test -z "$as_dirs" || eval "mkdir $as_dirs"
36983 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
36987 if mkdir -p . 2>/dev/null; then
36988 as_mkdir_p='mkdir -p "$as_dir"'
36990 test -d ./-p && rmdir ./-p
36995 # as_fn_executable_p FILE
36996 # -----------------------
36997 # Test if FILE is an executable regular file.
36998 as_fn_executable_p ()
37000 test -f "$1" && test -x "$1"
37001 } # as_fn_executable_p
37002 as_test_x='test -x'
37003 as_executable_p=as_fn_executable_p
37005 # Sed expression to map a string onto a valid CPP name.
37006 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
37008 # Sed expression to map a string onto a valid variable name.
37009 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
37013 ## ----------------------------------- ##
37014 ## Main body of $CONFIG_STATUS script. ##
37015 ## ----------------------------------- ##
37017 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
37019 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37020 # Save the log message, to keep $0 and so on meaningful, and to
37021 # report actual input values of CONFIG_FILES etc. instead of their
37022 # values after options handling.
37024 This file was extended by GNU tar $as_me 1.27, which was
37025 generated by GNU Autoconf 2.69. Invocation command line was
37027 CONFIG_FILES = $CONFIG_FILES
37028 CONFIG_HEADERS = $CONFIG_HEADERS
37029 CONFIG_LINKS = $CONFIG_LINKS
37030 CONFIG_COMMANDS = $CONFIG_COMMANDS
37033 on `(hostname || uname -n) 2>/dev/null | sed 1q`
37038 case $ac_config_files in *"
37039 "*) set x $ac_config_files; shift; ac_config_files=$*;;
37042 case $ac_config_headers in *"
37043 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
37047 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37048 # Files that config.status was made for.
37049 config_files="$ac_config_files"
37050 config_headers="$ac_config_headers"
37051 config_commands="$ac_config_commands"
37055 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37057 \`$as_me' instantiates files and other configuration actions
37058 from templates according to the current configuration. Unless the files
37059 and actions are specified as TAGs, all are instantiated by default.
37061 Usage: $0 [OPTION]... [TAG]...
37063 -h, --help print this help, then exit
37064 -V, --version print version number and configuration settings, then exit
37065 --config print configuration, then exit
37066 -q, --quiet, --silent
37067 do not print progress messages
37068 -d, --debug don't remove temporary files
37069 --recheck update $as_me by reconfiguring in the same conditions
37070 --file=FILE[:TEMPLATE]
37071 instantiate the configuration file FILE
37072 --header=FILE[:TEMPLATE]
37073 instantiate the configuration header FILE
37075 Configuration files:
37078 Configuration headers:
37081 Configuration commands:
37084 Report bugs to <bug-tar@gnu.org>.
37085 GNU tar home page: <http://www.gnu.org/software/tar/>.
37086 General help using GNU software: <http://www.gnu.org/gethelp/>."
37089 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37090 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
37092 GNU tar config.status 1.27
37093 configured by $0, generated by GNU Autoconf 2.69,
37094 with options \\"\$ac_cs_config\\"
37096 Copyright (C) 2012 Free Software Foundation, Inc.
37097 This config.status script is free software; the Free Software Foundation
37098 gives unlimited permission to copy, distribute and modify it."
37105 test -n "\$AWK" || AWK=awk
37108 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37109 # The default lists apply if the user does not specify any file.
37115 ac_option=`expr "X$1" : 'X\([^=]*\)='`
37116 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
37120 ac_option=`expr "X$1" : 'X\([^=]*\)='`
37132 # Handling of the options.
37133 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
37135 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
37136 $as_echo "$ac_cs_version"; exit ;;
37137 --config | --confi | --conf | --con | --co | --c )
37138 $as_echo "$ac_cs_config"; exit ;;
37139 --debug | --debu | --deb | --de | --d | -d )
37141 --file | --fil | --fi | --f )
37144 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
37145 '') as_fn_error $? "missing file argument" ;;
37147 as_fn_append CONFIG_FILES " '$ac_optarg'"
37148 ac_need_defaults=false;;
37149 --header | --heade | --head | --hea )
37152 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
37154 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
37155 ac_need_defaults=false;;
37157 # Conflict between --help and --header
37158 as_fn_error $? "ambiguous option: \`$1'
37159 Try \`$0 --help' for more information.";;
37160 --help | --hel | -h )
37161 $as_echo "$ac_cs_usage"; exit ;;
37162 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
37163 | -silent | --silent | --silen | --sile | --sil | --si | --s)
37166 # This is an error.
37167 -*) as_fn_error $? "unrecognized option: \`$1'
37168 Try \`$0 --help' for more information." ;;
37170 *) as_fn_append ac_config_targets " $1"
37171 ac_need_defaults=false ;;
37177 ac_configure_extra_args=
37179 if $ac_cs_silent; then
37181 ac_configure_extra_args="$ac_configure_extra_args --silent"
37185 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37186 if \$ac_cs_recheck; then
37187 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
37189 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
37190 CONFIG_SHELL='$SHELL'
37191 export CONFIG_SHELL
37196 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37200 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
37201 ## Running $as_me. ##
37207 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37211 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
37212 # Capture the value of obsolete ALL_LINGUAS because we need it to compute
37213 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
37214 # from automake < 1.5.
37215 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
37216 # Capture the value of LINGUAS because we need it to compute CATALOGS.
37217 LINGUAS="${LINGUAS-%UNSET%}"
37223 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37225 # Handling of arguments.
37226 for ac_config_target in $ac_config_targets
37228 case $ac_config_target in
37229 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;;
37230 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
37231 "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;;
37232 "tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;;
37233 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
37234 "tests/atlocal") CONFIG_FILES="$CONFIG_FILES tests/atlocal" ;;
37235 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
37236 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
37237 "gnu/Makefile") CONFIG_FILES="$CONFIG_FILES gnu/Makefile" ;;
37238 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
37239 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;;
37240 "scripts/Makefile") CONFIG_FILES="$CONFIG_FILES scripts/Makefile" ;;
37241 "rmt/Makefile") CONFIG_FILES="$CONFIG_FILES rmt/Makefile" ;;
37242 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
37244 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
37249 # If the user did not use the arguments to specify the items to instantiate,
37250 # then the envvar interface is used. Set only those that are not.
37251 # We use the long form for the default assignment because of an extremely
37252 # bizarre bug on SunOS 4.1.3.
37253 if $ac_need_defaults; then
37254 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
37255 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
37256 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
37259 # Have a temporary directory for convenience. Make it in the build tree
37260 # simply because there is no reason against having it here, and in addition,
37261 # creating and moving files from /tmp can sometimes cause problems.
37262 # Hook for its removal unless debugging.
37263 # Note that there is a small window in which the directory will not be cleaned:
37264 # after its creation but before its name has been assigned to `$tmp'.
37268 trap 'exit_status=$?
37269 : "${ac_tmp:=$tmp}"
37270 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
37272 trap 'as_fn_exit 1' 1 2 13 15
37274 # Create a (secure) tmp directory for tmp files.
37277 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
37281 tmp=./conf$$-$RANDOM
37282 (umask 077 && mkdir "$tmp")
37283 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
37286 # Set up the scripts for CONFIG_FILES section.
37287 # No need to generate them if there are no CONFIG_FILES.
37288 # This happens for instance with `./config.status config.h'.
37289 if test -n "$CONFIG_FILES"; then
37292 ac_cr=`echo X | tr X '\015'`
37293 # On cygwin, bash can eat \r inside `` if the user requested igncr.
37294 # But we know of no other shell where ac_cr would be empty at this
37295 # point, so we can use a bashism as a fallback.
37296 if test "x$ac_cr" = x; then
37297 eval ac_cr=\$\'\\r\'
37299 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
37300 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
37303 ac_cs_awk_cr=$ac_cr
37306 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
37311 echo "cat >conf$$subs.awk <<_ACEOF" &&
37312 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
37314 } >conf$$subs.sh ||
37315 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37316 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
37318 for ac_last_try in false false false false false :; do
37319 . ./conf$$subs.sh ||
37320 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37322 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
37323 if test $ac_delim_n = $ac_delim_num; then
37325 elif $ac_last_try; then
37326 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
37328 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37331 rm -f conf$$subs.sh
37333 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37334 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
37338 s/^/S["/; s/!.*/"]=/
37348 s/\(.\{148\}\)..*/\1/
37350 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
37355 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37362 s/\(.\{148\}\)..*/\1/
37364 s/["\\]/\\&/g; s/^/"/; s/$/"/
37368 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
37373 ' <conf$$subs.awk | sed '
37378 ' >>$CONFIG_STATUS || ac_write_fail=1
37379 rm -f conf$$subs.awk
37380 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37382 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
37383 for (key in S) S_is_set[key] = 1
37389 nfields = split(line, field, "@")
37391 len = length(field[1])
37392 for (i = 2; i < nfields; i++) {
37394 keylen = length(key)
37395 if (S_is_set[key]) {
37397 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
37398 len += length(value) + length(field[++i])
37409 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37410 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
37411 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
37414 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
37415 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
37418 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
37419 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
37420 # trailing colons and then remove the whole line if VPATH becomes empty
37421 # (actually we leave an empty line to preserve line numbers).
37422 if test "x$srcdir" = x.; then
37423 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
37441 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37442 fi # test -n "$CONFIG_FILES"
37444 # Set up the scripts for CONFIG_HEADERS section.
37445 # No need to generate them if there are no CONFIG_HEADERS.
37446 # This happens for instance with `./config.status Makefile'.
37447 if test -n "$CONFIG_HEADERS"; then
37448 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
37452 # Transform confdefs.h into an awk script `defines.awk', embedded as
37453 # here-document in config.status, that substitutes the proper values into
37454 # config.h.in to produce config.h.
37456 # Create a delimiter string that does not exist in confdefs.h, to ease
37457 # handling of long lines.
37459 for ac_last_try in false false :; do
37460 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
37461 if test -z "$ac_tt"; then
37463 elif $ac_last_try; then
37464 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
37466 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
37470 # For the awk script, D is an array of macro values keyed by name,
37471 # likewise P contains macro parameters if any. Preserve backslash
37472 # newline sequences.
37474 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
37476 s/.\{148\}/&'"$ac_delim"'/g
37479 s/^[ ]*#[ ]*define[ ][ ]*/ /
37486 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
37488 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
37492 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
37493 D["\1"]=" \3\\\\\\n"\\/p
37495 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
37500 s/.\{148\}/&'"$ac_delim"'/g
37505 s/["\\]/\\&/g; s/^/"/; s/$/"/p
37508 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
37510 ' <confdefs.h | sed '
37511 s/'"$ac_delim"'/"\\\
37512 "/g' >>$CONFIG_STATUS || ac_write_fail=1
37514 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37515 for (key in D) D_is_set[key] = 1
37518 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
37520 split(line, arg, " ")
37521 if (arg[1] == "#") {
37525 defundef = substr(arg[1], 2)
37528 split(mac1, mac2, "(") #)
37530 prefix = substr(line, 1, index(line, defundef) - 1)
37531 if (D_is_set[macro]) {
37532 # Preserve the white space surrounding the "#".
37533 print prefix "define", macro P[macro] D[macro]
37536 # Replace #undef with comments. This is necessary, for example,
37537 # in the case of _POSIX_SOURCE, which is predefined and required
37538 # on some systems where configure will not decide to define it.
37539 if (defundef == "undef") {
37540 print "/*", prefix defundef, macro, "*/"
37548 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37549 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
37550 fi # test -n "$CONFIG_HEADERS"
37553 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
37558 :[FHLC]) ac_mode=$ac_tag; continue;;
37560 case $ac_mode$ac_tag in
37562 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
37563 :[FH]-) ac_tag=-:-;;
37564 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
37581 -) ac_f="$ac_tmp/stdin";;
37582 *) # Look for the file first in the build tree, then in the source tree
37583 # (if the path is not absolute). The absolute path cannot be DOS-style,
37584 # because $ac_f cannot contain `:'.
37588 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
37590 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
37592 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
37593 as_fn_append ac_file_inputs " '$ac_f'"
37596 # Let's still pretend it is `configure' which instantiates (i.e., don't
37597 # use $as_me), people would be surprised to read:
37598 # /* config.h. Generated by config.status. */
37599 configure_input='Generated from '`
37600 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
37602 if test x"$ac_file" != x-; then
37603 configure_input="$ac_file. $configure_input"
37604 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
37605 $as_echo "$as_me: creating $ac_file" >&6;}
37607 # Neutralize special characters interpreted by sed in replacement strings.
37608 case $configure_input in #(
37609 *\&* | *\|* | *\\* )
37610 ac_sed_conf_input=`$as_echo "$configure_input" |
37611 sed 's/[\\\\&|]/\\\\&/g'`;; #(
37612 *) ac_sed_conf_input=$configure_input;;
37616 *:-:* | *:-) cat >"$ac_tmp/stdin" \
37617 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
37622 ac_dir=`$as_dirname -- "$ac_file" ||
37623 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37624 X"$ac_file" : 'X\(//\)[^/]' \| \
37625 X"$ac_file" : 'X\(//\)$' \| \
37626 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
37627 $as_echo X"$ac_file" |
37628 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37632 /^X\(\/\/\)[^/].*/{
37645 as_dir="$ac_dir"; as_fn_mkdir_p
37649 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
37651 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
37652 # A ".." for each directory in $ac_dir_suffix.
37653 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
37654 case $ac_top_builddir_sub in
37655 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
37656 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
37659 ac_abs_top_builddir=$ac_pwd
37660 ac_abs_builddir=$ac_pwd$ac_dir_suffix
37661 # for backward compatibility:
37662 ac_top_builddir=$ac_top_build_prefix
37665 .) # We are building in place.
37667 ac_top_srcdir=$ac_top_builddir_sub
37668 ac_abs_top_srcdir=$ac_pwd ;;
37669 [\\/]* | ?:[\\/]* ) # Absolute name.
37670 ac_srcdir=$srcdir$ac_dir_suffix;
37671 ac_top_srcdir=$srcdir
37672 ac_abs_top_srcdir=$srcdir ;;
37673 *) # Relative name.
37674 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
37675 ac_top_srcdir=$ac_top_build_prefix$srcdir
37676 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
37678 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
37688 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
37689 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
37691 ac_MKDIR_P=$MKDIR_P
37693 [\\/$]* | ?:[\\/]* ) ;;
37694 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
37698 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37699 # If the template does not know about datarootdir, expand it.
37700 # FIXME: This hack should be removed a few years after 2.60.
37701 ac_datarootdir_hack=; ac_datarootdir_seen=
37712 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
37713 *datarootdir*) ac_datarootdir_seen=yes;;
37714 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
37715 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
37716 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
37718 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37719 ac_datarootdir_hack='
37720 s&@datadir@&$datadir&g
37721 s&@docdir@&$docdir&g
37722 s&@infodir@&$infodir&g
37723 s&@localedir@&$localedir&g
37724 s&@mandir@&$mandir&g
37725 s&\\\${datarootdir}&$datarootdir&g' ;;
37729 # Neutralize VPATH when `$srcdir' = `.'.
37730 # Shell code in configure.ac might set extrasub.
37731 # FIXME: do we really want to maintain this feature?
37732 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
37733 ac_sed_extra="$ac_vpsub
37736 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
37738 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
37739 s|@configure_input@|$ac_sed_conf_input|;t t
37740 s&@top_builddir@&$ac_top_builddir_sub&;t t
37741 s&@top_build_prefix@&$ac_top_build_prefix&;t t
37742 s&@srcdir@&$ac_srcdir&;t t
37743 s&@abs_srcdir@&$ac_abs_srcdir&;t t
37744 s&@top_srcdir@&$ac_top_srcdir&;t t
37745 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
37746 s&@builddir@&$ac_builddir&;t t
37747 s&@abs_builddir@&$ac_abs_builddir&;t t
37748 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
37749 s&@INSTALL@&$ac_INSTALL&;t t
37750 s&@MKDIR_P@&$ac_MKDIR_P&;t t
37751 $ac_datarootdir_hack
37753 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
37754 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37756 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
37757 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
37758 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
37759 "$ac_tmp/out"`; test -z "$ac_out"; } &&
37760 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37761 which seems to be undefined. Please make sure it is defined" >&5
37762 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
37763 which seems to be undefined. Please make sure it is defined" >&2;}
37765 rm -f "$ac_tmp/stdin"
37767 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
37768 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
37770 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37776 if test x"$ac_file" != x-; then
37778 $as_echo "/* $configure_input */" \
37779 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
37780 } >"$ac_tmp/config.h" \
37781 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37782 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
37783 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
37784 $as_echo "$as_me: $ac_file is unchanged" >&6;}
37787 mv "$ac_tmp/config.h" "$ac_file" \
37788 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
37791 $as_echo "/* $configure_input */" \
37792 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
37793 || as_fn_error $? "could not create -" "$LINENO" 5
37795 # Compute "$ac_file"'s index in $config_headers.
37798 for _am_header in $config_headers :; do
37799 case $_am_header in
37800 $_am_arg | $_am_arg:* )
37803 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
37806 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
37807 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37808 X"$_am_arg" : 'X\(//\)[^/]' \| \
37809 X"$_am_arg" : 'X\(//\)$' \| \
37810 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
37811 $as_echo X"$_am_arg" |
37812 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37816 /^X\(\/\/\)[^/].*/{
37828 s/.*/./; q'`/stamp-h$_am_stamp_count
37831 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
37832 $as_echo "$as_me: executing $ac_file commands" >&6;}
37837 case $ac_file$ac_mode in
37838 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
37839 # Autoconf 2.62 quotes --file arguments for eval, but not when files
37840 # are listed without --file. Let's play safe and only enable the eval
37841 # if we detect the quoting.
37842 case $CONFIG_FILES in
37843 *\'*) eval set x "$CONFIG_FILES" ;;
37844 *) set x $CONFIG_FILES ;;
37849 # Strip MF so we end up with the name of the file.
37850 mf=`echo "$mf" | sed -e 's/:.*$//'`
37851 # Check whether this is an Automake generated Makefile or not.
37852 # We used to match only the files named 'Makefile.in', but
37853 # some people rename them; so instead we look at the file content.
37854 # Grep'ing the first line is not enough: some people post-process
37855 # each Makefile.in and add a new line on top of each file to say so.
37856 # Grep'ing the whole file is not good either: AIX grep has a line
37857 # limit of 2048, but all sed's we know have understand at least 4000.
37858 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
37859 dirpart=`$as_dirname -- "$mf" ||
37860 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37861 X"$mf" : 'X\(//\)[^/]' \| \
37862 X"$mf" : 'X\(//\)$' \| \
37863 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
37865 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37869 /^X\(\/\/\)[^/].*/{
37885 # Extract the definition of DEPDIR, am__include, and am__quote
37886 # from the Makefile without running 'make'.
37887 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
37888 test -z "$DEPDIR" && continue
37889 am__include=`sed -n 's/^am__include = //p' < "$mf"`
37890 test -z "am__include" && continue
37891 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
37892 # Find all dependency output files, they are included files with
37893 # $(DEPDIR) in their names. We invoke sed twice because it is the
37894 # simplest approach to changing $(DEPDIR) to its actual value in the
37896 for file in `sed -n "
37897 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
37898 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
37899 # Make sure the directory exists.
37900 test -f "$dirpart/$file" && continue
37901 fdir=`$as_dirname -- "$file" ||
37902 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
37903 X"$file" : 'X\(//\)[^/]' \| \
37904 X"$file" : 'X\(//\)$' \| \
37905 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
37906 $as_echo X"$file" |
37907 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
37911 /^X\(\/\/\)[^/].*/{
37924 as_dir=$dirpart/$fdir; as_fn_mkdir_p
37925 # echo "creating $dirpart/$file"
37926 echo '# dummy' > "$dirpart/$file"
37931 "po-directories":C)
37932 for ac_file in $CONFIG_FILES; do
37933 # Support "outfile[:infile[:infile...]]"
37935 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
37937 # PO directories have a Makefile.in generated from Makefile.in.in.
37938 case "$ac_file" in */Makefile.in)
37939 # Adjust a relative srcdir.
37940 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
37941 ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'`
37942 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
37943 # In autoconf-2.13 it is called $ac_given_srcdir.
37944 # In autoconf-2.50 it is called $srcdir.
37945 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
37946 case "$ac_given_srcdir" in
37947 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
37948 /*) top_srcdir="$ac_given_srcdir" ;;
37949 *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
37951 # Treat a directory as a PO directory if and only if it has a
37952 # POTFILES.in file. This allows packages to have multiple PO
37953 # directories under different names or in different locations.
37954 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
37955 rm -f "$ac_dir/POTFILES"
37956 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
37957 gt_tab=`printf '\t'`
37958 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"
37959 POMAKEFILEDEPS="POTFILES.in"
37960 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
37961 # on $ac_dir but don't depend on user-specified configuration
37963 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
37964 # The LINGUAS file contains the set of available languages.
37965 if test -n "$OBSOLETE_ALL_LINGUAS"; then
37966 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
37968 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"`
37969 # Hide the ALL_LINGUAS assignment from automake < 1.5.
37970 eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
37971 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
37973 # The set of available languages was given in configure.in.
37974 # Hide the ALL_LINGUAS assignment from automake < 1.5.
37975 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
37978 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
37979 # Compute UPDATEPOFILES
37980 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
37981 # Compute DUMMYPOFILES
37982 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
37984 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
37985 case "$ac_given_srcdir" in
37987 *) srcdirpre='$(srcdir)/' ;;
37993 for lang in $ALL_LINGUAS; do
37994 POFILES="$POFILES $srcdirpre$lang.po"
37995 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
37996 DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
37997 GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
37999 # CATALOGS depends on both $ac_dir and the user's LINGUAS
38000 # environment variable.
38002 if test -n "$ALL_LINGUAS"; then
38003 for presentlang in $ALL_LINGUAS; do
38005 if test "%UNSET%" != "$LINGUAS"; then
38006 desiredlanguages="$LINGUAS"
38008 desiredlanguages="$ALL_LINGUAS"
38010 for desiredlang in $desiredlanguages; do
38011 # Use the presentlang catalog if desiredlang is
38012 # a. equal to presentlang, or
38013 # b. a variant of presentlang (because in this case,
38014 # presentlang can be used as a fallback for messages
38015 # which are not translated in the desiredlang catalog).
38016 case "$desiredlang" in
38017 "$presentlang"*) useit=yes;;
38020 if test $useit = yes; then
38021 INST_LINGUAS="$INST_LINGUAS $presentlang"
38026 if test -n "$INST_LINGUAS"; then
38027 for lang in $INST_LINGUAS; do
38028 CATALOGS="$CATALOGS $lang.gmo"
38031 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
38032 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"
38033 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
38034 if test -f "$f"; then
38036 *.orig | *.bak | *~) ;;
38037 *) cat "$f" >> "$ac_dir/Makefile" ;;
38045 "tests/atconfig":C) cat >tests/atconfig <<ATEOF
38046 # Configurable variable values for building test suites.
38048 # Copyright (C) 2012 Free Software Foundation, Inc.
38050 # The test suite will define top_srcdir=$at_top_srcdir/../.. etc.
38052 abs_builddir='$ac_abs_builddir'
38053 at_srcdir='$ac_srcdir'
38054 abs_srcdir='$ac_abs_srcdir'
38055 at_top_srcdir='$ac_top_srcdir'
38056 abs_top_srcdir='$ac_abs_top_srcdir'
38057 at_top_build_prefix='$ac_top_build_prefix'
38058 abs_top_builddir='$ac_abs_top_builddir'
38060 # Backward compatibility with Autotest <= 2.59b:
38061 at_top_builddir=\$at_top_build_prefix
38063 AUTOTEST_PATH='tests'
38065 SHELL=\${CONFIG_SHELL-'$SHELL'}
38075 ac_clean_files=$ac_clean_files_save
38077 test $ac_write_fail = 0 ||
38078 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
38081 # configure is writing to config.log, and then calls config.status.
38082 # config.status does its own redirection, appending to config.log.
38083 # Unfortunately, on DOS this fails, as config.log is still kept open
38084 # by configure, so config.status won't be able to write to it; its
38085 # output is simply discarded. So we exec the FD to /dev/null,
38086 # effectively closing config.log, so it can be properly (re)opened and
38087 # appended to by config.status. When coming back to configure, we
38088 # need to make the FD available again.
38089 if test "$no_create" != yes; then
38091 ac_config_status_args=
38092 test "$silent" = yes &&
38093 ac_config_status_args="$ac_config_status_args --quiet"
38095 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
38097 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
38098 # would make configure fail if this is the last instruction.
38099 $ac_cs_success || as_fn_exit 1
38101 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
38102 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
38103 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}