2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.68 for GNU patch 2.6.1.169-7096.
5 # Report bugs to <bug-patch@gnu.org>.
8 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
9 # 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
13 # This configure script is free software; the Free Software Foundation
14 # gives unlimited permission to copy, distribute and modify it.
15 ## -------------------- ##
16 ## M4sh Initialization. ##
17 ## -------------------- ##
19 # Be more Bourne compatible
20 DUALCASE=1; export DUALCASE # for MKS sh
21 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
24 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
25 # is contrary to our usage. Disable this feature.
26 alias -g '${1+"$@"}'='"$@"'
29 case `(set -o) 2>/dev/null` in #(
41 # Printing a long string crashes Solaris 7 /usr/bin/printf.
42 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
43 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
44 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
45 # Prefer a ksh shell builtin over an external printf program on Solaris,
46 # but without wasting forks for bash or zsh.
47 if test -z "$BASH_VERSION$ZSH_VERSION" \
48 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
50 as_echo_n='print -rn --'
51 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
55 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
56 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
57 as_echo_n='/usr/ucb/echo -n'
59 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64 expr "X$arg" : "X\\(.*\\)$as_nl";
65 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
67 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
70 as_echo_n='sh -c $as_echo_n_body as_echo'
73 as_echo='sh -c $as_echo_body as_echo'
76 # The user is always right.
77 if test "${PATH_SEPARATOR+set}" != set; then
79 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
80 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
87 # We need space, tab and new line, in precisely that order. Quoting is
88 # there to prevent editors from complaining about space-tab.
89 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
90 # splitting by setting IFS to empty value.)
93 # Find who we are. Look in the path if we contain no directory separator.
96 *[\\/]* ) as_myself=$0 ;;
97 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
101 test -z "$as_dir" && as_dir=.
102 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
108 # We did not find ourselves, most probably we were run as `sh COMMAND'
109 # in which case we are not to be found in the path.
110 if test "x$as_myself" = x; then
113 if test ! -f "$as_myself"; then
114 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
118 # Unset variables that we do not need and which cause bugs (e.g. in
119 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
120 # suppresses any "Segmentation fault" message there. '((' could
121 # trigger a bug in pdksh 5.2.14.
122 for as_var in BASH_ENV ENV MAIL MAILPATH
123 do eval test x\${$as_var+set} = xset \
124 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
137 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
139 if test "x$CONFIG_SHELL" = x; then
140 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
143 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
144 # is contrary to our usage. Disable this feature.
145 alias -g '\${1+\"\$@\"}'='\"\$@\"'
148 case \`(set -o) 2>/dev/null\` in #(
156 as_required="as_fn_return () { (exit \$1); }
157 as_fn_success () { as_fn_return 0; }
158 as_fn_failure () { as_fn_return 1; }
159 as_fn_ret_success () { return 0; }
160 as_fn_ret_failure () { return 1; }
163 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
164 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
165 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
166 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
167 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
170 exitcode=1; echo positional parameters were not saved.
172 test x\$exitcode = x0 || exit 1"
173 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
174 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
175 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
176 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
177 test \$(( 1 + 1 )) = 2 || exit 1"
178 if (eval "$as_required") 2>/dev/null; then :
183 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
186 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
188 for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
191 test -z "$as_dir" && as_dir=.
195 for as_base in sh bash ksh sh5; do
196 # Try only shells that exist, to save several forks.
197 as_shell=$as_dir/$as_base
198 if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
199 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
200 CONFIG_SHELL=$as_shell as_have_required=yes
201 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
209 $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
210 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
211 CONFIG_SHELL=$SHELL as_have_required=yes
216 if test "x$CONFIG_SHELL" != x; then :
217 # We cannot yet assume a decent shell, so we have to provide a
218 # neutralization value for shells without unset; and this also
219 # works around shells that cannot unset nonexistent variables.
220 # Preserve -v and -x to the replacement shell.
223 (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
226 *v*x* | *x*v* ) as_opts=-vx ;;
231 exec "$CONFIG_SHELL" $as_opts "$as_myself" ${1+"$@"}
234 if test x$as_have_required = xno; then :
235 $as_echo "$0: This script requires a shell more modern than all"
236 $as_echo "$0: the shells that I found on your system."
237 if test x${ZSH_VERSION+set} = xset ; then
238 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
239 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
241 $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-patch@gnu.org
242 $0: about your system, including any error possibly output
243 $0: before this message. Then install a modern shell, or
244 $0: manually run the script under such a shell if you do
251 SHELL=${CONFIG_SHELL-/bin/sh}
253 # Unset more variables known to interfere with behavior of common tools.
254 CLICOLOR_FORCE= GREP_OPTIONS=
255 unset CLICOLOR_FORCE GREP_OPTIONS
257 ## --------------------- ##
258 ## M4sh Shell Functions. ##
259 ## --------------------- ##
262 # Portably unset VAR.
265 { eval $1=; unset $1;}
269 # as_fn_set_status STATUS
270 # -----------------------
271 # Set $? to STATUS, without forking.
279 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
289 # Create "$as_dir" as a directory, including parents if necessary.
294 -*) as_dir=./$as_dir;;
296 test -d "$as_dir" || eval $as_mkdir_p || {
300 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
303 as_dirs="'$as_qdir' $as_dirs"
304 as_dir=`$as_dirname -- "$as_dir" ||
305 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
306 X"$as_dir" : 'X\(//\)[^/]' \| \
307 X"$as_dir" : 'X\(//\)$' \| \
308 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
309 $as_echo X"$as_dir" |
310 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
327 test -d "$as_dir" && break
329 test -z "$as_dirs" || eval "mkdir $as_dirs"
330 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
334 # as_fn_append VAR VALUE
335 # ----------------------
336 # Append the text in VALUE to the end of the definition contained in VAR. Take
337 # advantage of any shell optimizations that allow amortized linear growth over
338 # repeated appends, instead of the typical quadratic growth present in naive
340 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
341 eval 'as_fn_append ()
354 # Perform arithmetic evaluation on the ARGs, and store the result in the
355 # global $as_val. Take advantage of shells that can avoid forks. The arguments
356 # must be portable across $(()) and expr.
357 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
365 as_val=`expr "$@" || test $? -eq 1`
370 # as_fn_error STATUS ERROR [LINENO LOG_FD]
371 # ----------------------------------------
372 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
373 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
374 # script with STATUS, using 1 if that was 0.
377 as_status=$1; test $as_status -eq 0 && as_status=1
379 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
380 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
382 $as_echo "$as_me: error: $2" >&2
383 as_fn_exit $as_status
386 if expr a : '\(a\)' >/dev/null 2>&1 &&
387 test "X`expr 00001 : '.*\(...\)'`" = X001; then
393 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
399 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
405 as_me=`$as_basename -- "$0" ||
406 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
407 X"$0" : 'X\(//\)$' \| \
408 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
410 sed '/^.*\/\([^/][^/]*\)\/*$/{
424 # Avoid depending upon Character Ranges.
425 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
426 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
427 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
428 as_cr_digits='0123456789'
429 as_cr_alnum=$as_cr_Letters$as_cr_digits
432 as_lineno_1=$LINENO as_lineno_1a=$LINENO
433 as_lineno_2=$LINENO as_lineno_2a=$LINENO
434 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
435 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
436 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
448 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
452 chmod +x "$as_me.lineno" ||
453 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
455 # Don't try to exec as it changes $[0], causing all sort of problems
456 # (the dirname of $[0] is not the place where we might find the
457 # original and so on. Autoconf is especially sensitive to this).
459 # Exit status is that of the last command.
463 ECHO_C= ECHO_N= ECHO_T=
464 case `echo -n x` in #(((((
466 case `echo 'xy\c'` in
467 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
469 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
476 rm -f conf$$ conf$$.exe conf$$.file
477 if test -d conf$$.dir; then
478 rm -f conf$$.dir/conf$$.file
481 mkdir conf$$.dir 2>/dev/null
483 if (echo >conf$$.file) 2>/dev/null; then
484 if ln -s conf$$.file conf$$ 2>/dev/null; then
486 # ... but there are two gotchas:
487 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
488 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
489 # In both cases, we have to default to `cp -p'.
490 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
492 elif ln conf$$.file conf$$ 2>/dev/null; then
500 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
501 rmdir conf$$.dir 2>/dev/null
503 if mkdir -p . 2>/dev/null; then
504 as_mkdir_p='mkdir -p "$as_dir"'
506 test -d ./-p && rmdir ./-p
510 if test -x / >/dev/null 2>&1; then
513 if ls -dL / >/dev/null 2>&1; then
520 if test -d "$1"; then
526 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
527 ???[sx]*):;;*)false;;esac;fi
531 as_executable_p=$as_test_x
533 # Sed expression to map a string onto a valid CPP name.
534 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
536 # Sed expression to map a string onto a valid variable name.
537 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
540 test -n "$DJDIR" || exec 7<&0 </dev/null
544 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
545 # so uname gets run too.
546 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
551 ac_default_prefix=/usr/local
553 ac_config_libobj_dir=.
560 # Identity of this package.
561 PACKAGE_NAME='GNU patch'
562 PACKAGE_TARNAME='patch'
563 PACKAGE_VERSION='2.6.1.169-7096'
564 PACKAGE_STRING='GNU patch 2.6.1.169-7096'
565 PACKAGE_BUGREPORT='bug-patch@gnu.org'
566 PACKAGE_URL='http://www.gnu.org/software/patch/'
568 ac_unique_file="src/patch.c"
569 # Factoring default headers for most tests.
570 ac_includes_default="\
572 #ifdef HAVE_SYS_TYPES_H
573 # include <sys/types.h>
575 #ifdef HAVE_SYS_STAT_H
576 # include <sys/stat.h>
582 # ifdef HAVE_STDLIB_H
587 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
592 #ifdef HAVE_STRINGS_H
593 # include <strings.h>
595 #ifdef HAVE_INTTYPES_H
596 # include <inttypes.h>
607 gl_getopt_required=POSIX
608 gl_getopt_required=POSIX
609 ac_subst_vars='gltests_LTLIBOBJS
620 GNULIB_TEST_WARN_CFLAGS
630 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
643 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
648 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
650 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
651 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
652 TIME_H_DEFINES_STRUCT_TIMESPEC
653 NEXT_AS_FIRST_DIRECTIVE_TIME_H
655 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
657 NEXT_AS_FIRST_DIRECTIVE_STRING_H
659 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
661 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
663 GL_GENERATE_STDINT_H_FALSE
664 GL_GENERATE_STDINT_H_TRUE
673 HAVE_SIGNED_SIG_ATOMIC_T
676 BITSIZEOF_SIG_ATOMIC_T
682 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
687 HAVE_UNSIGNED_LONG_LONG_INT
689 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
691 GL_GENERATE_STDDEF_H_FALSE
692 GL_GENERATE_STDDEF_H_TRUE
696 GL_GENERATE_STDARG_H_FALSE
697 GL_GENERATE_STDARG_H_TRUE
699 NEXT_AS_FIRST_DIRECTIVE_STDARG_H
701 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
710 REPLACE_STDIO_WRITE_FUNCS
711 REPLACE_STDIO_READ_FUNCS
720 REPLACE_OBSTACK_PRINTF
745 HAVE_DECL_OBSTACK_PRINTF
751 GNULIB_VSPRINTF_POSIX
755 GNULIB_VFPRINTF_POSIX
762 GNULIB_STDIO_H_SIGPIPE
763 GNULIB_STDIO_H_NONBLOCKING
778 GNULIB_OBSTACK_PRINTF_POSIX
779 GNULIB_OBSTACK_PRINTF
805 REPLACE_PTHREAD_SIGMASK
807 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
808 HAVE_STRUCT_SIGACTION_SA_SIGACTION
814 HAVE_POSIX_SIGNALBLOCKING
817 GNULIB_SIGNAL_H_SIGPIPE
819 GNULIB_PTHREAD_SIGMASK
823 GL_GENERATE_STDBOOL_H_FALSE
824 GL_GENERATE_STDBOOL_H_TRUE
826 APPLE_UNIVERSAL_BUILD
834 HAVE_DECL_LOCALTIME_R
1007 LOCALCHARSET_TESTS_ENVIRONMENT
1009 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1011 REPLACE_STRUCT_TIMEVAL
1012 REPLACE_GETTIMEOFDAY
1019 GNULIB_GL_UNISTD_H_GETOPT
1022 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H
1058 GL_GENERATE_FLOAT_H_FALSE
1059 GL_GENERATE_FLOAT_H_TRUE
1061 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1063 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1080 GL_GENERATE_ERRNO_H_FALSE
1081 GL_GENERATE_ERRNO_H_TRUE
1083 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1086 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1089 PRAGMA_SYSTEM_HEADER
1090 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1116 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1118 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1119 UNISTD_H_HAVE_WINSOCK2_H
1140 REPLACE_GETDOMAINNAME
1150 HAVE_DECL_SETHOSTNAME
1151 HAVE_DECL_GETUSERSHELL
1152 HAVE_DECL_GETPAGESIZE
1153 HAVE_DECL_GETLOGIN_R
1154 HAVE_DECL_GETDOMAINNAME
1193 GNULIB_UNISTD_H_SIGPIPE
1194 GNULIB_UNISTD_H_NONBLOCKING
1220 GNULIB_GETDTABLESIZE
1221 GNULIB_GETDOMAINNAME
1249 REPLACE_CANONICALIZE_FILE_NAME
1254 HAVE_STRUCT_RANDOM_DATA
1275 HAVE_DECL_GETLOADAVG
1276 HAVE_CANONICALIZE_FILE_NAME
1289 GNULIB_REALLOC_POSIX
1306 GNULIB_CANONICALIZE_FILE_NAME
1310 GL_GENERATE_ALLOCA_H_FALSE
1311 GL_GENERATE_ALLOCA_H_TRUE
1314 GL_COND_LIBTOOL_FALSE
1315 GL_COND_LIBTOOL_TRUE
1348 AM_DEFAULT_VERBOSITY
1359 INSTALL_STRIP_PROGRAM
1405 program_transform_name
1418 enable_option_checking
1421 enable_dependency_tracking
1426 ac_precious_vars='build_alias
1439 # Initialize some variables set by options.
1441 ac_init_version=false
1442 ac_unrecognized_opts=
1443 ac_unrecognized_sep=
1444 # The variables have the same names as the options, with
1445 # dashes changed to underlines.
1446 cache_file=/dev/null
1453 program_transform_name=s,x,x,
1461 # Installation directory options.
1462 # These are left unexpanded so users can "make install exec_prefix=/foo"
1463 # and all the variables that are supposed to be based on exec_prefix
1464 # by default will actually change.
1465 # Use braces instead of parens because sh, perl, etc. also accept them.
1466 # (The list follows the same order as the GNU Coding Standards.)
1467 bindir='${exec_prefix}/bin'
1468 sbindir='${exec_prefix}/sbin'
1469 libexecdir='${exec_prefix}/libexec'
1470 datarootdir='${prefix}/share'
1471 datadir='${datarootdir}'
1472 sysconfdir='${prefix}/etc'
1473 sharedstatedir='${prefix}/com'
1474 localstatedir='${prefix}/var'
1475 includedir='${prefix}/include'
1476 oldincludedir='/usr/include'
1477 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1478 infodir='${datarootdir}/info'
1483 libdir='${exec_prefix}/lib'
1484 localedir='${datarootdir}/locale'
1485 mandir='${datarootdir}/man'
1491 # If the previous option needs an argument, assign it.
1492 if test -n "$ac_prev"; then
1493 eval $ac_prev=\$ac_option
1499 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1504 # Accept the important Cygnus configure options, so we can diagnose typos.
1506 case $ac_dashdash$ac_option in
1510 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1512 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1513 bindir=$ac_optarg ;;
1515 -build | --build | --buil | --bui | --bu)
1516 ac_prev=build_alias ;;
1517 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1518 build_alias=$ac_optarg ;;
1520 -cache-file | --cache-file | --cache-fil | --cache-fi \
1521 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1522 ac_prev=cache_file ;;
1523 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1524 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1525 cache_file=$ac_optarg ;;
1527 --config-cache | -C)
1528 cache_file=config.cache ;;
1530 -datadir | --datadir | --datadi | --datad)
1532 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1533 datadir=$ac_optarg ;;
1535 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1536 | --dataroo | --dataro | --datar)
1537 ac_prev=datarootdir ;;
1538 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1539 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1540 datarootdir=$ac_optarg ;;
1542 -disable-* | --disable-*)
1543 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1544 # Reject names that are not valid shell variable names.
1545 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1546 as_fn_error $? "invalid feature name: $ac_useropt"
1547 ac_useropt_orig=$ac_useropt
1548 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1549 case $ac_user_opts in
1551 "enable_$ac_useropt"
1553 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1554 ac_unrecognized_sep=', ';;
1556 eval enable_$ac_useropt=no ;;
1558 -docdir | --docdir | --docdi | --doc | --do)
1560 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1561 docdir=$ac_optarg ;;
1563 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1565 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1566 dvidir=$ac_optarg ;;
1568 -enable-* | --enable-*)
1569 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1570 # Reject names that are not valid shell variable names.
1571 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1572 as_fn_error $? "invalid feature name: $ac_useropt"
1573 ac_useropt_orig=$ac_useropt
1574 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1575 case $ac_user_opts in
1577 "enable_$ac_useropt"
1579 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1580 ac_unrecognized_sep=', ';;
1582 eval enable_$ac_useropt=\$ac_optarg ;;
1584 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1585 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1586 | --exec | --exe | --ex)
1587 ac_prev=exec_prefix ;;
1588 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1589 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1590 | --exec=* | --exe=* | --ex=*)
1591 exec_prefix=$ac_optarg ;;
1593 -gas | --gas | --ga | --g)
1594 # Obsolete; use --with-gas.
1597 -help | --help | --hel | --he | -h)
1598 ac_init_help=long ;;
1599 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1600 ac_init_help=recursive ;;
1601 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1602 ac_init_help=short ;;
1604 -host | --host | --hos | --ho)
1605 ac_prev=host_alias ;;
1606 -host=* | --host=* | --hos=* | --ho=*)
1607 host_alias=$ac_optarg ;;
1609 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1611 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1613 htmldir=$ac_optarg ;;
1615 -includedir | --includedir | --includedi | --included | --include \
1616 | --includ | --inclu | --incl | --inc)
1617 ac_prev=includedir ;;
1618 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1619 | --includ=* | --inclu=* | --incl=* | --inc=*)
1620 includedir=$ac_optarg ;;
1622 -infodir | --infodir | --infodi | --infod | --info | --inf)
1624 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1625 infodir=$ac_optarg ;;
1627 -libdir | --libdir | --libdi | --libd)
1629 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1630 libdir=$ac_optarg ;;
1632 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1633 | --libexe | --libex | --libe)
1634 ac_prev=libexecdir ;;
1635 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1636 | --libexe=* | --libex=* | --libe=*)
1637 libexecdir=$ac_optarg ;;
1639 -localedir | --localedir | --localedi | --localed | --locale)
1640 ac_prev=localedir ;;
1641 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1642 localedir=$ac_optarg ;;
1644 -localstatedir | --localstatedir | --localstatedi | --localstated \
1645 | --localstate | --localstat | --localsta | --localst | --locals)
1646 ac_prev=localstatedir ;;
1647 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1648 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1649 localstatedir=$ac_optarg ;;
1651 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1653 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1654 mandir=$ac_optarg ;;
1656 -nfp | --nfp | --nf)
1657 # Obsolete; use --without-fp.
1660 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1661 | --no-cr | --no-c | -n)
1664 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1665 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1668 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1669 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1670 | --oldin | --oldi | --old | --ol | --o)
1671 ac_prev=oldincludedir ;;
1672 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1673 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1674 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1675 oldincludedir=$ac_optarg ;;
1677 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1679 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1680 prefix=$ac_optarg ;;
1682 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1683 | --program-pre | --program-pr | --program-p)
1684 ac_prev=program_prefix ;;
1685 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1686 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1687 program_prefix=$ac_optarg ;;
1689 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1690 | --program-suf | --program-su | --program-s)
1691 ac_prev=program_suffix ;;
1692 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1693 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1694 program_suffix=$ac_optarg ;;
1696 -program-transform-name | --program-transform-name \
1697 | --program-transform-nam | --program-transform-na \
1698 | --program-transform-n | --program-transform- \
1699 | --program-transform | --program-transfor \
1700 | --program-transfo | --program-transf \
1701 | --program-trans | --program-tran \
1702 | --progr-tra | --program-tr | --program-t)
1703 ac_prev=program_transform_name ;;
1704 -program-transform-name=* | --program-transform-name=* \
1705 | --program-transform-nam=* | --program-transform-na=* \
1706 | --program-transform-n=* | --program-transform-=* \
1707 | --program-transform=* | --program-transfor=* \
1708 | --program-transfo=* | --program-transf=* \
1709 | --program-trans=* | --program-tran=* \
1710 | --progr-tra=* | --program-tr=* | --program-t=*)
1711 program_transform_name=$ac_optarg ;;
1713 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1715 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1716 pdfdir=$ac_optarg ;;
1718 -psdir | --psdir | --psdi | --psd | --ps)
1720 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1723 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1724 | -silent | --silent | --silen | --sile | --sil)
1727 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1729 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1731 sbindir=$ac_optarg ;;
1733 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1734 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1735 | --sharedst | --shareds | --shared | --share | --shar \
1737 ac_prev=sharedstatedir ;;
1738 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1739 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1740 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1742 sharedstatedir=$ac_optarg ;;
1744 -site | --site | --sit)
1746 -site=* | --site=* | --sit=*)
1749 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1751 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1752 srcdir=$ac_optarg ;;
1754 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1755 | --syscon | --sysco | --sysc | --sys | --sy)
1756 ac_prev=sysconfdir ;;
1757 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1758 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1759 sysconfdir=$ac_optarg ;;
1761 -target | --target | --targe | --targ | --tar | --ta | --t)
1762 ac_prev=target_alias ;;
1763 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1764 target_alias=$ac_optarg ;;
1766 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1769 -version | --version | --versio | --versi | --vers | -V)
1770 ac_init_version=: ;;
1773 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1774 # Reject names that are not valid shell variable names.
1775 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1776 as_fn_error $? "invalid package name: $ac_useropt"
1777 ac_useropt_orig=$ac_useropt
1778 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1779 case $ac_user_opts in
1783 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1784 ac_unrecognized_sep=', ';;
1786 eval with_$ac_useropt=\$ac_optarg ;;
1788 -without-* | --without-*)
1789 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1790 # Reject names that are not valid shell variable names.
1791 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1792 as_fn_error $? "invalid package name: $ac_useropt"
1793 ac_useropt_orig=$ac_useropt
1794 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1795 case $ac_user_opts in
1799 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1800 ac_unrecognized_sep=', ';;
1802 eval with_$ac_useropt=no ;;
1805 # Obsolete; use --with-x.
1808 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1809 | --x-incl | --x-inc | --x-in | --x-i)
1810 ac_prev=x_includes ;;
1811 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1812 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1813 x_includes=$ac_optarg ;;
1815 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1816 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1817 ac_prev=x_libraries ;;
1818 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1819 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1820 x_libraries=$ac_optarg ;;
1822 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1823 Try \`$0 --help' for more information"
1827 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1828 # Reject names that are not valid shell variable names.
1829 case $ac_envvar in #(
1830 '' | [0-9]* | *[!_$as_cr_alnum]* )
1831 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1833 eval $ac_envvar=\$ac_optarg
1834 export $ac_envvar ;;
1837 # FIXME: should be removed in autoconf 3.0.
1838 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1839 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1840 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1841 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1847 if test -n "$ac_prev"; then
1848 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1849 as_fn_error $? "missing argument to $ac_option"
1852 if test -n "$ac_unrecognized_opts"; then
1853 case $enable_option_checking in
1855 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1856 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1860 # Check all directory arguments for consistency.
1861 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1862 datadir sysconfdir sharedstatedir localstatedir includedir \
1863 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1864 libdir localedir mandir
1866 eval ac_val=\$$ac_var
1867 # Remove trailing slashes.
1870 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1871 eval $ac_var=\$ac_val;;
1873 # Be sure to have absolute directory names.
1875 [\\/$]* | ?:[\\/]* ) continue;;
1876 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1878 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1881 # There might be people who depend on the old broken behavior: `$host'
1882 # used to hold the argument of --host etc.
1883 # FIXME: To remove some day.
1886 target=$target_alias
1888 # FIXME: To remove some day.
1889 if test "x$host_alias" != x; then
1890 if test "x$build_alias" = x; then
1891 cross_compiling=maybe
1892 $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
1893 If a cross compiler is detected then cross compile mode will be used" >&2
1894 elif test "x$build_alias" != "x$host_alias"; then
1900 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1902 test "$silent" = yes && exec 6>/dev/null
1905 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1906 ac_ls_di=`ls -di .` &&
1907 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1908 as_fn_error $? "working directory cannot be determined"
1909 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1910 as_fn_error $? "pwd does not report name of working directory"
1913 # Find the source files, if location was not specified.
1914 if test -z "$srcdir"; then
1915 ac_srcdir_defaulted=yes
1916 # Try the directory containing this script, then the parent directory.
1917 ac_confdir=`$as_dirname -- "$as_myself" ||
1918 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1919 X"$as_myself" : 'X\(//\)[^/]' \| \
1920 X"$as_myself" : 'X\(//\)$' \| \
1921 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1922 $as_echo X"$as_myself" |
1923 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1941 if test ! -r "$srcdir/$ac_unique_file"; then
1945 ac_srcdir_defaulted=no
1947 if test ! -r "$srcdir/$ac_unique_file"; then
1948 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1949 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1951 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1953 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1955 # When building in place, set srcdir=.
1956 if test "$ac_abs_confdir" = "$ac_pwd"; then
1959 # Remove unnecessary trailing slashes from srcdir.
1960 # Double slashes in file names in object file debugging info
1961 # mess up M-x gdb in Emacs.
1963 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1965 for ac_var in $ac_precious_vars; do
1966 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1967 eval ac_env_${ac_var}_value=\$${ac_var}
1968 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1969 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1973 # Report the --help message.
1975 if test "$ac_init_help" = "long"; then
1976 # Omit some internal or obsolete options to make the list less imposing.
1977 # This message is too long to be a string in the A/UX 3.1 sh.
1979 \`configure' configures GNU patch 2.6.1.169-7096 to adapt to many kinds of systems.
1981 Usage: $0 [OPTION]... [VAR=VALUE]...
1983 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1984 VAR=VALUE. See below for descriptions of some of the useful variables.
1986 Defaults for the options are specified in brackets.
1989 -h, --help display this help and exit
1990 --help=short display options specific to this package
1991 --help=recursive display the short help of all the included packages
1992 -V, --version display version information and exit
1993 -q, --quiet, --silent do not print \`checking ...' messages
1994 --cache-file=FILE cache test results in FILE [disabled]
1995 -C, --config-cache alias for \`--cache-file=config.cache'
1996 -n, --no-create do not create output files
1997 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1999 Installation directories:
2000 --prefix=PREFIX install architecture-independent files in PREFIX
2001 [$ac_default_prefix]
2002 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2005 By default, \`make install' will install all the files in
2006 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2007 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2008 for instance \`--prefix=\$HOME'.
2010 For better control, use the options below.
2012 Fine tuning of the installation directories:
2013 --bindir=DIR user executables [EPREFIX/bin]
2014 --sbindir=DIR system admin executables [EPREFIX/sbin]
2015 --libexecdir=DIR program executables [EPREFIX/libexec]
2016 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2017 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2018 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2019 --libdir=DIR object code libraries [EPREFIX/lib]
2020 --includedir=DIR C header files [PREFIX/include]
2021 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2022 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2023 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2024 --infodir=DIR info documentation [DATAROOTDIR/info]
2025 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2026 --mandir=DIR man documentation [DATAROOTDIR/man]
2027 --docdir=DIR documentation root [DATAROOTDIR/doc/patch]
2028 --htmldir=DIR html documentation [DOCDIR]
2029 --dvidir=DIR dvi documentation [DOCDIR]
2030 --pdfdir=DIR pdf documentation [DOCDIR]
2031 --psdir=DIR ps documentation [DOCDIR]
2037 --program-prefix=PREFIX prepend PREFIX to installed program names
2038 --program-suffix=SUFFIX append SUFFIX to installed program names
2039 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
2042 --build=BUILD configure for building on BUILD [guessed]
2043 --host=HOST cross-compile to build programs to run on HOST [BUILD]
2047 if test -n "$ac_init_help"; then
2048 case $ac_init_help in
2049 short | recursive ) echo "Configuration of GNU patch 2.6.1.169-7096:";;
2054 --disable-option-checking ignore unrecognized --enable/--with options
2055 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
2056 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
2057 --disable-merge disable support for merging
2058 --enable-silent-rules less verbose build output (undo: `make V=1')
2059 --disable-silent-rules verbose build output (undo: `make V=0')
2060 --disable-dependency-tracking speeds up one-time build
2061 --enable-dependency-tracking do not reject slow dependency extractors
2062 --disable-largefile omit support for large files
2063 --enable-gcc-warnings turn on lots of GCC warnings (for developers)
2064 --disable-xattr do not support extended attributes
2066 Some influential environment variables:
2067 CC C compiler command
2068 CFLAGS C compiler flags
2069 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
2070 nonstandard directory <lib dir>
2071 LIBS libraries to pass to the linker, e.g. -l<library>
2072 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2073 you have headers in a nonstandard directory <include dir>
2075 YACC The "Yet Another C Compiler" implementation to use. Defaults to
2076 'bison -y'. Values other than 'bison -y' will most likely break
2078 YFLAGS YFLAGS contains the list arguments that will be passed by
2079 default to Bison. This script will default YFLAGS to the empty
2080 string to avoid a default value of '-d' given by some make
2083 Use these variables to override the choices made by `configure' or to help
2084 it to find libraries and programs with nonstandard names/locations.
2086 Report bugs to <bug-patch@gnu.org>.
2087 GNU patch home page: <http://www.gnu.org/software/patch/>.
2088 General help using GNU software: <http://www.gnu.org/gethelp/>.
2093 if test "$ac_init_help" = "recursive"; then
2094 # If there are subdirs, report their specific --help.
2095 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2096 test -d "$ac_dir" ||
2097 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2102 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2104 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2105 # A ".." for each directory in $ac_dir_suffix.
2106 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2107 case $ac_top_builddir_sub in
2108 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2109 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2112 ac_abs_top_builddir=$ac_pwd
2113 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2114 # for backward compatibility:
2115 ac_top_builddir=$ac_top_build_prefix
2118 .) # We are building in place.
2120 ac_top_srcdir=$ac_top_builddir_sub
2121 ac_abs_top_srcdir=$ac_pwd ;;
2122 [\\/]* | ?:[\\/]* ) # Absolute name.
2123 ac_srcdir=$srcdir$ac_dir_suffix;
2124 ac_top_srcdir=$srcdir
2125 ac_abs_top_srcdir=$srcdir ;;
2127 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2128 ac_top_srcdir=$ac_top_build_prefix$srcdir
2129 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2131 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2133 cd "$ac_dir" || { ac_status=$?; continue; }
2134 # Check for guested configure.
2135 if test -f "$ac_srcdir/configure.gnu"; then
2137 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2138 elif test -f "$ac_srcdir/configure"; then
2140 $SHELL "$ac_srcdir/configure" --help=recursive
2142 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2144 cd "$ac_pwd" || { ac_status=$?; break; }
2148 test -n "$ac_init_help" && exit $ac_status
2149 if $ac_init_version; then
2151 GNU patch configure 2.6.1.169-7096
2152 generated by GNU Autoconf 2.68
2154 Copyright (C) 2010 Free Software Foundation, Inc.
2155 This configure script is free software; the Free Software Foundation
2156 gives unlimited permission to copy, distribute and modify it.
2161 ## ------------------------ ##
2162 ## Autoconf initialization. ##
2163 ## ------------------------ ##
2165 # ac_fn_c_try_compile LINENO
2166 # --------------------------
2167 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2168 ac_fn_c_try_compile ()
2170 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2171 rm -f conftest.$ac_objext
2172 if { { ac_try="$ac_compile"
2174 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2175 *) ac_try_echo=$ac_try;;
2177 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2178 $as_echo "$ac_try_echo"; } >&5
2179 (eval "$ac_compile") 2>conftest.err
2181 if test -s conftest.err; then
2182 grep -v '^ *+' conftest.err >conftest.er1
2183 cat conftest.er1 >&5
2184 mv -f conftest.er1 conftest.err
2186 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2187 test $ac_status = 0; } && {
2188 test -z "$ac_c_werror_flag" ||
2189 test ! -s conftest.err
2190 } && test -s conftest.$ac_objext; then :
2193 $as_echo "$as_me: failed program was:" >&5
2194 sed 's/^/| /' conftest.$ac_ext >&5
2198 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2199 as_fn_set_status $ac_retval
2201 } # ac_fn_c_try_compile
2203 # ac_fn_c_try_cpp LINENO
2204 # ----------------------
2205 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2208 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2209 if { { ac_try="$ac_cpp conftest.$ac_ext"
2211 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2212 *) ac_try_echo=$ac_try;;
2214 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2215 $as_echo "$ac_try_echo"; } >&5
2216 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2218 if test -s conftest.err; then
2219 grep -v '^ *+' conftest.err >conftest.er1
2220 cat conftest.er1 >&5
2221 mv -f conftest.er1 conftest.err
2223 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2224 test $ac_status = 0; } > conftest.i && {
2225 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2226 test ! -s conftest.err
2230 $as_echo "$as_me: failed program was:" >&5
2231 sed 's/^/| /' conftest.$ac_ext >&5
2235 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2236 as_fn_set_status $ac_retval
2240 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
2241 # -------------------------------------------------------
2242 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
2243 # the include files in INCLUDES and setting the cache variable VAR
2245 ac_fn_c_check_header_mongrel ()
2247 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2248 if eval \${$3+:} false; then :
2249 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2250 $as_echo_n "checking for $2... " >&6; }
2251 if eval \${$3+:} false; then :
2252 $as_echo_n "(cached) " >&6
2255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2256 $as_echo "$ac_res" >&6; }
2258 # Is the header compilable?
2259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2260 $as_echo_n "checking $2 usability... " >&6; }
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262 /* end confdefs.h. */
2266 if ac_fn_c_try_compile "$LINENO"; then :
2267 ac_header_compiler=yes
2269 ac_header_compiler=no
2271 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2273 $as_echo "$ac_header_compiler" >&6; }
2275 # Is the header present?
2276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2277 $as_echo_n "checking $2 presence... " >&6; }
2278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2279 /* end confdefs.h. */
2282 if ac_fn_c_try_cpp "$LINENO"; then :
2283 ac_header_preproc=yes
2285 ac_header_preproc=no
2287 rm -f conftest.err conftest.i conftest.$ac_ext
2288 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2289 $as_echo "$ac_header_preproc" >&6; }
2291 # So? What about this header?
2292 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
2294 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2295 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2296 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2297 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2300 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2301 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2302 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
2303 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
2304 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2305 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2306 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
2307 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
2308 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2309 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2310 ( $as_echo "## -------------------------------- ##
2311 ## Report this to bug-patch@gnu.org ##
2312 ## -------------------------------- ##"
2313 ) | sed "s/^/$as_me: WARNING: /" >&2
2316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2317 $as_echo_n "checking for $2... " >&6; }
2318 if eval \${$3+:} false; then :
2319 $as_echo_n "(cached) " >&6
2321 eval "$3=\$ac_header_compiler"
2324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2325 $as_echo "$ac_res" >&6; }
2327 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2329 } # ac_fn_c_check_header_mongrel
2331 # ac_fn_c_try_run LINENO
2332 # ----------------------
2333 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2334 # that executables *can* be run.
2337 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2338 if { { ac_try="$ac_link"
2340 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2341 *) ac_try_echo=$ac_try;;
2343 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2344 $as_echo "$ac_try_echo"; } >&5
2345 (eval "$ac_link") 2>&5
2347 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2348 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2349 { { case "(($ac_try" in
2350 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2351 *) ac_try_echo=$ac_try;;
2353 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2354 $as_echo "$ac_try_echo"; } >&5
2355 (eval "$ac_try") 2>&5
2357 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2358 test $ac_status = 0; }; }; then :
2361 $as_echo "$as_me: program exited with status $ac_status" >&5
2362 $as_echo "$as_me: failed program was:" >&5
2363 sed 's/^/| /' conftest.$ac_ext >&5
2365 ac_retval=$ac_status
2367 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2368 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2369 as_fn_set_status $ac_retval
2373 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2374 # -------------------------------------------------------
2375 # Tests whether HEADER exists and can be compiled using the include files in
2376 # INCLUDES, setting the cache variable VAR accordingly.
2377 ac_fn_c_check_header_compile ()
2379 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2381 $as_echo_n "checking for $2... " >&6; }
2382 if eval \${$3+:} false; then :
2383 $as_echo_n "(cached) " >&6
2385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386 /* end confdefs.h. */
2390 if ac_fn_c_try_compile "$LINENO"; then :
2395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2398 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2399 $as_echo "$ac_res" >&6; }
2400 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2402 } # ac_fn_c_check_header_compile
2404 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2405 # -------------------------------------------
2406 # Tests whether TYPE exists after having included INCLUDES, setting cache
2407 # variable VAR accordingly.
2408 ac_fn_c_check_type ()
2410 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2412 $as_echo_n "checking for $2... " >&6; }
2413 if eval \${$3+:} false; then :
2414 $as_echo_n "(cached) " >&6
2417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2418 /* end confdefs.h. */
2429 if ac_fn_c_try_compile "$LINENO"; then :
2430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2431 /* end confdefs.h. */
2442 if ac_fn_c_try_compile "$LINENO"; then :
2447 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2449 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2453 $as_echo "$ac_res" >&6; }
2454 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2456 } # ac_fn_c_check_type
2458 # ac_fn_c_try_link LINENO
2459 # -----------------------
2460 # Try to link conftest.$ac_ext, and return whether this succeeded.
2463 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2464 rm -f conftest.$ac_objext conftest$ac_exeext
2465 if { { ac_try="$ac_link"
2467 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2468 *) ac_try_echo=$ac_try;;
2470 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2471 $as_echo "$ac_try_echo"; } >&5
2472 (eval "$ac_link") 2>conftest.err
2474 if test -s conftest.err; then
2475 grep -v '^ *+' conftest.err >conftest.er1
2476 cat conftest.er1 >&5
2477 mv -f conftest.er1 conftest.err
2479 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2480 test $ac_status = 0; } && {
2481 test -z "$ac_c_werror_flag" ||
2482 test ! -s conftest.err
2483 } && test -s conftest$ac_exeext && {
2484 test "$cross_compiling" = yes ||
2485 $as_test_x conftest$ac_exeext
2489 $as_echo "$as_me: failed program was:" >&5
2490 sed 's/^/| /' conftest.$ac_ext >&5
2494 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2495 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2496 # interfere with the next link command; also delete a directory that is
2497 # left behind by Apple's compiler. We do this before executing the actions.
2498 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2499 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2500 as_fn_set_status $ac_retval
2502 } # ac_fn_c_try_link
2504 # ac_fn_c_check_func LINENO FUNC VAR
2505 # ----------------------------------
2506 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2507 ac_fn_c_check_func ()
2509 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
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 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2516 /* end confdefs.h. */
2517 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2518 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2519 #define $2 innocuous_$2
2521 /* System header to define __stub macros and hopefully few prototypes,
2522 which can conflict with char $2 (); below.
2523 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2524 <limits.h> exists even on freestanding compilers. */
2527 # include <limits.h>
2529 # include <assert.h>
2534 /* Override any GCC internal prototype to avoid an error.
2535 Use char because int might match the return type of a GCC
2536 builtin and then its argument prototype would still apply. */
2541 /* The GNU C library defines this for functions which it implements
2542 to always fail with ENOSYS. Some functions are actually named
2543 something starting with __ and the normal name is an alias. */
2544 #if defined __stub_$2 || defined __stub___$2
2556 if ac_fn_c_try_link "$LINENO"; then :
2561 rm -f core conftest.err conftest.$ac_objext \
2562 conftest$ac_exeext conftest.$ac_ext
2565 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2566 $as_echo "$ac_res" >&6; }
2567 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2569 } # ac_fn_c_check_func
2571 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2572 # ---------------------------------------------
2573 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2575 ac_fn_c_check_decl ()
2577 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2578 as_decl_name=`echo $2|sed 's/ *(.*//'`
2579 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2581 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2582 if eval \${$3+:} false; then :
2583 $as_echo_n "(cached) " >&6
2585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2586 /* end confdefs.h. */
2591 #ifndef $as_decl_name
2593 (void) $as_decl_use;
2595 (void) $as_decl_name;
2603 if ac_fn_c_try_compile "$LINENO"; then :
2608 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2612 $as_echo "$ac_res" >&6; }
2613 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2615 } # ac_fn_c_check_decl
2617 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2618 # --------------------------------------------
2619 # Tries to find the compile-time value of EXPR in a program that includes
2620 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2622 ac_fn_c_compute_int ()
2624 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2625 if test "$cross_compiling" = yes; then
2626 # Depending upon the size, compute the lo and hi bounds.
2627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2628 /* end confdefs.h. */
2633 static int test_array [1 - 2 * !(($2) >= 0)];
2640 if ac_fn_c_try_compile "$LINENO"; then :
2643 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2644 /* end confdefs.h. */
2649 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2656 if ac_fn_c_try_compile "$LINENO"; then :
2657 ac_hi=$ac_mid; break
2659 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2660 if test $ac_lo -le $ac_mid; then
2664 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2670 /* end confdefs.h. */
2675 static int test_array [1 - 2 * !(($2) < 0)];
2682 if ac_fn_c_try_compile "$LINENO"; then :
2685 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2686 /* end confdefs.h. */
2691 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2698 if ac_fn_c_try_compile "$LINENO"; then :
2699 ac_lo=$ac_mid; break
2701 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2702 if test $ac_mid -le $ac_hi; then
2706 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2708 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2713 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2715 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2716 # Binary search between lo and hi bounds.
2717 while test "x$ac_lo" != "x$ac_hi"; do
2718 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2720 /* end confdefs.h. */
2725 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2732 if ac_fn_c_try_compile "$LINENO"; then :
2735 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2737 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2740 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2744 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2745 /* end confdefs.h. */
2747 static long int longval () { return $2; }
2748 static unsigned long int ulongval () { return $2; }
2755 FILE *f = fopen ("conftest.val", "w");
2760 long int i = longval ();
2763 fprintf (f, "%ld", i);
2767 unsigned long int i = ulongval ();
2770 fprintf (f, "%lu", i);
2772 /* Do not output a trailing newline, as this causes \r\n confusion
2773 on some platforms. */
2774 return ferror (f) || fclose (f) != 0;
2780 if ac_fn_c_try_run "$LINENO"; then :
2781 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2785 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2786 conftest.$ac_objext conftest.beam conftest.$ac_ext
2790 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2791 as_fn_set_status $ac_retval
2793 } # ac_fn_c_compute_int
2795 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2796 # ----------------------------------------------------
2797 # Tries to find if the field MEMBER exists in type AGGR, after including
2798 # INCLUDES, setting cache variable VAR accordingly.
2799 ac_fn_c_check_member ()
2801 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2803 $as_echo_n "checking for $2.$3... " >&6; }
2804 if eval \${$4+:} false; then :
2805 $as_echo_n "(cached) " >&6
2807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2808 /* end confdefs.h. */
2820 if ac_fn_c_try_compile "$LINENO"; then :
2823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2824 /* end confdefs.h. */
2830 if (sizeof ac_aggr.$3)
2836 if ac_fn_c_try_compile "$LINENO"; then :
2841 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2847 $as_echo "$ac_res" >&6; }
2848 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2850 } # ac_fn_c_check_member
2851 cat >config.log <<_ACEOF
2852 This file contains any messages produced by compilers while
2853 running configure, to aid debugging if configure makes a mistake.
2855 It was created by GNU patch $as_me 2.6.1.169-7096, which was
2856 generated by GNU Autoconf 2.68. Invocation command line was
2868 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2869 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2870 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2871 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2872 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2874 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2875 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2877 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2878 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2879 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2880 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2881 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2882 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2883 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2887 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2891 test -z "$as_dir" && as_dir=.
2892 $as_echo "PATH: $as_dir"
2908 # Keep a trace of the command line.
2909 # Strip out --no-create and --no-recursion so they do not pile up.
2910 # Strip out --silent because we don't want to record it for future runs.
2911 # Also quote any args containing shell meta-characters.
2912 # Make two passes to allow for proper duplicate-argument suppression.
2916 ac_must_keep_next=false
2922 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2923 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2924 | -silent | --silent | --silen | --sile | --sil)
2927 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2930 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2932 as_fn_append ac_configure_args1 " '$ac_arg'"
2933 if test $ac_must_keep_next = true; then
2934 ac_must_keep_next=false # Got value, back to normal.
2937 *=* | --config-cache | -C | -disable-* | --disable-* \
2938 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2939 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2940 | -with-* | --with-* | -without-* | --without-* | --x)
2941 case "$ac_configure_args0 " in
2942 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2945 -* ) ac_must_keep_next=true ;;
2948 as_fn_append ac_configure_args " '$ac_arg'"
2953 { ac_configure_args0=; unset ac_configure_args0;}
2954 { ac_configure_args1=; unset ac_configure_args1;}
2956 # When interrupted or exit'd, cleanup temporary files, and complete
2957 # config.log. We remove comments because anyway the quotes in there
2958 # would cause problems or look ugly.
2959 # WARNING: Use '\'' to represent an apostrophe within the trap.
2960 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2961 trap 'exit_status=$?
2962 # Save into config.log some information that might help in debugging.
2966 $as_echo "## ---------------- ##
2967 ## Cache variables. ##
2968 ## ---------------- ##"
2970 # The following way of writing the cache mishandles newlines in values,
2972 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2973 eval ac_val=\$$ac_var
2977 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2978 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2981 _ | IFS | as_nl) ;; #(
2982 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2983 *) { eval $ac_var=; unset $ac_var;} ;;
2988 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2989 *${as_nl}ac_space=\ *)
2991 "s/'\''/'\''\\\\'\'''\''/g;
2992 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2995 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3002 $as_echo "## ----------------- ##
3003 ## Output variables. ##
3004 ## ----------------- ##"
3006 for ac_var in $ac_subst_vars
3008 eval ac_val=\$$ac_var
3010 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3012 $as_echo "$ac_var='\''$ac_val'\''"
3016 if test -n "$ac_subst_files"; then
3017 $as_echo "## ------------------- ##
3018 ## File substitutions. ##
3019 ## ------------------- ##"
3021 for ac_var in $ac_subst_files
3023 eval ac_val=\$$ac_var
3025 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3027 $as_echo "$ac_var='\''$ac_val'\''"
3032 if test -s confdefs.h; then
3033 $as_echo "## ----------- ##
3040 test "$ac_signal" != 0 &&
3041 $as_echo "$as_me: caught signal $ac_signal"
3042 $as_echo "$as_me: exit $exit_status"
3044 rm -f core *.core core.conftest.* &&
3045 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3048 for ac_signal in 1 2 13 15; do
3049 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3053 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3054 rm -f -r conftest* confdefs.h
3056 $as_echo "/* confdefs.h */" > confdefs.h
3058 # Predefined preprocessor variables.
3060 cat >>confdefs.h <<_ACEOF
3061 #define PACKAGE_NAME "$PACKAGE_NAME"
3064 cat >>confdefs.h <<_ACEOF
3065 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3068 cat >>confdefs.h <<_ACEOF
3069 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3072 cat >>confdefs.h <<_ACEOF
3073 #define PACKAGE_STRING "$PACKAGE_STRING"
3076 cat >>confdefs.h <<_ACEOF
3077 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3080 cat >>confdefs.h <<_ACEOF
3081 #define PACKAGE_URL "$PACKAGE_URL"
3085 # Let the site file select an alternate cache file if it wants to.
3086 # Prefer an explicitly selected file to automatically selected ones.
3089 if test -n "$CONFIG_SITE"; then
3090 # We do not want a PATH search for config.site.
3091 case $CONFIG_SITE in #((
3092 -*) ac_site_file1=./$CONFIG_SITE;;
3093 */*) ac_site_file1=$CONFIG_SITE;;
3094 *) ac_site_file1=./$CONFIG_SITE;;
3096 elif test "x$prefix" != xNONE; then
3097 ac_site_file1=$prefix/share/config.site
3098 ac_site_file2=$prefix/etc/config.site
3100 ac_site_file1=$ac_default_prefix/share/config.site
3101 ac_site_file2=$ac_default_prefix/etc/config.site
3103 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3105 test "x$ac_site_file" = xNONE && continue
3106 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3107 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3108 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3109 sed 's/^/| /' "$ac_site_file" >&5
3111 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3112 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3113 as_fn_error $? "failed to load site script $ac_site_file
3114 See \`config.log' for more details" "$LINENO" 5; }
3118 if test -r "$cache_file"; then
3119 # Some versions of bash will fail to source /dev/null (special files
3120 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3121 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3122 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3123 $as_echo "$as_me: loading cache $cache_file" >&6;}
3125 [\\/]* | ?:[\\/]* ) . "$cache_file";;
3126 *) . "./$cache_file";;
3130 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3131 $as_echo "$as_me: creating cache $cache_file" >&6;}
3135 as_fn_append ac_func_list " pathconf"
3136 as_fn_append ac_func_list " canonicalize_file_name"
3137 as_fn_append ac_func_list " getcwd"
3138 as_fn_append ac_func_list " readlink"
3139 as_fn_append ac_func_list " realpath"
3140 as_fn_append ac_header_list " sys/param.h"
3141 as_fn_append ac_func_list " _set_invalid_parameter_handler"
3142 as_fn_append ac_header_list " sys/socket.h"
3143 as_fn_append ac_header_list " dirent.h"
3144 as_fn_append ac_func_list " fdopendir"
3145 as_fn_append ac_header_list " unistd.h"
3146 as_fn_append ac_func_list " fcntl"
3147 as_fn_append ac_func_list " symlink"
3148 as_fn_append ac_func_list " getdtablesize"
3149 gl_getopt_required=GNU
3150 as_fn_append ac_header_list " getopt.h"
3151 as_fn_append ac_func_list " gettimeofday"
3152 as_fn_append ac_func_list " nanotime"
3153 as_fn_append ac_header_list " sys/time.h"
3154 as_fn_append ac_func_list " lchmod"
3155 as_fn_append ac_func_list " lstat"
3156 as_fn_append ac_func_list " mbsinit"
3157 as_fn_append ac_func_list " mbrtowc"
3158 as_fn_append ac_header_list " sys/mman.h"
3159 as_fn_append ac_func_list " mprotect"
3160 as_fn_append ac_func_list " alarm"
3161 as_fn_append ac_func_list " link"
3162 as_fn_append ac_func_list " setenv"
3163 as_fn_append ac_header_list " wchar.h"
3164 as_fn_append ac_header_list " stdint.h"
3165 as_fn_append ac_func_list " strndup"
3166 as_fn_append ac_header_list " sys/stat.h"
3167 as_fn_append ac_func_list " localtime_r"
3168 as_fn_append ac_func_list " pipe"
3169 as_fn_append ac_header_list " utime.h"
3170 as_fn_append ac_func_list " futimes"
3171 as_fn_append ac_func_list " futimesat"
3172 as_fn_append ac_func_list " futimens"
3173 as_fn_append ac_func_list " utimensat"
3174 as_fn_append ac_func_list " lutimes"
3175 as_fn_append ac_func_list " vasnprintf"
3176 as_fn_append ac_header_list " features.h"
3177 as_fn_append ac_func_list " snprintf"
3178 as_fn_append ac_func_list " iswcntrl"
3179 as_fn_append ac_header_list " wctype.h"
3180 # Check that the precious variables saved in the cache have kept the same
3182 ac_cache_corrupted=false
3183 for ac_var in $ac_precious_vars; do
3184 eval ac_old_set=\$ac_cv_env_${ac_var}_set
3185 eval ac_new_set=\$ac_env_${ac_var}_set
3186 eval ac_old_val=\$ac_cv_env_${ac_var}_value
3187 eval ac_new_val=\$ac_env_${ac_var}_value
3188 case $ac_old_set,$ac_new_set in
3190 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3191 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3192 ac_cache_corrupted=: ;;
3194 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3195 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3196 ac_cache_corrupted=: ;;
3199 if test "x$ac_old_val" != "x$ac_new_val"; then
3200 # differences in whitespace do not lead to failure.
3201 ac_old_val_w=`echo x $ac_old_val`
3202 ac_new_val_w=`echo x $ac_new_val`
3203 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3204 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3205 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3206 ac_cache_corrupted=:
3208 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3209 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3210 eval $ac_var=\$ac_old_val
3212 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3213 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3214 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3215 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3218 # Pass precious variables to config.status.
3219 if test "$ac_new_set" = set; then
3221 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3222 *) ac_arg=$ac_var=$ac_new_val ;;
3224 case " $ac_configure_args " in
3225 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3226 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3230 if $ac_cache_corrupted; then
3231 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3232 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3233 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3234 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3235 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3237 ## -------------------- ##
3238 ## Main body of script. ##
3239 ## -------------------- ##
3242 ac_cpp='$CPP $CPPFLAGS'
3243 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3244 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3245 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3251 for ac_dir in build-aux "$srcdir"/build-aux; do
3252 if test -f "$ac_dir/install-sh"; then
3254 ac_install_sh="$ac_aux_dir/install-sh -c"
3256 elif test -f "$ac_dir/install.sh"; then
3258 ac_install_sh="$ac_aux_dir/install.sh -c"
3260 elif test -f "$ac_dir/shtool"; then
3262 ac_install_sh="$ac_aux_dir/shtool install -c"
3266 if test -z "$ac_aux_dir"; then
3267 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5
3270 # These three variables are undocumented and unsupported,
3271 # and are intended to be withdrawn in a future Autoconf release.
3272 # They can cause serious problems if a builder's source tree is in a directory
3273 # whose full name contains unusual characters.
3274 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
3275 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
3276 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
3281 # Check whether --enable-merge was given.
3282 if test "${enable_merge+set}" = set; then :
3283 enableval=$enable_merge;
3286 if test "$enableval" != no; then
3288 ENABLE_MERGE_FALSE='#'
3290 ENABLE_MERGE_TRUE='#'
3294 if echo "$PACKAGE_VERSION" | grep -- "-[0-9a-f][0-9a-f]*\\(-dirty\\)\\?$" >/dev/null; then
3296 ALPHA_VERSION_FALSE='#'
3298 ALPHA_VERSION_TRUE='#'
3299 ALPHA_VERSION_FALSE=
3303 am__api_version='1.11'
3305 # Find a good install program. We prefer a C program (faster),
3306 # so one script is as good as another. But avoid the broken or
3307 # incompatible versions:
3308 # SysV /etc/install, /usr/sbin/install
3309 # SunOS /usr/etc/install
3310 # IRIX /sbin/install
3312 # AmigaOS /C/install, which installs bootblocks on floppy discs
3313 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
3314 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
3315 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
3316 # OS/2's system install, which has a completely different semantic
3317 # ./install, which can be erroneously created by make from ./install.sh.
3318 # Reject install programs that cannot install multiple files.
3319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
3320 $as_echo_n "checking for a BSD-compatible install... " >&6; }
3321 if test -z "$INSTALL"; then
3322 if ${ac_cv_path_install+:} false; then :
3323 $as_echo_n "(cached) " >&6
3325 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3329 test -z "$as_dir" && as_dir=.
3330 # Account for people who put trailing slashes in PATH elements.
3331 case $as_dir/ in #((
3332 ./ | .// | /[cC]/* | \
3333 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
3334 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
3337 # OSF1 and SCO ODT 3.0 have their own names for install.
3338 # Don't use installbsd from OSF since it installs stuff as root
3340 for ac_prog in ginstall scoinst install; do
3341 for ac_exec_ext in '' $ac_executable_extensions; do
3342 if { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; }; then
3343 if test $ac_prog = install &&
3344 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3345 # AIX install. It has an incompatible calling convention.
3347 elif test $ac_prog = install &&
3348 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
3349 # program-specific install script used by HP pwplus--don't use.
3352 rm -rf conftest.one conftest.two conftest.dir
3353 echo one > conftest.one
3354 echo two > conftest.two
3356 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
3357 test -s conftest.one && test -s conftest.two &&
3358 test -s conftest.dir/conftest.one &&
3359 test -s conftest.dir/conftest.two
3361 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
3374 rm -rf conftest.one conftest.two conftest.dir
3377 if test "${ac_cv_path_install+set}" = set; then
3378 INSTALL=$ac_cv_path_install
3380 # As a last resort, use the slow shell script. Don't cache a
3381 # value for INSTALL within a source directory, because that will
3382 # break other packages using the cache if that directory is
3383 # removed, or if the value is a relative name.
3384 INSTALL=$ac_install_sh
3387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
3388 $as_echo "$INSTALL" >&6; }
3390 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3391 # It thinks the first close brace ends the variable substitution.
3392 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3394 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3396 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
3399 $as_echo_n "checking whether build environment is sane... " >&6; }
3402 echo timestamp > conftest.file
3403 # Reject unsafe characters in $srcdir or the absolute working directory
3404 # name. Accept space and tab only in the latter.
3408 *[\\\"\#\$\&\'\`$am_lf]*)
3409 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
3412 *[\\\"\#\$\&\'\`$am_lf\ \ ]*)
3413 as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
3416 # Do `set' in a subshell so we don't clobber the current shell's
3417 # arguments. Must try -L first in case configure is actually a
3418 # symlink; some systems play weird games with the mod time of symlinks
3419 # (eg FreeBSD returns the mod time of the symlink's containing
3422 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
3423 if test "$*" = "X"; then
3425 set X `ls -t "$srcdir/configure" conftest.file`
3428 if test "$*" != "X $srcdir/configure conftest.file" \
3429 && test "$*" != "X conftest.file $srcdir/configure"; then
3431 # If neither matched, then we have a broken ls. This can happen
3432 # if, for instance, CONFIG_SHELL is bash and it inherits a
3433 # broken ls alias from the environment. This has actually
3434 # happened. Such a system could not be considered "sane".
3435 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken
3436 alias in your environment" "$LINENO" 5
3439 test "$2" = conftest.file
3445 as_fn_error $? "newly created file is older than distributed files!
3446 Check your system clock" "$LINENO" 5
3448 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3449 $as_echo "yes" >&6; }
3450 test "$program_prefix" != NONE &&
3451 program_transform_name="s&^&$program_prefix&;$program_transform_name"
3452 # Use a double $ so make ignores it.
3453 test "$program_suffix" != NONE &&
3454 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
3455 # Double any \ or $.
3456 # By default was `s,x,x', remove it if useless.
3457 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
3458 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
3460 # expand $ac_aux_dir to an absolute path
3461 am_aux_dir=`cd $ac_aux_dir && pwd`
3463 if test x"${MISSING+set}" != xset; then
3466 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
3468 MISSING="\${SHELL} $am_aux_dir/missing" ;;
3471 # Use eval to expand $SHELL
3472 if eval "$MISSING --run true"; then
3473 am_missing_run="$MISSING --run "
3476 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`missing' script is too old or missing" >&5
3477 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
3480 if test x"${install_sh}" != xset; then
3483 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
3485 install_sh="\${SHELL} $am_aux_dir/install-sh"
3489 # Installed binaries are usually stripped using `strip' when the user
3490 # run `make install-strip'. However `strip' might not be the right
3491 # tool to use in cross-compilation environments, therefore Automake
3492 # will honor the `STRIP' environment variable to overrule this program.
3493 if test "$cross_compiling" != no; then
3494 if test -n "$ac_tool_prefix"; then
3495 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
3496 set dummy ${ac_tool_prefix}strip; ac_word=$2
3497 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3498 $as_echo_n "checking for $ac_word... " >&6; }
3499 if ${ac_cv_prog_STRIP+:} false; then :
3500 $as_echo_n "(cached) " >&6
3502 if test -n "$STRIP"; then
3503 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
3505 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3509 test -z "$as_dir" && as_dir=.
3510 for ac_exec_ext in '' $ac_executable_extensions; do
3511 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3512 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
3513 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3522 STRIP=$ac_cv_prog_STRIP
3523 if test -n "$STRIP"; then
3524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
3525 $as_echo "$STRIP" >&6; }
3527 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3528 $as_echo "no" >&6; }
3533 if test -z "$ac_cv_prog_STRIP"; then
3535 # Extract the first word of "strip", so it can be a program name with args.
3536 set dummy strip; ac_word=$2
3537 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3538 $as_echo_n "checking for $ac_word... " >&6; }
3539 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
3540 $as_echo_n "(cached) " >&6
3542 if test -n "$ac_ct_STRIP"; then
3543 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
3545 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3549 test -z "$as_dir" && as_dir=.
3550 for ac_exec_ext in '' $ac_executable_extensions; do
3551 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3552 ac_cv_prog_ac_ct_STRIP="strip"
3553 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3562 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
3563 if test -n "$ac_ct_STRIP"; then
3564 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
3565 $as_echo "$ac_ct_STRIP" >&6; }
3567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3568 $as_echo "no" >&6; }
3571 if test "x$ac_ct_STRIP" = x; then
3574 case $cross_compiling:$ac_tool_warned in
3576 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3577 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3578 ac_tool_warned=yes ;;
3583 STRIP="$ac_cv_prog_STRIP"
3587 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
3589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
3590 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
3591 if test -z "$MKDIR_P"; then
3592 if ${ac_cv_path_mkdir+:} false; then :
3593 $as_echo_n "(cached) " >&6
3595 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3596 for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin
3599 test -z "$as_dir" && as_dir=.
3600 for ac_prog in mkdir gmkdir; do
3601 for ac_exec_ext in '' $ac_executable_extensions; do
3602 { test -f "$as_dir/$ac_prog$ac_exec_ext" && $as_test_x "$as_dir/$ac_prog$ac_exec_ext"; } || continue
3603 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
3604 'mkdir (GNU coreutils) '* | \
3605 'mkdir (coreutils) '* | \
3606 'mkdir (fileutils) '4.1*)
3607 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext
3617 test -d ./--version && rmdir ./--version
3618 if test "${ac_cv_path_mkdir+set}" = set; then
3619 MKDIR_P="$ac_cv_path_mkdir -p"
3621 # As a last resort, use the slow shell script. Don't cache a
3622 # value for MKDIR_P within a source directory, because that will
3623 # break other packages using the cache if that directory is
3624 # removed, or if the value is a relative name.
3625 MKDIR_P="$ac_install_sh -d"
3628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
3629 $as_echo "$MKDIR_P" >&6; }
3634 [\\/$]* | ?:[\\/]*) ;;
3635 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;;
3638 for ac_prog in gawk mawk nawk awk
3640 # Extract the first word of "$ac_prog", so it can be a program name with args.
3641 set dummy $ac_prog; ac_word=$2
3642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3643 $as_echo_n "checking for $ac_word... " >&6; }
3644 if ${ac_cv_prog_AWK+:} false; then :
3645 $as_echo_n "(cached) " >&6
3647 if test -n "$AWK"; then
3648 ac_cv_prog_AWK="$AWK" # Let the user override the test.
3650 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3654 test -z "$as_dir" && as_dir=.
3655 for ac_exec_ext in '' $ac_executable_extensions; do
3656 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3657 ac_cv_prog_AWK="$ac_prog"
3658 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3668 if test -n "$AWK"; then
3669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
3670 $as_echo "$AWK" >&6; }
3672 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3673 $as_echo "no" >&6; }
3677 test -n "$AWK" && break
3680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
3681 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
3683 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
3684 if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then :
3685 $as_echo_n "(cached) " >&6
3687 cat >conftest.make <<\_ACEOF
3690 @echo '@@@%%%=$(MAKE)=@@@%%%'
3692 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
3693 case `${MAKE-make} -f conftest.make 2>/dev/null` in
3695 eval ac_cv_prog_make_${ac_make}_set=yes;;
3697 eval ac_cv_prog_make_${ac_make}_set=no;;
3701 if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then
3702 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3703 $as_echo "yes" >&6; }
3706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3707 $as_echo "no" >&6; }
3708 SET_MAKE="MAKE=${MAKE-make}"
3711 rm -rf .tst 2>/dev/null
3712 mkdir .tst 2>/dev/null
3713 if test -d .tst; then
3718 rmdir .tst 2>/dev/null
3720 if test "`cd $srcdir && pwd`" != "`pwd`"; then
3721 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
3722 # is not polluted with repeated "-I."
3723 am__isrc=' -I$(srcdir)'
3724 # test to see if srcdir already configured
3725 if test -f $srcdir/config.status; then
3726 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
3730 # test whether we have cygpath
3731 if test -z "$CYGPATH_W"; then
3732 if (cygpath --version) >/dev/null 2>/dev/null; then
3733 CYGPATH_W='cygpath -w'
3740 # Define the identity of the package.
3742 VERSION='2.6.1.169-7096'
3745 cat >>confdefs.h <<_ACEOF
3746 #define PACKAGE "$PACKAGE"
3750 cat >>confdefs.h <<_ACEOF
3751 #define VERSION "$VERSION"
3754 # Some tools Automake needs.
3756 ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
3759 AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"}
3762 AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
3765 AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
3768 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
3770 # We need awk for the "check" target. The system "awk" is bad on
3772 # Always define AMTAR for backward compatibility. Yes, it's still used
3773 # in the wild :-( We should find a proper way to deprecate it ...
3776 am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'
3782 # Check whether --enable-silent-rules was given.
3783 if test "${enable_silent_rules+set}" = set; then :
3784 enableval=$enable_silent_rules;
3787 case $enable_silent_rules in
3788 yes) AM_DEFAULT_VERBOSITY=0;;
3789 no) AM_DEFAULT_VERBOSITY=1;;
3790 *) AM_DEFAULT_VERBOSITY=0;;
3792 am_make=${MAKE-make}
3793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
3794 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
3795 if ${am_cv_make_support_nested_variables+:} false; then :
3796 $as_echo_n "(cached) " >&6
3798 if $as_echo 'TRUE=$(BAR$(V))
3804 .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then
3805 am_cv_make_support_nested_variables=yes
3807 am_cv_make_support_nested_variables=no
3810 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
3811 $as_echo "$am_cv_make_support_nested_variables" >&6; }
3812 if test $am_cv_make_support_nested_variables = yes; then
3814 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)'
3816 AM_V=$AM_DEFAULT_VERBOSITY
3817 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY
3822 ac_config_headers="$ac_config_headers config.h:config.hin"
3826 ac_cpp='$CPP $CPPFLAGS'
3827 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3828 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3829 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3830 if test -n "$ac_tool_prefix"; then
3831 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3832 set dummy ${ac_tool_prefix}gcc; ac_word=$2
3833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3834 $as_echo_n "checking for $ac_word... " >&6; }
3835 if ${ac_cv_prog_CC+:} false; then :
3836 $as_echo_n "(cached) " >&6
3838 if test -n "$CC"; then
3839 ac_cv_prog_CC="$CC" # Let the user override the test.
3841 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3845 test -z "$as_dir" && as_dir=.
3846 for ac_exec_ext in '' $ac_executable_extensions; do
3847 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3848 ac_cv_prog_CC="${ac_tool_prefix}gcc"
3849 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3859 if test -n "$CC"; then
3860 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3861 $as_echo "$CC" >&6; }
3863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3864 $as_echo "no" >&6; }
3869 if test -z "$ac_cv_prog_CC"; then
3871 # Extract the first word of "gcc", so it can be a program name with args.
3872 set dummy gcc; ac_word=$2
3873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3874 $as_echo_n "checking for $ac_word... " >&6; }
3875 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3876 $as_echo_n "(cached) " >&6
3878 if test -n "$ac_ct_CC"; then
3879 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3881 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3885 test -z "$as_dir" && as_dir=.
3886 for ac_exec_ext in '' $ac_executable_extensions; do
3887 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3888 ac_cv_prog_ac_ct_CC="gcc"
3889 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3898 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3899 if test -n "$ac_ct_CC"; then
3900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3901 $as_echo "$ac_ct_CC" >&6; }
3903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3904 $as_echo "no" >&6; }
3907 if test "x$ac_ct_CC" = x; then
3910 case $cross_compiling:$ac_tool_warned in
3912 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3913 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3914 ac_tool_warned=yes ;;
3922 if test -z "$CC"; then
3923 if test -n "$ac_tool_prefix"; then
3924 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3925 set dummy ${ac_tool_prefix}cc; ac_word=$2
3926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3927 $as_echo_n "checking for $ac_word... " >&6; }
3928 if ${ac_cv_prog_CC+:} false; then :
3929 $as_echo_n "(cached) " >&6
3931 if test -n "$CC"; then
3932 ac_cv_prog_CC="$CC" # Let the user override the test.
3934 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3938 test -z "$as_dir" && as_dir=.
3939 for ac_exec_ext in '' $ac_executable_extensions; do
3940 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3941 ac_cv_prog_CC="${ac_tool_prefix}cc"
3942 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3952 if test -n "$CC"; then
3953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3954 $as_echo "$CC" >&6; }
3956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3957 $as_echo "no" >&6; }
3963 if test -z "$CC"; then
3964 # Extract the first word of "cc", so it can be a program name with args.
3965 set dummy cc; ac_word=$2
3966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3967 $as_echo_n "checking for $ac_word... " >&6; }
3968 if ${ac_cv_prog_CC+:} false; then :
3969 $as_echo_n "(cached) " >&6
3971 if test -n "$CC"; then
3972 ac_cv_prog_CC="$CC" # Let the user override the test.
3975 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3979 test -z "$as_dir" && as_dir=.
3980 for ac_exec_ext in '' $ac_executable_extensions; do
3981 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
3982 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3983 ac_prog_rejected=yes
3987 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3994 if test $ac_prog_rejected = yes; then
3995 # We found a bogon in the path, so make sure we never use it.
3996 set dummy $ac_cv_prog_CC
3998 if test $# != 0; then
3999 # We chose a different compiler from the bogus one.
4000 # However, it has the same basename, so the bogon will be chosen
4001 # first if we set CC to just the basename; use the full file name.
4003 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
4009 if test -n "$CC"; then
4010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4011 $as_echo "$CC" >&6; }
4013 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4014 $as_echo "no" >&6; }
4019 if test -z "$CC"; then
4020 if test -n "$ac_tool_prefix"; then
4021 for ac_prog in cl.exe
4023 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4024 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
4025 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4026 $as_echo_n "checking for $ac_word... " >&6; }
4027 if ${ac_cv_prog_CC+:} false; then :
4028 $as_echo_n "(cached) " >&6
4030 if test -n "$CC"; then
4031 ac_cv_prog_CC="$CC" # Let the user override the test.
4033 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4037 test -z "$as_dir" && as_dir=.
4038 for ac_exec_ext in '' $ac_executable_extensions; do
4039 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4040 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
4041 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4051 if test -n "$CC"; then
4052 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4053 $as_echo "$CC" >&6; }
4055 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4056 $as_echo "no" >&6; }
4060 test -n "$CC" && break
4063 if test -z "$CC"; then
4065 for ac_prog in cl.exe
4067 # Extract the first word of "$ac_prog", so it can be a program name with args.
4068 set dummy $ac_prog; ac_word=$2
4069 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4070 $as_echo_n "checking for $ac_word... " >&6; }
4071 if ${ac_cv_prog_ac_ct_CC+:} false; then :
4072 $as_echo_n "(cached) " >&6
4074 if test -n "$ac_ct_CC"; then
4075 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
4077 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4081 test -z "$as_dir" && as_dir=.
4082 for ac_exec_ext in '' $ac_executable_extensions; do
4083 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
4084 ac_cv_prog_ac_ct_CC="$ac_prog"
4085 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4094 ac_ct_CC=$ac_cv_prog_ac_ct_CC
4095 if test -n "$ac_ct_CC"; then
4096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4097 $as_echo "$ac_ct_CC" >&6; }
4099 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4100 $as_echo "no" >&6; }
4104 test -n "$ac_ct_CC" && break
4107 if test "x$ac_ct_CC" = x; then
4110 case $cross_compiling:$ac_tool_warned in
4112 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4113 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4114 ac_tool_warned=yes ;;
4123 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4124 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4125 as_fn_error $? "no acceptable C compiler found in \$PATH
4126 See \`config.log' for more details" "$LINENO" 5; }
4128 # Provide some information about the compiler.
4129 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4132 for ac_option in --version -v -V -qversion; do
4133 { { ac_try="$ac_compiler $ac_option >&5"
4135 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4136 *) ac_try_echo=$ac_try;;
4138 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4139 $as_echo "$ac_try_echo"; } >&5
4140 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4142 if test -s conftest.err; then
4144 ... rest of stderr output deleted ...
4145 10q' conftest.err >conftest.er1
4146 cat conftest.er1 >&5
4148 rm -f conftest.er1 conftest.err
4149 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4150 test $ac_status = 0; }
4153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4154 /* end confdefs.h. */
4164 ac_clean_files_save=$ac_clean_files
4165 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4166 # Try to create an executable without -o first, disregard a.out.
4167 # It will help us diagnose broken compilers, and finding out an intuition
4169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4170 $as_echo_n "checking whether the C compiler works... " >&6; }
4171 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
4173 # The possible output files:
4174 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4177 for ac_file in $ac_files
4180 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4181 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4186 if { { ac_try="$ac_link_default"
4188 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4189 *) ac_try_echo=$ac_try;;
4191 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4192 $as_echo "$ac_try_echo"; } >&5
4193 (eval "$ac_link_default") 2>&5
4195 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4196 test $ac_status = 0; }; then :
4197 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4198 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4199 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4200 # so that the user can short-circuit this test for compilers unknown to
4202 for ac_file in $ac_files ''
4204 test -f "$ac_file" || continue
4206 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
4209 # We found the default executable, but exeext='' is most
4213 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
4215 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4217 # We set ac_cv_exeext here because the later test for it is not
4218 # safe: cross compilers may not add the suffix if given an `-o'
4219 # argument, so we may need to know it at that point already.
4220 # Even if this section looks crufty: it has the advantage of
4227 test "$ac_cv_exeext" = no && ac_cv_exeext=
4232 if test -z "$ac_file"; then :
4233 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4234 $as_echo "no" >&6; }
4235 $as_echo "$as_me: failed program was:" >&5
4236 sed 's/^/| /' conftest.$ac_ext >&5
4238 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4239 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4240 as_fn_error 77 "C compiler cannot create executables
4241 See \`config.log' for more details" "$LINENO" 5; }
4243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4244 $as_echo "yes" >&6; }
4246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4247 $as_echo_n "checking for C compiler default output file name... " >&6; }
4248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4249 $as_echo "$ac_file" >&6; }
4250 ac_exeext=$ac_cv_exeext
4252 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
4253 ac_clean_files=$ac_clean_files_save
4254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4255 $as_echo_n "checking for suffix of executables... " >&6; }
4256 if { { ac_try="$ac_link"
4258 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4259 *) ac_try_echo=$ac_try;;
4261 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4262 $as_echo "$ac_try_echo"; } >&5
4263 (eval "$ac_link") 2>&5
4265 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4266 test $ac_status = 0; }; then :
4267 # If both `conftest.exe' and `conftest' are `present' (well, observable)
4268 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
4269 # work properly (i.e., refer to `conftest.exe'), while it won't with
4271 for ac_file in conftest.exe conftest conftest.*; do
4272 test -f "$ac_file" || continue
4274 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4275 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
4281 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4282 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4283 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
4284 See \`config.log' for more details" "$LINENO" 5; }
4286 rm -f conftest conftest$ac_cv_exeext
4287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4288 $as_echo "$ac_cv_exeext" >&6; }
4290 rm -f conftest.$ac_ext
4291 EXEEXT=$ac_cv_exeext
4293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4294 /* end confdefs.h. */
4299 FILE *f = fopen ("conftest.out", "w");
4300 return ferror (f) || fclose (f) != 0;
4306 ac_clean_files="$ac_clean_files conftest.out"
4307 # Check that the compiler produces executables we can run. If not, either
4308 # the compiler is broken, or we cross compile.
4309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4310 $as_echo_n "checking whether we are cross compiling... " >&6; }
4311 if test "$cross_compiling" != yes; then
4312 { { ac_try="$ac_link"
4314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4315 *) ac_try_echo=$ac_try;;
4317 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4318 $as_echo "$ac_try_echo"; } >&5
4319 (eval "$ac_link") 2>&5
4321 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4322 test $ac_status = 0; }
4323 if { ac_try='./conftest$ac_cv_exeext'
4324 { { case "(($ac_try" in
4325 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4326 *) ac_try_echo=$ac_try;;
4328 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4329 $as_echo "$ac_try_echo"; } >&5
4330 (eval "$ac_try") 2>&5
4332 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4333 test $ac_status = 0; }; }; then
4336 if test "$cross_compiling" = maybe; then
4339 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4340 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4341 as_fn_error $? "cannot run C compiled programs.
4342 If you meant to cross compile, use \`--host'.
4343 See \`config.log' for more details" "$LINENO" 5; }
4347 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4348 $as_echo "$cross_compiling" >&6; }
4350 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
4351 ac_clean_files=$ac_clean_files_save
4352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4353 $as_echo_n "checking for suffix of object files... " >&6; }
4354 if ${ac_cv_objext+:} false; then :
4355 $as_echo_n "(cached) " >&6
4357 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4358 /* end confdefs.h. */
4368 rm -f conftest.o conftest.obj
4369 if { { ac_try="$ac_compile"
4371 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
4372 *) ac_try_echo=$ac_try;;
4374 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4375 $as_echo "$ac_try_echo"; } >&5
4376 (eval "$ac_compile") 2>&5
4378 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4379 test $ac_status = 0; }; then :
4380 for ac_file in conftest.o conftest.obj conftest.*; do
4381 test -f "$ac_file" || continue;
4383 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4384 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4389 $as_echo "$as_me: failed program was:" >&5
4390 sed 's/^/| /' conftest.$ac_ext >&5
4392 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4393 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4394 as_fn_error $? "cannot compute suffix of object files: cannot compile
4395 See \`config.log' for more details" "$LINENO" 5; }
4397 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4399 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4400 $as_echo "$ac_cv_objext" >&6; }
4401 OBJEXT=$ac_cv_objext
4403 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4404 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4405 if ${ac_cv_c_compiler_gnu+:} false; then :
4406 $as_echo_n "(cached) " >&6
4408 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4409 /* end confdefs.h. */
4422 if ac_fn_c_try_compile "$LINENO"; then :
4427 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4428 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4432 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4433 if test $ac_compiler_gnu = yes; then
4438 ac_test_CFLAGS=${CFLAGS+set}
4439 ac_save_CFLAGS=$CFLAGS
4440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4441 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4442 if ${ac_cv_prog_cc_g+:} false; then :
4443 $as_echo_n "(cached) " >&6
4445 ac_save_c_werror_flag=$ac_c_werror_flag
4446 ac_c_werror_flag=yes
4449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4450 /* end confdefs.h. */
4460 if ac_fn_c_try_compile "$LINENO"; then :
4464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4465 /* end confdefs.h. */
4475 if ac_fn_c_try_compile "$LINENO"; then :
4478 ac_c_werror_flag=$ac_save_c_werror_flag
4480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4481 /* end confdefs.h. */
4491 if ac_fn_c_try_compile "$LINENO"; then :
4494 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4496 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4498 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4499 ac_c_werror_flag=$ac_save_c_werror_flag
4501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4502 $as_echo "$ac_cv_prog_cc_g" >&6; }
4503 if test "$ac_test_CFLAGS" = set; then
4504 CFLAGS=$ac_save_CFLAGS
4505 elif test $ac_cv_prog_cc_g = yes; then
4506 if test "$GCC" = yes; then
4512 if test "$GCC" = yes; then
4518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4519 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4520 if ${ac_cv_prog_cc_c89+:} false; then :
4521 $as_echo_n "(cached) " >&6
4523 ac_cv_prog_cc_c89=no
4525 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4526 /* end confdefs.h. */
4529 #include <sys/types.h>
4530 #include <sys/stat.h>
4531 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4532 struct buf { int x; };
4533 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4534 static char *e (p, i)
4540 static char *f (char * (*g) (char **, int), char **p, ...)
4545 s = g (p, va_arg (v,int));
4550 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
4551 function prototypes and stuff, but not '\xHH' hex character constants.
4552 These don't provoke an error unfortunately, instead are silently treated
4553 as 'x'. The following induces an error, until -std is added to get
4554 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
4555 array size at least. It's necessary to write '\x00'==0 to get something
4556 that's true only with -std. */
4557 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
4559 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
4560 inside strings and character constants. */
4562 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
4564 int test (int i, double x);
4565 struct s1 {int (*f) (int a);};
4566 struct s2 {int (*f) (double a);};
4567 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4573 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
4578 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
4579 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4581 CC="$ac_save_CC $ac_arg"
4582 if ac_fn_c_try_compile "$LINENO"; then :
4583 ac_cv_prog_cc_c89=$ac_arg
4585 rm -f core conftest.err conftest.$ac_objext
4586 test "x$ac_cv_prog_cc_c89" != "xno" && break
4588 rm -f conftest.$ac_ext
4593 case "x$ac_cv_prog_cc_c89" in
4595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4596 $as_echo "none needed" >&6; } ;;
4598 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4599 $as_echo "unsupported" >&6; } ;;
4601 CC="$CC $ac_cv_prog_cc_c89"
4602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
4603 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
4605 if test "x$ac_cv_prog_cc_c89" != xno; then :
4610 ac_cpp='$CPP $CPPFLAGS'
4611 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4612 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4613 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4614 DEPDIR="${am__leading_dot}deps"
4616 ac_config_commands="$ac_config_commands depfiles"
4619 am_make=${MAKE-make}
4620 cat > confinc << 'END'
4622 @echo this is the am__doit target
4625 # If we don't find an include directive, just comment out the code.
4626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
4627 $as_echo_n "checking for style of include used by $am_make... " >&6; }
4631 # First try GNU make style include.
4632 echo "include confinc" > confmf
4633 # Ignore all kinds of additional output from `make'.
4634 case `$am_make -s -f confmf 2> /dev/null` in #(
4635 *the\ am__doit\ target*)
4641 # Now try BSD make style include.
4642 if test "$am__include" = "#"; then
4643 echo '.include "confinc"' > confmf
4644 case `$am_make -s -f confmf 2> /dev/null` in #(
4645 *the\ am__doit\ target*)
4646 am__include=.include
4654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
4655 $as_echo "$_am_result" >&6; }
4656 rm -f confinc confmf
4658 # Check whether --enable-dependency-tracking was given.
4659 if test "${enable_dependency_tracking+set}" = set; then :
4660 enableval=$enable_dependency_tracking;
4663 if test "x$enable_dependency_tracking" != xno; then
4664 am_depcomp="$ac_aux_dir/depcomp"
4668 if test "x$enable_dependency_tracking" != xno; then
4678 depcc="$CC" am_compiler_list=
4680 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
4681 $as_echo_n "checking dependency style of $depcc... " >&6; }
4682 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
4683 $as_echo_n "(cached) " >&6
4685 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
4686 # We make a subdir and do the tests there. Otherwise we can end up
4687 # making bogus files that we don't know about and never remove. For
4688 # instance it was reported that on HP-UX the gcc test will end up
4689 # making a dummy file named `D' -- because `-MD' means `put the output
4693 # Copy depcomp to subdir because otherwise we won't find it if we're
4694 # using a relative directory.
4695 cp "$am_depcomp" conftest.dir
4697 # We will build objects and dependencies in a subdirectory because
4698 # it helps to detect inapplicable dependency modes. For instance
4699 # both Tru64's cc and ICC support -MD to output dependencies as a
4700 # side effect of compilation, but ICC will put the dependencies in
4701 # the current directory while Tru64 will put them in the object
4705 am_cv_CC_dependencies_compiler_type=none
4706 if test "$am_compiler_list" = ""; then
4707 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
4710 case " $depcc " in #(
4711 *\ -arch\ *\ -arch\ *) am__universal=true ;;
4714 for depmode in $am_compiler_list; do
4715 # Setup a source with many dependencies, because some compilers
4716 # like to wrap large dependency lists on column 80 (with \), and
4717 # we should not choose a depcomp mode which is confused by this.
4719 # We need to recreate these files for each test, as the compiler may
4720 # overwrite some of them when testing with obscure command lines.
4721 # This happens at least with the AIX C compiler.
4723 for i in 1 2 3 4 5 6; do
4724 echo '#include "conftst'$i'.h"' >> sub/conftest.c
4725 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
4726 # Solaris 8's {/usr,}/bin/sh.
4727 touch sub/conftst$i.h
4729 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
4731 # We check with `-c' and `-o' for the sake of the "dashmstdout"
4732 # mode. It turns out that the SunPro C++ compiler does not properly
4733 # handle `-M -o', and we need to detect this. Also, some Intel
4734 # versions had trouble with output in subdirs
4735 am__obj=sub/conftest.${OBJEXT-o}
4736 am__minus_obj="-o $am__obj"
4739 # This depmode causes a compiler race in universal mode.
4740 test "$am__universal" = false || continue
4743 # after this tag, mechanisms are not by side-effect, so they'll
4744 # only be used when explicitly requested
4745 if test "x$enable_dependency_tracking" = xyes; then
4751 msvc7 | msvc7msys | msvisualcpp | msvcmsys)
4752 # This compiler won't grok `-c -o', but also, the minuso test has
4753 # not run yet. These depmodes are late enough in the game, and
4754 # so weak that their functioning should not be impacted.
4755 am__obj=conftest.${OBJEXT-o}
4760 if depmode=$depmode \
4761 source=sub/conftest.c object=$am__obj \
4762 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
4763 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
4764 >/dev/null 2>conftest.err &&
4765 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
4766 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
4767 grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
4768 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
4769 # icc doesn't choke on unknown options, it will just issue warnings
4770 # or remarks (even with -Werror). So we grep stderr for any message
4771 # that says an option was ignored or not supported.
4772 # When given -MP, icc 7.0 and 7.1 complain thusly:
4773 # icc: Command line warning: ignoring option '-M'; no argument required
4774 # The diagnosis changed in icc 8.0:
4775 # icc: Command line remark: option '-MP' not supported
4776 if (grep 'ignoring option' conftest.err ||
4777 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
4778 am_cv_CC_dependencies_compiler_type=$depmode
4787 am_cv_CC_dependencies_compiler_type=none
4791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
4792 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
4793 CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
4796 test "x$enable_dependency_tracking" != xno \
4797 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then
4799 am__fastdepCC_FALSE='#'
4801 am__fastdepCC_TRUE='#'
4802 am__fastdepCC_FALSE=
4806 case $ac_cv_prog_cc_stdc in #(
4808 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #(
4810 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5
4811 $as_echo_n "checking for $CC option to accept ISO C99... " >&6; }
4812 if ${ac_cv_prog_cc_c99+:} false; then :
4813 $as_echo_n "(cached) " >&6
4815 ac_cv_prog_cc_c99=no
4817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4818 /* end confdefs.h. */
4820 #include <stdbool.h>
4825 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4826 #define debug(...) fprintf (stderr, __VA_ARGS__)
4827 #define showlist(...) puts (#__VA_ARGS__)
4828 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4830 test_varargs_macros (void)
4835 debug ("X = %d\n", x);
4836 showlist (The first, second, and third items.);
4837 report (x>y, "x is %d but y is %d", x, y);
4840 // Check long long types.
4841 #define BIG64 18446744073709551615ull
4842 #define BIG32 4294967295ul
4843 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4845 your preprocessor is broken;
4849 your preprocessor is broken;
4851 static long long int bignum = -9223372036854775807LL;
4852 static unsigned long long int ubignum = BIG64;
4854 struct incomplete_array
4862 const wchar_t *name;
4866 typedef const char *ccp;
4869 test_restrict (ccp restrict text)
4871 // See if C++-style comments work.
4872 // Iterate through items via the restricted pointer.
4873 // Also check for declarations in for loops.
4874 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4879 // Check varargs and va_copy.
4881 test_varargs (const char *format, ...)
4884 va_start (args, format);
4886 va_copy (args_copy, args);
4897 str = va_arg (args_copy, const char *);
4900 number = va_arg (args_copy, int);
4903 fnumber = va_arg (args_copy, double);
4918 _Bool success = false;
4921 if (test_restrict ("String literal") == 0)
4923 char *restrict newvar = "Another string";
4926 test_varargs ("s, d' f .", "string", 65, 34.234);
4927 test_varargs_macros ();
4929 // Check flexible array members.
4930 struct incomplete_array *ia =
4931 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4933 for (int i = 0; i < ia->datasize; ++i)
4934 ia->data[i] = i * 1.234;
4936 // Check named initializers.
4937 struct named_init ni = {
4939 .name = L"Test wide string",
4940 .average = 543.34343,
4945 int dynamic_array[ni.number];
4946 dynamic_array[ni.number - 1] = 543;
4948 // work around unused variable warnings
4949 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4950 || dynamic_array[ni.number - 1] != 543);
4956 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -xc99=all -qlanglvl=extc99
4958 CC="$ac_save_CC $ac_arg"
4959 if ac_fn_c_try_compile "$LINENO"; then :
4960 ac_cv_prog_cc_c99=$ac_arg
4962 rm -f core conftest.err conftest.$ac_objext
4963 test "x$ac_cv_prog_cc_c99" != "xno" && break
4965 rm -f conftest.$ac_ext
4970 case "x$ac_cv_prog_cc_c99" 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_c99"
4979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
4980 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
4982 if test "x$ac_cv_prog_cc_c99" != xno; then :
4983 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
4985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
4986 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
4987 if ${ac_cv_prog_cc_c89+:} false; then :
4988 $as_echo_n "(cached) " >&6
4990 ac_cv_prog_cc_c89=no
4992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4993 /* end confdefs.h. */
4996 #include <sys/types.h>
4997 #include <sys/stat.h>
4998 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4999 struct buf { int x; };
5000 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5001 static char *e (p, i)
5007 static char *f (char * (*g) (char **, int), char **p, ...)
5012 s = g (p, va_arg (v,int));
5017 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5018 function prototypes and stuff, but not '\xHH' hex character constants.
5019 These don't provoke an error unfortunately, instead are silently treated
5020 as 'x'. The following induces an error, until -std is added to get
5021 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5022 array size at least. It's necessary to write '\x00'==0 to get something
5023 that's true only with -std. */
5024 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5026 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5027 inside strings and character constants. */
5029 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5031 int test (int i, double x);
5032 struct s1 {int (*f) (int a);};
5033 struct s2 {int (*f) (double a);};
5034 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5040 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5045 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5046 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5048 CC="$ac_save_CC $ac_arg"
5049 if ac_fn_c_try_compile "$LINENO"; then :
5050 ac_cv_prog_cc_c89=$ac_arg
5052 rm -f core conftest.err conftest.$ac_objext
5053 test "x$ac_cv_prog_cc_c89" != "xno" && break
5055 rm -f conftest.$ac_ext
5060 case "x$ac_cv_prog_cc_c89" in
5062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5063 $as_echo "none needed" >&6; } ;;
5065 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5066 $as_echo "unsupported" >&6; } ;;
5068 CC="$CC $ac_cv_prog_cc_c89"
5069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5070 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5072 if test "x$ac_cv_prog_cc_c89" != xno; then :
5073 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5075 ac_cv_prog_cc_stdc=no
5081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5
5082 $as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; }
5083 if ${ac_cv_prog_cc_stdc+:} false; then :
5084 $as_echo_n "(cached) " >&6
5087 case $ac_cv_prog_cc_stdc in #(
5089 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5090 $as_echo "unsupported" >&6; } ;; #(
5092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5093 $as_echo "none needed" >&6; } ;; #(
5095 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5
5096 $as_echo "$ac_cv_prog_cc_stdc" >&6; } ;;
5101 ac_cpp='$CPP $CPPFLAGS'
5102 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5103 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5104 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5106 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5107 # On Suns, sometimes $CPP names a directory.
5108 if test -n "$CPP" && test -d "$CPP"; then
5111 if test -z "$CPP"; then
5112 if ${ac_cv_prog_CPP+:} false; then :
5113 $as_echo_n "(cached) " >&6
5115 # Double quotes because CPP needs to be expanded
5116 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5119 for ac_c_preproc_warn_flag in '' yes
5121 # Use a header file that comes with gcc, so configuring glibc
5122 # with a fresh cross-compiler works.
5123 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5124 # <limits.h> exists even on freestanding compilers.
5125 # On the NeXT, cc -E runs the code through the compiler's parser,
5126 # not just through cpp. "Syntax error" is here to catch this case.
5127 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5128 /* end confdefs.h. */
5130 # include <limits.h>
5132 # include <assert.h>
5136 if ac_fn_c_try_cpp "$LINENO"; then :
5139 # Broken: fails on valid input.
5142 rm -f conftest.err conftest.i conftest.$ac_ext
5144 # OK, works on sane cases. Now check whether nonexistent headers
5145 # can be detected and how.
5146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5147 /* end confdefs.h. */
5148 #include <ac_nonexistent.h>
5150 if ac_fn_c_try_cpp "$LINENO"; then :
5151 # Broken: success on invalid input.
5154 # Passes both tests.
5158 rm -f conftest.err conftest.i conftest.$ac_ext
5161 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5162 rm -f conftest.i conftest.err conftest.$ac_ext
5163 if $ac_preproc_ok; then :
5175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5176 $as_echo "$CPP" >&6; }
5178 for ac_c_preproc_warn_flag in '' yes
5180 # Use a header file that comes with gcc, so configuring glibc
5181 # with a fresh cross-compiler works.
5182 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5183 # <limits.h> exists even on freestanding compilers.
5184 # On the NeXT, cc -E runs the code through the compiler's parser,
5185 # not just through cpp. "Syntax error" is here to catch this case.
5186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5187 /* end confdefs.h. */
5189 # include <limits.h>
5191 # include <assert.h>
5195 if ac_fn_c_try_cpp "$LINENO"; then :
5198 # Broken: fails on valid input.
5201 rm -f conftest.err conftest.i conftest.$ac_ext
5203 # OK, works on sane cases. Now check whether nonexistent headers
5204 # can be detected and how.
5205 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5206 /* end confdefs.h. */
5207 #include <ac_nonexistent.h>
5209 if ac_fn_c_try_cpp "$LINENO"; then :
5210 # Broken: success on invalid input.
5213 # Passes both tests.
5217 rm -f conftest.err conftest.i conftest.$ac_ext
5220 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5221 rm -f conftest.i conftest.err conftest.$ac_ext
5222 if $ac_preproc_ok; then :
5225 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5226 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5227 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
5228 See \`config.log' for more details" "$LINENO" 5; }
5232 ac_cpp='$CPP $CPPFLAGS'
5233 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5234 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5235 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5239 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5240 if ${ac_cv_path_GREP+:} false; then :
5241 $as_echo_n "(cached) " >&6
5243 if test -z "$GREP"; then
5244 ac_path_GREP_found=false
5245 # Loop through the user's path and test for each of PROGNAME-LIST
5246 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5247 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5250 test -z "$as_dir" && as_dir=.
5251 for ac_prog in grep ggrep; do
5252 for ac_exec_ext in '' $ac_executable_extensions; do
5253 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
5254 { test -f "$ac_path_GREP" && $as_test_x "$ac_path_GREP"; } || continue
5255 # Check for GNU ac_path_GREP and select it if it is found.
5256 # Check for GNU $ac_path_GREP
5257 case `"$ac_path_GREP" --version 2>&1` in
5259 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
5262 $as_echo_n 0123456789 >"conftest.in"
5265 cat "conftest.in" "conftest.in" >"conftest.tmp"
5266 mv "conftest.tmp" "conftest.in"
5267 cp "conftest.in" "conftest.nl"
5268 $as_echo 'GREP' >> "conftest.nl"
5269 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5270 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5271 as_fn_arith $ac_count + 1 && ac_count=$as_val
5272 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5273 # Best one so far, save it but keep looking for a better one
5274 ac_cv_path_GREP="$ac_path_GREP"
5275 ac_path_GREP_max=$ac_count
5277 # 10*(2^10) chars as input seems more than enough
5278 test $ac_count -gt 10 && break
5280 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5283 $ac_path_GREP_found && break 3
5288 if test -z "$ac_cv_path_GREP"; then
5289 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5292 ac_cv_path_GREP=$GREP
5296 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5297 $as_echo "$ac_cv_path_GREP" >&6; }
5298 GREP="$ac_cv_path_GREP"
5301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5302 $as_echo_n "checking for egrep... " >&6; }
5303 if ${ac_cv_path_EGREP+:} false; then :
5304 $as_echo_n "(cached) " >&6
5306 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
5307 then ac_cv_path_EGREP="$GREP -E"
5309 if test -z "$EGREP"; then
5310 ac_path_EGREP_found=false
5311 # Loop through the user's path and test for each of PROGNAME-LIST
5312 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5313 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
5316 test -z "$as_dir" && as_dir=.
5317 for ac_prog in egrep; do
5318 for ac_exec_ext in '' $ac_executable_extensions; do
5319 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
5320 { test -f "$ac_path_EGREP" && $as_test_x "$ac_path_EGREP"; } || continue
5321 # Check for GNU ac_path_EGREP and select it if it is found.
5322 # Check for GNU $ac_path_EGREP
5323 case `"$ac_path_EGREP" --version 2>&1` in
5325 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
5328 $as_echo_n 0123456789 >"conftest.in"
5331 cat "conftest.in" "conftest.in" >"conftest.tmp"
5332 mv "conftest.tmp" "conftest.in"
5333 cp "conftest.in" "conftest.nl"
5334 $as_echo 'EGREP' >> "conftest.nl"
5335 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
5336 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
5337 as_fn_arith $ac_count + 1 && ac_count=$as_val
5338 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5339 # Best one so far, save it but keep looking for a better one
5340 ac_cv_path_EGREP="$ac_path_EGREP"
5341 ac_path_EGREP_max=$ac_count
5343 # 10*(2^10) chars as input seems more than enough
5344 test $ac_count -gt 10 && break
5346 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
5349 $ac_path_EGREP_found && break 3
5354 if test -z "$ac_cv_path_EGREP"; then
5355 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5358 ac_cv_path_EGREP=$EGREP
5363 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5364 $as_echo "$ac_cv_path_EGREP" >&6; }
5365 EGREP="$ac_cv_path_EGREP"
5370 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
5371 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
5372 if ${gl_cv_c_amsterdam_compiler+:} false; then :
5373 $as_echo_n "(cached) " >&6
5376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5377 /* end confdefs.h. */
5384 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5385 $EGREP "Amsterdam" >/dev/null 2>&1; then :
5386 gl_cv_c_amsterdam_compiler=yes
5388 gl_cv_c_amsterdam_compiler=no
5394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
5395 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
5396 if test -z "$AR"; then
5397 if test $gl_cv_c_amsterdam_compiler = yes; then
5399 if test -z "$ARFLAGS"; then
5403 if test -n "$ac_tool_prefix"; then
5404 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5405 set dummy ${ac_tool_prefix}ar; ac_word=$2
5406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5407 $as_echo_n "checking for $ac_word... " >&6; }
5408 if ${ac_cv_prog_AR+:} false; then :
5409 $as_echo_n "(cached) " >&6
5411 if test -n "$AR"; then
5412 ac_cv_prog_AR="$AR" # Let the user override the test.
5414 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5418 test -z "$as_dir" && as_dir=.
5419 for ac_exec_ext in '' $ac_executable_extensions; do
5420 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5421 ac_cv_prog_AR="${ac_tool_prefix}ar"
5422 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5432 if test -n "$AR"; then
5433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
5434 $as_echo "$AR" >&6; }
5436 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5437 $as_echo "no" >&6; }
5442 if test -z "$ac_cv_prog_AR"; then
5444 # Extract the first word of "ar", so it can be a program name with args.
5445 set dummy ar; ac_word=$2
5446 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5447 $as_echo_n "checking for $ac_word... " >&6; }
5448 if ${ac_cv_prog_ac_ct_AR+:} false; then :
5449 $as_echo_n "(cached) " >&6
5451 if test -n "$ac_ct_AR"; then
5452 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5454 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5458 test -z "$as_dir" && as_dir=.
5459 for ac_exec_ext in '' $ac_executable_extensions; do
5460 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5461 ac_cv_prog_ac_ct_AR="ar"
5462 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5471 ac_ct_AR=$ac_cv_prog_ac_ct_AR
5472 if test -n "$ac_ct_AR"; then
5473 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
5474 $as_echo "$ac_ct_AR" >&6; }
5476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5477 $as_echo "no" >&6; }
5480 if test "x$ac_ct_AR" = x; then
5483 case $cross_compiling:$ac_tool_warned in
5485 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5486 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5487 ac_tool_warned=yes ;;
5495 if test -z "$ARFLAGS"; then
5500 if test -z "$ARFLAGS"; then
5506 if test -z "$RANLIB"; then
5507 if test $gl_cv_c_amsterdam_compiler = yes; then
5510 if test -n "$ac_tool_prefix"; then
5511 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5512 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5514 $as_echo_n "checking for $ac_word... " >&6; }
5515 if ${ac_cv_prog_RANLIB+:} false; then :
5516 $as_echo_n "(cached) " >&6
5518 if test -n "$RANLIB"; then
5519 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5521 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5525 test -z "$as_dir" && as_dir=.
5526 for ac_exec_ext in '' $ac_executable_extensions; do
5527 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5528 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5529 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5538 RANLIB=$ac_cv_prog_RANLIB
5539 if test -n "$RANLIB"; then
5540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
5541 $as_echo "$RANLIB" >&6; }
5543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5544 $as_echo "no" >&6; }
5549 if test -z "$ac_cv_prog_RANLIB"; then
5550 ac_ct_RANLIB=$RANLIB
5551 # Extract the first word of "ranlib", so it can be a program name with args.
5552 set dummy ranlib; ac_word=$2
5553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5554 $as_echo_n "checking for $ac_word... " >&6; }
5555 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
5556 $as_echo_n "(cached) " >&6
5558 if test -n "$ac_ct_RANLIB"; then
5559 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5561 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5565 test -z "$as_dir" && as_dir=.
5566 for ac_exec_ext in '' $ac_executable_extensions; do
5567 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
5568 ac_cv_prog_ac_ct_RANLIB="ranlib"
5569 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5578 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5579 if test -n "$ac_ct_RANLIB"; then
5580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
5581 $as_echo "$ac_ct_RANLIB" >&6; }
5583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5584 $as_echo "no" >&6; }
5587 if test "x$ac_ct_RANLIB" = x; then
5590 case $cross_compiling:$ac_tool_warned in
5592 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5593 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5594 ac_tool_warned=yes ;;
5596 RANLIB=$ac_ct_RANLIB
5599 RANLIB="$ac_cv_prog_RANLIB"
5606 # Make sure we can run config.sub.
5607 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
5608 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5611 $as_echo_n "checking build system type... " >&6; }
5612 if ${ac_cv_build+:} false; then :
5613 $as_echo_n "(cached) " >&6
5615 ac_build_alias=$build_alias
5616 test "x$ac_build_alias" = x &&
5617 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
5618 test "x$ac_build_alias" = x &&
5619 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
5620 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5621 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5624 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5625 $as_echo "$ac_cv_build" >&6; }
5626 case $ac_cv_build in
5628 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
5631 ac_save_IFS=$IFS; IFS='-'
5637 # Remember, the first character of IFS is used to create $*,
5638 # except with old shells:
5641 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
5644 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5645 $as_echo_n "checking host system type... " >&6; }
5646 if ${ac_cv_host+:} false; then :
5647 $as_echo_n "(cached) " >&6
5649 if test "x$host_alias" = x; then
5650 ac_cv_host=$ac_cv_build
5652 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5653 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5658 $as_echo "$ac_cv_host" >&6; }
5661 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
5664 ac_save_IFS=$IFS; IFS='-'
5670 # Remember, the first character of IFS is used to create $*,
5671 # except with old shells:
5674 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
5677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5678 $as_echo_n "checking for ANSI C header files... " >&6; }
5679 if ${ac_cv_header_stdc+:} false; then :
5680 $as_echo_n "(cached) " >&6
5682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5683 /* end confdefs.h. */
5697 if ac_fn_c_try_compile "$LINENO"; then :
5698 ac_cv_header_stdc=yes
5700 ac_cv_header_stdc=no
5702 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5704 if test $ac_cv_header_stdc = yes; then
5705 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5706 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5707 /* end confdefs.h. */
5711 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5712 $EGREP "memchr" >/dev/null 2>&1; then :
5715 ac_cv_header_stdc=no
5721 if test $ac_cv_header_stdc = yes; then
5722 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5724 /* end confdefs.h. */
5728 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5729 $EGREP "free" >/dev/null 2>&1; then :
5732 ac_cv_header_stdc=no
5738 if test $ac_cv_header_stdc = yes; then
5739 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5740 if test "$cross_compiling" = yes; then :
5743 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5744 /* end confdefs.h. */
5747 #if ((' ' & 0x0FF) == 0x020)
5748 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5749 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5751 # define ISLOWER(c) \
5752 (('a' <= (c) && (c) <= 'i') \
5753 || ('j' <= (c) && (c) <= 'r') \
5754 || ('s' <= (c) && (c) <= 'z'))
5755 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5758 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5763 for (i = 0; i < 256; i++)
5764 if (XOR (islower (i), ISLOWER (i))
5765 || toupper (i) != TOUPPER (i))
5770 if ac_fn_c_try_run "$LINENO"; then :
5773 ac_cv_header_stdc=no
5775 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
5776 conftest.$ac_objext conftest.beam conftest.$ac_ext
5781 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5782 $as_echo "$ac_cv_header_stdc" >&6; }
5783 if test $ac_cv_header_stdc = yes; then
5785 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5789 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5790 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5791 inttypes.h stdint.h unistd.h
5793 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5794 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5796 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
5797 cat >>confdefs.h <<_ACEOF
5798 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5809 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
5810 if test "x$ac_cv_header_minix_config_h" = xyes; then :
5817 if test "$MINIX" = yes; then
5819 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5822 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5825 $as_echo "#define _MINIX 1" >>confdefs.h
5832 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5839 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5840 if ${ac_cv_safe_to_define___extensions__+:} false; then :
5841 $as_echo_n "(cached) " >&6
5843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5844 /* end confdefs.h. */
5846 # define __EXTENSIONS__ 1
5847 $ac_includes_default
5856 if ac_fn_c_try_compile "$LINENO"; then :
5857 ac_cv_safe_to_define___extensions__=yes
5859 ac_cv_safe_to_define___extensions__=no
5861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5864 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5865 test $ac_cv_safe_to_define___extensions__ = yes &&
5866 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5868 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5870 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5872 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5874 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5876 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5885 # Check whether --enable-largefile was given.
5886 if test "${enable_largefile+set}" = set; then :
5887 enableval=$enable_largefile;
5890 if test "$enable_largefile" != no; then
5892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
5893 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
5894 if ${ac_cv_sys_largefile_CC+:} false; then :
5895 $as_echo_n "(cached) " >&6
5897 ac_cv_sys_largefile_CC=no
5898 if test "$GCC" != yes; then
5901 # IRIX 6.2 and later do not support large files by default,
5902 # so use the C compiler's -n32 option if that helps.
5903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5904 /* end confdefs.h. */
5905 #include <sys/types.h>
5906 /* Check that off_t can represent 2**63 - 1 correctly.
5907 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5908 since some C++ compilers masquerading as C compilers
5909 incorrectly reject 9223372036854775807. */
5910 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5911 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5912 && LARGE_OFF_T % 2147483647 == 1)
5922 if ac_fn_c_try_compile "$LINENO"; then :
5925 rm -f core conftest.err conftest.$ac_objext
5927 if ac_fn_c_try_compile "$LINENO"; then :
5928 ac_cv_sys_largefile_CC=' -n32'; break
5930 rm -f core conftest.err conftest.$ac_objext
5934 rm -f conftest.$ac_ext
5937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
5938 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
5939 if test "$ac_cv_sys_largefile_CC" != no; then
5940 CC=$CC$ac_cv_sys_largefile_CC
5943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
5944 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
5945 if ${ac_cv_sys_file_offset_bits+:} false; then :
5946 $as_echo_n "(cached) " >&6
5949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5950 /* end confdefs.h. */
5951 #include <sys/types.h>
5952 /* Check that off_t can represent 2**63 - 1 correctly.
5953 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5954 since some C++ compilers masquerading as C compilers
5955 incorrectly reject 9223372036854775807. */
5956 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5957 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5958 && LARGE_OFF_T % 2147483647 == 1)
5968 if ac_fn_c_try_compile "$LINENO"; then :
5969 ac_cv_sys_file_offset_bits=no; break
5971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5972 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5973 /* end confdefs.h. */
5974 #define _FILE_OFFSET_BITS 64
5975 #include <sys/types.h>
5976 /* Check that off_t can represent 2**63 - 1 correctly.
5977 We can't simply define LARGE_OFF_T to be 9223372036854775807,
5978 since some C++ compilers masquerading as C compilers
5979 incorrectly reject 9223372036854775807. */
5980 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
5981 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
5982 && LARGE_OFF_T % 2147483647 == 1)
5992 if ac_fn_c_try_compile "$LINENO"; then :
5993 ac_cv_sys_file_offset_bits=64; break
5995 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5996 ac_cv_sys_file_offset_bits=unknown
6000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6001 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6002 case $ac_cv_sys_file_offset_bits in #(
6005 cat >>confdefs.h <<_ACEOF
6006 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6011 if test $ac_cv_sys_file_offset_bits = unknown; then
6012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6013 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6014 if ${ac_cv_sys_large_files+:} false; then :
6015 $as_echo_n "(cached) " >&6
6018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6019 /* end confdefs.h. */
6020 #include <sys/types.h>
6021 /* Check that off_t can represent 2**63 - 1 correctly.
6022 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6023 since some C++ compilers masquerading as C compilers
6024 incorrectly reject 9223372036854775807. */
6025 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6026 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6027 && LARGE_OFF_T % 2147483647 == 1)
6037 if ac_fn_c_try_compile "$LINENO"; then :
6038 ac_cv_sys_large_files=no; break
6040 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6042 /* end confdefs.h. */
6043 #define _LARGE_FILES 1
6044 #include <sys/types.h>
6045 /* Check that off_t can represent 2**63 - 1 correctly.
6046 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6047 since some C++ compilers masquerading as C compilers
6048 incorrectly reject 9223372036854775807. */
6049 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
6050 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6051 && LARGE_OFF_T % 2147483647 == 1)
6061 if ac_fn_c_try_compile "$LINENO"; then :
6062 ac_cv_sys_large_files=1; break
6064 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6065 ac_cv_sys_large_files=unknown
6069 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6070 $as_echo "$ac_cv_sys_large_files" >&6; }
6071 case $ac_cv_sys_large_files in #(
6074 cat >>confdefs.h <<_ACEOF
6075 #define _LARGE_FILES $ac_cv_sys_large_files
6087 # Code from module alloca-opt:
6088 # Code from module argmatch:
6089 # Code from module backupfile:
6090 # Code from module bitrotate:
6091 # Code from module c-ctype:
6092 # Code from module c-strcase:
6093 # Code from module c-strcaseeq:
6094 # Code from module canonicalize-lgpl:
6095 # Code from module chdir:
6096 # Code from module clock-time:
6097 # Code from module close:
6098 # Code from module closedir:
6099 # Code from module configmake:
6100 # Code from module d-ino:
6101 # Code from module diffseq:
6102 # Code from module dirent:
6103 # Code from module dirent-safer:
6104 # Code from module dirfd:
6105 # Code from module dirname:
6106 # Code from module dirname-lgpl:
6107 # Code from module dosname:
6108 # Code from module double-slash-root:
6109 # Code from module dup2:
6110 # Code from module environ:
6111 # Code from module errno:
6112 # Code from module error:
6113 # Code from module exitfail:
6114 # Code from module extensions:
6116 # Code from module fcntl:
6117 # Code from module fcntl-h:
6118 # Code from module fd-hook:
6119 # Code from module filename:
6120 # Code from module float:
6121 # Code from module fstat:
6122 # Code from module full-write:
6123 # Code from module getdate:
6124 # Code from module getdtablesize:
6125 # Code from module getopt-gnu:
6126 # Code from module getopt-posix:
6127 # Code from module gettext-h:
6128 # Code from module gettime:
6129 # Code from module gettimeofday:
6130 # Code from module git-version-gen:
6131 # Code from module gitlog-to-changelog:
6132 # Code from module gnumakefile:
6133 # Code from module hash:
6134 # Code from module ignore-value:
6135 # Code from module include_next:
6136 # Code from module inline:
6137 # Code from module intprops:
6138 # Code from module largefile:
6140 # Code from module lchmod:
6141 # Code from module linked-list:
6142 # Code from module list:
6143 # Code from module localcharset:
6144 # Code from module lstat:
6145 # Code from module maintainer-makefile:
6146 # Code from module malloc:
6147 # Code from module malloc-gnu:
6148 # Code from module malloc-posix:
6149 # Code from module malloca:
6150 # Code from module manywarnings:
6151 # Code from module mbrtowc:
6152 # Code from module mbsinit:
6153 # Code from module memchr:
6154 # Code from module minmax:
6155 # Code from module mkdir:
6156 # Code from module mktime:
6157 # Code from module msvc-inval:
6158 # Code from module msvc-nothrow:
6159 # Code from module multiarch:
6160 # Code from module nocrash:
6161 # Code from module opendir:
6162 # Code from module parse-datetime:
6163 # Code from module pathmax:
6164 # Code from module progname:
6165 # Code from module quote:
6166 # Code from module quotearg:
6167 # Code from module quotearg-simple:
6168 # Code from module raise:
6169 # Code from module readdir:
6170 # Code from module readlink:
6171 # Code from module realloc:
6172 # Code from module realloc-gnu:
6173 # Code from module realloc-posix:
6174 # Code from module rename:
6175 # Code from module rmdir:
6176 # Code from module safe-write:
6177 # Code from module same-inode:
6178 # Code from module setenv:
6179 # Code from module signal:
6180 # Code from module signal-h:
6181 # Code from module size_max:
6182 # Code from module snippet/_Noreturn:
6183 # Code from module snippet/arg-nonnull:
6184 # Code from module snippet/c++defs:
6185 # Code from module snippet/warn-on-use:
6186 # Code from module ssize_t:
6187 # Code from module stat:
6188 # Code from module stat-time:
6189 # Code from module stdarg:
6193 # Code from module stdbool:
6194 # Code from module stddef:
6195 # Code from module stdint:
6196 # Code from module stdio:
6197 # Code from module stdlib:
6198 # Code from module streq:
6199 # Code from module strerror:
6200 # Code from module strerror-override:
6201 # Code from module string:
6202 # Code from module strndup:
6203 # Code from module strnlen:
6204 # Code from module symlink:
6205 # Code from module sys_stat:
6206 # Code from module sys_time:
6207 # Code from module tempname:
6208 # Code from module time:
6209 # Code from module time_r:
6210 # Code from module timespec:
6211 # Code from module unistd:
6212 # Code from module unistd-safer:
6213 # Code from module unlink:
6214 # Code from module unsetenv:
6215 # Code from module update-copyright:
6216 # Code from module useless-if-before-free:
6217 # Code from module utimens:
6218 # Code from module vasnprintf:
6219 # Code from module vasprintf:
6220 # Code from module vc-list-files:
6221 # Code from module verify:
6222 # Code from module verror:
6223 # Code from module warnings:
6224 # Code from module wchar:
6225 # Code from module wctype-h:
6226 # Code from module write:
6227 # Code from module xalloc:
6228 # Code from module xalloc-die:
6229 # Code from module xalloc-oversized:
6230 # Code from module xlist:
6231 # Code from module xsize:
6232 # Code from module xstrndup:
6233 # Code from module xvasprintf:
6236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
6237 $as_echo_n "checking for ANSI C header files... " >&6; }
6238 if ${ac_cv_header_stdc+:} false; then :
6239 $as_echo_n "(cached) " >&6
6241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6242 /* end confdefs.h. */
6256 if ac_fn_c_try_compile "$LINENO"; then :
6257 ac_cv_header_stdc=yes
6259 ac_cv_header_stdc=no
6261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6263 if test $ac_cv_header_stdc = yes; then
6264 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
6265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6266 /* end confdefs.h. */
6270 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6271 $EGREP "memchr" >/dev/null 2>&1; then :
6274 ac_cv_header_stdc=no
6280 if test $ac_cv_header_stdc = yes; then
6281 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
6282 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6283 /* end confdefs.h. */
6287 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6288 $EGREP "free" >/dev/null 2>&1; then :
6291 ac_cv_header_stdc=no
6297 if test $ac_cv_header_stdc = yes; then
6298 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
6299 if test "$cross_compiling" = yes; then :
6302 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6303 /* end confdefs.h. */
6306 #if ((' ' & 0x0FF) == 0x020)
6307 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
6308 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
6310 # define ISLOWER(c) \
6311 (('a' <= (c) && (c) <= 'i') \
6312 || ('j' <= (c) && (c) <= 'r') \
6313 || ('s' <= (c) && (c) <= 'z'))
6314 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
6317 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
6322 for (i = 0; i < 256; i++)
6323 if (XOR (islower (i), ISLOWER (i))
6324 || toupper (i) != TOUPPER (i))
6329 if ac_fn_c_try_run "$LINENO"; then :
6332 ac_cv_header_stdc=no
6334 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6335 conftest.$ac_objext conftest.beam conftest.$ac_ext
6340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
6341 $as_echo "$ac_cv_header_stdc" >&6; }
6342 if test $ac_cv_header_stdc = yes; then
6344 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
6353 LIBC_FATAL_STDERR_=1
6354 export LIBC_FATAL_STDERR_
6356 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6357 if test "x$ac_cv_type_size_t" = xyes; then :
6361 cat >>confdefs.h <<_ACEOF
6362 #define size_t unsigned int
6367 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6368 # for constant arguments. Useless!
6369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6370 $as_echo_n "checking for working alloca.h... " >&6; }
6371 if ${ac_cv_working_alloca_h+:} false; then :
6372 $as_echo_n "(cached) " >&6
6374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6375 /* end confdefs.h. */
6380 char *p = (char *) alloca (2 * sizeof (int));
6386 if ac_fn_c_try_link "$LINENO"; then :
6387 ac_cv_working_alloca_h=yes
6389 ac_cv_working_alloca_h=no
6391 rm -f core conftest.err conftest.$ac_objext \
6392 conftest$ac_exeext conftest.$ac_ext
6394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6395 $as_echo "$ac_cv_working_alloca_h" >&6; }
6396 if test $ac_cv_working_alloca_h = yes; then
6398 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6403 $as_echo_n "checking for alloca... " >&6; }
6404 if ${ac_cv_func_alloca_works+:} false; then :
6405 $as_echo_n "(cached) " >&6
6407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6408 /* end confdefs.h. */
6410 # define alloca __builtin_alloca
6413 # include <malloc.h>
6414 # define alloca _alloca
6416 # ifdef HAVE_ALLOCA_H
6417 # include <alloca.h>
6422 # ifndef alloca /* predefined by HP cc +Olibcalls */
6423 void *alloca (size_t);
6433 char *p = (char *) alloca (1);
6439 if ac_fn_c_try_link "$LINENO"; then :
6440 ac_cv_func_alloca_works=yes
6442 ac_cv_func_alloca_works=no
6444 rm -f core conftest.err conftest.$ac_objext \
6445 conftest$ac_exeext conftest.$ac_ext
6447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
6448 $as_echo "$ac_cv_func_alloca_works" >&6; }
6450 if test $ac_cv_func_alloca_works = yes; then
6452 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
6455 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
6456 # that cause trouble. Some versions do not even contain alloca or
6457 # contain a buggy version. If you still want to use their alloca,
6458 # use ar to extract alloca.o from them instead of compiling alloca.c.
6464 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
6466 $as_echo "#define C_ALLOCA 1" >>confdefs.h
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether 'alloca.c' needs Cray hooks" >&5
6470 $as_echo_n "checking whether 'alloca.c' needs Cray hooks... " >&6; }
6471 if ${ac_cv_os_cray+:} false; then :
6472 $as_echo_n "(cached) " >&6
6474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6475 /* end confdefs.h. */
6476 #if defined CRAY && ! defined CRAY2
6483 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6484 $EGREP "webecray" >/dev/null 2>&1; then :
6492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
6493 $as_echo "$ac_cv_os_cray" >&6; }
6494 if test $ac_cv_os_cray = yes; then
6495 for ac_func in _getb67 GETB67 getb67; do
6496 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6497 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6498 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6500 cat >>confdefs.h <<_ACEOF
6501 #define CRAY_STACKSEG_END $ac_func
6510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
6511 $as_echo_n "checking stack direction for C alloca... " >&6; }
6512 if ${ac_cv_c_stack_direction+:} false; then :
6513 $as_echo_n "(cached) " >&6
6515 if test "$cross_compiling" = yes; then :
6516 ac_cv_c_stack_direction=0
6518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6519 /* end confdefs.h. */
6520 $ac_includes_default
6522 find_stack_direction (int *addr, int depth)
6527 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
6528 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
6533 main (int argc, char **argv)
6535 return find_stack_direction (0, argc + !argv + 20) < 0;
6538 if ac_fn_c_try_run "$LINENO"; then :
6539 ac_cv_c_stack_direction=1
6541 ac_cv_c_stack_direction=-1
6543 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6544 conftest.$ac_objext conftest.beam conftest.$ac_ext
6548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
6549 $as_echo "$ac_cv_c_stack_direction" >&6; }
6550 cat >>confdefs.h <<_ACEOF
6551 #define STACK_DIRECTION $ac_cv_c_stack_direction
6557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
6558 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
6559 if ${gl_cv_struct_dirent_d_ino+:} false; then :
6560 $as_echo_n "(cached) " >&6
6562 if test "$cross_compiling" = yes; then :
6563 gl_cv_struct_dirent_d_ino=no
6565 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6566 /* end confdefs.h. */
6567 #include <sys/types.h>
6568 #include <sys/stat.h>
6574 DIR *dp = opendir (".");
6582 if (stat (e->d_name, &st) != 0)
6584 if (e->d_ino != st.st_ino)
6592 if ac_fn_c_try_run "$LINENO"; then :
6593 gl_cv_struct_dirent_d_ino=yes
6595 gl_cv_struct_dirent_d_ino=no
6597 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
6598 conftest.$ac_objext conftest.beam conftest.$ac_ext
6602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
6603 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
6604 if test $gl_cv_struct_dirent_d_ino = yes; then
6606 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
6611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long file names" >&5
6612 $as_echo_n "checking for long file names... " >&6; }
6613 if ${ac_cv_sys_long_file_names+:} false; then :
6614 $as_echo_n "(cached) " >&6
6616 ac_cv_sys_long_file_names=yes
6617 # Test for long file names in all the places we know might matter:
6618 # . the current directory, where building will happen
6619 # $prefix/lib where we will be installing things
6620 # $exec_prefix/lib likewise
6621 # $TMPDIR if set, where it might want to write temporary files
6622 # /tmp where it might want to write temporary files
6625 for ac_dir in . "$TMPDIR" /tmp /var/tmp /usr/tmp "$prefix/lib" "$exec_prefix/lib"; do
6626 # Skip $TMPDIR if it is empty or bogus, and skip $exec_prefix/lib
6627 # in the usual case where exec_prefix is '${prefix}'.
6629 . | /* | ?:[\\/]*) ;; #(
6632 test -w "$ac_dir/." || continue # It is less confusing to not echo anything here.
6633 ac_xdir=$ac_dir/cf$$
6634 (umask 077 && mkdir "$ac_xdir" 2>/dev/null) || continue
6635 ac_tf1=$ac_xdir/conftest9012345
6636 ac_tf2=$ac_xdir/conftest9012346
6637 touch "$ac_tf1" 2>/dev/null && test -f "$ac_tf1" && test ! -f "$ac_tf2" ||
6638 ac_cv_sys_long_file_names=no
6639 rm -f -r "$ac_xdir" 2>/dev/null
6640 test $ac_cv_sys_long_file_names = no && break
6643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_long_file_names" >&5
6644 $as_echo "$ac_cv_sys_long_file_names" >&6; }
6645 if test $ac_cv_sys_long_file_names = yes; then
6647 $as_echo "#define HAVE_LONG_FILE_NAMES 1" >>confdefs.h
6654 for ac_func in $ac_func_list
6656 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6657 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6658 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6659 cat >>confdefs.h <<_ACEOF
6660 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
6669 $as_echo_n "checking for inline... " >&6; }
6670 if ${ac_cv_c_inline+:} false; then :
6671 $as_echo_n "(cached) " >&6
6674 for ac_kw in inline __inline__ __inline; do
6675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6676 /* end confdefs.h. */
6679 static $ac_kw foo_t static_foo () {return 0; }
6680 $ac_kw foo_t foo () {return 0; }
6684 if ac_fn_c_try_compile "$LINENO"; then :
6685 ac_cv_c_inline=$ac_kw
6687 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6688 test "$ac_cv_c_inline" != no && break
6692 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
6693 $as_echo "$ac_cv_c_inline" >&6; }
6695 case $ac_cv_c_inline in
6698 case $ac_cv_c_inline in
6700 *) ac_val=$ac_cv_c_inline;;
6702 cat >>confdefs.h <<_ACEOF
6704 #define inline $ac_val
6713 GNULIB_CALLOC_POSIX=0;
6714 GNULIB_CANONICALIZE_FILE_NAME=0;
6715 GNULIB_GETLOADAVG=0;
6718 GNULIB_MALLOC_POSIX=0;
6725 GNULIB_POSIX_OPENPT=0;
6731 GNULIB_REALLOC_POSIX=0;
6738 GNULIB_SYSTEM_POSIX=0;
6744 HAVE_CANONICALIZE_FILE_NAME=1;
6745 HAVE_DECL_GETLOADAVG=1;
6753 HAVE_POSIX_OPENPT=1;
6766 HAVE_STRUCT_RANDOM_DATA=1;
6767 HAVE_SYS_LOADAVG_H=0;
6769 HAVE_DECL_UNSETENV=1;
6771 REPLACE_CANONICALIZE_FILE_NAME=0;
6775 REPLACE_PTSNAME_R=0;
6793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
6794 $as_echo_n "checking whether // is distinct from /... " >&6; }
6795 if ${gl_cv_double_slash_root+:} false; then :
6796 $as_echo_n "(cached) " >&6
6798 if test x"$cross_compiling" = xyes ; then
6799 # When cross-compiling, there is no way to tell whether // is special
6800 # short of a list of hosts. However, the only known hosts to date
6801 # that have a distinct // are Apollo DomainOS (too old to port to),
6802 # Cygwin, and z/OS. If anyone knows of another system for which // has
6803 # special semantics and is distinct from /, please report it to
6804 # <bug-gnulib@gnu.org>.
6806 *-cygwin | i370-ibm-openedition)
6807 gl_cv_double_slash_root=yes ;;
6809 # Be optimistic and assume that / and // are the same when we
6811 gl_cv_double_slash_root='unknown, assuming no' ;;
6814 set x `ls -di / // 2>/dev/null`
6815 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
6816 gl_cv_double_slash_root=no
6818 gl_cv_double_slash_root=yes
6822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
6823 $as_echo "$gl_cv_double_slash_root" >&6; }
6824 if test "$gl_cv_double_slash_root" = yes; then
6826 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
6834 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
6835 $as_echo_n "checking whether realpath works... " >&6; }
6836 if ${gl_cv_func_realpath_works+:} false; then :
6837 $as_echo_n "(cached) " >&6
6842 if test "$cross_compiling" = yes; then :
6843 gl_cv_func_realpath_works="guessing no"
6845 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6846 /* end confdefs.h. */
6851 #if defined __MACH__ && defined __APPLE__
6852 /* Avoid a crash on MacOS X. */
6853 #include <mach/mach.h>
6854 #include <mach/mach_error.h>
6855 #include <mach/thread_status.h>
6856 #include <mach/exception.h>
6857 #include <mach/task.h>
6858 #include <pthread.h>
6859 /* The exception port on which our thread listens. */
6860 static mach_port_t our_exception_port;
6861 /* The main function of the thread listening for exceptions of type
6864 mach_exception_thread (void *arg)
6866 /* Buffer for a message to be received. */
6868 mach_msg_header_t head;
6869 mach_msg_body_t msgh_body;
6872 mach_msg_return_t retval;
6873 /* Wait for a message on the exception port. */
6874 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
6875 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
6876 if (retval != MACH_MSG_SUCCESS)
6883 mach_port_t self = mach_task_self ();
6884 /* Allocate a port on which the thread shall listen for exceptions. */
6885 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
6887 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
6888 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
6889 MACH_MSG_TYPE_MAKE_SEND)
6891 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
6893 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
6894 /* Create the thread listening on the exception port. */
6895 pthread_attr_t attr;
6897 if (pthread_attr_init (&attr) == 0
6898 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
6899 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
6900 pthread_attr_destroy (&attr);
6901 /* Replace the exception port info for these exceptions with our own.
6902 Note that we replace the exception port for the entire task, not only
6903 for a particular thread. This has the effect that when our exception
6904 port gets the message, the thread specific exception port has already
6905 been asked, and we don't need to bother about it.
6906 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
6907 task_set_exception_ports (self, mask, our_exception_port,
6908 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
6913 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
6914 /* Avoid a crash on native Windows. */
6915 #define WIN32_LEAN_AND_MEAN
6916 #include <windows.h>
6917 #include <winerror.h>
6919 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
6921 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
6923 case EXCEPTION_ACCESS_VIOLATION:
6924 case EXCEPTION_IN_PAGE_ERROR:
6925 case EXCEPTION_STACK_OVERFLOW:
6926 case EXCEPTION_GUARD_PAGE:
6927 case EXCEPTION_PRIV_INSTRUCTION:
6928 case EXCEPTION_ILLEGAL_INSTRUCTION:
6929 case EXCEPTION_DATATYPE_MISALIGNMENT:
6930 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
6931 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
6934 return EXCEPTION_CONTINUE_SEARCH;
6939 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
6942 /* Avoid a crash on POSIX systems. */
6944 /* A POSIX signal handler. */
6946 exception_handler (int sig)
6954 signal (SIGSEGV, exception_handler);
6957 signal (SIGBUS, exception_handler);
6971 char *name = realpath ("conftest.a", NULL);
6972 if (!(name && *name == '/'))
6976 char *name = realpath ("conftest.b/../conftest.a", NULL);
6981 char *name = realpath ("conftest.a/", NULL);
6986 char *name1 = realpath (".", NULL);
6987 char *name2 = realpath ("conftest.d//./..", NULL);
6988 if (strcmp (name1, name2) != 0)
6998 if ac_fn_c_try_run "$LINENO"; then :
6999 gl_cv_func_realpath_works=yes
7001 gl_cv_func_realpath_works=no
7003 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7004 conftest.$ac_objext conftest.beam conftest.$ac_ext
7007 rm -rf conftest.a conftest.d
7010 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
7011 $as_echo "$gl_cv_func_realpath_works" >&6; }
7012 if test "$gl_cv_func_realpath_works" = yes; then
7014 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
7021 for ac_header in $ac_header_list
7023 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
7024 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
7026 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
7027 cat >>confdefs.h <<_ACEOF
7028 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
7052 GNULIB_EUIDACCESS=0;
7060 GNULIB_GETDOMAINNAME=0;
7061 GNULIB_GETDTABLESIZE=0;
7063 GNULIB_GETHOSTNAME=0;
7065 GNULIB_GETLOGIN_R=0;
7066 GNULIB_GETPAGESIZE=0;
7067 GNULIB_GETUSERSHELL=0;
7068 GNULIB_GROUP_MEMBER=0;
7080 GNULIB_READLINKAT=0;
7082 GNULIB_SETHOSTNAME=0;
7087 GNULIB_UNISTD_H_NONBLOCKING=0;
7088 GNULIB_UNISTD_H_SIGPIPE=0;
7103 HAVE_GETDTABLESIZE=1;
7108 HAVE_GROUP_MEMBER=1;
7124 HAVE_DECL_ENVIRON=1;
7126 HAVE_DECL_FDATASYNC=1;
7127 HAVE_DECL_GETDOMAINNAME=1;
7128 HAVE_DECL_GETLOGIN_R=1;
7129 HAVE_DECL_GETPAGESIZE=1;
7130 HAVE_DECL_GETUSERSHELL=1;
7131 HAVE_DECL_SETHOSTNAME=1;
7132 HAVE_DECL_TTYNAME_R=1;
7141 REPLACE_GETDOMAINNAME=0;
7142 REPLACE_GETLOGIN_R=0;
7143 REPLACE_GETGROUPS=0;
7144 REPLACE_GETPAGESIZE=0;
7157 REPLACE_TTYNAME_R=0;
7162 UNISTD_H_HAVE_WINSOCK2_H=0;
7163 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0;
7170 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
7171 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
7173 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
7176 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
7196 HAVE_DECL_FDOPENDIR=1;
7203 REPLACE_FDOPENDIR=0;
7207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7208 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
7209 if ${gl_cv_have_include_next+:} false; then :
7210 $as_echo_n "(cached) " >&6
7212 rm -rf conftestd1a conftestd1b conftestd2
7213 mkdir conftestd1a conftestd1b conftestd2
7214 cat <<EOF > conftestd1a/conftest.h
7215 #define DEFINED_IN_CONFTESTD1
7216 #include_next <conftest.h>
7217 #ifdef DEFINED_IN_CONFTESTD2
7220 #error "include_next doesn't work"
7223 cat <<EOF > conftestd1b/conftest.h
7224 #define DEFINED_IN_CONFTESTD1
7226 #include_next <conftest.h>
7227 #ifdef DEFINED_IN_CONFTESTD2
7230 #error "include_next doesn't work"
7233 cat <<EOF > conftestd2/conftest.h
7234 #ifndef DEFINED_IN_CONFTESTD1
7235 #error "include_next test doesn't work"
7237 #define DEFINED_IN_CONFTESTD2
7239 gl_save_CPPFLAGS="$CPPFLAGS"
7240 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7241 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7242 /* end confdefs.h. */
7243 #include <conftest.h>
7245 if ac_fn_c_try_compile "$LINENO"; then :
7246 gl_cv_have_include_next=yes
7248 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7249 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7250 /* end confdefs.h. */
7251 #include <conftest.h>
7253 if ac_fn_c_try_compile "$LINENO"; then :
7254 gl_cv_have_include_next=buggy
7256 gl_cv_have_include_next=no
7258 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7261 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7262 CPPFLAGS="$gl_save_CPPFLAGS"
7263 rm -rf conftestd1a conftestd1b conftestd2
7266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7267 $as_echo "$gl_cv_have_include_next" >&6; }
7268 PRAGMA_SYSTEM_HEADER=
7269 if test $gl_cv_have_include_next = yes; then
7270 INCLUDE_NEXT=include_next
7271 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7272 if test -n "$GCC"; then
7273 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header'
7276 if test $gl_cv_have_include_next = buggy; then
7277 INCLUDE_NEXT=include
7278 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next
7280 INCLUDE_NEXT=include
7281 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include
7287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5
7288 $as_echo_n "checking whether system header files limit the line length... " >&6; }
7289 if ${gl_cv_pragma_columns+:} false; then :
7290 $as_echo_n "(cached) " >&6
7292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7293 /* end confdefs.h. */
7300 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7301 $EGREP "choke me" >/dev/null 2>&1; then :
7302 gl_cv_pragma_columns=yes
7304 gl_cv_pragma_columns=no
7310 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5
7311 $as_echo "$gl_cv_pragma_columns" >&6; }
7312 if test $gl_cv_pragma_columns = yes; then
7313 PRAGMA_COLUMNS="#pragma COLUMNS 10000"
7336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
7337 $as_echo_n "checking if environ is properly declared... " >&6; }
7338 if ${gt_cv_var_environ_declaration+:} false; then :
7339 $as_echo_n "(cached) " >&6
7342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7343 /* end confdefs.h. */
7347 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
7350 extern struct { int foo; } environ;
7359 if ac_fn_c_try_compile "$LINENO"; then :
7360 gt_cv_var_environ_declaration=no
7362 gt_cv_var_environ_declaration=yes
7364 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7367 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
7368 $as_echo "$gt_cv_var_environ_declaration" >&6; }
7369 if test $gt_cv_var_environ_declaration = yes; then
7371 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
7376 if test $gt_cv_var_environ_declaration != yes; then
7382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
7383 $as_echo_n "checking for complete errno.h... " >&6; }
7384 if ${gl_cv_header_errno_h_complete+:} false; then :
7385 $as_echo_n "(cached) " >&6
7388 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7389 /* end confdefs.h. */
7398 #if !defined ENOLINK
7404 #if !defined EMULTIHOP
7407 #if !defined EBADMSG
7410 #if !defined EOVERFLOW
7413 #if !defined ENOTSUP
7416 #if !defined ENETRESET
7419 #if !defined ECONNABORTED
7428 #if !defined ECANCELED
7433 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7434 $EGREP "booboo" >/dev/null 2>&1; then :
7435 gl_cv_header_errno_h_complete=no
7437 gl_cv_header_errno_h_complete=yes
7443 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
7444 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
7445 if test $gl_cv_header_errno_h_complete = yes; then
7456 if test $gl_cv_have_include_next = yes; then
7457 gl_cv_next_errno_h='<'errno.h'>'
7459 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
7460 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
7461 if ${gl_cv_next_errno_h+:} false; then :
7462 $as_echo_n "(cached) " >&6
7465 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7466 /* end confdefs.h. */
7471 aix*) gl_absname_cpp="$ac_cpp -C" ;;
7472 *) gl_absname_cpp="$ac_cpp" ;;
7477 gl_dirsep_regex='[/\\]'
7480 gl_dirsep_regex='\/'
7483 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
7485 gl_header_literal_regex=`echo 'errno.h' \
7486 | sed -e "$gl_make_literal_regex_sed"`
7487 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
7488 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
7493 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
7494 sed -n "$gl_absolute_header_sed"`'"'
7498 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
7499 $as_echo "$gl_cv_next_errno_h" >&6; }
7501 NEXT_ERRNO_H=$gl_cv_next_errno_h
7503 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
7504 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
7505 gl_next_as_first_directive='<'errno.h'>'
7507 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
7508 gl_next_as_first_directive=$gl_cv_next_errno_h
7510 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive
7518 if test -n "$ERRNO_H"; then
7519 GL_GENERATE_ERRNO_H_TRUE=
7520 GL_GENERATE_ERRNO_H_FALSE='#'
7522 GL_GENERATE_ERRNO_H_TRUE='#'
7523 GL_GENERATE_ERRNO_H_FALSE=
7527 if test -n "$ERRNO_H"; then
7528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
7529 $as_echo_n "checking for EMULTIHOP value... " >&6; }
7530 if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then :
7531 $as_echo_n "(cached) " >&6
7534 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7535 /* end confdefs.h. */
7543 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7544 $EGREP "yes" >/dev/null 2>&1; then :
7545 gl_cv_header_errno_h_EMULTIHOP=yes
7547 gl_cv_header_errno_h_EMULTIHOP=no
7551 if test $gl_cv_header_errno_h_EMULTIHOP = no; then
7552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7553 /* end confdefs.h. */
7555 #define _XOPEN_SOURCE_EXTENDED 1
7562 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7563 $EGREP "yes" >/dev/null 2>&1; then :
7564 gl_cv_header_errno_h_EMULTIHOP=hidden
7568 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then
7569 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
7570 #define _XOPEN_SOURCE_EXTENDED 1
7572 /* The following two lines are a workaround against an autoconf-2.52 bug. */
7583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
7584 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
7585 case $gl_cv_header_errno_h_EMULTIHOP in
7587 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE=
7590 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP"
7598 if test -n "$ERRNO_H"; then
7599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
7600 $as_echo_n "checking for ENOLINK value... " >&6; }
7601 if ${gl_cv_header_errno_h_ENOLINK+:} false; then :
7602 $as_echo_n "(cached) " >&6
7605 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7606 /* end confdefs.h. */
7614 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7615 $EGREP "yes" >/dev/null 2>&1; then :
7616 gl_cv_header_errno_h_ENOLINK=yes
7618 gl_cv_header_errno_h_ENOLINK=no
7622 if test $gl_cv_header_errno_h_ENOLINK = no; then
7623 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7624 /* end confdefs.h. */
7626 #define _XOPEN_SOURCE_EXTENDED 1
7633 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7634 $EGREP "yes" >/dev/null 2>&1; then :
7635 gl_cv_header_errno_h_ENOLINK=hidden
7639 if test $gl_cv_header_errno_h_ENOLINK = hidden; then
7640 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
7641 #define _XOPEN_SOURCE_EXTENDED 1
7643 /* The following two lines are a workaround against an autoconf-2.52 bug. */
7654 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
7655 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
7656 case $gl_cv_header_errno_h_ENOLINK in
7658 ENOLINK_HIDDEN=0; ENOLINK_VALUE=
7661 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK"
7669 if test -n "$ERRNO_H"; then
7670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
7671 $as_echo_n "checking for EOVERFLOW value... " >&6; }
7672 if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then :
7673 $as_echo_n "(cached) " >&6
7676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7677 /* end confdefs.h. */
7685 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7686 $EGREP "yes" >/dev/null 2>&1; then :
7687 gl_cv_header_errno_h_EOVERFLOW=yes
7689 gl_cv_header_errno_h_EOVERFLOW=no
7693 if test $gl_cv_header_errno_h_EOVERFLOW = no; then
7694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7695 /* end confdefs.h. */
7697 #define _XOPEN_SOURCE_EXTENDED 1
7704 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7705 $EGREP "yes" >/dev/null 2>&1; then :
7706 gl_cv_header_errno_h_EOVERFLOW=hidden
7710 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then
7711 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
7712 #define _XOPEN_SOURCE_EXTENDED 1
7714 /* The following two lines are a workaround against an autoconf-2.52 bug. */
7725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
7726 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
7727 case $gl_cv_header_errno_h_EOVERFLOW in
7729 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE=
7732 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW"
7740 ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
7741 if test "x$ac_cv_have_decl_strerror_r" = xyes; then :
7747 cat >>confdefs.h <<_ACEOF
7748 #define HAVE_DECL_STRERROR_R $ac_have_decl
7751 for ac_func in strerror_r
7753 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r"
7754 if test "x$ac_cv_func_strerror_r" = xyes; then :
7755 cat >>confdefs.h <<_ACEOF
7756 #define HAVE_STRERROR_R 1
7762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
7763 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
7764 if ${ac_cv_func_strerror_r_char_p+:} false; then :
7765 $as_echo_n "(cached) " >&6
7768 ac_cv_func_strerror_r_char_p=no
7769 if test $ac_cv_have_decl_strerror_r = yes; then
7770 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7771 /* end confdefs.h. */
7772 $ac_includes_default
7778 char x = *strerror_r (0, buf, sizeof buf);
7779 char *p = strerror_r (0, buf, sizeof buf);
7786 if ac_fn_c_try_compile "$LINENO"; then :
7787 ac_cv_func_strerror_r_char_p=yes
7789 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7791 # strerror_r is not declared. Choose between
7792 # systems that have relatively inaccessible declarations for the
7793 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
7794 # former has a strerror_r that returns char*, while the latter
7795 # has a strerror_r that returns `int'.
7796 # This test should segfault on the DEC system.
7797 if test "$cross_compiling" = yes; then :
7800 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7801 /* end confdefs.h. */
7802 $ac_includes_default
7803 extern char *strerror_r ();
7808 char x = *strerror_r (0, buf, sizeof buf);
7809 return ! isalpha (x);
7814 if ac_fn_c_try_run "$LINENO"; then :
7815 ac_cv_func_strerror_r_char_p=yes
7817 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7818 conftest.$ac_objext conftest.beam conftest.$ac_ext
7824 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
7825 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
7826 if test $ac_cv_func_strerror_r_char_p = yes; then
7828 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
7834 GNULIB_NONBLOCKING=0;
7852 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
7853 $as_echo_n "checking for working fcntl.h... " >&6; }
7854 if ${gl_cv_header_working_fcntl_h+:} false; then :
7855 $as_echo_n "(cached) " >&6
7857 if test "$cross_compiling" = yes; then :
7858 gl_cv_header_working_fcntl_h=cross-compiling
7860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7861 /* end confdefs.h. */
7862 #include <sys/types.h>
7863 #include <sys/stat.h>
7865 # include <unistd.h>
7866 #else /* on Windows with MSVC */
7868 # include <stdlib.h>
7869 # defined sleep(n) _sleep ((n) * 1000)
7876 #define O_NOFOLLOW 0
7878 static int const constants[] =
7880 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
7881 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
7888 int result = !constants;
7891 static char const sym[] = "conftest.sym";
7892 if (symlink (".", sym) != 0)
7896 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
7907 static char const file[] = "confdefs.h";
7908 int fd = open (file, O_RDONLY | O_NOATIME);
7914 if (fstat (fd, &st0) != 0)
7920 if (read (fd, &c, 1) != 1)
7924 if (close (fd) != 0)
7929 if (stat (file, &st1) != 0)
7932 if (st0.st_atime != st1.st_atime)
7944 if ac_fn_c_try_run "$LINENO"; then :
7945 gl_cv_header_working_fcntl_h=yes
7948 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #(
7949 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #(
7950 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #(
7951 *) gl_cv_header_working_fcntl_h='no';;
7954 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
7955 conftest.$ac_objext conftest.beam conftest.$ac_ext
7959 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
7960 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
7962 case $gl_cv_header_working_fcntl_h in #(
7963 *O_NOATIME* | no | cross-compiling) ac_val=0;; #(
7967 cat >>confdefs.h <<_ACEOF
7968 #define HAVE_WORKING_O_NOATIME $ac_val
7972 case $gl_cv_header_working_fcntl_h in #(
7973 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #(
7977 cat >>confdefs.h <<_ACEOF
7978 #define HAVE_WORKING_O_NOFOLLOW $ac_val
7982 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
7983 if test "x$ac_cv_type_pid_t" = xyes; then :
7987 cat >>confdefs.h <<_ACEOF
7993 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
7994 if test "x$ac_cv_type_mode_t" = xyes; then :
7998 cat >>confdefs.h <<_ACEOF
8037 REPLACE_UTIMENSAT=0;
8056 if test $gl_cv_have_include_next = yes; then
8057 gl_cv_next_getopt_h='<'getopt.h'>'
8059 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5
8060 $as_echo_n "checking absolute name of <getopt.h>... " >&6; }
8061 if ${gl_cv_next_getopt_h+:} false; then :
8062 $as_echo_n "(cached) " >&6
8065 if test $ac_cv_header_getopt_h = yes; then
8068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8069 /* end confdefs.h. */
8074 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8075 *) gl_absname_cpp="$ac_cpp" ;;
8080 gl_dirsep_regex='[/\\]'
8083 gl_dirsep_regex='\/'
8086 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8088 gl_header_literal_regex=`echo 'getopt.h' \
8089 | sed -e "$gl_make_literal_regex_sed"`
8090 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8091 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8096 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8097 sed -n "$gl_absolute_header_sed"`'"'
8099 gl_cv_next_getopt_h='<'getopt.h'>'
8104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5
8105 $as_echo "$gl_cv_next_getopt_h" >&6; }
8107 NEXT_GETOPT_H=$gl_cv_next_getopt_h
8109 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8110 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8111 gl_next_as_first_directive='<'getopt.h'>'
8113 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8114 gl_next_as_first_directive=$gl_cv_next_getopt_h
8116 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive
8121 if test $ac_cv_header_getopt_h = yes; then
8130 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
8131 for ac_header in getopt.h
8133 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default"
8134 if test "x$ac_cv_header_getopt_h" = xyes; then :
8135 cat >>confdefs.h <<_ACEOF
8136 #define HAVE_GETOPT_H 1
8140 gl_replace_getopt=yes
8147 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
8148 for ac_func in getopt_long_only
8150 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only"
8151 if test "x$ac_cv_func_getopt_long_only" = xyes; then :
8152 cat >>confdefs.h <<_ACEOF
8153 #define HAVE_GETOPT_LONG_ONLY 1
8157 gl_replace_getopt=yes
8163 if test -z "$gl_replace_getopt"; then
8164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5
8165 $as_echo_n "checking whether getopt is POSIX compatible... " >&6; }
8166 if ${gl_cv_func_getopt_posix+:} false; then :
8167 $as_echo_n "(cached) " >&6
8170 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8171 /* end confdefs.h. */
8176 int *p = &optreset; return optreset;
8181 if ac_fn_c_try_link "$LINENO"; then :
8184 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8185 /* end confdefs.h. */
8190 return !getopt_clip;
8195 if ac_fn_c_try_compile "$LINENO"; then :
8200 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8202 rm -f core conftest.err conftest.$ac_objext \
8203 conftest$ac_exeext conftest.$ac_ext
8205 gl_save_CPPFLAGS=$CPPFLAGS
8206 CPPFLAGS="$CPPFLAGS -DOPTIND_MIN=$gl_optind_min"
8207 if test "$cross_compiling" = yes; then :
8209 mingw*) gl_cv_func_getopt_posix="guessing no";;
8210 darwin* | aix*) gl_cv_func_getopt_posix="guessing no";;
8211 *) gl_cv_func_getopt_posix="guessing yes";;
8215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8216 /* end confdefs.h. */
8226 static char program[] = "program";
8227 static char a[] = "-a";
8228 static char foo[] = "foo";
8229 static char bar[] = "bar";
8230 char *argv[] = { program, a, foo, bar, NULL };
8233 optind = OPTIND_MIN;
8236 c = getopt (4, argv, "ab");
8239 c = getopt (4, argv, "ab");
8245 /* Some internal state exists at this point. */
8247 static char program[] = "program";
8248 static char donald[] = "donald";
8249 static char p[] = "-p";
8250 static char billy[] = "billy";
8251 static char duck[] = "duck";
8252 static char a[] = "-a";
8253 static char bar[] = "bar";
8254 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL };
8257 optind = OPTIND_MIN;
8260 c = getopt (7, argv, "+abp:q:");
8263 if (!(strcmp (argv[0], "program") == 0))
8265 if (!(strcmp (argv[1], "donald") == 0))
8267 if (!(strcmp (argv[2], "-p") == 0))
8269 if (!(strcmp (argv[3], "billy") == 0))
8271 if (!(strcmp (argv[4], "duck") == 0))
8273 if (!(strcmp (argv[5], "-a") == 0))
8275 if (!(strcmp (argv[6], "bar") == 0))
8280 /* Detect MacOS 10.5, AIX 7.1 bug. */
8282 static char program[] = "program";
8283 static char ab[] = "-ab";
8284 char *argv[3] = { program, ab, NULL };
8285 optind = OPTIND_MIN;
8287 if (getopt (2, argv, "ab:") != 'a')
8289 if (getopt (2, argv, "ab:") != '?')
8301 if ac_fn_c_try_run "$LINENO"; then :
8302 gl_cv_func_getopt_posix=yes
8304 gl_cv_func_getopt_posix=no
8306 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8307 conftest.$ac_objext conftest.beam conftest.$ac_ext
8310 CPPFLAGS=$gl_save_CPPFLAGS
8313 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5
8314 $as_echo "$gl_cv_func_getopt_posix" >&6; }
8315 case "$gl_cv_func_getopt_posix" in
8316 *no) gl_replace_getopt=yes ;;
8320 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then
8321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5
8322 $as_echo_n "checking for working GNU getopt function... " >&6; }
8323 if ${gl_cv_func_getopt_gnu+:} false; then :
8324 $as_echo_n "(cached) " >&6
8326 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the
8327 # optstring is necessary for programs like m4 that have POSIX-mandated
8328 # semantics for supporting options interspersed with files.
8329 # Also, since getopt_long is a GNU extension, we require optind=0.
8330 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT;
8331 # so take care to revert to the correct (non-)export state.
8332 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }'
8333 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in
8334 xx) gl_had_POSIXLY_CORRECT=exported ;;
8335 x) gl_had_POSIXLY_CORRECT=yes ;;
8336 *) gl_had_POSIXLY_CORRECT= ;;
8339 export POSIXLY_CORRECT
8340 if test "$cross_compiling" = yes; then :
8341 case $host_os:$ac_cv_have_decl_optreset in
8342 *-gnu*:* | mingw*:*) gl_cv_func_getopt_gnu=no;;
8343 *:yes) gl_cv_func_getopt_gnu=no;;
8344 *) gl_cv_func_getopt_gnu=yes;;
8348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8349 /* end confdefs.h. */
8355 #if defined __MACH__ && defined __APPLE__
8356 /* Avoid a crash on MacOS X. */
8357 #include <mach/mach.h>
8358 #include <mach/mach_error.h>
8359 #include <mach/thread_status.h>
8360 #include <mach/exception.h>
8361 #include <mach/task.h>
8362 #include <pthread.h>
8363 /* The exception port on which our thread listens. */
8364 static mach_port_t our_exception_port;
8365 /* The main function of the thread listening for exceptions of type
8368 mach_exception_thread (void *arg)
8370 /* Buffer for a message to be received. */
8372 mach_msg_header_t head;
8373 mach_msg_body_t msgh_body;
8376 mach_msg_return_t retval;
8377 /* Wait for a message on the exception port. */
8378 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
8379 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
8380 if (retval != MACH_MSG_SUCCESS)
8387 mach_port_t self = mach_task_self ();
8388 /* Allocate a port on which the thread shall listen for exceptions. */
8389 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
8391 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
8392 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
8393 MACH_MSG_TYPE_MAKE_SEND)
8395 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
8397 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
8398 /* Create the thread listening on the exception port. */
8399 pthread_attr_t attr;
8401 if (pthread_attr_init (&attr) == 0
8402 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
8403 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
8404 pthread_attr_destroy (&attr);
8405 /* Replace the exception port info for these exceptions with our own.
8406 Note that we replace the exception port for the entire task, not only
8407 for a particular thread. This has the effect that when our exception
8408 port gets the message, the thread specific exception port has already
8409 been asked, and we don't need to bother about it.
8410 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
8411 task_set_exception_ports (self, mask, our_exception_port,
8412 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
8417 #elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
8418 /* Avoid a crash on native Windows. */
8419 #define WIN32_LEAN_AND_MEAN
8420 #include <windows.h>
8421 #include <winerror.h>
8423 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
8425 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
8427 case EXCEPTION_ACCESS_VIOLATION:
8428 case EXCEPTION_IN_PAGE_ERROR:
8429 case EXCEPTION_STACK_OVERFLOW:
8430 case EXCEPTION_GUARD_PAGE:
8431 case EXCEPTION_PRIV_INSTRUCTION:
8432 case EXCEPTION_ILLEGAL_INSTRUCTION:
8433 case EXCEPTION_DATATYPE_MISALIGNMENT:
8434 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
8435 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
8438 return EXCEPTION_CONTINUE_SEARCH;
8443 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
8446 /* Avoid a crash on POSIX systems. */
8448 /* A POSIX signal handler. */
8450 exception_handler (int sig)
8458 signal (SIGSEGV, exception_handler);
8461 signal (SIGBUS, exception_handler);
8475 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw,
8476 and fails on MacOS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5,
8477 OSF/1 5.1, Solaris 10. */
8479 static char conftest[] = "conftest";
8480 static char plus[] = "-+";
8481 char *argv[3] = { conftest, plus, NULL };
8483 if (getopt (2, argv, "+a") != '?')
8486 /* This code succeeds on glibc 2.8, mingw,
8487 and fails on MacOS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11,
8488 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */
8490 static char program[] = "program";
8491 static char p[] = "-p";
8492 static char foo[] = "foo";
8493 static char bar[] = "bar";
8494 char *argv[] = { program, p, foo, bar, NULL };
8497 if (getopt (4, argv, "p::") != 'p')
8499 else if (optarg != NULL)
8501 else if (getopt (4, argv, "p::") != -1)
8503 else if (optind != 2)
8506 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */
8508 static char program[] = "program";
8509 static char foo[] = "foo";
8510 static char p[] = "-p";
8511 char *argv[] = { program, foo, p, NULL };
8513 if (getopt (3, argv, "-p") != 1)
8515 else if (getopt (3, argv, "-p") != 'p')
8518 /* This code fails on glibc 2.11. */
8520 static char program[] = "program";
8521 static char b[] = "-b";
8522 static char a[] = "-a";
8523 char *argv[] = { program, b, a, NULL };
8524 optind = opterr = 0;
8525 if (getopt (3, argv, "+:a:b") != 'b')
8527 else if (getopt (3, argv, "+:a:b") != ':')
8530 /* This code dumps core on glibc 2.14. */
8532 static char program[] = "program";
8533 static char w[] = "-W";
8534 static char dummy[] = "dummy";
8535 char *argv[] = { program, w, dummy, NULL };
8536 optind = opterr = 1;
8537 if (getopt (3, argv, "W;") != 'W')
8546 if ac_fn_c_try_run "$LINENO"; then :
8547 gl_cv_func_getopt_gnu=yes
8549 gl_cv_func_getopt_gnu=no
8551 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
8552 conftest.$ac_objext conftest.beam conftest.$ac_ext
8555 case $gl_had_POSIXLY_CORRECT in
8557 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;;
8558 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;;
8562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5
8563 $as_echo "$gl_cv_func_getopt_gnu" >&6; }
8564 if test "$gl_cv_func_getopt_gnu" = "no"; then
8565 gl_replace_getopt=yes
8576 if test -n "$gl_replace_getopt"; then :
8583 if test $REPLACE_GETOPT = 1; then
8587 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
8593 ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default"
8594 if test "x$ac_cv_have_decl_getenv" = xyes; then :
8600 cat >>confdefs.h <<_ACEOF
8601 #define HAVE_DECL_GETENV $ac_have_decl
8611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
8612 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
8613 if ${ac_cv_c_restrict+:} false; then :
8614 $as_echo_n "(cached) " >&6
8617 # The order here caters to the fact that C++ does not require restrict.
8618 for ac_kw in __restrict __restrict__ _Restrict restrict; do
8619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8620 /* end confdefs.h. */
8621 typedef int * int_ptr;
8622 int foo (int_ptr $ac_kw ip) {
8636 if ac_fn_c_try_compile "$LINENO"; then :
8637 ac_cv_c_restrict=$ac_kw
8639 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8640 test "$ac_cv_c_restrict" != no && break
8644 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
8645 $as_echo "$ac_cv_c_restrict" >&6; }
8647 case $ac_cv_c_restrict in
8649 no) $as_echo "#define restrict /**/" >>confdefs.h
8651 *) cat >>confdefs.h <<_ACEOF
8652 #define restrict $ac_cv_c_restrict
8658 GNULIB_GETTIMEOFDAY=0;
8659 HAVE_GETTIMEOFDAY=1;
8660 HAVE_STRUCT_TIMEVAL=1;
8662 REPLACE_GETTIMEOFDAY=0;
8663 REPLACE_STRUCT_TIMEVAL=0;
8680 if test $gl_cv_have_include_next = yes; then
8681 gl_cv_next_sys_time_h='<'sys/time.h'>'
8683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
8684 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
8685 if ${gl_cv_next_sys_time_h+:} false; then :
8686 $as_echo_n "(cached) " >&6
8689 if test $ac_cv_header_sys_time_h = yes; then
8692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8693 /* end confdefs.h. */
8694 #include <sys/time.h>
8698 aix*) gl_absname_cpp="$ac_cpp -C" ;;
8699 *) gl_absname_cpp="$ac_cpp" ;;
8704 gl_dirsep_regex='[/\\]'
8707 gl_dirsep_regex='\/'
8710 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
8712 gl_header_literal_regex=`echo 'sys/time.h' \
8713 | sed -e "$gl_make_literal_regex_sed"`
8714 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8715 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8720 gl_cv_next_sys_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8721 sed -n "$gl_absolute_header_sed"`'"'
8723 gl_cv_next_sys_time_h='<'sys/time.h'>'
8728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
8729 $as_echo "$gl_cv_next_sys_time_h" >&6; }
8731 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h
8733 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
8734 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8735 gl_next_as_first_directive='<'sys/time.h'>'
8737 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8738 gl_next_as_first_directive=$gl_cv_next_sys_time_h
8740 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive
8746 if test $ac_cv_header_sys_time_h != yes; then
8754 if test $ac_cv_header_sys_socket_h != yes; then
8755 for ac_header in winsock2.h
8757 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
8758 if test "x$ac_cv_header_winsock2_h" = xyes; then :
8759 cat >>confdefs.h <<_ACEOF
8760 #define HAVE_WINSOCK2_H 1
8768 if test "$ac_cv_header_winsock2_h" = yes; then
8770 UNISTD_H_HAVE_WINSOCK2_H=1
8771 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
8777 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
8778 $as_echo_n "checking for struct timeval... " >&6; }
8779 if ${gl_cv_sys_struct_timeval+:} false; then :
8780 $as_echo_n "(cached) " >&6
8782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8783 /* end confdefs.h. */
8785 #include <sys/time.h>
8789 # include <winsock2.h>
8795 static struct timeval x; x.tv_sec = x.tv_usec;
8800 if ac_fn_c_try_compile "$LINENO"; then :
8801 gl_cv_sys_struct_timeval=yes
8803 gl_cv_sys_struct_timeval=no
8805 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8808 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
8809 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
8810 if test $gl_cv_sys_struct_timeval != yes; then
8811 HAVE_STRUCT_TIMEVAL=0
8813 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for correct struct timeval.tv_sec member" >&5
8814 $as_echo_n "checking for correct struct timeval.tv_sec member... " >&6; }
8815 if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then :
8816 $as_echo_n "(cached) " >&6
8818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8819 /* end confdefs.h. */
8821 #include <sys/time.h>
8825 # include <winsock2.h>
8831 static struct timeval x;
8832 typedef int verify_tv_sec_type[sizeof (x.tv_sec) == sizeof (time_t) ? 1 : -1];
8838 if ac_fn_c_try_compile "$LINENO"; then :
8839 gl_cv_sys_struct_timeval_tv_sec=yes
8841 gl_cv_sys_struct_timeval_tv_sec=no
8843 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
8847 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
8848 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
8849 REPLACE_STRUCT_TIMEVAL=1
8854 for gl_func in gettimeofday; do
8855 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
8856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
8857 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
8858 if eval \${$as_gl_Symbol+:} false; then :
8859 $as_echo_n "(cached) " >&6
8861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8862 /* end confdefs.h. */
8865 # include <sys/time.h>
8878 if ac_fn_c_try_compile "$LINENO"; then :
8879 eval "$as_gl_Symbol=yes"
8881 eval "$as_gl_Symbol=no"
8883 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8885 eval ac_res=\$$as_gl_Symbol
8886 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
8887 $as_echo "$ac_res" >&6; }
8888 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
8889 cat >>confdefs.h <<_ACEOF
8890 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
8893 eval ac_cv_have_decl_$gl_func=yes
8904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
8905 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
8906 if ${am_cv_langinfo_codeset+:} false; then :
8907 $as_echo_n "(cached) " >&6
8909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8910 /* end confdefs.h. */
8911 #include <langinfo.h>
8915 char* cs = nl_langinfo(CODESET); return !cs;
8920 if ac_fn_c_try_link "$LINENO"; then :
8921 am_cv_langinfo_codeset=yes
8923 am_cv_langinfo_codeset=no
8925 rm -f core conftest.err conftest.$ac_objext \
8926 conftest$ac_exeext conftest.$ac_ext
8929 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
8930 $as_echo "$am_cv_langinfo_codeset" >&6; }
8931 if test $am_cv_langinfo_codeset = yes; then
8933 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
8937 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
8938 if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then :
8944 cat >>confdefs.h <<_ACEOF
8945 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
8949 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5
8950 $as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; }
8951 if ${ac_cv_gnu_library_2_1+:} false; then :
8952 $as_echo_n "(cached) " >&6
8954 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8955 /* end confdefs.h. */
8957 #include <features.h>
8958 #ifdef __GNU_LIBRARY__
8959 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
8968 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8969 $EGREP "Lucky" >/dev/null 2>&1; then :
8970 ac_cv_gnu_library_2_1=yes
8972 ac_cv_gnu_library_2_1=no
8979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5
8980 $as_echo "$ac_cv_gnu_library_2_1" >&6; }
8982 GLIBC21="$ac_cv_gnu_library_2_1"
8988 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
8989 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
8990 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then :
8991 $as_echo_n "(cached) " >&6
8993 rm -f conftest.sym conftest.file
8995 if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then
8996 if test "$cross_compiling" = yes; then :
8997 # When cross-compiling, be pessimistic so we will end up using the
8998 # replacement version of lstat that checks for trailing slashes and
8999 # calls lstat a second time when necessary.
9000 gl_cv_func_lstat_dereferences_slashed_symlink=no
9003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9004 /* end confdefs.h. */
9005 $ac_includes_default
9010 /* Linux will dereference the symlink and fail, as required by
9011 POSIX. That is better in the sense that it means we will not
9012 have to compile and use the lstat wrapper. */
9013 return lstat ("conftest.sym/", &sbuf) == 0;
9019 if ac_fn_c_try_run "$LINENO"; then :
9020 gl_cv_func_lstat_dereferences_slashed_symlink=yes
9022 gl_cv_func_lstat_dereferences_slashed_symlink=no
9024 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9025 conftest.$ac_objext conftest.beam conftest.$ac_ext
9029 # If the 'ln -s' command failed, then we probably don't even
9030 # have an lstat function.
9031 gl_cv_func_lstat_dereferences_slashed_symlink=no
9033 rm -f conftest.sym conftest.file
9036 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
9037 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
9038 test $gl_cv_func_lstat_dereferences_slashed_symlink = yes &&
9040 cat >>confdefs.h <<_ACEOF
9041 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
9046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
9047 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
9048 if ${gl_cv_func_malloc_posix+:} false; then :
9049 $as_echo_n "(cached) " >&6
9052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9053 /* end confdefs.h. */
9058 #if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
9066 if ac_fn_c_try_compile "$LINENO"; then :
9067 gl_cv_func_malloc_posix=yes
9069 gl_cv_func_malloc_posix=no
9071 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
9075 $as_echo "$gl_cv_func_malloc_posix" >&6; }
9078 for ac_header in stdlib.h
9080 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
9081 if test "x$ac_cv_header_stdlib_h" = xyes; then :
9082 cat >>confdefs.h <<_ACEOF
9083 #define HAVE_STDLIB_H 1
9090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
9091 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
9092 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
9093 $as_echo_n "(cached) " >&6
9095 if test "$cross_compiling" = yes; then :
9096 ac_cv_func_malloc_0_nonnull=no
9098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9099 /* end confdefs.h. */
9100 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
9101 # include <stdlib.h>
9109 return ! malloc (0);
9114 if ac_fn_c_try_run "$LINENO"; then :
9115 ac_cv_func_malloc_0_nonnull=yes
9117 ac_cv_func_malloc_0_nonnull=no
9119 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9120 conftest.$ac_objext conftest.beam conftest.$ac_ext
9124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
9125 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
9126 if test $ac_cv_func_malloc_0_nonnull = yes; then :
9127 gl_cv_func_malloc_0_nonnull=1
9129 gl_cv_func_malloc_0_nonnull=0
9133 cat >>confdefs.h <<_ACEOF
9134 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
9139 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5
9140 $as_echo_n "checking for unsigned long long int... " >&6; }
9141 if ${ac_cv_type_unsigned_long_long_int+:} false; then :
9142 $as_echo_n "(cached) " >&6
9144 ac_cv_type_unsigned_long_long_int=yes
9145 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
9146 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9147 /* end confdefs.h. */
9149 /* For now, do not test the preprocessor; as of 2007 there are too many
9150 implementations with broken preprocessors. Perhaps this can
9151 be revisited in 2012. In the meantime, code should not expect
9152 #if to work with literals wider than 32 bits. */
9153 /* Test literals. */
9154 long long int ll = 9223372036854775807ll;
9155 long long int nll = -9223372036854775807LL;
9156 unsigned long long int ull = 18446744073709551615ULL;
9157 /* Test constant expressions. */
9158 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll)
9160 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1
9166 /* Test availability of runtime routines for shift and division. */
9167 long long int llmax = 9223372036854775807ll;
9168 unsigned long long int ullmax = 18446744073709551615ull;
9169 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i)
9170 | (llmax / ll) | (llmax % ll)
9171 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i)
9172 | (ullmax / ull) | (ullmax % ull));
9178 if ac_fn_c_try_link "$LINENO"; then :
9181 ac_cv_type_unsigned_long_long_int=no
9183 rm -f core conftest.err conftest.$ac_objext \
9184 conftest$ac_exeext conftest.$ac_ext
9187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5
9188 $as_echo "$ac_cv_type_unsigned_long_long_int" >&6; }
9189 if test $ac_cv_type_unsigned_long_long_int = yes; then
9191 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
9197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5
9198 $as_echo_n "checking for long long int... " >&6; }
9199 if ${ac_cv_type_long_long_int+:} false; then :
9200 $as_echo_n "(cached) " >&6
9202 ac_cv_type_long_long_int=yes
9203 if test "x${ac_cv_prog_cc_c99-no}" = xno; then
9204 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int
9205 if test $ac_cv_type_long_long_int = yes; then
9206 if test "$cross_compiling" = yes; then :
9209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9210 /* end confdefs.h. */
9214 (1LL << (sizeof (long long int) * CHAR_BIT - 2))
9215 # define LLONG_MAX (HALF - 1 + HALF)
9220 long long int n = 1;
9224 long long int m = n << i;
9227 if (LLONG_MAX / 2 < m)
9235 if ac_fn_c_try_run "$LINENO"; then :
9238 ac_cv_type_long_long_int=no
9240 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
9241 conftest.$ac_objext conftest.beam conftest.$ac_ext
9247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5
9248 $as_echo "$ac_cv_type_long_long_int" >&6; }
9249 if test $ac_cv_type_long_long_int = yes; then
9251 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
9262 GNULIB_MBSNRTOWCS=0;
9265 GNULIB_WCSNRTOMBS=0;
9282 GNULIB_WCSCASECMP=0;
9283 GNULIB_WCSNCASECMP=0;
9333 HAVE_DECL_WCWIDTH=1;
9334 REPLACE_MBSTATE_T=0;
9340 REPLACE_MBSRTOWCS=0;
9341 REPLACE_MBSNRTOWCS=0;
9343 REPLACE_WCSRTOMBS=0;
9344 REPLACE_WCSNRTOMBS=0;
9350 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
9351 $as_echo_n "checking for mbstate_t... " >&6; }
9352 if ${ac_cv_type_mbstate_t+:} false; then :
9353 $as_echo_n "(cached) " >&6
9355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9356 /* end confdefs.h. */
9357 $ac_includes_default
9358 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
9360 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
9361 included before <wchar.h>. */
9369 mbstate_t x; return sizeof x;
9374 if ac_fn_c_try_compile "$LINENO"; then :
9375 ac_cv_type_mbstate_t=yes
9377 ac_cv_type_mbstate_t=no
9379 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
9381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
9382 $as_echo "$ac_cv_type_mbstate_t" >&6; }
9383 if test $ac_cv_type_mbstate_t = yes; then
9385 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
9389 $as_echo "#define mbstate_t int" >>confdefs.h
9400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
9401 $as_echo_n "checking for a traditional japanese locale... " >&6; }
9402 if ${gt_cv_locale_ja+:} false; then :
9403 $as_echo_n "(cached) " >&6
9406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9407 /* end confdefs.h. */
9411 #if HAVE_LANGINFO_CODESET
9412 # include <langinfo.h>
9421 /* Check whether the given locale name is recognized by the system. */
9422 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
9423 /* On native Windows, setlocale(category, "") looks at the system settings,
9424 not at the environment variables. Also, when an encoding suffix such
9425 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
9426 category of the locale to "C". */
9427 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
9428 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
9431 if (setlocale (LC_ALL, "") == NULL) return 1;
9433 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
9434 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
9435 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
9436 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
9437 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
9438 some unit tests fail.
9439 On MirBSD 10, when an unsupported locale is specified, setlocale()
9440 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
9441 #if HAVE_LANGINFO_CODESET
9443 const char *cs = nl_langinfo (CODESET);
9444 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
9445 || strcmp (cs, "UTF-8") == 0)
9450 /* On Cygwin, avoid locale names without encoding suffix, because the
9451 locale_charset() function relies on the encoding suffix. Note that
9452 LC_ALL is set on the command line. */
9453 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
9455 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
9457 if (MB_CUR_MAX == 1)
9459 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
9460 This excludes the UTF-8 encoding (except on MirBSD). */
9461 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
9462 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
9463 for (p = buf; *p != '\0'; p++)
9464 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
9470 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9471 (eval $ac_link) 2>&5
9473 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9474 test $ac_status = 0; } && test -s conftest$ac_exeext; then
9476 # Handle native Windows specially, because there setlocale() interprets
9477 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
9478 # "fr" or "fra" as "French" or "French_France.1252",
9479 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
9480 # "ja" as "Japanese" or "Japanese_Japan.932",
9483 # Note that on native Windows, the Japanese locale is
9484 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
9485 # cannot use it here.
9486 gt_cv_locale_ja=none
9489 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
9490 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
9491 # configure script would override the LC_ALL setting. Likewise for
9492 # LC_CTYPE, which is also set at the beginning of the configure script.
9493 # Test for the AIX locale name.
9494 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9495 gt_cv_locale_ja=ja_JP
9497 # Test for the locale name with explicit encoding suffix.
9498 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9499 gt_cv_locale_ja=ja_JP.EUC-JP
9501 # Test for the HP-UX, OSF/1, NetBSD locale name.
9502 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9503 gt_cv_locale_ja=ja_JP.eucJP
9505 # Test for the IRIX, FreeBSD locale name.
9506 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9507 gt_cv_locale_ja=ja_JP.EUC
9509 # Test for the Solaris 7 locale name.
9510 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9513 # Special test for NetBSD 1.6.
9514 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then
9515 gt_cv_locale_ja=ja_JP.eucJP
9518 gt_cv_locale_ja=none
9531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
9532 $as_echo "$gt_cv_locale_ja" >&6; }
9533 LOCALE_JA=$gt_cv_locale_ja
9539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
9540 $as_echo_n "checking for a transitional chinese locale... " >&6; }
9541 if ${gt_cv_locale_zh_CN+:} false; then :
9542 $as_echo_n "(cached) " >&6
9545 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9546 /* end confdefs.h. */
9551 #if HAVE_LANGINFO_CODESET
9552 # include <langinfo.h>
9561 /* Check whether the given locale name is recognized by the system. */
9562 #if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
9563 /* On native Windows, setlocale(category, "") looks at the system settings,
9564 not at the environment variables. Also, when an encoding suffix such
9565 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
9566 category of the locale to "C". */
9567 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
9568 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
9571 if (setlocale (LC_ALL, "") == NULL) return 1;
9573 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
9574 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
9575 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
9576 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
9577 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
9578 some unit tests fail.
9579 On MirBSD 10, when an unsupported locale is specified, setlocale()
9580 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
9581 #if HAVE_LANGINFO_CODESET
9583 const char *cs = nl_langinfo (CODESET);
9584 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
9585 || strcmp (cs, "UTF-8") == 0)
9590 /* On Cygwin, avoid locale names without encoding suffix, because the
9591 locale_charset() function relies on the encoding suffix. Note that
9592 LC_ALL is set on the command line. */
9593 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
9595 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
9596 This excludes the UTF-8 encoding (except on MirBSD). */
9597 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
9598 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
9599 for (p = buf; *p != '\0'; p++)
9600 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
9602 /* Check whether a typical GB18030 multibyte sequence is recognized as a
9603 single wide character. This excludes the GB2312 and GBK encodings. */
9604 if (mblen ("\203\062\332\066", 5) != 4)
9610 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9611 (eval $ac_link) 2>&5
9613 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9614 test $ac_status = 0; } && test -s conftest$ac_exeext; then
9616 # Handle native Windows specially, because there setlocale() interprets
9617 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
9618 # "fr" or "fra" as "French" or "French_France.1252",
9619 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
9620 # "ja" as "Japanese" or "Japanese_Japan.932",
9623 # Test for the hypothetical native Windows locale name.
9624 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9625 gt_cv_locale_zh_CN=Chinese_China.54936
9628 gt_cv_locale_zh_CN=none
9632 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
9633 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
9634 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
9635 gt_cv_locale_zh_CN=none
9638 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
9639 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
9640 # configure script would override the LC_ALL setting. Likewise for
9641 # LC_CTYPE, which is also set at the beginning of the configure script.
9642 # Test for the locale name without encoding suffix.
9643 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9644 gt_cv_locale_zh_CN=zh_CN
9646 # Test for the locale name with explicit encoding suffix.
9647 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9648 gt_cv_locale_zh_CN=zh_CN.GB18030
9651 gt_cv_locale_zh_CN=none
9657 # If there was a link error, due to mblen(), the system is so old that
9658 # it certainly doesn't have a chinese locale.
9659 gt_cv_locale_zh_CN=none
9664 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
9665 $as_echo "$gt_cv_locale_zh_CN" >&6; }
9666 LOCALE_ZH_CN=$gt_cv_locale_zh_CN
9671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
9672 $as_echo_n "checking for a french Unicode locale... " >&6; }
9673 if ${gt_cv_locale_fr_utf8+:} false; then :
9674 $as_echo_n "(cached) " >&6
9677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9678 /* end confdefs.h. */
9682 #if HAVE_LANGINFO_CODESET
9683 # include <langinfo.h>
9690 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
9691 imitates locale dependent behaviour by looking at the environment
9692 variables, and all locales use the UTF-8 encoding. */
9693 #if !(defined __BEOS__ || defined __HAIKU__)
9694 /* Check whether the given locale name is recognized by the system. */
9695 # if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__
9696 /* On native Windows, setlocale(category, "") looks at the system settings,
9697 not at the environment variables. Also, when an encoding suffix such
9698 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
9699 category of the locale to "C". */
9700 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
9701 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
9704 if (setlocale (LC_ALL, "") == NULL) return 1;
9706 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
9707 On MacOS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
9708 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
9709 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
9710 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
9711 some unit tests fail. */
9712 # if HAVE_LANGINFO_CODESET
9714 const char *cs = nl_langinfo (CODESET);
9715 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
9720 /* On Cygwin, avoid locale names without encoding suffix, because the
9721 locale_charset() function relies on the encoding suffix. Note that
9722 LC_ALL is set on the command line. */
9723 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
9725 /* Check whether in the abbreviation of the second month, the second
9726 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
9727 two bytes long, with UTF-8 encoding. */
9728 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
9729 if (strftime (buf, sizeof (buf), "%b", &t) < 4
9730 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
9733 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
9734 /* Check whether the decimal separator is a comma.
9735 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
9736 are nl_langinfo(RADIXCHAR) are both ".". */
9737 if (localeconv () ->decimal_point[0] != ',') return 1;
9743 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
9744 (eval $ac_link) 2>&5
9746 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
9747 test $ac_status = 0; } && test -s conftest$ac_exeext; then
9749 # Handle native Windows specially, because there setlocale() interprets
9750 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
9751 # "fr" or "fra" as "French" or "French_France.1252",
9752 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
9753 # "ja" as "Japanese" or "Japanese_Japan.932",
9756 # Test for the hypothetical native Windows locale name.
9757 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9758 gt_cv_locale_fr_utf8=French_France.65001
9761 gt_cv_locale_fr_utf8=none
9765 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
9766 # otherwise on MacOS X 10.3.5 the LC_TIME=C from the beginning of the
9767 # configure script would override the LC_ALL setting. Likewise for
9768 # LC_CTYPE, which is also set at the beginning of the configure script.
9769 # Test for the usual locale name.
9770 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9771 gt_cv_locale_fr_utf8=fr_FR
9773 # Test for the locale name with explicit encoding suffix.
9774 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9775 gt_cv_locale_fr_utf8=fr_FR.UTF-8
9777 # Test for the Solaris 7 locale name.
9778 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then
9779 gt_cv_locale_fr_utf8=fr.UTF-8
9782 gt_cv_locale_fr_utf8=none
9792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
9793 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
9794 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8
9819 GNULIB_STRCASESTR=0;
9826 GNULIB_MBSCASECMP=0;
9827 GNULIB_MBSNCASECMP=0;
9828 GNULIB_MBSPCASECMP=0;
9829 GNULIB_MBSCASESTR=0;
9836 GNULIB_STRERROR_R=0;
9838 GNULIB_STRVERSCMP=0;
9845 HAVE_DECL_MEMRCHR=1;
9851 HAVE_DECL_STRNDUP=1;
9852 HAVE_DECL_STRNLEN=1;
9856 HAVE_DECL_STRTOK_R=1;
9857 HAVE_DECL_STRERROR_R=1;
9858 HAVE_DECL_STRSIGNAL=1;
9865 REPLACE_STRCASESTR=0;
9866 REPLACE_STRCHRNUL=0;
9868 REPLACE_STRERROR_R=0;
9872 REPLACE_STRSIGNAL=0;
9874 UNDEFINE_STRTOK_R=0;
9880 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
9881 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
9882 # irrelevant for anonymous mappings.
9883 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap"
9884 if test "x$ac_cv_func_mmap" = xyes; then :
9891 # Try to allow MAP_ANONYMOUS.
9892 gl_have_mmap_anonymous=no
9893 if test $gl_have_mmap = yes; then
9894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
9895 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
9896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9897 /* end confdefs.h. */
9899 #include <sys/mman.h>
9900 #ifdef MAP_ANONYMOUS
9901 I cant identify this map
9905 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9906 $EGREP "I cant identify this map" >/dev/null 2>&1; then :
9907 gl_have_mmap_anonymous=yes
9911 if test $gl_have_mmap_anonymous != yes; then
9912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9913 /* end confdefs.h. */
9915 #include <sys/mman.h>
9917 I cant identify this map
9921 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9922 $EGREP "I cant identify this map" >/dev/null 2>&1; then :
9924 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
9926 gl_have_mmap_anonymous=yes
9931 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
9932 $as_echo "$gl_have_mmap_anonymous" >&6; }
9933 if test $gl_have_mmap_anonymous = yes; then
9935 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
9945 if test $HAVE_MEMCHR = 1; then
9946 # Detect platform-specific bugs in some versions of glibc:
9947 # memchr should not dereference anything with length 0
9948 # http://bugzilla.redhat.com/499689
9949 # memchr should not dereference overestimated length after a match
9950 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
9951 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162
9952 # Assume that memchr works on platforms that lack mprotect.
9953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
9954 $as_echo_n "checking whether memchr works... " >&6; }
9955 if ${gl_cv_func_memchr_works+:} false; then :
9956 $as_echo_n "(cached) " >&6
9958 if test "$cross_compiling" = yes; then :
9959 gl_cv_func_memchr_works="guessing no"
9961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9962 /* end confdefs.h. */
9967 # include <unistd.h>
9968 # include <sys/types.h>
9969 # include <sys/mman.h>
9981 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
9982 # if HAVE_MAP_ANONYMOUS
9983 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
9985 # else /* !HAVE_MAP_ANONYMOUS */
9986 const int flags = MAP_FILE | MAP_PRIVATE;
9987 int fd = open ("/dev/zero", O_RDONLY, 0666);
9991 int pagesize = getpagesize ();
9993 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
9995 if (two_pages != (char *)(-1)
9996 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
9997 fence = two_pages + pagesize;
10002 if (memchr (fence, 0, 0))
10004 strcpy (fence - 9, "12345678");
10005 if (memchr (fence - 9, 0, 79) != fence - 1)
10007 if (memchr (fence - 1, 0, 3) != fence - 1)
10016 if ac_fn_c_try_run "$LINENO"; then :
10017 gl_cv_func_memchr_works=yes
10019 gl_cv_func_memchr_works=no
10021 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
10022 conftest.$ac_objext conftest.beam conftest.$ac_ext
10026 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
10027 $as_echo "$gl_cv_func_memchr_works" >&6; }
10028 if test "$gl_cv_func_memchr_works" != yes; then
10037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
10038 $as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; }
10039 if ${gl_cv_minmax_in_limits_h+:} false; then :
10040 $as_echo_n "(cached) " >&6
10042 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10043 /* end confdefs.h. */
10044 #include <limits.h>
10045 int x = MIN (42, 17);
10054 if ac_fn_c_try_compile "$LINENO"; then :
10055 gl_cv_minmax_in_limits_h=yes
10057 gl_cv_minmax_in_limits_h=no
10059 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
10062 $as_echo "$gl_cv_minmax_in_limits_h" >&6; }
10063 if test $gl_cv_minmax_in_limits_h = yes; then
10065 $as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
10074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
10075 $as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
10076 if ${gl_cv_minmax_in_sys_param_h+:} false; then :
10077 $as_echo_n "(cached) " >&6
10079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10080 /* end confdefs.h. */
10081 #include <sys/param.h>
10082 int x = MIN (42, 17);
10091 if ac_fn_c_try_compile "$LINENO"; then :
10092 gl_cv_minmax_in_sys_param_h=yes
10094 gl_cv_minmax_in_sys_param_h=no
10096 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10098 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
10099 $as_echo "$gl_cv_minmax_in_sys_param_h" >&6; }
10100 if test $gl_cv_minmax_in_sys_param_h = yes; then
10102 $as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
10111 GNULIB_NANOSLEEP=0;
10115 HAVE_DECL_LOCALTIME_R=1;
10119 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK;
10120 REPLACE_MKTIME=GNULIB_PORTCHECK;
10121 REPLACE_NANOSLEEP=GNULIB_PORTCHECK;
10122 REPLACE_TIMEGM=GNULIB_PORTCHECK;
10127 gl_cv_c_multiarch=no
10128 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10129 /* end confdefs.h. */
10130 #ifndef __APPLE_CC__
10131 not a universal capable compiler
10136 if ac_fn_c_try_compile "$LINENO"; then :
10140 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
10141 if test -n "$prev"; then
10143 i?86 | x86_64 | ppc | ppc64)
10144 if test -z "$arch" || test "$arch" = "$word"; then
10147 gl_cv_c_multiarch=yes
10153 if test "x$word" = "x-arch"; then
10160 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10161 if test $gl_cv_c_multiarch = yes; then
10162 APPLE_UNIVERSAL_BUILD=1
10164 APPLE_UNIVERSAL_BUILD=0
10168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
10169 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
10170 if ${ac_cv_header_stdbool_h+:} false; then :
10171 $as_echo_n "(cached) " >&6
10173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10174 /* end confdefs.h. */
10176 #include <stdbool.h>
10178 "error: bool is not defined"
10181 "error: false is not defined"
10184 "error: false is not 0"
10187 "error: true is not defined"
10190 "error: true is not 1"
10192 #ifndef __bool_true_false_are_defined
10193 "error: __bool_true_false_are_defined is not defined"
10196 struct s { _Bool s: 1; _Bool t; } s;
10198 char a[true == 1 ? 1 : -1];
10199 char b[false == 0 ? 1 : -1];
10200 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
10201 char d[(bool) 0.5 == true ? 1 : -1];
10202 /* See body of main program for 'e'. */
10203 char f[(_Bool) 0.0 == false ? 1 : -1];
10205 char h[sizeof (_Bool)];
10206 char i[sizeof s.t];
10207 enum { j = false, k = true, l = false * true, m = true * 256 };
10208 /* The following fails for
10209 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
10211 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
10212 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
10213 /* Catch a bug in an HP-UX C compiler. See
10214 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
10215 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html
10227 /* Refer to every declared value, to avoid compiler optimizations. */
10228 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
10229 + !m + !n + !o + !p + !q + !pq);
10235 if ac_fn_c_try_compile "$LINENO"; then :
10236 ac_cv_header_stdbool_h=yes
10238 ac_cv_header_stdbool_h=no
10240 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
10243 $as_echo "$ac_cv_header_stdbool_h" >&6; }
10244 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
10245 if test "x$ac_cv_type__Bool" = xyes; then :
10247 cat >>confdefs.h <<_ACEOF
10248 #define HAVE__BOOL 1
10258 # Define two additional variables used in the Makefile substitution.
10260 if test "$ac_cv_header_stdbool_h" = yes; then
10263 STDBOOL_H='stdbool.h'
10266 if test -n "$STDBOOL_H"; then
10267 GL_GENERATE_STDBOOL_H_TRUE=
10268 GL_GENERATE_STDBOOL_H_FALSE='#'
10270 GL_GENERATE_STDBOOL_H_TRUE='#'
10271 GL_GENERATE_STDBOOL_H_FALSE=
10275 if test "$ac_cv_type__Bool" = yes; then
10283 # parse-datetime.y works with bison only.
10284 : ${YACC='bison -y'}
10287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compound literals" >&5
10288 $as_echo_n "checking for compound literals... " >&6; }
10289 if ${gl_cv_compound_literals+:} false; then :
10290 $as_echo_n "(cached) " >&6
10292 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10293 /* end confdefs.h. */
10294 struct s { int i, j; };
10298 struct s t = (struct s) { 3, 4 };
10299 if (t.i != 0) return 0;
10304 if ac_fn_c_try_compile "$LINENO"; then :
10305 gl_cv_compound_literals=yes
10307 gl_cv_compound_literals=no
10309 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10311 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compound_literals" >&5
10312 $as_echo "$gl_cv_compound_literals" >&6; }
10313 if test $gl_cv_compound_literals = yes; then
10315 $as_echo "#define HAVE_COMPOUND_LITERALS 1" >>confdefs.h
10319 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5
10320 $as_echo_n "checking whether struct tm is in sys/time.h or time.h... " >&6; }
10321 if ${ac_cv_struct_tm+:} false; then :
10322 $as_echo_n "(cached) " >&6
10324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10325 /* end confdefs.h. */
10326 #include <sys/types.h>
10333 int *p = &tm.tm_sec;
10339 if ac_fn_c_try_compile "$LINENO"; then :
10340 ac_cv_struct_tm=time.h
10342 ac_cv_struct_tm=sys/time.h
10344 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5
10347 $as_echo "$ac_cv_struct_tm" >&6; }
10348 if test $ac_cv_struct_tm = sys/time.h; then
10350 $as_echo "#define TM_IN_SYS_TIME 1" >>confdefs.h
10355 ac_fn_c_check_member "$LINENO" "struct tm" "tm_gmtoff" "ac_cv_member_struct_tm_tm_gmtoff" "#include <time.h>
10357 if test "x$ac_cv_member_struct_tm_tm_gmtoff" = xyes; then :
10359 $as_echo "#define HAVE_TM_GMTOFF 1" >>confdefs.h
10365 GNULIB_PTHREAD_SIGMASK=0;
10367 GNULIB_SIGNAL_H_SIGPIPE=0;
10368 GNULIB_SIGPROCMASK=0;
10369 GNULIB_SIGACTION=0;
10370 HAVE_POSIX_SIGNALBLOCKING=1;
10371 HAVE_PTHREAD_SIGMASK=1;
10376 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1;
10378 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1;
10380 HAVE_SIGHANDLER_T=1;
10381 REPLACE_PTHREAD_SIGMASK=0;
10393 GNULIB_FPRINTF_POSIX=0;
10409 GNULIB_OBSTACK_PRINTF=0;
10410 GNULIB_OBSTACK_PRINTF_POSIX=0;
10415 GNULIB_PRINTF_POSIX=0;
10424 GNULIB_SPRINTF_POSIX=0;
10425 GNULIB_STDIO_H_NONBLOCKING=0;
10426 GNULIB_STDIO_H_SIGPIPE=0;
10428 GNULIB_VASPRINTF=0;
10433 GNULIB_VFPRINTF_POSIX=0;
10435 GNULIB_VPRINTF_POSIX=0;
10436 GNULIB_VSNPRINTF=0;
10437 GNULIB_VSPRINTF_POSIX=0;
10438 HAVE_DECL_FPURGE=1;
10439 HAVE_DECL_FSEEKO=1;
10440 HAVE_DECL_FTELLO=1;
10441 HAVE_DECL_GETDELIM=1;
10442 HAVE_DECL_GETLINE=1;
10443 HAVE_DECL_OBSTACK_PRINTF=1;
10444 HAVE_DECL_SNPRINTF=1;
10445 HAVE_DECL_VSNPRINTF=1;
10466 REPLACE_GETDELIM=0;
10468 REPLACE_OBSTACK_PRINTF=0;
10474 REPLACE_RENAMEAT=0;
10475 REPLACE_SNPRINTF=0;
10477 REPLACE_STDIO_READ_FUNCS=0;
10478 REPLACE_STDIO_WRITE_FUNCS=0;
10480 REPLACE_VASPRINTF=0;
10481 REPLACE_VDPRINTF=0;
10482 REPLACE_VFPRINTF=0;
10484 REPLACE_VSNPRINTF=0;
10485 REPLACE_VSPRINTF=0;
10490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
10491 $as_echo_n "checking for ssize_t... " >&6; }
10492 if ${gt_cv_ssize_t+:} false; then :
10493 $as_echo_n "(cached) " >&6
10495 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10496 /* end confdefs.h. */
10497 #include <sys/types.h>
10501 int x = sizeof (ssize_t *) + sizeof (ssize_t);
10507 if ac_fn_c_try_compile "$LINENO"; then :
10512 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10514 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
10515 $as_echo "$gt_cv_ssize_t" >&6; }
10516 if test $gt_cv_ssize_t = no; then
10518 $as_echo "#define ssize_t int" >>confdefs.h
10522 ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
10523 if test "x$ac_cv_have_decl_setenv" = xyes; then :
10529 cat >>confdefs.h <<_ACEOF
10530 #define HAVE_DECL_SETENV $ac_have_decl
10538 if test $ac_cv_have_decl_setenv = no; then
10546 for ac_header in search.h
10548 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
10549 if test "x$ac_cv_header_search_h" = xyes; then :
10550 cat >>confdefs.h <<_ACEOF
10551 #define HAVE_SEARCH_H 1
10558 for ac_func in tsearch
10560 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch"
10561 if test "x$ac_cv_func_tsearch" = xyes; then :
10562 cat >>confdefs.h <<_ACEOF
10563 #define HAVE_TSEARCH 1
10572 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
10573 #include <signal.h>
10574 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
10575 #include <sys/types.h>
10578 if test "x$ac_cv_type_sigset_t" = xyes; then :
10580 cat >>confdefs.h <<_ACEOF
10581 #define HAVE_SIGSET_T 1
10584 gl_cv_type_sigset_t=yes
10586 gl_cv_type_sigset_t=no
10589 if test $gl_cv_type_sigset_t != yes; then
10593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
10594 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
10595 if ${ac_cv_type_uid_t+:} false; then :
10596 $as_echo_n "(cached) " >&6
10598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10599 /* end confdefs.h. */
10600 #include <sys/types.h>
10603 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10604 $EGREP "uid_t" >/dev/null 2>&1; then :
10605 ac_cv_type_uid_t=yes
10607 ac_cv_type_uid_t=no
10612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
10613 $as_echo "$ac_cv_type_uid_t" >&6; }
10614 if test $ac_cv_type_uid_t = no; then
10616 $as_echo "#define uid_t int" >>confdefs.h
10619 $as_echo "#define gid_t int" >>confdefs.h
10628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
10629 $as_echo_n "checking for wchar_t... " >&6; }
10630 if ${gt_cv_c_wchar_t+:} false; then :
10631 $as_echo_n "(cached) " >&6
10633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10634 /* end confdefs.h. */
10635 #include <stddef.h>
10636 wchar_t foo = (wchar_t)'\0';
10645 if ac_fn_c_try_compile "$LINENO"; then :
10646 gt_cv_c_wchar_t=yes
10650 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
10653 $as_echo "$gt_cv_c_wchar_t" >&6; }
10654 if test $gt_cv_c_wchar_t = yes; then
10656 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
10667 if test $ac_cv_type_long_long_int = yes; then
10668 HAVE_LONG_LONG_INT=1
10670 HAVE_LONG_LONG_INT=0
10674 if test $ac_cv_type_unsigned_long_long_int = yes; then
10675 HAVE_UNSIGNED_LONG_LONG_INT=1
10677 HAVE_UNSIGNED_LONG_LONG_INT=0
10682 if test $ac_cv_header_wchar_h = yes; then
10689 if test $ac_cv_header_inttypes_h = yes; then
10696 if test $ac_cv_header_sys_types_h = yes; then
10712 if test $gl_cv_have_include_next = yes; then
10713 gl_cv_next_stdint_h='<'stdint.h'>'
10715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
10716 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
10717 if ${gl_cv_next_stdint_h+:} false; then :
10718 $as_echo_n "(cached) " >&6
10721 if test $ac_cv_header_stdint_h = yes; then
10724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10725 /* end confdefs.h. */
10726 #include <stdint.h>
10730 aix*) gl_absname_cpp="$ac_cpp -C" ;;
10731 *) gl_absname_cpp="$ac_cpp" ;;
10736 gl_dirsep_regex='[/\\]'
10739 gl_dirsep_regex='\/'
10742 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
10744 gl_header_literal_regex=`echo 'stdint.h' \
10745 | sed -e "$gl_make_literal_regex_sed"`
10746 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10747 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10752 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10753 sed -n "$gl_absolute_header_sed"`'"'
10755 gl_cv_next_stdint_h='<'stdint.h'>'
10760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
10761 $as_echo "$gl_cv_next_stdint_h" >&6; }
10763 NEXT_STDINT_H=$gl_cv_next_stdint_h
10765 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
10766 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10767 gl_next_as_first_directive='<'stdint.h'>'
10769 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10770 gl_next_as_first_directive=$gl_cv_next_stdint_h
10772 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive
10777 if test $ac_cv_header_stdint_h = yes; then
10784 if test $ac_cv_header_stdint_h = yes; then
10785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
10786 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
10787 if ${gl_cv_header_working_stdint_h+:} false; then :
10788 $as_echo_n "(cached) " >&6
10790 gl_cv_header_working_stdint_h=no
10791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10792 /* end confdefs.h. */
10795 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10796 #include <stdint.h>
10797 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
10798 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
10799 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
10803 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10804 included before <wchar.h>. */
10805 #include <stddef.h>
10806 #include <signal.h>
10808 # include <stdio.h>
10810 # include <wchar.h>
10815 int8_t a1 = INT8_MAX;
10816 int8_t a1min = INT8_MIN;
10819 int16_t a2 = INT16_MAX;
10820 int16_t a2min = INT16_MIN;
10823 int32_t a3 = INT32_MAX;
10824 int32_t a3min = INT32_MIN;
10827 int64_t a4 = INT64_MAX;
10828 int64_t a4min = INT64_MIN;
10831 uint8_t b1 = UINT8_MAX;
10833 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
10836 uint16_t b2 = UINT16_MAX;
10839 uint32_t b3 = UINT32_MAX;
10842 uint64_t b4 = UINT64_MAX;
10844 int_least8_t c1 = INT8_C (0x7f);
10845 int_least8_t c1max = INT_LEAST8_MAX;
10846 int_least8_t c1min = INT_LEAST8_MIN;
10847 int_least16_t c2 = INT16_C (0x7fff);
10848 int_least16_t c2max = INT_LEAST16_MAX;
10849 int_least16_t c2min = INT_LEAST16_MIN;
10850 int_least32_t c3 = INT32_C (0x7fffffff);
10851 int_least32_t c3max = INT_LEAST32_MAX;
10852 int_least32_t c3min = INT_LEAST32_MIN;
10853 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
10854 int_least64_t c4max = INT_LEAST64_MAX;
10855 int_least64_t c4min = INT_LEAST64_MIN;
10856 uint_least8_t d1 = UINT8_C (0xff);
10857 uint_least8_t d1max = UINT_LEAST8_MAX;
10858 uint_least16_t d2 = UINT16_C (0xffff);
10859 uint_least16_t d2max = UINT_LEAST16_MAX;
10860 uint_least32_t d3 = UINT32_C (0xffffffff);
10861 uint_least32_t d3max = UINT_LEAST32_MAX;
10862 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
10863 uint_least64_t d4max = UINT_LEAST64_MAX;
10864 int_fast8_t e1 = INT_FAST8_MAX;
10865 int_fast8_t e1min = INT_FAST8_MIN;
10866 int_fast16_t e2 = INT_FAST16_MAX;
10867 int_fast16_t e2min = INT_FAST16_MIN;
10868 int_fast32_t e3 = INT_FAST32_MAX;
10869 int_fast32_t e3min = INT_FAST32_MIN;
10870 int_fast64_t e4 = INT_FAST64_MAX;
10871 int_fast64_t e4min = INT_FAST64_MIN;
10872 uint_fast8_t f1 = UINT_FAST8_MAX;
10873 uint_fast16_t f2 = UINT_FAST16_MAX;
10874 uint_fast32_t f3 = UINT_FAST32_MAX;
10875 uint_fast64_t f4 = UINT_FAST64_MAX;
10877 intptr_t g = INTPTR_MAX;
10878 intptr_t gmin = INTPTR_MIN;
10881 uintptr_t h = UINTPTR_MAX;
10883 intmax_t i = INTMAX_MAX;
10884 uintmax_t j = UINTMAX_MAX;
10886 #include <limits.h> /* for CHAR_BIT */
10887 #define TYPE_MINIMUM(t) \
10888 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
10889 #define TYPE_MAXIMUM(t) \
10890 ((t) ((t) 0 < (t) -1 \
10892 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
10895 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
10896 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
10898 /* Detect bug in FreeBSD 6.0 / ia64. */
10899 int check_SIG_ATOMIC:
10900 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
10901 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
10903 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
10905 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
10906 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
10908 /* Detect bug in mingw. */
10910 WINT_MIN == TYPE_MINIMUM (wint_t)
10911 && WINT_MAX == TYPE_MAXIMUM (wint_t)
10914 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
10916 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
10917 int check_UINT16_C:
10918 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
10920 /* Detect bugs in OpenBSD 3.9 stdint.h. */
10922 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
10925 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
10928 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
10931 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
10933 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
10934 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
10935 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
10936 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
10937 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
10938 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
10939 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
10940 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
10941 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
10942 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
10943 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
10954 if ac_fn_c_try_compile "$LINENO"; then :
10955 if test "$cross_compiling" = yes; then :
10956 gl_cv_header_working_stdint_h=yes
10959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10960 /* end confdefs.h. */
10963 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
10964 #include <stdint.h>
10967 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
10968 included before <wchar.h>. */
10969 #include <stddef.h>
10970 #include <signal.h>
10972 # include <stdio.h>
10974 # include <wchar.h>
10979 #include <string.h>
10980 #define MVAL(macro) MVAL1(macro)
10981 #define MVAL1(expression) #expression
10982 static const char *macro_values[] =
11016 for (mv = macro_values; *mv != NULL; mv++)
11018 const char *value = *mv;
11019 /* Test whether it looks like a cast expression. */
11020 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
11021 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
11022 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
11023 || strncmp (value, "((int)"/*)*/, 6) == 0
11024 || strncmp (value, "((signed short)"/*)*/, 15) == 0
11025 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
11026 return mv - macro_values + 1;
11034 if ac_fn_c_try_run "$LINENO"; then :
11035 gl_cv_header_working_stdint_h=yes
11037 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11038 conftest.$ac_objext conftest.beam conftest.$ac_ext
11043 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11046 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
11047 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
11049 if test "$gl_cv_header_working_stdint_h" = yes; then
11052 for ac_header in sys/inttypes.h sys/bitypes.h
11054 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11055 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11056 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11057 cat >>confdefs.h <<_ACEOF
11058 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11065 if test $ac_cv_header_sys_inttypes_h = yes; then
11066 HAVE_SYS_INTTYPES_H=1
11068 HAVE_SYS_INTTYPES_H=0
11071 if test $ac_cv_header_sys_bitypes_h = yes; then
11072 HAVE_SYS_BITYPES_H=1
11074 HAVE_SYS_BITYPES_H=0
11080 if test $APPLE_UNIVERSAL_BUILD = 0; then
11083 for gltype in ptrdiff_t size_t ; do
11084 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
11085 $as_echo_n "checking for bit size of $gltype... " >&6; }
11086 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
11087 $as_echo_n "(cached) " >&6
11089 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
11090 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11091 included before <wchar.h>. */
11092 #include <stddef.h>
11093 #include <signal.h>
11095 # include <stdio.h>
11097 # include <wchar.h>
11100 #include <limits.h>"; then :
11106 eval gl_cv_bitsizeof_${gltype}=\$result
11109 eval ac_res=\$gl_cv_bitsizeof_${gltype}
11110 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11111 $as_echo "$ac_res" >&6; }
11112 eval result=\$gl_cv_bitsizeof_${gltype}
11113 if test $result = unknown; then
11116 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11117 cat >>confdefs.h <<_ACEOF
11118 #define BITSIZEOF_${GLTYPE} $result
11121 eval BITSIZEOF_${GLTYPE}=\$result
11128 for gltype in sig_atomic_t wchar_t wint_t ; do
11129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
11130 $as_echo_n "checking for bit size of $gltype... " >&6; }
11131 if eval \${gl_cv_bitsizeof_${gltype}+:} false; then :
11132 $as_echo_n "(cached) " >&6
11134 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
11135 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11136 included before <wchar.h>. */
11137 #include <stddef.h>
11138 #include <signal.h>
11140 # include <stdio.h>
11142 # include <wchar.h>
11145 #include <limits.h>"; then :
11151 eval gl_cv_bitsizeof_${gltype}=\$result
11154 eval ac_res=\$gl_cv_bitsizeof_${gltype}
11155 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11156 $as_echo "$ac_res" >&6; }
11157 eval result=\$gl_cv_bitsizeof_${gltype}
11158 if test $result = unknown; then
11161 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11162 cat >>confdefs.h <<_ACEOF
11163 #define BITSIZEOF_${GLTYPE} $result
11166 eval BITSIZEOF_${GLTYPE}=\$result
11172 for gltype in sig_atomic_t wchar_t wint_t ; do
11173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
11174 $as_echo_n "checking whether $gltype is signed... " >&6; }
11175 if eval \${gl_cv_type_${gltype}_signed+:} false; then :
11176 $as_echo_n "(cached) " >&6
11178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11179 /* end confdefs.h. */
11181 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11182 included before <wchar.h>. */
11183 #include <stddef.h>
11184 #include <signal.h>
11186 # include <stdio.h>
11188 # include <wchar.h>
11191 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
11200 if ac_fn_c_try_compile "$LINENO"; then :
11205 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11206 eval gl_cv_type_${gltype}_signed=\$result
11209 eval ac_res=\$gl_cv_type_${gltype}_signed
11210 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11211 $as_echo "$ac_res" >&6; }
11212 eval result=\$gl_cv_type_${gltype}_signed
11213 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11214 if test "$result" = yes; then
11215 cat >>confdefs.h <<_ACEOF
11216 #define HAVE_SIGNED_${GLTYPE} 1
11219 eval HAVE_SIGNED_${GLTYPE}=1
11221 eval HAVE_SIGNED_${GLTYPE}=0
11226 gl_cv_type_ptrdiff_t_signed=yes
11227 gl_cv_type_size_t_signed=no
11228 if test $APPLE_UNIVERSAL_BUILD = 0; then
11231 for gltype in ptrdiff_t size_t ; do
11232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11233 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
11234 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
11235 $as_echo_n "(cached) " >&6
11237 eval gl_cv_type_${gltype}_suffix=no
11238 eval result=\$gl_cv_type_${gltype}_signed
11239 if test "$result" = yes; then
11244 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11246 '') gltype1='int';;
11247 l) gltype1='long int';;
11248 ll) gltype1='long long int';;
11249 i64) gltype1='__int64';;
11250 u) gltype1='unsigned int';;
11251 ul) gltype1='unsigned long int';;
11252 ull) gltype1='unsigned long long int';;
11253 ui64)gltype1='unsigned __int64';;
11255 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11256 /* end confdefs.h. */
11258 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11259 included before <wchar.h>. */
11260 #include <stddef.h>
11261 #include <signal.h>
11263 # include <stdio.h>
11265 # include <wchar.h>
11268 extern $gltype foo;
11269 extern $gltype1 foo;
11278 if ac_fn_c_try_compile "$LINENO"; then :
11279 eval gl_cv_type_${gltype}_suffix=\$glsuf
11281 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11282 eval result=\$gl_cv_type_${gltype}_suffix
11283 test "$result" != no && break
11286 eval ac_res=\$gl_cv_type_${gltype}_suffix
11287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11288 $as_echo "$ac_res" >&6; }
11289 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11290 eval result=\$gl_cv_type_${gltype}_suffix
11291 test "$result" = no && result=
11292 eval ${GLTYPE}_SUFFIX=\$result
11293 cat >>confdefs.h <<_ACEOF
11294 #define ${GLTYPE}_SUFFIX $result
11303 for gltype in sig_atomic_t wchar_t wint_t ; do
11304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
11305 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
11306 if eval \${gl_cv_type_${gltype}_suffix+:} false; then :
11307 $as_echo_n "(cached) " >&6
11309 eval gl_cv_type_${gltype}_suffix=no
11310 eval result=\$gl_cv_type_${gltype}_signed
11311 if test "$result" = yes; then
11316 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do
11318 '') gltype1='int';;
11319 l) gltype1='long int';;
11320 ll) gltype1='long long int';;
11321 i64) gltype1='__int64';;
11322 u) gltype1='unsigned int';;
11323 ul) gltype1='unsigned long int';;
11324 ull) gltype1='unsigned long long int';;
11325 ui64)gltype1='unsigned __int64';;
11327 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11328 /* end confdefs.h. */
11330 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
11331 included before <wchar.h>. */
11332 #include <stddef.h>
11333 #include <signal.h>
11335 # include <stdio.h>
11337 # include <wchar.h>
11340 extern $gltype foo;
11341 extern $gltype1 foo;
11350 if ac_fn_c_try_compile "$LINENO"; then :
11351 eval gl_cv_type_${gltype}_suffix=\$glsuf
11353 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11354 eval result=\$gl_cv_type_${gltype}_suffix
11355 test "$result" != no && break
11358 eval ac_res=\$gl_cv_type_${gltype}_suffix
11359 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11360 $as_echo "$ac_res" >&6; }
11361 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
11362 eval result=\$gl_cv_type_${gltype}_suffix
11363 test "$result" = no && result=
11364 eval ${GLTYPE}_SUFFIX=\$result
11365 cat >>confdefs.h <<_ACEOF
11366 #define ${GLTYPE}_SUFFIX $result
11373 if test $BITSIZEOF_WINT_T -lt 32; then
11374 BITSIZEOF_WINT_T=32
11380 if test -n "$STDINT_H"; then
11381 GL_GENERATE_STDINT_H_TRUE=
11382 GL_GENERATE_STDINT_H_FALSE='#'
11384 GL_GENERATE_STDINT_H_TRUE='#'
11385 GL_GENERATE_STDINT_H_FALSE=
11390 REPLACE_STRERROR_0=0
11391 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
11392 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
11393 if ${gl_cv_func_strerror_0_works+:} false; then :
11394 $as_echo_n "(cached) " >&6
11396 if test "$cross_compiling" = yes; then :
11397 gl_cv_func_strerror_0_works="guessing no"
11399 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11400 /* end confdefs.h. */
11401 #include <string.h>
11410 str = strerror (0);
11411 if (!*str) result |= 1;
11412 if (errno) result |= 2;
11413 if (strstr (str, "nknown") || strstr (str, "ndefined"))
11420 if ac_fn_c_try_run "$LINENO"; then :
11421 gl_cv_func_strerror_0_works=yes
11423 gl_cv_func_strerror_0_works=no
11425 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11426 conftest.$ac_objext conftest.beam conftest.$ac_ext
11431 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
11432 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
11433 if test "$gl_cv_func_strerror_0_works" != yes; then
11434 REPLACE_STRERROR_0=1
11436 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
11451 if test $gl_cv_have_include_next = yes; then
11452 gl_cv_next_string_h='<'string.h'>'
11454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
11455 $as_echo_n "checking absolute name of <string.h>... " >&6; }
11456 if ${gl_cv_next_string_h+:} false; then :
11457 $as_echo_n "(cached) " >&6
11460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11461 /* end confdefs.h. */
11462 #include <string.h>
11466 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11467 *) gl_absname_cpp="$ac_cpp" ;;
11472 gl_dirsep_regex='[/\\]'
11475 gl_dirsep_regex='\/'
11478 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11480 gl_header_literal_regex=`echo 'string.h' \
11481 | sed -e "$gl_make_literal_regex_sed"`
11482 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11483 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11488 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11489 sed -n "$gl_absolute_header_sed"`'"'
11493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
11494 $as_echo "$gl_cv_next_string_h" >&6; }
11496 NEXT_STRING_H=$gl_cv_next_string_h
11498 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11499 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11500 gl_next_as_first_directive='<'string.h'>'
11502 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11503 gl_next_as_first_directive=$gl_cv_next_string_h
11505 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive
11512 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
11513 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
11514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
11515 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
11516 if eval \${$as_gl_Symbol+:} false; then :
11517 $as_echo_n "(cached) " >&6
11519 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11520 /* end confdefs.h. */
11521 #include <string.h>
11532 if ac_fn_c_try_compile "$LINENO"; then :
11533 eval "$as_gl_Symbol=yes"
11535 eval "$as_gl_Symbol=no"
11537 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11539 eval ac_res=\$$as_gl_Symbol
11540 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
11541 $as_echo "$ac_res" >&6; }
11542 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
11543 cat >>confdefs.h <<_ACEOF
11544 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
11547 eval ac_cv_have_decl_$gl_func=yes
11552 ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default"
11553 if test "x$ac_cv_have_decl_strndup" = xyes; then :
11559 cat >>confdefs.h <<_ACEOF
11560 #define HAVE_DECL_STRNDUP $ac_have_decl
11565 ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
11566 if test "x$ac_cv_have_decl_strnlen" = xyes; then :
11572 cat >>confdefs.h <<_ACEOF
11573 #define HAVE_DECL_STRNLEN $ac_have_decl
11576 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
11577 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
11578 if ${ac_cv_header_stat_broken+:} false; then :
11579 $as_echo_n "(cached) " >&6
11581 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11582 /* end confdefs.h. */
11583 #include <sys/types.h>
11584 #include <sys/stat.h>
11586 #if defined S_ISBLK && defined S_IFDIR
11587 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
11590 #if defined S_ISBLK && defined S_IFCHR
11591 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
11594 #if defined S_ISLNK && defined S_IFREG
11595 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
11598 #if defined S_ISSOCK && defined S_IFREG
11599 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
11603 if ac_fn_c_try_compile "$LINENO"; then :
11604 ac_cv_header_stat_broken=no
11606 ac_cv_header_stat_broken=yes
11608 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11610 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
11611 $as_echo "$ac_cv_header_stat_broken" >&6; }
11612 if test $ac_cv_header_stat_broken = yes; then
11614 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
11622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
11623 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
11624 if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then :
11625 $as_echo_n "(cached) " >&6
11627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11628 /* end confdefs.h. */
11634 static struct timespec x; x.tv_sec = x.tv_nsec;
11639 if ac_fn_c_try_compile "$LINENO"; then :
11640 gl_cv_sys_struct_timespec_in_time_h=yes
11642 gl_cv_sys_struct_timespec_in_time_h=no
11644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
11647 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
11649 TIME_H_DEFINES_STRUCT_TIMESPEC=0
11650 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0
11651 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0
11652 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
11653 TIME_H_DEFINES_STRUCT_TIMESPEC=1
11655 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
11656 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
11657 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then :
11658 $as_echo_n "(cached) " >&6
11660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11661 /* end confdefs.h. */
11662 #include <sys/time.h>
11667 static struct timespec x; x.tv_sec = x.tv_nsec;
11672 if ac_fn_c_try_compile "$LINENO"; then :
11673 gl_cv_sys_struct_timespec_in_sys_time_h=yes
11675 gl_cv_sys_struct_timespec_in_sys_time_h=no
11677 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
11680 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
11681 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
11682 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1
11684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
11685 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
11686 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then :
11687 $as_echo_n "(cached) " >&6
11689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11690 /* end confdefs.h. */
11691 #include <pthread.h>
11696 static struct timespec x; x.tv_sec = x.tv_nsec;
11701 if ac_fn_c_try_compile "$LINENO"; then :
11702 gl_cv_sys_struct_timespec_in_pthread_h=yes
11704 gl_cv_sys_struct_timespec_in_pthread_h=no
11706 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
11709 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
11710 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
11711 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1
11730 if test $gl_cv_have_include_next = yes; then
11731 gl_cv_next_time_h='<'time.h'>'
11733 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
11734 $as_echo_n "checking absolute name of <time.h>... " >&6; }
11735 if ${gl_cv_next_time_h+:} false; then :
11736 $as_echo_n "(cached) " >&6
11739 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11740 /* end confdefs.h. */
11745 aix*) gl_absname_cpp="$ac_cpp -C" ;;
11746 *) gl_absname_cpp="$ac_cpp" ;;
11751 gl_dirsep_regex='[/\\]'
11754 gl_dirsep_regex='\/'
11757 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
11759 gl_header_literal_regex=`echo 'time.h' \
11760 | sed -e "$gl_make_literal_regex_sed"`
11761 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11762 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11767 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11768 sed -n "$gl_absolute_header_sed"`'"'
11772 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
11773 $as_echo "$gl_cv_next_time_h" >&6; }
11775 NEXT_TIME_H=$gl_cv_next_time_h
11777 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
11778 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11779 gl_next_as_first_directive='<'time.h'>'
11781 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11782 gl_next_as_first_directive=$gl_cv_next_time_h
11784 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive
11791 ac_fn_c_check_decl "$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "$ac_includes_default"
11792 if test "x$ac_cv_have_decl_localtime_r" = xyes; then :
11798 cat >>confdefs.h <<_ACEOF
11799 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
11806 ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
11807 if test "x$ac_cv_have_decl_unsetenv" = xyes; then :
11813 cat >>confdefs.h <<_ACEOF
11814 #define HAVE_DECL_UNSETENV $ac_have_decl
11818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the utimes function works" >&5
11819 $as_echo_n "checking whether the utimes function works... " >&6; }
11820 if ${gl_cv_func_working_utimes+:} false; then :
11821 $as_echo_n "(cached) " >&6
11824 if test "$cross_compiling" = yes; then :
11825 gl_cv_func_working_utimes=no
11827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11828 /* end confdefs.h. */
11830 #include <sys/types.h>
11831 #include <sys/stat.h>
11833 #include <sys/time.h>
11835 #include <unistd.h>
11836 #include <stdlib.h>
11841 inorder (time_t a, time_t b, time_t c)
11843 return a <= b && b <= c;
11850 char const *file = "conftest.utimes";
11851 static struct timeval timeval[2] = {{9, 10}, {999999, 999999}};
11853 /* Test whether utimes() essentially works. */
11856 FILE *f = fopen (file, "w");
11859 else if (fclose (f) != 0)
11861 else if (utimes (file, timeval) != 0)
11863 else if (lstat (file, &sbuf) != 0)
11865 else if (!(sbuf.st_atime == timeval[0].tv_sec
11866 && sbuf.st_mtime == timeval[1].tv_sec))
11868 if (unlink (file) != 0)
11872 /* Test whether utimes() with a NULL argument sets the file's timestamp
11873 to the current time. Use 'fstat' as well as 'time' to
11874 determine the "current" time, to accommodate NFS file systems
11875 if there is a time skew between the host and the NFS server. */
11877 int fd = open (file, O_WRONLY|O_CREAT, 0644);
11883 struct stat st0, st1, st2;
11884 if (time (&t0) == (time_t) -1)
11886 else if (fstat (fd, &st0) != 0)
11888 else if (utimes (file, timeval) != 0)
11890 else if (utimes (file, NULL) != 0)
11892 else if (fstat (fd, &st1) != 0)
11894 else if (write (fd, "\n", 1) != 1)
11896 else if (fstat (fd, &st2) != 0)
11898 else if (time (&t2) == (time_t) -1)
11902 int m_ok_POSIX = inorder (t0, st1.st_mtime, t2);
11903 int m_ok_NFS = inorder (st0.st_mtime, st1.st_mtime, st2.st_mtime);
11904 if (! (st1.st_atime == st1.st_mtime))
11906 if (! (m_ok_POSIX || m_ok_NFS))
11909 if (close (fd) != 0)
11912 if (unlink (file) != 0)
11916 /* Test whether utimes() with a NULL argument works on read-only files. */
11918 int fd = open (file, O_WRONLY|O_CREAT, 0444);
11921 else if (close (fd) != 0)
11923 else if (utimes (file, NULL) != 0)
11925 if (unlink (file) != 0)
11933 if ac_fn_c_try_run "$LINENO"; then :
11934 gl_cv_func_working_utimes=yes
11936 gl_cv_func_working_utimes=no
11938 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11939 conftest.$ac_objext conftest.beam conftest.$ac_ext
11943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_utimes" >&5
11944 $as_echo "$gl_cv_func_working_utimes" >&6; }
11946 if test $gl_cv_func_working_utimes = yes; then
11948 $as_echo "#define HAVE_WORKING_UTIMES 1" >>confdefs.h
11956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct utimbuf" >&5
11957 $as_echo_n "checking for struct utimbuf... " >&6; }
11958 if ${gl_cv_sys_struct_utimbuf+:} false; then :
11959 $as_echo_n "(cached) " >&6
11961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11962 /* end confdefs.h. */
11963 #if HAVE_SYS_TIME_H
11964 #include <sys/time.h>
11967 #ifdef HAVE_UTIME_H
11974 static struct utimbuf x; x.actime = x.modtime;
11979 if ac_fn_c_try_compile "$LINENO"; then :
11980 gl_cv_sys_struct_utimbuf=yes
11982 gl_cv_sys_struct_utimbuf=no
11984 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11986 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_utimbuf" >&5
11987 $as_echo "$gl_cv_sys_struct_utimbuf" >&6; }
11989 if test $gl_cv_sys_struct_utimbuf = yes; then
11991 $as_echo "#define HAVE_STRUCT_UTIMBUF 1" >>confdefs.h
12008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
12009 $as_echo_n "checking for wint_t... " >&6; }
12010 if ${gt_cv_c_wint_t+:} false; then :
12011 $as_echo_n "(cached) " >&6
12013 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12014 /* end confdefs.h. */
12016 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12018 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included
12019 before <wchar.h>. */
12020 #include <stddef.h>
12024 wint_t foo = (wchar_t)'\0';
12033 if ac_fn_c_try_compile "$LINENO"; then :
12038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
12041 $as_echo "$gt_cv_c_wint_t" >&6; }
12042 if test $gt_cv_c_wint_t = yes; then
12044 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
12052 if test $ac_cv_header_features_h = yes; then
12060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5
12061 $as_echo_n "checking for inttypes.h... " >&6; }
12062 if ${gl_cv_header_inttypes_h+:} false; then :
12063 $as_echo_n "(cached) " >&6
12065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12066 /* end confdefs.h. */
12068 #include <sys/types.h>
12069 #include <inttypes.h>
12074 uintmax_t i = (uintmax_t) -1; return !i;
12079 if ac_fn_c_try_compile "$LINENO"; then :
12080 gl_cv_header_inttypes_h=yes
12082 gl_cv_header_inttypes_h=no
12084 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5
12087 $as_echo "$gl_cv_header_inttypes_h" >&6; }
12088 if test $gl_cv_header_inttypes_h = yes; then
12090 cat >>confdefs.h <<_ACEOF
12091 #define HAVE_INTTYPES_H_WITH_UINTMAX 1
12097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5
12098 $as_echo_n "checking for stdint.h... " >&6; }
12099 if ${gl_cv_header_stdint_h+:} false; then :
12100 $as_echo_n "(cached) " >&6
12102 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12103 /* end confdefs.h. */
12104 #include <sys/types.h>
12105 #include <stdint.h>
12109 uintmax_t i = (uintmax_t) -1; return !i;
12114 if ac_fn_c_try_compile "$LINENO"; then :
12115 gl_cv_header_stdint_h=yes
12117 gl_cv_header_stdint_h=no
12119 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12121 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5
12122 $as_echo "$gl_cv_header_stdint_h" >&6; }
12123 if test $gl_cv_header_stdint_h = yes; then
12125 cat >>confdefs.h <<_ACEOF
12126 #define HAVE_STDINT_H_WITH_UINTMAX 1
12134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5
12135 $as_echo_n "checking for intmax_t... " >&6; }
12136 if ${gt_cv_c_intmax_t+:} false; then :
12137 $as_echo_n "(cached) " >&6
12139 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12140 /* end confdefs.h. */
12142 #include <stddef.h>
12143 #include <stdlib.h>
12144 #if HAVE_STDINT_H_WITH_UINTMAX
12145 #include <stdint.h>
12147 #if HAVE_INTTYPES_H_WITH_UINTMAX
12148 #include <inttypes.h>
12154 intmax_t x = -1; return !x;
12159 if ac_fn_c_try_compile "$LINENO"; then :
12160 gt_cv_c_intmax_t=yes
12162 gt_cv_c_intmax_t=no
12164 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5
12167 $as_echo "$gt_cv_c_intmax_t" >&6; }
12168 if test $gt_cv_c_intmax_t = yes; then
12170 $as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h
12174 test $ac_cv_type_long_long_int = yes \
12175 && ac_type='long long' \
12178 cat >>confdefs.h <<_ACEOF
12179 #define intmax_t $ac_type
12185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
12186 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
12187 if ${gl_cv_cc_double_expbit0+:} false; then :
12188 $as_echo_n "(cached) " >&6
12191 if test "$cross_compiling" = yes; then :
12193 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12194 /* end confdefs.h. */
12196 #if defined arm || defined __arm || defined __arm__
12201 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12202 $EGREP "mixed_endianness" >/dev/null 2>&1; then :
12203 gl_cv_cc_double_expbit0="unknown"
12207 if ${ac_cv_c_bigendian+:} false; then :
12208 $as_echo_n "(cached) " >&6
12210 ac_cv_c_bigendian=unknown
12211 # See if we're dealing with a universal compiler.
12212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12213 /* end confdefs.h. */
12214 #ifndef __APPLE_CC__
12215 not a universal capable compiler
12220 if ac_fn_c_try_compile "$LINENO"; then :
12222 # Check for potential -arch flags. It is not universal unless
12223 # there are at least two -arch flags with different values.
12226 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
12227 if test -n "$ac_prev"; then
12229 i?86 | x86_64 | ppc | ppc64)
12230 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
12233 ac_cv_c_bigendian=universal
12239 elif test "x$ac_word" = "x-arch"; then
12244 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12245 if test $ac_cv_c_bigendian = unknown; then
12246 # See if sys/param.h defines the BYTE_ORDER macro.
12247 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12248 /* end confdefs.h. */
12249 #include <sys/types.h>
12250 #include <sys/param.h>
12255 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
12256 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
12258 bogus endian macros
12265 if ac_fn_c_try_compile "$LINENO"; then :
12266 # It does; now see whether it defined to BIG_ENDIAN or not.
12267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12268 /* end confdefs.h. */
12269 #include <sys/types.h>
12270 #include <sys/param.h>
12275 #if BYTE_ORDER != BIG_ENDIAN
12283 if ac_fn_c_try_compile "$LINENO"; then :
12284 ac_cv_c_bigendian=yes
12286 ac_cv_c_bigendian=no
12288 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12290 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12292 if test $ac_cv_c_bigendian = unknown; then
12293 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
12294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12295 /* end confdefs.h. */
12296 #include <limits.h>
12301 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
12302 bogus endian macros
12309 if ac_fn_c_try_compile "$LINENO"; then :
12310 # It does; now see whether it defined to _BIG_ENDIAN or not.
12311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12312 /* end confdefs.h. */
12313 #include <limits.h>
12318 #ifndef _BIG_ENDIAN
12326 if ac_fn_c_try_compile "$LINENO"; then :
12327 ac_cv_c_bigendian=yes
12329 ac_cv_c_bigendian=no
12331 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12333 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12335 if test $ac_cv_c_bigendian = unknown; then
12336 # Compile a test program.
12337 if test "$cross_compiling" = yes; then :
12338 # Try to guess by grepping values from an object file.
12339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12340 /* end confdefs.h. */
12341 short int ascii_mm[] =
12342 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
12343 short int ascii_ii[] =
12344 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
12345 int use_ascii (int i) {
12346 return ascii_mm[i] + ascii_ii[i];
12348 short int ebcdic_ii[] =
12349 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
12350 short int ebcdic_mm[] =
12351 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
12352 int use_ebcdic (int i) {
12353 return ebcdic_mm[i] + ebcdic_ii[i];
12360 return use_ascii (foo) == use_ebcdic (foo);
12365 if ac_fn_c_try_compile "$LINENO"; then :
12366 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12367 ac_cv_c_bigendian=yes
12369 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12370 if test "$ac_cv_c_bigendian" = unknown; then
12371 ac_cv_c_bigendian=no
12373 # finding both strings is unlikely to happen, but who knows?
12374 ac_cv_c_bigendian=unknown
12378 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12380 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12381 /* end confdefs.h. */
12382 $ac_includes_default
12387 /* Are we little or big endian? From Harbison&Steele. */
12391 char c[sizeof (long int)];
12394 return u.c[sizeof (long int) - 1] == 1;
12400 if ac_fn_c_try_run "$LINENO"; then :
12401 ac_cv_c_bigendian=no
12403 ac_cv_c_bigendian=yes
12405 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12406 conftest.$ac_objext conftest.beam conftest.$ac_ext
12412 case $ac_cv_c_bigendian in #(
12414 gl_cv_cc_double_expbit0="word 0 bit 20";; #(
12416 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #(
12419 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12423 gl_cv_cc_double_expbit0="unknown" ;;
12432 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12433 /* end confdefs.h. */
12436 #include <stddef.h>
12438 #include <string.h>
12440 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
12441 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
12442 static unsigned int ored_words[NWORDS];
12443 static unsigned int anded_words[NWORDS];
12444 static void add_to_ored_words (double x)
12448 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
12449 memset (&m, 0, sizeof (memory_double));
12451 for (i = 0; i < NWORDS; i++)
12453 ored_words[i] |= m.word[i];
12454 anded_words[i] &= m.word[i];
12460 FILE *fp = fopen ("conftest.out", "w");
12463 for (j = 0; j < NWORDS; j++)
12464 anded_words[j] = ~ (unsigned int) 0;
12465 add_to_ored_words (0.25);
12466 add_to_ored_words (0.5);
12467 add_to_ored_words (1.0);
12468 add_to_ored_words (2.0);
12469 add_to_ored_words (4.0);
12470 /* Remove bits that are common (e.g. if representation of the first mantissa
12471 bit is explicit). */
12472 for (j = 0; j < NWORDS; j++)
12473 ored_words[j] &= ~anded_words[j];
12474 /* Now find the nonzero word. */
12475 for (j = 0; j < NWORDS; j++)
12476 if (ored_words[j] != 0)
12481 for (i = j + 1; i < NWORDS; i++)
12482 if (ored_words[i] != 0)
12484 fprintf (fp, "unknown");
12485 return (fclose (fp) != 0);
12488 if ((ored_words[j] >> i) & 1)
12490 fprintf (fp, "word %d bit %d", (int) j, (int) i);
12491 return (fclose (fp) != 0);
12494 fprintf (fp, "unknown");
12495 return (fclose (fp) != 0);
12499 if ac_fn_c_try_run "$LINENO"; then :
12500 gl_cv_cc_double_expbit0=`cat conftest.out`
12502 gl_cv_cc_double_expbit0="unknown"
12504 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12505 conftest.$ac_objext conftest.beam conftest.$ac_ext
12511 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
12512 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
12513 case "$gl_cv_cc_double_expbit0" in
12515 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
12516 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
12518 cat >>confdefs.h <<_ACEOF
12519 #define DBL_EXPBIT0_WORD $word
12523 cat >>confdefs.h <<_ACEOF
12524 #define DBL_EXPBIT0_BIT $bit
12538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5
12539 $as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; }
12540 if ${gl_cv_func_snprintf_retval_c99+:} false; then :
12541 $as_echo_n "(cached) " >&6
12544 if test "$cross_compiling" = yes; then :
12547 # Guess yes on glibc systems.
12548 *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";;
12549 # Guess yes on FreeBSD >= 5.
12550 freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";;
12551 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
12552 # Guess yes on MacOS X >= 10.3.
12553 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";;
12554 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";;
12555 # Guess yes on OpenBSD >= 3.9.
12556 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*)
12557 gl_cv_func_snprintf_retval_c99="guessing no";;
12558 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
12559 # Guess yes on Solaris >= 2.10.
12560 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";;
12561 solaris*) gl_cv_func_printf_sizes_c99="guessing no";;
12562 # Guess yes on AIX >= 4.
12563 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";;
12564 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";;
12565 # Guess yes on NetBSD >= 3.
12566 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*)
12567 gl_cv_func_snprintf_retval_c99="guessing no";;
12568 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";;
12569 # Guess yes on BeOS.
12570 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";;
12571 # If we don't know, assume the worst.
12572 *) gl_cv_func_snprintf_retval_c99="guessing no";;
12576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12577 /* end confdefs.h. */
12580 #include <string.h>
12582 # define my_snprintf snprintf
12584 # include <stdarg.h>
12585 static int my_snprintf (char *buf, int size, const char *format, ...)
12589 va_start (args, format);
12590 ret = vsnprintf (buf, size, format, args);
12595 static char buf[100];
12598 strcpy (buf, "ABCDEF");
12599 if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7)
12601 if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7)
12603 if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7)
12608 if ac_fn_c_try_run "$LINENO"; then :
12609 gl_cv_func_snprintf_retval_c99=yes
12611 gl_cv_func_snprintf_retval_c99=no
12613 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12614 conftest.$ac_objext conftest.beam conftest.$ac_ext
12619 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5
12620 $as_echo "$gl_cv_func_snprintf_retval_c99" >&6; }
12628 for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb
12630 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12631 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12632 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12633 cat >>confdefs.h <<_ACEOF
12634 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12640 ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h>
12642 if test "x$ac_cv_have_decl__snprintf" = xyes; then :
12648 cat >>confdefs.h <<_ACEOF
12649 #define HAVE_DECL__SNPRINTF $ac_have_decl
12654 case "$gl_cv_func_snprintf_retval_c99" in
12657 $as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h
12663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
12664 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
12665 if ${gl_cv_header_wchar_h_correct_inline+:} false; then :
12666 $as_echo_n "(cached) " >&6
12668 gl_cv_header_wchar_h_correct_inline=yes
12669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12670 /* end confdefs.h. */
12672 #define wcstod renamed_wcstod
12673 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12675 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12676 included before <wchar.h>. */
12677 #include <stddef.h>
12681 extern int zero (void);
12682 int main () { return zero(); }
12685 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12686 (eval $ac_compile) 2>&5
12688 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12689 test $ac_status = 0; }; then
12690 mv conftest.$ac_objext conftest1.$ac_objext
12691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12692 /* end confdefs.h. */
12694 #define wcstod renamed_wcstod
12695 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
12697 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
12698 included before <wchar.h>. */
12699 #include <stddef.h>
12703 int zero (void) { return 0; }
12706 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
12707 (eval $ac_compile) 2>&5
12709 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
12710 test $ac_status = 0; }; then
12711 mv conftest.$ac_objext conftest2.$ac_objext
12712 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then
12715 gl_cv_header_wchar_h_correct_inline=no
12719 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext
12722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
12723 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
12724 if test $gl_cv_header_wchar_h_correct_inline = no; then
12725 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
12726 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
12727 C99 mode. You have four options:
12728 - Add the flag -fgnu89-inline to CC and reconfigure, or
12729 - Fix your include files, using parts of
12730 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
12731 - Use a gcc version older than 4.3, or
12732 - Don't use the flags -std=c99 or -std=gnu99.
12733 Configuration aborted." "$LINENO" 5
12741 GNULIB_TOWCTRANS=0;
12745 REPLACE_ISWBLANK=0;
12753 GL_COND_LIBTOOL_TRUE=
12754 GL_COND_LIBTOOL_FALSE='#'
12756 GL_COND_LIBTOOL_TRUE='#'
12757 GL_COND_LIBTOOL_FALSE=
12760 gl_cond_libtool=false
12773 gl_source_base='lib'
12776 if test $ac_cv_func_alloca_works = no; then
12780 # Define an additional variable used in the Makefile substitution.
12781 if test $ac_cv_working_alloca_h = yes; then
12782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
12783 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
12784 if ${gl_cv_rpl_alloca+:} false; then :
12785 $as_echo_n "(cached) " >&6
12788 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12789 /* end confdefs.h. */
12791 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
12796 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12797 $EGREP "Need own alloca" >/dev/null 2>&1; then :
12798 gl_cv_rpl_alloca=yes
12800 gl_cv_rpl_alloca=no
12806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
12807 $as_echo "$gl_cv_rpl_alloca" >&6; }
12808 if test $gl_cv_rpl_alloca = yes; then
12810 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12820 if test -n "$ALLOCA_H"; then
12821 GL_GENERATE_ALLOCA_H_TRUE=
12822 GL_GENERATE_ALLOCA_H_FALSE='#'
12824 GL_GENERATE_ALLOCA_H_TRUE='#'
12825 GL_GENERATE_ALLOCA_H_FALSE=
12838 if test $ac_cv_func_canonicalize_file_name = no; then
12839 HAVE_CANONICALIZE_FILE_NAME=0
12840 if test $ac_cv_func_realpath = no; then
12842 elif test "$gl_cv_func_realpath_works" != yes; then
12845 elif test "$gl_cv_func_realpath_works" != yes; then
12846 REPLACE_CANONICALIZE_FILE_NAME=1
12850 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
12859 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
12864 cat >>confdefs.h <<_ACEOF
12865 #define GNULIB_CANONICALIZE_LGPL 1
12874 GNULIB_CANONICALIZE_FILE_NAME=1
12880 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
12895 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
12910 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
12917 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
12918 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
12920 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
12921 # programs in the package would end up linked with that potentially-shared
12922 # library, inducing unnecessary run-time overhead.
12925 gl_saved_libs=$LIBS
12926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
12927 $as_echo_n "checking for library containing clock_gettime... " >&6; }
12928 if ${ac_cv_search_clock_gettime+:} false; then :
12929 $as_echo_n "(cached) " >&6
12931 ac_func_search_save_LIBS=$LIBS
12932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12933 /* end confdefs.h. */
12935 /* Override any GCC internal prototype to avoid an error.
12936 Use char because int might match the return type of a GCC
12937 builtin and then its argument prototype would still apply. */
12941 char clock_gettime ();
12945 return clock_gettime ();
12950 for ac_lib in '' rt posix4; do
12951 if test -z "$ac_lib"; then
12952 ac_res="none required"
12955 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
12957 if ac_fn_c_try_link "$LINENO"; then :
12958 ac_cv_search_clock_gettime=$ac_res
12960 rm -f core conftest.err conftest.$ac_objext \
12962 if ${ac_cv_search_clock_gettime+:} false; then :
12966 if ${ac_cv_search_clock_gettime+:} false; then :
12969 ac_cv_search_clock_gettime=no
12971 rm conftest.$ac_ext
12972 LIBS=$ac_func_search_save_LIBS
12974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
12975 $as_echo "$ac_cv_search_clock_gettime" >&6; }
12976 ac_res=$ac_cv_search_clock_gettime
12977 if test "$ac_res" != no; then :
12978 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
12979 test "$ac_cv_search_clock_gettime" = "none required" ||
12980 LIB_CLOCK_GETTIME=$ac_cv_search_clock_gettime
12983 for ac_func in clock_gettime clock_settime
12985 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12986 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12987 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12988 cat >>confdefs.h <<_ACEOF
12989 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12995 LIBS=$gl_saved_libs
13000 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
13008 if test $ac_cv_header_sys_socket_h != yes; then
13009 for ac_header in winsock2.h
13011 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
13012 if test "x$ac_cv_header_winsock2_h" = xyes; then :
13013 cat >>confdefs.h <<_ACEOF
13014 #define HAVE_WINSOCK2_H 1
13022 if test "$ac_cv_header_winsock2_h" = yes; then
13024 UNISTD_H_HAVE_WINSOCK2_H=1
13025 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
13031 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
13037 if test $REPLACE_CLOSE = 1; then
13046 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext"
13060 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
13067 for ac_func in closedir
13069 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir"
13070 if test "x$ac_cv_func_closedir" = xyes; then :
13071 cat >>confdefs.h <<_ACEOF
13072 #define HAVE_CLOSEDIR 1
13078 if test $ac_cv_func_closedir = no; then
13083 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then
13092 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext"
13106 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
13111 if test "x$datarootdir" = x; then
13112 datarootdir='${datadir}'
13115 if test "x$docdir" = x; then
13116 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
13119 if test "x$htmldir" = x; then
13120 htmldir='${docdir}'
13123 if test "x$dvidir" = x; then
13127 if test "x$pdfdir" = x; then
13131 if test "x$psdir" = x; then
13135 if test "x$lispdir" = x; then
13136 lispdir='${datarootdir}/emacs/site-lisp'
13139 if test "x$localedir" = x; then
13140 localedir='${datarootdir}/locale'
13144 pkglibexecdir='${libexecdir}/${PACKAGE}'
13147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
13148 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
13149 if ${gl_cv_struct_dirent_d_ino+:} false; then :
13150 $as_echo_n "(cached) " >&6
13152 if test "$cross_compiling" = yes; then :
13153 gl_cv_struct_dirent_d_ino=no
13155 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13156 /* end confdefs.h. */
13157 #include <sys/types.h>
13158 #include <sys/stat.h>
13159 #include <dirent.h>
13164 DIR *dp = opendir (".");
13172 if (stat (e->d_name, &st) != 0)
13174 if (e->d_ino != st.st_ino)
13182 if ac_fn_c_try_run "$LINENO"; then :
13183 gl_cv_struct_dirent_d_ino=yes
13185 gl_cv_struct_dirent_d_ino=no
13187 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13188 conftest.$ac_objext conftest.beam conftest.$ac_ext
13192 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
13193 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
13194 if test $gl_cv_struct_dirent_d_ino = yes; then
13196 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
13213 if test $gl_cv_have_include_next = yes; then
13214 gl_cv_next_dirent_h='<'dirent.h'>'
13216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
13217 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
13218 if ${gl_cv_next_dirent_h+:} false; then :
13219 $as_echo_n "(cached) " >&6
13222 if test $ac_cv_header_dirent_h = yes; then
13225 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13226 /* end confdefs.h. */
13227 #include <dirent.h>
13231 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13232 *) gl_absname_cpp="$ac_cpp" ;;
13237 gl_dirsep_regex='[/\\]'
13240 gl_dirsep_regex='\/'
13243 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13245 gl_header_literal_regex=`echo 'dirent.h' \
13246 | sed -e "$gl_make_literal_regex_sed"`
13247 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13248 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13253 gl_cv_next_dirent_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13254 sed -n "$gl_absolute_header_sed"`'"'
13256 gl_cv_next_dirent_h='<'dirent.h'>'
13261 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
13262 $as_echo "$gl_cv_next_dirent_h" >&6; }
13264 NEXT_DIRENT_H=$gl_cv_next_dirent_h
13266 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13267 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13268 gl_next_as_first_directive='<'dirent.h'>'
13270 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13271 gl_next_as_first_directive=$gl_cv_next_dirent_h
13273 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive
13278 if test $ac_cv_header_dirent_h = yes; then
13286 for gl_func in alphasort closedir dirfd fdopendir opendir readdir rewinddir scandir; do
13287 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13289 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13290 if eval \${$as_gl_Symbol+:} false; then :
13291 $as_echo_n "(cached) " >&6
13293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13294 /* end confdefs.h. */
13295 #include <dirent.h>
13306 if ac_fn_c_try_compile "$LINENO"; then :
13307 eval "$as_gl_Symbol=yes"
13309 eval "$as_gl_Symbol=no"
13311 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13313 eval ac_res=\$$as_gl_Symbol
13314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13315 $as_echo "$ac_res" >&6; }
13316 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13317 cat >>confdefs.h <<_ACEOF
13318 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13321 eval ac_cv_have_decl_$gl_func=yes
13331 cat >>confdefs.h <<_ACEOF
13332 #define GNULIB_DIRENT_SAFER 1
13341 for ac_func in dirfd
13343 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd"
13344 if test "x$ac_cv_func_dirfd" = xyes; then :
13345 cat >>confdefs.h <<_ACEOF
13346 #define HAVE_DIRFD 1
13352 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
13353 #include <dirent.h>
13355 if test "x$ac_cv_have_decl_dirfd" = xyes; then :
13361 cat >>confdefs.h <<_ACEOF
13362 #define HAVE_DECL_DIRFD $ac_have_decl
13365 if test $ac_cv_have_decl_dirfd = no; then
13369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
13370 $as_echo_n "checking whether dirfd is a macro... " >&6; }
13371 if ${gl_cv_func_dirfd_macro+:} false; then :
13372 $as_echo_n "(cached) " >&6
13374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13375 /* end confdefs.h. */
13377 #include <sys/types.h>
13378 #include <dirent.h>
13380 dirent_header_defines_dirfd
13383 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13384 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then :
13385 gl_cv_func_dirfd_macro=yes
13387 gl_cv_func_dirfd_macro=no
13392 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
13393 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
13395 # Use the replacement only if we have no function or macro with that name.
13396 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
13397 if test $ac_cv_have_decl_dirfd = yes; then
13398 # If the system declares dirfd already, let's declare rpl_dirfd instead.
13403 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no; then
13412 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext"
13415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
13416 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
13417 if ${gl_cv_sys_dir_fd_member_name+:} false; then :
13418 $as_echo_n "(cached) " >&6
13421 dirfd_save_CFLAGS=$CFLAGS
13422 for ac_expr in d_fd dd_fd; do
13424 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
13425 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13426 /* end confdefs.h. */
13428 #include <sys/types.h>
13429 #include <dirent.h>
13433 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
13438 if ac_fn_c_try_compile "$LINENO"; then :
13442 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13443 CFLAGS=$dirfd_save_CFLAGS
13444 test "$dir_fd_found" = yes && break
13446 test "$dir_fd_found" = yes || ac_expr=no_such_member
13448 gl_cv_sys_dir_fd_member_name=$ac_expr
13452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
13453 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
13454 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then
13456 cat >>confdefs.h <<_ACEOF
13457 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
13475 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
13484 cat >>confdefs.h <<_ACEOF
13485 #define GNULIB_DIRNAME 1
13495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
13496 $as_echo_n "checking whether // is distinct from /... " >&6; }
13497 if ${gl_cv_double_slash_root+:} false; then :
13498 $as_echo_n "(cached) " >&6
13500 if test x"$cross_compiling" = xyes ; then
13501 # When cross-compiling, there is no way to tell whether // is special
13502 # short of a list of hosts. However, the only known hosts to date
13503 # that have a distinct // are Apollo DomainOS (too old to port to),
13504 # Cygwin, and z/OS. If anyone knows of another system for which // has
13505 # special semantics and is distinct from /, please report it to
13506 # <bug-gnulib@gnu.org>.
13508 *-cygwin | i370-ibm-openedition)
13509 gl_cv_double_slash_root=yes ;;
13511 # Be optimistic and assume that / and // are the same when we
13513 gl_cv_double_slash_root='unknown, assuming no' ;;
13516 set x `ls -di / // 2>/dev/null`
13517 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then
13518 gl_cv_double_slash_root=no
13520 gl_cv_double_slash_root=yes
13524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
13525 $as_echo "$gl_cv_double_slash_root" >&6; }
13526 if test "$gl_cv_double_slash_root" = yes; then
13528 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
13537 $as_echo "#define HAVE_DUP2 1" >>confdefs.h
13540 if test $HAVE_DUP2 = 1; then
13541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
13542 $as_echo_n "checking whether dup2 works... " >&6; }
13543 if ${gl_cv_func_dup2_works+:} false; then :
13544 $as_echo_n "(cached) " >&6
13546 if test "$cross_compiling" = yes; then :
13548 mingw*) # on this platform, dup2 always returns 0 for success
13549 gl_cv_func_dup2_works=no;;
13550 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0
13551 gl_cv_func_dup2_works=no;;
13552 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a
13553 # closed fd may yield -EBADF instead of -1 / errno=EBADF.
13554 gl_cv_func_dup2_works=no;;
13555 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF.
13556 gl_cv_func_dup2_works=no;;
13557 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
13558 gl_cv_func_dup2_works=no;;
13559 *) gl_cv_func_dup2_works=yes;;
13562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13563 /* end confdefs.h. */
13565 #include <unistd.h>
13573 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
13576 if (dup2 (1, 1) == 0)
13579 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
13583 if (dup2 (0, 0) != -1)
13585 /* Many gnulib modules require POSIX conformance of EBADF. */
13586 if (dup2 (2, 1000000) == -1 && errno != EBADF)
13595 if ac_fn_c_try_run "$LINENO"; then :
13596 gl_cv_func_dup2_works=yes
13598 gl_cv_func_dup2_works=no
13600 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13601 conftest.$ac_objext conftest.beam conftest.$ac_ext
13606 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
13607 $as_echo "$gl_cv_func_dup2_works" >&6; }
13608 if test "$gl_cv_func_dup2_works" = no; then
13614 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then
13623 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext"
13638 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
13654 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
13660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
13661 $as_echo_n "checking for error_at_line... " >&6; }
13662 if ${ac_cv_lib_error_at_line+:} false; then :
13663 $as_echo_n "(cached) " >&6
13665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13666 /* end confdefs.h. */
13671 error_at_line (0, 0, "", 0, "an error occurred");
13676 if ac_fn_c_try_link "$LINENO"; then :
13677 ac_cv_lib_error_at_line=yes
13679 ac_cv_lib_error_at_line=no
13681 rm -f core conftest.err conftest.$ac_objext \
13682 conftest$ac_exeext conftest.$ac_ext
13684 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
13685 $as_echo "$ac_cv_lib_error_at_line" >&6; }
13687 if test $ac_cv_lib_error_at_line = no; then
13696 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext"
13710 if test $ac_cv_func_fcntl = no; then
13714 if test $ac_cv_func_fcntl = no; then
13721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
13722 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
13723 if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then :
13724 $as_echo_n "(cached) " >&6
13726 if test "$cross_compiling" = yes; then :
13727 # Guess that it works on glibc systems
13728 case $host_os in #((
13729 *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";;
13730 *) gl_cv_func_fcntl_f_dupfd_works="guessing no";;
13733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13734 /* end confdefs.h. */
13743 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
13744 if (errno != EINVAL) result |= 2;
13751 if ac_fn_c_try_run "$LINENO"; then :
13752 gl_cv_func_fcntl_f_dupfd_works=yes
13754 gl_cv_func_fcntl_f_dupfd_works=no
13756 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13757 conftest.$ac_objext conftest.beam conftest.$ac_ext
13761 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
13762 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
13763 case $gl_cv_func_fcntl_f_dupfd_works in
13768 if test $ac_cv_func_fcntl = no; then
13775 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
13779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
13780 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
13781 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then :
13782 $as_echo_n "(cached) " >&6
13784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13785 /* end confdefs.h. */
13788 #ifndef F_DUPFD_CLOEXEC
13800 if ac_fn_c_try_compile "$LINENO"; then :
13801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13802 /* end confdefs.h. */
13805 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
13806 it to support the semantics on older kernels that failed with EINVAL. */
13818 if ac_fn_c_try_compile "$LINENO"; then :
13819 gl_cv_func_fcntl_f_dupfd_cloexec=yes
13821 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check"
13823 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13825 gl_cv_func_fcntl_f_dupfd_cloexec=no
13827 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
13830 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
13831 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then
13835 if test $ac_cv_func_fcntl = no; then
13845 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then
13854 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext"
13868 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
13883 if test $gl_cv_have_include_next = yes; then
13884 gl_cv_next_fcntl_h='<'fcntl.h'>'
13886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
13887 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
13888 if ${gl_cv_next_fcntl_h+:} false; then :
13889 $as_echo_n "(cached) " >&6
13892 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13893 /* end confdefs.h. */
13898 aix*) gl_absname_cpp="$ac_cpp -C" ;;
13899 *) gl_absname_cpp="$ac_cpp" ;;
13904 gl_dirsep_regex='[/\\]'
13907 gl_dirsep_regex='\/'
13910 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
13912 gl_header_literal_regex=`echo 'fcntl.h' \
13913 | sed -e "$gl_make_literal_regex_sed"`
13914 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13915 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13920 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13921 sed -n "$gl_absolute_header_sed"`'"'
13925 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
13926 $as_echo "$gl_cv_next_fcntl_h" >&6; }
13928 NEXT_FCNTL_H=$gl_cv_next_fcntl_h
13930 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
13931 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13932 gl_next_as_first_directive='<'fcntl.h'>'
13934 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13935 gl_next_as_first_directive=$gl_cv_next_fcntl_h
13937 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive
13948 for gl_func in fcntl openat; do
13949 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
13950 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
13951 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
13952 if eval \${$as_gl_Symbol+:} false; then :
13953 $as_echo_n "(cached) " >&6
13955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13956 /* end confdefs.h. */
13968 if ac_fn_c_try_compile "$LINENO"; then :
13969 eval "$as_gl_Symbol=yes"
13971 eval "$as_gl_Symbol=no"
13973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13975 eval ac_res=\$$as_gl_Symbol
13976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13977 $as_echo "$ac_res" >&6; }
13978 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
13979 cat >>confdefs.h <<_ACEOF
13980 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
13983 eval ac_cv_have_decl_$gl_func=yes
13992 REPLACE_FLOAT_LDBL=0
13994 aix* | beos* | openbsd* | mirbsd* | irix*)
13998 case "$host_cpu" in
14003 # On x86_64 systems, the C compiler may still be generating
14005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14006 /* end confdefs.h. */
14007 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
14011 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14012 $EGREP "yes" >/dev/null 2>&1; then :
14023 case "$host_cpu" in
14031 aix* | freebsd* | linux*)
14032 if test -n "$FLOAT_H"; then
14033 REPLACE_FLOAT_LDBL=1
14039 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
14040 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
14041 if ${gl_cv_func_itold_works+:} false; then :
14042 $as_echo_n "(cached) " >&6
14045 if test "$cross_compiling" = yes; then :
14048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14049 /* end confdefs.h. */
14050 #if defined __LP64__ || defined __arch64__
14054 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14055 $EGREP "yes" >/dev/null 2>&1; then :
14056 gl_cv_func_itold_works="guessing no"
14058 gl_cv_func_itold_works="guessing yes"
14063 *) gl_cv_func_itold_works="guessing yes" ;;
14067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14068 /* end confdefs.h. */
14071 volatile long double ld;
14080 if ac_fn_c_try_run "$LINENO"; then :
14081 gl_cv_func_itold_works=yes
14083 gl_cv_func_itold_works=no
14085 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14086 conftest.$ac_objext conftest.beam conftest.$ac_ext
14091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
14092 $as_echo "$gl_cv_func_itold_works" >&6; }
14093 case "$gl_cv_func_itold_works" in
14100 if test -n "$FLOAT_H"; then
14109 if test $gl_cv_have_include_next = yes; then
14110 gl_cv_next_float_h='<'float.h'>'
14112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
14113 $as_echo_n "checking absolute name of <float.h>... " >&6; }
14114 if ${gl_cv_next_float_h+:} false; then :
14115 $as_echo_n "(cached) " >&6
14118 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14119 /* end confdefs.h. */
14124 aix*) gl_absname_cpp="$ac_cpp -C" ;;
14125 *) gl_absname_cpp="$ac_cpp" ;;
14130 gl_dirsep_regex='[/\\]'
14133 gl_dirsep_regex='\/'
14136 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
14138 gl_header_literal_regex=`echo 'float.h' \
14139 | sed -e "$gl_make_literal_regex_sed"`
14140 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14141 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14146 gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14147 sed -n "$gl_absolute_header_sed"`'"'
14151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
14152 $as_echo "$gl_cv_next_float_h" >&6; }
14154 NEXT_FLOAT_H=$gl_cv_next_float_h
14156 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
14157 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14158 gl_next_as_first_directive='<'float.h'>'
14160 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14161 gl_next_as_first_directive=$gl_cv_next_float_h
14163 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive
14170 if test -n "$FLOAT_H"; then
14171 GL_GENERATE_FLOAT_H_TRUE=
14172 GL_GENERATE_FLOAT_H_FALSE='#'
14174 GL_GENERATE_FLOAT_H_TRUE='#'
14175 GL_GENERATE_FLOAT_H_FALSE=
14180 if test $REPLACE_FLOAT_LDBL = 1; then
14189 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext"
14192 if test $REPLACE_ITOLD = 1; then
14201 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext"
14207 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
14212 if test $REPLACE_FSTAT = 1; then
14221 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext"
14238 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
14245 if test $ac_cv_func_getdtablesize != yes; then
14246 HAVE_GETDTABLESIZE=0
14249 if test $HAVE_GETDTABLESIZE = 0; then
14258 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext"
14269 GNULIB_GETDTABLESIZE=1
14275 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
14284 if test $REPLACE_GETOPT = 1; then
14293 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
14303 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
14308 GNULIB_GL_UNISTD_H_GETOPT=1
14313 $as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h
14323 if test -n "$gl_replace_getopt"; then :
14330 if test $REPLACE_GETOPT = 1; then
14334 $as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h
14340 if test $REPLACE_GETOPT = 1; then
14349 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext"
14359 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext"
14364 GNULIB_GL_UNISTD_H_GETOPT=1
14380 gl_gettimeofday_timezone=void
14381 if test $ac_cv_func_gettimeofday != yes; then
14382 HAVE_GETTIMEOFDAY=0
14387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5
14388 $as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; }
14389 if ${gl_cv_func_gettimeofday_clobber+:} false; then :
14390 $as_echo_n "(cached) " >&6
14392 if test "$cross_compiling" = yes; then :
14393 gl_cv_func_gettimeofday_clobber=yes
14395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14396 /* end confdefs.h. */
14397 #include <string.h>
14398 #include <sys/time.h>
14400 #include <stdlib.h>
14408 struct tm saved_lt;
14410 lt = localtime (&t);
14412 gettimeofday (&tv, NULL);
14413 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0;
14419 if ac_fn_c_try_run "$LINENO"; then :
14420 gl_cv_func_gettimeofday_clobber=no
14422 gl_cv_func_gettimeofday_clobber=yes
14424 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14425 conftest.$ac_objext conftest.beam conftest.$ac_ext
14429 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5
14430 $as_echo "$gl_cv_func_gettimeofday_clobber" >&6; }
14432 if test $gl_cv_func_gettimeofday_clobber = yes; then
14433 REPLACE_GETTIMEOFDAY=1
14436 $as_echo "#define gmtime rpl_gmtime" >>confdefs.h
14439 $as_echo "#define localtime rpl_localtime" >>confdefs.h
14443 $as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h
14447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
14448 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
14449 if ${gl_cv_func_gettimeofday_posix_signature+:} false; then :
14450 $as_echo_n "(cached) " >&6
14452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14453 /* end confdefs.h. */
14454 #include <sys/time.h>
14456 int gettimeofday (struct timeval *restrict, void *restrict);
14461 /* glibc uses struct timezone * rather than the POSIX void *
14462 if _GNU_SOURCE is defined. However, since the only portable
14463 use of gettimeofday uses NULL as the second parameter, and
14464 since the glibc definition is actually more typesafe, it is
14465 not worth wrapping this to get a compliant signature. */
14466 int (*f) (struct timeval *restrict, void *restrict)
14469 return !(x | c.tv_sec | c.tv_usec);
14475 if ac_fn_c_try_compile "$LINENO"; then :
14476 gl_cv_func_gettimeofday_posix_signature=yes
14478 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14479 /* end confdefs.h. */
14480 #include <sys/time.h>
14481 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
14491 if ac_fn_c_try_compile "$LINENO"; then :
14492 gl_cv_func_gettimeofday_posix_signature=almost
14494 gl_cv_func_gettimeofday_posix_signature=no
14496 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14498 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
14501 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
14502 if test $gl_cv_func_gettimeofday_posix_signature = almost; then
14503 gl_gettimeofday_timezone='struct timezone'
14504 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
14505 REPLACE_GETTIMEOFDAY=1
14507 if test $REPLACE_STRUCT_TIMEVAL = 1; then
14508 REPLACE_GETTIMEOFDAY=1
14513 cat >>confdefs.h <<_ACEOF
14514 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
14518 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then
14527 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext"
14530 for ac_header in sys/timeb.h
14532 ac_fn_c_check_header_mongrel "$LINENO" "sys/timeb.h" "ac_cv_header_sys_timeb_h" "$ac_includes_default"
14533 if test "x$ac_cv_header_sys_timeb_h" = xyes; then :
14534 cat >>confdefs.h <<_ACEOF
14535 #define HAVE_SYS_TIMEB_H 1
14542 for ac_func in _ftime
14544 ac_fn_c_check_func "$LINENO" "_ftime" "ac_cv_func__ftime"
14545 if test "x$ac_cv_func__ftime" = xyes; then :
14546 cat >>confdefs.h <<_ACEOF
14547 #define HAVE__FTIME 1
14560 GNULIB_GETTIMEOFDAY=1
14566 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
14570 # Autoconf 2.61a.99 and earlier don't support linking a file only
14571 # in VPATH builds. But since GNUmakefile is for maintainer use
14572 # only, it does not matter if we skip the link with older autoconf.
14573 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH
14574 # builds, so use a shell variable to bypass this.
14575 GNUmakefile=GNUmakefile
14576 ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile"
14581 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler generally respects inline" >&5
14582 $as_echo_n "checking whether the compiler generally respects inline... " >&6; }
14583 if ${gl_cv_c_inline_effective+:} false; then :
14584 $as_echo_n "(cached) " >&6
14586 if test $ac_cv_c_inline = no; then
14587 gl_cv_c_inline_effective=no
14589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14590 /* end confdefs.h. */
14595 #ifdef __NO_INLINE__
14596 #error "inline is not effective"
14602 if ac_fn_c_try_compile "$LINENO"; then :
14603 gl_cv_c_inline_effective=yes
14605 gl_cv_c_inline_effective=no
14607 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14611 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_inline_effective" >&5
14612 $as_echo "$gl_cv_c_inline_effective" >&6; }
14613 if test $gl_cv_c_inline_effective = yes; then
14615 $as_echo "#define HAVE_INLINE 1" >>confdefs.h
14625 if test $ac_cv_func_lchmod = no; then
14640 $as_echo "#define GNULIB_TEST_LCHMOD 1" >>confdefs.h
14655 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\""
14660 if test $ac_cv_func_lstat = yes; then
14662 if test $gl_cv_func_lstat_dereferences_slashed_symlink = no; then
14669 if test $REPLACE_LSTAT = 1; then
14678 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext"
14696 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
14703 for ac_header in stdlib.h
14705 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
14706 if test "x$ac_cv_header_stdlib_h" = xyes; then :
14707 cat >>confdefs.h <<_ACEOF
14708 #define HAVE_STDLIB_H 1
14715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
14716 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
14717 if ${ac_cv_func_malloc_0_nonnull+:} false; then :
14718 $as_echo_n "(cached) " >&6
14720 if test "$cross_compiling" = yes; then :
14721 ac_cv_func_malloc_0_nonnull=no
14723 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14724 /* end confdefs.h. */
14725 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
14726 # include <stdlib.h>
14734 return ! malloc (0);
14739 if ac_fn_c_try_run "$LINENO"; then :
14740 ac_cv_func_malloc_0_nonnull=yes
14742 ac_cv_func_malloc_0_nonnull=no
14744 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14745 conftest.$ac_objext conftest.beam conftest.$ac_ext
14749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
14750 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
14751 if test $ac_cv_func_malloc_0_nonnull = yes; then :
14753 $as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h
14756 $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h
14763 if test $REPLACE_MALLOC = 1; then
14772 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
14777 cat >>confdefs.h <<_ACEOF
14778 #define GNULIB_MALLOC_GNU 1
14785 if test $gl_cv_func_malloc_posix = yes; then
14787 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
14793 if test $REPLACE_MALLOC = 1; then
14802 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext"
14810 GNULIB_MALLOC_POSIX=1
14816 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
14834 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
14838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
14839 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
14840 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
14841 $as_echo_n "(cached) " >&6
14845 # Guess no on AIX and OSF/1.
14846 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
14847 # Guess yes otherwise.
14848 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
14850 if test $LOCALE_JA != none; then
14851 if test "$cross_compiling" = yes; then :
14854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14855 /* end confdefs.h. */
14857 #include <locale.h>
14858 #include <string.h>
14859 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14861 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14862 included before <wchar.h>. */
14863 #include <stddef.h>
14869 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
14871 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
14875 memset (&state, '\0', sizeof (mbstate_t));
14876 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
14877 if (mbsinit (&state))
14883 if ac_fn_c_try_run "$LINENO"; then :
14884 gl_cv_func_mbrtowc_incomplete_state=yes
14886 gl_cv_func_mbrtowc_incomplete_state=no
14888 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14889 conftest.$ac_objext conftest.beam conftest.$ac_ext
14895 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
14896 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
14901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
14902 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
14903 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
14904 $as_echo_n "(cached) " >&6
14908 # Guess no on Solaris 8.
14909 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
14910 # Guess yes otherwise.
14911 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
14913 if test $LOCALE_ZH_CN != none; then
14914 if test "$cross_compiling" = yes; then :
14917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14918 /* end confdefs.h. */
14920 #include <locale.h>
14921 #include <stdlib.h>
14922 #include <string.h>
14923 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14925 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14926 included before <wchar.h>. */
14927 #include <stddef.h>
14933 /* This fails on Solaris 8:
14934 mbrtowc returns 2, and sets wc to 0x00F0.
14935 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
14936 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
14938 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
14942 memset (&state, '\0', sizeof (mbstate_t));
14943 if (mbrtowc (&wc, input + 3, 6, &state) != 4
14944 && mbtowc (&wc, input + 3, 6) == 4)
14950 if ac_fn_c_try_run "$LINENO"; then :
14951 gl_cv_func_mbrtowc_sanitycheck=yes
14953 gl_cv_func_mbrtowc_sanitycheck=no
14955 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14956 conftest.$ac_objext conftest.beam conftest.$ac_ext
14962 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
14963 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
14965 REPLACE_MBSTATE_T=0
14966 case "$gl_cv_func_mbrtowc_incomplete_state" in
14968 *) REPLACE_MBSTATE_T=1 ;;
14970 case "$gl_cv_func_mbrtowc_sanitycheck" in
14972 *) REPLACE_MBSTATE_T=1 ;;
14975 REPLACE_MBSTATE_T=1
14980 if test $ac_cv_func_mbrtowc = no; then
14982 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
14983 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
14985 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
14986 included before <wchar.h>. */
14987 #include <stddef.h>
14993 if test "x$ac_cv_have_decl_mbrtowc" = xyes; then :
14999 cat >>confdefs.h <<_ACEOF
15000 #define HAVE_DECL_MBRTOWC $ac_have_decl
15003 if test $ac_cv_have_decl_mbrtowc = yes; then
15007 if test $REPLACE_MBSTATE_T = 1; then
15013 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
15014 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
15015 if ${gl_cv_func_mbrtowc_null_arg1+:} false; then :
15016 $as_echo_n "(cached) " >&6
15020 # Guess no on Solaris.
15021 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;;
15022 # Guess yes otherwise.
15023 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;;
15025 if test $LOCALE_FR_UTF8 != none; then
15026 if test "$cross_compiling" = yes; then :
15029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15030 /* end confdefs.h. */
15032 #include <locale.h>
15033 #include <stdlib.h>
15034 #include <string.h>
15035 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15037 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15038 included before <wchar.h>. */
15039 #include <stddef.h>
15047 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
15049 char input[] = "\303\237er";
15054 memset (&state, '\0', sizeof (mbstate_t));
15055 wc = (wchar_t) 0xBADFACE;
15056 ret = mbrtowc (&wc, input, 5, &state);
15059 if (!mbsinit (&state))
15062 memset (&state, '\0', sizeof (mbstate_t));
15063 ret = mbrtowc (NULL, input, 5, &state);
15064 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
15066 if (!mbsinit (&state))
15072 if ac_fn_c_try_run "$LINENO"; then :
15073 gl_cv_func_mbrtowc_null_arg1=yes
15075 gl_cv_func_mbrtowc_null_arg1=no
15077 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15078 conftest.$ac_objext conftest.beam conftest.$ac_ext
15084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
15085 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
15090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
15091 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
15092 if ${gl_cv_func_mbrtowc_null_arg2+:} false; then :
15093 $as_echo_n "(cached) " >&6
15097 # Guess no on OSF/1.
15098 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;;
15099 # Guess yes otherwise.
15100 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;;
15102 if test $LOCALE_FR_UTF8 != none; then
15103 if test "$cross_compiling" = yes; then :
15106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15107 /* end confdefs.h. */
15109 #include <locale.h>
15110 #include <string.h>
15111 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15113 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15114 included before <wchar.h>. */
15115 #include <stddef.h>
15121 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
15127 memset (&state, '\0', sizeof (mbstate_t));
15128 wc = (wchar_t) 0xBADFACE;
15129 mbrtowc (&wc, NULL, 5, &state);
15130 /* Check that wc was not modified. */
15131 if (wc != (wchar_t) 0xBADFACE)
15137 if ac_fn_c_try_run "$LINENO"; then :
15138 gl_cv_func_mbrtowc_null_arg2=yes
15140 gl_cv_func_mbrtowc_null_arg2=no
15142 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15143 conftest.$ac_objext conftest.beam conftest.$ac_ext
15149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
15150 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
15157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
15158 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
15159 if ${gl_cv_func_mbrtowc_retval+:} false; then :
15160 $as_echo_n "(cached) " >&6
15164 # Guess no on HP-UX, Solaris, native Windows.
15165 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;;
15166 # Guess yes otherwise.
15167 *) gl_cv_func_mbrtowc_retval="guessing yes" ;;
15169 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \
15170 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then
15171 if test "$cross_compiling" = yes; then :
15174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15175 /* end confdefs.h. */
15177 #include <locale.h>
15178 #include <string.h>
15179 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15181 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15182 included before <wchar.h>. */
15183 #include <stddef.h>
15190 int found_some_locale = 0;
15191 /* This fails on Solaris. */
15192 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
15194 char input[] = "B\303\274\303\237er"; /* "Büßer" */
15198 memset (&state, '\0', sizeof (mbstate_t));
15199 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
15202 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
15205 found_some_locale = 1;
15207 /* This fails on HP-UX 11.11. */
15208 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
15210 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
15214 memset (&state, '\0', sizeof (mbstate_t));
15215 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
15218 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
15221 found_some_locale = 1;
15223 /* This fails on native Windows. */
15224 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
15226 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
15230 memset (&state, '\0', sizeof (mbstate_t));
15231 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
15234 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
15237 found_some_locale = 1;
15239 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
15241 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
15245 memset (&state, '\0', sizeof (mbstate_t));
15246 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
15249 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
15252 found_some_locale = 1;
15254 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
15256 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
15260 memset (&state, '\0', sizeof (mbstate_t));
15261 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
15264 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
15267 found_some_locale = 1;
15269 return (found_some_locale ? result : 77);
15272 if ac_fn_c_try_run "$LINENO"; then :
15273 gl_cv_func_mbrtowc_retval=yes
15275 if test $? != 77; then
15276 gl_cv_func_mbrtowc_retval=no
15280 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15281 conftest.$ac_objext conftest.beam conftest.$ac_ext
15287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
15288 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
15293 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
15294 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
15295 if ${gl_cv_func_mbrtowc_nul_retval+:} false; then :
15296 $as_echo_n "(cached) " >&6
15300 # Guess no on Solaris 8 and 9.
15301 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;;
15302 # Guess yes otherwise.
15303 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;;
15305 if test $LOCALE_ZH_CN != none; then
15306 if test "$cross_compiling" = yes; then :
15309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15310 /* end confdefs.h. */
15312 #include <locale.h>
15313 #include <string.h>
15314 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15316 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15317 included before <wchar.h>. */
15318 #include <stddef.h>
15324 /* This fails on Solaris 8 and 9. */
15325 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
15330 memset (&state, '\0', sizeof (mbstate_t));
15331 if (mbrtowc (&wc, "", 1, &state) != 0)
15337 if ac_fn_c_try_run "$LINENO"; then :
15338 gl_cv_func_mbrtowc_nul_retval=yes
15340 gl_cv_func_mbrtowc_nul_retval=no
15342 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15343 conftest.$ac_objext conftest.beam conftest.$ac_ext
15349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
15350 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
15352 case "$gl_cv_func_mbrtowc_null_arg1" in
15355 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
15360 case "$gl_cv_func_mbrtowc_null_arg2" in
15363 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
15368 case "$gl_cv_func_mbrtowc_retval" in
15371 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
15376 case "$gl_cv_func_mbrtowc_nul_retval" in
15379 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
15387 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then
15396 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext"
15413 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
15428 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then
15432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
15433 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
15434 if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then :
15435 $as_echo_n "(cached) " >&6
15439 # Guess no on AIX and OSF/1.
15440 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;;
15441 # Guess yes otherwise.
15442 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;;
15444 if test $LOCALE_JA != none; then
15445 if test "$cross_compiling" = yes; then :
15448 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15449 /* end confdefs.h. */
15451 #include <locale.h>
15452 #include <string.h>
15453 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15455 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15456 included before <wchar.h>. */
15457 #include <stddef.h>
15463 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
15465 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
15469 memset (&state, '\0', sizeof (mbstate_t));
15470 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
15471 if (mbsinit (&state))
15477 if ac_fn_c_try_run "$LINENO"; then :
15478 gl_cv_func_mbrtowc_incomplete_state=yes
15480 gl_cv_func_mbrtowc_incomplete_state=no
15482 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15483 conftest.$ac_objext conftest.beam conftest.$ac_ext
15489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
15490 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
15495 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
15496 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
15497 if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then :
15498 $as_echo_n "(cached) " >&6
15502 # Guess no on Solaris 8.
15503 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;;
15504 # Guess yes otherwise.
15505 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;;
15507 if test $LOCALE_ZH_CN != none; then
15508 if test "$cross_compiling" = yes; then :
15511 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15512 /* end confdefs.h. */
15514 #include <locale.h>
15515 #include <stdlib.h>
15516 #include <string.h>
15517 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15519 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15520 included before <wchar.h>. */
15521 #include <stddef.h>
15527 /* This fails on Solaris 8:
15528 mbrtowc returns 2, and sets wc to 0x00F0.
15529 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
15530 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
15532 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
15536 memset (&state, '\0', sizeof (mbstate_t));
15537 if (mbrtowc (&wc, input + 3, 6, &state) != 4
15538 && mbtowc (&wc, input + 3, 6) == 4)
15544 if ac_fn_c_try_run "$LINENO"; then :
15545 gl_cv_func_mbrtowc_sanitycheck=yes
15547 gl_cv_func_mbrtowc_sanitycheck=no
15549 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15550 conftest.$ac_objext conftest.beam conftest.$ac_ext
15556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
15557 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
15559 REPLACE_MBSTATE_T=0
15560 case "$gl_cv_func_mbrtowc_incomplete_state" in
15562 *) REPLACE_MBSTATE_T=1 ;;
15564 case "$gl_cv_func_mbrtowc_sanitycheck" in
15566 *) REPLACE_MBSTATE_T=1 ;;
15569 REPLACE_MBSTATE_T=1
15574 if test $ac_cv_func_mbsinit = no; then
15576 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
15577 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
15579 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
15580 included before <wchar.h>. */
15581 #include <stddef.h>
15587 if test "x$ac_cv_have_decl_mbsinit" = xyes; then :
15593 cat >>confdefs.h <<_ACEOF
15594 #define HAVE_DECL_MBSINIT $ac_have_decl
15597 if test $ac_cv_have_decl_mbsinit = yes; then
15601 if test $REPLACE_MBSTATE_T = 1; then
15605 mingw*) REPLACE_MBSINIT=1 ;;
15610 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then
15619 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext"
15636 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
15641 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then
15650 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext"
15653 for ac_header in bp-sym.h
15655 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
15656 if test "x$ac_cv_header_bp_sym_h" = xyes; then :
15657 cat >>confdefs.h <<_ACEOF
15658 #define HAVE_BP_SYM_H 1
15678 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
15687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
15688 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
15689 if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then :
15690 $as_echo_n "(cached) " >&6
15692 rm -rf conftest.dir
15693 if test "$cross_compiling" = yes; then :
15694 gl_cv_func_mkdir_trailing_slash_works="guessing no"
15696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15697 /* end confdefs.h. */
15699 # include <sys/types.h>
15700 # include <sys/stat.h>
15705 return mkdir ("conftest.dir/", 0700);
15710 if ac_fn_c_try_run "$LINENO"; then :
15711 gl_cv_func_mkdir_trailing_slash_works=yes
15713 gl_cv_func_mkdir_trailing_slash_works=no
15715 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15716 conftest.$ac_objext conftest.beam conftest.$ac_ext
15719 rm -rf conftest.dir
15723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
15724 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
15725 if test "$gl_cv_func_mkdir_trailing_slash_works" != yes; then
15729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
15730 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
15731 if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then :
15732 $as_echo_n "(cached) " >&6
15734 rm -rf conftest.dir
15735 if test "$cross_compiling" = yes; then :
15736 gl_cv_func_mkdir_trailing_dot_works="guessing no"
15738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15739 /* end confdefs.h. */
15741 # include <sys/types.h>
15742 # include <sys/stat.h>
15747 return !mkdir ("conftest.dir/./", 0700);
15752 if ac_fn_c_try_run "$LINENO"; then :
15753 gl_cv_func_mkdir_trailing_dot_works=yes
15755 gl_cv_func_mkdir_trailing_dot_works=no
15757 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15758 conftest.$ac_objext conftest.beam conftest.$ac_ext
15761 rm -rf conftest.dir
15765 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
15766 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
15767 if test "$gl_cv_func_mkdir_trailing_dot_works" != yes; then
15770 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
15774 if test $REPLACE_MKDIR = 1; then
15783 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext"
15792 if test $APPLE_UNIVERSAL_BUILD = 1; then
15793 # A universal build on Apple MacOS X platforms.
15794 # The test result would be 'yes' in 32-bit mode and 'no' in 64-bit mode.
15795 # But we need a configuration result that is valid in both modes.
15796 gl_cv_func_working_mktime=no
15798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5
15799 $as_echo_n "checking for working mktime... " >&6; }
15800 if ${gl_cv_func_working_mktime+:} false; then :
15801 $as_echo_n "(cached) " >&6
15803 if test "$cross_compiling" = yes; then :
15804 gl_cv_func_working_mktime=no
15806 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15807 /* end confdefs.h. */
15808 /* Test program from Paul Eggert and Tony Leneis. */
15809 #include <limits.h>
15810 #include <stdlib.h>
15813 #ifdef HAVE_UNISTD_H
15814 # include <unistd.h>
15818 # define alarm(X) /* empty */
15821 /* Work around redefinition to rpl_putenv by other config tests. */
15824 static time_t time_t_max;
15825 static time_t time_t_min;
15827 /* Values we'll use to set the TZ environment variable. */
15828 static char *tz_strings[] = {
15829 (char *) 0, "TZ=GMT0", "TZ=JST-9",
15830 "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00"
15832 #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0]))
15834 /* Return 0 if mktime fails to convert a date in the spring-forward gap.
15835 Based on a problem report from Andreas Jaeger. */
15837 spring_forward_gap ()
15839 /* glibc (up to about 1998-10-07) failed this test. */
15842 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
15843 instead of "TZ=America/Vancouver" in order to detect the bug even
15844 on systems that don't support the Olson extension, or don't have the
15845 full zoneinfo tables installed. */
15846 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
15855 return mktime (&tm) != (time_t) -1;
15859 mktime_test1 (time_t now)
15862 return ! (lt = localtime (&now)) || mktime (lt) == now;
15866 mktime_test (time_t now)
15868 return (mktime_test1 (now)
15869 && mktime_test1 ((time_t) (time_t_max - now))
15870 && mktime_test1 ((time_t) (time_t_min + now)));
15876 /* Based on code from Ariel Faigon. */
15886 return tm.tm_mon == 2 && tm.tm_mday == 31;
15890 bigtime_test (int j)
15894 tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j;
15895 now = mktime (&tm);
15896 if (now != (time_t) -1)
15898 struct tm *lt = localtime (&now);
15900 && lt->tm_year == tm.tm_year
15901 && lt->tm_mon == tm.tm_mon
15902 && lt->tm_mday == tm.tm_mday
15903 && lt->tm_hour == tm.tm_hour
15904 && lt->tm_min == tm.tm_min
15905 && lt->tm_sec == tm.tm_sec
15906 && lt->tm_yday == tm.tm_yday
15907 && lt->tm_wday == tm.tm_wday
15908 && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst)
15909 == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst))))
15918 /* The correct answer for 2050-02-01 00:00:00 in Pacific time,
15919 ignoring leap seconds. */
15920 unsigned long int answer = 2527315200UL;
15924 tm.tm_year = 2050 - 1900;
15927 tm.tm_hour = tm.tm_min = tm.tm_sec = 0;
15930 /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0"
15931 instead of "TZ=America/Vancouver" in order to detect the bug even
15932 on systems that don't support the Olson extension, or don't have the
15933 full zoneinfo tables installed. */
15934 putenv ("TZ=PST8PDT,M4.1.0,M10.5.0");
15938 /* Check that the result is either a failure, or close enough
15939 to the correct answer that we can assume the discrepancy is
15940 due to leap seconds. */
15941 return (t == (time_t) -1
15942 || (0 < t && answer - 120 <= t && t <= answer + 120));
15951 int time_t_signed_magnitude = (time_t) ~ (time_t) 0 < (time_t) -1;
15952 int time_t_signed = ! ((time_t) 0 < (time_t) -1);
15954 /* This test makes some buggy mktime implementations loop.
15955 Give up after 60 seconds; a mktime slower than that
15956 isn't worth using anyway. */
15959 time_t_max = (! time_t_signed
15961 : ((((time_t) 1 << (sizeof (time_t) * CHAR_BIT - 2)) - 1)
15963 time_t_min = (! time_t_signed
15965 : time_t_signed_magnitude
15969 delta = time_t_max / 997; /* a suitable prime number */
15970 for (i = 0; i < N_STRINGS; i++)
15973 putenv (tz_strings[i]);
15975 for (t = 0; t <= time_t_max - delta; t += delta)
15976 if (! mktime_test (t))
15978 if (! (mktime_test ((time_t) 1)
15979 && mktime_test ((time_t) (60 * 60))
15980 && mktime_test ((time_t) (60 * 60 * 24))))
15983 for (j = 1; ; j <<= 1)
15984 if (! bigtime_test (j))
15986 else if (INT_MAX / 2 < j)
15988 if (! bigtime_test (INT_MAX))
15991 if (! irix_6_4_bug ())
15993 if (! spring_forward_gap ())
15995 if (! year_2050_test ())
16000 if ac_fn_c_try_run "$LINENO"; then :
16001 gl_cv_func_working_mktime=yes
16003 gl_cv_func_working_mktime=no
16005 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16006 conftest.$ac_objext conftest.beam conftest.$ac_ext
16011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_mktime" >&5
16012 $as_echo "$gl_cv_func_working_mktime" >&6; }
16014 if test $gl_cv_func_working_mktime = no; then
16020 if test $REPLACE_MKTIME = 1; then
16029 gl_LIBOBJS="$gl_LIBOBJS mktime.$ac_objext"
16046 $as_echo "#define GNULIB_TEST_MKTIME 1" >>confdefs.h
16052 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
16053 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1
16055 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
16058 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0
16062 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
16071 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext"
16077 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
16086 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext"
16093 for ac_func in opendir
16095 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir"
16096 if test "x$ac_cv_func_opendir" = xyes; then :
16097 cat >>confdefs.h <<_ACEOF
16098 #define HAVE_OPENDIR 1
16104 if test $ac_cv_func_opendir = no; then
16109 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then
16118 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext"
16132 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
16142 ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h>
16143 #include <$ac_cv_struct_tm>
16146 if test "x$ac_cv_member_struct_tm_tm_zone" = xyes; then :
16148 cat >>confdefs.h <<_ACEOF
16149 #define HAVE_STRUCT_TM_TM_ZONE 1
16155 if test "$ac_cv_member_struct_tm_tm_zone" = yes; then
16157 $as_echo "#define HAVE_TM_ZONE 1" >>confdefs.h
16160 ac_fn_c_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h>
16162 if test "x$ac_cv_have_decl_tzname" = xyes; then :
16168 cat >>confdefs.h <<_ACEOF
16169 #define HAVE_DECL_TZNAME $ac_have_decl
16172 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5
16173 $as_echo_n "checking for tzname... " >&6; }
16174 if ${ac_cv_var_tzname+:} false; then :
16175 $as_echo_n "(cached) " >&6
16177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16178 /* end confdefs.h. */
16180 #if !HAVE_DECL_TZNAME
16181 extern char *tzname[];
16187 return tzname[0][0];
16192 if ac_fn_c_try_link "$LINENO"; then :
16193 ac_cv_var_tzname=yes
16195 ac_cv_var_tzname=no
16197 rm -f core conftest.err conftest.$ac_objext \
16198 conftest$ac_exeext conftest.$ac_ext
16200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5
16201 $as_echo "$ac_cv_var_tzname" >&6; }
16202 if test $ac_cv_var_tzname = yes; then
16204 $as_echo "#define HAVE_TZNAME 1" >>confdefs.h
16211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16212 /* end confdefs.h. */
16214 #include <time.h> /* for time_t */
16215 #include <limits.h> /* for CHAR_BIT, LONG_MIN, LONG_MAX */
16216 #define TYPE_MINIMUM(t) \
16217 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
16218 #define TYPE_MAXIMUM(t) \
16219 ((t) ((t) 0 < (t) -1 \
16221 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
16222 typedef int verify_min[2 * (LONG_MIN <= TYPE_MINIMUM (time_t)) - 1];
16223 typedef int verify_max[2 * (TYPE_MAXIMUM (time_t) <= LONG_MAX) - 1];
16226 if ac_fn_c_try_compile "$LINENO"; then :
16228 $as_echo "#define TIME_T_FITS_IN_LONG_INT 1" >>confdefs.h
16232 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16237 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
16239 if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then :
16245 cat >>confdefs.h <<_ACEOF
16246 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
16249 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
16251 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then :
16257 cat >>confdefs.h <<_ACEOF
16258 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
16271 for ac_func in raise
16273 ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise"
16274 if test "x$ac_cv_func_raise" = xyes; then :
16275 cat >>confdefs.h <<_ACEOF
16276 #define HAVE_RAISE 1
16282 if test $ac_cv_func_raise = no; then
16285 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
16291 if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then
16300 gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext"
16317 $as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h
16324 for ac_func in readdir
16326 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir"
16327 if test "x$ac_cv_func_readdir" = xyes; then :
16328 cat >>confdefs.h <<_ACEOF
16329 #define HAVE_READDIR 1
16335 if test $ac_cv_func_readdir = no; then
16339 if test $HAVE_READDIR = 0; then
16348 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext"
16362 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
16369 if test $ac_cv_func_readlink = no; then
16372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
16373 $as_echo_n "checking whether readlink signature is correct... " >&6; }
16374 if ${gl_cv_decl_readlink_works+:} false; then :
16375 $as_echo_n "(cached) " >&6
16377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16378 /* end confdefs.h. */
16379 #include <unistd.h>
16380 /* Cause compilation failure if original declaration has wrong type. */
16381 ssize_t readlink (const char *, char *, size_t);
16390 if ac_fn_c_try_compile "$LINENO"; then :
16391 gl_cv_decl_readlink_works=yes
16393 gl_cv_decl_readlink_works=no
16395 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
16398 $as_echo "$gl_cv_decl_readlink_works" >&6; }
16399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
16400 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
16401 if ${gl_cv_func_readlink_works+:} false; then :
16402 $as_echo_n "(cached) " >&6
16404 # We have readlink, so assume ln -s works.
16405 ln -s conftest.no-such conftest.link
16406 ln -s conftest.link conftest.lnk2
16407 if test "$cross_compiling" = yes; then :
16408 gl_cv_func_readlink_works="guessing no"
16410 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16411 /* end confdefs.h. */
16412 #include <unistd.h>
16418 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
16423 if ac_fn_c_try_run "$LINENO"; then :
16424 gl_cv_func_readlink_works=yes
16426 gl_cv_func_readlink_works=no
16428 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16429 conftest.$ac_objext conftest.beam conftest.$ac_ext
16432 rm -f conftest.link conftest.lnk2
16434 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5
16435 $as_echo "$gl_cv_func_readlink_works" >&6; }
16436 if test "$gl_cv_func_readlink_works" != yes; then
16438 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
16441 elif test "$gl_cv_decl_readlink_works" != yes; then
16446 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then
16455 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext"
16472 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
16478 for ac_header in stdlib.h
16480 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default"
16481 if test "x$ac_cv_header_stdlib_h" = xyes; then :
16482 cat >>confdefs.h <<_ACEOF
16483 #define HAVE_STDLIB_H 1
16490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5
16491 $as_echo_n "checking for GNU libc compatible realloc... " >&6; }
16492 if ${ac_cv_func_realloc_0_nonnull+:} false; then :
16493 $as_echo_n "(cached) " >&6
16495 if test "$cross_compiling" = yes; then :
16496 ac_cv_func_realloc_0_nonnull=no
16498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16499 /* end confdefs.h. */
16500 #if defined STDC_HEADERS || defined HAVE_STDLIB_H
16501 # include <stdlib.h>
16509 return ! realloc (0, 0);
16514 if ac_fn_c_try_run "$LINENO"; then :
16515 ac_cv_func_realloc_0_nonnull=yes
16517 ac_cv_func_realloc_0_nonnull=no
16519 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16520 conftest.$ac_objext conftest.beam conftest.$ac_ext
16524 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5
16525 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; }
16526 if test $ac_cv_func_realloc_0_nonnull = yes; then :
16528 $as_echo "#define HAVE_REALLOC_GNU 1" >>confdefs.h
16531 $as_echo "#define HAVE_REALLOC_GNU 0" >>confdefs.h
16538 if test $REPLACE_REALLOC = 1; then
16547 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
16552 cat >>confdefs.h <<_ACEOF
16553 #define GNULIB_REALLOC_GNU 1
16560 if test $gl_cv_func_malloc_posix = yes; then
16562 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
16568 if test $REPLACE_REALLOC = 1; then
16577 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext"
16585 GNULIB_REALLOC_POSIX=1
16591 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
16600 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
16601 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
16602 if ${gl_cv_func_rename_slash_dst_works+:} false; then :
16603 $as_echo_n "(cached) " >&6
16605 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
16606 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
16607 as_fn_error $? "cannot create temporary files" "$LINENO" 5
16608 # Assume that if we have lstat, we can also check symlinks.
16609 if test $ac_cv_func_lstat = yes; then
16610 ln -s conftest.f conftest.lnk
16612 if test "$cross_compiling" = yes; then :
16613 gl_cv_func_rename_slash_dst_works="guessing no"
16615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16616 /* end confdefs.h. */
16618 # include <stdio.h>
16619 # include <stdlib.h>
16625 if (rename ("conftest.f1", "conftest.f2/") == 0)
16627 if (rename ("conftest.d1", "conftest.d2/") != 0)
16630 if (rename ("conftest.f", "conftest.lnk/") == 0)
16639 if ac_fn_c_try_run "$LINENO"; then :
16640 gl_cv_func_rename_slash_dst_works=yes
16642 gl_cv_func_rename_slash_dst_works=no
16644 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16645 conftest.$ac_objext conftest.beam conftest.$ac_ext
16648 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
16651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
16652 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
16653 if test "x$gl_cv_func_rename_slash_dst_works" != xyes; then
16656 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
16660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
16661 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
16662 if ${gl_cv_func_rename_slash_src_works+:} false; then :
16663 $as_echo_n "(cached) " >&6
16665 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
16666 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 ||
16667 as_fn_error $? "cannot create temporary files" "$LINENO" 5
16668 # Assume that if we have lstat, we can also check symlinks.
16669 if test $ac_cv_func_lstat = yes; then
16670 ln -s conftest.f conftest.lnk
16672 if test "$cross_compiling" = yes; then :
16673 gl_cv_func_rename_slash_src_works="guessing no"
16675 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16676 /* end confdefs.h. */
16678 # include <stdio.h>
16679 # include <stdlib.h>
16685 if (rename ("conftest.f1/", "conftest.d3") == 0)
16687 if (rename ("conftest.d1/", "conftest.d2") != 0)
16690 if (rename ("conftest.lnk/", "conftest.f") == 0)
16699 if ac_fn_c_try_run "$LINENO"; then :
16700 gl_cv_func_rename_slash_src_works=yes
16702 gl_cv_func_rename_slash_src_works=no
16704 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16705 conftest.$ac_objext conftest.beam conftest.$ac_ext
16708 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
16711 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
16712 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
16713 if test "x$gl_cv_func_rename_slash_src_works" != xyes; then
16716 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
16721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
16722 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
16723 if ${gl_cv_func_rename_link_works+:} false; then :
16724 $as_echo_n "(cached) " >&6
16726 if test $ac_cv_func_link = yes; then
16727 rm -rf conftest.f conftest.f1
16728 if touch conftest.f && ln conftest.f conftest.f1 &&
16729 set x `ls -i conftest.f conftest.f1` && test "" = ""; then
16730 if test "$cross_compiling" = yes; then :
16731 gl_cv_func_rename_link_works="guessing no"
16733 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16734 /* end confdefs.h. */
16736 # include <stdio.h>
16737 # include <stdlib.h>
16738 # include <unistd.h>
16744 if (rename ("conftest.f", "conftest.f1"))
16746 if (unlink ("conftest.f1"))
16748 if (rename ("conftest.f", "conftest.f"))
16750 if (rename ("conftest.f1", "conftest.f1") == 0)
16758 if ac_fn_c_try_run "$LINENO"; then :
16759 gl_cv_func_rename_link_works=yes
16761 gl_cv_func_rename_link_works=no
16763 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16764 conftest.$ac_objext conftest.beam conftest.$ac_ext
16768 gl_cv_func_rename_link_works="guessing no"
16770 rm -rf conftest.f conftest.f1
16772 gl_cv_func_rename_link_works=yes
16776 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
16777 $as_echo "$gl_cv_func_rename_link_works" >&6; }
16778 if test "x$gl_cv_func_rename_link_works" != xyes; then
16781 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
16785 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
16786 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
16787 if ${gl_cv_func_rename_dest_works+:} false; then :
16788 $as_echo_n "(cached) " >&6
16790 rm -rf conftest.f conftest.d1 conftest.d2
16791 touch conftest.f && mkdir conftest.d1 conftest.d2 ||
16792 as_fn_error $? "cannot create temporary files" "$LINENO" 5
16793 if test "$cross_compiling" = yes; then :
16794 gl_cv_func_rename_dest_works="guessing no"
16796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16797 /* end confdefs.h. */
16799 # include <stdio.h>
16800 # include <stdlib.h>
16806 if (rename ("conftest.d1", "conftest.d2") != 0)
16808 if (rename ("conftest.d2", "conftest.f") == 0)
16816 if ac_fn_c_try_run "$LINENO"; then :
16817 gl_cv_func_rename_dest_works=yes
16819 gl_cv_func_rename_dest_works=no
16821 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16822 conftest.$ac_objext conftest.beam conftest.$ac_ext
16825 rm -rf conftest.f conftest.d1 conftest.d2
16828 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
16829 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
16830 if test "x$gl_cv_func_rename_dest_works" != xyes; then
16833 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
16837 if test $REPLACE_RENAME = 1; then
16846 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext"
16860 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
16867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
16868 $as_echo_n "checking whether rmdir works... " >&6; }
16869 if ${gl_cv_func_rmdir_works+:} false; then :
16870 $as_echo_n "(cached) " >&6
16873 touch conftest.file
16874 if test "$cross_compiling" = yes; then :
16875 gl_cv_func_rmdir_works="guessing no"
16877 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16878 /* end confdefs.h. */
16882 # include <unistd.h>
16883 #else /* on Windows with MSVC */
16884 # include <direct.h>
16891 if (!rmdir ("conftest.file/"))
16893 else if (errno != ENOTDIR)
16895 if (!rmdir ("conftest.dir/./"))
16903 if ac_fn_c_try_run "$LINENO"; then :
16904 gl_cv_func_rmdir_works=yes
16906 gl_cv_func_rmdir_works=no
16908 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
16909 conftest.$ac_objext conftest.beam conftest.$ac_ext
16912 rm -rf conftest.dir conftest.file
16914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
16915 $as_echo "$gl_cv_func_rmdir_works" >&6; }
16916 if test x"$gl_cv_func_rmdir_works" != xyes; then
16920 if test $REPLACE_RMDIR = 1; then
16929 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext"
16943 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
16954 if test $ac_cv_func_setenv = no; then
16957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
16958 $as_echo_n "checking whether setenv validates arguments... " >&6; }
16959 if ${gl_cv_func_setenv_works+:} false; then :
16960 $as_echo_n "(cached) " >&6
16962 if test "$cross_compiling" = yes; then :
16963 gl_cv_func_setenv_works="guessing no"
16965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16966 /* end confdefs.h. */
16968 #include <stdlib.h>
16970 #include <string.h>
16978 if (setenv ("", "", 0) != -1)
16980 else if (errno != EINVAL)
16984 if (setenv ("a", "=", 1) != 0)
16986 else if (strcmp (getenv ("a"), "=") != 0)
16995 if ac_fn_c_try_run "$LINENO"; then :
16996 gl_cv_func_setenv_works=yes
16998 gl_cv_func_setenv_works=no
17000 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17001 conftest.$ac_objext conftest.beam conftest.$ac_ext
17005 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
17006 $as_echo "$gl_cv_func_setenv_works" >&6; }
17007 if test "$gl_cv_func_setenv_works" != yes; then
17012 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then
17021 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext"
17035 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
17050 if test $gl_cv_have_include_next = yes; then
17051 gl_cv_next_signal_h='<'signal.h'>'
17053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
17054 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
17055 if ${gl_cv_next_signal_h+:} false; then :
17056 $as_echo_n "(cached) " >&6
17059 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17060 /* end confdefs.h. */
17061 #include <signal.h>
17065 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17066 *) gl_absname_cpp="$ac_cpp" ;;
17071 gl_dirsep_regex='[/\\]'
17074 gl_dirsep_regex='\/'
17077 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17079 gl_header_literal_regex=`echo 'signal.h' \
17080 | sed -e "$gl_make_literal_regex_sed"`
17081 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17082 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17087 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17088 sed -n "$gl_absolute_header_sed"`'"'
17092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
17093 $as_echo "$gl_cv_next_signal_h" >&6; }
17095 NEXT_SIGNAL_H=$gl_cv_next_signal_h
17097 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17098 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17099 gl_next_as_first_directive='<'signal.h'>'
17101 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17102 gl_next_as_first_directive=$gl_cv_next_signal_h
17104 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive
17110 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
17111 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
17112 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
17113 #include <signal.h>
17116 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then :
17119 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0
17128 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
17129 #include <signal.h>
17132 if test "x$ac_cv_type_sighandler_t" = xyes; then :
17135 HAVE_SIGHANDLER_T=0
17140 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do
17141 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17143 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
17144 if eval \${$as_gl_Symbol+:} false; then :
17145 $as_echo_n "(cached) " >&6
17147 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17148 /* end confdefs.h. */
17149 #include <signal.h>
17160 if ac_fn_c_try_compile "$LINENO"; then :
17161 eval "$as_gl_Symbol=yes"
17163 eval "$as_gl_Symbol=no"
17165 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17167 eval ac_res=\$$as_gl_Symbol
17168 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
17169 $as_echo "$ac_res" >&6; }
17170 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
17171 cat >>confdefs.h <<_ACEOF
17172 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
17175 eval ac_cv_have_decl_$gl_func=yes
17181 for ac_header in stdint.h
17183 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
17184 if test "x$ac_cv_header_stdint_h" = xyes; then :
17185 cat >>confdefs.h <<_ACEOF
17186 #define HAVE_STDINT_H 1
17193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5
17194 $as_echo_n "checking for SIZE_MAX... " >&6; }
17195 if ${gl_cv_size_max+:} false; then :
17196 $as_echo_n "(cached) " >&6
17200 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17201 /* end confdefs.h. */
17203 #include <limits.h>
17205 #include <stdint.h>
17212 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17213 $EGREP "Found it" >/dev/null 2>&1; then :
17218 if test -z "$gl_cv_size_max"; then
17219 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h>
17220 #include <limits.h>"; then :
17223 size_t_bits_minus_1=
17226 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"; then :
17232 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then
17233 if test $fits_in_uint = 1; then
17234 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17235 /* end confdefs.h. */
17236 #include <stddef.h>
17238 extern unsigned long foo;
17248 if ac_fn_c_try_compile "$LINENO"; then :
17251 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17253 if test $fits_in_uint = 1; then
17254 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)"
17256 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)"
17259 gl_cv_size_max='((size_t)~(size_t)0)'
17264 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5
17265 $as_echo "$gl_cv_size_max" >&6; }
17266 if test "$gl_cv_size_max" != yes; then
17268 cat >>confdefs.h <<_ACEOF
17269 #define SIZE_MAX $gl_cv_size_max
17276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
17277 $as_echo_n "checking for ssize_t... " >&6; }
17278 if ${gt_cv_ssize_t+:} false; then :
17279 $as_echo_n "(cached) " >&6
17281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17282 /* end confdefs.h. */
17283 #include <sys/types.h>
17287 int x = sizeof (ssize_t *) + sizeof (ssize_t);
17293 if ac_fn_c_try_compile "$LINENO"; then :
17298 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17300 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
17301 $as_echo "$gt_cv_ssize_t" >&6; }
17302 if test $gt_cv_ssize_t = no; then
17304 $as_echo "#define ssize_t int" >>confdefs.h
17311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5
17312 $as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; }
17313 if ${gl_cv_func_stat_dir_slash+:} false; then :
17314 $as_echo_n "(cached) " >&6
17316 if test "$cross_compiling" = yes; then :
17318 mingw*) gl_cv_func_stat_dir_slash="guessing no";;
17319 *) gl_cv_func_stat_dir_slash="guessing yes";;
17322 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17323 /* end confdefs.h. */
17324 #include <sys/stat.h>
17329 struct stat st; return stat (".", &st) != stat ("./", &st);
17334 if ac_fn_c_try_run "$LINENO"; then :
17335 gl_cv_func_stat_dir_slash=yes
17337 gl_cv_func_stat_dir_slash=no
17339 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17340 conftest.$ac_objext conftest.beam conftest.$ac_ext
17344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5
17345 $as_echo "$gl_cv_func_stat_dir_slash" >&6; }
17346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
17347 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
17348 if ${gl_cv_func_stat_file_slash+:} false; then :
17349 $as_echo_n "(cached) " >&6
17352 # Assume that if we have lstat, we can also check symlinks.
17353 if test $ac_cv_func_lstat = yes; then
17354 ln -s conftest.tmp conftest.lnk
17356 if test "$cross_compiling" = yes; then :
17357 gl_cv_func_stat_file_slash="guessing no"
17359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17360 /* end confdefs.h. */
17361 #include <sys/stat.h>
17368 if (!stat ("conftest.tmp/", &st))
17371 if (!stat ("conftest.lnk/", &st))
17380 if ac_fn_c_try_run "$LINENO"; then :
17381 gl_cv_func_stat_file_slash=yes
17383 gl_cv_func_stat_file_slash=no
17385 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
17386 conftest.$ac_objext conftest.beam conftest.$ac_ext
17389 rm -f conftest.tmp conftest.lnk
17391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
17392 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
17393 case $gl_cv_func_stat_dir_slash in
17394 *no) REPLACE_STAT=1
17396 $as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h
17399 case $gl_cv_func_stat_file_slash in
17400 *no) REPLACE_STAT=1
17402 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
17406 if test $REPLACE_STAT = 1; then
17415 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext"
17433 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
17442 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>
17443 #include <sys/stat.h>
17445 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then :
17447 cat >>confdefs.h <<_ACEOF
17448 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
17451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
17452 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
17453 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then :
17454 $as_echo_n "(cached) " >&6
17456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17457 /* end confdefs.h. */
17459 #include <sys/types.h>
17460 #include <sys/stat.h>
17461 #if HAVE_SYS_TIME_H
17462 # include <sys/time.h>
17465 struct timespec ts;
17478 if ac_fn_c_try_compile "$LINENO"; then :
17479 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes
17481 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no
17483 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
17486 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
17487 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
17489 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
17493 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>
17494 #include <sys/stat.h>
17496 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then :
17498 cat >>confdefs.h <<_ACEOF
17499 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
17504 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
17505 #include <sys/stat.h>
17507 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then :
17509 cat >>confdefs.h <<_ACEOF
17510 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
17515 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>
17516 #include <sys/stat.h>
17518 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then :
17520 cat >>confdefs.h <<_ACEOF
17521 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
17538 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>
17539 #include <sys/stat.h>
17541 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then :
17543 cat >>confdefs.h <<_ACEOF
17544 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
17549 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
17550 #include <sys/stat.h>
17552 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then :
17554 cat >>confdefs.h <<_ACEOF
17555 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
17560 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>
17561 #include <sys/stat.h>
17563 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then :
17565 cat >>confdefs.h <<_ACEOF
17566 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
17579 NEXT_STDARG_H='<stdarg.h>'
17580 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for va_copy" >&5
17581 $as_echo_n "checking for va_copy... " >&6; }
17582 if ${gl_cv_func_va_copy+:} false; then :
17583 $as_echo_n "(cached) " >&6
17586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17587 /* end confdefs.h. */
17588 #include <stdarg.h>
17594 void (*func) (va_list, va_list) = va_copy;
17601 if ac_fn_c_try_compile "$LINENO"; then :
17602 gl_cv_func_va_copy=yes
17604 gl_cv_func_va_copy=no
17606 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17609 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_va_copy" >&5
17610 $as_echo "$gl_cv_func_va_copy" >&6; }
17611 if test $gl_cv_func_va_copy = no; then
17612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17613 /* end confdefs.h. */
17614 #if defined _AIX && !defined __GNUC__
17619 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17620 $EGREP "vaccine" >/dev/null 2>&1; then :
17627 if test $gl_aixcc = yes; then
17637 if test $gl_cv_have_include_next = yes; then
17638 gl_cv_next_stdarg_h='<'stdarg.h'>'
17640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdarg.h>" >&5
17641 $as_echo_n "checking absolute name of <stdarg.h>... " >&6; }
17642 if ${gl_cv_next_stdarg_h+:} false; then :
17643 $as_echo_n "(cached) " >&6
17646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17647 /* end confdefs.h. */
17648 #include <stdarg.h>
17652 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17653 *) gl_absname_cpp="$ac_cpp" ;;
17658 gl_dirsep_regex='[/\\]'
17661 gl_dirsep_regex='\/'
17664 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17666 gl_header_literal_regex=`echo 'stdarg.h' \
17667 | sed -e "$gl_make_literal_regex_sed"`
17668 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17669 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17674 gl_cv_next_stdarg_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17675 sed -n "$gl_absolute_header_sed"`'"'
17679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdarg_h" >&5
17680 $as_echo "$gl_cv_next_stdarg_h" >&6; }
17682 NEXT_STDARG_H=$gl_cv_next_stdarg_h
17684 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17685 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17686 gl_next_as_first_directive='<'stdarg.h'>'
17688 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17689 gl_next_as_first_directive=$gl_cv_next_stdarg_h
17691 NEXT_AS_FIRST_DIRECTIVE_STDARG_H=$gl_next_as_first_directive
17696 if test "$gl_cv_next_stdarg_h" = '""'; then
17697 gl_cv_next_stdarg_h='"///usr/include/stdarg.h"'
17698 NEXT_STDARG_H="$gl_cv_next_stdarg_h"
17702 saved_as_echo_n="$as_echo_n"
17704 if ${gl_cv_func___va_copy+:} false; then :
17705 $as_echo_n "(cached) " >&6
17708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17709 /* end confdefs.h. */
17710 #include <stdarg.h>
17723 if ac_fn_c_try_compile "$LINENO"; then :
17724 gl_cv_func___va_copy=yes
17726 gl_cv_func___va_copy=no
17728 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17731 as_echo_n="$saved_as_echo_n"
17733 if test $gl_cv_func___va_copy = yes; then
17735 $as_echo "#define va_copy __va_copy" >>confdefs.h
17740 $as_echo "#define va_copy gl_va_copy" >>confdefs.h
17746 if test -n "$STDARG_H"; then
17747 GL_GENERATE_STDARG_H_TRUE=
17748 GL_GENERATE_STDARG_H_FALSE='#'
17750 GL_GENERATE_STDARG_H_TRUE='#'
17751 GL_GENERATE_STDARG_H_FALSE=
17759 # Define two additional variables used in the Makefile substitution.
17761 if test "$ac_cv_header_stdbool_h" = yes; then
17764 STDBOOL_H='stdbool.h'
17767 if test -n "$STDBOOL_H"; then
17768 GL_GENERATE_STDBOOL_H_TRUE=
17769 GL_GENERATE_STDBOOL_H_FALSE='#'
17771 GL_GENERATE_STDBOOL_H_TRUE='#'
17772 GL_GENERATE_STDBOOL_H_FALSE=
17776 if test "$ac_cv_type__Bool" = yes; then
17787 if test $gt_cv_c_wchar_t = no; then
17791 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
17792 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
17793 if ${gl_cv_decl_null_works+:} false; then :
17794 $as_echo_n "(cached) " >&6
17796 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17797 /* end confdefs.h. */
17798 #include <stddef.h>
17799 int test[2 * (sizeof NULL == sizeof (void *)) -1];
17809 if ac_fn_c_try_compile "$LINENO"; then :
17810 gl_cv_decl_null_works=yes
17812 gl_cv_decl_null_works=no
17814 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
17816 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
17817 $as_echo "$gl_cv_decl_null_works" >&6; }
17818 if test $gl_cv_decl_null_works = no; then
17823 if test -n "$STDDEF_H"; then
17824 GL_GENERATE_STDDEF_H_TRUE=
17825 GL_GENERATE_STDDEF_H_FALSE='#'
17827 GL_GENERATE_STDDEF_H_TRUE='#'
17828 GL_GENERATE_STDDEF_H_FALSE=
17831 if test -n "$STDDEF_H"; then
17840 if test $gl_cv_have_include_next = yes; then
17841 gl_cv_next_stddef_h='<'stddef.h'>'
17843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
17844 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
17845 if ${gl_cv_next_stddef_h+:} false; then :
17846 $as_echo_n "(cached) " >&6
17849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17850 /* end confdefs.h. */
17851 #include <stddef.h>
17855 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17856 *) gl_absname_cpp="$ac_cpp" ;;
17861 gl_dirsep_regex='[/\\]'
17864 gl_dirsep_regex='\/'
17867 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17869 gl_header_literal_regex=`echo 'stddef.h' \
17870 | sed -e "$gl_make_literal_regex_sed"`
17871 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17872 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17877 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17878 sed -n "$gl_absolute_header_sed"`'"'
17882 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
17883 $as_echo "$gl_cv_next_stddef_h" >&6; }
17885 NEXT_STDDEF_H=$gl_cv_next_stddef_h
17887 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17888 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17889 gl_next_as_first_directive='<'stddef.h'>'
17891 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17892 gl_next_as_first_directive=$gl_cv_next_stddef_h
17894 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive
17913 if test $gl_cv_have_include_next = yes; then
17914 gl_cv_next_stdio_h='<'stdio.h'>'
17916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
17917 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
17918 if ${gl_cv_next_stdio_h+:} false; then :
17919 $as_echo_n "(cached) " >&6
17922 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17923 /* end confdefs.h. */
17928 aix*) gl_absname_cpp="$ac_cpp -C" ;;
17929 *) gl_absname_cpp="$ac_cpp" ;;
17934 gl_dirsep_regex='[/\\]'
17937 gl_dirsep_regex='\/'
17940 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
17942 gl_header_literal_regex=`echo 'stdio.h' \
17943 | sed -e "$gl_make_literal_regex_sed"`
17944 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17945 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17950 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17951 sed -n "$gl_absolute_header_sed"`'"'
17955 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
17956 $as_echo "$gl_cv_next_stdio_h" >&6; }
17958 NEXT_STDIO_H=$gl_cv_next_stdio_h
17960 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
17961 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17962 gl_next_as_first_directive='<'stdio.h'>'
17964 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17965 gl_next_as_first_directive=$gl_cv_next_stdio_h
17967 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive
17996 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do
17997 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
17998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
17999 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18000 if eval \${$as_gl_Symbol+:} false; then :
18001 $as_echo_n "(cached) " >&6
18003 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18004 /* end confdefs.h. */
18016 if ac_fn_c_try_compile "$LINENO"; then :
18017 eval "$as_gl_Symbol=yes"
18019 eval "$as_gl_Symbol=no"
18021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18023 eval ac_res=\$$as_gl_Symbol
18024 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18025 $as_echo "$ac_res" >&6; }
18026 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18027 cat >>confdefs.h <<_ACEOF
18028 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18031 eval ac_cv_have_decl_$gl_func=yes
18046 if test $gl_cv_have_include_next = yes; then
18047 gl_cv_next_stdlib_h='<'stdlib.h'>'
18049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
18050 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
18051 if ${gl_cv_next_stdlib_h+:} false; then :
18052 $as_echo_n "(cached) " >&6
18055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18056 /* end confdefs.h. */
18057 #include <stdlib.h>
18061 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18062 *) gl_absname_cpp="$ac_cpp" ;;
18067 gl_dirsep_regex='[/\\]'
18070 gl_dirsep_regex='\/'
18073 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18075 gl_header_literal_regex=`echo 'stdlib.h' \
18076 | sed -e "$gl_make_literal_regex_sed"`
18077 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18078 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18083 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18084 sed -n "$gl_absolute_header_sed"`'"'
18088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
18089 $as_echo "$gl_cv_next_stdlib_h" >&6; }
18091 NEXT_STDLIB_H=$gl_cv_next_stdlib_h
18093 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18094 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18095 gl_next_as_first_directive='<'stdlib.h'>'
18097 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18098 gl_next_as_first_directive=$gl_cv_next_stdlib_h
18100 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive
18107 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 setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do
18108 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18109 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18110 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18111 if eval \${$as_gl_Symbol+:} false; then :
18112 $as_echo_n "(cached) " >&6
18114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18115 /* end confdefs.h. */
18116 #include <stdlib.h>
18117 #if HAVE_SYS_LOADAVG_H
18118 # include <sys/loadavg.h>
18121 # include <random.h>
18133 if ac_fn_c_try_compile "$LINENO"; then :
18134 eval "$as_gl_Symbol=yes"
18136 eval "$as_gl_Symbol=no"
18138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18140 eval ac_res=\$$as_gl_Symbol
18141 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18142 $as_echo "$ac_res" >&6; }
18143 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18144 cat >>confdefs.h <<_ACEOF
18145 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18148 eval ac_cv_have_decl_$gl_func=yes
18158 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
18159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
18160 $as_echo_n "checking for working strerror function... " >&6; }
18161 if ${gl_cv_func_working_strerror+:} false; then :
18162 $as_echo_n "(cached) " >&6
18164 if test "$cross_compiling" = yes; then :
18165 gl_cv_func_working_strerror="guessing no"
18167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18168 /* end confdefs.h. */
18169 #include <string.h>
18174 if (!*strerror (-2)) return 1;
18179 if ac_fn_c_try_run "$LINENO"; then :
18180 gl_cv_func_working_strerror=yes
18182 gl_cv_func_working_strerror=no
18184 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18185 conftest.$ac_objext conftest.beam conftest.$ac_ext
18190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
18191 $as_echo "$gl_cv_func_working_strerror" >&6; }
18192 if test "$gl_cv_func_working_strerror" != yes; then
18200 if test $REPLACE_STRERROR = 1; then
18209 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext"
18214 cat >>confdefs.h <<_ACEOF
18215 #define GNULIB_STRERROR 1
18230 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
18236 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then
18245 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext"
18251 if test $ac_cv_header_sys_socket_h != yes; then
18252 for ac_header in winsock2.h
18254 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18255 if test "x$ac_cv_header_winsock2_h" = xyes; then :
18256 cat >>confdefs.h <<_ACEOF
18257 #define HAVE_WINSOCK2_H 1
18265 if test "$ac_cv_header_winsock2_h" = yes; then
18267 UNISTD_H_HAVE_WINSOCK2_H=1
18268 SYS_IOCTL_H_HAVE_WINSOCK2_H=1
18284 if test $ac_cv_have_decl_strndup = no; then
18285 HAVE_DECL_STRNDUP=0
18288 if test $ac_cv_func_strndup = yes; then
18290 # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'.
18291 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5
18292 $as_echo_n "checking for working strndup... " >&6; }
18293 if ${gl_cv_func_strndup_works+:} false; then :
18294 $as_echo_n "(cached) " >&6
18296 if test "$cross_compiling" = yes; then :
18299 aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";;
18300 *) gl_cv_func_strndup_works="guessing yes";;
18304 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18305 /* end confdefs.h. */
18307 #include <string.h>
18308 #include <stdlib.h>
18313 #ifndef HAVE_DECL_STRNDUP
18318 char *strndup (const char *, size_t);
18321 s = strndup ("some longer string", 15);
18323 s = strndup ("shorter string", 13);
18324 return s[13] != '\0';
18329 if ac_fn_c_try_run "$LINENO"; then :
18330 gl_cv_func_strndup_works=yes
18332 gl_cv_func_strndup_works=no
18334 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18335 conftest.$ac_objext conftest.beam conftest.$ac_ext
18339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5
18340 $as_echo "$gl_cv_func_strndup_works" >&6; }
18341 case $gl_cv_func_strndup_works in
18342 *no) REPLACE_STRNDUP=1 ;;
18348 if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then
18357 gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext"
18371 $as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h
18381 if test $ac_cv_have_decl_strnlen = no; then
18382 HAVE_DECL_STRNLEN=0
18385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
18386 $as_echo_n "checking for working strnlen... " >&6; }
18387 if ${ac_cv_func_strnlen_working+:} false; then :
18388 $as_echo_n "(cached) " >&6
18390 if test "$cross_compiling" = yes; then :
18391 # Guess no on AIX systems, yes otherwise.
18393 aix*) ac_cv_func_strnlen_working=no;;
18394 *) ac_cv_func_strnlen_working=yes;;
18397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18398 /* end confdefs.h. */
18399 $ac_includes_default
18405 #define S_LEN (sizeof S - 1)
18407 /* At least one implementation is buggy: that of AIX 4.3 would
18408 give strnlen (S, 1) == 3. */
18411 for (i = 0; i < S_LEN + 1; ++i)
18413 int expected = i <= S_LEN ? i : S_LEN;
18414 if (strnlen (S, i) != expected)
18423 if ac_fn_c_try_run "$LINENO"; then :
18424 ac_cv_func_strnlen_working=yes
18426 ac_cv_func_strnlen_working=no
18428 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18429 conftest.$ac_objext conftest.beam conftest.$ac_ext
18433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
18434 $as_echo "$ac_cv_func_strnlen_working" >&6; }
18435 test $ac_cv_func_strnlen_working = no && :
18438 if test $ac_cv_func_strnlen_working = no; then
18443 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then
18452 gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext"
18467 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
18474 if test $ac_cv_func_symlink = no; then
18477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether symlink handles trailing slash correctly" >&5
18478 $as_echo_n "checking whether symlink handles trailing slash correctly... " >&6; }
18479 if ${gl_cv_func_symlink_works+:} false; then :
18480 $as_echo_n "(cached) " >&6
18482 if test "$cross_compiling" = yes; then :
18483 gl_cv_func_symlink_works="guessing no"
18485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18486 /* end confdefs.h. */
18487 #include <unistd.h>
18493 if (!symlink ("a", "conftest.link/"))
18495 if (symlink ("conftest.f", "conftest.lnk2"))
18497 else if (!symlink ("a", "conftest.lnk2/"))
18505 if ac_fn_c_try_run "$LINENO"; then :
18506 gl_cv_func_symlink_works=yes
18508 gl_cv_func_symlink_works=no
18510 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18511 conftest.$ac_objext conftest.beam conftest.$ac_ext
18514 rm -f conftest.f conftest.link conftest.lnk2
18516 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_symlink_works" >&5
18517 $as_echo "$gl_cv_func_symlink_works" >&6; }
18518 if test "$gl_cv_func_symlink_works" != yes; then
18523 if test $HAVE_SYMLINK = 0 || test $REPLACE_SYMLINK = 1; then
18532 gl_LIBOBJS="$gl_LIBOBJS symlink.$ac_objext"
18546 $as_echo "#define GNULIB_TEST_SYMLINK 1" >>confdefs.h
18566 if test $gl_cv_have_include_next = yes; then
18567 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
18569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
18570 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
18571 if ${gl_cv_next_sys_stat_h+:} false; then :
18572 $as_echo_n "(cached) " >&6
18575 if test $ac_cv_header_sys_stat_h = yes; then
18578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18579 /* end confdefs.h. */
18580 #include <sys/stat.h>
18584 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18585 *) gl_absname_cpp="$ac_cpp" ;;
18590 gl_dirsep_regex='[/\\]'
18593 gl_dirsep_regex='\/'
18596 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18598 gl_header_literal_regex=`echo 'sys/stat.h' \
18599 | sed -e "$gl_make_literal_regex_sed"`
18600 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18601 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18606 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18607 sed -n "$gl_absolute_header_sed"`'"'
18609 gl_cv_next_sys_stat_h='<'sys/stat.h'>'
18614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
18615 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
18617 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h
18619 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18620 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18621 gl_next_as_first_directive='<'sys/stat.h'>'
18623 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18624 gl_next_as_first_directive=$gl_cv_next_sys_stat_h
18626 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive
18634 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
18635 #include <sys/stat.h>
18637 if test "x$ac_cv_type_nlink_t" = xyes; then :
18641 $as_echo "#define nlink_t int" >>confdefs.h
18647 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do
18648 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18649 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18650 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18651 if eval \${$as_gl_Symbol+:} false; then :
18652 $as_echo_n "(cached) " >&6
18654 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18655 /* end confdefs.h. */
18656 #include <sys/stat.h>
18667 if ac_fn_c_try_compile "$LINENO"; then :
18668 eval "$as_gl_Symbol=yes"
18670 eval "$as_gl_Symbol=no"
18672 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18674 eval ac_res=\$$as_gl_Symbol
18675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18676 $as_echo "$ac_res" >&6; }
18677 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18678 cat >>confdefs.h <<_ACEOF
18679 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18682 eval ac_cv_have_decl_$gl_func=yes
18707 if test $ac_cv_have_decl_localtime_r = no; then
18708 HAVE_DECL_LOCALTIME_R=0
18712 if test $ac_cv_func_localtime_r = yes; then
18714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
18715 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
18716 if ${gl_cv_time_r_posix+:} false; then :
18717 $as_echo_n "(cached) " >&6
18719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18720 /* end confdefs.h. */
18725 /* We don't need to append 'restrict's to the argument types,
18726 even though the POSIX signature has the 'restrict's,
18727 since C99 says they can't affect type compatibility. */
18728 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
18730 /* Check the return type is a pointer.
18731 On HP-UX 10 it is 'int'. */
18732 *localtime_r (0, 0);
18738 if ac_fn_c_try_compile "$LINENO"; then :
18739 gl_cv_time_r_posix=yes
18741 gl_cv_time_r_posix=no
18743 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18746 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
18747 $as_echo "$gl_cv_time_r_posix" >&6; }
18748 if test $gl_cv_time_r_posix = yes; then
18749 REPLACE_LOCALTIME_R=0
18751 REPLACE_LOCALTIME_R=1
18757 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then
18766 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext"
18783 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
18803 if test $gl_cv_have_include_next = yes; then
18804 gl_cv_next_unistd_h='<'unistd.h'>'
18806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
18807 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
18808 if ${gl_cv_next_unistd_h+:} false; then :
18809 $as_echo_n "(cached) " >&6
18812 if test $ac_cv_header_unistd_h = yes; then
18815 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18816 /* end confdefs.h. */
18817 #include <unistd.h>
18821 aix*) gl_absname_cpp="$ac_cpp -C" ;;
18822 *) gl_absname_cpp="$ac_cpp" ;;
18827 gl_dirsep_regex='[/\\]'
18830 gl_dirsep_regex='\/'
18833 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
18835 gl_header_literal_regex=`echo 'unistd.h' \
18836 | sed -e "$gl_make_literal_regex_sed"`
18837 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18838 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18843 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18844 sed -n "$gl_absolute_header_sed"`'"'
18846 gl_cv_next_unistd_h='<'unistd.h'>'
18851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
18852 $as_echo "$gl_cv_next_unistd_h" >&6; }
18854 NEXT_UNISTD_H=$gl_cv_next_unistd_h
18856 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
18857 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18858 gl_next_as_first_directive='<'unistd.h'>'
18860 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18861 gl_next_as_first_directive=$gl_cv_next_unistd_h
18863 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive
18868 if test $ac_cv_header_unistd_h = yes; then
18878 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
18879 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
18880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
18881 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
18882 if eval \${$as_gl_Symbol+:} false; then :
18883 $as_echo_n "(cached) " >&6
18885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18886 /* end confdefs.h. */
18889 # include <unistd.h>
18891 /* Some systems declare various items in the wrong headers. */
18892 #if !(defined __GLIBC__ && !defined __UCLIBC__)
18893 # include <fcntl.h>
18894 # include <stdio.h>
18895 # include <stdlib.h>
18896 # if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__
18910 if ac_fn_c_try_compile "$LINENO"; then :
18911 eval "$as_gl_Symbol=yes"
18913 eval "$as_gl_Symbol=no"
18915 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
18917 eval ac_res=\$$as_gl_Symbol
18918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
18919 $as_echo "$ac_res" >&6; }
18920 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
18921 cat >>confdefs.h <<_ACEOF
18922 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
18925 eval ac_cv_have_decl_$gl_func=yes
18937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink honors trailing slashes" >&5
18938 $as_echo_n "checking whether unlink honors trailing slashes... " >&6; }
18939 if ${gl_cv_func_unlink_honors_slashes+:} false; then :
18940 $as_echo_n "(cached) " >&6
18942 touch conftest.file
18943 # Assume that if we have lstat, we can also check symlinks.
18944 if test $ac_cv_func_lstat = yes; then
18945 ln -s conftest.file conftest.lnk
18947 if test "$cross_compiling" = yes; then :
18948 gl_cv_func_unlink_honors_slashes="guessing no"
18950 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18951 /* end confdefs.h. */
18953 # include <unistd.h>
18954 #else /* on Windows with MSVC */
18963 if (!unlink ("conftest.file/"))
18965 else if (errno != ENOTDIR)
18968 if (!unlink ("conftest.lnk/"))
18970 else if (errno != ENOTDIR)
18979 if ac_fn_c_try_run "$LINENO"; then :
18980 gl_cv_func_unlink_honors_slashes=yes
18982 gl_cv_func_unlink_honors_slashes=no
18984 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
18985 conftest.$ac_objext conftest.beam conftest.$ac_ext
18988 rm -f conftest.file conftest.lnk
18990 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_honors_slashes" >&5
18991 $as_echo "$gl_cv_func_unlink_honors_slashes" >&6; }
18992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unlink of a parent directory fails as it should" >&5
18993 $as_echo_n "checking whether unlink of a parent directory fails as it should... " >&6; }
18994 if ${gl_cv_func_unlink_parent_fails+:} false; then :
18995 $as_echo_n "(cached) " >&6
19000 # Use the mktemp program if available. If not available, hide the error
19002 tmp=`(umask 077 && mktemp -d /tmp/gtXXXXXX) 2>/dev/null` &&
19003 test -n "$tmp" && test -d "$tmp"
19006 # Use a simple mkdir command. It is guaranteed to fail if the directory
19007 # already exists. $RANDOM is bash specific and expands to empty in shells
19008 # other than bash, ksh and zsh. Its use does not increase security;
19009 # rather, it minimizes the probability of failure in a very cluttered /tmp
19011 tmp=/tmp/gt$$-$RANDOM
19012 (umask 077 && mkdir "$tmp")
19014 mkdir "$tmp/subdir"
19015 GL_SUBDIR_FOR_UNLINK="$tmp/subdir"
19016 export GL_SUBDIR_FOR_UNLINK
19017 if test "$cross_compiling" = yes; then :
19018 gl_cv_func_unlink_parent_fails="guessing no"
19020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19021 /* end confdefs.h. */
19023 #include <stdlib.h>
19025 # include <unistd.h>
19026 #else /* on Windows with MSVC */
19027 # include <direct.h>
19033 if (chdir (getenv ("GL_SUBDIR_FOR_UNLINK")) != 0)
19035 else if (unlink ("..") == 0)
19041 if ac_fn_c_try_run "$LINENO"; then :
19042 gl_cv_func_unlink_parent_fails=yes
19044 gl_cv_func_unlink_parent_fails=no
19046 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19047 conftest.$ac_objext conftest.beam conftest.$ac_ext
19050 unset GL_SUBDIR_FOR_UNLINK
19053 gl_cv_func_unlink_parent_fails="guessing no"
19057 gl_cv_func_unlink_parent_fails="guessing yes"
19062 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unlink_parent_fails" >&5
19063 $as_echo "$gl_cv_func_unlink_parent_fails" >&6; }
19064 case "$gl_cv_func_unlink_parent_fails" in
19067 $as_echo "#define UNLINK_PARENT_BUG 1" >>confdefs.h
19071 if test "$gl_cv_func_unlink_honors_slashes" != yes \
19072 || { case "$gl_cv_func_unlink_parent_fails" in
19080 if test $REPLACE_UNLINK = 1; then
19089 gl_LIBOBJS="$gl_LIBOBJS unlink.$ac_objext"
19103 $as_echo "#define GNULIB_TEST_UNLINK 1" >>confdefs.h
19110 if test $ac_cv_have_decl_unsetenv = no; then
19111 HAVE_DECL_UNSETENV=0
19113 for ac_func in unsetenv
19115 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv"
19116 if test "x$ac_cv_func_unsetenv" = xyes; then :
19117 cat >>confdefs.h <<_ACEOF
19118 #define HAVE_UNSETENV 1
19124 if test $ac_cv_func_unsetenv = no; then
19128 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
19129 $as_echo_n "checking for unsetenv() return type... " >&6; }
19130 if ${gt_cv_func_unsetenv_ret+:} false; then :
19131 $as_echo_n "(cached) " >&6
19133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19134 /* end confdefs.h. */
19137 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
19138 #include <stdlib.h>
19143 int unsetenv (const char *name);
19153 if ac_fn_c_try_compile "$LINENO"; then :
19154 gt_cv_func_unsetenv_ret='int'
19156 gt_cv_func_unsetenv_ret='void'
19158 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19160 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
19161 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
19162 if test $gt_cv_func_unsetenv_ret = 'void'; then
19164 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
19169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
19170 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
19171 if ${gl_cv_func_unsetenv_works+:} false; then :
19172 $as_echo_n "(cached) " >&6
19174 if test "$cross_compiling" = yes; then :
19175 gl_cv_func_unsetenv_works="guessing no"
19177 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19178 /* end confdefs.h. */
19180 #include <stdlib.h>
19182 extern char **environ;
19188 char entry1[] = "a=1";
19189 char entry2[] = "b=2";
19190 char *env[] = { entry1, entry2, NULL };
19191 if (putenv ((char *) "a=1")) return 1;
19192 if (putenv (entry2)) return 2;
19195 if (getenv ("a")) return 3;
19196 if (!unsetenv ("") || errno != EINVAL) return 4;
19199 if (!getenv ("a")) return 5;
19202 if (getenv ("a")) return 6;
19208 if ac_fn_c_try_run "$LINENO"; then :
19209 gl_cv_func_unsetenv_works=yes
19211 gl_cv_func_unsetenv_works=no
19213 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19214 conftest.$ac_objext conftest.beam conftest.$ac_ext
19218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
19219 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
19220 if test "$gl_cv_func_unsetenv_works" != yes; then
19225 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then
19234 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext"
19252 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
19262 if test $ac_cv_func_futimens = no && test $ac_cv_func_futimesat = yes; then
19263 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether futimesat handles NULL file" >&5
19264 $as_echo_n "checking whether futimesat handles NULL file... " >&6; }
19265 if ${gl_cv_func_futimesat_works+:} false; then :
19266 $as_echo_n "(cached) " >&6
19268 touch conftest.file
19269 if test "$cross_compiling" = yes; then :
19270 gl_cv_func_futimesat_works="guessing no"
19272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19273 /* end confdefs.h. */
19275 #include <stddef.h>
19276 #include <sys/times.h>
19282 int fd = open ("conftest.file", O_RDWR);
19283 if (fd < 0) return 1;
19284 if (futimesat (fd, NULL, NULL)) return 2;
19290 if ac_fn_c_try_run "$LINENO"; then :
19291 gl_cv_func_futimesat_works=yes
19293 gl_cv_func_futimesat_works=no
19295 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19296 conftest.$ac_objext conftest.beam conftest.$ac_ext
19299 rm -f conftest.file
19301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_futimesat_works" >&5
19302 $as_echo "$gl_cv_func_futimesat_works" >&6; }
19303 if test "$gl_cv_func_futimesat_works" != yes; then
19305 $as_echo "#define FUTIMESAT_NULL_BUG 1" >>confdefs.h
19312 if test $ac_cv_func_vasnprintf = no; then
19323 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext"
19333 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext"
19343 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext"
19353 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext"
19355 if test $ac_cv_func_vasnprintf = yes; then
19357 $as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h
19371 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default"
19372 if test "x$ac_cv_type_ptrdiff_t" = xyes; then :
19376 $as_echo "#define ptrdiff_t long" >>confdefs.h
19390 for ac_func in vasprintf
19392 ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf"
19393 if test "x$ac_cv_func_vasprintf" = xyes; then :
19394 cat >>confdefs.h <<_ACEOF
19395 #define HAVE_VASPRINTF 1
19401 if test $ac_cv_func_vasprintf = no; then
19411 gl_LIBOBJS="$gl_LIBOBJS vasprintf.$ac_objext"
19421 gl_LIBOBJS="$gl_LIBOBJS asprintf.$ac_objext"
19424 if test $ac_cv_func_vasprintf = yes; then
19425 REPLACE_VASPRINTF=1
19450 $as_echo "#define GNULIB_TEST_VASPRINTF 1" >>confdefs.h
19469 if test $gl_cv_have_include_next = yes; then
19470 gl_cv_next_wchar_h='<'wchar.h'>'
19472 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
19473 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
19474 if ${gl_cv_next_wchar_h+:} false; then :
19475 $as_echo_n "(cached) " >&6
19478 if test $ac_cv_header_wchar_h = yes; then
19481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19482 /* end confdefs.h. */
19487 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19488 *) gl_absname_cpp="$ac_cpp" ;;
19493 gl_dirsep_regex='[/\\]'
19496 gl_dirsep_regex='\/'
19499 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19501 gl_header_literal_regex=`echo 'wchar.h' \
19502 | sed -e "$gl_make_literal_regex_sed"`
19503 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19504 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19509 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19510 sed -n "$gl_absolute_header_sed"`'"'
19512 gl_cv_next_wchar_h='<'wchar.h'>'
19517 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
19518 $as_echo "$gl_cv_next_wchar_h" >&6; }
19520 NEXT_WCHAR_H=$gl_cv_next_wchar_h
19522 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19523 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19524 gl_next_as_first_directive='<'wchar.h'>'
19526 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19527 gl_next_as_first_directive=$gl_cv_next_wchar_h
19529 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive
19534 if test $ac_cv_header_wchar_h = yes; then
19544 if test $gt_cv_c_wint_t = yes; then
19552 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
19553 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
19554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
19555 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
19556 if eval \${$as_gl_Symbol+:} false; then :
19557 $as_echo_n "(cached) " >&6
19559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19560 /* end confdefs.h. */
19562 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19564 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19565 included before <wchar.h>. */
19566 #if !(defined __GLIBC__ && !defined __UCLIBC__)
19567 # include <stddef.h>
19568 # include <stdio.h>
19582 if ac_fn_c_try_compile "$LINENO"; then :
19583 eval "$as_gl_Symbol=yes"
19585 eval "$as_gl_Symbol=no"
19587 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19589 eval ac_res=\$$as_gl_Symbol
19590 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19591 $as_echo "$ac_res" >&6; }
19592 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
19593 cat >>confdefs.h <<_ACEOF
19594 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
19597 eval ac_cv_have_decl_$gl_func=yes
19607 if test $ac_cv_func_iswcntrl = yes; then
19617 if test $gt_cv_c_wint_t = yes; then
19633 if test $gl_cv_have_include_next = yes; then
19634 gl_cv_next_wctype_h='<'wctype.h'>'
19636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
19637 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
19638 if ${gl_cv_next_wctype_h+:} false; then :
19639 $as_echo_n "(cached) " >&6
19642 if test $ac_cv_header_wctype_h = yes; then
19645 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19646 /* end confdefs.h. */
19647 #include <wctype.h>
19651 aix*) gl_absname_cpp="$ac_cpp -C" ;;
19652 *) gl_absname_cpp="$ac_cpp" ;;
19657 gl_dirsep_regex='[/\\]'
19660 gl_dirsep_regex='\/'
19663 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g'
19665 gl_header_literal_regex=`echo 'wctype.h' \
19666 | sed -e "$gl_make_literal_regex_sed"`
19667 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19668 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19673 gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19674 sed -n "$gl_absolute_header_sed"`'"'
19676 gl_cv_next_wctype_h='<'wctype.h'>'
19681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
19682 $as_echo "$gl_cv_next_wctype_h" >&6; }
19684 NEXT_WCTYPE_H=$gl_cv_next_wctype_h
19686 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then
19687 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19688 gl_next_as_first_directive='<'wctype.h'>'
19690 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19691 gl_next_as_first_directive=$gl_cv_next_wctype_h
19693 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive
19698 if test $ac_cv_header_wctype_h = yes; then
19699 if test $ac_cv_func_iswcntrl = yes; then
19700 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
19701 $as_echo_n "checking whether iswcntrl works... " >&6; }
19702 if ${gl_cv_func_iswcntrl_works+:} false; then :
19703 $as_echo_n "(cached) " >&6
19706 if test "$cross_compiling" = yes; then :
19707 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19708 /* end confdefs.h. */
19709 #include <stdlib.h>
19710 #if __GNU_LIBRARY__ == 1
19711 Linux libc5 i18n is broken.
19721 if ac_fn_c_try_compile "$LINENO"; then :
19722 gl_cv_func_iswcntrl_works=yes
19724 gl_cv_func_iswcntrl_works=no
19726 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19729 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19730 /* end confdefs.h. */
19732 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
19733 included before <wchar.h>.
19734 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
19735 must be included before <wchar.h>. */
19736 #include <stddef.h>
19740 #include <wctype.h>
19741 int main () { return iswprint ('x') == 0; }
19744 if ac_fn_c_try_run "$LINENO"; then :
19745 gl_cv_func_iswcntrl_works=yes
19747 gl_cv_func_iswcntrl_works=no
19749 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
19750 conftest.$ac_objext conftest.beam conftest.$ac_ext
19755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
19756 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
19764 if test "$gl_cv_func_iswcntrl_works" = no; then
19771 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then
19775 if test $REPLACE_ISWCNTRL = 1; then
19778 for ac_func in towlower
19780 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower"
19781 if test "x$ac_cv_func_towlower" = xyes; then :
19782 cat >>confdefs.h <<_ACEOF
19783 #define HAVE_TOWLOWER 1
19789 if test $ac_cv_func_towlower = yes; then
19792 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
19793 included before <wchar.h>.
19794 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
19795 must be included before <wchar.h>. */
19796 #include <stddef.h>
19801 # include <wctype.h>
19805 if test "x$ac_cv_have_decl_towlower" = xyes; then :
19811 cat >>confdefs.h <<_ACEOF
19812 #define HAVE_DECL_TOWLOWER $ac_have_decl
19815 if test $ac_cv_have_decl_towlower = yes; then
19824 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then
19828 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
19829 $as_echo_n "checking for wctype_t... " >&6; }
19830 if ${gl_cv_type_wctype_t+:} false; then :
19831 $as_echo_n "(cached) " >&6
19833 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19834 /* end confdefs.h. */
19835 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
19836 included before <wchar.h>.
19837 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
19838 must be included before <wchar.h>. */
19839 #include <stddef.h>
19844 # include <wctype.h>
19856 if ac_fn_c_try_compile "$LINENO"; then :
19857 gl_cv_type_wctype_t=yes
19859 gl_cv_type_wctype_t=no
19861 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
19865 $as_echo "$gl_cv_type_wctype_t" >&6; }
19866 if test $gl_cv_type_wctype_t = no; then
19870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
19871 $as_echo_n "checking for wctrans_t... " >&6; }
19872 if ${gl_cv_type_wctrans_t+:} false; then :
19873 $as_echo_n "(cached) " >&6
19875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19876 /* end confdefs.h. */
19877 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be
19878 included before <wchar.h>.
19879 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h>
19880 must be included before <wchar.h>. */
19881 #include <stddef.h>
19885 #include <wctype.h>
19896 if ac_fn_c_try_compile "$LINENO"; then :
19897 gl_cv_type_wctrans_t=yes
19899 gl_cv_type_wctrans_t=no
19901 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
19905 $as_echo "$gl_cv_type_wctrans_t" >&6; }
19906 if test $gl_cv_type_wctrans_t = no; then
19911 for gl_func in wctype iswctype wctrans towctrans ; do
19912 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh`
19913 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5
19914 $as_echo_n "checking whether $gl_func is declared without a macro... " >&6; }
19915 if eval \${$as_gl_Symbol+:} false; then :
19916 $as_echo_n "(cached) " >&6
19918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
19919 /* end confdefs.h. */
19921 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before
19923 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be
19924 included before <wchar.h>. */
19925 #if !(defined __GLIBC__ && !defined __UCLIBC__)
19926 # include <stddef.h>
19927 # include <stdio.h>
19929 # include <wchar.h>
19931 #include <wctype.h>
19942 if ac_fn_c_try_compile "$LINENO"; then :
19943 eval "$as_gl_Symbol=yes"
19945 eval "$as_gl_Symbol=no"
19947 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
19949 eval ac_res=\$$as_gl_Symbol
19950 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
19951 $as_echo "$ac_res" >&6; }
19952 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then :
19953 cat >>confdefs.h <<_ACEOF
19954 #define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1
19957 eval ac_cv_have_decl_$gl_func=yes
19965 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
19971 if test $REPLACE_WRITE = 1; then
19980 gl_LIBOBJS="$gl_LIBOBJS write.$ac_objext"
19997 $as_echo "#define GNULIB_TEST_WRITE 1" >>confdefs.h
20016 for ac_header in stdint.h
20018 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default"
20019 if test "x$ac_cv_header_stdint_h" = xyes; then :
20020 cat >>confdefs.h <<_ACEOF
20021 #define HAVE_STDINT_H 1
20038 # End of code from modules
20059 gl_source_base='tests'
20060 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
20062 gl_module_indicator_condition=$gltests_WITNESS
20072 LIBPATCH_LIBDEPS="$gl_libdeps"
20074 LIBPATCH_LTLIBDEPS="$gl_ltlibdeps"
20077 if test -n "$ac_tool_prefix"; then
20078 for ac_prog in ar lib "link -lib"
20080 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
20081 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
20082 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20083 $as_echo_n "checking for $ac_word... " >&6; }
20084 if ${ac_cv_prog_AR+:} false; then :
20085 $as_echo_n "(cached) " >&6
20087 if test -n "$AR"; then
20088 ac_cv_prog_AR="$AR" # Let the user override the test.
20090 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20091 for as_dir in $PATH
20094 test -z "$as_dir" && as_dir=.
20095 for ac_exec_ext in '' $ac_executable_extensions; do
20096 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20097 ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
20098 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20108 if test -n "$AR"; then
20109 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
20110 $as_echo "$AR" >&6; }
20112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20113 $as_echo "no" >&6; }
20117 test -n "$AR" && break
20120 if test -z "$AR"; then
20122 for ac_prog in ar lib "link -lib"
20124 # Extract the first word of "$ac_prog", so it can be a program name with args.
20125 set dummy $ac_prog; ac_word=$2
20126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20127 $as_echo_n "checking for $ac_word... " >&6; }
20128 if ${ac_cv_prog_ac_ct_AR+:} false; then :
20129 $as_echo_n "(cached) " >&6
20131 if test -n "$ac_ct_AR"; then
20132 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
20134 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20135 for as_dir in $PATH
20138 test -z "$as_dir" && as_dir=.
20139 for ac_exec_ext in '' $ac_executable_extensions; do
20140 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
20141 ac_cv_prog_ac_ct_AR="$ac_prog"
20142 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20151 ac_ct_AR=$ac_cv_prog_ac_ct_AR
20152 if test -n "$ac_ct_AR"; then
20153 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
20154 $as_echo "$ac_ct_AR" >&6; }
20156 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20157 $as_echo "no" >&6; }
20161 test -n "$ac_ct_AR" && break
20164 if test "x$ac_ct_AR" = x; then
20167 case $cross_compiling:$ac_tool_warned in
20169 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
20170 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
20171 ac_tool_warned=yes ;;
20179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking the archiver ($AR) interface" >&5
20180 $as_echo_n "checking the archiver ($AR) interface... " >&6; }
20181 if ${am_cv_ar_interface+:} false; then :
20182 $as_echo_n "(cached) " >&6
20184 am_cv_ar_interface=ar
20185 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20186 /* end confdefs.h. */
20187 int some_variable = 0;
20189 if ac_fn_c_try_compile "$LINENO"; then :
20190 am_ar_try='$AR cru libconftest.a conftest.$ac_objext >&5'
20191 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
20192 (eval $am_ar_try) 2>&5
20194 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20195 test $ac_status = 0; }
20196 if test "$ac_status" -eq 0; then
20197 am_cv_ar_interface=ar
20199 am_ar_try='$AR -NOLOGO -OUT:conftest.lib conftest.$ac_objext >&5'
20200 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$am_ar_try\""; } >&5
20201 (eval $am_ar_try) 2>&5
20203 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
20204 test $ac_status = 0; }
20205 if test "$ac_status" -eq 0; then
20206 am_cv_ar_interface=lib
20208 am_cv_ar_interface=unknown
20211 rm -f conftest.lib libconftest.a
20214 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_ar_interface" >&5
20218 $as_echo "$am_cv_ar_interface" >&6; }
20220 case $am_cv_ar_interface in
20224 # Microsoft lib, so override with the ar-lib wrapper script.
20225 # FIXME: It is wrong to rewrite AR.
20226 # But if we don't then we get into trouble of one sort or another.
20227 # A longer-term fix would be to have automake use am__AR in this case,
20228 # and then we could set am__AR="$am_aux_dir/ar-lib \$(AR)" or something
20230 AR="$am_aux_dir/ar-lib $AR"
20233 as_fn_error $? "could not determine $AR interface" "$LINENO" 5
20238 # Check whether --enable-gcc-warnings was given.
20239 if test "${enable_gcc_warnings+set}" = set; then :
20240 enableval=$enable_gcc_warnings; case $enableval in
20242 *) as_fn_error $? "bad value $enableval for gcc-warnings option" "$LINENO" 5 ;;
20244 gl_gcc_warnings=$enableval
20251 if test "$gl_gcc_warnings" = yes; then
20252 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5
20253 $as_echo_n "checking whether C compiler handles -Werror... " >&6; }
20254 if ${gl_cv_warn_c__Werror+:} false; then :
20255 $as_echo_n "(cached) " >&6
20258 gl_save_compiler_FLAGS="$CFLAGS"
20259 CFLAGS="$CFLAGS -Werror"
20260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20261 /* end confdefs.h. */
20271 if ac_fn_c_try_compile "$LINENO"; then :
20272 gl_cv_warn_c__Werror=yes
20274 gl_cv_warn_c__Werror=no
20276 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20277 CFLAGS="$gl_save_compiler_FLAGS"
20280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5
20281 $as_echo "$gl_cv_warn_c__Werror" >&6; }
20282 if test "x$gl_cv_warn_c__Werror" = xyes; then :
20283 as_fn_append WERROR_CFLAGS " -Werror"
20289 # This, $nw, is the list of warnings we disable.
20290 nw="$nw -Wdeclaration-after-statement" # too useful to forbid
20291 nw="$nw -Waggregate-return" # anachronistic
20292 nw="$nw -Wlong-long" # C90 is anachronistic (lib/gethrxtime.h)
20293 nw="$nw -Wc++-compat" # We don't care about C++ compilers
20294 nw="$nw -Wundef" # Warns on '#if GNULIB_FOO' etc in gnulib
20295 nw="$nw -Wtraditional" # Warns on #elif which we use often
20296 nw="$nw -Wcast-qual" # Too many warnings for now
20297 nw="$nw -Wconversion" # Too many warnings for now
20298 nw="$nw -Wsystem-headers" # Don't let system headers trigger warnings
20299 nw="$nw -Wsign-conversion" # Too many warnings for now
20300 nw="$nw -Wtraditional-conversion" # Too many warnings for now
20301 nw="$nw -Wunreachable-code" # Too many warnings for now
20302 nw="$nw -Wpadded" # Our structs are not padded
20303 nw="$nw -Wredundant-decls" # openat.h declares e.g., mkdirat
20304 nw="$nw -Wlogical-op" # any use of fwrite provokes this
20305 nw="$nw -Wformat-nonliteral" # who.c and pinky.c strftime uses
20306 nw="$nw -Wvla" # warnings in gettext.h
20307 nw="$nw -Wnested-externs" # use of XARGMATCH/verify_function__
20308 nw="$nw -Wswitch-enum" # Too many warnings for now
20309 nw="$nw -Wswitch-default" # Too many warnings for now
20310 nw="$nw -Wstack-protector" # not worth working around
20311 nw="$nw -Wmissing-format-attribute" # not worth working around in patch
20312 # things to fix soon:
20314 nw="$nw -Wstrict-overflow"
20315 nw="$nw -Wunsafe-loop-optimizations"
20316 # nw="$nw -Wfloat-equal" # sort.c, seq.c
20317 # nw="$nw -Wmissing-format-attribute" # copy.c
20318 # nw="$nw -Winline" # system.h's readdir_ignoring_dot_and_dotdot
20319 # ?? -Wstrict-overflow
20323 if test -n "$GCC"; then
20325 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is supported" >&5
20326 $as_echo_n "checking whether -Wno-missing-field-initializers is supported... " >&6; }
20327 if ${gl_cv_cc_nomfi_supported+:} false; then :
20328 $as_echo_n "(cached) " >&6
20331 gl_save_CFLAGS="$CFLAGS"
20332 CFLAGS="$CFLAGS -W -Werror -Wno-missing-field-initializers"
20333 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20334 /* end confdefs.h. */
20344 if ac_fn_c_try_compile "$LINENO"; then :
20345 gl_cv_cc_nomfi_supported=yes
20347 gl_cv_cc_nomfi_supported=no
20349 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20350 CFLAGS="$gl_save_CFLAGS"
20353 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_supported" >&5
20354 $as_echo "$gl_cv_cc_nomfi_supported" >&6; }
20356 if test "$gl_cv_cc_nomfi_supported" = yes; then
20357 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -Wno-missing-field-initializers is needed" >&5
20358 $as_echo_n "checking whether -Wno-missing-field-initializers is needed... " >&6; }
20359 if ${gl_cv_cc_nomfi_needed+:} false; then :
20360 $as_echo_n "(cached) " >&6
20363 gl_save_CFLAGS="$CFLAGS"
20364 CFLAGS="$CFLAGS -W -Werror"
20365 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20366 /* end confdefs.h. */
20369 typedef struct { int a; int b; } s_t;
20381 if ac_fn_c_try_compile "$LINENO"; then :
20382 gl_cv_cc_nomfi_needed=no
20384 gl_cv_cc_nomfi_needed=yes
20386 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20387 CFLAGS="$gl_save_CFLAGS"
20391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_nomfi_needed" >&5
20392 $as_echo "$gl_cv_cc_nomfi_needed" >&6; }
20397 for gl_manywarn_item in \
20401 -Wformat-nonliteral \
20402 -Wformat-security \
20404 -Wmissing-include-dirs \
20408 -Wunknown-pragmas \
20409 -Wstrict-aliasing \
20410 -Wstrict-overflow \
20414 -Wtraditional-conversion \
20415 -Wdeclaration-after-statement \
20418 -Wunsafe-loop-optimizations \
20420 -Wbad-function-cast \
20426 -Wsign-conversion \
20428 -Waggregate-return \
20429 -Wstrict-prototypes \
20430 -Wold-style-definition \
20431 -Wmissing-prototypes \
20432 -Wmissing-declarations \
20433 -Wmissing-noreturn \
20434 -Wmissing-format-attribute \
20437 -Wredundant-decls \
20439 -Wunreachable-code \
20444 -Wvolatile-register-var \
20445 -Wdisabled-optimization \
20446 -Wstack-protector \
20447 -Woverlength-strings \
20448 -Wbuiltin-macro-redefined \
20450 -Wpacked-bitfield-compat \
20453 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
20455 # The following are not documented in the manual but are included in
20456 # output from gcc --help=warnings.
20457 for gl_manywarn_item in \
20459 -Wcoverage-mismatch \
20463 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
20465 # More warnings from gcc 4.6.2 --help=warnings.
20466 for gl_manywarn_item in \
20470 -Wdeprecated-declarations \
20472 -Wdouble-promotion \
20475 -Wformat-contains-nul \
20476 -Wformat-extra-args \
20477 -Wformat-zero-length \
20482 -Wpointer-to-int-cast \
20484 -Wsuggest-attribute=const \
20485 -Wsuggest-attribute=noreturn \
20486 -Wsuggest-attribute=pure \
20489 gl_manywarn_set="$gl_manywarn_set $gl_manywarn_item"
20492 # Disable the missing-field-initializers warning if needed
20493 if test "$gl_cv_cc_nomfi_needed" = yes; then
20494 gl_manywarn_set="$gl_manywarn_set -Wno-missing-field-initializers"
20497 ws=$gl_manywarn_set
20505 *" $gl_warn_item "*)
20508 gl_warn_set="$gl_warn_set $gl_warn_item"
20515 as_gl_Warn=`$as_echo "gl_cv_warn_c_$w" | $as_tr_sh`
20516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $w" >&5
20517 $as_echo_n "checking whether C compiler handles $w... " >&6; }
20518 if eval \${$as_gl_Warn+:} false; then :
20519 $as_echo_n "(cached) " >&6
20522 gl_save_compiler_FLAGS="$CFLAGS"
20523 CFLAGS="$CFLAGS $w"
20524 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20525 /* end confdefs.h. */
20535 if ac_fn_c_try_compile "$LINENO"; then :
20536 eval "$as_gl_Warn=yes"
20538 eval "$as_gl_Warn=no"
20540 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20541 CFLAGS="$gl_save_compiler_FLAGS"
20544 eval ac_res=\$$as_gl_Warn
20545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20546 $as_echo "$ac_res" >&6; }
20547 if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then :
20548 as_fn_append WARN_CFLAGS " $w"
20552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-missing-field-initializers" >&5
20553 $as_echo_n "checking whether C compiler handles -Wno-missing-field-initializers... " >&6; }
20554 if ${gl_cv_warn_c__Wno_missing_field_initializers+:} false; then :
20555 $as_echo_n "(cached) " >&6
20558 gl_save_compiler_FLAGS="$CFLAGS"
20559 CFLAGS="$CFLAGS -Wno-missing-field-initializers"
20560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20561 /* end confdefs.h. */
20571 if ac_fn_c_try_compile "$LINENO"; then :
20572 gl_cv_warn_c__Wno_missing_field_initializers=yes
20574 gl_cv_warn_c__Wno_missing_field_initializers=no
20576 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20577 CFLAGS="$gl_save_compiler_FLAGS"
20580 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_missing_field_initializers" >&5
20581 $as_echo "$gl_cv_warn_c__Wno_missing_field_initializers" >&6; }
20582 if test "x$gl_cv_warn_c__Wno_missing_field_initializers" = xyes; then :
20583 as_fn_append WARN_CFLAGS " -Wno-missing-field-initializers"
20586 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-sign-compare" >&5
20587 $as_echo_n "checking whether C compiler handles -Wno-sign-compare... " >&6; }
20588 if ${gl_cv_warn_c__Wno_sign_compare+:} false; then :
20589 $as_echo_n "(cached) " >&6
20592 gl_save_compiler_FLAGS="$CFLAGS"
20593 CFLAGS="$CFLAGS -Wno-sign-compare"
20594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20595 /* end confdefs.h. */
20605 if ac_fn_c_try_compile "$LINENO"; then :
20606 gl_cv_warn_c__Wno_sign_compare=yes
20608 gl_cv_warn_c__Wno_sign_compare=no
20610 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20611 CFLAGS="$gl_save_compiler_FLAGS"
20614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_sign_compare" >&5
20615 $as_echo "$gl_cv_warn_c__Wno_sign_compare" >&6; }
20616 if test "x$gl_cv_warn_c__Wno_sign_compare" = xyes; then :
20617 as_fn_append WARN_CFLAGS " -Wno-sign-compare"
20619 # Too many warnings for now
20620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-unused-parameter" >&5
20621 $as_echo_n "checking whether C compiler handles -Wno-unused-parameter... " >&6; }
20622 if ${gl_cv_warn_c__Wno_unused_parameter+:} false; then :
20623 $as_echo_n "(cached) " >&6
20626 gl_save_compiler_FLAGS="$CFLAGS"
20627 CFLAGS="$CFLAGS -Wno-unused-parameter"
20628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20629 /* end confdefs.h. */
20639 if ac_fn_c_try_compile "$LINENO"; then :
20640 gl_cv_warn_c__Wno_unused_parameter=yes
20642 gl_cv_warn_c__Wno_unused_parameter=no
20644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20645 CFLAGS="$gl_save_compiler_FLAGS"
20648 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_unused_parameter" >&5
20649 $as_echo "$gl_cv_warn_c__Wno_unused_parameter" >&6; }
20650 if test "x$gl_cv_warn_c__Wno_unused_parameter" = xyes; then :
20651 as_fn_append WARN_CFLAGS " -Wno-unused-parameter"
20653 # Too many warnings for now
20655 # In spite of excluding -Wlogical-op above, it is enabled, as of
20656 # gcc 4.5.0 20090517, and it provokes warnings in cat.c, dd.c, truncate.c
20657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-logical-op" >&5
20658 $as_echo_n "checking whether C compiler handles -Wno-logical-op... " >&6; }
20659 if ${gl_cv_warn_c__Wno_logical_op+:} false; then :
20660 $as_echo_n "(cached) " >&6
20663 gl_save_compiler_FLAGS="$CFLAGS"
20664 CFLAGS="$CFLAGS -Wno-logical-op"
20665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20666 /* end confdefs.h. */
20676 if ac_fn_c_try_compile "$LINENO"; then :
20677 gl_cv_warn_c__Wno_logical_op=yes
20679 gl_cv_warn_c__Wno_logical_op=no
20681 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20682 CFLAGS="$gl_save_compiler_FLAGS"
20685 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_logical_op" >&5
20686 $as_echo "$gl_cv_warn_c__Wno_logical_op" >&6; }
20687 if test "x$gl_cv_warn_c__Wno_logical_op" = xyes; then :
20688 as_fn_append WARN_CFLAGS " -Wno-logical-op"
20692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -fdiagnostics-show-option" >&5
20693 $as_echo_n "checking whether C compiler handles -fdiagnostics-show-option... " >&6; }
20694 if ${gl_cv_warn_c__fdiagnostics_show_option+:} false; then :
20695 $as_echo_n "(cached) " >&6
20698 gl_save_compiler_FLAGS="$CFLAGS"
20699 CFLAGS="$CFLAGS -fdiagnostics-show-option"
20700 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20701 /* end confdefs.h. */
20711 if ac_fn_c_try_compile "$LINENO"; then :
20712 gl_cv_warn_c__fdiagnostics_show_option=yes
20714 gl_cv_warn_c__fdiagnostics_show_option=no
20716 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20717 CFLAGS="$gl_save_compiler_FLAGS"
20720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__fdiagnostics_show_option" >&5
20721 $as_echo "$gl_cv_warn_c__fdiagnostics_show_option" >&6; }
20722 if test "x$gl_cv_warn_c__fdiagnostics_show_option" = xyes; then :
20723 as_fn_append WARN_CFLAGS " -fdiagnostics-show-option"
20726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -funit-at-a-time" >&5
20727 $as_echo_n "checking whether C compiler handles -funit-at-a-time... " >&6; }
20728 if ${gl_cv_warn_c__funit_at_a_time+:} false; then :
20729 $as_echo_n "(cached) " >&6
20732 gl_save_compiler_FLAGS="$CFLAGS"
20733 CFLAGS="$CFLAGS -funit-at-a-time"
20734 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20735 /* end confdefs.h. */
20745 if ac_fn_c_try_compile "$LINENO"; then :
20746 gl_cv_warn_c__funit_at_a_time=yes
20748 gl_cv_warn_c__funit_at_a_time=no
20750 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20751 CFLAGS="$gl_save_compiler_FLAGS"
20754 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__funit_at_a_time" >&5
20755 $as_echo "$gl_cv_warn_c__funit_at_a_time" >&6; }
20756 if test "x$gl_cv_warn_c__funit_at_a_time" = xyes; then :
20757 as_fn_append WARN_CFLAGS " -funit-at-a-time"
20760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wno-format-nonliteral" >&5
20761 $as_echo_n "checking whether C compiler handles -Wno-format-nonliteral... " >&6; }
20762 if ${gl_cv_warn_c__Wno_format_nonliteral+:} false; then :
20763 $as_echo_n "(cached) " >&6
20766 gl_save_compiler_FLAGS="$CFLAGS"
20767 CFLAGS="$CFLAGS -Wno-format-nonliteral"
20768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20769 /* end confdefs.h. */
20779 if ac_fn_c_try_compile "$LINENO"; then :
20780 gl_cv_warn_c__Wno_format_nonliteral=yes
20782 gl_cv_warn_c__Wno_format_nonliteral=no
20784 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
20785 CFLAGS="$gl_save_compiler_FLAGS"
20788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wno_format_nonliteral" >&5
20789 $as_echo "$gl_cv_warn_c__Wno_format_nonliteral" >&6; }
20790 if test "x$gl_cv_warn_c__Wno_format_nonliteral" = xyes; then :
20791 as_fn_append WARN_CFLAGS " -Wno-format-nonliteral"
20798 $as_echo "#define lint 1" >>confdefs.h
20801 $as_echo "#define _FORTIFY_SOURCE 2" >>confdefs.h
20804 $as_echo "#define GNULIB_PORTCHECK 1" >>confdefs.h
20807 # We use a slightly smaller set of warning options for lib/.
20808 # Remove the following and save the result in GNULIB_WARN_CFLAGS.
20810 nw="$nw -Wuninitialized"
20811 nw="$nw -Wunused-macros"
20812 nw="$nw -Wmissing-prototypes"
20813 nw="$nw -Wold-style-definition"
20816 set x $WARN_CFLAGS; shift
20820 *" $gl_warn_item "*)
20823 gl_warn_set="$gl_warn_set $gl_warn_item"
20827 GNULIB_WARN_CFLAGS=$gl_warn_set
20831 # For gnulib-tests, the set is slightly smaller still.
20833 nw="$nw -Wstrict-prototypes"
20836 set x $GNULIB_WARN_CFLAGS; shift
20840 *" $gl_warn_item "*)
20843 gl_warn_set="$gl_warn_set $gl_warn_item"
20847 GNULIB_TEST_WARN_CFLAGS=$gl_warn_set
20852 ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
20853 if test "x$ac_cv_type_mode_t" = xyes; then :
20857 cat >>confdefs.h <<_ACEOF
20863 ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default"
20864 if test "x$ac_cv_type_off_t" = xyes; then :
20868 cat >>confdefs.h <<_ACEOF
20869 #define off_t long int
20876 # Check whether --enable-xattr was given.
20877 if test "${enable_xattr+set}" = set; then :
20878 enableval=$enable_xattr; use_xattr=$enableval
20887 if test "$use_xattr" = "yes"; then
20888 for ac_header in attr/error_context.h attr/libattr.h
20890 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
20891 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
20892 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
20893 cat >>confdefs.h <<_ACEOF
20894 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
20902 if test $ac_cv_header_attr_libattr_h = yes \
20903 && test $ac_cv_header_attr_error_context_h = yes; then
20904 xattr_saved_LIBS=$LIBS
20905 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing attr_copy_file" >&5
20906 $as_echo_n "checking for library containing attr_copy_file... " >&6; }
20907 if ${ac_cv_search_attr_copy_file+:} false; then :
20908 $as_echo_n "(cached) " >&6
20910 ac_func_search_save_LIBS=$LIBS
20911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
20912 /* end confdefs.h. */
20914 /* Override any GCC internal prototype to avoid an error.
20915 Use char because int might match the return type of a GCC
20916 builtin and then its argument prototype would still apply. */
20920 char attr_copy_file ();
20924 return attr_copy_file ();
20929 for ac_lib in '' attr; do
20930 if test -z "$ac_lib"; then
20931 ac_res="none required"
20934 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
20936 if ac_fn_c_try_link "$LINENO"; then :
20937 ac_cv_search_attr_copy_file=$ac_res
20939 rm -f core conftest.err conftest.$ac_objext \
20941 if ${ac_cv_search_attr_copy_file+:} false; then :
20945 if ${ac_cv_search_attr_copy_file+:} false; then :
20948 ac_cv_search_attr_copy_file=no
20950 rm conftest.$ac_ext
20951 LIBS=$ac_func_search_save_LIBS
20953 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_attr_copy_file" >&5
20954 $as_echo "$ac_cv_search_attr_copy_file" >&6; }
20955 ac_res=$ac_cv_search_attr_copy_file
20956 if test "$ac_res" != no; then :
20957 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
20958 test "$ac_cv_search_attr_copy_file" = "none required" ||
20959 LIB_XATTR=$ac_cv_search_attr_copy_file
20962 for ac_func in attr_copy_file
20964 ac_fn_c_check_func "$LINENO" "attr_copy_file" "ac_cv_func_attr_copy_file"
20965 if test "x$ac_cv_func_attr_copy_file" = xyes; then :
20966 cat >>confdefs.h <<_ACEOF
20967 #define HAVE_ATTR_COPY_FILE 1
20973 LIBS=$xattr_saved_LIBS
20974 if test $ac_cv_func_attr_copy_file = yes; then
20978 if test $use_xattr = no; then
20979 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libattr development library was not found or not usable." >&5
20980 $as_echo "$as_me: WARNING: libattr development library was not found or not usable." >&2;}
20981 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: GNU patch will be built without xattr support." >&5
20982 $as_echo "$as_me: WARNING: GNU patch will be built without xattr support." >&2;}
20986 cat >>confdefs.h <<_ACEOF
20987 #define USE_XATTR `test $use_xattr != yes; echo $?`
20992 for ac_func in geteuid getuid raise sigaction sigprocmask sigsetmask
20994 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
20995 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
20996 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
20997 cat >>confdefs.h <<_ACEOF
20998 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21004 for ac_header in fcntl.h unistd.h
21006 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
21007 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
21008 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
21009 cat >>confdefs.h <<_ACEOF
21010 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
21017 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DOS-style setmode" >&5
21018 $as_echo_n "checking for DOS-style setmode... " >&6; }
21019 if ${ac_cv_func_setmode_dos+:} false; then :
21020 $as_echo_n "(cached) " >&6
21022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
21023 /* end confdefs.h. */
21026 # include <fcntl.h>
21029 # include <unistd.h>
21034 int ret = setmode && setmode (1, O_BINARY);
21039 if ac_fn_c_try_link "$LINENO"; then :
21040 ac_cv_func_setmode_dos=yes
21042 ac_cv_func_setmode_dos=no
21044 rm -f core conftest.err conftest.$ac_objext \
21045 conftest$ac_exeext conftest.$ac_ext
21047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setmode_dos" >&5
21048 $as_echo "$ac_cv_func_setmode_dos" >&6; }
21049 if test $ac_cv_func_setmode_dos = yes; then
21051 $as_echo "#define HAVE_SETMODE_DOS 1" >>confdefs.h
21055 # Extract the first word of "ed", so it can be a program name with args.
21056 set dummy ed; ac_word=$2
21057 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21058 $as_echo_n "checking for $ac_word... " >&6; }
21059 if ${ac_cv_path_ED+:} false; then :
21060 $as_echo_n "(cached) " >&6
21064 ac_cv_path_ED="$ED" # Let the user override the test with a path.
21067 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21068 for as_dir in $PATH
21071 test -z "$as_dir" && as_dir=.
21072 for ac_exec_ext in '' $ac_executable_extensions; do
21073 if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x "$as_dir/$ac_word$ac_exec_ext"; }; then
21074 ac_cv_path_ED="$as_dir/$ac_word$ac_exec_ext"
21075 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21082 test -z "$ac_cv_path_ED" && ac_cv_path_ED="ed"
21087 if test -n "$ED"; then
21088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ED" >&5
21089 $as_echo "$ED" >&6; }
21091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21092 $as_echo "no" >&6; }
21097 cat >>confdefs.h <<_ACEOF
21098 #define EDITOR_PROGRAM "$ED"
21102 ac_config_files="$ac_config_files Makefile lib/Makefile src/Makefile tests/Makefile"
21104 cat >confcache <<\_ACEOF
21105 # This file is a shell script that caches the results of configure
21106 # tests run on this system so they can be shared between configure
21107 # scripts and configure runs, see configure's option --config-cache.
21108 # It is not useful on other systems. If it contains results you don't
21109 # want to keep, you may remove or edit it.
21111 # config.status only pays attention to the cache file if you give it
21112 # the --recheck option to rerun configure.
21114 # `ac_cv_env_foo' variables (set or unset) will be overridden when
21115 # loading this file, other *unset* `ac_cv_foo' will be assigned the
21116 # following values.
21120 # The following way of writing the cache mishandles newlines in values,
21121 # but we know of no workaround that is simple, portable, and efficient.
21122 # So, we kill variables containing newlines.
21123 # Ultrix sh set writes to stderr and can't be redirected directly,
21124 # and sets the high bit in the cache file unless we assign to the vars.
21126 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
21127 eval ac_val=\$$ac_var
21131 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
21132 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
21135 _ | IFS | as_nl) ;; #(
21136 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
21137 *) { eval $ac_var=; unset $ac_var;} ;;
21143 case $as_nl`(ac_space=' '; set) 2>&1` in #(
21144 *${as_nl}ac_space=\ *)
21145 # `set' does not quote correctly, so add quotes: double-quote
21146 # substitution turns \\\\ into \\, and sed turns \\ into \.
21149 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21152 # `set' quotes correctly as required by POSIX, so do not add quotes.
21153 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
21162 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21164 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21166 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
21167 if test -w "$cache_file"; then
21168 if test "x$cache_file" != "x/dev/null"; then
21169 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
21170 $as_echo "$as_me: updating cache $cache_file" >&6;}
21171 if test ! -f "$cache_file" || test -h "$cache_file"; then
21172 cat confcache >"$cache_file"
21174 case $cache_file in #(
21176 mv -f confcache "$cache_file"$$ &&
21177 mv -f "$cache_file"$$ "$cache_file" ;; #(
21179 mv -f confcache "$cache_file" ;;
21184 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
21185 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
21190 test "x$prefix" = xNONE && prefix=$ac_default_prefix
21191 # Let make expand exec_prefix.
21192 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21194 DEFS=-DHAVE_CONFIG_H
21199 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
21200 # 1. Remove the extension, and $U if already installed.
21201 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
21202 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
21203 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
21204 # will be set to the directory where LIBOBJS objects are built.
21205 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
21206 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
21208 LIBOBJS=$ac_libobjs
21210 LTLIBOBJS=$ac_ltlibobjs
21213 if test -z "${ENABLE_MERGE_TRUE}" && test -z "${ENABLE_MERGE_FALSE}"; then
21214 as_fn_error $? "conditional \"ENABLE_MERGE\" was never defined.
21215 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21217 if test -z "${ALPHA_VERSION_TRUE}" && test -z "${ALPHA_VERSION_FALSE}"; then
21218 as_fn_error $? "conditional \"ALPHA_VERSION\" was never defined.
21219 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21221 if test -n "$EXEEXT"; then
21223 am__EXEEXT_FALSE='#'
21225 am__EXEEXT_TRUE='#'
21229 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
21230 as_fn_error $? "conditional \"AMDEP\" was never defined.
21231 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21233 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
21234 as_fn_error $? "conditional \"am__fastdepCC\" was never defined.
21235 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21237 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
21238 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined.
21239 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21241 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
21242 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
21243 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21245 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
21246 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined.
21247 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21249 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
21250 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined.
21251 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21253 CONFIG_INCLUDE=config.h
21255 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
21256 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
21257 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21259 if test -z "${GL_GENERATE_STDARG_H_TRUE}" && test -z "${GL_GENERATE_STDARG_H_FALSE}"; then
21260 as_fn_error $? "conditional \"GL_GENERATE_STDARG_H\" was never defined.
21261 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21263 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
21264 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
21265 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21267 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
21268 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined.
21269 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21271 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
21272 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined.
21273 Usually this means the macro was only invoked conditionally." "$LINENO" 5
21279 if test -n "$gl_LIBOBJS"; then
21280 # Remove the extension.
21281 sed_drop_objext='s/\.o$//;s/\.obj$//'
21282 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
21283 gl_libobjs="$gl_libobjs $i.$ac_objext"
21284 gl_ltlibobjs="$gl_ltlibobjs $i.lo"
21287 gl_LIBOBJS=$gl_libobjs
21289 gl_LTLIBOBJS=$gl_ltlibobjs
21295 if test -n "$gltests_LIBOBJS"; then
21296 # Remove the extension.
21297 sed_drop_objext='s/\.o$//;s/\.obj$//'
21298 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
21299 gltests_libobjs="$gltests_libobjs $i.$ac_objext"
21300 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo"
21303 gltests_LIBOBJS=$gltests_libobjs
21305 gltests_LTLIBOBJS=$gltests_ltlibobjs
21309 : "${CONFIG_STATUS=./config.status}"
21311 ac_clean_files_save=$ac_clean_files
21312 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21313 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
21314 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
21316 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
21318 # Generated by $as_me.
21319 # Run this file to recreate the current configuration.
21320 # Compiler output produced by configure, useful for debugging
21321 # configure, is in config.log if it exists.
21324 ac_cs_recheck=false
21327 SHELL=\${CONFIG_SHELL-$SHELL}
21330 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
21331 ## -------------------- ##
21332 ## M4sh Initialization. ##
21333 ## -------------------- ##
21335 # Be more Bourne compatible
21336 DUALCASE=1; export DUALCASE # for MKS sh
21337 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
21340 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21341 # is contrary to our usage. Disable this feature.
21342 alias -g '${1+"$@"}'='"$@"'
21343 setopt NO_GLOB_SUBST
21345 case `(set -o) 2>/dev/null` in #(
21357 # Printing a long string crashes Solaris 7 /usr/bin/printf.
21358 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
21359 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
21360 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
21361 # Prefer a ksh shell builtin over an external printf program on Solaris,
21362 # but without wasting forks for bash or zsh.
21363 if test -z "$BASH_VERSION$ZSH_VERSION" \
21364 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
21365 as_echo='print -r --'
21366 as_echo_n='print -rn --'
21367 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
21368 as_echo='printf %s\n'
21369 as_echo_n='printf %s'
21371 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
21372 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
21373 as_echo_n='/usr/ucb/echo -n'
21375 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
21376 as_echo_n_body='eval
21380 expr "X$arg" : "X\\(.*\\)$as_nl";
21381 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
21383 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
21385 export as_echo_n_body
21386 as_echo_n='sh -c $as_echo_n_body as_echo'
21388 export as_echo_body
21389 as_echo='sh -c $as_echo_body as_echo'
21392 # The user is always right.
21393 if test "${PATH_SEPARATOR+set}" != set; then
21395 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
21396 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
21403 # We need space, tab and new line, in precisely that order. Quoting is
21404 # there to prevent editors from complaining about space-tab.
21405 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
21406 # splitting by setting IFS to empty value.)
21409 # Find who we are. Look in the path if we contain no directory separator.
21412 *[\\/]* ) as_myself=$0 ;;
21413 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21414 for as_dir in $PATH
21417 test -z "$as_dir" && as_dir=.
21418 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
21424 # We did not find ourselves, most probably we were run as `sh COMMAND'
21425 # in which case we are not to be found in the path.
21426 if test "x$as_myself" = x; then
21429 if test ! -f "$as_myself"; then
21430 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
21434 # Unset variables that we do not need and which cause bugs (e.g. in
21435 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
21436 # suppresses any "Segmentation fault" message there. '((' could
21437 # trigger a bug in pdksh 5.2.14.
21438 for as_var in BASH_ENV ENV MAIL MAILPATH
21439 do eval test x\${$as_var+set} = xset \
21440 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
21453 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
21456 # as_fn_error STATUS ERROR [LINENO LOG_FD]
21457 # ----------------------------------------
21458 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
21459 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
21460 # script with STATUS, using 1 if that was 0.
21463 as_status=$1; test $as_status -eq 0 && as_status=1
21465 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
21466 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
21468 $as_echo "$as_me: error: $2" >&2
21469 as_fn_exit $as_status
21473 # as_fn_set_status STATUS
21474 # -----------------------
21475 # Set $? to STATUS, without forking.
21476 as_fn_set_status ()
21479 } # as_fn_set_status
21481 # as_fn_exit STATUS
21482 # -----------------
21483 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
21487 as_fn_set_status $1
21493 # Portably unset VAR.
21496 { eval $1=; unset $1;}
21498 as_unset=as_fn_unset
21499 # as_fn_append VAR VALUE
21500 # ----------------------
21501 # Append the text in VALUE to the end of the definition contained in VAR. Take
21502 # advantage of any shell optimizations that allow amortized linear growth over
21503 # repeated appends, instead of the typical quadratic growth present in naive
21505 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
21506 eval 'as_fn_append ()
21517 # as_fn_arith ARG...
21518 # ------------------
21519 # Perform arithmetic evaluation on the ARGs, and store the result in the
21520 # global $as_val. Take advantage of shells that can avoid forks. The arguments
21521 # must be portable across $(()) and expr.
21522 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
21523 eval 'as_fn_arith ()
21530 as_val=`expr "$@" || test $? -eq 1`
21535 if expr a : '\(a\)' >/dev/null 2>&1 &&
21536 test "X`expr 00001 : '.*\(...\)'`" = X001; then
21542 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
21543 as_basename=basename
21548 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
21554 as_me=`$as_basename -- "$0" ||
21555 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
21556 X"$0" : 'X\(//\)$' \| \
21557 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
21559 sed '/^.*\/\([^/][^/]*\)\/*$/{
21573 # Avoid depending upon Character Ranges.
21574 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
21575 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
21576 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
21577 as_cr_digits='0123456789'
21578 as_cr_alnum=$as_cr_Letters$as_cr_digits
21580 ECHO_C= ECHO_N= ECHO_T=
21581 case `echo -n x` in #(((((
21583 case `echo 'xy\c'` in
21584 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
21586 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
21593 rm -f conf$$ conf$$.exe conf$$.file
21594 if test -d conf$$.dir; then
21595 rm -f conf$$.dir/conf$$.file
21598 mkdir conf$$.dir 2>/dev/null
21600 if (echo >conf$$.file) 2>/dev/null; then
21601 if ln -s conf$$.file conf$$ 2>/dev/null; then
21603 # ... but there are two gotchas:
21604 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
21605 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
21606 # In both cases, we have to default to `cp -p'.
21607 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
21609 elif ln conf$$.file conf$$ 2>/dev/null; then
21617 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
21618 rmdir conf$$.dir 2>/dev/null
21623 # Create "$as_dir" as a directory, including parents if necessary.
21628 -*) as_dir=./$as_dir;;
21630 test -d "$as_dir" || eval $as_mkdir_p || {
21634 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
21635 *) as_qdir=$as_dir;;
21637 as_dirs="'$as_qdir' $as_dirs"
21638 as_dir=`$as_dirname -- "$as_dir" ||
21639 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21640 X"$as_dir" : 'X\(//\)[^/]' \| \
21641 X"$as_dir" : 'X\(//\)$' \| \
21642 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
21643 $as_echo X"$as_dir" |
21644 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
21648 /^X\(\/\/\)[^/].*/{
21661 test -d "$as_dir" && break
21663 test -z "$as_dirs" || eval "mkdir $as_dirs"
21664 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
21668 if mkdir -p . 2>/dev/null; then
21669 as_mkdir_p='mkdir -p "$as_dir"'
21671 test -d ./-p && rmdir ./-p
21675 if test -x / >/dev/null 2>&1; then
21676 as_test_x='test -x'
21678 if ls -dL / >/dev/null 2>&1; then
21685 if test -d "$1"; then
21691 case `ls -ld'$as_ls_L_option' "$1" 2>/dev/null` in #((
21692 ???[sx]*):;;*)false;;esac;fi
21696 as_executable_p=$as_test_x
21698 # Sed expression to map a string onto a valid CPP name.
21699 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
21701 # Sed expression to map a string onto a valid variable name.
21702 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
21706 ## ----------------------------------- ##
21707 ## Main body of $CONFIG_STATUS script. ##
21708 ## ----------------------------------- ##
21710 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
21712 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21713 # Save the log message, to keep $0 and so on meaningful, and to
21714 # report actual input values of CONFIG_FILES etc. instead of their
21715 # values after options handling.
21717 This file was extended by GNU patch $as_me 2.6.1.169-7096, which was
21718 generated by GNU Autoconf 2.68. Invocation command line was
21720 CONFIG_FILES = $CONFIG_FILES
21721 CONFIG_HEADERS = $CONFIG_HEADERS
21722 CONFIG_LINKS = $CONFIG_LINKS
21723 CONFIG_COMMANDS = $CONFIG_COMMANDS
21726 on `(hostname || uname -n) 2>/dev/null | sed 1q`
21731 case $ac_config_files in *"
21732 "*) set x $ac_config_files; shift; ac_config_files=$*;;
21735 case $ac_config_headers in *"
21736 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
21740 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21741 # Files that config.status was made for.
21742 config_files="$ac_config_files"
21743 config_headers="$ac_config_headers"
21744 config_links="$ac_config_links"
21745 config_commands="$ac_config_commands"
21749 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21751 \`$as_me' instantiates files and other configuration actions
21752 from templates according to the current configuration. Unless the files
21753 and actions are specified as TAGs, all are instantiated by default.
21755 Usage: $0 [OPTION]... [TAG]...
21757 -h, --help print this help, then exit
21758 -V, --version print version number and configuration settings, then exit
21759 --config print configuration, then exit
21760 -q, --quiet, --silent
21761 do not print progress messages
21762 -d, --debug don't remove temporary files
21763 --recheck update $as_me by reconfiguring in the same conditions
21764 --file=FILE[:TEMPLATE]
21765 instantiate the configuration file FILE
21766 --header=FILE[:TEMPLATE]
21767 instantiate the configuration header FILE
21769 Configuration files:
21772 Configuration headers:
21775 Configuration links:
21778 Configuration commands:
21781 Report bugs to <bug-patch@gnu.org>.
21782 GNU patch home page: <http://www.gnu.org/software/patch/>.
21783 General help using GNU software: <http://www.gnu.org/gethelp/>."
21786 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21787 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
21789 GNU patch config.status 2.6.1.169-7096
21790 configured by $0, generated by GNU Autoconf 2.68,
21791 with options \\"\$ac_cs_config\\"
21793 Copyright (C) 2010 Free Software Foundation, Inc.
21794 This config.status script is free software; the Free Software Foundation
21795 gives unlimited permission to copy, distribute and modify it."
21802 test -n "\$AWK" || AWK=awk
21805 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21806 # The default lists apply if the user does not specify any file.
21812 ac_option=`expr "X$1" : 'X\([^=]*\)='`
21813 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
21817 ac_option=`expr "X$1" : 'X\([^=]*\)='`
21829 # Handling of the options.
21830 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21832 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
21833 $as_echo "$ac_cs_version"; exit ;;
21834 --config | --confi | --conf | --con | --co | --c )
21835 $as_echo "$ac_cs_config"; exit ;;
21836 --debug | --debu | --deb | --de | --d | -d )
21838 --file | --fil | --fi | --f )
21841 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21842 '') as_fn_error $? "missing file argument" ;;
21844 as_fn_append CONFIG_FILES " '$ac_optarg'"
21845 ac_need_defaults=false;;
21846 --header | --heade | --head | --hea )
21849 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
21851 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
21852 ac_need_defaults=false;;
21854 # Conflict between --help and --header
21855 as_fn_error $? "ambiguous option: \`$1'
21856 Try \`$0 --help' for more information.";;
21857 --help | --hel | -h )
21858 $as_echo "$ac_cs_usage"; exit ;;
21859 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
21860 | -silent | --silent | --silen | --sile | --sil | --si | --s)
21863 # This is an error.
21864 -*) as_fn_error $? "unrecognized option: \`$1'
21865 Try \`$0 --help' for more information." ;;
21867 *) as_fn_append ac_config_targets " $1"
21868 ac_need_defaults=false ;;
21874 ac_configure_extra_args=
21876 if $ac_cs_silent; then
21878 ac_configure_extra_args="$ac_configure_extra_args --silent"
21882 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21883 if \$ac_cs_recheck; then
21884 set X '$SHELL' '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
21886 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
21887 CONFIG_SHELL='$SHELL'
21888 export CONFIG_SHELL
21893 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21897 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
21898 ## Running $as_me. ##
21904 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
21908 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
21909 GNUmakefile=$GNUmakefile
21913 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
21915 # Handling of arguments.
21916 for ac_config_target in $ac_config_targets
21918 case $ac_config_target in
21919 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.hin" ;;
21920 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;;
21921 "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;;
21922 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21923 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;;
21924 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
21925 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
21927 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
21932 # If the user did not use the arguments to specify the items to instantiate,
21933 # then the envvar interface is used. Set only those that are not.
21934 # We use the long form for the default assignment because of an extremely
21935 # bizarre bug on SunOS 4.1.3.
21936 if $ac_need_defaults; then
21937 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21938 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21939 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
21940 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
21943 # Have a temporary directory for convenience. Make it in the build tree
21944 # simply because there is no reason against having it here, and in addition,
21945 # creating and moving files from /tmp can sometimes cause problems.
21946 # Hook for its removal unless debugging.
21947 # Note that there is a small window in which the directory will not be cleaned:
21948 # after its creation but before its name has been assigned to `$tmp'.
21952 trap 'exit_status=$?
21953 : "${ac_tmp:=$tmp}"
21954 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
21956 trap 'as_fn_exit 1' 1 2 13 15
21958 # Create a (secure) tmp directory for tmp files.
21961 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
21965 tmp=./conf$$-$RANDOM
21966 (umask 077 && mkdir "$tmp")
21967 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
21970 # Set up the scripts for CONFIG_FILES section.
21971 # No need to generate them if there are no CONFIG_FILES.
21972 # This happens for instance with `./config.status config.h'.
21973 if test -n "$CONFIG_FILES"; then
21976 ac_cr=`echo X | tr X '\015'`
21977 # On cygwin, bash can eat \r inside `` if the user requested igncr.
21978 # But we know of no other shell where ac_cr would be empty at this
21979 # point, so we can use a bashism as a fallback.
21980 if test "x$ac_cr" = x; then
21981 eval ac_cr=\$\'\\r\'
21983 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
21984 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
21987 ac_cs_awk_cr=$ac_cr
21990 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
21995 echo "cat >conf$$subs.awk <<_ACEOF" &&
21996 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
21998 } >conf$$subs.sh ||
21999 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22000 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
22002 for ac_last_try in false false false false false :; do
22003 . ./conf$$subs.sh ||
22004 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22006 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
22007 if test $ac_delim_n = $ac_delim_num; then
22009 elif $ac_last_try; then
22010 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
22012 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22015 rm -f conf$$subs.sh
22017 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22018 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
22022 s/^/S["/; s/!.*/"]=/
22032 s/\(.\{148\}\)..*/\1/
22034 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
22039 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22046 s/\(.\{148\}\)..*/\1/
22048 s/["\\]/\\&/g; s/^/"/; s/$/"/
22052 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
22057 ' <conf$$subs.awk | sed '
22062 ' >>$CONFIG_STATUS || ac_write_fail=1
22063 rm -f conf$$subs.awk
22064 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22066 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
22067 for (key in S) S_is_set[key] = 1
22073 nfields = split(line, field, "@")
22075 len = length(field[1])
22076 for (i = 2; i < nfields; i++) {
22078 keylen = length(key)
22079 if (S_is_set[key]) {
22081 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
22082 len += length(value) + length(field[++i])
22093 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22094 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
22095 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
22098 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
22099 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
22102 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
22103 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
22104 # trailing colons and then remove the whole line if VPATH becomes empty
22105 # (actually we leave an empty line to preserve line numbers).
22106 if test "x$srcdir" = x.; then
22107 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
22125 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22126 fi # test -n "$CONFIG_FILES"
22128 # Set up the scripts for CONFIG_HEADERS section.
22129 # No need to generate them if there are no CONFIG_HEADERS.
22130 # This happens for instance with `./config.status Makefile'.
22131 if test -n "$CONFIG_HEADERS"; then
22132 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
22136 # Transform confdefs.h into an awk script `defines.awk', embedded as
22137 # here-document in config.status, that substitutes the proper values into
22138 # config.h.in to produce config.h.
22140 # Create a delimiter string that does not exist in confdefs.h, to ease
22141 # handling of long lines.
22143 for ac_last_try in false false :; do
22144 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
22145 if test -z "$ac_tt"; then
22147 elif $ac_last_try; then
22148 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
22150 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
22154 # For the awk script, D is an array of macro values keyed by name,
22155 # likewise P contains macro parameters if any. Preserve backslash
22156 # newline sequences.
22158 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
22160 s/.\{148\}/&'"$ac_delim"'/g
22163 s/^[ ]*#[ ]*define[ ][ ]*/ /
22170 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
22172 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
22176 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
22177 D["\1"]=" \3\\\\\\n"\\/p
22179 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
22184 s/.\{148\}/&'"$ac_delim"'/g
22189 s/["\\]/\\&/g; s/^/"/; s/$/"/p
22192 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
22194 ' <confdefs.h | sed '
22195 s/'"$ac_delim"'/"\\\
22196 "/g' >>$CONFIG_STATUS || ac_write_fail=1
22198 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22199 for (key in D) D_is_set[key] = 1
22202 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
22204 split(line, arg, " ")
22205 if (arg[1] == "#") {
22209 defundef = substr(arg[1], 2)
22212 split(mac1, mac2, "(") #)
22214 prefix = substr(line, 1, index(line, defundef) - 1)
22215 if (D_is_set[macro]) {
22216 # Preserve the white space surrounding the "#".
22217 print prefix "define", macro P[macro] D[macro]
22220 # Replace #undef with comments. This is necessary, for example,
22221 # in the case of _POSIX_SOURCE, which is predefined and required
22222 # on some systems where configure will not decide to define it.
22223 if (defundef == "undef") {
22224 print "/*", prefix defundef, macro, "*/"
22232 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22233 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
22234 fi # test -n "$CONFIG_HEADERS"
22237 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
22242 :[FHLC]) ac_mode=$ac_tag; continue;;
22244 case $ac_mode$ac_tag in
22246 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
22247 :[FH]-) ac_tag=-:-;;
22248 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
22265 -) ac_f="$ac_tmp/stdin";;
22266 *) # Look for the file first in the build tree, then in the source tree
22267 # (if the path is not absolute). The absolute path cannot be DOS-style,
22268 # because $ac_f cannot contain `:'.
22272 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
22274 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
22276 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
22277 as_fn_append ac_file_inputs " '$ac_f'"
22280 # Let's still pretend it is `configure' which instantiates (i.e., don't
22281 # use $as_me), people would be surprised to read:
22282 # /* config.h. Generated by config.status. */
22283 configure_input='Generated from '`
22284 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
22286 if test x"$ac_file" != x-; then
22287 configure_input="$ac_file. $configure_input"
22288 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
22289 $as_echo "$as_me: creating $ac_file" >&6;}
22291 # Neutralize special characters interpreted by sed in replacement strings.
22292 case $configure_input in #(
22293 *\&* | *\|* | *\\* )
22294 ac_sed_conf_input=`$as_echo "$configure_input" |
22295 sed 's/[\\\\&|]/\\\\&/g'`;; #(
22296 *) ac_sed_conf_input=$configure_input;;
22300 *:-:* | *:-) cat >"$ac_tmp/stdin" \
22301 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
22306 ac_dir=`$as_dirname -- "$ac_file" ||
22307 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22308 X"$ac_file" : 'X\(//\)[^/]' \| \
22309 X"$ac_file" : 'X\(//\)$' \| \
22310 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
22311 $as_echo X"$ac_file" |
22312 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22316 /^X\(\/\/\)[^/].*/{
22329 as_dir="$ac_dir"; as_fn_mkdir_p
22333 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
22335 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
22336 # A ".." for each directory in $ac_dir_suffix.
22337 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
22338 case $ac_top_builddir_sub in
22339 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
22340 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
22343 ac_abs_top_builddir=$ac_pwd
22344 ac_abs_builddir=$ac_pwd$ac_dir_suffix
22345 # for backward compatibility:
22346 ac_top_builddir=$ac_top_build_prefix
22349 .) # We are building in place.
22351 ac_top_srcdir=$ac_top_builddir_sub
22352 ac_abs_top_srcdir=$ac_pwd ;;
22353 [\\/]* | ?:[\\/]* ) # Absolute name.
22354 ac_srcdir=$srcdir$ac_dir_suffix;
22355 ac_top_srcdir=$srcdir
22356 ac_abs_top_srcdir=$srcdir ;;
22357 *) # Relative name.
22358 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
22359 ac_top_srcdir=$ac_top_build_prefix$srcdir
22360 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
22362 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
22372 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22373 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
22375 ac_MKDIR_P=$MKDIR_P
22377 [\\/$]* | ?:[\\/]* ) ;;
22378 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;;
22382 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22383 # If the template does not know about datarootdir, expand it.
22384 # FIXME: This hack should be removed a few years after 2.60.
22385 ac_datarootdir_hack=; ac_datarootdir_seen=
22396 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
22397 *datarootdir*) ac_datarootdir_seen=yes;;
22398 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
22399 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
22400 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
22402 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22403 ac_datarootdir_hack='
22404 s&@datadir@&$datadir&g
22405 s&@docdir@&$docdir&g
22406 s&@infodir@&$infodir&g
22407 s&@localedir@&$localedir&g
22408 s&@mandir@&$mandir&g
22409 s&\\\${datarootdir}&$datarootdir&g' ;;
22413 # Neutralize VPATH when `$srcdir' = `.'.
22414 # Shell code in configure.ac might set extrasub.
22415 # FIXME: do we really want to maintain this feature?
22416 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
22417 ac_sed_extra="$ac_vpsub
22420 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
22422 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22423 s|@configure_input@|$ac_sed_conf_input|;t t
22424 s&@top_builddir@&$ac_top_builddir_sub&;t t
22425 s&@top_build_prefix@&$ac_top_build_prefix&;t t
22426 s&@srcdir@&$ac_srcdir&;t t
22427 s&@abs_srcdir@&$ac_abs_srcdir&;t t
22428 s&@top_srcdir@&$ac_top_srcdir&;t t
22429 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
22430 s&@builddir@&$ac_builddir&;t t
22431 s&@abs_builddir@&$ac_abs_builddir&;t t
22432 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
22433 s&@INSTALL@&$ac_INSTALL&;t t
22434 s&@MKDIR_P@&$ac_MKDIR_P&;t t
22435 $ac_datarootdir_hack
22437 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
22438 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22440 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
22441 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
22442 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
22443 "$ac_tmp/out"`; test -z "$ac_out"; } &&
22444 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22445 which seems to be undefined. Please make sure it is defined" >&5
22446 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
22447 which seems to be undefined. Please make sure it is defined" >&2;}
22449 rm -f "$ac_tmp/stdin"
22451 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
22452 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
22454 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22460 if test x"$ac_file" != x-; then
22462 $as_echo "/* $configure_input */" \
22463 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
22464 } >"$ac_tmp/config.h" \
22465 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22466 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
22467 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
22468 $as_echo "$as_me: $ac_file is unchanged" >&6;}
22471 mv "$ac_tmp/config.h" "$ac_file" \
22472 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
22475 $as_echo "/* $configure_input */" \
22476 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
22477 || as_fn_error $? "could not create -" "$LINENO" 5
22479 # Compute "$ac_file"'s index in $config_headers.
22482 for _am_header in $config_headers :; do
22483 case $_am_header in
22484 $_am_arg | $_am_arg:* )
22487 _am_stamp_count=`expr $_am_stamp_count + 1` ;;
22490 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
22491 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22492 X"$_am_arg" : 'X\(//\)[^/]' \| \
22493 X"$_am_arg" : 'X\(//\)$' \| \
22494 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
22495 $as_echo X"$_am_arg" |
22496 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22500 /^X\(\/\/\)[^/].*/{
22512 s/.*/./; q'`/stamp-h$_am_stamp_count
22519 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
22522 # Prefer the file from the source tree if names are identical.
22523 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
22524 ac_source=$srcdir/$ac_source
22527 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
22528 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
22530 if test ! -r "$ac_source"; then
22531 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
22535 # Try a relative symlink, then a hard link, then a copy.
22537 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
22538 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
22540 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
22541 ln "$ac_source" "$ac_file" 2>/dev/null ||
22542 cp -p "$ac_source" "$ac_file" ||
22543 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
22546 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
22547 $as_echo "$as_me: executing $ac_file commands" >&6;}
22552 case $ac_file$ac_mode in
22553 "depfiles":C) test x"$AMDEP_TRUE" != x"" || {
22554 # Autoconf 2.62 quotes --file arguments for eval, but not when files
22555 # are listed without --file. Let's play safe and only enable the eval
22556 # if we detect the quoting.
22557 case $CONFIG_FILES in
22558 *\'*) eval set x "$CONFIG_FILES" ;;
22559 *) set x $CONFIG_FILES ;;
22564 # Strip MF so we end up with the name of the file.
22565 mf=`echo "$mf" | sed -e 's/:.*$//'`
22566 # Check whether this is an Automake generated Makefile or not.
22567 # We used to match only the files named `Makefile.in', but
22568 # some people rename them; so instead we look at the file content.
22569 # Grep'ing the first line is not enough: some people post-process
22570 # each Makefile.in and add a new line on top of each file to say so.
22571 # Grep'ing the whole file is not good either: AIX grep has a line
22572 # limit of 2048, but all sed's we know have understand at least 4000.
22573 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then
22574 dirpart=`$as_dirname -- "$mf" ||
22575 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22576 X"$mf" : 'X\(//\)[^/]' \| \
22577 X"$mf" : 'X\(//\)$' \| \
22578 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
22580 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22584 /^X\(\/\/\)[^/].*/{
22600 # Extract the definition of DEPDIR, am__include, and am__quote
22601 # from the Makefile without running `make'.
22602 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
22603 test -z "$DEPDIR" && continue
22604 am__include=`sed -n 's/^am__include = //p' < "$mf"`
22605 test -z "am__include" && continue
22606 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
22607 # When using ansi2knr, U may be empty or an underscore; expand it
22608 U=`sed -n 's/^U = //p' < "$mf"`
22609 # Find all dependency output files, they are included files with
22610 # $(DEPDIR) in their names. We invoke sed twice because it is the
22611 # simplest approach to changing $(DEPDIR) to its actual value in the
22613 for file in `sed -n "
22614 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
22615 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
22616 # Make sure the directory exists.
22617 test -f "$dirpart/$file" && continue
22618 fdir=`$as_dirname -- "$file" ||
22619 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22620 X"$file" : 'X\(//\)[^/]' \| \
22621 X"$file" : 'X\(//\)$' \| \
22622 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
22623 $as_echo X"$file" |
22624 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
22628 /^X\(\/\/\)[^/].*/{
22641 as_dir=$dirpart/$fdir; as_fn_mkdir_p
22642 # echo "creating $dirpart/$file"
22643 echo '# dummy' > "$dirpart/$file"
22655 ac_clean_files=$ac_clean_files_save
22657 test $ac_write_fail = 0 ||
22658 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
22661 # configure is writing to config.log, and then calls config.status.
22662 # config.status does its own redirection, appending to config.log.
22663 # Unfortunately, on DOS this fails, as config.log is still kept open
22664 # by configure, so config.status won't be able to write to it; its
22665 # output is simply discarded. So we exec the FD to /dev/null,
22666 # effectively closing config.log, so it can be properly (re)opened and
22667 # appended to by config.status. When coming back to configure, we
22668 # need to make the FD available again.
22669 if test "$no_create" != yes; then
22671 ac_config_status_args=
22672 test "$silent" = yes &&
22673 ac_config_status_args="$ac_config_status_args --quiet"
22675 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
22677 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22678 # would make configure fail if this is the last instruction.
22679 $ac_cs_success || as_fn_exit 1
22681 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
22682 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
22683 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}