2 # Guess values for system-dependent variables and create Makefiles.
3 # Generated by GNU Autoconf 2.69 for libgnu UNUSED-VERSION.
6 # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
9 # This configure script is free software; the Free Software Foundation
10 # gives unlimited permission to copy, distribute and modify it.
11 ## -------------------- ##
12 ## M4sh Initialization. ##
13 ## -------------------- ##
15 # Be more Bourne compatible
16 DUALCASE
=1; export DUALCASE
# for MKS sh
17 if test -n "${ZSH_VERSION+set}" && (emulate sh
) >/dev
/null
2>&1; then :
20 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
21 # is contrary to our usage. Disable this feature.
22 alias -g '${1+"$@"}'='"$@"'
25 case `(set -o) 2>/dev/null` in #(
37 # Printing a long string crashes Solaris 7 /usr/bin/printf.
38 as_echo
='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
39 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
40 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
41 # Prefer a ksh shell builtin over an external printf program on Solaris,
42 # but without wasting forks for bash or zsh.
43 if test -z "$BASH_VERSION$ZSH_VERSION" \
44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
46 as_echo_n='print
-rn --'
47 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
51 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
52 as_echo_body='eval /usr
/ucb
/echo -n "$1$as_nl"'
53 as_echo_n='/usr
/ucb
/echo -n'
55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
60 expr "X$arg" : "X\\(.*\\)$as_nl";
61 arg
=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
63 expr "X$arg" : "X\\(.*\\)" |
tr -d "$as_nl"
66 as_echo_n='sh
-c $as_echo_n_body as_echo
'
69 as_echo='sh
-c $as_echo_body as_echo
'
72 # The user is always right.
73 if test "${PATH_SEPARATOR+set}" != set; then
75 (PATH='/bin
;/bin
'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
76 (PATH='/bin
:/bin
'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
83 # We need space, tab and new line, in precisely that order. Quoting is
84 # there to prevent editors from complaining about space-tab.
85 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
86 # splitting by setting IFS to empty value.)
89 # Find who we are. Look in the path if we contain no directory separator.
92 *[\\/]* ) as_myself=$0 ;;
93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
97 test -z "$as_dir" && as_dir=.
98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
104 # We did not find ourselves, most probably we were run as `sh COMMAND'
105 # in which case we are not to be found in the path.
106 if test "x$as_myself" = x
; then
109 if test ! -f "$as_myself"; then
110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
114 # Unset variables that we do not need and which cause bugs (e.g. in
115 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
116 # suppresses any "Segmentation fault" message there. '((' could
117 # trigger a bug in pdksh 5.2.14.
118 for as_var
in BASH_ENV ENV MAIL MAILPATH
119 do eval test x\
${$as_var+set} = xset \
120 && ( (unset $as_var) ||
exit 1) >/dev
/null
2>&1 && unset $as_var ||
:
133 (unset CDPATH
) >/dev
/null
2>&1 && unset CDPATH
135 # Use a proper internal environment variable to ensure we don't fall
136 # into an infinite loop, continuously re-executing ourselves.
137 if test x
"${_as_can_reexec}" != xno
&& test "x$CONFIG_SHELL" != x
; then
138 _as_can_reexec
=no
; export _as_can_reexec
;
139 # We cannot yet assume a decent shell, so we have to provide a
140 # neutralization value for shells without unset; and this also
141 # works around shells that cannot unset nonexistent variables.
142 # Preserve -v and -x to the replacement shell.
145 (unset BASH_ENV
) >/dev
/null
2>&1 && unset BASH_ENV ENV
147 *v
*x
* |
*x
*v
* ) as_opts
=-vx ;;
152 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
153 # Admittedly, this is quite paranoid, since all the known shells bail
154 # out after a failed `exec'.
155 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
158 # We don't want this to propagate to other subprocesses.
159 { _as_can_reexec
=; unset _as_can_reexec
;}
160 if test "x$CONFIG_SHELL" = x
; then
161 as_bourne_compatible
="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
164 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
165 # is contrary to our usage. Disable this feature.
166 alias -g '\${1+\"\$@\"}'='\"\$@\"'
169 case \`(set -o) 2>/dev/null\` in #(
177 as_required
="as_fn_return () { (exit \$1); }
178 as_fn_success () { as_fn_return 0; }
179 as_fn_failure () { as_fn_return 1; }
180 as_fn_ret_success () { return 0; }
181 as_fn_ret_failure () { return 1; }
184 as_fn_success || { exitcode=1; echo as_fn_success failed.; }
185 as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
186 as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
187 as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
188 if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
191 exitcode=1; echo positional parameters were not saved.
193 test x\$exitcode = x0 || exit 1
195 as_suggested
=" as_lineno_1=";as_suggested
=$as_suggested$LINENO;as_suggested
=$as_suggested" as_lineno_1a=\$LINENO
196 as_lineno_2=";as_suggested
=$as_suggested$LINENO;as_suggested
=$as_suggested" as_lineno_2a=\$LINENO
197 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
198 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
199 test \$(( 1 + 1 )) = 2 || exit 1"
200 if (eval "$as_required") 2>/dev
/null
; then :
205 if test x
$as_have_required = xyes
&& (eval "$as_suggested") 2>/dev
/null
; then :
208 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
210 for as_dir
in /bin
$PATH_SEPARATOR/usr
/bin
$PATH_SEPARATOR$PATH
213 test -z "$as_dir" && as_dir
=.
217 for as_base
in sh bash ksh sh5
; do
218 # Try only shells that exist, to save several forks.
219 as_shell
=$as_dir/$as_base
220 if { test -f "$as_shell" ||
test -f "$as_shell.exe"; } &&
221 { $as_echo "$as_bourne_compatible""$as_required" | as_run
=a
"$as_shell"; } 2>/dev
/null
; then :
222 CONFIG_SHELL
=$as_shell as_have_required
=yes
223 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run
=a
"$as_shell"; } 2>/dev
/null
; then :
231 $as_found ||
{ if { test -f "$SHELL" ||
test -f "$SHELL.exe"; } &&
232 { $as_echo "$as_bourne_compatible""$as_required" | as_run
=a
"$SHELL"; } 2>/dev
/null
; then :
233 CONFIG_SHELL
=$SHELL as_have_required
=yes
238 if test "x$CONFIG_SHELL" != x
; then :
240 # We cannot yet assume a decent shell, so we have to provide a
241 # neutralization value for shells without unset; and this also
242 # works around shells that cannot unset nonexistent variables.
243 # Preserve -v and -x to the replacement shell.
246 (unset BASH_ENV
) >/dev
/null
2>&1 && unset BASH_ENV ENV
248 *v
*x
* |
*x
*v
* ) as_opts
=-vx ;;
253 exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
254 # Admittedly, this is quite paranoid, since all the known shells bail
255 # out after a failed `exec'.
256 $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
260 if test x
$as_have_required = xno
; then :
261 $as_echo "$0: This script requires a shell more modern than all"
262 $as_echo "$0: the shells that I found on your system."
263 if test x
${ZSH_VERSION+set} = xset
; then
264 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
265 $as_echo "$0: be upgraded to zsh 4.3.4 or later."
267 $as_echo "$0: Please tell bug-autoconf@gnu.org about your system,
268 $0: including any error possibly output before this
269 $0: message. Then install a modern shell, or manually run
270 $0: the script under such a shell if you do have one."
276 SHELL
=${CONFIG_SHELL-/bin/sh}
278 # Unset more variables known to interfere with behavior of common tools.
279 CLICOLOR_FORCE
= GREP_OPTIONS
=
280 unset CLICOLOR_FORCE GREP_OPTIONS
282 ## --------------------- ##
283 ## M4sh Shell Functions. ##
284 ## --------------------- ##
287 # Portably unset VAR.
290 { eval $1=; unset $1;}
294 # as_fn_set_status STATUS
295 # -----------------------
296 # Set $? to STATUS, without forking.
304 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314 # Create "$as_dir" as a directory, including parents if necessary.
319 -*) as_dir
=.
/$as_dir;;
321 test -d "$as_dir" ||
eval $as_mkdir_p ||
{
325 *\'*) as_qdir
=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
328 as_dirs
="'$as_qdir' $as_dirs"
329 as_dir
=`$as_dirname -- "$as_dir" ||
330 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
331 X"$as_dir" : 'X\(//\)[^/]' \| \
332 X"$as_dir" : 'X\(//\)$' \| \
333 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
334 $as_echo X"$as_dir" |
335 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
352 test -d "$as_dir" && break
354 test -z "$as_dirs" ||
eval "mkdir $as_dirs"
355 } ||
test -d "$as_dir" || as_fn_error $?
"cannot create directory $as_dir"
360 # as_fn_executable_p FILE
361 # -----------------------
362 # Test if FILE is an executable regular file.
363 as_fn_executable_p
()
365 test -f "$1" && test -x "$1"
366 } # as_fn_executable_p
367 # as_fn_append VAR VALUE
368 # ----------------------
369 # Append the text in VALUE to the end of the definition contained in VAR. Take
370 # advantage of any shell optimizations that allow amortized linear growth over
371 # repeated appends, instead of the typical quadratic growth present in naive
373 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev
/null
; then :
374 eval 'as_fn_append ()
387 # Perform arithmetic evaluation on the ARGs, and store the result in the
388 # global $as_val. Take advantage of shells that can avoid forks. The arguments
389 # must be portable across $(()) and expr.
390 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev
/null
; then :
398 as_val
=`expr "$@" || test $? -eq 1`
403 # as_fn_error STATUS ERROR [LINENO LOG_FD]
404 # ----------------------------------------
405 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
406 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
407 # script with STATUS, using 1 if that was 0.
410 as_status
=$1; test $as_status -eq 0 && as_status
=1
412 as_lineno
=${as_lineno-"$3"} as_lineno_stack
=as_lineno_stack
=$as_lineno_stack
413 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
415 $as_echo "$as_me: error: $2" >&2
416 as_fn_exit
$as_status
419 if expr a
: '\(a\)' >/dev
/null
2>&1 &&
420 test "X`expr 00001 : '.*\(...\)'`" = X001
; then
426 if (basename -- /) >/dev
/null
2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
432 if (as_dir
=`dirname -- /` && test "X$as_dir" = X
/) >/dev
/null
2>&1; then
438 as_me
=`$as_basename -- "$0" ||
439 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
440 X"$0" : 'X\(//\)$' \| \
441 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
443 sed '/^.*\/\([^/][^/]*\)\/*$/{
457 # Avoid depending upon Character Ranges.
458 as_cr_letters
='abcdefghijklmnopqrstuvwxyz'
459 as_cr_LETTERS
='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
460 as_cr_Letters
=$as_cr_letters$as_cr_LETTERS
461 as_cr_digits
='0123456789'
462 as_cr_alnum
=$as_cr_Letters$as_cr_digits
465 as_lineno_1
=$LINENO as_lineno_1a
=$LINENO
466 as_lineno_2
=$LINENO as_lineno_2a
=$LINENO
467 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
468 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' ||
{
469 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-)
481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
485 chmod +x
"$as_me.lineno" ||
486 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit
1; }
488 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
489 # already done that, so ensure we don't try to do so again and fall
490 # in an infinite loop. This has already happened in practice.
491 _as_can_reexec
=no
; export _as_can_reexec
492 # Don't try to exec as it changes $[0], causing all sort of problems
493 # (the dirname of $[0] is not the place where we might find the
494 # original and so on. Autoconf is especially sensitive to this).
496 # Exit status is that of the last command.
500 ECHO_C
= ECHO_N
= ECHO_T
=
501 case `echo -n x` in #(((((
503 case `echo 'xy\c'` in
504 *c
*) ECHO_T
=' ';; # ECHO_T is single tab character.
506 *) echo `echo ksh88 bug on AIX 6.1` > /dev
/null
513 rm -f conf$$ conf$$.exe conf$$.
file
514 if test -d conf$$.dir
; then
515 rm -f conf$$.dir
/conf$$.
file
518 mkdir conf$$.dir
2>/dev
/null
520 if (echo >conf$$.
file) 2>/dev
/null
; then
521 if ln -s conf$$.
file conf$$
2>/dev
/null
; then
523 # ... but there are two gotchas:
524 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
525 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
526 # In both cases, we have to default to `cp -pR'.
527 ln -s conf$$.
file conf$$.dir
2>/dev
/null
&& test ! -f conf$$.exe ||
529 elif ln conf$$.
file conf$$
2>/dev
/null
; then
537 rm -f conf$$ conf$$.exe conf$$.dir
/conf$$.
file conf$$.
file
538 rmdir conf$$.dir
2>/dev
/null
540 if mkdir
-p .
2>/dev
/null
; then
541 as_mkdir_p
='mkdir -p "$as_dir"'
543 test -d .
/-p && rmdir .
/-p
548 as_executable_p
=as_fn_executable_p
550 # Sed expression to map a string onto a valid CPP name.
551 as_tr_cpp
="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
553 # Sed expression to map a string onto a valid variable name.
554 as_tr_sh
="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
557 test -n "$DJDIR" ||
exec 7<&0 </dev
/null
561 # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
562 # so uname gets run too.
563 ac_hostname
=`(hostname || uname -n) 2>/dev/null | sed 1q`
568 ac_default_prefix
=/usr
/local
570 ac_config_libobj_dir
=.
577 # Identity of this package.
578 PACKAGE_NAME
='libgnu'
579 PACKAGE_TARNAME
='libgnu'
580 PACKAGE_VERSION
='UNUSED-VERSION'
581 PACKAGE_STRING
='libgnu UNUSED-VERSION'
585 ac_unique_file
="import/memmem.c"
587 # Factoring default headers for most tests.
588 ac_includes_default
="\
590 #ifdef HAVE_SYS_TYPES_H
591 # include <sys/types.h>
593 #ifdef HAVE_SYS_STAT_H
594 # include <sys/stat.h>
600 # ifdef HAVE_STDLIB_H
605 # if !defined STDC_HEADERS && defined HAVE_MEMORY_H
610 #ifdef HAVE_STRINGS_H
611 # include <strings.h>
613 #ifdef HAVE_INTTYPES_H
614 # include <inttypes.h>
623 gl_use_threads_default
=
624 gl_use_winpthreads_default
=
626 gl_fnmatch_required
=POSIX
627 ac_subst_vars
='am__EXEEXT_FALSE
657 INSTALL_STRIP_PROGRAM
678 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
696 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
699 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
701 TIME_H_DEFINES_TIME_UTC
702 UNISTD_H_DEFINES_STRUCT_TIMESPEC
703 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
704 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
705 TIME_H_DEFINES_STRUCT_TIMESPEC
706 NEXT_AS_FIRST_DIRECTIVE_TIME_H
722 HAVE_DECL_LOCALTIME_R
736 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
740 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
743 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
746 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
748 NEXT_AS_FIRST_DIRECTIVE_STRING_H
750 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
752 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
755 GL_GENERATE_STDBOOL_H_FALSE
756 GL_GENERATE_STDBOOL_H_TRUE
758 GL_GENERATE_STDALIGN_H_FALSE
759 GL_GENERATE_STDALIGN_H_TRUE
761 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
764 REPLACE_PTHREAD_SIGMASK
766 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
767 HAVE_STRUCT_SIGACTION_SA_SIGACTION
773 HAVE_POSIX_SIGNALBLOCKING
776 GNULIB_SIGNAL_H_SIGPIPE
778 GNULIB_PTHREAD_SIGMASK
779 GL_GENERATE_NETINET_IN_H_FALSE
780 GL_GENERATE_NETINET_IN_H_TRUE
783 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
786 NEXT_AS_FIRST_DIRECTIVE_NETDB_H
790 HAVE_DECL_GETNAMEINFO
791 HAVE_DECL_GETADDRINFO
792 HAVE_DECL_GAI_STRERROR
793 HAVE_DECL_FREEADDRINFO
798 REPLACE_STRERRORNAME_NP
843 GNULIB_STRERRORNAME_NP
879 GNULIB_EXPLICIT_BZERO
886 NEXT_AS_FIRST_DIRECTIVE_MATH_H
893 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
896 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
898 GL_GENERATE_STDDEF_H_FALSE
899 GL_GENERATE_STDDEF_H_TRUE
915 GNULIB_SETLOCALE_NULL
918 LOCALCHARSET_TESTS_ENVIRONMENT
919 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
921 UINT64_MAX_EQ_ULONG_MAX
922 UINT32_MAX_LT_UINTMAX_MAX
924 INT64_MAX_EQ_LONG_MAX
925 INT32_MAX_LT_INTMAX_MAX
937 GL_GENERATE_STDINT_H_FALSE
938 GL_GENERATE_STDINT_H_TRUE
950 HAVE_SIGNED_SIG_ATOMIC_T
953 BITSIZEOF_SIG_ATOMIC_T
956 APPLE_UNIVERSAL_BUILD
958 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
963 GNULIB_OVERRIDES_WINT_T
964 GL_GENERATE_LIMITS_H_FALSE
965 GL_GENERATE_LIMITS_H_TRUE
967 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
970 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
974 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
975 HAVE_STRUCT_SOCKADDR_STORAGE
997 GL_GENERATE_GLOB_H_FALSE
998 GL_GENERATE_GLOB_H_TRUE
1001 NEXT_AS_FIRST_DIRECTIVE_GLOB_H
1003 REPLACE_GLOB_PATTERN_P
1008 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
1010 REPLACE_STRUCT_TIMEVAL
1011 REPLACE_GETTIMEOFDAY
1030 REPLACE_STDIO_WRITE_FUNCS
1031 REPLACE_STDIO_READ_FUNCS
1040 REPLACE_OBSTACK_PRINTF
1065 HAVE_DECL_OBSTACK_PRINTF
1077 GNULIB_MDA_FCLOSEALL
1078 GNULIB_VSPRINTF_POSIX
1080 GNULIB_VPRINTF_POSIX
1082 GNULIB_VFPRINTF_POSIX
1089 GNULIB_STDIO_H_SIGPIPE
1090 GNULIB_STDIO_H_NONBLOCKING
1091 GNULIB_SPRINTF_POSIX
1105 GNULIB_OBSTACK_PRINTF_POSIX
1106 GNULIB_OBSTACK_PRINTF
1122 GNULIB_FPRINTF_POSIX
1131 WINDOWS_64_BIT_ST_SIZE
1132 WINDOWS_STAT_TIMESPEC
1133 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
1162 GNULIB_OVERRIDES_STRUCT_STAT
1179 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
1190 REPLACE_SIGNBIT_USING_BUILTINS
1270 HAVE_DECL_REMAINDERL
1457 GL_GENERATE_FNMATCH_H_FALSE
1458 GL_GENERATE_FNMATCH_H_TRUE
1461 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
1467 GL_GENERATE_FLOAT_H_FALSE
1468 GL_GENERATE_FLOAT_H_TRUE
1470 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
1472 HAVE_DECL_STRNCASECMP
1476 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
1497 GL_GENERATE_ERRNO_H_FALSE
1498 GL_GENERATE_ERRNO_H_TRUE
1500 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
1503 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
1505 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
1531 HAVE_MSVC_INVALID_PARAMETER_HANDLER
1533 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
1534 UNISTD_H_HAVE_WINSOCK2_H
1535 UNISTD_H_HAVE_SYS_RANDOM_H
1560 REPLACE_GETDTABLESIZE
1561 REPLACE_GETDOMAINNAME
1582 HAVE_DECL_SETHOSTNAME
1583 HAVE_DECL_GETUSERSHELL
1584 HAVE_DECL_GETPAGESIZE
1585 HAVE_DECL_GETLOGIN_R
1587 HAVE_DECL_GETDOMAINNAME
1624 HAVE_COPY_FILE_RANGE
1651 GNULIB_UNISTD_H_SIGPIPE
1652 GNULIB_UNISTD_H_NONBLOCKING
1682 GNULIB_GETDTABLESIZE
1683 GNULIB_GETDOMAINNAME
1703 GNULIB_COPY_FILE_RANGE
1722 REPLACE_POSIX_MEMALIGN
1728 REPLACE_CANONICALIZE_FILE_NAME
1730 REPLACE_ALIGNED_ALLOC
1734 HAVE_STRUCT_RANDOM_DATA
1765 HAVE_DECL_GETLOADAVG
1769 HAVE_CANONICALIZE_FILE_NAME
1787 GNULIB_SECURE_GETENV
1790 GNULIB_REALLOC_POSIX
1799 GNULIB_POSIX_MEMALIGN
1811 GNULIB_CANONICALIZE_FILE_NAME
1814 GNULIB_ALIGNED_ALLOC
1919 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
1922 PRAGMA_SYSTEM_HEADER
1923 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
1933 GL_GENERATE_ALLOCA_H_FALSE
1934 GL_GENERATE_ALLOCA_H_TRUE
1937 GL_COND_LIBTOOL_FALSE
1938 GL_COND_LIBTOOL_TRUE
1966 MAINTAINER_MODE_FALSE
1967 MAINTAINER_MODE_TRUE
1995 program_transform_name
2008 enable_option_checking
2009 enable_maintainer_mode
2013 enable_cross_guesses
2014 enable_dependency_tracking
2017 ac_precious_vars
='build_alias
2028 # Initialize some variables set by options.
2030 ac_init_version
=false
2031 ac_unrecognized_opts
=
2032 ac_unrecognized_sep
=
2033 # The variables have the same names as the options, with
2034 # dashes changed to underlines.
2035 cache_file
=/dev
/null
2042 program_transform_name
=s
,x
,x
,
2050 # Installation directory options.
2051 # These are left unexpanded so users can "make install exec_prefix=/foo"
2052 # and all the variables that are supposed to be based on exec_prefix
2053 # by default will actually change.
2054 # Use braces instead of parens because sh, perl, etc. also accept them.
2055 # (The list follows the same order as the GNU Coding Standards.)
2056 bindir
='${exec_prefix}/bin'
2057 sbindir
='${exec_prefix}/sbin'
2058 libexecdir
='${exec_prefix}/libexec'
2059 datarootdir
='${prefix}/share'
2060 datadir
='${datarootdir}'
2061 sysconfdir
='${prefix}/etc'
2062 sharedstatedir
='${prefix}/com'
2063 localstatedir
='${prefix}/var'
2064 includedir
='${prefix}/include'
2065 oldincludedir
='/usr/include'
2066 docdir
='${datarootdir}/doc/${PACKAGE_TARNAME}'
2067 infodir
='${datarootdir}/info'
2072 libdir
='${exec_prefix}/lib'
2073 localedir
='${datarootdir}/locale'
2074 mandir
='${datarootdir}/man'
2080 # If the previous option needs an argument, assign it.
2081 if test -n "$ac_prev"; then
2082 eval $ac_prev=\
$ac_option
2088 *=?
*) ac_optarg
=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
2093 # Accept the important Cygnus configure options, so we can diagnose typos.
2095 case $ac_dashdash$ac_option in
2099 -bindir |
--bindir |
--bindi |
--bind |
--bin |
--bi)
2101 -bindir=* |
--bindir=* |
--bindi=* |
--bind=* |
--bin=* |
--bi=*)
2102 bindir
=$ac_optarg ;;
2104 -build |
--build |
--buil |
--bui |
--bu)
2105 ac_prev
=build_alias
;;
2106 -build=* |
--build=* |
--buil=* |
--bui=* |
--bu=*)
2107 build_alias
=$ac_optarg ;;
2109 -cache-file |
--cache-file |
--cache-fil |
--cache-fi \
2110 |
--cache-f |
--cache- |
--cache |
--cach |
--cac |
--ca |
--c)
2111 ac_prev
=cache_file
;;
2112 -cache-file=* |
--cache-file=* |
--cache-fil=* |
--cache-fi=* \
2113 |
--cache-f=* |
--cache-=* |
--cache=* |
--cach=* |
--cac=* |
--ca=* |
--c=*)
2114 cache_file
=$ac_optarg ;;
2116 --config-cache |
-C)
2117 cache_file
=config.cache
;;
2119 -datadir |
--datadir |
--datadi |
--datad)
2121 -datadir=* |
--datadir=* |
--datadi=* |
--datad=*)
2122 datadir
=$ac_optarg ;;
2124 -datarootdir |
--datarootdir |
--datarootdi |
--datarootd |
--dataroot \
2125 |
--dataroo |
--dataro |
--datar)
2126 ac_prev
=datarootdir
;;
2127 -datarootdir=* |
--datarootdir=* |
--datarootdi=* |
--datarootd=* \
2128 |
--dataroot=* |
--dataroo=* |
--dataro=* |
--datar=*)
2129 datarootdir
=$ac_optarg ;;
2131 -disable-* |
--disable-*)
2132 ac_useropt
=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
2133 # Reject names that are not valid shell variable names.
2134 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev
/null
&&
2135 as_fn_error $?
"invalid feature name: $ac_useropt"
2136 ac_useropt_orig
=$ac_useropt
2137 ac_useropt
=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2138 case $ac_user_opts in
2140 "enable_
$ac_useropt"
2142 *) ac_unrecognized_opts
="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
2143 ac_unrecognized_sep
=', ';;
2145 eval enable_
$ac_useropt=no
;;
2147 -docdir |
--docdir |
--docdi |
--doc |
--do)
2149 -docdir=* |
--docdir=* |
--docdi=* |
--doc=* |
--do=*)
2150 docdir
=$ac_optarg ;;
2152 -dvidir |
--dvidir |
--dvidi |
--dvid |
--dvi |
--dv)
2154 -dvidir=* |
--dvidir=* |
--dvidi=* |
--dvid=* |
--dvi=* |
--dv=*)
2155 dvidir
=$ac_optarg ;;
2157 -enable-* |
--enable-*)
2158 ac_useropt
=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
2159 # Reject names that are not valid shell variable names.
2160 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev
/null
&&
2161 as_fn_error $?
"invalid feature name: $ac_useropt"
2162 ac_useropt_orig
=$ac_useropt
2163 ac_useropt
=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2164 case $ac_user_opts in
2166 "enable_
$ac_useropt"
2168 *) ac_unrecognized_opts
="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
2169 ac_unrecognized_sep
=', ';;
2171 eval enable_
$ac_useropt=\
$ac_optarg ;;
2173 -exec-prefix |
--exec_prefix |
--exec-prefix |
--exec-prefi \
2174 |
--exec-pref |
--exec-pre |
--exec-pr |
--exec-p |
--exec- \
2175 |
--exec |
--exe |
--ex)
2176 ac_prev
=exec_prefix
;;
2177 -exec-prefix=* |
--exec_prefix=* |
--exec-prefix=* |
--exec-prefi=* \
2178 |
--exec-pref=* |
--exec-pre=* |
--exec-pr=* |
--exec-p=* |
--exec-=* \
2179 |
--exec=* |
--exe=* |
--ex=*)
2180 exec_prefix
=$ac_optarg ;;
2182 -gas |
--gas |
--ga |
--g)
2183 # Obsolete; use --with-gas.
2186 -help |
--help |
--hel |
--he |
-h)
2187 ac_init_help
=long
;;
2188 -help=r
* |
--help=r
* |
--hel=r
* |
--he=r
* |
-hr*)
2189 ac_init_help
=recursive
;;
2190 -help=s
* |
--help=s
* |
--hel=s
* |
--he=s
* |
-hs*)
2191 ac_init_help
=short
;;
2193 -host |
--host |
--hos |
--ho)
2194 ac_prev
=host_alias
;;
2195 -host=* |
--host=* |
--hos=* |
--ho=*)
2196 host_alias
=$ac_optarg ;;
2198 -htmldir |
--htmldir |
--htmldi |
--htmld |
--html |
--htm |
--ht)
2200 -htmldir=* |
--htmldir=* |
--htmldi=* |
--htmld=* |
--html=* |
--htm=* \
2202 htmldir
=$ac_optarg ;;
2204 -includedir |
--includedir |
--includedi |
--included |
--include \
2205 |
--includ |
--inclu |
--incl |
--inc)
2206 ac_prev
=includedir
;;
2207 -includedir=* |
--includedir=* |
--includedi=* |
--included=* |
--include=* \
2208 |
--includ=* |
--inclu=* |
--incl=* |
--inc=*)
2209 includedir
=$ac_optarg ;;
2211 -infodir |
--infodir |
--infodi |
--infod |
--info |
--inf)
2213 -infodir=* |
--infodir=* |
--infodi=* |
--infod=* |
--info=* |
--inf=*)
2214 infodir
=$ac_optarg ;;
2216 -libdir |
--libdir |
--libdi |
--libd)
2218 -libdir=* |
--libdir=* |
--libdi=* |
--libd=*)
2219 libdir
=$ac_optarg ;;
2221 -libexecdir |
--libexecdir |
--libexecdi |
--libexecd |
--libexec \
2222 |
--libexe |
--libex |
--libe)
2223 ac_prev
=libexecdir
;;
2224 -libexecdir=* |
--libexecdir=* |
--libexecdi=* |
--libexecd=* |
--libexec=* \
2225 |
--libexe=* |
--libex=* |
--libe=*)
2226 libexecdir
=$ac_optarg ;;
2228 -localedir |
--localedir |
--localedi |
--localed |
--locale)
2229 ac_prev
=localedir
;;
2230 -localedir=* |
--localedir=* |
--localedi=* |
--localed=* |
--locale=*)
2231 localedir
=$ac_optarg ;;
2233 -localstatedir |
--localstatedir |
--localstatedi |
--localstated \
2234 |
--localstate |
--localstat |
--localsta |
--localst |
--locals)
2235 ac_prev
=localstatedir
;;
2236 -localstatedir=* |
--localstatedir=* |
--localstatedi=* |
--localstated=* \
2237 |
--localstate=* |
--localstat=* |
--localsta=* |
--localst=* |
--locals=*)
2238 localstatedir
=$ac_optarg ;;
2240 -mandir |
--mandir |
--mandi |
--mand |
--man |
--ma |
--m)
2242 -mandir=* |
--mandir=* |
--mandi=* |
--mand=* |
--man=* |
--ma=* |
--m=*)
2243 mandir
=$ac_optarg ;;
2245 -nfp |
--nfp |
--nf)
2246 # Obsolete; use --without-fp.
2249 -no-create |
--no-create |
--no-creat |
--no-crea |
--no-cre \
2250 |
--no-cr |
--no-c |
-n)
2253 -no-recursion |
--no-recursion |
--no-recursio |
--no-recursi \
2254 |
--no-recurs |
--no-recur |
--no-recu |
--no-rec |
--no-re |
--no-r)
2257 -oldincludedir |
--oldincludedir |
--oldincludedi |
--oldincluded \
2258 |
--oldinclude |
--oldinclud |
--oldinclu |
--oldincl |
--oldinc \
2259 |
--oldin |
--oldi |
--old |
--ol |
--o)
2260 ac_prev
=oldincludedir
;;
2261 -oldincludedir=* |
--oldincludedir=* |
--oldincludedi=* |
--oldincluded=* \
2262 |
--oldinclude=* |
--oldinclud=* |
--oldinclu=* |
--oldincl=* |
--oldinc=* \
2263 |
--oldin=* |
--oldi=* |
--old=* |
--ol=* |
--o=*)
2264 oldincludedir
=$ac_optarg ;;
2266 -prefix |
--prefix |
--prefi |
--pref |
--pre |
--pr |
--p)
2268 -prefix=* |
--prefix=* |
--prefi=* |
--pref=* |
--pre=* |
--pr=* |
--p=*)
2269 prefix
=$ac_optarg ;;
2271 -program-prefix |
--program-prefix |
--program-prefi |
--program-pref \
2272 |
--program-pre |
--program-pr |
--program-p)
2273 ac_prev
=program_prefix
;;
2274 -program-prefix=* |
--program-prefix=* |
--program-prefi=* \
2275 |
--program-pref=* |
--program-pre=* |
--program-pr=* |
--program-p=*)
2276 program_prefix
=$ac_optarg ;;
2278 -program-suffix |
--program-suffix |
--program-suffi |
--program-suff \
2279 |
--program-suf |
--program-su |
--program-s)
2280 ac_prev
=program_suffix
;;
2281 -program-suffix=* |
--program-suffix=* |
--program-suffi=* \
2282 |
--program-suff=* |
--program-suf=* |
--program-su=* |
--program-s=*)
2283 program_suffix
=$ac_optarg ;;
2285 -program-transform-name |
--program-transform-name \
2286 |
--program-transform-nam |
--program-transform-na \
2287 |
--program-transform-n |
--program-transform- \
2288 |
--program-transform |
--program-transfor \
2289 |
--program-transfo |
--program-transf \
2290 |
--program-trans |
--program-tran \
2291 |
--progr-tra |
--program-tr |
--program-t)
2292 ac_prev
=program_transform_name
;;
2293 -program-transform-name=* |
--program-transform-name=* \
2294 |
--program-transform-nam=* |
--program-transform-na=* \
2295 |
--program-transform-n=* |
--program-transform-=* \
2296 |
--program-transform=* |
--program-transfor=* \
2297 |
--program-transfo=* |
--program-transf=* \
2298 |
--program-trans=* |
--program-tran=* \
2299 |
--progr-tra=* |
--program-tr=* |
--program-t=*)
2300 program_transform_name
=$ac_optarg ;;
2302 -pdfdir |
--pdfdir |
--pdfdi |
--pdfd |
--pdf |
--pd)
2304 -pdfdir=* |
--pdfdir=* |
--pdfdi=* |
--pdfd=* |
--pdf=* |
--pd=*)
2305 pdfdir
=$ac_optarg ;;
2307 -psdir |
--psdir |
--psdi |
--psd |
--ps)
2309 -psdir=* |
--psdir=* |
--psdi=* |
--psd=* |
--ps=*)
2312 -q |
-quiet |
--quiet |
--quie |
--qui |
--qu |
--q \
2313 |
-silent |
--silent |
--silen |
--sile |
--sil)
2316 -sbindir |
--sbindir |
--sbindi |
--sbind |
--sbin |
--sbi |
--sb)
2318 -sbindir=* |
--sbindir=* |
--sbindi=* |
--sbind=* |
--sbin=* \
2320 sbindir
=$ac_optarg ;;
2322 -sharedstatedir |
--sharedstatedir |
--sharedstatedi \
2323 |
--sharedstated |
--sharedstate |
--sharedstat |
--sharedsta \
2324 |
--sharedst |
--shareds |
--shared |
--share |
--shar \
2326 ac_prev
=sharedstatedir
;;
2327 -sharedstatedir=* |
--sharedstatedir=* |
--sharedstatedi=* \
2328 |
--sharedstated=* |
--sharedstate=* |
--sharedstat=* |
--sharedsta=* \
2329 |
--sharedst=* |
--shareds=* |
--shared=* |
--share=* |
--shar=* \
2331 sharedstatedir
=$ac_optarg ;;
2333 -site |
--site |
--sit)
2335 -site=* |
--site=* |
--sit=*)
2338 -srcdir |
--srcdir |
--srcdi |
--srcd |
--src |
--sr)
2340 -srcdir=* |
--srcdir=* |
--srcdi=* |
--srcd=* |
--src=* |
--sr=*)
2341 srcdir
=$ac_optarg ;;
2343 -sysconfdir |
--sysconfdir |
--sysconfdi |
--sysconfd |
--sysconf \
2344 |
--syscon |
--sysco |
--sysc |
--sys |
--sy)
2345 ac_prev
=sysconfdir
;;
2346 -sysconfdir=* |
--sysconfdir=* |
--sysconfdi=* |
--sysconfd=* |
--sysconf=* \
2347 |
--syscon=* |
--sysco=* |
--sysc=* |
--sys=* |
--sy=*)
2348 sysconfdir
=$ac_optarg ;;
2350 -target |
--target |
--targe |
--targ |
--tar |
--ta |
--t)
2351 ac_prev
=target_alias
;;
2352 -target=* |
--target=* |
--targe=* |
--targ=* |
--tar=* |
--ta=* |
--t=*)
2353 target_alias
=$ac_optarg ;;
2355 -v |
-verbose |
--verbose |
--verbos |
--verbo |
--verb)
2358 -version |
--version |
--versio |
--versi |
--vers |
-V)
2359 ac_init_version
=: ;;
2362 ac_useropt
=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
2363 # Reject names that are not valid shell variable names.
2364 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev
/null
&&
2365 as_fn_error $?
"invalid package name: $ac_useropt"
2366 ac_useropt_orig
=$ac_useropt
2367 ac_useropt
=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2368 case $ac_user_opts in
2372 *) ac_unrecognized_opts
="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
2373 ac_unrecognized_sep
=', ';;
2375 eval with_
$ac_useropt=\
$ac_optarg ;;
2377 -without-* |
--without-*)
2378 ac_useropt
=`expr "x$ac_option" : 'x-*without-\(.*\)'`
2379 # Reject names that are not valid shell variable names.
2380 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev
/null
&&
2381 as_fn_error $?
"invalid package name: $ac_useropt"
2382 ac_useropt_orig
=$ac_useropt
2383 ac_useropt
=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
2384 case $ac_user_opts in
2388 *) ac_unrecognized_opts
="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
2389 ac_unrecognized_sep
=', ';;
2391 eval with_
$ac_useropt=no
;;
2394 # Obsolete; use --with-x.
2397 -x-includes |
--x-includes |
--x-include |
--x-includ |
--x-inclu \
2398 |
--x-incl |
--x-inc |
--x-in |
--x-i)
2399 ac_prev
=x_includes
;;
2400 -x-includes=* |
--x-includes=* |
--x-include=* |
--x-includ=* |
--x-inclu=* \
2401 |
--x-incl=* |
--x-inc=* |
--x-in=* |
--x-i=*)
2402 x_includes
=$ac_optarg ;;
2404 -x-libraries |
--x-libraries |
--x-librarie |
--x-librari \
2405 |
--x-librar |
--x-libra |
--x-libr |
--x-lib |
--x-li |
--x-l)
2406 ac_prev
=x_libraries
;;
2407 -x-libraries=* |
--x-libraries=* |
--x-librarie=* |
--x-librari=* \
2408 |
--x-librar=* |
--x-libra=* |
--x-libr=* |
--x-lib=* |
--x-li=* |
--x-l=*)
2409 x_libraries
=$ac_optarg ;;
2411 -*) as_fn_error $?
"unrecognized option: \`$ac_option'
2412 Try \`$0 --help' for more information"
2416 ac_envvar
=`expr "x$ac_option" : 'x\([^=]*\)='`
2417 # Reject names that are not valid shell variable names.
2418 case $ac_envvar in #(
2419 '' |
[0-9]* |
*[!_
$as_cr_alnum]* )
2420 as_fn_error $?
"invalid variable name: \`$ac_envvar'" ;;
2422 eval $ac_envvar=\
$ac_optarg
2423 export $ac_envvar ;;
2426 # FIXME: should be removed in autoconf 3.0.
2427 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
2428 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev
/null
&&
2429 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
2430 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
2436 if test -n "$ac_prev"; then
2437 ac_option
=--`echo $ac_prev | sed 's/_/-/g'`
2438 as_fn_error $?
"missing argument to $ac_option"
2441 if test -n "$ac_unrecognized_opts"; then
2442 case $enable_option_checking in
2444 fatal
) as_fn_error $?
"unrecognized options: $ac_unrecognized_opts" ;;
2445 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
2449 # Check all directory arguments for consistency.
2450 for ac_var
in exec_prefix prefix bindir sbindir libexecdir datarootdir \
2451 datadir sysconfdir sharedstatedir localstatedir includedir \
2452 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
2453 libdir localedir mandir
2455 eval ac_val
=\$
$ac_var
2456 # Remove trailing slashes.
2459 ac_val
=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
2460 eval $ac_var=\
$ac_val;;
2462 # Be sure to have absolute directory names.
2464 [\\/$
]* | ?
:[\\/]* ) continue;;
2465 NONE |
'' ) case $ac_var in *prefix
) continue;; esac;;
2467 as_fn_error $?
"expected an absolute directory name for --$ac_var: $ac_val"
2470 # There might be people who depend on the old broken behavior: `$host'
2471 # used to hold the argument of --host etc.
2472 # FIXME: To remove some day.
2475 target
=$target_alias
2477 # FIXME: To remove some day.
2478 if test "x$host_alias" != x
; then
2479 if test "x$build_alias" = x
; then
2480 cross_compiling
=maybe
2481 elif test "x$build_alias" != "x$host_alias"; then
2487 test -n "$host_alias" && ac_tool_prefix
=$host_alias-
2489 test "$silent" = yes && exec 6>/dev
/null
2492 ac_pwd
=`pwd` && test -n "$ac_pwd" &&
2493 ac_ls_di
=`ls -di .` &&
2494 ac_pwd_ls_di
=`cd "$ac_pwd" && ls -di .` ||
2495 as_fn_error $?
"working directory cannot be determined"
2496 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
2497 as_fn_error $?
"pwd does not report name of working directory"
2500 # Find the source files, if location was not specified.
2501 if test -z "$srcdir"; then
2502 ac_srcdir_defaulted
=yes
2503 # Try the directory containing this script, then the parent directory.
2504 ac_confdir
=`$as_dirname -- "$as_myself" ||
2505 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
2506 X"$as_myself" : 'X\(//\)[^/]' \| \
2507 X"$as_myself" : 'X\(//\)$' \| \
2508 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
2509 $as_echo X"$as_myself" |
2510 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
2528 if test ! -r "$srcdir/$ac_unique_file"; then
2532 ac_srcdir_defaulted
=no
2534 if test ! -r "$srcdir/$ac_unique_file"; then
2535 test "$ac_srcdir_defaulted" = yes && srcdir
="$ac_confdir or .."
2536 as_fn_error $?
"cannot find sources ($ac_unique_file) in $srcdir"
2538 ac_msg
="sources are in $srcdir, but \`cd $srcdir' does not work"
2540 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
2542 # When building in place, set srcdir=.
2543 if test "$ac_abs_confdir" = "$ac_pwd"; then
2546 # Remove unnecessary trailing slashes from srcdir.
2547 # Double slashes in file names in object file debugging info
2548 # mess up M-x gdb in Emacs.
2550 */) srcdir
=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
2552 for ac_var
in $ac_precious_vars; do
2553 eval ac_env_
${ac_var}_set=\${${ac_var}+set}
2554 eval ac_env_
${ac_var}_value
=\$
${ac_var}
2555 eval ac_cv_env_
${ac_var}_set=\${${ac_var}+set}
2556 eval ac_cv_env_
${ac_var}_value
=\$
${ac_var}
2560 # Report the --help message.
2562 if test "$ac_init_help" = "long"; then
2563 # Omit some internal or obsolete options to make the list less imposing.
2564 # This message is too long to be a string in the A/UX 3.1 sh.
2566 \`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems.
2568 Usage: $0 [OPTION]... [VAR=VALUE]...
2570 To assign environment variables (e.g., CC, CFLAGS...), specify them as
2571 VAR=VALUE. See below for descriptions of some of the useful variables.
2573 Defaults for the options are specified in brackets.
2576 -h, --help display this help and exit
2577 --help=short display options specific to this package
2578 --help=recursive display the short help of all the included packages
2579 -V, --version display version information and exit
2580 -q, --quiet, --silent do not print \`checking ...' messages
2581 --cache-file=FILE cache test results in FILE [disabled]
2582 -C, --config-cache alias for \`--cache-file=config.cache'
2583 -n, --no-create do not create output files
2584 --srcdir=DIR find the sources in DIR [configure dir or \`..']
2586 Installation directories:
2587 --prefix=PREFIX install architecture-independent files in PREFIX
2588 [$ac_default_prefix]
2589 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
2592 By default, \`make install' will install all the files in
2593 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
2594 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
2595 for instance \`--prefix=\$HOME'.
2597 For better control, use the options below.
2599 Fine tuning of the installation directories:
2600 --bindir=DIR user executables [EPREFIX/bin]
2601 --sbindir=DIR system admin executables [EPREFIX/sbin]
2602 --libexecdir=DIR program executables [EPREFIX/libexec]
2603 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
2604 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
2605 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
2606 --libdir=DIR object code libraries [EPREFIX/lib]
2607 --includedir=DIR C header files [PREFIX/include]
2608 --oldincludedir=DIR C header files for non-gcc [/usr/include]
2609 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
2610 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
2611 --infodir=DIR info documentation [DATAROOTDIR/info]
2612 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
2613 --mandir=DIR man documentation [DATAROOTDIR/man]
2614 --docdir=DIR documentation root [DATAROOTDIR/doc/libgnu]
2615 --htmldir=DIR html documentation [DOCDIR]
2616 --dvidir=DIR dvi documentation [DOCDIR]
2617 --pdfdir=DIR pdf documentation [DOCDIR]
2618 --psdir=DIR ps documentation [DOCDIR]
2624 --program-prefix=PREFIX prepend PREFIX to installed program names
2625 --program-suffix=SUFFIX append SUFFIX to installed program names
2626 --program-transform-name=PROGRAM run
sed PROGRAM on installed program names
2629 --build=BUILD configure
for building on BUILD
[guessed
]
2630 --host=HOST cross-compile to build programs to run on HOST
[BUILD
]
2631 --target=TARGET configure
for building compilers
for TARGET
[HOST
]
2635 if test -n "$ac_init_help"; then
2636 case $ac_init_help in
2637 short | recursive
) echo "Configuration of libgnu UNUSED-VERSION:";;
2642 --disable-option-checking ignore unrecognized
--enable/--with options
2643 --disable-FEATURE do not include FEATURE
(same as
--enable-FEATURE=no
)
2644 --enable-FEATURE[=ARG
] include FEATURE
[ARG
=yes]
2645 --enable-maintainer-mode
2646 enable make rules and dependencies not useful
(and
2647 sometimes confusing
) to the casual installer
2648 --enable-plugins Enable support
for plugins
2649 --disable-largefile omit support
for large files
2650 --enable-threads={isoc|posix|isoc
+posix|windows
}
2651 specify multithreading API
2652 --disable-threads build without multithread safety
2653 --enable-cross-guesses={conservative|risky
}
2654 specify policy
for cross-compilation guesses
2655 --enable-dependency-tracking
2656 do not reject slow dependency extractors
2657 --disable-dependency-tracking
2658 speeds up one-time build
2659 --enable-silent-rules less verbose build output
(undo
: "make V=1")
2660 --disable-silent-rules verbose build output
(undo
: "make V=0")
2662 Some influential environment variables
:
2663 CC C compiler
command
2664 CFLAGS C compiler flags
2665 LDFLAGS linker flags
, e.g.
-L<lib dir
> if you have libraries
in a
2666 nonstandard directory
<lib dir
>
2667 LIBS libraries to pass to the linker
, e.g.
-l<library
>
2668 CPPFLAGS
(Objective
) C
/C
++ preprocessor flags
, e.g.
-I<include dir
> if
2669 you have headers
in a nonstandard directory
<include dir
>
2672 Use these variables to override the choices made by
`configure' or to help
2673 it to find libraries and programs with nonstandard names/locations.
2675 Report bugs to the package provider.
2680 if test "$ac_init_help" = "recursive"; then
2681 # If there are subdirs, report their specific --help.
2682 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2683 test -d "$ac_dir" ||
2684 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2689 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2691 ac_dir_suffix=/`$as_echo "$ac_dir" |
sed 's|^\.[\\/]||'`
2692 # A ".." for each directory in $ac_dir_suffix.
2693 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" |
sed 's|/[^\\/]*|/..|g;s|/||'`
2694 case $ac_top_builddir_sub in
2695 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2696 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2699 ac_abs_top_builddir=$ac_pwd
2700 ac_abs_builddir=$ac_pwd$ac_dir_suffix
2701 # for backward compatibility:
2702 ac_top_builddir=$ac_top_build_prefix
2705 .) # We are building in place.
2707 ac_top_srcdir=$ac_top_builddir_sub
2708 ac_abs_top_srcdir=$ac_pwd ;;
2709 [\\/]* | ?:[\\/]* ) # Absolute name.
2710 ac_srcdir=$srcdir$ac_dir_suffix;
2711 ac_top_srcdir=$srcdir
2712 ac_abs_top_srcdir=$srcdir ;;
2714 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2715 ac_top_srcdir=$ac_top_build_prefix$srcdir
2716 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2718 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2720 cd "$ac_dir" || { ac_status=$?; continue; }
2721 # Check for guested configure.
2722 if test -f "$ac_srcdir/configure.gnu"; then
2724 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2725 elif test -f "$ac_srcdir/configure"; then
2727 $SHELL "$ac_srcdir/configure" --help=recursive
2729 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2731 cd "$ac_pwd" || { ac_status=$?; break; }
2735 test -n "$ac_init_help" && exit $ac_status
2736 if $ac_init_version; then
2738 libgnu configure UNUSED-VERSION
2739 generated by GNU Autoconf 2.69
2741 Copyright (C) 2012 Free Software Foundation, Inc.
2742 This configure script is free software; the Free Software Foundation
2743 gives unlimited permission to copy, distribute and modify it.
2748 ## ------------------------ ##
2749 ## Autoconf initialization. ##
2750 ## ------------------------ ##
2752 # ac_fn_c_try_compile LINENO
2753 # --------------------------
2754 # Try to compile conftest.$ac_ext, and return whether this succeeded.
2755 ac_fn_c_try_compile ()
2757 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2758 rm -f conftest.$ac_objext
2759 if { { ac_try="$ac_compile"
2761 *\"* | *\`* |
*\\*) ac_try_echo
=\
$ac_try;;
2762 *) ac_try_echo
=$ac_try;;
2764 eval ac_try_echo
="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2765 $as_echo "$ac_try_echo"; } >&5
2766 (eval "$ac_compile") 2>conftest.err
2768 if test -s conftest.err
; then
2769 grep -v '^ *+' conftest.err
>conftest.er1
2770 cat conftest.er1
>&5
2771 mv -f conftest.er1 conftest.err
2773 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2774 test $ac_status = 0; } && {
2775 test -z "$ac_c_werror_flag" ||
2776 test ! -s conftest.err
2777 } && test -s conftest.
$ac_objext; then :
2780 $as_echo "$as_me: failed program was:" >&5
2781 sed 's/^/| /' conftest.
$ac_ext >&5
2785 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2786 as_fn_set_status
$ac_retval
2788 } # ac_fn_c_try_compile
2790 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
2791 # -------------------------------------------------------
2792 # Tests whether HEADER exists and can be compiled using the include files in
2793 # INCLUDES, setting the cache variable VAR accordingly.
2794 ac_fn_c_check_header_compile
()
2796 as_lineno
=${as_lineno-"$1"} as_lineno_stack
=as_lineno_stack
=$as_lineno_stack
2797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2798 $as_echo_n "checking for $2... " >&6; }
2799 if eval \
${$3+:} false
; then :
2800 $as_echo_n "(cached) " >&6
2802 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
2803 /* end confdefs.h. */
2807 if ac_fn_c_try_compile
"$LINENO"; then :
2812 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
2815 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2816 $as_echo "$ac_res" >&6; }
2817 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2819 } # ac_fn_c_check_header_compile
2821 # ac_fn_c_try_cpp LINENO
2822 # ----------------------
2823 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2826 as_lineno
=${as_lineno-"$1"} as_lineno_stack
=as_lineno_stack
=$as_lineno_stack
2827 if { { ac_try
="$ac_cpp conftest.$ac_ext"
2829 *\"* |
*\
`* | *\\*) ac_try_echo=\$ac_try;;
2830 *) ac_try_echo=$ac_try;;
2832 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2833 $as_echo "$ac_try_echo"; } >&5
2834 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2836 if test -s conftest.err; then
2837 grep -v '^ *+' conftest.err >conftest.er1
2838 cat conftest.er1 >&5
2839 mv -f conftest.er1 conftest.err
2841 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2842 test $ac_status = 0; } > conftest.i && {
2843 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2844 test ! -s conftest.err
2848 $as_echo "$as_me: failed program was:" >&5
2849 sed 's/^/| /' conftest.$ac_ext >&5
2853 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2854 as_fn_set_status $ac_retval
2858 # ac_fn_c_try_run LINENO
2859 # ----------------------
2860 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2861 # that executables *can* be run.
2864 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2865 if { { ac_try="$ac_link"
2867 *\"* | *\`* |
*\\*) ac_try_echo
=\
$ac_try;;
2868 *) ac_try_echo
=$ac_try;;
2870 eval ac_try_echo
="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2871 $as_echo "$ac_try_echo"; } >&5
2872 (eval "$ac_link") 2>&5
2874 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2875 test $ac_status = 0; } && { ac_try
='./conftest$ac_exeext'
2876 { { case "(($ac_try" in
2877 *\"* |
*\
`* | *\\*) ac_try_echo=\$ac_try;;
2878 *) ac_try_echo=$ac_try;;
2880 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2881 $as_echo "$ac_try_echo"; } >&5
2882 (eval "$ac_try") 2>&5
2884 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2885 test $ac_status = 0; }; }; then :
2888 $as_echo "$as_me: program exited with status $ac_status" >&5
2889 $as_echo "$as_me: failed program was:" >&5
2890 sed 's/^/| /' conftest.$ac_ext >&5
2892 ac_retval=$ac_status
2894 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2895 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2896 as_fn_set_status $ac_retval
2900 # ac_fn_c_try_link LINENO
2901 # -----------------------
2902 # Try to link conftest.$ac_ext, and return whether this succeeded.
2905 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2906 rm -f conftest.$ac_objext conftest$ac_exeext
2907 if { { ac_try="$ac_link"
2909 *\"* | *\`* |
*\\*) ac_try_echo
=\
$ac_try;;
2910 *) ac_try_echo
=$ac_try;;
2912 eval ac_try_echo
="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2913 $as_echo "$ac_try_echo"; } >&5
2914 (eval "$ac_link") 2>conftest.err
2916 if test -s conftest.err
; then
2917 grep -v '^ *+' conftest.err
>conftest.er1
2918 cat conftest.er1
>&5
2919 mv -f conftest.er1 conftest.err
2921 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2922 test $ac_status = 0; } && {
2923 test -z "$ac_c_werror_flag" ||
2924 test ! -s conftest.err
2925 } && test -s conftest
$ac_exeext && {
2926 test "$cross_compiling" = yes ||
2927 test -x conftest
$ac_exeext
2931 $as_echo "$as_me: failed program was:" >&5
2932 sed 's/^/| /' conftest.
$ac_ext >&5
2936 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2937 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2938 # interfere with the next link command; also delete a directory that is
2939 # left behind by Apple's compiler. We do this before executing the actions.
2940 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2941 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2942 as_fn_set_status
$ac_retval
2944 } # ac_fn_c_try_link
2946 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2947 # -------------------------------------------
2948 # Tests whether TYPE exists after having included INCLUDES, setting cache
2949 # variable VAR accordingly.
2950 ac_fn_c_check_type
()
2952 as_lineno
=${as_lineno-"$1"} as_lineno_stack
=as_lineno_stack
=$as_lineno_stack
2953 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2954 $as_echo_n "checking for $2... " >&6; }
2955 if eval \
${$3+:} false
; then :
2956 $as_echo_n "(cached) " >&6
2959 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
2960 /* end confdefs.h. */
2971 if ac_fn_c_try_compile
"$LINENO"; then :
2972 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
2973 /* end confdefs.h. */
2984 if ac_fn_c_try_compile
"$LINENO"; then :
2989 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
2991 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
2994 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2995 $as_echo "$ac_res" >&6; }
2996 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2998 } # ac_fn_c_check_type
3000 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
3001 # -------------------------------------------------------
3002 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
3003 # the include files in INCLUDES and setting the cache variable VAR
3005 ac_fn_c_check_header_mongrel
()
3007 as_lineno
=${as_lineno-"$1"} as_lineno_stack
=as_lineno_stack
=$as_lineno_stack
3008 if eval \
${$3+:} false
; then :
3009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3010 $as_echo_n "checking for $2... " >&6; }
3011 if eval \
${$3+:} false
; then :
3012 $as_echo_n "(cached) " >&6
3015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3016 $as_echo "$ac_res" >&6; }
3018 # Is the header compilable?
3019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
3020 $as_echo_n "checking $2 usability... " >&6; }
3021 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
3022 /* end confdefs.h. */
3026 if ac_fn_c_try_compile
"$LINENO"; then :
3027 ac_header_compiler
=yes
3029 ac_header_compiler
=no
3031 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
3032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
3033 $as_echo "$ac_header_compiler" >&6; }
3035 # Is the header present?
3036 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
3037 $as_echo_n "checking $2 presence... " >&6; }
3038 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
3039 /* end confdefs.h. */
3042 if ac_fn_c_try_cpp
"$LINENO"; then :
3043 ac_header_preproc
=yes
3045 ac_header_preproc
=no
3047 rm -f conftest.err conftest.i conftest.
$ac_ext
3048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
3049 $as_echo "$ac_header_preproc" >&6; }
3051 # So? What about this header?
3052 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
3054 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
3055 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
3056 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
3057 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
3060 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
3061 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
3062 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
3063 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
3064 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
3065 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
3066 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
3067 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
3068 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
3069 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
3072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3073 $as_echo_n "checking for $2... " >&6; }
3074 if eval \
${$3+:} false
; then :
3075 $as_echo_n "(cached) " >&6
3077 eval "$3=\$ac_header_compiler"
3080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3081 $as_echo "$ac_res" >&6; }
3083 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3085 } # ac_fn_c_check_header_mongrel
3087 # ac_fn_c_check_func LINENO FUNC VAR
3088 # ----------------------------------
3089 # Tests whether FUNC exists, setting the cache variable VAR accordingly
3090 ac_fn_c_check_func
()
3092 as_lineno
=${as_lineno-"$1"} as_lineno_stack
=as_lineno_stack
=$as_lineno_stack
3093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3094 $as_echo_n "checking for $2... " >&6; }
3095 if eval \
${$3+:} false
; then :
3096 $as_echo_n "(cached) " >&6
3098 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
3099 /* end confdefs.h. */
3100 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
3101 For example, HP-UX 11i <limits.h> declares gettimeofday. */
3102 #define $2 innocuous_$2
3104 /* System header to define __stub macros and hopefully few prototypes,
3105 which can conflict with char $2 (); below.
3106 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3107 <limits.h> exists even on freestanding compilers. */
3110 # include <limits.h>
3112 # include <assert.h>
3117 /* Override any GCC internal prototype to avoid an error.
3118 Use char because int might match the return type of a GCC
3119 builtin and then its argument prototype would still apply. */
3124 /* The GNU C library defines this for functions which it implements
3125 to always fail with ENOSYS. Some functions are actually named
3126 something starting with __ and the normal name is an alias. */
3127 #if defined __stub_$2 || defined __stub___$2
3139 if ac_fn_c_try_link
"$LINENO"; then :
3144 rm -f core conftest.err conftest.
$ac_objext \
3145 conftest
$ac_exeext conftest.
$ac_ext
3148 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3149 $as_echo "$ac_res" >&6; }
3150 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3152 } # ac_fn_c_check_func
3154 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
3155 # ---------------------------------------------
3156 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
3158 ac_fn_c_check_decl
()
3160 ac_save_ac_compile
="$ac_compile"
3161 if test -n "$ac_compile_for_check_decl"; then
3162 ac_compile
="$ac_compile_for_check_decl"
3164 as_lineno
=${as_lineno-"$1"} as_lineno_stack
=as_lineno_stack
=$as_lineno_stack
3165 as_decl_name
=`echo $2|sed 's/ *(.*//'`
3166 as_decl_use
=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
3167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
3168 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
3169 if eval \
${$3+:} false
; then :
3170 $as_echo_n "(cached) " >&6
3172 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
3173 /* end confdefs.h. */
3178 #ifndef $as_decl_name
3180 (void) $as_decl_use;
3182 (void) $as_decl_name;
3190 if ac_fn_c_try_compile
"$LINENO"; then :
3195 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
3198 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3199 $as_echo "$ac_res" >&6; }
3200 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3201 ac_compile
="$ac_save_ac_compile"
3203 } # ac_fn_c_check_decl
3205 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
3206 # --------------------------------------------
3207 # Tries to find the compile-time value of EXPR in a program that includes
3208 # INCLUDES, setting VAR accordingly. Returns whether the value could be
3210 ac_fn_c_compute_int
()
3212 as_lineno
=${as_lineno-"$1"} as_lineno_stack
=as_lineno_stack
=$as_lineno_stack
3213 if test "$cross_compiling" = yes; then
3214 # Depending upon the size, compute the lo and hi bounds.
3215 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
3216 /* end confdefs.h. */
3221 static int test_array [1 - 2 * !(($2) >= 0)];
3223 return test_array [0];
3229 if ac_fn_c_try_compile
"$LINENO"; then :
3232 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
3233 /* end confdefs.h. */
3238 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3240 return test_array [0];
3246 if ac_fn_c_try_compile
"$LINENO"; then :
3247 ac_hi
=$ac_mid; break
3249 as_fn_arith
$ac_mid + 1 && ac_lo
=$as_val
3250 if test $ac_lo -le $ac_mid; then
3254 as_fn_arith
2 '*' $ac_mid + 1 && ac_mid
=$as_val
3256 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
3259 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
3260 /* end confdefs.h. */
3265 static int test_array [1 - 2 * !(($2) < 0)];
3267 return test_array [0];
3273 if ac_fn_c_try_compile
"$LINENO"; then :
3276 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
3277 /* end confdefs.h. */
3282 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
3284 return test_array [0];
3290 if ac_fn_c_try_compile
"$LINENO"; then :
3291 ac_lo
=$ac_mid; break
3293 as_fn_arith
'(' $ac_mid ')' - 1 && ac_hi
=$as_val
3294 if test $ac_mid -le $ac_hi; then
3298 as_fn_arith
2 '*' $ac_mid && ac_mid
=$as_val
3300 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
3305 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
3307 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
3308 # Binary search between lo and hi bounds.
3309 while test "x$ac_lo" != "x$ac_hi"; do
3310 as_fn_arith
'(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid
=$as_val
3311 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
3312 /* end confdefs.h. */
3317 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
3319 return test_array [0];
3325 if ac_fn_c_try_compile
"$LINENO"; then :
3328 as_fn_arith
'(' $ac_mid ')' + 1 && ac_lo
=$as_val
3330 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
3333 ?
*) eval "$3=\$ac_lo"; ac_retval
=0 ;;
3337 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
3338 /* end confdefs.h. */
3340 static long int longval () { return $2; }
3341 static unsigned long int ulongval () { return $2; }
3348 FILE *f = fopen ("conftest.val", "w");
3353 long int i = longval ();
3356 fprintf (f, "%ld", i);
3360 unsigned long int i = ulongval ();
3363 fprintf (f, "%lu", i);
3365 /* Do not output a trailing newline, as this causes \r\n confusion
3366 on some platforms. */
3367 return ferror (f) || fclose (f) != 0;
3373 if ac_fn_c_try_run
"$LINENO"; then :
3374 echo >>conftest.val
; read $3 <conftest.val
; ac_retval
=0
3378 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
3379 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
3383 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3384 as_fn_set_status
$ac_retval
3386 } # ac_fn_c_compute_int
3388 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
3389 # ----------------------------------------------------
3390 # Tries to find if the field MEMBER exists in type AGGR, after including
3391 # INCLUDES, setting cache variable VAR accordingly.
3392 ac_fn_c_check_member
()
3394 as_lineno
=${as_lineno-"$1"} as_lineno_stack
=as_lineno_stack
=$as_lineno_stack
3395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
3396 $as_echo_n "checking for $2.$3... " >&6; }
3397 if eval \
${$4+:} false
; then :
3398 $as_echo_n "(cached) " >&6
3400 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
3401 /* end confdefs.h. */
3413 if ac_fn_c_try_compile
"$LINENO"; then :
3416 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
3417 /* end confdefs.h. */
3423 if (sizeof ac_aggr.$3)
3429 if ac_fn_c_try_compile
"$LINENO"; then :
3434 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
3436 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
3439 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3440 $as_echo "$ac_res" >&6; }
3441 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3443 } # ac_fn_c_check_member
3444 cat >config.log
<<_ACEOF
3445 This file contains any messages produced by compilers while
3446 running configure, to aid debugging if configure makes a mistake.
3448 It was created by libgnu $as_me UNUSED-VERSION, which was
3449 generated by GNU Autoconf 2.69. Invocation command line was
3461 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3462 uname -m = `(uname -m) 2>/dev/null || echo unknown`
3463 uname -r = `(uname -r) 2>/dev/null || echo unknown`
3464 uname -s = `(uname -s) 2>/dev/null || echo unknown`
3465 uname -v = `(uname -v) 2>/dev/null || echo unknown`
3467 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3468 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
3470 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
3471 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
3472 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3473 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
3474 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
3475 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
3476 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
3480 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
3484 test -z "$as_dir" && as_dir
=.
3485 $as_echo "PATH: $as_dir"
3501 # Keep a trace of the command line.
3502 # Strip out --no-create and --no-recursion so they do not pile up.
3503 # Strip out --silent because we don't want to record it for future runs.
3504 # Also quote any args containing shell meta-characters.
3505 # Make two passes to allow for proper duplicate-argument suppression.
3509 ac_must_keep_next
=false
3515 -no-create |
--no-c* |
-n |
-no-recursion |
--no-r*) continue ;;
3516 -q |
-quiet |
--quiet |
--quie |
--qui |
--qu |
--q \
3517 |
-silent |
--silent |
--silen |
--sile |
--sil)
3520 ac_arg
=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3523 1) as_fn_append ac_configure_args0
" '$ac_arg'" ;;
3525 as_fn_append ac_configure_args1
" '$ac_arg'"
3526 if test $ac_must_keep_next = true
; then
3527 ac_must_keep_next
=false
# Got value, back to normal.
3530 *=* |
--config-cache |
-C |
-disable-* |
--disable-* \
3531 |
-enable-* |
--enable-* |
-gas |
--g* |
-nfp |
--nf* \
3532 |
-q |
-quiet |
--q* |
-silent |
--sil* |
-v |
-verb* \
3533 |
-with-* |
--with-* |
-without-* |
--without-* |
--x)
3534 case "$ac_configure_args0 " in
3535 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3538 -* ) ac_must_keep_next
=true
;;
3541 as_fn_append ac_configure_args
" '$ac_arg'"
3546 { ac_configure_args0
=; unset ac_configure_args0
;}
3547 { ac_configure_args1
=; unset ac_configure_args1
;}
3549 # When interrupted or exit'd, cleanup temporary files, and complete
3550 # config.log. We remove comments because anyway the quotes in there
3551 # would cause problems or look ugly.
3552 # WARNING: Use '\'' to represent an apostrophe within the trap.
3553 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3554 trap 'exit_status=$?
3555 # Save into config.log some information that might help in debugging.
3559 $as_echo "## ---------------- ##
3560 ## Cache variables. ##
3561 ## ---------------- ##"
3563 # The following way of writing the cache mishandles newlines in values,
3565 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3566 eval ac_val=\$$ac_var
3570 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3571 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3574 _ | IFS | as_nl) ;; #(
3575 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3576 *) { eval $ac_var=; unset $ac_var;} ;;
3581 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3582 *${as_nl}ac_space=\ *)
3584 "s/'\''/'\''\\\\'\'''\''/g;
3585 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3588 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3595 $as_echo "## ----------------- ##
3596 ## Output variables. ##
3597 ## ----------------- ##"
3599 for ac_var in $ac_subst_vars
3601 eval ac_val=\$$ac_var
3603 *\'\''*) ac_val
=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3605 $as_echo "$ac_var='\''$ac_val'\''"
3609 if test -n "$ac_subst_files"; then
3610 $as_echo "## ------------------- ##
3611 ## File substitutions. ##
3612 ## ------------------- ##"
3614 for ac_var
in $ac_subst_files
3616 eval ac_val
=\$
$ac_var
3618 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3620 $as_echo "$ac_var='\''$ac_val'\''"
3625 if test -s confdefs.h; then
3626 $as_echo "## ----------- ##
3633 test "$ac_signal" != 0 &&
3634 $as_echo "$as_me: caught signal $ac_signal"
3635 $as_echo "$as_me: exit $exit_status"
3637 rm -f core *.core core.conftest.* &&
3638 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3641 for ac_signal
in 1 2 13 15; do
3642 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3646 # confdefs.h avoids OS command line length limits that DEFS can exceed.
3647 rm -f -r conftest
* confdefs.h
3649 $as_echo "/* confdefs.h */" > confdefs.h
3651 # Predefined preprocessor variables.
3653 cat >>confdefs.h
<<_ACEOF
3654 #define PACKAGE_NAME "$PACKAGE_NAME"
3657 cat >>confdefs.h
<<_ACEOF
3658 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3661 cat >>confdefs.h
<<_ACEOF
3662 #define PACKAGE_VERSION "$PACKAGE_VERSION"
3665 cat >>confdefs.h
<<_ACEOF
3666 #define PACKAGE_STRING "$PACKAGE_STRING"
3669 cat >>confdefs.h
<<_ACEOF
3670 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3673 cat >>confdefs.h
<<_ACEOF
3674 #define PACKAGE_URL "$PACKAGE_URL"
3678 # Let the site file select an alternate cache file if it wants to.
3679 # Prefer an explicitly selected file to automatically selected ones.
3682 if test -n "$CONFIG_SITE"; then
3683 # We do not want a PATH search for config.site.
3684 case $CONFIG_SITE in #((
3685 -*) ac_site_file1
=.
/$CONFIG_SITE;;
3686 */*) ac_site_file1
=$CONFIG_SITE;;
3687 *) ac_site_file1
=.
/$CONFIG_SITE;;
3689 elif test "x$prefix" != xNONE
; then
3690 ac_site_file1
=$prefix/share
/config.site
3691 ac_site_file2
=$prefix/etc
/config.site
3693 ac_site_file1
=$ac_default_prefix/share
/config.site
3694 ac_site_file2
=$ac_default_prefix/etc
/config.site
3696 for ac_site_file
in "$ac_site_file1" "$ac_site_file2"
3698 test "x$ac_site_file" = xNONE
&& continue
3699 if test /dev
/null
!= "$ac_site_file" && test -r "$ac_site_file"; then
3700 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3701 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
3702 sed 's/^/| /' "$ac_site_file" >&5
3704 ||
{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3705 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3706 as_fn_error $?
"failed to load site script $ac_site_file
3707 See \`config.log' for more details" "$LINENO" 5; }
3711 if test -r "$cache_file"; then
3712 # Some versions of bash will fail to source /dev/null (special files
3713 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
3714 if test /dev
/null
!= "$cache_file" && test -f "$cache_file"; then
3715 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3716 $as_echo "$as_me: loading cache $cache_file" >&6;}
3718 [\\/]* | ?
:[\\/]* ) .
"$cache_file";;
3719 *) .
"./$cache_file";;
3723 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3724 $as_echo "$as_me: creating cache $cache_file" >&6;}
3728 as_fn_append ac_header_list
" wchar.h"
3729 as_fn_append ac_header_list
" minix/config.h"
3730 as_fn_append ac_header_list
" arpa/inet.h"
3731 as_fn_append ac_header_list
" features.h"
3732 as_fn_append ac_header_list
" sys/socket.h"
3733 as_fn_append ac_func_list
" btowc"
3734 as_fn_append ac_func_list
" canonicalize_file_name"
3735 as_fn_append ac_func_list
" faccessat"
3736 as_fn_append ac_func_list
" realpath"
3737 as_fn_append ac_header_list
" sys/param.h"
3738 as_fn_append ac_header_list
" unistd.h"
3739 as_fn_append ac_func_list
" chown"
3740 as_fn_append ac_func_list
" fchown"
3741 as_fn_append ac_func_list
" _set_invalid_parameter_handler"
3742 as_fn_append ac_func_list
" fchdir"
3743 as_fn_append ac_header_list
" dirent.h"
3744 as_fn_append ac_func_list
" fcntl"
3745 as_fn_append ac_func_list
" symlink"
3746 as_fn_append ac_func_list
" fdopendir"
3747 as_fn_append ac_func_list
" mempcpy"
3748 as_fn_append ac_header_list
" fnmatch.h"
3749 as_fn_append ac_func_list
" fnmatch"
3750 as_fn_append ac_func_list
" mbsrtowcs"
3751 gl_fnmatch_required
=GNU
3752 as_fn_append ac_header_list
" sys/stat.h"
3753 as_fn_append ac_func_list
" fstatat"
3754 as_fn_append ac_func_list
" getdelim"
3755 as_fn_append ac_func_list
" getdtablesize"
3756 as_fn_append ac_func_list
" getlogin_r"
3757 as_fn_append ac_func_list
" getprogname"
3758 as_fn_append ac_func_list
" getexecname"
3759 as_fn_append ac_func_list
" getrandom"
3760 as_fn_append ac_header_list
" sys/time.h"
3761 as_fn_append ac_func_list
" gettimeofday"
3762 as_fn_append ac_header_list
" glob.h"
3763 as_fn_append ac_func_list
" glob"
3764 as_fn_append ac_func_list
" glob_pattern_p"
3765 as_fn_append ac_func_list
" getpwnam_r"
3766 as_fn_append ac_header_list
" threads.h"
3767 as_fn_append ac_header_list
" netdb.h"
3768 as_fn_append ac_header_list
" netinet/in.h"
3769 as_fn_append ac_header_list
" limits.h"
3770 as_fn_append ac_header_list
" inttypes.h"
3771 as_fn_append ac_header_list
" sys/types.h"
3772 as_fn_append ac_header_list
" stdint.h"
3773 as_fn_append ac_func_list
" isblank"
3774 as_fn_append ac_header_list
" xlocale.h"
3775 as_fn_append ac_func_list
" lstat"
3776 as_fn_append ac_header_list
" math.h"
3777 as_fn_append ac_func_list
" mbsinit"
3778 as_fn_append ac_func_list
" mbrtowc"
3779 as_fn_append ac_header_list
" sys/mman.h"
3780 as_fn_append ac_func_list
" mprotect"
3781 as_fn_append ac_func_list
" mkostemp"
3782 as_fn_append ac_func_list
" openat"
3783 as_fn_append ac_func_list
" pipe"
3784 as_fn_append ac_func_list
" readlink"
3785 as_fn_append ac_func_list
" link"
3786 as_fn_append ac_func_list
" setenv"
3787 as_fn_append ac_func_list
" strerror_r"
3788 as_fn_append ac_func_list
" __xpg_strerror_r"
3789 as_fn_append ac_func_list
" catgets"
3790 as_fn_append ac_func_list
" snprintf"
3791 as_fn_append ac_header_list
" strings.h"
3792 as_fn_append ac_header_list
" sys/random.h"
3793 as_fn_append ac_header_list
" sys/uio.h"
3794 as_fn_append ac_func_list
" localtime_r"
3795 as_fn_append ac_header_list
" crtdefs.h"
3796 as_fn_append ac_func_list
" iswcntrl"
3797 as_fn_append ac_header_list
" wctype.h"
3798 as_fn_append ac_func_list
" wmempcpy"
3799 # Check that the precious variables saved in the cache have kept the same
3801 ac_cache_corrupted
=false
3802 for ac_var
in $ac_precious_vars; do
3803 eval ac_old_set
=\
$ac_cv_env_${ac_var}_set
3804 eval ac_new_set
=\
$ac_env_${ac_var}_set
3805 eval ac_old_val
=\
$ac_cv_env_${ac_var}_value
3806 eval ac_new_val
=\
$ac_env_${ac_var}_value
3807 case $ac_old_set,$ac_new_set in
3809 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3810 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3811 ac_cache_corrupted
=: ;;
3813 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3814 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3815 ac_cache_corrupted
=: ;;
3818 if test "x$ac_old_val" != "x$ac_new_val"; then
3819 # differences in whitespace do not lead to failure.
3820 ac_old_val_w
=`echo x $ac_old_val`
3821 ac_new_val_w
=`echo x $ac_new_val`
3822 if test "$ac_old_val_w" != "$ac_new_val_w"; then
3823 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3824 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3825 ac_cache_corrupted
=:
3827 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3828 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3829 eval $ac_var=\
$ac_old_val
3831 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
3832 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
3833 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
3834 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
3837 # Pass precious variables to config.status.
3838 if test "$ac_new_set" = set; then
3840 *\'*) ac_arg
=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3841 *) ac_arg
=$ac_var=$ac_new_val ;;
3843 case " $ac_configure_args " in
3844 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
3845 *) as_fn_append ac_configure_args
" '$ac_arg'" ;;
3849 if $ac_cache_corrupted; then
3850 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3851 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3852 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3853 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3854 as_fn_error $?
"run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3856 ## -------------------- ##
3857 ## Main body of script. ##
3858 ## -------------------- ##
3861 ac_cpp
='$CPP $CPPFLAGS'
3862 ac_compile
='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3863 ac_link
='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3864 ac_compiler_gnu
=$ac_cv_c_compiler_gnu
3871 ac_config_headers
="$ac_config_headers config.h:config.in"
3876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
3877 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
3878 # Check whether --enable-maintainer-mode was given.
3879 if test "${enable_maintainer_mode+set}" = set; then :
3880 enableval
=$enable_maintainer_mode; USE_MAINTAINER_MODE
=$enableval
3882 USE_MAINTAINER_MODE
=no
3885 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
3886 $as_echo "$USE_MAINTAINER_MODE" >&6; }
3887 if test $USE_MAINTAINER_MODE = yes; then
3888 MAINTAINER_MODE_TRUE
=
3889 MAINTAINER_MODE_FALSE
='#'
3891 MAINTAINER_MODE_TRUE
='#'
3892 MAINTAINER_MODE_FALSE
=
3895 MAINT
=$MAINTAINER_MODE_TRUE
3900 ac_cpp
='$CPP $CPPFLAGS'
3901 ac_compile
='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3902 ac_link
='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3903 ac_compiler_gnu
=$ac_cv_c_compiler_gnu
3904 if test -n "$ac_tool_prefix"; then
3905 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
3906 set dummy
${ac_tool_prefix}gcc
; ac_word
=$2
3907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3908 $as_echo_n "checking for $ac_word... " >&6; }
3909 if ${ac_cv_prog_CC+:} false
; then :
3910 $as_echo_n "(cached) " >&6
3912 if test -n "$CC"; then
3913 ac_cv_prog_CC
="$CC" # Let the user override the test.
3915 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
3919 test -z "$as_dir" && as_dir
=.
3920 for ac_exec_ext
in '' $ac_executable_extensions; do
3921 if as_fn_executable_p
"$as_dir/$ac_word$ac_exec_ext"; then
3922 ac_cv_prog_CC
="${ac_tool_prefix}gcc"
3923 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3933 if test -n "$CC"; then
3934 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3935 $as_echo "$CC" >&6; }
3937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3938 $as_echo "no" >&6; }
3943 if test -z "$ac_cv_prog_CC"; then
3945 # Extract the first word of "gcc", so it can be a program name with args.
3946 set dummy gcc
; ac_word
=$2
3947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3948 $as_echo_n "checking for $ac_word... " >&6; }
3949 if ${ac_cv_prog_ac_ct_CC+:} false
; then :
3950 $as_echo_n "(cached) " >&6
3952 if test -n "$ac_ct_CC"; then
3953 ac_cv_prog_ac_ct_CC
="$ac_ct_CC" # Let the user override the test.
3955 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
3959 test -z "$as_dir" && as_dir
=.
3960 for ac_exec_ext
in '' $ac_executable_extensions; do
3961 if as_fn_executable_p
"$as_dir/$ac_word$ac_exec_ext"; then
3962 ac_cv_prog_ac_ct_CC
="gcc"
3963 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3972 ac_ct_CC
=$ac_cv_prog_ac_ct_CC
3973 if test -n "$ac_ct_CC"; then
3974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3975 $as_echo "$ac_ct_CC" >&6; }
3977 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3978 $as_echo "no" >&6; }
3981 if test "x$ac_ct_CC" = x
; then
3984 case $cross_compiling:$ac_tool_warned in
3986 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3987 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3988 ac_tool_warned
=yes ;;
3996 if test -z "$CC"; then
3997 if test -n "$ac_tool_prefix"; then
3998 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3999 set dummy
${ac_tool_prefix}cc
; ac_word
=$2
4000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4001 $as_echo_n "checking for $ac_word... " >&6; }
4002 if ${ac_cv_prog_CC+:} false
; then :
4003 $as_echo_n "(cached) " >&6
4005 if test -n "$CC"; then
4006 ac_cv_prog_CC
="$CC" # Let the user override the test.
4008 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
4012 test -z "$as_dir" && as_dir
=.
4013 for ac_exec_ext
in '' $ac_executable_extensions; do
4014 if as_fn_executable_p
"$as_dir/$ac_word$ac_exec_ext"; then
4015 ac_cv_prog_CC
="${ac_tool_prefix}cc"
4016 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4026 if test -n "$CC"; then
4027 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4028 $as_echo "$CC" >&6; }
4030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4031 $as_echo "no" >&6; }
4037 if test -z "$CC"; then
4038 # Extract the first word of "cc", so it can be a program name with args.
4039 set dummy cc
; ac_word
=$2
4040 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4041 $as_echo_n "checking for $ac_word... " >&6; }
4042 if ${ac_cv_prog_CC+:} false
; then :
4043 $as_echo_n "(cached) " >&6
4045 if test -n "$CC"; then
4046 ac_cv_prog_CC
="$CC" # Let the user override the test.
4049 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
4053 test -z "$as_dir" && as_dir
=.
4054 for ac_exec_ext
in '' $ac_executable_extensions; do
4055 if as_fn_executable_p
"$as_dir/$ac_word$ac_exec_ext"; then
4056 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
4057 ac_prog_rejected
=yes
4061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4068 if test $ac_prog_rejected = yes; then
4069 # We found a bogon in the path, so make sure we never use it.
4070 set dummy
$ac_cv_prog_CC
4072 if test $# != 0; then
4073 # We chose a different compiler from the bogus one.
4074 # However, it has the same basename, so the bogon will be chosen
4075 # first if we set CC to just the basename; use the full file name.
4077 ac_cv_prog_CC
="$as_dir/$ac_word${1+' '}$@"
4083 if test -n "$CC"; then
4084 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4085 $as_echo "$CC" >&6; }
4087 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4088 $as_echo "no" >&6; }
4093 if test -z "$CC"; then
4094 if test -n "$ac_tool_prefix"; then
4095 for ac_prog
in cl.exe
4097 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
4098 set dummy
$ac_tool_prefix$ac_prog; ac_word
=$2
4099 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4100 $as_echo_n "checking for $ac_word... " >&6; }
4101 if ${ac_cv_prog_CC+:} false
; then :
4102 $as_echo_n "(cached) " >&6
4104 if test -n "$CC"; then
4105 ac_cv_prog_CC
="$CC" # Let the user override the test.
4107 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
4111 test -z "$as_dir" && as_dir
=.
4112 for ac_exec_ext
in '' $ac_executable_extensions; do
4113 if as_fn_executable_p
"$as_dir/$ac_word$ac_exec_ext"; then
4114 ac_cv_prog_CC
="$ac_tool_prefix$ac_prog"
4115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4125 if test -n "$CC"; then
4126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4127 $as_echo "$CC" >&6; }
4129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4130 $as_echo "no" >&6; }
4134 test -n "$CC" && break
4137 if test -z "$CC"; then
4139 for ac_prog
in cl.exe
4141 # Extract the first word of "$ac_prog", so it can be a program name with args.
4142 set dummy
$ac_prog; ac_word
=$2
4143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4144 $as_echo_n "checking for $ac_word... " >&6; }
4145 if ${ac_cv_prog_ac_ct_CC+:} false
; then :
4146 $as_echo_n "(cached) " >&6
4148 if test -n "$ac_ct_CC"; then
4149 ac_cv_prog_ac_ct_CC
="$ac_ct_CC" # Let the user override the test.
4151 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
4155 test -z "$as_dir" && as_dir
=.
4156 for ac_exec_ext
in '' $ac_executable_extensions; do
4157 if as_fn_executable_p
"$as_dir/$ac_word$ac_exec_ext"; then
4158 ac_cv_prog_ac_ct_CC
="$ac_prog"
4159 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4168 ac_ct_CC
=$ac_cv_prog_ac_ct_CC
4169 if test -n "$ac_ct_CC"; then
4170 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4171 $as_echo "$ac_ct_CC" >&6; }
4173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4174 $as_echo "no" >&6; }
4178 test -n "$ac_ct_CC" && break
4181 if test "x$ac_ct_CC" = x
; then
4184 case $cross_compiling:$ac_tool_warned in
4186 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4187 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4188 ac_tool_warned
=yes ;;
4195 if test -z "$CC"; then
4196 if test -n "$ac_tool_prefix"; then
4197 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args.
4198 set dummy
${ac_tool_prefix}clang
; ac_word
=$2
4199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4200 $as_echo_n "checking for $ac_word... " >&6; }
4201 if ${ac_cv_prog_CC+:} false
; then :
4202 $as_echo_n "(cached) " >&6
4204 if test -n "$CC"; then
4205 ac_cv_prog_CC
="$CC" # Let the user override the test.
4207 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
4211 test -z "$as_dir" && as_dir
=.
4212 for ac_exec_ext
in '' $ac_executable_extensions; do
4213 if as_fn_executable_p
"$as_dir/$ac_word$ac_exec_ext"; then
4214 ac_cv_prog_CC
="${ac_tool_prefix}clang"
4215 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4225 if test -n "$CC"; then
4226 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
4227 $as_echo "$CC" >&6; }
4229 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4230 $as_echo "no" >&6; }
4235 if test -z "$ac_cv_prog_CC"; then
4237 # Extract the first word of "clang", so it can be a program name with args.
4238 set dummy clang
; ac_word
=$2
4239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
4240 $as_echo_n "checking for $ac_word... " >&6; }
4241 if ${ac_cv_prog_ac_ct_CC+:} false
; then :
4242 $as_echo_n "(cached) " >&6
4244 if test -n "$ac_ct_CC"; then
4245 ac_cv_prog_ac_ct_CC
="$ac_ct_CC" # Let the user override the test.
4247 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
4251 test -z "$as_dir" && as_dir
=.
4252 for ac_exec_ext
in '' $ac_executable_extensions; do
4253 if as_fn_executable_p
"$as_dir/$ac_word$ac_exec_ext"; then
4254 ac_cv_prog_ac_ct_CC
="clang"
4255 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
4264 ac_ct_CC
=$ac_cv_prog_ac_ct_CC
4265 if test -n "$ac_ct_CC"; then
4266 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
4267 $as_echo "$ac_ct_CC" >&6; }
4269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4270 $as_echo "no" >&6; }
4273 if test "x$ac_ct_CC" = x
; then
4276 case $cross_compiling:$ac_tool_warned in
4278 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
4279 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
4280 ac_tool_warned
=yes ;;
4291 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4292 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4293 as_fn_error $?
"no acceptable C compiler found in \$PATH
4294 See \`config.log' for more details" "$LINENO" 5; }
4296 # Provide some information about the compiler.
4297 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
4300 for ac_option
in --version -v -V -qversion -version; do
4301 { { ac_try
="$ac_compiler $ac_option >&5"
4303 *\"* |
*\
`* | *\\*) ac_try_echo=\$ac_try;;
4304 *) ac_try_echo=$ac_try;;
4306 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4307 $as_echo "$ac_try_echo"; } >&5
4308 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
4310 if test -s conftest.err; then
4312 ... rest of stderr output deleted ...
4313 10q' conftest.err >conftest.er1
4314 cat conftest.er1 >&5
4316 rm -f conftest.er1 conftest.err
4317 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4318 test $ac_status = 0; }
4321 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4322 /* end confdefs.h. */
4332 ac_clean_files_save=$ac_clean_files
4333 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
4334 # Try to create an executable without -o first, disregard a.out.
4335 # It will help us diagnose broken compilers, and finding out an intuition
4337 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
4338 $as_echo_n "checking whether the C compiler works... " >&6; }
4339 ac_link_default=`$as_echo "$ac_link" |
sed 's/ -o *conftest[^ ]*//'`
4341 # The possible output files:
4342 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
4345 for ac_file in $ac_files
4348 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
4349 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
4354 if { { ac_try="$ac_link_default"
4356 *\"* | *\`* |
*\\*) ac_try_echo
=\
$ac_try;;
4357 *) ac_try_echo
=$ac_try;;
4359 eval ac_try_echo
="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4360 $as_echo "$ac_try_echo"; } >&5
4361 (eval "$ac_link_default") 2>&5
4363 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4364 test $ac_status = 0; }; then :
4365 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
4366 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
4367 # in a Makefile. We should not override ac_cv_exeext if it was cached,
4368 # so that the user can short-circuit this test for compilers unknown to
4370 for ac_file
in $ac_files ''
4372 test -f "$ac_file" ||
continue
4374 *.
$ac_ext |
*.xcoff |
*.tds |
*.d |
*.pdb |
*.xSYM |
*.bb |
*.bbg |
*.map |
*.inf |
*.dSYM |
*.o |
*.obj
)
4377 # We found the default executable, but exeext='' is most
4381 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no
;
4383 ac_cv_exeext
=`expr "$ac_file" : '[^.]*\(\..*\)'`
4385 # We set ac_cv_exeext here because the later test for it is not
4386 # safe: cross compilers may not add the suffix if given an `-o'
4387 # argument, so we may need to know it at that point already.
4388 # Even if this section looks crufty: it has the advantage of
4395 test "$ac_cv_exeext" = no
&& ac_cv_exeext
=
4400 if test -z "$ac_file"; then :
4401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
4402 $as_echo "no" >&6; }
4403 $as_echo "$as_me: failed program was:" >&5
4404 sed 's/^/| /' conftest.
$ac_ext >&5
4406 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4407 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4408 as_fn_error
77 "C compiler cannot create executables
4409 See \`config.log' for more details" "$LINENO" 5; }
4411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
4412 $as_echo "yes" >&6; }
4414 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
4415 $as_echo_n "checking for C compiler default output file name... " >&6; }
4416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
4417 $as_echo "$ac_file" >&6; }
4418 ac_exeext
=$ac_cv_exeext
4420 rm -f -r a.out a.out.dSYM a.exe conftest
$ac_cv_exeext b.out
4421 ac_clean_files
=$ac_clean_files_save
4422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
4423 $as_echo_n "checking for suffix of executables... " >&6; }
4424 if { { ac_try
="$ac_link"
4426 *\"* |
*\
`* | *\\*) ac_try_echo=\$ac_try;;
4427 *) ac_try_echo=$ac_try;;
4429 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4430 $as_echo "$ac_try_echo"; } >&5
4431 (eval "$ac_link") 2>&5
4433 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4434 test $ac_status = 0; }; then :
4435 # If both `conftest.exe
' and `conftest' are
`present' (well, observable)
4436 # catch `conftest.exe
'. For instance with Cygwin, `ls conftest' will
4437 # work properly (i.e., refer to `conftest.exe'), while it won't with
4439 for ac_file
in conftest.exe conftest conftest.
*; do
4440 test -f "$ac_file" ||
continue
4442 *.
$ac_ext |
*.xcoff |
*.tds |
*.d |
*.pdb |
*.xSYM |
*.bb |
*.bbg |
*.map |
*.inf |
*.dSYM |
*.o |
*.obj
) ;;
4443 *.
* ) ac_cv_exeext
=`expr "$ac_file" : '[^.]*\(\..*\)'`
4449 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4450 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4451 as_fn_error $?
"cannot compute suffix of executables: cannot compile and link
4452 See \`config.log' for more details" "$LINENO" 5; }
4454 rm -f conftest conftest
$ac_cv_exeext
4455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
4456 $as_echo "$ac_cv_exeext" >&6; }
4458 rm -f conftest.
$ac_ext
4459 EXEEXT
=$ac_cv_exeext
4461 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
4462 /* end confdefs.h. */
4467 FILE *f = fopen ("conftest.out", "w");
4468 return ferror (f) || fclose (f) != 0;
4474 ac_clean_files
="$ac_clean_files conftest.out"
4475 # Check that the compiler produces executables we can run. If not, either
4476 # the compiler is broken, or we cross compile.
4477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
4478 $as_echo_n "checking whether we are cross compiling... " >&6; }
4479 if test "$cross_compiling" != yes; then
4480 { { ac_try
="$ac_link"
4482 *\"* |
*\
`* | *\\*) ac_try_echo=\$ac_try;;
4483 *) ac_try_echo=$ac_try;;
4485 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4486 $as_echo "$ac_try_echo"; } >&5
4487 (eval "$ac_link") 2>&5
4489 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4490 test $ac_status = 0; }
4491 if { ac_try='./conftest$ac_cv_exeext'
4492 { { case "(($ac_try" in
4493 *\"* | *\`* |
*\\*) ac_try_echo
=\
$ac_try;;
4494 *) ac_try_echo
=$ac_try;;
4496 eval ac_try_echo
="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4497 $as_echo "$ac_try_echo"; } >&5
4498 (eval "$ac_try") 2>&5
4500 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4501 test $ac_status = 0; }; }; then
4504 if test "$cross_compiling" = maybe
; then
4507 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4508 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4509 as_fn_error $?
"cannot run C compiled programs.
4510 If you meant to cross compile, use \`--host'.
4511 See \`config.log' for more details" "$LINENO" 5; }
4515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
4516 $as_echo "$cross_compiling" >&6; }
4518 rm -f conftest.
$ac_ext conftest
$ac_cv_exeext conftest.out
4519 ac_clean_files
=$ac_clean_files_save
4520 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
4521 $as_echo_n "checking for suffix of object files... " >&6; }
4522 if ${ac_cv_objext+:} false
; then :
4523 $as_echo_n "(cached) " >&6
4525 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
4526 /* end confdefs.h. */
4536 rm -f conftest.o conftest.obj
4537 if { { ac_try
="$ac_compile"
4539 *\"* |
*\
`* | *\\*) ac_try_echo=\$ac_try;;
4540 *) ac_try_echo=$ac_try;;
4542 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
4543 $as_echo "$ac_try_echo"; } >&5
4544 (eval "$ac_compile") 2>&5
4546 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
4547 test $ac_status = 0; }; then :
4548 for ac_file in conftest.o conftest.obj conftest.*; do
4549 test -f "$ac_file" || continue;
4551 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
4552 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
4557 $as_echo "$as_me: failed program was:" >&5
4558 sed 's/^/| /' conftest.$ac_ext >&5
4560 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4561 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4562 as_fn_error $? "cannot compute suffix of object files
: cannot compile
4563 See \
`config.log' for more details" "$LINENO" 5; }
4565 rm -f conftest.$ac_cv_objext conftest.$ac_ext
4567 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
4568 $as_echo "$ac_cv_objext" >&6; }
4569 OBJEXT=$ac_cv_objext
4571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
4572 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
4573 if ${ac_cv_c_compiler_gnu+:} false; then :
4574 $as_echo_n "(cached) " >&6
4576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4577 /* end confdefs.h. */
4590 if ac_fn_c_try_compile "$LINENO"; then :
4595 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4596 ac_cv_c_compiler_gnu=$ac_compiler_gnu
4599 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
4600 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
4601 if test $ac_compiler_gnu = yes; then
4606 ac_test_CFLAGS=${CFLAGS+set}
4607 ac_save_CFLAGS=$CFLAGS
4608 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
4609 $as_echo_n "checking whether $CC accepts -g... " >&6; }
4610 if ${ac_cv_prog_cc_g+:} false; then :
4611 $as_echo_n "(cached) " >&6
4613 ac_save_c_werror_flag=$ac_c_werror_flag
4614 ac_c_werror_flag=yes
4617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4618 /* end confdefs.h. */
4628 if ac_fn_c_try_compile "$LINENO"; then :
4632 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4633 /* end confdefs.h. */
4643 if ac_fn_c_try_compile "$LINENO"; then :
4646 ac_c_werror_flag=$ac_save_c_werror_flag
4648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4649 /* end confdefs.h. */
4659 if ac_fn_c_try_compile "$LINENO"; then :
4662 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4664 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4666 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4667 ac_c_werror_flag=$ac_save_c_werror_flag
4669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
4670 $as_echo "$ac_cv_prog_cc_g" >&6; }
4671 if test "$ac_test_CFLAGS" = set; then
4672 CFLAGS=$ac_save_CFLAGS
4673 elif test $ac_cv_prog_cc_g = yes; then
4674 if test "$GCC" = yes; then
4680 if test "$GCC" = yes; then
4686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5
4687 $as_echo_n "checking for $CC option to enable C11 features... " >&6; }
4688 if ${ac_cv_prog_cc_c11+:} false; then :
4689 $as_echo_n "(cached) " >&6
4691 ac_cv_prog_cc_c11=no
4693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4694 /* end confdefs.h. */
4696 #include <stdbool.h>
4702 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4703 #define debug(...) fprintf (stderr, __VA_ARGS__)
4704 #define showlist(...) puts (#__VA_ARGS__)
4705 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4707 test_varargs_macros (void)
4712 debug ("X = %d\n", x);
4713 showlist (The first, second, and third items.);
4714 report (x>y, "x is %d but y is %d", x, y);
4717 // Check long long types.
4718 #define BIG64 18446744073709551615ull
4719 #define BIG32 4294967295ul
4720 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4722 your preprocessor is broken;
4726 your preprocessor is broken;
4728 static long long int bignum = -9223372036854775807LL;
4729 static unsigned long long int ubignum = BIG64;
4731 struct incomplete_array
4739 const wchar_t *name;
4743 typedef const char *ccp;
4746 test_restrict (ccp restrict text)
4748 // See if C++-style comments work.
4749 // Iterate through items via the restricted pointer.
4750 // Also check for declarations in for loops.
4751 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4756 // Check varargs and va_copy.
4758 test_varargs (const char *format, ...)
4761 va_start (args, format);
4763 va_copy (args_copy, args);
4765 const char *str = "";
4774 str = va_arg (args_copy, const char *);
4777 number = va_arg (args_copy, int);
4780 fnumber = va_arg (args_copy, double);
4789 return *str && number && fnumber;
4792 char _Alignas (double) aligned_as_double;
4793 char _Alignas (0) no_special_alignment;
4794 extern char aligned_as_int;
4795 char _Alignas (0) _Alignas (int) aligned_as_int;
4800 int_alignment = _Alignof (int),
4801 int_array_alignment = _Alignof (int[100]),
4802 char_alignment = _Alignof (char)
4804 _Static_assert (0 < -_Alignof (int), "_Alignof is signed");
4807 int _Noreturn does_not_return (void) { for (;;) continue; }
4809 // Check _Static_assert.
4810 struct test_static_assert
4813 _Static_assert (sizeof (int) <= sizeof (long int),
4814 "_Static_assert does not work in struct");
4818 // Check UTF-8 literals.
4819 #define u8 syntax error!
4820 char const utf8_literal[] = u8"happens to be ASCII" "another string";
4822 // Check duplicate typedefs.
4823 typedef long *long_ptr;
4824 typedef long int *long_ptr;
4825 typedef long_ptr long_ptr;
4827 // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1.
4831 struct { int i; int j; };
4832 struct { int k; long int l; } w;
4842 _Bool success = false;
4845 if (test_restrict ("String literal") == 0)
4847 char *restrict newvar = "Another string";
4850 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
4851 test_varargs_macros ();
4853 // Check flexible array members.
4854 struct incomplete_array *ia =
4855 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
4857 for (int i = 0; i < ia->datasize; ++i)
4858 ia->data[i] = i * 1.234;
4860 // Check named initializers.
4861 struct named_init ni = {
4863 .name = L"Test wide string",
4864 .average = 543.34343,
4869 int dynamic_array[ni.number];
4870 dynamic_array[ni.number - 1] = 543;
4872 // work around unused variable warnings
4873 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
4874 || dynamic_array[ni.number - 1] != 543);
4878 _Static_assert ((offsetof (struct anonymous, i)
4879 == offsetof (struct anonymous, w.k)),
4880 "Anonymous union alignment botch");
4886 for ac_arg in '' -std=gnu11
4888 CC="$ac_save_CC $ac_arg"
4889 if ac_fn_c_try_compile "$LINENO"; then :
4890 ac_cv_prog_cc_c11=$ac_arg
4892 rm -f core conftest.err conftest.$ac_objext
4893 test "x$ac_cv_prog_cc_c11" != "xno" && break
4895 rm -f conftest.$ac_ext
4900 ac_prog_cc_stdc_options=
4901 case "x$ac_cv_prog_cc_c11" in
4903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
4904 $as_echo "none needed" >&6; } ;;
4906 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
4907 $as_echo "unsupported" >&6; } ;;
4909 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11"
4910 CC=$CC$ac_prog_cc_stdc_options
4911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5
4912 $as_echo "$ac_cv_prog_cc_c11" >&6; } ;;
4914 if test "x$ac_cv_prog_cc_c11" != xno; then :
4916 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11
4918 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5
4919 $as_echo_n "checking for $CC option to enable C99 features... " >&6; }
4920 if ${ac_cv_prog_cc_c99+:} false; then :
4921 $as_echo_n "(cached) " >&6
4923 ac_cv_prog_cc_c99=no
4925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4926 /* end confdefs.h. */
4928 #include <stdbool.h>
4934 // Check varargs macros. These examples are taken from C99 6.10.3.5.
4935 #define debug(...) fprintf (stderr, __VA_ARGS__)
4936 #define showlist(...) puts (#__VA_ARGS__)
4937 #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__))
4939 test_varargs_macros (void)
4944 debug ("X = %d\n", x);
4945 showlist (The first, second, and third items.);
4946 report (x>y, "x is %d but y is %d", x, y);
4949 // Check long long types.
4950 #define BIG64 18446744073709551615ull
4951 #define BIG32 4294967295ul
4952 #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0)
4954 your preprocessor is broken;
4958 your preprocessor is broken;
4960 static long long int bignum = -9223372036854775807LL;
4961 static unsigned long long int ubignum = BIG64;
4963 struct incomplete_array
4971 const wchar_t *name;
4975 typedef const char *ccp;
4978 test_restrict (ccp restrict text)
4980 // See if C++-style comments work.
4981 // Iterate through items via the restricted pointer.
4982 // Also check for declarations in for loops.
4983 for (unsigned int i = 0; *(text+i) != '\0'; ++i)
4988 // Check varargs and va_copy.
4990 test_varargs (const char *format, ...)
4993 va_start (args, format);
4995 va_copy (args_copy, args);
4997 const char *str = "";
5006 str = va_arg (args_copy, const char *);
5009 number = va_arg (args_copy, int);
5012 fnumber = va_arg (args_copy, double);
5021 return *str && number && fnumber;
5028 _Bool success = false;
5031 if (test_restrict ("String literal") == 0)
5033 char *restrict newvar = "Another string";
5036 success &= test_varargs ("s, d' f .", "string", 65, 34.234);
5037 test_varargs_macros ();
5039 // Check flexible array members.
5040 struct incomplete_array *ia =
5041 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10));
5043 for (int i = 0; i < ia->datasize; ++i)
5044 ia->data[i] = i * 1.234;
5046 // Check named initializers.
5047 struct named_init ni = {
5049 .name = L"Test wide string",
5050 .average = 543.34343,
5055 int dynamic_array[ni.number];
5056 dynamic_array[ni.number - 1] = 543;
5058 // work around unused variable warnings
5059 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x'
5060 || dynamic_array[ni.number - 1] != 543);
5066 for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99
5068 CC="$ac_save_CC $ac_arg"
5069 if ac_fn_c_try_compile "$LINENO"; then :
5070 ac_cv_prog_cc_c99=$ac_arg
5072 rm -f core conftest.err conftest.$ac_objext
5073 test "x$ac_cv_prog_cc_c99" != "xno" && break
5075 rm -f conftest.$ac_ext
5080 ac_prog_cc_stdc_options=
5081 case "x$ac_cv_prog_cc_c99" in
5083 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5084 $as_echo "none needed" >&6; } ;;
5086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5087 $as_echo "unsupported" >&6; } ;;
5089 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99"
5090 CC=$CC$ac_prog_cc_stdc_options
5091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5
5092 $as_echo "$ac_cv_prog_cc_c99" >&6; } ;;
5094 if test "x$ac_cv_prog_cc_c99" != xno; then :
5096 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99
5098 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5
5099 $as_echo_n "checking for $CC option to enable C89 features... " >&6; }
5100 if ${ac_cv_prog_cc_c89+:} false; then :
5101 $as_echo_n "(cached) " >&6
5103 ac_cv_prog_cc_c89=no
5105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5106 /* end confdefs.h. */
5110 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
5111 struct buf { int x; };
5112 FILE * (*rcsopen) (struct buf *, struct stat *, int);
5113 static char *e (p, i)
5119 static char *f (char * (*g) (char **, int), char **p, ...)
5124 s = g (p, va_arg (v,int));
5129 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
5130 function prototypes and stuff, but not '\xHH' hex character constants.
5131 These don't provoke an error unfortunately, instead are silently treated
5132 as 'x'. The following induces an error, until -std is added to get
5133 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
5134 array size at least. It's necessary to write '\x00'==0 to get something
5135 that's true only with -std. */
5136 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
5138 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
5139 inside strings and character constants. */
5141 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
5143 int test (int i, double x);
5144 struct s1 {int (*f) (int a);};
5145 struct s2 {int (*f) (double a);};
5146 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
5152 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5157 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
5158 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
5160 CC="$ac_save_CC $ac_arg"
5161 if ac_fn_c_try_compile "$LINENO"; then :
5162 ac_cv_prog_cc_c89=$ac_arg
5164 rm -f core conftest.err conftest.$ac_objext
5165 test "x$ac_cv_prog_cc_c89" != "xno" && break
5167 rm -f conftest.$ac_ext
5172 ac_prog_cc_stdc_options=
5173 case "x$ac_cv_prog_cc_c89" in
5175 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5176 $as_echo "none needed" >&6; } ;;
5178 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
5179 $as_echo "unsupported" >&6; } ;;
5181 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89"
5182 CC=$CC$ac_prog_cc_stdc_options
5183 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
5184 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
5186 if test "x$ac_cv_prog_cc_c89" != xno; then :
5188 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89
5191 ac_cv_prog_cc_stdc=no
5199 ac_cpp='$CPP $CPPFLAGS'
5200 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5201 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5202 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5205 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5
5206 $as_echo_n "checking whether the compiler is clang... " >&6; }
5207 if ${gl_cv_compiler_clang+:} false; then :
5208 $as_echo_n "(cached) " >&6
5210 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5211 /* end confdefs.h. */
5226 if ac_fn_c_try_compile "$LINENO"; then :
5227 gl_cv_compiler_clang=no
5229 gl_cv_compiler_clang=yes
5231 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5234 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5
5235 $as_echo "$gl_cv_compiler_clang" >&6; }
5238 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5
5239 $as_echo_n "checking for compiler option needed when checking for declarations... " >&6; }
5240 if ${gl_cv_compiler_check_decl_option+:} false; then :
5241 $as_echo_n "(cached) " >&6
5243 if test $gl_cv_compiler_clang = yes; then
5244 save_ac_compile="$ac_compile"
5245 ac_compile="$ac_compile -Werror=implicit-function-declaration"
5246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5247 /* end confdefs.h. */
5257 if ac_fn_c_try_compile "$LINENO"; then :
5258 gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration'
5260 gl_cv_compiler_check_decl_option=none
5262 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5263 ac_compile="$save_ac_compile"
5265 gl_cv_compiler_check_decl_option=none
5269 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5
5270 $as_echo "$gl_cv_compiler_check_decl_option" >&6; }
5271 if test "x$gl_cv_compiler_check_decl_option" != xnone; then
5272 ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option"
5274 ac_compile_for_check_decl="$ac_compile"
5281 ac_cpp='$CPP $CPPFLAGS'
5282 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5283 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5284 ac_compiler_gnu=$ac_cv_c_compiler_gnu
5285 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
5286 $as_echo_n "checking how to run the C preprocessor... " >&6; }
5287 # On Suns, sometimes $CPP names a directory.
5288 if test -n "$CPP" && test -d "$CPP"; then
5291 if test -z "$CPP"; then
5292 if ${ac_cv_prog_CPP+:} false; then :
5293 $as_echo_n "(cached) " >&6
5295 # Double quotes because CPP needs to be expanded
5296 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
5299 for ac_c_preproc_warn_flag in '' yes
5301 # Use a header file that comes with gcc, so configuring glibc
5302 # with a fresh cross-compiler works.
5303 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5304 # <limits.h> exists even on freestanding compilers.
5305 # On the NeXT, cc -E runs the code through the compiler's parser,
5306 # not just through cpp. "Syntax error" is here to catch this case.
5307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5308 /* end confdefs.h. */
5310 # include <limits.h>
5312 # include <assert.h>
5316 if ac_fn_c_try_cpp "$LINENO"; then :
5319 # Broken: fails on valid input.
5322 rm -f conftest.err conftest.i conftest.$ac_ext
5324 # OK, works on sane cases. Now check whether nonexistent headers
5325 # can be detected and how.
5326 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5327 /* end confdefs.h. */
5328 #include <ac_nonexistent.h>
5330 if ac_fn_c_try_cpp "$LINENO"; then :
5331 # Broken: success on invalid input.
5334 # Passes both tests.
5338 rm -f conftest.err conftest.i conftest.$ac_ext
5341 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5342 rm -f conftest.i conftest.err conftest.
$ac_ext
5343 if $ac_preproc_ok; then :
5355 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
5356 $as_echo "$CPP" >&6; }
5358 for ac_c_preproc_warn_flag
in '' yes
5360 # Use a header file that comes with gcc, so configuring glibc
5361 # with a fresh cross-compiler works.
5362 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
5363 # <limits.h> exists even on freestanding compilers.
5364 # On the NeXT, cc -E runs the code through the compiler's parser,
5365 # not just through cpp. "Syntax error" is here to catch this case.
5366 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
5367 /* end confdefs.h. */
5369 # include <limits.h>
5371 # include <assert.h>
5375 if ac_fn_c_try_cpp
"$LINENO"; then :
5378 # Broken: fails on valid input.
5381 rm -f conftest.err conftest.i conftest.
$ac_ext
5383 # OK, works on sane cases. Now check whether nonexistent headers
5384 # can be detected and how.
5385 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
5386 /* end confdefs.h. */
5387 #include <ac_nonexistent.h>
5389 if ac_fn_c_try_cpp
"$LINENO"; then :
5390 # Broken: success on invalid input.
5393 # Passes both tests.
5397 rm -f conftest.err conftest.i conftest.
$ac_ext
5400 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
5401 rm -f conftest.i conftest.err conftest.
$ac_ext
5402 if $ac_preproc_ok; then :
5405 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
5406 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
5407 as_fn_error $?
"C preprocessor \"$CPP\" fails sanity check
5408 See \`config.log' for more details" "$LINENO" 5; }
5412 ac_cpp
='$CPP $CPPFLAGS'
5413 ac_compile
='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5414 ac_link
='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5415 ac_compiler_gnu
=$ac_cv_c_compiler_gnu
5418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
5419 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
5420 if ${ac_cv_path_GREP+:} false
; then :
5421 $as_echo_n "(cached) " >&6
5423 if test -z "$GREP"; then
5424 ac_path_GREP_found
=false
5425 # Loop through the user's path and test for each of PROGNAME-LIST
5426 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
5427 for as_dir
in $PATH$PATH_SEPARATOR/usr
/xpg
4/bin
5430 test -z "$as_dir" && as_dir
=.
5431 for ac_prog
in grep ggrep
; do
5432 for ac_exec_ext
in '' $ac_executable_extensions; do
5433 ac_path_GREP
="$as_dir/$ac_prog$ac_exec_ext"
5434 as_fn_executable_p
"$ac_path_GREP" ||
continue
5435 # Check for GNU ac_path_GREP and select it if it is found.
5436 # Check for GNU $ac_path_GREP
5437 case `"$ac_path_GREP" --version 2>&1` in
5439 ac_cv_path_GREP
="$ac_path_GREP" ac_path_GREP_found
=:;;
5442 $as_echo_n 0123456789 >"conftest.in"
5445 cat "conftest.in" "conftest.in" >"conftest.tmp"
5446 mv "conftest.tmp" "conftest.in"
5447 cp "conftest.in" "conftest.nl"
5448 $as_echo 'GREP' >> "conftest.nl"
5449 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev
/null ||
break
5450 diff "conftest.out" "conftest.nl" >/dev
/null
2>&1 ||
break
5451 as_fn_arith
$ac_count + 1 && ac_count
=$as_val
5452 if test $ac_count -gt ${ac_path_GREP_max-0}; then
5453 # Best one so far, save it but keep looking for a better one
5454 ac_cv_path_GREP
="$ac_path_GREP"
5455 ac_path_GREP_max
=$ac_count
5457 # 10*(2^10) chars as input seems more than enough
5458 test $ac_count -gt 10 && break
5460 rm -f conftest.
in conftest.tmp conftest.
nl conftest.out
;;
5463 $ac_path_GREP_found && break 3
5468 if test -z "$ac_cv_path_GREP"; then
5469 as_fn_error $?
"no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5472 ac_cv_path_GREP
=$GREP
5476 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
5477 $as_echo "$ac_cv_path_GREP" >&6; }
5478 GREP
="$ac_cv_path_GREP"
5481 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
5482 $as_echo_n "checking for egrep... " >&6; }
5483 if ${ac_cv_path_EGREP+:} false
; then :
5484 $as_echo_n "(cached) " >&6
5486 if echo a |
$GREP -E '(a|b)' >/dev
/null
2>&1
5487 then ac_cv_path_EGREP
="$GREP -E"
5489 if test -z "$EGREP"; then
5490 ac_path_EGREP_found
=false
5491 # Loop through the user's path and test for each of PROGNAME-LIST
5492 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
5493 for as_dir
in $PATH$PATH_SEPARATOR/usr
/xpg
4/bin
5496 test -z "$as_dir" && as_dir
=.
5497 for ac_prog
in egrep; do
5498 for ac_exec_ext
in '' $ac_executable_extensions; do
5499 ac_path_EGREP
="$as_dir/$ac_prog$ac_exec_ext"
5500 as_fn_executable_p
"$ac_path_EGREP" ||
continue
5501 # Check for GNU ac_path_EGREP and select it if it is found.
5502 # Check for GNU $ac_path_EGREP
5503 case `"$ac_path_EGREP" --version 2>&1` in
5505 ac_cv_path_EGREP
="$ac_path_EGREP" ac_path_EGREP_found
=:;;
5508 $as_echo_n 0123456789 >"conftest.in"
5511 cat "conftest.in" "conftest.in" >"conftest.tmp"
5512 mv "conftest.tmp" "conftest.in"
5513 cp "conftest.in" "conftest.nl"
5514 $as_echo 'EGREP' >> "conftest.nl"
5515 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev
/null ||
break
5516 diff "conftest.out" "conftest.nl" >/dev
/null
2>&1 ||
break
5517 as_fn_arith
$ac_count + 1 && ac_count
=$as_val
5518 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
5519 # Best one so far, save it but keep looking for a better one
5520 ac_cv_path_EGREP
="$ac_path_EGREP"
5521 ac_path_EGREP_max
=$ac_count
5523 # 10*(2^10) chars as input seems more than enough
5524 test $ac_count -gt 10 && break
5526 rm -f conftest.
in conftest.tmp conftest.
nl conftest.out
;;
5529 $ac_path_EGREP_found && break 3
5534 if test -z "$ac_cv_path_EGREP"; then
5535 as_fn_error $?
"no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
5538 ac_cv_path_EGREP
=$EGREP
5543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
5544 $as_echo "$ac_cv_path_EGREP" >&6; }
5545 EGREP
="$ac_cv_path_EGREP"
5548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
5549 $as_echo_n "checking for ANSI C header files... " >&6; }
5550 if ${ac_cv_header_stdc+:} false
; then :
5551 $as_echo_n "(cached) " >&6
5553 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
5554 /* end confdefs.h. */
5568 if ac_fn_c_try_compile
"$LINENO"; then :
5569 ac_cv_header_stdc
=yes
5571 ac_cv_header_stdc
=no
5573 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
5575 if test $ac_cv_header_stdc = yes; then
5576 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5577 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
5578 /* end confdefs.h. */
5582 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5583 $EGREP "memchr" >/dev
/null
2>&1; then :
5586 ac_cv_header_stdc
=no
5592 if test $ac_cv_header_stdc = yes; then
5593 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5594 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
5595 /* end confdefs.h. */
5599 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5600 $EGREP "free" >/dev
/null
2>&1; then :
5603 ac_cv_header_stdc
=no
5609 if test $ac_cv_header_stdc = yes; then
5610 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5611 if test "$cross_compiling" = yes; then :
5614 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
5615 /* end confdefs.h. */
5618 #if ((' ' & 0x0FF) == 0x020)
5619 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5620 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5622 # define ISLOWER(c) \
5623 (('a' <= (c) && (c) <= 'i') \
5624 || ('j' <= (c) && (c) <= 'r') \
5625 || ('s' <= (c) && (c) <= 'z'))
5626 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5629 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5634 for (i = 0; i < 256; i++)
5635 if (XOR (islower (i), ISLOWER (i))
5636 || toupper (i) != TOUPPER (i))
5641 if ac_fn_c_try_run
"$LINENO"; then :
5644 ac_cv_header_stdc
=no
5646 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
5647 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
5652 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
5653 $as_echo "$ac_cv_header_stdc" >&6; }
5654 if test $ac_cv_header_stdc = yes; then
5656 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
5660 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
5661 for ac_header
in sys
/types.h sys
/stat.h stdlib.h string.h memory.h
strings.h \
5662 inttypes.h stdint.h unistd.h
5664 as_ac_Header
=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5665 ac_fn_c_check_header_compile
"$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5667 if eval test \"x\$
"$as_ac_Header"\" = x
"yes"; then :
5668 cat >>confdefs.h
<<_ACEOF
5669 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5680 for ac_header
in $ac_header_list
5682 as_ac_Header
=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
5683 ac_fn_c_check_header_compile
"$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
5685 if eval test \"x\$
"$as_ac_Header"\" = x
"yes"; then :
5686 cat >>confdefs.h
<<_ACEOF
5687 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
5702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
5703 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
5704 if ${ac_cv_safe_to_define___extensions__+:} false
; then :
5705 $as_echo_n "(cached) " >&6
5707 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
5708 /* end confdefs.h. */
5710 # define __EXTENSIONS__ 1
5711 $ac_includes_default
5720 if ac_fn_c_try_compile
"$LINENO"; then :
5721 ac_cv_safe_to_define___extensions__
=yes
5723 ac_cv_safe_to_define___extensions__
=no
5725 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
5727 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
5728 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
5730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5
5731 $as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; }
5732 if ${ac_cv_should_define__xopen_source+:} false
; then :
5733 $as_echo_n "(cached) " >&6
5735 ac_cv_should_define__xopen_source
=no
5736 if test $ac_cv_header_wchar_h = yes; then :
5737 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
5738 /* end confdefs.h. */
5750 if ac_fn_c_try_compile
"$LINENO"; then :
5753 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
5754 /* end confdefs.h. */
5756 #define _XOPEN_SOURCE 500
5767 if ac_fn_c_try_compile
"$LINENO"; then :
5768 ac_cv_should_define__xopen_source
=yes
5770 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
5772 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
5775 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5
5776 $as_echo "$ac_cv_should_define__xopen_source" >&6; }
5778 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
5780 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h
5782 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
5784 $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h
5786 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h
5788 $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h
5790 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
5792 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h
5794 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h
5796 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h
5798 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h
5800 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h
5802 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h
5804 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h
5806 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
5808 if test $ac_cv_header_minix_config_h = yes; then :
5810 $as_echo "#define _MINIX 1" >>confdefs.h
5812 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
5814 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
5819 if test $ac_cv_safe_to_define___extensions__ = yes; then :
5820 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
5823 if test $ac_cv_should_define__xopen_source = yes; then :
5824 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h
5828 # Needs to run before gl_EARLY so it can override AC_SYS_LARGEFILE included
5831 for ac_dir
in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
5832 if test -f "$ac_dir/install-sh"; then
5834 ac_install_sh
="$ac_aux_dir/install-sh -c"
5836 elif test -f "$ac_dir/install.sh"; then
5838 ac_install_sh
="$ac_aux_dir/install.sh -c"
5840 elif test -f "$ac_dir/shtool"; then
5842 ac_install_sh
="$ac_aux_dir/shtool install -c"
5846 if test -z "$ac_aux_dir"; then
5847 as_fn_error $?
"cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
5850 # These three variables are undocumented and unsupported,
5851 # and are intended to be withdrawn in a future Autoconf release.
5852 # They can cause serious problems if a builder's source tree is in a directory
5853 # whose full name contains unusual characters.
5854 ac_config_guess
="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5855 ac_config_sub
="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5856 ac_configure
="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5859 # Make sure we can run config.sub.
5860 $SHELL "$ac_aux_dir/config.sub" sun4
>/dev
/null
2>&1 ||
5861 as_fn_error $?
"cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
5863 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
5864 $as_echo_n "checking build system type... " >&6; }
5865 if ${ac_cv_build+:} false
; then :
5866 $as_echo_n "(cached) " >&6
5868 ac_build_alias
=$build_alias
5869 test "x$ac_build_alias" = x
&&
5870 ac_build_alias
=`$SHELL "$ac_aux_dir/config.guess"`
5871 test "x$ac_build_alias" = x
&&
5872 as_fn_error $?
"cannot guess build type; you must specify one" "$LINENO" 5
5873 ac_cv_build
=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
5874 as_fn_error $?
"$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
5877 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
5878 $as_echo "$ac_cv_build" >&6; }
5879 case $ac_cv_build in
5881 *) as_fn_error $?
"invalid value of canonical build" "$LINENO" 5;;
5884 ac_save_IFS
=$IFS; IFS
='-'
5890 # Remember, the first character of IFS is used to create $*,
5891 # except with old shells:
5894 case $build_os in *\
*) build_os
=`echo "$build_os" | sed 's/ /-/g'`;; esac
5897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
5898 $as_echo_n "checking host system type... " >&6; }
5899 if ${ac_cv_host+:} false
; then :
5900 $as_echo_n "(cached) " >&6
5902 if test "x$host_alias" = x
; then
5903 ac_cv_host
=$ac_cv_build
5905 ac_cv_host
=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
5906 as_fn_error $?
"$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
5910 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
5911 $as_echo "$ac_cv_host" >&6; }
5914 *) as_fn_error $?
"invalid value of canonical host" "$LINENO" 5;;
5917 ac_save_IFS
=$IFS; IFS
='-'
5923 # Remember, the first character of IFS is used to create $*,
5924 # except with old shells:
5927 case $host_os in *\
*) host_os
=`echo "$host_os" | sed 's/ /-/g'`;; esac
5930 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
5931 $as_echo_n "checking target system type... " >&6; }
5932 if ${ac_cv_target+:} false
; then :
5933 $as_echo_n "(cached) " >&6
5935 if test "x$target_alias" = x
; then
5936 ac_cv_target
=$ac_cv_host
5938 ac_cv_target
=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
5939 as_fn_error $?
"$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
5943 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
5944 $as_echo "$ac_cv_target" >&6; }
5945 case $ac_cv_target in
5947 *) as_fn_error $?
"invalid value of canonical target" "$LINENO" 5;;
5949 target
=$ac_cv_target
5950 ac_save_IFS
=$IFS; IFS
='-'
5956 # Remember, the first character of IFS is used to create $*,
5957 # except with old shells:
5960 case $target_os in *\
*) target_os
=`echo "$target_os" | sed 's/ /-/g'`;; esac
5963 # The aliases save the names the user supplied, while $host etc.
5964 # will get canonicalized.
5965 test -n "$target_alias" &&
5966 test "$program_prefix$program_suffix$program_transform_name" = \
5968 program_prefix
=${target_alias}-
5970 # The tests for host and target for $enable_largefile require
5975 # As the $enable_largefile decision depends on --enable-plugins we must set it
5976 # even in directories otherwise not depending on the $plugins option.
5980 for ac_header
in dlfcn.h
5982 ac_fn_c_check_header_compile
"$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
5984 if test "x$ac_cv_header_dlfcn_h" = xyes
; then :
5985 cat >>confdefs.h
<<_ACEOF
5986 #define HAVE_DLFCN_H 1
5993 for ac_header
in windows.h
5995 ac_fn_c_check_header_compile
"$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
5997 if test "x$ac_cv_header_windows_h" = xyes
; then :
5998 cat >>confdefs.h
<<_ACEOF
5999 #define HAVE_WINDOWS_H 1
6007 # Check whether --enable-plugins was given.
6008 if test "${enable_plugins+set}" = set; then :
6009 enableval
=$enable_plugins; case "${enableval}" in
6012 if test "$maybe_plugins" != "yes" ; then
6013 as_fn_error $?
"Building with plugin support requires a host that supports dlopen." "$LINENO" 5
6017 plugins
=$maybe_plugins
6021 if test "$plugins" = "yes"; then
6022 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
6023 $as_echo_n "checking for library containing dlsym... " >&6; }
6024 if ${ac_cv_search_dlsym+:} false
; then :
6025 $as_echo_n "(cached) " >&6
6027 ac_func_search_save_LIBS
=$LIBS
6028 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
6029 /* end confdefs.h. */
6031 /* Override any GCC internal prototype to avoid an error.
6032 Use char because int might match the return type of a GCC
6033 builtin and then its argument prototype would still apply. */
6046 for ac_lib
in '' dl
; do
6047 if test -z "$ac_lib"; then
6048 ac_res
="none required"
6051 LIBS
="-l$ac_lib $ac_func_search_save_LIBS"
6053 if ac_fn_c_try_link
"$LINENO"; then :
6054 ac_cv_search_dlsym
=$ac_res
6056 rm -f core conftest.err conftest.
$ac_objext \
6058 if ${ac_cv_search_dlsym+:} false
; then :
6062 if ${ac_cv_search_dlsym+:} false
; then :
6065 ac_cv_search_dlsym
=no
6068 LIBS
=$ac_func_search_save_LIBS
6070 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
6071 $as_echo "$ac_cv_search_dlsym" >&6; }
6072 ac_res
=$ac_cv_search_dlsym
6073 if test "$ac_res" != no
; then :
6074 test "$ac_res" = "none required" || LIBS
="$ac_res $LIBS"
6082 sparc-
*-solaris*|i?
86-*-solaris*)
6083 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support
6084 # were mutually exclusive until Solaris 11.3. Without procfs support,
6085 # the bfd/ elf module cannot provide certain routines such as
6086 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user
6087 # explicitly requested large-file support through the
6088 # --enable-largefile switch, disable large-file support in favor of
6091 # Check if <sys/procfs.h> is incompatible with large-file support.
6092 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
6093 /* end confdefs.h. */
6094 #define _FILE_OFFSET_BITS 64
6095 #define _STRUCTURED_PROC 1
6096 #include <sys/procfs.h>
6105 if ac_fn_c_try_compile
"$LINENO"; then :
6106 acx_cv_procfs_lfs
=yes
6108 acx_cv_procfs_lfs
=no
6110 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
6112 # Forcefully disable large-file support only if necessary, gdb is in
6114 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \
6115 -a -d $srcdir/..
/gdb
-a "$enable_gdb" != no
; then
6116 : ${enable_largefile="no"}
6117 if test "$plugins" = yes; then
6118 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING:
6119 plugin support disabled; require large-file support which is incompatible with GDB." >&5
6120 $as_echo "$as_me: WARNING:
6121 plugin support disabled; require large-file support which is incompatible with GDB." >&2;}
6126 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the
6127 # benefit of g++ 9+ which predefines it on Solaris.
6128 if test "$enable_largefile" = no
; then
6129 LARGEFILE_CPPFLAGS
="-U_FILE_OFFSET_BITS"
6135 # Check whether --enable-largefile was given.
6136 if test "${enable_largefile+set}" = set; then :
6137 enableval
=$enable_largefile;
6140 if test "$enable_largefile" != no
; then
6142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
6143 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
6144 if ${ac_cv_sys_largefile_CC+:} false
; then :
6145 $as_echo_n "(cached) " >&6
6147 ac_cv_sys_largefile_CC
=no
6148 if test "$GCC" != yes; then
6151 # IRIX 6.2 and later do not support large files by default,
6152 # so use the C compiler's -n32 option if that helps.
6153 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
6154 /* end confdefs.h. */
6155 #include <sys/types.h>
6156 /* Check that off_t can represent 2**63 - 1 correctly.
6157 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6158 since some C++ compilers masquerading as C compilers
6159 incorrectly reject 9223372036854775807. */
6160 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6161 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6162 && LARGE_OFF_T % 2147483647 == 1)
6172 if ac_fn_c_try_compile
"$LINENO"; then :
6175 rm -f core conftest.err conftest.
$ac_objext
6177 if ac_fn_c_try_compile
"$LINENO"; then :
6178 ac_cv_sys_largefile_CC
=' -n32'; break
6180 rm -f core conftest.err conftest.
$ac_objext
6184 rm -f conftest.
$ac_ext
6187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
6188 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
6189 if test "$ac_cv_sys_largefile_CC" != no
; then
6190 CC
=$CC$ac_cv_sys_largefile_CC
6193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
6194 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
6195 if ${ac_cv_sys_file_offset_bits+:} false
; then :
6196 $as_echo_n "(cached) " >&6
6199 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
6200 /* end confdefs.h. */
6201 #include <sys/types.h>
6202 /* Check that off_t can represent 2**63 - 1 correctly.
6203 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6204 since some C++ compilers masquerading as C compilers
6205 incorrectly reject 9223372036854775807. */
6206 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6207 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6208 && LARGE_OFF_T % 2147483647 == 1)
6218 if ac_fn_c_try_compile
"$LINENO"; then :
6219 ac_cv_sys_file_offset_bits
=no
; break
6221 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
6222 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
6223 /* end confdefs.h. */
6224 #define _FILE_OFFSET_BITS 64
6225 #include <sys/types.h>
6226 /* Check that off_t can represent 2**63 - 1 correctly.
6227 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6228 since some C++ compilers masquerading as C compilers
6229 incorrectly reject 9223372036854775807. */
6230 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6231 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6232 && LARGE_OFF_T % 2147483647 == 1)
6242 if ac_fn_c_try_compile
"$LINENO"; then :
6243 ac_cv_sys_file_offset_bits
=64; break
6245 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
6246 ac_cv_sys_file_offset_bits
=unknown
6250 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
6251 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
6252 case $ac_cv_sys_file_offset_bits in #(
6255 cat >>confdefs.h
<<_ACEOF
6256 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
6261 if test $ac_cv_sys_file_offset_bits = unknown
; then
6262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
6263 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
6264 if ${ac_cv_sys_large_files+:} false
; then :
6265 $as_echo_n "(cached) " >&6
6268 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
6269 /* end confdefs.h. */
6270 #include <sys/types.h>
6271 /* Check that off_t can represent 2**63 - 1 correctly.
6272 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6273 since some C++ compilers masquerading as C compilers
6274 incorrectly reject 9223372036854775807. */
6275 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6276 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6277 && LARGE_OFF_T % 2147483647 == 1)
6287 if ac_fn_c_try_compile
"$LINENO"; then :
6288 ac_cv_sys_large_files
=no
; break
6290 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
6291 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
6292 /* end confdefs.h. */
6293 #define _LARGE_FILES 1
6294 #include <sys/types.h>
6295 /* Check that off_t can represent 2**63 - 1 correctly.
6296 We can't simply define LARGE_OFF_T to be 9223372036854775807,
6297 since some C++ compilers masquerading as C compilers
6298 incorrectly reject 9223372036854775807. */
6299 #define LARGE_OFF_T (((off_t) 1 << 31 << 31) - 1 + ((off_t) 1 << 31 << 31))
6300 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
6301 && LARGE_OFF_T % 2147483647 == 1)
6311 if ac_fn_c_try_compile
"$LINENO"; then :
6312 ac_cv_sys_large_files
=1; break
6314 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
6315 ac_cv_sys_large_files
=unknown
6319 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
6320 $as_echo "$ac_cv_sys_large_files" >&6; }
6321 case $ac_cv_sys_large_files in #(
6324 cat >>confdefs.h
<<_ACEOF
6325 #define _LARGE_FILES $ac_cv_sys_large_files
6341 $as_echo "#define _ISOC11_SOURCE 1" >>confdefs.h
6349 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5
6350 $as_echo_n "checking for Minix Amsterdam compiler... " >&6; }
6351 if ${gl_cv_c_amsterdam_compiler+:} false
; then :
6352 $as_echo_n "(cached) " >&6
6355 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
6356 /* end confdefs.h. */
6363 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
6364 $EGREP "Amsterdam" >/dev
/null
2>&1; then :
6365 gl_cv_c_amsterdam_compiler
=yes
6367 gl_cv_c_amsterdam_compiler
=no
6373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5
6374 $as_echo "$gl_cv_c_amsterdam_compiler" >&6; }
6376 if test $gl_cv_c_amsterdam_compiler = yes; then
6377 if test -z "$AR"; then
6380 if test -z "$ARFLAGS"; then
6387 if test -n "$ac_tool_prefix"; then
6388 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
6389 set dummy
${ac_tool_prefix}ar; ac_word
=$2
6390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6391 $as_echo_n "checking for $ac_word... " >&6; }
6392 if ${ac_cv_prog_AR+:} false
; then :
6393 $as_echo_n "(cached) " >&6
6395 if test -n "$AR"; then
6396 ac_cv_prog_AR
="$AR" # Let the user override the test.
6398 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
6402 test -z "$as_dir" && as_dir
=.
6403 for ac_exec_ext
in '' $ac_executable_extensions; do
6404 if as_fn_executable_p
"$as_dir/$ac_word$ac_exec_ext"; then
6405 ac_cv_prog_AR
="${ac_tool_prefix}ar"
6406 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6416 if test -n "$AR"; then
6417 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
6418 $as_echo "$AR" >&6; }
6420 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6421 $as_echo "no" >&6; }
6426 if test -z "$ac_cv_prog_AR"; then
6428 # Extract the first word of "ar", so it can be a program name with args.
6429 set dummy
ar; ac_word
=$2
6430 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6431 $as_echo_n "checking for $ac_word... " >&6; }
6432 if ${ac_cv_prog_ac_ct_AR+:} false
; then :
6433 $as_echo_n "(cached) " >&6
6435 if test -n "$ac_ct_AR"; then
6436 ac_cv_prog_ac_ct_AR
="$ac_ct_AR" # Let the user override the test.
6438 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
6442 test -z "$as_dir" && as_dir
=.
6443 for ac_exec_ext
in '' $ac_executable_extensions; do
6444 if as_fn_executable_p
"$as_dir/$ac_word$ac_exec_ext"; then
6445 ac_cv_prog_ac_ct_AR
="ar"
6446 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6455 ac_ct_AR
=$ac_cv_prog_ac_ct_AR
6456 if test -n "$ac_ct_AR"; then
6457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
6458 $as_echo "$ac_ct_AR" >&6; }
6460 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6461 $as_echo "no" >&6; }
6464 if test "x$ac_ct_AR" = x
; then
6467 case $cross_compiling:$ac_tool_warned in
6469 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6470 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6471 ac_tool_warned
=yes ;;
6479 if test -z "$ARFLAGS"; then
6485 if test -z "$RANLIB"; then
6486 if test $gl_cv_c_amsterdam_compiler = yes; then
6489 if test -n "$ac_tool_prefix"; then
6490 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
6491 set dummy
${ac_tool_prefix}ranlib
; ac_word
=$2
6492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6493 $as_echo_n "checking for $ac_word... " >&6; }
6494 if ${ac_cv_prog_RANLIB+:} false
; then :
6495 $as_echo_n "(cached) " >&6
6497 if test -n "$RANLIB"; then
6498 ac_cv_prog_RANLIB
="$RANLIB" # Let the user override the test.
6500 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
6504 test -z "$as_dir" && as_dir
=.
6505 for ac_exec_ext
in '' $ac_executable_extensions; do
6506 if as_fn_executable_p
"$as_dir/$ac_word$ac_exec_ext"; then
6507 ac_cv_prog_RANLIB
="${ac_tool_prefix}ranlib"
6508 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6517 RANLIB
=$ac_cv_prog_RANLIB
6518 if test -n "$RANLIB"; then
6519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
6520 $as_echo "$RANLIB" >&6; }
6522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6523 $as_echo "no" >&6; }
6528 if test -z "$ac_cv_prog_RANLIB"; then
6529 ac_ct_RANLIB
=$RANLIB
6530 # Extract the first word of "ranlib", so it can be a program name with args.
6531 set dummy ranlib
; ac_word
=$2
6532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6533 $as_echo_n "checking for $ac_word... " >&6; }
6534 if ${ac_cv_prog_ac_ct_RANLIB+:} false
; then :
6535 $as_echo_n "(cached) " >&6
6537 if test -n "$ac_ct_RANLIB"; then
6538 ac_cv_prog_ac_ct_RANLIB
="$ac_ct_RANLIB" # Let the user override the test.
6540 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
6544 test -z "$as_dir" && as_dir
=.
6545 for ac_exec_ext
in '' $ac_executable_extensions; do
6546 if as_fn_executable_p
"$as_dir/$ac_word$ac_exec_ext"; then
6547 ac_cv_prog_ac_ct_RANLIB
="ranlib"
6548 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6557 ac_ct_RANLIB
=$ac_cv_prog_ac_ct_RANLIB
6558 if test -n "$ac_ct_RANLIB"; then
6559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
6560 $as_echo "$ac_ct_RANLIB" >&6; }
6562 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6563 $as_echo "no" >&6; }
6566 if test "x$ac_ct_RANLIB" = x
; then
6569 case $cross_compiling:$ac_tool_warned in
6571 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
6572 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
6573 ac_tool_warned
=yes ;;
6575 RANLIB
=$ac_ct_RANLIB
6578 RANLIB
="$ac_cv_prog_RANLIB"
6589 # IEEE behaviour is the default on all CPUs except Alpha and SH
6590 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4
6591 # and the GCC 4.1.2 manual).
6594 # On Alpha systems, a compiler option provides the behaviour.
6595 # See the ieee(3) manual page, also available at
6596 # <https://backdrift.org/man/tru64/man3/ieee.3.html>
6597 if test -n "$GCC"; then
6598 # GCC has the option -mieee.
6599 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact.
6600 CPPFLAGS
="$CPPFLAGS -mieee"
6602 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact.
6603 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact.
6604 CPPFLAGS
="$CPPFLAGS -ieee"
6608 if test -n "$GCC"; then
6609 # GCC has the option -mieee.
6610 CPPFLAGS
="$CPPFLAGS -mieee"
6621 # Check whether --enable-threads was given.
6622 if test "${enable_threads+set}" = set; then :
6623 enableval
=$enable_threads; gl_use_threads
=$enableval
6625 if test -n "$gl_use_threads_default"; then
6626 gl_use_threads
="$gl_use_threads_default"
6629 osf
*) gl_use_threads
=no
;;
6632 1.
[0-5].
*) gl_use_threads
=no
;;
6633 *) gl_use_threads
=yes ;;
6637 case "$gl_use_winpthreads_default" in
6638 yes) gl_use_threads
=posix
;;
6639 no
) gl_use_threads
=windows
;;
6640 *) gl_use_threads
=yes ;;
6643 *) gl_use_threads
=yes ;;
6649 if test "$gl_use_threads" = yes \
6650 ||
test "$gl_use_threads" = isoc \
6651 ||
test "$gl_use_threads" = posix \
6652 ||
test "$gl_use_threads" = isoc
+posix
; then
6653 # For using <threads.h> or <pthread.h>:
6656 if test -z "$gl_anythreadlib_early_done"; then
6659 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it
6660 # groks <pthread.h>. cc also understands the flag -pthread, but
6661 # we don't use it because 1. gcc-2.95 doesn't understand -pthread,
6662 # 2. putting a flag into CPPFLAGS that has an effect on the linker
6663 # causes the AC_LINK_IFELSE test below to succeed unexpectedly,
6664 # leading to wrong values of LIBTHREAD and LTLIBTHREAD.
6665 CPPFLAGS
="$CPPFLAGS -D_REENTRANT"
6668 # Some systems optimize for single-threaded programs by default, and
6669 # need special flags to disable these optimizations. For example, the
6670 # definition of 'errno' in <errno.h>.
6672 aix
* | freebsd
*) CPPFLAGS
="$CPPFLAGS -D_THREAD_SAFE" ;;
6673 solaris
*) CPPFLAGS
="$CPPFLAGS -D_REENTRANT" ;;
6675 gl_anythreadlib_early_done
=done
6682 # Pre-early section.
6687 # Code from module absolute-header:
6688 # Code from module alloca:
6689 # Code from module alloca-opt:
6690 # Code from module arpa_inet:
6691 # Code from module assure:
6692 # Code from module at-internal:
6693 # Code from module attribute:
6694 # Code from module basename-lgpl:
6695 # Code from module btowc:
6696 # Code from module builtin-expect:
6697 # Code from module c99:
6698 # Code from module canonicalize-lgpl:
6699 # Code from module chdir:
6700 # Code from module chdir-long:
6701 # Code from module chown:
6702 # Code from module clock-time:
6703 # Code from module cloexec:
6704 # Code from module close:
6705 # Code from module closedir:
6706 # Code from module count-one-bits:
6707 # Code from module ctype:
6708 # Code from module d-ino:
6709 # Code from module d-type:
6710 # Code from module dirent:
6711 # Code from module dirfd:
6712 # Code from module dirname-lgpl:
6713 # Code from module double-slash-root:
6714 # Code from module dup:
6715 # Code from module dup2:
6716 # Code from module eloop-threshold:
6717 # Code from module environ:
6718 # Code from module errno:
6719 # Code from module error:
6720 # Code from module exitfail:
6721 # Code from module extensions:
6722 # Code from module extern-inline:
6723 # Code from module fchdir:
6724 # Code from module fcntl:
6725 # Code from module fcntl-h:
6726 # Code from module fd-hook:
6727 # Code from module fd-safer-flag:
6728 # Code from module fdopendir:
6729 # Code from module ffs:
6730 # Code from module filename:
6731 # Code from module filenamecat-lgpl:
6732 # Code from module flexmember:
6733 # Code from module float:
6734 # Code from module fnmatch:
6735 # Code from module fnmatch-gnu:
6736 # Code from module fnmatch-h:
6737 # Code from module fpieee:
6739 # Code from module fpucw:
6740 # Code from module free-posix:
6741 # Code from module frexp:
6742 # Code from module frexpl:
6743 # Code from module fstat:
6744 # Code from module fstatat:
6745 # Code from module gendocs:
6746 # Code from module getcwd:
6747 # Code from module getcwd-lgpl:
6748 # Code from module getdelim:
6749 # Code from module getdtablesize:
6750 # Code from module getline:
6751 # Code from module getlogin_r:
6752 # Code from module getprogname:
6753 # Code from module getrandom:
6754 # Code from module gettext-h:
6755 # Code from module gettimeofday:
6756 # Code from module gitlog-to-changelog:
6757 # Code from module glob:
6758 # Code from module glob-h:
6759 # Code from module hard-locale:
6760 # Code from module idx:
6761 # Code from module include_next:
6762 # Code from module inet_ntop:
6763 # Code from module intprops:
6764 # Code from module inttypes:
6765 # Code from module inttypes-incomplete:
6766 # Code from module isblank:
6767 # Code from module isnand-nolibm:
6768 # Code from module isnanl-nolibm:
6769 # Code from module largefile:
6771 # Code from module libc-config:
6772 # Code from module limits-h:
6773 # Code from module localcharset:
6774 # Code from module locale:
6775 # Code from module lock:
6776 # Code from module lstat:
6777 # Code from module malloc-posix:
6778 # Code from module malloca:
6779 # Code from module math:
6780 # Code from module mbrtowc:
6781 # Code from module mbsinit:
6782 # Code from module mbsrtowcs:
6783 # Code from module mbtowc:
6784 # Code from module memchr:
6785 # Code from module memmem:
6786 # Code from module memmem-simple:
6787 # Code from module mempcpy:
6788 # Code from module memrchr:
6789 # Code from module minmax:
6790 # Code from module mkdir:
6791 # Code from module mkdtemp:
6792 # Code from module mkostemp:
6793 # Code from module msvc-inval:
6794 # Code from module msvc-nothrow:
6795 # Code from module multiarch:
6796 # Code from module netdb:
6797 # Code from module netinet_in:
6798 # Code from module nocrash:
6799 # Code from module open:
6800 # Code from module openat:
6801 # Code from module openat-die:
6802 # Code from module openat-h:
6803 # Code from module opendir:
6804 # Code from module pathmax:
6805 # Code from module pipe-posix:
6806 # Code from module rawmemchr:
6807 # Code from module readdir:
6808 # Code from module readlink:
6809 # Code from module realloc-posix:
6810 # Code from module rename:
6811 # Code from module rewinddir:
6812 # Code from module rmdir:
6813 # Code from module same-inode:
6814 # Code from module save-cwd:
6815 # Code from module scratch_buffer:
6816 # Code from module setenv:
6817 # Code from module setlocale-null:
6818 # Code from module signal-h:
6819 # Code from module snippet/_Noreturn:
6820 # Code from module snippet/arg-nonnull:
6821 # Code from module snippet/c++defs:
6822 # Code from module snippet/warn-on-use:
6823 # Code from module socklen:
6824 # Code from module ssize_t:
6825 # Code from module stat:
6826 # Code from module stat-time:
6827 # Code from module std-gnu11:
6828 # Code from module stdalign:
6829 # Code from module stdbool:
6830 # Code from module stddef:
6831 # Code from module stdint:
6832 # Code from module stdio:
6833 # Code from module stdlib:
6834 # Code from module strchrnul:
6835 # Code from module strdup-posix:
6836 # Code from module streq:
6837 # Code from module strerror:
6838 # Code from module strerror-override:
6839 # Code from module strerror_r-posix:
6840 # Code from module string:
6841 # Code from module strings:
6842 # Code from module strnlen:
6843 # Code from module strnlen1:
6844 # Code from module strstr:
6845 # Code from module strstr-simple:
6846 # Code from module strtok_r:
6847 # Code from module sys_random:
6848 # Code from module sys_socket:
6849 # Code from module sys_stat:
6850 # Code from module sys_time:
6851 # Code from module sys_types:
6852 # Code from module sys_uio:
6853 # Code from module tempname:
6854 # Code from module threadlib:
6858 # Code from module time:
6859 # Code from module time_r:
6860 # Code from module unistd:
6861 # Code from module unistd-safer:
6862 # Code from module unsetenv:
6863 # Code from module update-copyright:
6864 # Code from module verify:
6865 # Code from module wchar:
6866 # Code from module wctype-h:
6867 # Code from module windows-mutex:
6868 # Code from module windows-once:
6869 # Code from module windows-recmutex:
6870 # Code from module windows-rwlock:
6871 # Code from module wmemchr:
6872 # Code from module wmempcpy:
6873 # Code from module xalloc-oversized:
6876 am_cv_prog_cc_stdc
=$ac_cv_prog_cc_stdc
6880 for ac_dir
in ..
"$srcdir"/..
; do
6881 if test -f "$ac_dir/install-sh"; then
6883 ac_install_sh
="$ac_aux_dir/install-sh -c"
6885 elif test -f "$ac_dir/install.sh"; then
6887 ac_install_sh
="$ac_aux_dir/install.sh -c"
6889 elif test -f "$ac_dir/shtool"; then
6891 ac_install_sh
="$ac_aux_dir/shtool install -c"
6895 if test -z "$ac_aux_dir"; then
6896 as_fn_error $?
"cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
6899 # These three variables are undocumented and unsupported,
6900 # and are intended to be withdrawn in a future Autoconf release.
6901 # They can cause serious problems if a builder's source tree is in a directory
6902 # whose full name contains unusual characters.
6903 ac_config_guess
="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
6904 ac_config_sub
="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
6905 ac_configure
="$SHELL $ac_aux_dir/configure" # Please don't use this var.
6918 # Check whether --enable-cross-guesses was given.
6919 if test "${enable_cross_guesses+set}" = set; then :
6920 enableval
=$enable_cross_guesses; if test "x$enableval" != xconservative
&& test "x$enableval" != xrisky
; then
6921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5
6922 $as_echo "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;}
6923 enableval
=conservative
6925 gl_cross_guesses
="$enableval"
6927 gl_cross_guesses
=conservative
6930 if test $gl_cross_guesses = risky
; then
6931 gl_cross_guess_normal
="guessing yes"
6932 gl_cross_guess_inverted
="guessing no"
6934 gl_cross_guess_normal
="guessing no"
6935 gl_cross_guess_inverted
="guessing yes"
6937 LIBC_FATAL_STDERR_
=1
6938 export LIBC_FATAL_STDERR_
6941 ac_fn_c_check_type
"$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
6942 if test "x$ac_cv_type_size_t" = xyes
; then :
6946 cat >>confdefs.h
<<_ACEOF
6947 #define size_t unsigned int
6952 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
6953 # for constant arguments. Useless!
6954 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
6955 $as_echo_n "checking for working alloca.h... " >&6; }
6956 if ${ac_cv_working_alloca_h+:} false
; then :
6957 $as_echo_n "(cached) " >&6
6959 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
6960 /* end confdefs.h. */
6965 char *p = (char *) alloca (2 * sizeof (int));
6971 if ac_fn_c_try_link
"$LINENO"; then :
6972 ac_cv_working_alloca_h
=yes
6974 ac_cv_working_alloca_h
=no
6976 rm -f core conftest.err conftest.
$ac_objext \
6977 conftest
$ac_exeext conftest.
$ac_ext
6979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
6980 $as_echo "$ac_cv_working_alloca_h" >&6; }
6981 if test $ac_cv_working_alloca_h = yes; then
6983 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
6987 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
6988 $as_echo_n "checking for alloca... " >&6; }
6989 if ${ac_cv_func_alloca_works+:} false
; then :
6990 $as_echo_n "(cached) " >&6
6992 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
6993 /* end confdefs.h. */
6995 # define alloca __builtin_alloca
6998 # include <malloc.h>
6999 # define alloca _alloca
7001 # ifdef HAVE_ALLOCA_H
7002 # include <alloca.h>
7007 # ifndef alloca /* predefined by HP cc +Olibcalls */
7008 void *alloca (size_t);
7018 char *p = (char *) alloca (1);
7024 if ac_fn_c_try_link
"$LINENO"; then :
7025 ac_cv_func_alloca_works
=yes
7027 ac_cv_func_alloca_works
=no
7029 rm -f core conftest.err conftest.
$ac_objext \
7030 conftest
$ac_exeext conftest.
$ac_ext
7032 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
7033 $as_echo "$ac_cv_func_alloca_works" >&6; }
7035 if test $ac_cv_func_alloca_works = yes; then
7037 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
7040 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
7041 # that cause trouble. Some versions do not even contain alloca or
7042 # contain a buggy version. If you still want to use their alloca,
7043 # use ar to extract alloca.o from them instead of compiling alloca.c.
7049 ALLOCA
=\
${LIBOBJDIR}alloca.
$ac_objext
7051 $as_echo "#define C_ALLOCA 1" >>confdefs.h
7054 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
7055 $as_echo_n "checking stack direction for C alloca... " >&6; }
7056 if ${ac_cv_c_stack_direction+:} false
; then :
7057 $as_echo_n "(cached) " >&6
7059 if test "$cross_compiling" = yes; then :
7060 ac_cv_c_stack_direction
=0
7062 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
7063 /* end confdefs.h. */
7064 $ac_includes_default
7066 find_stack_direction (int *addr, int depth)
7071 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
7072 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
7077 main (int argc, char **argv)
7079 return find_stack_direction (0, argc + !argv + 20) < 0;
7082 if ac_fn_c_try_run
"$LINENO"; then :
7083 ac_cv_c_stack_direction
=1
7085 ac_cv_c_stack_direction
=-1
7087 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
7088 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
7092 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
7093 $as_echo "$ac_cv_c_stack_direction" >&6; }
7094 cat >>confdefs.h
<<_ACEOF
7095 #define STACK_DIRECTION $ac_cv_c_stack_direction
7104 HAVE_DECL_INET_NTOP
=1;
7105 HAVE_DECL_INET_PTON
=1;
7106 REPLACE_INET_NTOP
=0;
7107 REPLACE_INET_PTON
=0;
7113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5
7114 $as_echo_n "checking whether the preprocessor supports include_next... " >&6; }
7115 if ${gl_cv_have_include_next+:} false
; then :
7116 $as_echo_n "(cached) " >&6
7118 rm -rf conftestd1a conftestd1b conftestd2
7119 mkdir conftestd1a conftestd1b conftestd2
7120 cat <<EOF > conftestd1a/conftest.h
7121 #define DEFINED_IN_CONFTESTD1
7122 #include_next <conftest.h>
7123 #ifdef DEFINED_IN_CONFTESTD2
7126 #error "include_next doesn't work"
7129 cat <<EOF > conftestd1b/conftest.h
7130 #define DEFINED_IN_CONFTESTD1
7132 #include_next <conftest.h>
7133 #ifdef DEFINED_IN_CONFTESTD2
7136 #error "include_next doesn't work"
7139 cat <<EOF > conftestd2/conftest.h
7140 #ifndef DEFINED_IN_CONFTESTD1
7141 #error "include_next test doesn't work"
7143 #define DEFINED_IN_CONFTESTD2
7145 gl_save_CPPFLAGS
="$CPPFLAGS"
7146 CPPFLAGS
="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2"
7147 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
7148 /* end confdefs.h. */
7149 #include <conftest.h>
7151 if ac_fn_c_try_compile
"$LINENO"; then :
7152 gl_cv_have_include_next
=yes
7154 CPPFLAGS
="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2"
7155 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
7156 /* end confdefs.h. */
7157 #include <conftest.h>
7159 if ac_fn_c_try_compile
"$LINENO"; then :
7160 gl_cv_have_include_next
=buggy
7162 gl_cv_have_include_next
=no
7164 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
7167 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
7168 CPPFLAGS
="$gl_save_CPPFLAGS"
7169 rm -rf conftestd1a conftestd1b conftestd2
7172 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5
7173 $as_echo "$gl_cv_have_include_next" >&6; }
7174 PRAGMA_SYSTEM_HEADER
=
7175 if test $gl_cv_have_include_next = yes; then
7176 INCLUDE_NEXT
=include_next
7177 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
=include_next
7178 if test -n "$GCC"; then
7179 PRAGMA_SYSTEM_HEADER
='#pragma GCC system_header'
7182 if test $gl_cv_have_include_next = buggy
; then
7183 INCLUDE_NEXT
=include
7184 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
=include_next
7186 INCLUDE_NEXT
=include
7187 INCLUDE_NEXT_AS_FIRST_DIRECTIVE
=include
7194 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether source code line length is unlimited" >&5
7195 $as_echo_n "checking whether source code line length is unlimited... " >&6; }
7196 if ${gl_cv_source_line_length_unlimited+:} false
; then :
7197 $as_echo_n "(cached) " >&6
7199 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
7200 /* end confdefs.h. */
7207 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7208 $EGREP "choke me" >/dev
/null
2>&1; then :
7209 gl_cv_source_line_length_unlimited
=no
7211 gl_cv_source_line_length_unlimited
=yes
7217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_source_line_length_unlimited" >&5
7218 $as_echo "$gl_cv_source_line_length_unlimited" >&6; }
7219 if test $gl_cv_source_line_length_unlimited = no
; then
7220 PRAGMA_COLUMNS
="#pragma COLUMNS 10000"
7230 if test $ac_cv_header_features_h = yes; then
7240 if test $ac_cv_header_sys_socket_h = no
; then
7241 for ac_header
in ws2tcpip.h
7243 ac_fn_c_check_header_mongrel
"$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default"
7244 if test "x$ac_cv_header_ws2tcpip_h" = xyes
; then :
7245 cat >>confdefs.h
<<_ACEOF
7246 #define HAVE_WS2TCPIP_H 1
7255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5
7256 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
7257 if test -z "$MKDIR_P"; then
7258 if ${ac_cv_path_mkdir+:} false
; then :
7259 $as_echo_n "(cached) " >&6
7261 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
7262 for as_dir
in $PATH$PATH_SEPARATOR/opt
/sfw
/bin
7265 test -z "$as_dir" && as_dir
=.
7266 for ac_prog
in mkdir gmkdir
; do
7267 for ac_exec_ext
in '' $ac_executable_extensions; do
7268 as_fn_executable_p
"$as_dir/$ac_prog$ac_exec_ext" ||
continue
7269 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #(
7270 'mkdir (GNU coreutils) '* | \
7271 'mkdir (coreutils) '* | \
7272 'mkdir (fileutils) '4.1*)
7273 ac_cv_path_mkdir
=$as_dir/$ac_prog$ac_exec_ext
7283 test -d .
/--version && rmdir .
/--version
7284 if test "${ac_cv_path_mkdir+set}" = set; then
7285 MKDIR_P
="$ac_cv_path_mkdir -p"
7287 # As a last resort, use the slow shell script. Don't cache a
7288 # value for MKDIR_P within a source directory, because that will
7289 # break other packages using the cache if that directory is
7290 # removed, or if the value is a relative name.
7291 MKDIR_P
="$ac_install_sh -d"
7294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5
7295 $as_echo "$MKDIR_P" >&6; }
7304 GNULIB_MBSNRTOWCS
=0;
7307 GNULIB_WCSNRTOMBS
=0;
7325 GNULIB_WCSCASECMP
=0;
7326 GNULIB_WCSNCASECMP
=0;
7339 GNULIB_MDA_WCSDUP
=1;
7381 HAVE_DECL_WCWIDTH
=1;
7382 REPLACE_MBSTATE_T
=0;
7388 REPLACE_MBSRTOWCS
=0;
7389 REPLACE_MBSNRTOWCS
=0;
7391 REPLACE_WCSRTOMBS
=0;
7392 REPLACE_WCSNRTOMBS
=0;
7400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5
7401 $as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; }
7402 if ${gl_cv_header_wchar_h_correct_inline+:} false
; then :
7403 $as_echo_n "(cached) " >&6
7405 gl_cv_header_wchar_h_correct_inline
=yes
7408 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
7409 /* end confdefs.h. */
7412 #define wcstod renamed_wcstod
7414 extern int zero (void);
7415 int main () { return zero(); }
7418 save_ac_compile
="$ac_compile"
7419 ac_compile
=`echo "$save_ac_compile" | sed s/conftest/conftest1/`
7420 if echo '#include "conftest.c"' >conftest1.c \
7421 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7422 (eval $ac_compile) 2>&5
7424 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7425 test $ac_status = 0; }; then
7426 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
7427 /* end confdefs.h. */
7430 #define wcstod renamed_wcstod
7432 int zero (void) { return 0; }
7435 ac_compile
=`echo "$save_ac_compile" | sed s/conftest/conftest2/`
7436 if echo '#include "conftest.c"' >conftest2.c \
7437 && { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5
7438 (eval $ac_compile) 2>&5
7440 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7441 test $ac_status = 0; }; then
7442 if $CC -o conftest
$ac_exeext $CFLAGS $LDFLAGS conftest1.
$ac_objext conftest2.
$ac_objext $LIBS >&5 2>&1; then
7445 gl_cv_header_wchar_h_correct_inline
=no
7449 ac_compile
="$save_ac_compile"
7450 rm -f conftest12.c conftest12.
$ac_objext conftest
$ac_exeext
7455 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5
7456 $as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; }
7457 if test $gl_cv_header_wchar_h_correct_inline = no
; then
7458 as_fn_error $?
"<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS).
7459 This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in
7460 C99 mode. You have four options:
7461 - Add the flag -fgnu89-inline to CC and reconfigure, or
7462 - Fix your include files, using parts of
7463 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or
7464 - Use a gcc version older than 4.3, or
7465 - Don't use the flags -std=c99 or -std=gnu99.
7466 Configuration aborted." "$LINENO" 5
7472 for ac_func
in $ac_func_list
7474 as_ac_var
=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
7475 ac_fn_c_check_func
"$LINENO" "$ac_func" "$as_ac_var"
7476 if eval test \"x\$
"$as_ac_var"\" = x
"yes"; then :
7477 cat >>confdefs.h
<<_ACEOF
7478 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
7487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
7488 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
7489 if ${am_cv_langinfo_codeset+:} false
; then :
7490 $as_echo_n "(cached) " >&6
7492 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
7493 /* end confdefs.h. */
7494 #include <langinfo.h>
7498 char* cs = nl_langinfo(CODESET); return !cs;
7503 if ac_fn_c_try_link
"$LINENO"; then :
7504 am_cv_langinfo_codeset
=yes
7506 am_cv_langinfo_codeset
=no
7508 rm -f core conftest.err conftest.
$ac_objext \
7509 conftest
$ac_exeext conftest.
$ac_ext
7512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
7513 $as_echo "$am_cv_langinfo_codeset" >&6; }
7514 if test $am_cv_langinfo_codeset = yes; then
7516 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
7523 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5
7524 $as_echo_n "checking for a traditional french locale... " >&6; }
7525 if ${gt_cv_locale_fr+:} false
; then :
7526 $as_echo_n "(cached) " >&6
7529 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
7530 /* end confdefs.h. */
7534 #if HAVE_LANGINFO_CODESET
7535 # include <langinfo.h>
7542 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
7543 imitates locale dependent behaviour by looking at the environment
7544 variables, and all locales use the UTF-8 encoding. */
7545 #if defined __BEOS__ || defined __HAIKU__
7548 /* Check whether the given locale name is recognized by the system. */
7549 # if defined _WIN32 && !defined __CYGWIN__
7550 /* On native Windows, setlocale(category, "") looks at the system settings,
7551 not at the environment variables. Also, when an encoding suffix such
7552 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
7553 category of the locale to "C". */
7554 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
7555 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
7558 if (setlocale (LC_ALL, "") == NULL) return 1;
7560 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
7561 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
7562 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
7563 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
7564 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
7565 some unit tests fail.
7566 On MirBSD 10, when an unsupported locale is specified, setlocale()
7567 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
7568 # if HAVE_LANGINFO_CODESET
7570 const char *cs = nl_langinfo (CODESET);
7571 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
7572 || strcmp (cs, "UTF-8") == 0)
7577 /* On Cygwin, avoid locale names without encoding suffix, because the
7578 locale_charset() function relies on the encoding suffix. Note that
7579 LC_ALL is set on the command line. */
7580 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
7582 /* Check whether in the abbreviation of the second month, the second
7583 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only
7584 one byte long. This excludes the UTF-8 encoding. */
7585 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
7586 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1;
7587 # if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
7588 /* Check whether the decimal separator is a comma.
7589 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
7590 are nl_langinfo(RADIXCHAR) are both ".". */
7591 if (localeconv () ->decimal_point[0] != ',') return 1;
7598 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
7599 (eval $ac_link) 2>&5
7601 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
7602 test $ac_status = 0; } && test -s conftest
$ac_exeext; then
7604 # Handle native Windows specially, because there setlocale() interprets
7605 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
7606 # "fr" or "fra" as "French" or "French_France.1252",
7607 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
7608 # "ja" as "Japanese" or "Japanese_Japan.932",
7611 # Test for the native Windows locale name.
7612 if (LC_ALL
=French_France
.1252 LC_TIME
= LC_CTYPE
= .
/conftest
; exit) 2>/dev
/null
; then
7613 gt_cv_locale_fr
=French_France
.1252
7616 gt_cv_locale_fr
=none
7620 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
7621 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
7622 # configure script would override the LC_ALL setting. Likewise for
7623 # LC_CTYPE, which is also set at the beginning of the configure script.
7624 # Test for the usual locale name.
7625 if (LC_ALL
=fr_FR LC_TIME
= LC_CTYPE
= .
/conftest
; exit) 2>/dev
/null
; then
7626 gt_cv_locale_fr
=fr_FR
7628 # Test for the locale name with explicit encoding suffix.
7629 if (LC_ALL
=fr_FR.ISO-8859-1 LC_TIME
= LC_CTYPE
= .
/conftest
; exit) 2>/dev
/null
; then
7630 gt_cv_locale_fr
=fr_FR.ISO-8859-1
7632 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name.
7633 if (LC_ALL
=fr_FR.ISO8859-1 LC_TIME
= LC_CTYPE
= .
/conftest
; exit) 2>/dev
/null
; then
7634 gt_cv_locale_fr
=fr_FR.ISO8859-1
7636 # Test for the HP-UX locale name.
7637 if (LC_ALL
=fr_FR.iso88591 LC_TIME
= LC_CTYPE
= .
/conftest
; exit) 2>/dev
/null
; then
7638 gt_cv_locale_fr
=fr_FR.iso88591
7640 # Test for the Solaris 7 locale name.
7641 if (LC_ALL
=fr LC_TIME
= LC_CTYPE
= .
/conftest
; exit) 2>/dev
/null
; then
7645 gt_cv_locale_fr
=none
7657 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5
7658 $as_echo "$gt_cv_locale_fr" >&6; }
7659 LOCALE_FR
=$gt_cv_locale_fr
7664 GNULIB_ALIGNED_ALLOC
=0;
7666 GNULIB_CALLOC_POSIX
=0;
7667 GNULIB_CANONICALIZE_FILE_NAME
=0;
7668 GNULIB_FREE_POSIX
=0;
7669 GNULIB_GETLOADAVG
=0;
7672 GNULIB_MALLOC_POSIX
=0;
7679 GNULIB_POSIX_MEMALIGN
=0;
7680 GNULIB_POSIX_OPENPT
=0;
7687 GNULIB_REALLOCARRAY
=0;
7688 GNULIB_REALLOC_POSIX
=0;
7691 GNULIB_SECURE_GETENV
=0;
7697 GNULIB_SYSTEM_POSIX
=0;
7704 GNULIB_MDA_MKTEMP
=1;
7705 GNULIB_MDA_PUTENV
=1;
7707 HAVE_ALIGNED_ALLOC
=1;
7709 HAVE_CANONICALIZE_FILE_NAME
=1;
7713 HAVE_DECL_GETLOADAVG
=1;
7717 HAVE_DECL_INITSTATE
=1;
7724 HAVE_POSIX_MEMALIGN
=1;
7725 HAVE_POSIX_OPENPT
=1;
7732 HAVE_REALLOCARRAY
=1;
7735 HAVE_SECURE_GETENV
=1;
7739 HAVE_DECL_SETSTATE
=1;
7744 HAVE_STRUCT_RANDOM_DATA
=1;
7745 HAVE_SYS_LOADAVG_H
=0;
7747 HAVE_DECL_UNSETENV
=1;
7748 REPLACE_ALIGNED_ALLOC
=0;
7750 REPLACE_CANONICALIZE_FILE_NAME
=0;
7752 REPLACE_INITSTATE
=0;
7756 REPLACE_POSIX_MEMALIGN
=0;
7758 REPLACE_PTSNAME_R
=0;
7773 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5
7774 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; }
7775 if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false
; then :
7776 $as_echo_n "(cached) " >&6
7778 rm -f conftest.sym conftest.
file
7780 if test "$cross_compiling" = yes; then :
7783 # Guess yes on Linux systems.
7784 gl_cv_func_lstat_dereferences_slashed_symlink
="guessing yes" ;;
7786 # Guess yes on glibc systems.
7787 gl_cv_func_lstat_dereferences_slashed_symlink
="guessing yes" ;;
7789 # Guess no on native Windows.
7790 gl_cv_func_lstat_dereferences_slashed_symlink
="guessing no" ;;
7792 # If we don't know, obey --enable-cross-guesses.
7793 gl_cv_func_lstat_dereferences_slashed_symlink
="$gl_cross_guess_normal" ;;
7797 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
7798 /* end confdefs.h. */
7799 $ac_includes_default
7804 if (symlink ("conftest.file", "conftest.sym") != 0)
7806 /* Linux will dereference the symlink and fail, as required by
7807 POSIX. That is better in the sense that it means we will not
7808 have to compile and use the lstat wrapper. */
7809 return lstat ("conftest.sym/", &sbuf) == 0;
7815 if ac_fn_c_try_run
"$LINENO"; then :
7816 gl_cv_func_lstat_dereferences_slashed_symlink
=yes
7818 gl_cv_func_lstat_dereferences_slashed_symlink
=no
7820 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
7821 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
7824 rm -f conftest.sym conftest.
file
7827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5
7828 $as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; }
7829 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in
7832 cat >>confdefs.h
<<_ACEOF
7833 #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1
7845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
7846 $as_echo_n "checking whether // is distinct from /... " >&6; }
7847 if ${gl_cv_double_slash_root+:} false
; then :
7848 $as_echo_n "(cached) " >&6
7850 if test x
"$cross_compiling" = xyes
; then
7851 # When cross-compiling, there is no way to tell whether // is special
7852 # short of a list of hosts. However, the only known hosts to date
7853 # that have a distinct // are Apollo DomainOS (too old to port to),
7854 # Cygwin, and z/OS. If anyone knows of another system for which // has
7855 # special semantics and is distinct from /, please report it to
7856 # <bug-gnulib@gnu.org>.
7858 *-cygwin | i370-ibm-openedition
)
7859 gl_cv_double_slash_root
=yes ;;
7861 # Be optimistic and assume that / and // are the same when we
7863 gl_cv_double_slash_root
='unknown, assuming no' ;;
7866 set x
`ls -di / // 2>/dev/null`
7867 if test "$2" = "$4" && wc //dev
/null
>/dev
/null
2>&1; then
7868 gl_cv_double_slash_root
=no
7870 gl_cv_double_slash_root
=yes
7874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
7875 $as_echo "$gl_cv_double_slash_root" >&6; }
7876 if test "$gl_cv_double_slash_root" = yes; then
7878 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
7886 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5
7887 $as_echo_n "checking whether realpath works... " >&6; }
7888 if ${gl_cv_func_realpath_works+:} false
; then :
7889 $as_echo_n "(cached) " >&6
7892 rm -rf conftest.a conftest.d
7895 if test "$cross_compiling" = yes; then :
7897 # Guess yes on glibc systems.
7898 *-gnu* | gnu
*) gl_cv_func_realpath_works
="guessing yes" ;;
7899 # Guess yes on musl systems.
7900 *-musl*) gl_cv_func_realpath_works
="guessing yes" ;;
7901 # Guess no on native Windows.
7902 mingw
*) gl_cv_func_realpath_works
="guessing no" ;;
7903 # If we don't know, obey --enable-cross-guesses.
7904 *) gl_cv_func_realpath_works
="$gl_cross_guess_normal" ;;
7908 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
7909 /* end confdefs.h. */
7914 #if defined __MACH__ && defined __APPLE__
7915 /* Avoid a crash on Mac OS X. */
7916 #include <mach/mach.h>
7917 #include <mach/mach_error.h>
7918 #include <mach/thread_status.h>
7919 #include <mach/exception.h>
7920 #include <mach/task.h>
7921 #include <pthread.h>
7922 /* The exception port on which our thread listens. */
7923 static mach_port_t our_exception_port;
7924 /* The main function of the thread listening for exceptions of type
7927 mach_exception_thread (void *arg)
7929 /* Buffer for a message to be received. */
7931 mach_msg_header_t head;
7932 mach_msg_body_t msgh_body;
7935 mach_msg_return_t retval;
7936 /* Wait for a message on the exception port. */
7937 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg),
7938 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
7939 if (retval != MACH_MSG_SUCCESS)
7946 mach_port_t self = mach_task_self ();
7947 /* Allocate a port on which the thread shall listen for exceptions. */
7948 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port)
7950 /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */
7951 if (mach_port_insert_right (self, our_exception_port, our_exception_port,
7952 MACH_MSG_TYPE_MAKE_SEND)
7954 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting
7956 exception_mask_t mask = EXC_MASK_BAD_ACCESS;
7957 /* Create the thread listening on the exception port. */
7958 pthread_attr_t attr;
7960 if (pthread_attr_init (&attr) == 0
7961 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0
7962 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) {
7963 pthread_attr_destroy (&attr);
7964 /* Replace the exception port info for these exceptions with our own.
7965 Note that we replace the exception port for the entire task, not only
7966 for a particular thread. This has the effect that when our exception
7967 port gets the message, the thread specific exception port has already
7968 been asked, and we don't need to bother about it.
7969 See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */
7970 task_set_exception_ports (self, mask, our_exception_port,
7971 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE);
7976 #elif defined _WIN32 && ! defined __CYGWIN__
7977 /* Avoid a crash on native Windows. */
7978 #define WIN32_LEAN_AND_MEAN
7979 #include <windows.h>
7980 #include <winerror.h>
7982 exception_filter (EXCEPTION_POINTERS *ExceptionInfo)
7984 switch (ExceptionInfo->ExceptionRecord->ExceptionCode)
7986 case EXCEPTION_ACCESS_VIOLATION:
7987 case EXCEPTION_IN_PAGE_ERROR:
7988 case EXCEPTION_STACK_OVERFLOW:
7989 case EXCEPTION_GUARD_PAGE:
7990 case EXCEPTION_PRIV_INSTRUCTION:
7991 case EXCEPTION_ILLEGAL_INSTRUCTION:
7992 case EXCEPTION_DATATYPE_MISALIGNMENT:
7993 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED:
7994 case EXCEPTION_NONCONTINUABLE_EXCEPTION:
7997 return EXCEPTION_CONTINUE_SEARCH;
8002 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter);
8005 /* Avoid a crash on POSIX systems. */
8008 /* A POSIX signal handler. */
8010 exception_handler (int sig)
8018 signal (SIGSEGV, exception_handler);
8021 signal (SIGBUS, exception_handler);
8035 char *name = realpath ("conftest.a", NULL);
8036 if (!(name && *name == '/'))
8041 char *name = realpath ("conftest.b/../conftest.a", NULL);
8047 char *name = realpath ("conftest.a/", NULL);
8053 char *name1 = realpath (".", NULL);
8054 char *name2 = realpath ("conftest.d//./..", NULL);
8055 if (! name1 || ! name2 || strcmp (name1, name2))
8067 if ac_fn_c_try_run
"$LINENO"; then :
8068 gl_cv_func_realpath_works
=yes
8070 gl_cv_func_realpath_works
=no
8072 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
8073 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
8076 rm -rf conftest.a conftest.d
8079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5
8080 $as_echo "$gl_cv_func_realpath_works" >&6; }
8081 case "$gl_cv_func_realpath_works" in
8084 $as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h
8099 *) for ac_func
in getcwd
8101 ac_fn_c_check_func
"$LINENO" "getcwd" "ac_cv_func_getcwd"
8102 if test "x$ac_cv_func_getcwd" = xyes
; then :
8103 cat >>confdefs.h
<<_ACEOF
8104 #define HAVE_GETCWD 1
8121 GNULIB_COPY_FILE_RANGE
=0;
8126 GNULIB_EUIDACCESS
=0;
8141 GNULIB_GETDOMAINNAME
=0;
8142 GNULIB_GETDTABLESIZE
=0;
8143 GNULIB_GETENTROPY
=0;
8145 GNULIB_GETHOSTNAME
=0;
8147 GNULIB_GETLOGIN_R
=0;
8148 GNULIB_GETOPT_POSIX
=0;
8149 GNULIB_GETPAGESIZE
=0;
8151 GNULIB_GETUSERSHELL
=0;
8152 GNULIB_GROUP_MEMBER
=0;
8164 GNULIB_READLINKAT
=0;
8166 GNULIB_SETHOSTNAME
=0;
8172 GNULIB_UNISTD_H_NONBLOCKING
=0;
8173 GNULIB_UNISTD_H_SIGPIPE
=0;
8178 GNULIB_MDA_ACCESS
=1;
8184 GNULIB_MDA_EXECLE
=1;
8185 GNULIB_MDA_EXECLP
=1;
8187 GNULIB_MDA_EXECVE
=1;
8188 GNULIB_MDA_EXECVP
=1;
8189 GNULIB_MDA_EXECVPE
=1;
8190 GNULIB_MDA_GETCWD
=1;
8191 GNULIB_MDA_GETPID
=1;
8192 GNULIB_MDA_ISATTY
=1;
8197 GNULIB_MDA_UNLINK
=1;
8200 HAVE_COPY_FILE_RANGE
=1;
8210 HAVE_GETDTABLESIZE
=1;
8217 HAVE_GROUP_MEMBER
=1;
8233 HAVE_DECL_ENVIRON
=1;
8234 HAVE_DECL_EXECVPE
=1;
8236 HAVE_DECL_FDATASYNC
=1;
8237 HAVE_DECL_GETDOMAINNAME
=1;
8238 HAVE_DECL_GETLOGIN
=1;
8239 HAVE_DECL_GETLOGIN_R
=1;
8240 HAVE_DECL_GETPAGESIZE
=1;
8241 HAVE_DECL_GETUSERSHELL
=1;
8242 HAVE_DECL_SETHOSTNAME
=1;
8243 HAVE_DECL_TRUNCATE
=1;
8244 HAVE_DECL_TTYNAME_R
=1;
8259 REPLACE_FACCESSAT
=0;
8261 REPLACE_FTRUNCATE
=0;
8263 REPLACE_GETDOMAINNAME
=0;
8264 REPLACE_GETDTABLESIZE
=0;
8265 REPLACE_GETLOGIN_R
=0;
8266 REPLACE_GETGROUPS
=0;
8267 REPLACE_GETPAGESIZE
=0;
8278 REPLACE_READLINKAT
=0;
8282 REPLACE_SYMLINKAT
=0;
8284 REPLACE_TTYNAME_R
=0;
8289 UNISTD_H_HAVE_SYS_RANDOM_H
=0;
8290 UNISTD_H_HAVE_WINSOCK2_H
=0;
8291 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS
=0;
8299 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5
8300 $as_echo_n "checking for uid_t in sys/types.h... " >&6; }
8301 if ${ac_cv_type_uid_t+:} false
; then :
8302 $as_echo_n "(cached) " >&6
8304 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
8305 /* end confdefs.h. */
8306 #include <sys/types.h>
8309 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8310 $EGREP "uid_t" >/dev
/null
2>&1; then :
8311 ac_cv_type_uid_t
=yes
8318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5
8319 $as_echo "$ac_cv_type_uid_t" >&6; }
8320 if test $ac_cv_type_uid_t = no
; then
8322 $as_echo "#define uid_t int" >>confdefs.h
8325 $as_echo "#define gid_t int" >>confdefs.h
8330 #if defined _WIN32 && !defined __CYGWIN__
8331 #define access _access
8332 #define chdir _chdir
8333 #define chmod _chmod
8334 #define close _close
8335 #define creat _creat
8339 #define execl _execl
8340 #define execle _execle
8341 #define execlp _execlp
8342 #define execv _execv
8343 #define execve _execve
8344 #define execvp _execvp
8345 #define execvpe _execvpe
8346 #define fcloseall _fcloseall
8348 #define fdopen _fdopen
8349 #define fileno _fileno
8351 #define getcwd _getcwd
8352 #define getpid _getpid
8354 #define isatty _isatty
8358 #define lfind _lfind
8359 #define lsearch _lsearch
8360 #define lseek _lseek
8361 #define memccpy _memccpy
8362 #define mkdir _mkdir
8363 #define mktemp _mktemp
8365 #define putenv _putenv
8368 #define rmdir _rmdir
8369 #define strdup _strdup
8371 #define tempnam _tempnam
8372 #define tzset _tzset
8373 #define umask _umask
8374 #define unlink _unlink
8375 #define utime _utime
8376 #define wcsdup _wcsdup
8377 #define write _write
8385 for ac_header
in unistd.h
8387 ac_fn_c_check_header_mongrel
"$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default"
8388 if test "x$ac_cv_header_unistd_h" = xyes
; then :
8389 cat >>confdefs.h
<<_ACEOF
8390 #define HAVE_UNISTD_H 1
8397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5
8398 $as_echo_n "checking for working chown... " >&6; }
8399 if ${ac_cv_func_chown_works+:} false
; then :
8400 $as_echo_n "(cached) " >&6
8402 if test "$cross_compiling" = yes; then :
8403 case "$host_os" in # ((
8404 # Guess yes on Linux systems.
8405 linux-
* | linux
) ac_cv_func_chown_works
="guessing yes" ;;
8406 # Guess yes on glibc systems.
8407 *-gnu* | gnu
*) ac_cv_func_chown_works
="guessing yes" ;;
8408 # Guess no on native Windows.
8409 mingw
*) ac_cv_func_chown_works
="guessing no" ;;
8410 # If we don't know, obey --enable-cross-guesses.
8411 *) ac_cv_func_chown_works
="$gl_cross_guess_normal" ;;
8415 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
8416 /* end confdefs.h. */
8417 $ac_includes_default
8427 char *f = "conftest.chown";
8428 struct stat before, after;
8430 if (creat (f, 0600) < 0)
8432 if (stat (f, &before) < 0)
8434 if (chown (f, (uid_t) -1, (gid_t) -1) == -1)
8436 if (stat (f, &after) < 0)
8438 return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid);
8445 if ac_fn_c_try_run
"$LINENO"; then :
8446 ac_cv_func_chown_works
=yes
8448 ac_cv_func_chown_works
=no
8450 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
8451 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
8454 rm -f conftest.chown
8457 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5
8458 $as_echo "$ac_cv_func_chown_works" >&6; }
8459 case "$ac_cv_func_chown_works" in
8462 $as_echo "#define HAVE_CHOWN 1" >>confdefs.h
8468 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown dereferences symlinks" >&5
8469 $as_echo_n "checking whether chown dereferences symlinks... " >&6; }
8470 if ${gl_cv_func_chown_follows_symlink+:} false
; then :
8471 $as_echo_n "(cached) " >&6
8474 if test "$cross_compiling" = yes; then :
8475 gl_cv_func_chown_follows_symlink
="guessing yes"
8478 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
8479 /* end confdefs.h. */
8492 char const *dangling_symlink = "conftest.dangle";
8494 unlink (dangling_symlink);
8495 if (symlink ("conftest.no-such", dangling_symlink))
8498 /* Exit successfully on a conforming system,
8499 i.e., where chown must fail with ENOENT. */
8500 if (chown (dangling_symlink, getuid (), getgid ()) == 0)
8502 if (errno != ENOENT)
8508 if ac_fn_c_try_run
"$LINENO"; then :
8509 gl_cv_func_chown_follows_symlink
=yes
8511 gl_cv_func_chown_follows_symlink
=no
8513 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
8514 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
8520 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_follows_symlink" >&5
8521 $as_echo "$gl_cv_func_chown_follows_symlink" >&6; }
8523 case "$gl_cv_func_chown_follows_symlink" in
8527 $as_echo "#define CHOWN_MODIFIES_SYMLINK 1" >>confdefs.h
8543 if test $ac_cv_func_chown = no
; then
8546 case "$gl_cv_func_chown_follows_symlink" in
8548 *) REPLACE_CHOWN
=1 ;;
8551 case "$ac_cv_func_chown_works" in
8554 $as_echo "#define CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE 1" >>confdefs.h
8560 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown honors trailing slash" >&5
8561 $as_echo_n "checking whether chown honors trailing slash... " >&6; }
8562 if ${gl_cv_func_chown_slash_works+:} false
; then :
8563 $as_echo_n "(cached) " >&6
8565 touch conftest.
file && rm -f conftest.link
8566 if test "$cross_compiling" = yes; then :
8568 # Guess yes on glibc systems.
8569 *-gnu*) gl_cv_func_chown_slash_works
="guessing yes" ;;
8570 # Guess yes on musl systems.
8571 *-musl*) gl_cv_func_chown_slash_works
="guessing yes" ;;
8572 # If we don't know, obey --enable-cross-guesses.
8573 *) gl_cv_func_chown_slash_works
="$gl_cross_guess_normal" ;;
8577 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
8578 /* end confdefs.h. */
8590 if (symlink ("conftest.file", "conftest.link")) return 1;
8591 if (chown ("conftest.link/", getuid (), getgid ()) == 0) return 2;
8597 if ac_fn_c_try_run
"$LINENO"; then :
8598 gl_cv_func_chown_slash_works
=yes
8600 gl_cv_func_chown_slash_works
=no
8602 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
8603 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
8606 rm -f conftest.link conftest.
file
8608 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_slash_works" >&5
8609 $as_echo "$gl_cv_func_chown_slash_works" >&6; }
8610 case "$gl_cv_func_chown_slash_works" in
8614 $as_echo "#define CHOWN_TRAILING_SLASH_BUG 1" >>confdefs.h
8620 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether chown always updates ctime" >&5
8621 $as_echo_n "checking whether chown always updates ctime... " >&6; }
8622 if ${gl_cv_func_chown_ctime_works+:} false
; then :
8623 $as_echo_n "(cached) " >&6
8625 if test "$cross_compiling" = yes; then :
8627 # Guess yes on glibc systems.
8628 *-gnu*) gl_cv_func_chown_ctime_works
="guessing yes" ;;
8629 # Guess yes on musl systems.
8630 *-musl*) gl_cv_func_chown_ctime_works
="guessing yes" ;;
8631 # If we don't know, obey --enable-cross-guesses.
8632 *) gl_cv_func_chown_ctime_works
="$gl_cross_guess_normal" ;;
8636 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
8637 /* end confdefs.h. */
8643 #include <sys/stat.h>
8651 struct stat st1, st2;
8652 if (close (creat ("conftest.file", 0600))) return 1;
8653 if (stat ("conftest.file", &st1)) return 2;
8655 if (chown ("conftest.file", st1.st_uid, st1.st_gid)) return 3;
8656 if (stat ("conftest.file", &st2)) return 4;
8657 if (st2.st_ctime <= st1.st_ctime) return 5;
8663 if ac_fn_c_try_run
"$LINENO"; then :
8664 gl_cv_func_chown_ctime_works
=yes
8666 gl_cv_func_chown_ctime_works
=no
8668 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
8669 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
8674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_chown_ctime_works" >&5
8675 $as_echo "$gl_cv_func_chown_ctime_works" >&6; }
8676 case "$gl_cv_func_chown_ctime_works" in
8680 $as_echo "#define CHOWN_CHANGE_TIME_BUG 1" >>confdefs.h
8691 if test $ac_cv_func__set_invalid_parameter_handler = yes; then
8692 HAVE_MSVC_INVALID_PARAMETER_HANDLER
=1
8694 $as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h
8697 HAVE_MSVC_INVALID_PARAMETER_HANDLER
=0
8717 HAVE_DECL_FDOPENDIR
=1;
8724 REPLACE_FDOPENDIR
=0;
8739 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5
8740 $as_echo_n "checking if environ is properly declared... " >&6; }
8741 if ${gt_cv_var_environ_declaration+:} false
; then :
8742 $as_echo_n "(cached) " >&6
8744 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
8745 /* end confdefs.h. */
8749 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */
8752 extern struct { int foo; } environ;
8761 if ac_fn_c_try_compile
"$LINENO"; then :
8762 gt_cv_var_environ_declaration
=no
8764 gt_cv_var_environ_declaration
=yes
8766 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
8768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5
8769 $as_echo "$gt_cv_var_environ_declaration" >&6; }
8770 if test $gt_cv_var_environ_declaration = yes; then
8772 $as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h
8777 if test $gt_cv_var_environ_declaration != yes; then
8783 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5
8784 $as_echo_n "checking for complete errno.h... " >&6; }
8785 if ${gl_cv_header_errno_h_complete+:} false
; then :
8786 $as_echo_n "(cached) " >&6
8789 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
8790 /* end confdefs.h. */
8793 #if !defined ETXTBSY
8802 #if !defined ENOLINK
8808 #if !defined EMULTIHOP
8811 #if !defined EBADMSG
8814 #if !defined EOVERFLOW
8817 #if !defined ENOTSUP
8820 #if !defined ENETRESET
8823 #if !defined ECONNABORTED
8832 #if !defined ECANCELED
8835 #if !defined EOWNERDEAD
8838 #if !defined ENOTRECOVERABLE
8846 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8847 $EGREP "booboo" >/dev
/null
2>&1; then :
8848 gl_cv_header_errno_h_complete
=no
8850 gl_cv_header_errno_h_complete
=yes
8856 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5
8857 $as_echo "$gl_cv_header_errno_h_complete" >&6; }
8858 if test $gl_cv_header_errno_h_complete = yes; then
8869 if test $gl_cv_have_include_next = yes; then
8870 gl_cv_next_errno_h
='<'errno.h
'>'
8872 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5
8873 $as_echo_n "checking absolute name of <errno.h>... " >&6; }
8874 if ${gl_cv_next_errno_h+:} false
; then :
8875 $as_echo_n "(cached) " >&6
8880 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
8881 /* end confdefs.h. */
8885 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
8886 *) gl_absname_cpp
="$ac_cpp" ;;
8891 gl_dirsep_regex
='[/\\]'
8894 gl_dirsep_regex
='\/'
8897 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
8898 gl_header_literal_regex
=`echo 'errno.h' \
8899 | sed -e "$gl_make_literal_regex_sed"`
8900 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
8901 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
8907 gl_cv_absolute_errno_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
8908 sed -n "$gl_absolute_header_sed"`
8910 gl_header
=$gl_cv_absolute_errno_h
8911 gl_cv_next_errno_h
='"'$gl_header'"'
8915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5
8916 $as_echo "$gl_cv_next_errno_h" >&6; }
8918 NEXT_ERRNO_H
=$gl_cv_next_errno_h
8920 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
8921 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
8922 gl_next_as_first_directive
='<'errno.h
'>'
8924 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
8925 gl_next_as_first_directive
=$gl_cv_next_errno_h
8927 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H
=$gl_next_as_first_directive
8935 if test -n "$ERRNO_H"; then
8936 GL_GENERATE_ERRNO_H_TRUE
=
8937 GL_GENERATE_ERRNO_H_FALSE
='#'
8939 GL_GENERATE_ERRNO_H_TRUE
='#'
8940 GL_GENERATE_ERRNO_H_FALSE
=
8944 if test -n "$ERRNO_H"; then
8945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5
8946 $as_echo_n "checking for EMULTIHOP value... " >&6; }
8947 if ${gl_cv_header_errno_h_EMULTIHOP+:} false
; then :
8948 $as_echo_n "(cached) " >&6
8951 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
8952 /* end confdefs.h. */
8960 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8961 $EGREP "yes" >/dev
/null
2>&1; then :
8962 gl_cv_header_errno_h_EMULTIHOP
=yes
8964 gl_cv_header_errno_h_EMULTIHOP
=no
8968 if test $gl_cv_header_errno_h_EMULTIHOP = no
; then
8969 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
8970 /* end confdefs.h. */
8972 #define _XOPEN_SOURCE_EXTENDED 1
8979 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8980 $EGREP "yes" >/dev
/null
2>&1; then :
8981 gl_cv_header_errno_h_EMULTIHOP
=hidden
8985 if test $gl_cv_header_errno_h_EMULTIHOP = hidden
; then
8986 if ac_fn_c_compute_int
"$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" "
8987 #define _XOPEN_SOURCE_EXTENDED 1
8989 /* The following two lines are a workaround against an autoconf-2.52 bug. */
9000 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5
9001 $as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; }
9002 case $gl_cv_header_errno_h_EMULTIHOP in
9004 EMULTIHOP_HIDDEN
=0; EMULTIHOP_VALUE
=
9007 EMULTIHOP_HIDDEN
=1; EMULTIHOP_VALUE
="$gl_cv_header_errno_h_EMULTIHOP"
9015 if test -n "$ERRNO_H"; then
9016 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5
9017 $as_echo_n "checking for ENOLINK value... " >&6; }
9018 if ${gl_cv_header_errno_h_ENOLINK+:} false
; then :
9019 $as_echo_n "(cached) " >&6
9022 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
9023 /* end confdefs.h. */
9031 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9032 $EGREP "yes" >/dev
/null
2>&1; then :
9033 gl_cv_header_errno_h_ENOLINK
=yes
9035 gl_cv_header_errno_h_ENOLINK
=no
9039 if test $gl_cv_header_errno_h_ENOLINK = no
; then
9040 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
9041 /* end confdefs.h. */
9043 #define _XOPEN_SOURCE_EXTENDED 1
9050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9051 $EGREP "yes" >/dev
/null
2>&1; then :
9052 gl_cv_header_errno_h_ENOLINK
=hidden
9056 if test $gl_cv_header_errno_h_ENOLINK = hidden
; then
9057 if ac_fn_c_compute_int
"$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" "
9058 #define _XOPEN_SOURCE_EXTENDED 1
9060 /* The following two lines are a workaround against an autoconf-2.52 bug. */
9071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5
9072 $as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; }
9073 case $gl_cv_header_errno_h_ENOLINK in
9075 ENOLINK_HIDDEN
=0; ENOLINK_VALUE
=
9078 ENOLINK_HIDDEN
=1; ENOLINK_VALUE
="$gl_cv_header_errno_h_ENOLINK"
9086 if test -n "$ERRNO_H"; then
9087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5
9088 $as_echo_n "checking for EOVERFLOW value... " >&6; }
9089 if ${gl_cv_header_errno_h_EOVERFLOW+:} false
; then :
9090 $as_echo_n "(cached) " >&6
9093 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
9094 /* end confdefs.h. */
9102 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9103 $EGREP "yes" >/dev
/null
2>&1; then :
9104 gl_cv_header_errno_h_EOVERFLOW
=yes
9106 gl_cv_header_errno_h_EOVERFLOW
=no
9110 if test $gl_cv_header_errno_h_EOVERFLOW = no
; then
9111 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
9112 /* end confdefs.h. */
9114 #define _XOPEN_SOURCE_EXTENDED 1
9121 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
9122 $EGREP "yes" >/dev
/null
2>&1; then :
9123 gl_cv_header_errno_h_EOVERFLOW
=hidden
9127 if test $gl_cv_header_errno_h_EOVERFLOW = hidden
; then
9128 if ac_fn_c_compute_int
"$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" "
9129 #define _XOPEN_SOURCE_EXTENDED 1
9131 /* The following two lines are a workaround against an autoconf-2.52 bug. */
9142 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5
9143 $as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; }
9144 case $gl_cv_header_errno_h_EOVERFLOW in
9146 EOVERFLOW_HIDDEN
=0; EOVERFLOW_VALUE
=
9149 EOVERFLOW_HIDDEN
=1; EOVERFLOW_VALUE
="$gl_cv_header_errno_h_EOVERFLOW"
9157 ac_fn_c_check_decl
"$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
9158 if test "x$ac_cv_have_decl_strerror_r" = xyes
; then :
9164 cat >>confdefs.h
<<_ACEOF
9165 #define HAVE_DECL_STRERROR_R $ac_have_decl
9168 for ac_func
in strerror_r
9170 ac_fn_c_check_func
"$LINENO" "strerror_r" "ac_cv_func_strerror_r"
9171 if test "x$ac_cv_func_strerror_r" = xyes
; then :
9172 cat >>confdefs.h
<<_ACEOF
9173 #define HAVE_STRERROR_R 1
9179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5
9180 $as_echo_n "checking whether strerror_r returns char *... " >&6; }
9181 if ${ac_cv_func_strerror_r_char_p+:} false
; then :
9182 $as_echo_n "(cached) " >&6
9185 ac_cv_func_strerror_r_char_p
=no
9186 if test $ac_cv_have_decl_strerror_r = yes; then
9187 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
9188 /* end confdefs.h. */
9189 $ac_includes_default
9195 char x = *strerror_r (0, buf, sizeof buf);
9196 char *p = strerror_r (0, buf, sizeof buf);
9203 if ac_fn_c_try_compile
"$LINENO"; then :
9204 ac_cv_func_strerror_r_char_p
=yes
9206 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
9208 # strerror_r is not declared. Choose between
9209 # systems that have relatively inaccessible declarations for the
9210 # function. BeOS and DEC UNIX 4.0 fall in this category, but the
9211 # former has a strerror_r that returns char*, while the latter
9212 # has a strerror_r that returns `int'.
9213 # This test should segfault on the DEC system.
9214 if test "$cross_compiling" = yes; then :
9217 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
9218 /* end confdefs.h. */
9219 $ac_includes_default
9220 extern char *strerror_r ();
9225 char x = *strerror_r (0, buf, sizeof buf);
9226 return ! isalpha (x);
9231 if ac_fn_c_try_run
"$LINENO"; then :
9232 ac_cv_func_strerror_r_char_p
=yes
9234 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
9235 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
9241 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5
9242 $as_echo "$ac_cv_func_strerror_r_char_p" >&6; }
9243 if test $ac_cv_func_strerror_r_char_p = yes; then
9245 $as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h
9252 ac_fn_c_check_decl
"$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default"
9253 if test "x$ac_cv_have_decl_fchdir" = xyes
; then :
9259 cat >>confdefs.h
<<_ACEOF
9260 #define HAVE_DECL_FCHDIR $ac_have_decl
9266 GNULIB_NONBLOCKING
=0;
9287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5
9288 $as_echo_n "checking for working fcntl.h... " >&6; }
9289 if ${gl_cv_header_working_fcntl_h+:} false
; then :
9290 $as_echo_n "(cached) " >&6
9292 if test "$cross_compiling" = yes; then :
9294 # Guess 'no' on native Windows.
9295 mingw
*) gl_cv_header_working_fcntl_h
='no' ;;
9296 *) gl_cv_header_working_fcntl_h
=cross-compiling
;;
9300 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
9301 /* end confdefs.h. */
9302 #include <sys/types.h>
9303 #include <sys/stat.h>
9305 # include <unistd.h>
9306 #else /* on Windows with MSVC */
9308 # include <stdlib.h>
9309 # defined sleep(n) _sleep ((n) * 1000)
9320 #define O_NOFOLLOW 0
9322 static int const constants[] =
9324 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND,
9325 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY
9332 int result = !constants;
9335 static char const sym[] = "conftest.sym";
9336 if (symlink ("/dev/null", sym) != 0)
9340 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0);
9347 if (unlink (sym) != 0 || symlink (".", sym) != 0)
9351 int fd = open (sym, O_RDONLY | O_NOFOLLOW);
9362 static char const file[] = "confdefs.h";
9363 int fd = open (file, O_RDONLY | O_NOATIME);
9369 if (fstat (fd, &st0) != 0)
9375 if (read (fd, &c, 1) != 1)
9379 if (close (fd) != 0)
9384 if (stat (file, &st1) != 0)
9387 if (st0.st_atime != st1.st_atime)
9399 if ac_fn_c_try_run
"$LINENO"; then :
9400 gl_cv_header_working_fcntl_h
=yes
9403 4) gl_cv_header_working_fcntl_h
='no (bad O_NOFOLLOW)';; #(
9404 64) gl_cv_header_working_fcntl_h
='no (bad O_NOATIME)';; #(
9405 68) gl_cv_header_working_fcntl_h
='no (bad O_NOATIME, O_NOFOLLOW)';; #(
9406 *) gl_cv_header_working_fcntl_h
='no';;
9409 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
9410 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
9415 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5
9416 $as_echo "$gl_cv_header_working_fcntl_h" >&6; }
9418 case $gl_cv_header_working_fcntl_h in #(
9419 *O_NOATIME
* | no | cross-compiling
) ac_val
=0;; #(
9423 cat >>confdefs.h
<<_ACEOF
9424 #define HAVE_WORKING_O_NOATIME $ac_val
9428 case $gl_cv_header_working_fcntl_h in #(
9429 *O_NOFOLLOW
* | no | cross-compiling
) ac_val
=0;; #(
9433 cat >>confdefs.h
<<_ACEOF
9434 #define HAVE_WORKING_O_NOFOLLOW $ac_val
9439 ac_fn_c_check_type
"$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default
9441 if test "x$ac_cv_type_pid_t" = xyes
; then :
9444 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
9445 /* end confdefs.h. */
9447 #if defined _WIN64 && !defined __CYGWIN__
9460 if ac_fn_c_try_compile
"$LINENO"; then :
9463 gl_pid_type
='__int64'
9465 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
9467 cat >>confdefs.h
<<_ACEOF
9468 #define pid_t $gl_pid_type
9475 ac_fn_c_check_type
"$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default"
9476 if test "x$ac_cv_type_mode_t" = xyes
; then :
9480 cat >>confdefs.h
<<_ACEOF
9492 HAVE_DECL_STRNCASECMP
=1;
9516 if test $gl_cv_have_include_next = yes; then
9517 gl_cv_next_fnmatch_h
='<'fnmatch.h
'>'
9519 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5
9520 $as_echo_n "checking absolute name of <fnmatch.h>... " >&6; }
9521 if ${gl_cv_next_fnmatch_h+:} false
; then :
9522 $as_echo_n "(cached) " >&6
9525 if test $ac_cv_header_fnmatch_h = yes; then
9530 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
9531 /* end confdefs.h. */
9532 #include <fnmatch.h>
9535 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
9536 *) gl_absname_cpp
="$ac_cpp" ;;
9541 gl_dirsep_regex
='[/\\]'
9544 gl_dirsep_regex
='\/'
9547 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
9548 gl_header_literal_regex
=`echo 'fnmatch.h' \
9549 | sed -e "$gl_make_literal_regex_sed"`
9550 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
9551 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
9557 gl_cv_absolute_fnmatch_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
9558 sed -n "$gl_absolute_header_sed"`
9560 gl_header
=$gl_cv_absolute_fnmatch_h
9561 gl_cv_next_fnmatch_h
='"'$gl_header'"'
9563 gl_cv_next_fnmatch_h
='<'fnmatch.h
'>'
9568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5
9569 $as_echo "$gl_cv_next_fnmatch_h" >&6; }
9571 NEXT_FNMATCH_H
=$gl_cv_next_fnmatch_h
9573 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
9574 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
9575 gl_next_as_first_directive
='<'fnmatch.h
'>'
9577 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
9578 gl_next_as_first_directive
=$gl_cv_next_fnmatch_h
9580 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H
=$gl_next_as_first_directive
9588 if test $ac_cv_header_fnmatch_h = yes; then
9599 if test $ac_cv_header_fnmatch_h != yes; then
9605 if test -n "$FNMATCH_H"; then
9606 GL_GENERATE_FNMATCH_H_TRUE
=
9607 GL_GENERATE_FNMATCH_H_FALSE
='#'
9609 GL_GENERATE_FNMATCH_H_TRUE
='#'
9610 GL_GENERATE_FNMATCH_H_FALSE
=
9622 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5
9623 $as_echo_n "checking for mbstate_t... " >&6; }
9624 if ${ac_cv_type_mbstate_t+:} false
; then :
9625 $as_echo_n "(cached) " >&6
9627 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
9628 /* end confdefs.h. */
9629 $ac_includes_default
9634 mbstate_t x; return sizeof x;
9639 if ac_fn_c_try_compile
"$LINENO"; then :
9640 ac_cv_type_mbstate_t
=yes
9642 ac_cv_type_mbstate_t
=no
9644 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
9646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5
9647 $as_echo "$ac_cv_type_mbstate_t" >&6; }
9648 if test $ac_cv_type_mbstate_t = yes; then
9650 $as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h
9654 $as_echo "#define mbstate_t int" >>confdefs.h
9736 GNULIB_REMAINDERF
=0;
9737 GNULIB_REMAINDERL
=0;
9829 HAVE_DECL_COPYSIGNF
=1;
9846 HAVE_DECL_REMAINDER
=1;
9847 HAVE_DECL_REMAINDERL
=1;
9919 REPLACE_REMAINDER
=0;
9920 REPLACE_REMAINDERF
=0;
9921 REPLACE_REMAINDERL
=0;
9927 REPLACE_SIGNBIT_USING_BUILTINS
=0;
9939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5
9940 $as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; }
9941 if ${gl_cv_func_frexp_no_libm+:} false
; then :
9942 $as_echo_n "(cached) " >&6
9945 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
9946 /* end confdefs.h. */
9952 int e; return frexp (x, &e) > 0;
9957 if ac_fn_c_try_link
"$LINENO"; then :
9958 gl_cv_func_frexp_no_libm
=yes
9960 gl_cv_func_frexp_no_libm
=no
9962 rm -f core conftest.err conftest.
$ac_objext \
9963 conftest
$ac_exeext conftest.
$ac_ext
9966 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5
9967 $as_echo "$gl_cv_func_frexp_no_libm" >&6; }
9969 ac_fn_c_check_decl
"$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default"
9970 if test "x$ac_cv_have_decl_alarm" = xyes
; then :
9976 cat >>confdefs.h
<<_ACEOF
9977 #define HAVE_DECL_ALARM $ac_have_decl
9984 if test $gl_cv_func_frexp_no_libm = no
; then
9985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5
9986 $as_echo_n "checking whether frexp() can be used with libm... " >&6; }
9987 if ${gl_cv_func_frexp_in_libm+:} false
; then :
9988 $as_echo_n "(cached) " >&6
9993 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
9994 /* end confdefs.h. */
10000 int e; return frexp (x, &e) > 0;
10005 if ac_fn_c_try_link
"$LINENO"; then :
10006 gl_cv_func_frexp_in_libm
=yes
10008 gl_cv_func_frexp_in_libm
=no
10010 rm -f core conftest.err conftest.
$ac_objext \
10011 conftest
$ac_exeext conftest.
$ac_ext
10015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5
10016 $as_echo "$gl_cv_func_frexp_in_libm" >&6; }
10017 if test $gl_cv_func_frexp_in_libm = yes; then
10021 if test $gl_cv_func_frexp_no_libm = yes \
10022 ||
test $gl_cv_func_frexp_in_libm = yes; then
10024 LIBS
="$LIBS $FREXP_LIBM"
10028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5
10029 $as_echo_n "checking whether frexp works... " >&6; }
10030 if ${gl_cv_func_frexp_works+:} false
; then :
10031 $as_echo_n "(cached) " >&6
10034 if test "$cross_compiling" = yes; then :
10036 netbsd
* | irix
*) gl_cv_func_frexp_works
="guessing no" ;;
10037 mingw
*) # Guess yes with MSVC, no with mingw.
10038 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
10039 /* end confdefs.h. */
10046 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
10047 $EGREP "Good" >/dev
/null
2>&1; then :
10048 gl_cv_func_frexp_works
="guessing yes"
10050 gl_cv_func_frexp_works
="guessing no"
10055 *) gl_cv_func_frexp_works
="guessing yes" ;;
10059 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
10060 /* end confdefs.h. */
10064 #include <string.h>
10065 #if HAVE_DECL_ALARM
10066 # include <signal.h>
10067 # include <unistd.h>
10069 /* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0.
10070 ICC 10.0 has a bug when optimizing the expression -zero.
10071 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling
10072 to PowerPC on Mac OS X 10.5. */
10073 #if defined __hpux || defined __sgi || defined __ICC
10075 compute_minus_zero (void)
10077 return -DBL_MIN * DBL_MIN;
10079 # define minus_zero compute_minus_zero ()
10081 double minus_zero = -0.0;
10089 #if HAVE_DECL_ALARM
10090 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite
10091 number. Let the test fail in this case. */
10092 signal (SIGALRM, SIG_DFL);
10095 /* Test on denormalized numbers. */
10096 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5)
10101 double y = frexp (x, &exp);
10102 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022.
10103 On NetBSD: y = 0.75. Correct: y = 0.5. */
10107 /* Test on infinite numbers. */
10111 double y = frexp (x, &exp);
10115 /* Test on negative zero. */
10119 double y = frexp (x, &exp);
10120 if (memcmp (&y, &x, sizeof x))
10126 if ac_fn_c_try_run
"$LINENO"; then :
10127 gl_cv_func_frexp_works
=yes
10129 gl_cv_func_frexp_works
=no
10131 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
10132 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
10137 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5
10138 $as_echo "$gl_cv_func_frexp_works" >&6; }
10141 case "$gl_cv_func_frexp_works" in
10142 *yes) gl_func_frexp
=yes ;;
10143 *) gl_func_frexp
=no
; REPLACE_FREXP
=1; FREXP_LIBM
= ;;
10148 if test $gl_func_frexp = yes; then
10150 $as_echo "#define HAVE_FREXP 1" >>confdefs.h
10156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5
10157 $as_echo_n "checking whether long double and double are the same... " >&6; }
10158 if ${gl_cv_long_double_equals_double+:} false
; then :
10159 $as_echo_n "(cached) " >&6
10161 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
10162 /* end confdefs.h. */
10167 typedef int check[sizeof (long double) == sizeof (double)
10168 && LDBL_MANT_DIG == DBL_MANT_DIG
10169 && LDBL_MAX_EXP == DBL_MAX_EXP
10170 && LDBL_MIN_EXP == DBL_MIN_EXP
10177 if ac_fn_c_try_compile
"$LINENO"; then :
10178 gl_cv_long_double_equals_double
=yes
10180 gl_cv_long_double_equals_double
=no
10182 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
10185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5
10186 $as_echo "$gl_cv_long_double_equals_double" >&6; }
10187 if test $gl_cv_long_double_equals_double = yes; then
10189 $as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h
10191 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
=1
10193 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
=0
10203 ac_fn_c_check_decl
"$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h>
10205 if test "x$ac_cv_have_decl_frexpl" = xyes
; then :
10213 if test $HAVE_DECL_FREXPL = 1; then
10215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5
10216 $as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; }
10217 if ${gl_cv_func_frexpl_no_libm+:} false
; then :
10218 $as_echo_n "(cached) " >&6
10221 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
10222 /* end confdefs.h. */
10228 int e; return frexpl (x, &e) > 0;
10233 if ac_fn_c_try_link
"$LINENO"; then :
10234 gl_cv_func_frexpl_no_libm
=yes
10236 gl_cv_func_frexpl_no_libm
=no
10238 rm -f core conftest.err conftest.
$ac_objext \
10239 conftest
$ac_exeext conftest.
$ac_ext
10242 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5
10243 $as_echo "$gl_cv_func_frexpl_no_libm" >&6; }
10245 if test $gl_cv_func_frexpl_no_libm = no
; then
10246 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5
10247 $as_echo_n "checking whether frexpl() can be used with libm... " >&6; }
10248 if ${gl_cv_func_frexpl_in_libm+:} false
; then :
10249 $as_echo_n "(cached) " >&6
10254 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
10255 /* end confdefs.h. */
10261 int e; return frexpl (x, &e) > 0;
10266 if ac_fn_c_try_link
"$LINENO"; then :
10267 gl_cv_func_frexpl_in_libm
=yes
10269 gl_cv_func_frexpl_in_libm
=no
10271 rm -f core conftest.err conftest.
$ac_objext \
10272 conftest
$ac_exeext conftest.
$ac_ext
10276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5
10277 $as_echo "$gl_cv_func_frexpl_in_libm" >&6; }
10278 if test $gl_cv_func_frexpl_in_libm = yes; then
10282 if test $gl_cv_func_frexpl_no_libm = yes \
10283 ||
test $gl_cv_func_frexpl_in_libm = yes; then
10285 LIBS
="$LIBS $FREXPL_LIBM"
10288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5
10289 $as_echo_n "checking whether frexpl works... " >&6; }
10290 if ${gl_cv_func_frexpl_works+:} false
; then :
10291 $as_echo_n "(cached) " >&6
10294 if test "$cross_compiling" = yes; then :
10297 aix | aix
[3-6]* | beos
* | darwin
* | irix
* | mingw
* | pw
*)
10298 gl_cv_func_frexpl_works
="guessing no";;
10299 *) gl_cv_func_frexpl_works
="guessing yes";;
10303 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
10304 /* end confdefs.h. */
10308 /* Override the values of <float.h>, like done in float.in.h. */
10309 #if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__)
10310 # undef LDBL_MIN_EXP
10311 # define LDBL_MIN_EXP (-16381)
10313 #if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__)
10314 # undef LDBL_MIN_EXP
10315 # define LDBL_MIN_EXP (-16381)
10317 #if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__
10318 # undef LDBL_MIN_EXP
10319 # define LDBL_MIN_EXP DBL_MIN_EXP
10321 #if defined __sgi && (LDBL_MANT_DIG >= 106)
10322 # if defined __GNUC__
10323 # undef LDBL_MIN_EXP
10324 # define LDBL_MIN_EXP DBL_MIN_EXP
10331 long double frexpl (long double, int *);
10332 long double zero = 0.0L;
10336 volatile long double x;
10337 /* Test on finite numbers that fails on AIX 5.1. */
10345 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl
10346 function returns an invalid (incorrectly normalized) value: it returns
10347 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 }
10348 but the correct result is
10349 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */
10353 long double y = frexpl (x, &exp);
10354 if (!(exp == 1 && y == 0.505L))
10357 /* Test on large finite numbers. This fails on BeOS at i = 16322, while
10358 LDBL_MAX_EXP = 16384.
10359 In the loop end test, we test x against Infinity, rather than comparing
10360 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */
10363 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L)
10374 /* Test on denormalized numbers. */
10377 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L)
10382 long double y = frexpl (x, &exp);
10383 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932,
10384 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */
10385 if (exp != LDBL_MIN_EXP - 1)
10389 /* Test on infinite numbers. */
10390 /* The Microsoft MSVC 14 compiler chokes on the expression 1.0 / 0.0. */
10394 long double y = frexpl (x, &exp);
10401 if ac_fn_c_try_run
"$LINENO"; then :
10402 gl_cv_func_frexpl_works
=yes
10404 gl_cv_func_frexpl_works
=no
10406 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
10407 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
10412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5
10413 $as_echo "$gl_cv_func_frexpl_works" >&6; }
10416 case "$gl_cv_func_frexpl_works" in
10417 *yes) gl_func_frexpl
=yes ;;
10418 *) gl_func_frexpl
=no
; REPLACE_FREXPL
=1 ;;
10423 if test $gl_func_frexpl = yes; then
10425 $as_echo "#define HAVE_FREXPL 1" >>confdefs.h
10429 if test $HAVE_DECL_FREXPL = 0 ||
test $gl_func_frexpl = no
; then
10430 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then
10432 FREXPL_LIBM
="$FREXP_LIBM"
10454 GNULIB_UTIMENSAT
=0;
10455 GNULIB_OVERRIDES_STRUCT_STAT
=0;
10456 GNULIB_MDA_CHMOD
=1;
10457 GNULIB_MDA_MKDIR
=1;
10458 GNULIB_MDA_UMASK
=1;
10471 REPLACE_FCHMODAT
=0;
10474 REPLACE_FUTIMENS
=0;
10478 REPLACE_MKFIFOAT
=0;
10482 REPLACE_UTIMENSAT
=0;
10484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5
10485 $as_echo_n "checking whether stat file-mode macros are broken... " >&6; }
10486 if ${ac_cv_header_stat_broken+:} false
; then :
10487 $as_echo_n "(cached) " >&6
10489 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
10490 /* end confdefs.h. */
10491 #include <sys/types.h>
10492 #include <sys/stat.h>
10494 #if defined S_ISBLK && defined S_IFDIR
10495 extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1];
10498 #if defined S_ISBLK && defined S_IFCHR
10499 extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1];
10502 #if defined S_ISLNK && defined S_IFREG
10503 extern char c3[S_ISLNK (S_IFREG) ? -1 : 1];
10506 #if defined S_ISSOCK && defined S_IFREG
10507 extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1];
10511 if ac_fn_c_try_compile
"$LINENO"; then :
10512 ac_cv_header_stat_broken
=no
10514 ac_cv_header_stat_broken
=yes
10516 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
10518 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5
10519 $as_echo "$ac_cv_header_stat_broken" >&6; }
10520 if test $ac_cv_header_stat_broken = yes; then
10522 $as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h
10532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5
10533 $as_echo_n "checking for 64-bit off_t... " >&6; }
10534 if ${gl_cv_type_off_t_64+:} false
; then :
10535 $as_echo_n "(cached) " >&6
10537 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
10538 /* end confdefs.h. */
10539 #include <sys/types.h>
10540 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1];
10550 if ac_fn_c_try_compile
"$LINENO"; then :
10551 gl_cv_type_off_t_64
=yes
10553 gl_cv_type_off_t_64
=no
10555 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
10558 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5
10559 $as_echo "$gl_cv_type_off_t_64" >&6; }
10560 if test $gl_cv_type_off_t_64 = no
; then
10561 WINDOWS_64_BIT_OFF_T
=1
10563 WINDOWS_64_BIT_OFF_T
=0
10565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5
10566 $as_echo_n "checking for 64-bit st_size... " >&6; }
10567 if ${gl_cv_member_st_size_64+:} false
; then :
10568 $as_echo_n "(cached) " >&6
10570 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
10571 /* end confdefs.h. */
10572 #include <sys/types.h>
10574 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1];
10584 if ac_fn_c_try_compile
"$LINENO"; then :
10585 gl_cv_member_st_size_64
=yes
10587 gl_cv_member_st_size_64
=no
10589 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
10592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5
10593 $as_echo "$gl_cv_member_st_size_64" >&6; }
10594 if test $gl_cv_member_st_size_64 = no
; then
10595 WINDOWS_64_BIT_ST_SIZE
=1
10597 WINDOWS_64_BIT_ST_SIZE
=0
10601 WINDOWS_64_BIT_OFF_T
=0
10602 WINDOWS_64_BIT_ST_SIZE
=0
10606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5
10607 $as_echo_n "checking for C/C++ restrict keyword... " >&6; }
10608 if ${ac_cv_c_restrict+:} false
; then :
10609 $as_echo_n "(cached) " >&6
10611 ac_cv_c_restrict
=no
10612 # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see:
10613 # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html
10614 # Put 'restrict' last, because C++ lacks it.
10615 for ac_kw
in __restrict__ __restrict _Restrict restrict
; do
10616 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
10617 /* end confdefs.h. */
10618 typedef int *int_ptr;
10619 int foo (int_ptr $ac_kw ip) { return ip[0]; }
10620 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */
10621 int bar (int ip[$ac_kw]) { return ip[0]; }
10629 return foo (t) + bar (t);
10635 if ac_fn_c_try_compile
"$LINENO"; then :
10636 ac_cv_c_restrict
=$ac_kw
10638 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
10639 test "$ac_cv_c_restrict" != no
&& break
10643 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5
10644 $as_echo "$ac_cv_c_restrict" >&6; }
10646 case $ac_cv_c_restrict in
10648 no
) $as_echo "#define restrict /**/" >>confdefs.h
10650 *) cat >>confdefs.h
<<_ACEOF
10651 #define restrict $ac_cv_c_restrict
10670 if test $gl_cv_have_include_next = yes; then
10671 gl_cv_next_sys_stat_h
='<'sys
/stat.h
'>'
10673 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
10674 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
10675 if ${gl_cv_next_sys_stat_h+:} false
; then :
10676 $as_echo_n "(cached) " >&6
10679 if test $ac_cv_header_sys_stat_h = yes; then
10684 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
10685 /* end confdefs.h. */
10686 #include <sys/stat.h>
10689 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
10690 *) gl_absname_cpp
="$ac_cpp" ;;
10695 gl_dirsep_regex
='[/\\]'
10698 gl_dirsep_regex
='\/'
10701 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
10702 gl_header_literal_regex
=`echo 'sys/stat.h' \
10703 | sed -e "$gl_make_literal_regex_sed"`
10704 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
10705 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
10711 gl_cv_absolute_sys_stat_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
10712 sed -n "$gl_absolute_header_sed"`
10714 gl_header
=$gl_cv_absolute_sys_stat_h
10715 gl_cv_next_sys_stat_h
='"'$gl_header'"'
10717 gl_cv_next_sys_stat_h
='<'sys
/stat.h
'>'
10722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
10723 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
10725 NEXT_SYS_STAT_H
=$gl_cv_next_sys_stat_h
10727 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
10728 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
10729 gl_next_as_first_directive
='<'sys
/stat.h
'>'
10731 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
10732 gl_next_as_first_directive
=$gl_cv_next_sys_stat_h
10734 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
=$gl_next_as_first_directive
10743 WINDOWS_STAT_TIMESPEC
=0
10752 ac_fn_c_check_type
"$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
10753 #include <sys/stat.h>
10755 if test "x$ac_cv_type_nlink_t" = xyes
; then :
10759 $as_echo "#define nlink_t int" >>confdefs.h
10774 for ac_header
in sdkddkver.h
10776 ac_fn_c_check_header_mongrel
"$LINENO" "sdkddkver.h" "ac_cv_header_sdkddkver_h" "$ac_includes_default"
10777 if test "x$ac_cv_header_sdkddkver_h" = xyes
; then :
10778 cat >>confdefs.h
<<_ACEOF
10779 #define HAVE_SDKDDKVER_H 1
10793 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5
10794 $as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; }
10795 if ${gl_cv_func_getcwd_null+:} false
; then :
10796 $as_echo_n "(cached) " >&6
10798 if test "$cross_compiling" = yes; then :
10800 # Guess yes on glibc systems.
10801 *-gnu* | gnu
*) gl_cv_func_getcwd_null
="guessing yes";;
10802 # Guess yes on musl systems.
10803 *-musl*) gl_cv_func_getcwd_null
="guessing yes";;
10804 # Guess yes on Cygwin.
10805 cygwin
*) gl_cv_func_getcwd_null
="guessing yes";;
10806 # If we don't know, obey --enable-cross-guesses.
10807 *) gl_cv_func_getcwd_null
="$gl_cross_guess_normal";;
10811 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
10812 /* end confdefs.h. */
10814 # include <stdlib.h>
10816 # include <unistd.h>
10817 # else /* on Windows with MSVC */
10818 # include <direct.h>
10832 #if defined _WIN32 && ! defined __CYGWIN__
10833 /* mingw cwd does not start with '/', but _getcwd does allocate.
10834 However, mingw fails to honor non-zero size. */
10836 if (chdir ("/") != 0)
10840 char *f = getcwd (NULL, 0);
10844 { free (f); return 3; }
10846 { free (f); return 4; }
10856 if ac_fn_c_try_run
"$LINENO"; then :
10857 gl_cv_func_getcwd_null
=yes
10859 gl_cv_func_getcwd_null
=no
10861 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
10862 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
10866 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5
10867 $as_echo "$gl_cv_func_getcwd_null" >&6; }
10870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5
10871 $as_echo_n "checking for getcwd with POSIX signature... " >&6; }
10872 if ${gl_cv_func_getcwd_posix_signature+:} false
; then :
10873 $as_echo_n "(cached) " >&6
10875 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
10876 /* end confdefs.h. */
10877 #include <unistd.h>
10889 char *getcwd (char *, size_t);
10896 if ac_fn_c_try_compile
"$LINENO"; then :
10897 gl_cv_func_getcwd_posix_signature
=yes
10899 gl_cv_func_getcwd_posix_signature
=no
10901 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
10904 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5
10905 $as_echo "$gl_cv_func_getcwd_posix_signature" >&6; }
10907 ac_fn_c_check_decl
"$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default"
10908 if test "x$ac_cv_have_decl_getcwd" = xyes
; then :
10914 cat >>confdefs.h
<<_ACEOF
10915 #define HAVE_DECL_GETCWD $ac_have_decl
10927 GNULIB_FPRINTF_POSIX
=0;
10943 GNULIB_OBSTACK_PRINTF
=0;
10944 GNULIB_OBSTACK_PRINTF_POSIX
=0;
10949 GNULIB_PRINTF_POSIX
=0;
10958 GNULIB_SPRINTF_POSIX
=0;
10959 GNULIB_STDIO_H_NONBLOCKING
=0;
10960 GNULIB_STDIO_H_SIGPIPE
=0;
10962 GNULIB_VASPRINTF
=0;
10967 GNULIB_VFPRINTF_POSIX
=0;
10969 GNULIB_VPRINTF_POSIX
=0;
10970 GNULIB_VSNPRINTF
=0;
10971 GNULIB_VSPRINTF_POSIX
=0;
10972 GNULIB_MDA_FCLOSEALL
=1;
10973 GNULIB_MDA_FDOPEN
=1;
10974 GNULIB_MDA_FILENO
=1;
10977 GNULIB_MDA_TEMPNAM
=1;
10978 HAVE_DECL_FCLOSEALL
=1;
10979 HAVE_DECL_FPURGE
=1;
10980 HAVE_DECL_FSEEKO
=1;
10981 HAVE_DECL_FTELLO
=1;
10982 HAVE_DECL_GETDELIM
=1;
10983 HAVE_DECL_GETLINE
=1;
10984 HAVE_DECL_OBSTACK_PRINTF
=1;
10985 HAVE_DECL_SNPRINTF
=1;
10986 HAVE_DECL_VSNPRINTF
=1;
11007 REPLACE_GETDELIM
=0;
11009 REPLACE_OBSTACK_PRINTF
=0;
11015 REPLACE_RENAMEAT
=0;
11016 REPLACE_SNPRINTF
=0;
11018 REPLACE_STDIO_READ_FUNCS
=0;
11019 REPLACE_STDIO_WRITE_FUNCS
=0;
11021 REPLACE_VASPRINTF
=0;
11022 REPLACE_VDPRINTF
=0;
11023 REPLACE_VFPRINTF
=0;
11025 REPLACE_VSNPRINTF
=0;
11026 REPLACE_VSPRINTF
=0;
11028 ac_fn_c_check_decl
"$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default"
11029 if test "x$ac_cv_have_decl_getdelim" = xyes
; then :
11035 cat >>confdefs.h
<<_ACEOF
11036 #define HAVE_DECL_GETDELIM $ac_have_decl
11043 ac_fn_c_check_decl
"$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default"
11044 if test "x$ac_cv_have_decl_getdtablesize" = xyes
; then :
11050 cat >>confdefs.h
<<_ACEOF
11051 #define HAVE_DECL_GETDTABLESIZE $ac_have_decl
11054 ac_fn_c_check_decl
"$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default"
11055 if test "x$ac_cv_have_decl_getline" = xyes
; then :
11061 cat >>confdefs.h
<<_ACEOF
11062 #define HAVE_DECL_GETLINE $ac_have_decl
11065 ac_fn_c_check_decl
"$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default"
11066 if test "x$ac_cv_have_decl_getlogin_r" = xyes
; then :
11072 cat >>confdefs.h
<<_ACEOF
11073 #define HAVE_DECL_GETLOGIN_R $ac_have_decl
11078 ac_fn_c_check_decl
"$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default"
11079 if test "x$ac_cv_have_decl_getlogin" = xyes
; then :
11085 cat >>confdefs.h
<<_ACEOF
11086 #define HAVE_DECL_GETLOGIN $ac_have_decl
11093 LIB_GETLOGIN
='-ladvapi32' ;;
11104 GNULIB_GETRANDOM
=0;
11106 REPLACE_GETRANDOM
=0;
11111 GNULIB_GETTIMEOFDAY
=0;
11112 HAVE_GETTIMEOFDAY
=1;
11113 HAVE_STRUCT_TIMEVAL
=1;
11115 REPLACE_GETTIMEOFDAY
=0;
11116 REPLACE_STRUCT_TIMEVAL
=0;
11133 if test $gl_cv_have_include_next = yes; then
11134 gl_cv_next_sys_time_h
='<'sys
/time.h
'>'
11136 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5
11137 $as_echo_n "checking absolute name of <sys/time.h>... " >&6; }
11138 if ${gl_cv_next_sys_time_h+:} false
; then :
11139 $as_echo_n "(cached) " >&6
11142 if test $ac_cv_header_sys_time_h = yes; then
11147 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
11148 /* end confdefs.h. */
11149 #include <sys/time.h>
11152 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
11153 *) gl_absname_cpp
="$ac_cpp" ;;
11158 gl_dirsep_regex
='[/\\]'
11161 gl_dirsep_regex
='\/'
11164 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
11165 gl_header_literal_regex
=`echo 'sys/time.h' \
11166 | sed -e "$gl_make_literal_regex_sed"`
11167 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11168 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11174 gl_cv_absolute_sys_time_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11175 sed -n "$gl_absolute_header_sed"`
11177 gl_header
=$gl_cv_absolute_sys_time_h
11178 gl_cv_next_sys_time_h
='"'$gl_header'"'
11180 gl_cv_next_sys_time_h
='<'sys
/time.h
'>'
11185 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5
11186 $as_echo "$gl_cv_next_sys_time_h" >&6; }
11188 NEXT_SYS_TIME_H
=$gl_cv_next_sys_time_h
11190 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
11191 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11192 gl_next_as_first_directive
='<'sys
/time.h
'>'
11194 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11195 gl_next_as_first_directive
=$gl_cv_next_sys_time_h
11197 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H
=$gl_next_as_first_directive
11203 if test $ac_cv_header_sys_time_h != yes; then
11211 if test $ac_cv_header_sys_socket_h != yes; then
11212 for ac_header
in winsock2.h
11214 ac_fn_c_check_header_mongrel
"$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
11215 if test "x$ac_cv_header_winsock2_h" = xyes
; then :
11216 cat >>confdefs.h
<<_ACEOF
11217 #define HAVE_WINSOCK2_H 1
11225 if test "$ac_cv_header_winsock2_h" = yes; then
11227 UNISTD_H_HAVE_WINSOCK2_H
=1
11228 SYS_IOCTL_H_HAVE_WINSOCK2_H
=1
11234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5
11235 $as_echo_n "checking for struct timeval... " >&6; }
11236 if ${gl_cv_sys_struct_timeval+:} false
; then :
11237 $as_echo_n "(cached) " >&6
11239 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
11240 /* end confdefs.h. */
11241 #if HAVE_SYS_TIME_H
11242 #include <sys/time.h>
11245 #if HAVE_WINSOCK2_H
11246 # include <winsock2.h>
11252 static struct timeval x; x.tv_sec = x.tv_usec;
11257 if ac_fn_c_try_compile
"$LINENO"; then :
11258 gl_cv_sys_struct_timeval
=yes
11260 gl_cv_sys_struct_timeval
=no
11262 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
11265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5
11266 $as_echo "$gl_cv_sys_struct_timeval" >&6; }
11267 if test $gl_cv_sys_struct_timeval != yes; then
11268 HAVE_STRUCT_TIMEVAL
=0
11270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5
11271 $as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; }
11272 if ${gl_cv_sys_struct_timeval_tv_sec+:} false
; then :
11273 $as_echo_n "(cached) " >&6
11275 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
11276 /* end confdefs.h. */
11277 #if HAVE_SYS_TIME_H
11278 #include <sys/time.h>
11281 #if HAVE_WINSOCK2_H
11282 # include <winsock2.h>
11288 static struct timeval x;
11289 typedef int verify_tv_sec_type[
11290 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1
11297 if ac_fn_c_try_compile
"$LINENO"; then :
11298 gl_cv_sys_struct_timeval_tv_sec
=yes
11300 gl_cv_sys_struct_timeval_tv_sec
=no
11302 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
11305 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5
11306 $as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; }
11307 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then
11308 REPLACE_STRUCT_TIMEVAL
=1
11324 HAVE_GLOB_PATTERN_P
=1;
11326 REPLACE_GLOB_PATTERN_P
=0;
11344 if test $gl_cv_have_include_next = yes; then
11345 gl_cv_next_glob_h
='<'glob.h
'>'
11347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <glob.h>" >&5
11348 $as_echo_n "checking absolute name of <glob.h>... " >&6; }
11349 if ${gl_cv_next_glob_h+:} false
; then :
11350 $as_echo_n "(cached) " >&6
11353 if test $ac_cv_header_glob_h = yes; then
11358 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
11359 /* end confdefs.h. */
11363 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
11364 *) gl_absname_cpp
="$ac_cpp" ;;
11369 gl_dirsep_regex
='[/\\]'
11372 gl_dirsep_regex
='\/'
11375 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
11376 gl_header_literal_regex
=`echo 'glob.h' \
11377 | sed -e "$gl_make_literal_regex_sed"`
11378 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
11379 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
11385 gl_cv_absolute_glob_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
11386 sed -n "$gl_absolute_header_sed"`
11388 gl_header
=$gl_cv_absolute_glob_h
11389 gl_cv_next_glob_h
='"'$gl_header'"'
11391 gl_cv_next_glob_h
='<'glob.h
'>'
11396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_glob_h" >&5
11397 $as_echo "$gl_cv_next_glob_h" >&6; }
11399 NEXT_GLOB_H
=$gl_cv_next_glob_h
11401 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
11402 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
11403 gl_next_as_first_directive
='<'glob.h
'>'
11405 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
11406 gl_next_as_first_directive
=$gl_cv_next_glob_h
11408 NEXT_AS_FIRST_DIRECTIVE_GLOB_H
=$gl_next_as_first_directive
11414 if test $ac_cv_header_glob_h = yes; then
11425 if test $ac_cv_header_glob_h != yes; then
11431 if test -n "$GLOB_H"; then
11432 GL_GENERATE_GLOB_H_TRUE
=
11433 GL_GENERATE_GLOB_H_FALSE
='#'
11435 GL_GENERATE_GLOB_H_TRUE
='#'
11436 GL_GENERATE_GLOB_H_FALSE
=
11454 if test -z "$gl_pthreadlib_body_done"; then
11458 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
11459 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
11460 ac_fn_c_check_header_mongrel
"$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
11461 if test "x$ac_cv_header_pthread_h" = xyes
; then :
11462 gl_have_pthread_h
=yes
11464 gl_have_pthread_h
=no
11468 if test "$gl_have_pthread_h" = yes; then
11469 # Other possible tests:
11470 # -lpthreads (FSU threads, PCthreads)
11472 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
11473 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
11474 # the second one only in libpthread, and lock.c needs it.
11476 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
11477 # needs -pthread for some reason. See:
11478 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
11480 for gl_pthread
in '' '-pthread'; do
11481 LIBS
="$LIBS $gl_pthread"
11482 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
11483 /* end confdefs.h. */
11484 #include <pthread.h>
11486 pthread_mutexattr_t ma;
11491 pthread_mutex_lock (&m);
11492 pthread_mutexattr_init (&ma);
11497 if ac_fn_c_try_link
"$LINENO"; then :
11499 LIBPTHREAD
=$gl_pthread
11500 LIBPMULTITHREAD
=$gl_pthread
11502 rm -f core conftest.err conftest.
$ac_objext \
11503 conftest
$ac_exeext conftest.
$ac_ext
11505 test $gl_pthread_api = yes && break
11508 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
11509 # since it is defined as a macro on OSF/1.)
11510 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
11511 # The program links fine without libpthread. But it may actually
11512 # need to link with libpthread in order to create multiple threads.
11513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11514 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
11515 if ${ac_cv_lib_pthread_pthread_kill+:} false
; then :
11516 $as_echo_n "(cached) " >&6
11518 ac_check_lib_save_LIBS
=$LIBS
11519 LIBS
="-lpthread $LIBS"
11520 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
11521 /* end confdefs.h. */
11523 /* Override any GCC internal prototype to avoid an error.
11524 Use char because int might match the return type of a GCC
11525 builtin and then its argument prototype would still apply. */
11529 char pthread_kill ();
11533 return pthread_kill ();
11538 if ac_fn_c_try_link
"$LINENO"; then :
11539 ac_cv_lib_pthread_pthread_kill
=yes
11541 ac_cv_lib_pthread_pthread_kill
=no
11543 rm -f core conftest.err conftest.
$ac_objext \
11544 conftest
$ac_exeext conftest.
$ac_ext
11545 LIBS
=$ac_check_lib_save_LIBS
11547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11548 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
11549 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
; then :
11550 LIBPMULTITHREAD
=-lpthread
11551 # On Solaris and HP-UX, most pthread functions exist also in libc.
11552 # Therefore pthread_in_use() needs to actually try to create a
11553 # thread: pthread_create from libc will fail, whereas
11554 # pthread_create will actually create a thread.
11555 # On Solaris 10 or newer, this test is no longer needed, because
11556 # libc contains the fully functional pthread functions.
11558 solaris | solaris2.1
-9 | solaris2.1
-9.
* | hpux
*)
11560 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
11566 elif test $gl_pthread_api != yes; then
11567 # Some library is needed. Try libpthread and libc_r.
11568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
11569 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
11570 if ${ac_cv_lib_pthread_pthread_kill+:} false
; then :
11571 $as_echo_n "(cached) " >&6
11573 ac_check_lib_save_LIBS
=$LIBS
11574 LIBS
="-lpthread $LIBS"
11575 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
11576 /* end confdefs.h. */
11578 /* Override any GCC internal prototype to avoid an error.
11579 Use char because int might match the return type of a GCC
11580 builtin and then its argument prototype would still apply. */
11584 char pthread_kill ();
11588 return pthread_kill ();
11593 if ac_fn_c_try_link
"$LINENO"; then :
11594 ac_cv_lib_pthread_pthread_kill
=yes
11596 ac_cv_lib_pthread_pthread_kill
=no
11598 rm -f core conftest.err conftest.
$ac_objext \
11599 conftest
$ac_exeext conftest.
$ac_ext
11600 LIBS
=$ac_check_lib_save_LIBS
11602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
11603 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
11604 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
; then :
11606 LIBPTHREAD
=-lpthread
11607 LIBPMULTITHREAD
=-lpthread
11610 if test $gl_pthread_api != yes; then
11612 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
11613 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
11614 if ${ac_cv_lib_c_r_pthread_kill+:} false
; then :
11615 $as_echo_n "(cached) " >&6
11617 ac_check_lib_save_LIBS
=$LIBS
11619 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
11620 /* end confdefs.h. */
11622 /* Override any GCC internal prototype to avoid an error.
11623 Use char because int might match the return type of a GCC
11624 builtin and then its argument prototype would still apply. */
11628 char pthread_kill ();
11632 return pthread_kill ();
11637 if ac_fn_c_try_link
"$LINENO"; then :
11638 ac_cv_lib_c_r_pthread_kill
=yes
11640 ac_cv_lib_c_r_pthread_kill
=no
11642 rm -f core conftest.err conftest.
$ac_objext \
11643 conftest
$ac_exeext conftest.
$ac_ext
11644 LIBS
=$ac_check_lib_save_LIBS
11646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
11647 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
11648 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
; then :
11651 LIBPMULTITHREAD
=-lc_r
11657 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
11658 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
11659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
11660 $as_echo "$gl_pthread_api" >&6; }
11663 if test $gl_pthread_api = yes; then
11665 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
11669 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
11670 /* end confdefs.h. */
11680 if ac_fn_c_try_link
"$LINENO"; then :
11684 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
11685 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
11686 if ${ac_cv_lib_rt_sched_yield+:} false
; then :
11687 $as_echo_n "(cached) " >&6
11689 ac_check_lib_save_LIBS
=$LIBS
11691 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
11692 /* end confdefs.h. */
11694 /* Override any GCC internal prototype to avoid an error.
11695 Use char because int might match the return type of a GCC
11696 builtin and then its argument prototype would still apply. */
11700 char sched_yield ();
11704 return sched_yield ();
11709 if ac_fn_c_try_link
"$LINENO"; then :
11710 ac_cv_lib_rt_sched_yield
=yes
11712 ac_cv_lib_rt_sched_yield
=no
11714 rm -f core conftest.err conftest.
$ac_objext \
11715 conftest
$ac_exeext conftest.
$ac_ext
11716 LIBS
=$ac_check_lib_save_LIBS
11718 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
11719 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
11720 if test "x$ac_cv_lib_rt_sched_yield" = xyes
; then :
11721 LIB_SCHED_YIELD
=-lrt
11723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
11724 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
11725 if ${ac_cv_lib_posix4_sched_yield+:} false
; then :
11726 $as_echo_n "(cached) " >&6
11728 ac_check_lib_save_LIBS
=$LIBS
11729 LIBS
="-lposix4 $LIBS"
11730 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
11731 /* end confdefs.h. */
11733 /* Override any GCC internal prototype to avoid an error.
11734 Use char because int might match the return type of a GCC
11735 builtin and then its argument prototype would still apply. */
11739 char sched_yield ();
11743 return sched_yield ();
11748 if ac_fn_c_try_link
"$LINENO"; then :
11749 ac_cv_lib_posix4_sched_yield
=yes
11751 ac_cv_lib_posix4_sched_yield
=no
11753 rm -f core conftest.err conftest.
$ac_objext \
11754 conftest
$ac_exeext conftest.
$ac_ext
11755 LIBS
=$ac_check_lib_save_LIBS
11757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
11758 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
11759 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
; then :
11760 LIB_SCHED_YIELD
=-lposix4
11767 rm -f core conftest.err conftest.
$ac_objext \
11768 conftest
$ac_exeext conftest.
$ac_ext
11771 gl_pthreadlib_body_done
=done
11782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
11783 $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
11784 if ${gl_cv_func_setlocale_null_all_mtsafe+:} false
; then :
11785 $as_echo_n "(cached) " >&6
11788 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
11789 *-musl* | darwin
* | freebsd
* | netbsd
* | openbsd
* | aix
* | haiku
* | cygwin
*)
11790 gl_cv_func_setlocale_null_all_mtsafe
=no
;;
11791 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
11792 *-gnu* | gnu
* | hpux
* | irix
* | solaris
* | mingw
*)
11793 gl_cv_func_setlocale_null_all_mtsafe
=yes ;;
11794 # If we don't know, obey --enable-cross-guesses.
11796 gl_cv_func_setlocale_null_all_mtsafe
="$gl_cross_guess_normal" ;;
11800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
11801 $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
11805 if test $gl_pthread_api = no
&& test $ac_cv_header_threads_h = no
; then
11806 gl_cv_func_setlocale_null_all_mtsafe
="trivially yes"
11810 case "$gl_cv_func_setlocale_null_all_mtsafe" in
11811 *yes) SETLOCALE_NULL_ALL_MTSAFE
=1 ;;
11812 *) SETLOCALE_NULL_ALL_MTSAFE
=0 ;;
11815 cat >>confdefs.h
<<_ACEOF
11816 #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
11820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
11821 $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
11822 if ${gl_cv_func_setlocale_null_one_mtsafe+:} false
; then :
11823 $as_echo_n "(cached) " >&6
11826 # Guess no on OpenBSD, AIX.
11828 gl_cv_func_setlocale_null_one_mtsafe
=no
;;
11829 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
11830 *-gnu* | gnu
* |
*-musl* | darwin
* | freebsd
* | netbsd
* | hpux
* | irix
* | solaris
* | haiku
* | cygwin
* | mingw
*)
11831 gl_cv_func_setlocale_null_one_mtsafe
=yes ;;
11832 # If we don't know, obey --enable-cross-guesses.
11834 gl_cv_func_setlocale_null_one_mtsafe
="$gl_cross_guess_normal" ;;
11838 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
11839 $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
11843 if test $gl_pthread_api = no
&& test $ac_cv_header_threads_h = no
; then
11844 gl_cv_func_setlocale_null_one_mtsafe
="trivially yes"
11848 case "$gl_cv_func_setlocale_null_one_mtsafe" in
11849 *yes) SETLOCALE_NULL_ONE_MTSAFE
=1 ;;
11850 *) SETLOCALE_NULL_ONE_MTSAFE
=0 ;;
11853 cat >>confdefs.h
<<_ACEOF
11854 #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
11858 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 ||
test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
11860 mingw
*) LIB_SETLOCALE_NULL
= ;;
11864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
11865 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
11866 if ${gl_cv_have_weak+:} false
; then :
11867 $as_echo_n "(cached) " >&6
11870 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
11871 /* end confdefs.h. */
11872 extern void xyzzy ();
11882 if ac_fn_c_try_link
"$LINENO"; then :
11883 gl_cv_have_weak
=maybe
11885 rm -f core conftest.err conftest.
$ac_objext \
11886 conftest
$ac_exeext conftest.
$ac_ext
11887 if test $gl_cv_have_weak = maybe
; then
11888 if test "$cross_compiling" = yes; then :
11889 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
11890 /* end confdefs.h. */
11892 Extensible Linking Format
11896 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11897 $EGREP "Extensible Linking Format" >/dev
/null
2>&1; then :
11898 gl_cv_have_weak
="guessing yes"
11900 gl_cv_have_weak
="guessing no"
11906 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
11907 /* end confdefs.h. */
11913 return (fputs == NULL);
11916 if ac_fn_c_try_run
"$LINENO"; then :
11917 gl_cv_have_weak
=yes
11921 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
11922 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
11926 case " $LDFLAGS " in
11927 *" -static "*) gl_cv_have_weak
=no
;;
11929 case "$gl_cv_have_weak" in
11932 freebsd
* | dragonfly
*)
11934 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c
-lpthread >&5 2>&1
11935 cat <<EOF > conftest2.c
11936 #include <pthread.h>
11937 #pragma weak pthread_mutexattr_gettype
11940 return (pthread_mutexattr_gettype != NULL);
11943 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so
>&5 2>&1 \
11944 || gl_cv_have_weak
=no
11945 rm -f conftest1.c libempty.so conftest2.c conftest
11952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
11953 $as_echo "$gl_cv_have_weak" >&6; }
11954 case "$gl_cv_have_weak" in
11957 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
11962 case "$gl_cv_have_weak" in
11963 *yes) LIB_SETLOCALE_NULL
= ;;
11964 *) LIB_SETLOCALE_NULL
="$LIBPTHREAD" ;;
11969 LIB_SETLOCALE_NULL
=
11980 GNULIB_GETPEERNAME
=0;
11981 GNULIB_GETSOCKNAME
=0;
11982 GNULIB_GETSOCKOPT
=0;
11988 GNULIB_SETSOCKOPT
=0;
11991 HAVE_STRUCT_SOCKADDR_STORAGE
=1;
11992 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
=1;
11994 HAVE_SA_FAMILY_T
=1;
12004 $as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h
12009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5
12010 $as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; }
12011 if ${gl_cv_header_sys_socket_h_selfcontained+:} false
; then :
12012 $as_echo_n "(cached) " >&6
12015 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
12016 /* end confdefs.h. */
12017 #include <sys/socket.h>
12026 if ac_fn_c_try_compile
"$LINENO"; then :
12027 gl_cv_header_sys_socket_h_selfcontained
=yes
12029 gl_cv_header_sys_socket_h_selfcontained
=no
12031 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
12034 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5
12035 $as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; }
12036 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then
12037 for ac_func
in shutdown
12039 ac_fn_c_check_func
"$LINENO" "shutdown" "ac_cv_func_shutdown"
12040 if test "x$ac_cv_func_shutdown" = xyes
; then :
12041 cat >>confdefs.h
<<_ACEOF
12042 #define HAVE_SHUTDOWN 1
12048 if test $ac_cv_func_shutdown = yes; then
12049 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5
12050 $as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; }
12051 if ${gl_cv_header_sys_socket_h_shut+:} false
; then :
12052 $as_echo_n "(cached) " >&6
12055 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
12056 /* end confdefs.h. */
12057 #include <sys/socket.h>
12061 int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR };
12066 if ac_fn_c_try_compile
"$LINENO"; then :
12067 gl_cv_header_sys_socket_h_shut
=yes
12069 gl_cv_header_sys_socket_h_shut
=no
12071 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
12074 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5
12075 $as_echo "$gl_cv_header_sys_socket_h_shut" >&6; }
12076 if test $gl_cv_header_sys_socket_h_shut = no
; then
12077 SYS_SOCKET_H
='sys/socket.h'
12081 # We need to check for ws2tcpip.h now.
12093 if test $gl_cv_have_include_next = yes; then
12094 gl_cv_next_sys_socket_h
='<'sys
/socket.h
'>'
12096 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5
12097 $as_echo_n "checking absolute name of <sys/socket.h>... " >&6; }
12098 if ${gl_cv_next_sys_socket_h+:} false
; then :
12099 $as_echo_n "(cached) " >&6
12102 if test $ac_cv_header_sys_socket_h = yes; then
12107 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
12108 /* end confdefs.h. */
12109 #include <sys/socket.h>
12112 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
12113 *) gl_absname_cpp
="$ac_cpp" ;;
12118 gl_dirsep_regex
='[/\\]'
12121 gl_dirsep_regex
='\/'
12124 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
12125 gl_header_literal_regex
=`echo 'sys/socket.h' \
12126 | sed -e "$gl_make_literal_regex_sed"`
12127 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12128 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12134 gl_cv_absolute_sys_socket_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12135 sed -n "$gl_absolute_header_sed"`
12137 gl_header
=$gl_cv_absolute_sys_socket_h
12138 gl_cv_next_sys_socket_h
='"'$gl_header'"'
12140 gl_cv_next_sys_socket_h
='<'sys
/socket.h
'>'
12145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5
12146 $as_echo "$gl_cv_next_sys_socket_h" >&6; }
12148 NEXT_SYS_SOCKET_H
=$gl_cv_next_sys_socket_h
12150 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
12151 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12152 gl_next_as_first_directive
='<'sys
/socket.h
'>'
12154 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12155 gl_next_as_first_directive
=$gl_cv_next_sys_socket_h
12157 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H
=$gl_next_as_first_directive
12162 if test $ac_cv_header_sys_socket_h = yes; then
12163 HAVE_SYS_SOCKET_H
=1
12165 HAVE_SYS_SOCKET_H
=0
12170 if test $ac_cv_header_sys_socket_h = yes; then
12173 if test $ac_cv_header_ws2tcpip_h = yes; then
12182 ac_fn_c_check_type
"$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" "
12183 /* sys/types.h is not needed according to POSIX, but the
12184 sys/socket.h in i386-unknown-freebsd4.10 and
12185 powerpc-apple-darwin5.5 required it. */
12186 #include <sys/types.h>
12187 #ifdef HAVE_SYS_SOCKET_H
12188 #include <sys/socket.h>
12190 #ifdef HAVE_WS2TCPIP_H
12191 #include <ws2tcpip.h>
12195 if test "x$ac_cv_type_struct_sockaddr_storage" = xyes
; then :
12197 cat >>confdefs.h
<<_ACEOF
12198 #define HAVE_STRUCT_SOCKADDR_STORAGE 1
12203 ac_fn_c_check_type
"$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" "
12204 /* sys/types.h is not needed according to POSIX, but the
12205 sys/socket.h in i386-unknown-freebsd4.10 and
12206 powerpc-apple-darwin5.5 required it. */
12207 #include <sys/types.h>
12208 #ifdef HAVE_SYS_SOCKET_H
12209 #include <sys/socket.h>
12211 #ifdef HAVE_WS2TCPIP_H
12212 #include <ws2tcpip.h>
12216 if test "x$ac_cv_type_sa_family_t" = xyes
; then :
12218 cat >>confdefs.h
<<_ACEOF
12219 #define HAVE_SA_FAMILY_T 1
12225 if test $ac_cv_type_struct_sockaddr_storage = no
; then
12226 HAVE_STRUCT_SOCKADDR_STORAGE
=0
12228 if test $ac_cv_type_sa_family_t = no
; then
12231 if test $ac_cv_type_struct_sockaddr_storage != no
; then
12232 ac_fn_c_check_member
"$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h>
12233 #ifdef HAVE_SYS_SOCKET_H
12234 #include <sys/socket.h>
12236 #ifdef HAVE_WS2TCPIP_H
12237 #include <ws2tcpip.h>
12241 if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes
; then :
12243 cat >>confdefs.h
<<_ACEOF
12244 #define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1
12249 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY
=0
12253 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 ||
test $HAVE_SA_FAMILY_T = 0 \
12254 ||
test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then
12255 SYS_SOCKET_H
='sys/socket.h'
12261 if test $ac_cv_header_sys_socket_h != yes; then
12262 for ac_header
in winsock2.h
12264 ac_fn_c_check_header_mongrel
"$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
12265 if test "x$ac_cv_header_winsock2_h" = xyes
; then :
12266 cat >>confdefs.h
<<_ACEOF
12267 #define HAVE_WINSOCK2_H 1
12275 if test "$ac_cv_header_winsock2_h" = yes; then
12277 UNISTD_H_HAVE_WINSOCK2_H
=1
12278 SYS_IOCTL_H_HAVE_WINSOCK2_H
=1
12297 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5
12298 $as_echo_n "checking for IPv4 sockets... " >&6; }
12299 if ${gl_cv_socket_ipv4+:} false
; then :
12300 $as_echo_n "(cached) " >&6
12302 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
12303 /* end confdefs.h. */
12304 #include <sys/types.h>
12305 #ifdef HAVE_SYS_SOCKET_H
12306 #include <sys/socket.h>
12308 #ifdef HAVE_NETINET_IN_H
12309 #include <netinet/in.h>
12311 #ifdef HAVE_WINSOCK2_H
12312 #include <winsock2.h>
12317 int x = AF_INET; struct in_addr y; struct sockaddr_in z;
12318 if (&x && &y && &z) return 0;
12323 if ac_fn_c_try_compile
"$LINENO"; then :
12324 gl_cv_socket_ipv4
=yes
12326 gl_cv_socket_ipv4
=no
12328 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
12330 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5
12331 $as_echo "$gl_cv_socket_ipv4" >&6; }
12332 if test $gl_cv_socket_ipv4 = yes; then
12334 $as_echo "#define HAVE_IPV4 1" >>confdefs.h
12338 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5
12339 $as_echo_n "checking for IPv6 sockets... " >&6; }
12340 if ${gl_cv_socket_ipv6+:} false
; then :
12341 $as_echo_n "(cached) " >&6
12343 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
12344 /* end confdefs.h. */
12345 #include <sys/types.h>
12346 #ifdef HAVE_SYS_SOCKET_H
12347 #include <sys/socket.h>
12349 #ifdef HAVE_NETINET_IN_H
12350 #include <netinet/in.h>
12352 #ifdef HAVE_WINSOCK2_H
12353 #include <winsock2.h>
12355 #ifdef HAVE_WS2TCPIP_H
12356 #include <ws2tcpip.h>
12361 int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z;
12362 if (&x && &y && &z) return 0;
12367 if ac_fn_c_try_compile
"$LINENO"; then :
12368 gl_cv_socket_ipv6
=yes
12370 gl_cv_socket_ipv6
=no
12372 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
12374 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5
12375 $as_echo "$gl_cv_socket_ipv6" >&6; }
12376 if test $gl_cv_socket_ipv6 = yes; then
12378 $as_echo "#define HAVE_IPV6 1" >>confdefs.h
12394 if test $gl_cv_have_include_next = yes; then
12395 gl_cv_next_limits_h
='<'limits.h
'>'
12397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5
12398 $as_echo_n "checking absolute name of <limits.h>... " >&6; }
12399 if ${gl_cv_next_limits_h+:} false
; then :
12400 $as_echo_n "(cached) " >&6
12403 if test $ac_cv_header_limits_h = yes; then
12408 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
12409 /* end confdefs.h. */
12410 #include <limits.h>
12413 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
12414 *) gl_absname_cpp
="$ac_cpp" ;;
12419 gl_dirsep_regex
='[/\\]'
12422 gl_dirsep_regex
='\/'
12425 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
12426 gl_header_literal_regex
=`echo 'limits.h' \
12427 | sed -e "$gl_make_literal_regex_sed"`
12428 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12429 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12435 gl_cv_absolute_limits_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12436 sed -n "$gl_absolute_header_sed"`
12438 gl_header
=$gl_cv_absolute_limits_h
12439 gl_cv_next_limits_h
='"'$gl_header'"'
12441 gl_cv_next_limits_h
='<'limits.h
'>'
12446 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5
12447 $as_echo "$gl_cv_next_limits_h" >&6; }
12449 NEXT_LIMITS_H
=$gl_cv_next_limits_h
12451 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
12452 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12453 gl_next_as_first_directive
='<'limits.h
'>'
12455 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12456 gl_next_as_first_directive
=$gl_cv_next_limits_h
12458 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H
=$gl_next_as_first_directive
12464 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5
12465 $as_echo_n "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; }
12466 if ${gl_cv_header_limits_width+:} false
; then :
12467 $as_echo_n "(cached) " >&6
12469 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
12470 /* end confdefs.h. */
12471 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
12472 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
12474 #include <limits.h>
12475 long long llm = LLONG_MAX;
12477 int ullw = ULLONG_WIDTH;
12487 if ac_fn_c_try_compile
"$LINENO"; then :
12488 gl_cv_header_limits_width
=yes
12490 gl_cv_header_limits_width
=no
12492 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
12494 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5
12495 $as_echo "$gl_cv_header_limits_width" >&6; }
12496 if test "$gl_cv_header_limits_width" = yes; then
12502 if test -n "$LIMITS_H"; then
12503 GL_GENERATE_LIMITS_H_TRUE
=
12504 GL_GENERATE_LIMITS_H_FALSE
='#'
12506 GL_GENERATE_LIMITS_H_TRUE
='#'
12507 GL_GENERATE_LIMITS_H_FALSE
=
12512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5
12513 $as_echo_n "checking for wint_t... " >&6; }
12514 if ${gt_cv_c_wint_t+:} false
; then :
12515 $as_echo_n "(cached) " >&6
12517 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
12518 /* end confdefs.h. */
12520 wint_t foo = (wchar_t)'\0';
12529 if ac_fn_c_try_compile
"$LINENO"; then :
12534 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
12536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5
12537 $as_echo "$gt_cv_c_wint_t" >&6; }
12538 if test $gt_cv_c_wint_t = yes; then
12540 $as_echo "#define HAVE_WINT_T 1" >>confdefs.h
12543 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5
12544 $as_echo_n "checking whether wint_t is large enough... " >&6; }
12545 if ${gl_cv_type_wint_t_large_enough+:} false
; then :
12546 $as_echo_n "(cached) " >&6
12548 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
12549 /* end confdefs.h. */
12551 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
12561 if ac_fn_c_try_compile
"$LINENO"; then :
12562 gl_cv_type_wint_t_large_enough
=yes
12564 gl_cv_type_wint_t_large_enough
=no
12566 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
12568 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5
12569 $as_echo "$gl_cv_type_wint_t_large_enough" >&6; }
12570 if test $gl_cv_type_wint_t_large_enough = no
; then
12571 GNULIB_OVERRIDES_WINT_T
=1
12573 GNULIB_OVERRIDES_WINT_T
=0
12576 GNULIB_OVERRIDES_WINT_T
=0
12587 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler produces multi-arch binaries" >&5
12588 $as_echo_n "checking whether the compiler produces multi-arch binaries... " >&6; }
12589 if ${gl_cv_c_multiarch+:} false
; then :
12590 $as_echo_n "(cached) " >&6
12592 gl_cv_c_multiarch
=no
12593 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
12594 /* end confdefs.h. */
12595 #ifndef __APPLE_CC__
12596 not a universal capable compiler
12601 if ac_fn_c_try_compile
"$LINENO"; then :
12605 for word
in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do
12606 if test -n "$prev"; then
12608 i?
86 | x86_64 | ppc | ppc64 | arm | arm64
)
12609 if test -z "$arch" ||
test "$arch" = "$word"; then
12612 gl_cv_c_multiarch
=yes
12618 if test "x$word" = "x-arch"; then
12625 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
12628 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_multiarch" >&5
12629 $as_echo "$gl_cv_c_multiarch" >&6; }
12630 if test $gl_cv_c_multiarch = yes; then
12631 APPLE_UNIVERSAL_BUILD
=1
12633 APPLE_UNIVERSAL_BUILD
=0
12643 $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h
12646 $as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h
12650 if test $ac_cv_header_wchar_h = yes; then
12658 if test $ac_cv_header_inttypes_h = yes; then
12666 if test $ac_cv_header_sys_types_h = yes; then
12682 if test $gl_cv_have_include_next = yes; then
12683 gl_cv_next_stdint_h
='<'stdint.h
'>'
12685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5
12686 $as_echo_n "checking absolute name of <stdint.h>... " >&6; }
12687 if ${gl_cv_next_stdint_h+:} false
; then :
12688 $as_echo_n "(cached) " >&6
12691 if test $ac_cv_header_stdint_h = yes; then
12696 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
12697 /* end confdefs.h. */
12698 #include <stdint.h>
12701 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
12702 *) gl_absname_cpp
="$ac_cpp" ;;
12707 gl_dirsep_regex
='[/\\]'
12710 gl_dirsep_regex
='\/'
12713 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
12714 gl_header_literal_regex
=`echo 'stdint.h' \
12715 | sed -e "$gl_make_literal_regex_sed"`
12716 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
12717 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
12723 gl_cv_absolute_stdint_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
12724 sed -n "$gl_absolute_header_sed"`
12726 gl_header
=$gl_cv_absolute_stdint_h
12727 gl_cv_next_stdint_h
='"'$gl_header'"'
12729 gl_cv_next_stdint_h
='<'stdint.h
'>'
12734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5
12735 $as_echo "$gl_cv_next_stdint_h" >&6; }
12737 NEXT_STDINT_H
=$gl_cv_next_stdint_h
12739 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
12740 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
12741 gl_next_as_first_directive
='<'stdint.h
'>'
12743 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
12744 gl_next_as_first_directive
=$gl_cv_next_stdint_h
12746 NEXT_AS_FIRST_DIRECTIVE_STDINT_H
=$gl_next_as_first_directive
12751 if test $ac_cv_header_stdint_h = yes; then
12758 if test $ac_cv_header_stdint_h = yes; then
12759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5
12760 $as_echo_n "checking whether stdint.h conforms to C99... " >&6; }
12761 if ${gl_cv_header_working_stdint_h+:} false
; then :
12762 $as_echo_n "(cached) " >&6
12764 gl_cv_header_working_stdint_h
=no
12765 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
12766 /* end confdefs.h. */
12769 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12770 #define __STDC_CONSTANT_MACROS 1
12771 #define __STDC_LIMIT_MACROS 1
12772 #include <stdint.h>
12773 /* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */
12774 #if !(defined WCHAR_MIN && defined WCHAR_MAX)
12775 #error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>"
12779 #include <stddef.h>
12780 #include <signal.h>
12782 # include <wchar.h>
12787 int8_t a1 = INT8_MAX;
12788 int8_t a1min = INT8_MIN;
12791 int16_t a2 = INT16_MAX;
12792 int16_t a2min = INT16_MIN;
12795 int32_t a3 = INT32_MAX;
12796 int32_t a3min = INT32_MIN;
12799 int64_t a4 = INT64_MAX;
12800 int64_t a4min = INT64_MIN;
12803 uint8_t b1 = UINT8_MAX;
12805 typedef int b1[(unsigned char) -1 != 255 ? 1 : -1];
12808 uint16_t b2 = UINT16_MAX;
12811 uint32_t b3 = UINT32_MAX;
12814 uint64_t b4 = UINT64_MAX;
12816 int_least8_t c1 = INT8_C (0x7f);
12817 int_least8_t c1max = INT_LEAST8_MAX;
12818 int_least8_t c1min = INT_LEAST8_MIN;
12819 int_least16_t c2 = INT16_C (0x7fff);
12820 int_least16_t c2max = INT_LEAST16_MAX;
12821 int_least16_t c2min = INT_LEAST16_MIN;
12822 int_least32_t c3 = INT32_C (0x7fffffff);
12823 int_least32_t c3max = INT_LEAST32_MAX;
12824 int_least32_t c3min = INT_LEAST32_MIN;
12825 int_least64_t c4 = INT64_C (0x7fffffffffffffff);
12826 int_least64_t c4max = INT_LEAST64_MAX;
12827 int_least64_t c4min = INT_LEAST64_MIN;
12828 uint_least8_t d1 = UINT8_C (0xff);
12829 uint_least8_t d1max = UINT_LEAST8_MAX;
12830 uint_least16_t d2 = UINT16_C (0xffff);
12831 uint_least16_t d2max = UINT_LEAST16_MAX;
12832 uint_least32_t d3 = UINT32_C (0xffffffff);
12833 uint_least32_t d3max = UINT_LEAST32_MAX;
12834 uint_least64_t d4 = UINT64_C (0xffffffffffffffff);
12835 uint_least64_t d4max = UINT_LEAST64_MAX;
12836 int_fast8_t e1 = INT_FAST8_MAX;
12837 int_fast8_t e1min = INT_FAST8_MIN;
12838 int_fast16_t e2 = INT_FAST16_MAX;
12839 int_fast16_t e2min = INT_FAST16_MIN;
12840 int_fast32_t e3 = INT_FAST32_MAX;
12841 int_fast32_t e3min = INT_FAST32_MIN;
12842 int_fast64_t e4 = INT_FAST64_MAX;
12843 int_fast64_t e4min = INT_FAST64_MIN;
12844 uint_fast8_t f1 = UINT_FAST8_MAX;
12845 uint_fast16_t f2 = UINT_FAST16_MAX;
12846 uint_fast32_t f3 = UINT_FAST32_MAX;
12847 uint_fast64_t f4 = UINT_FAST64_MAX;
12849 intptr_t g = INTPTR_MAX;
12850 intptr_t gmin = INTPTR_MIN;
12853 uintptr_t h = UINTPTR_MAX;
12855 intmax_t i = INTMAX_MAX;
12856 uintmax_t j = UINTMAX_MAX;
12858 /* Check that SIZE_MAX has the correct type, if possible. */
12859 #if 201112 <= __STDC_VERSION__
12860 int k = _Generic (SIZE_MAX, size_t: 0);
12861 #elif (2 <= __GNUC__ || 4 <= __clang_major__ || defined __IBM__TYPEOF__ \
12862 || (0x5110 <= __SUNPRO_C && !__STDC__))
12864 extern __typeof__ (SIZE_MAX) k;
12867 #include <limits.h> /* for CHAR_BIT */
12868 #define TYPE_MINIMUM(t) \
12869 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t)))
12870 #define TYPE_MAXIMUM(t) \
12871 ((t) ((t) 0 < (t) -1 \
12873 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1)))
12876 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t)
12877 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t)
12879 /* Detect bug in FreeBSD 6.0 / ia64. */
12880 int check_SIG_ATOMIC:
12881 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t)
12882 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t)
12884 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1;
12886 WCHAR_MIN == TYPE_MINIMUM (wchar_t)
12887 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t)
12889 /* Detect bug in mingw. */
12891 WINT_MIN == TYPE_MINIMUM (wint_t)
12892 && WINT_MAX == TYPE_MAXIMUM (wint_t)
12895 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */
12897 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1;
12898 int check_UINT16_C:
12899 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1;
12901 /* Detect bugs in OpenBSD 3.9 stdint.h. */
12903 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1;
12906 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1;
12909 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1;
12912 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1;
12914 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1;
12915 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1;
12916 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1;
12917 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1;
12918 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1;
12919 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1;
12920 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1;
12921 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1;
12922 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1;
12923 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1;
12924 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1;
12935 if ac_fn_c_try_compile
"$LINENO"; then :
12936 if test "$cross_compiling" = yes; then :
12938 # Guess yes on native Windows.
12939 mingw
*) gl_cv_header_working_stdint_h
="guessing yes" ;;
12940 # In general, assume it works.
12941 *) gl_cv_header_working_stdint_h
="guessing yes" ;;
12945 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
12946 /* end confdefs.h. */
12949 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
12950 #define __STDC_CONSTANT_MACROS 1
12951 #define __STDC_LIMIT_MACROS 1
12952 #include <stdint.h>
12955 #include <stddef.h>
12956 #include <signal.h>
12958 # include <wchar.h>
12963 #include <string.h>
12964 #define MVAL(macro) MVAL1(macro)
12965 #define MVAL1(expression) #expression
12966 static const char *macro_values[] =
13000 for (mv = macro_values; *mv != NULL; mv++)
13002 const char *value = *mv;
13003 /* Test whether it looks like a cast expression. */
13004 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0
13005 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0
13006 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0
13007 || strncmp (value, "((int)"/*)*/, 6) == 0
13008 || strncmp (value, "((signed short)"/*)*/, 15) == 0
13009 || strncmp (value, "((signed char)"/*)*/, 14) == 0)
13010 return mv - macro_values + 1;
13018 if ac_fn_c_try_run
"$LINENO"; then :
13019 gl_cv_header_working_stdint_h
=yes
13021 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
13022 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
13027 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
13030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5
13031 $as_echo "$gl_cv_header_working_stdint_h" >&6; }
13034 HAVE_C99_STDINT_H
=0
13035 HAVE_SYS_BITYPES_H
=0
13036 HAVE_SYS_INTTYPES_H
=0
13038 case "$gl_cv_header_working_stdint_h" in
13040 HAVE_C99_STDINT_H
=1
13041 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h works without ISO C predefines" >&5
13042 $as_echo_n "checking whether stdint.h works without ISO C predefines... " >&6; }
13043 if ${gl_cv_header_stdint_without_STDC_macros+:} false
; then :
13044 $as_echo_n "(cached) " >&6
13046 gl_cv_header_stdint_without_STDC_macros
=no
13047 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
13048 /* end confdefs.h. */
13051 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */
13052 #include <stdint.h>
13055 #include <stddef.h>
13056 #include <signal.h>
13058 # include <wchar.h>
13062 intmax_t im = INTMAX_MAX;
13063 int32_t i32 = INT32_C (0x7fffffff);
13073 if ac_fn_c_try_compile
"$LINENO"; then :
13074 gl_cv_header_stdint_without_STDC_macros
=yes
13076 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
13079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_without_STDC_macros" >&5
13080 $as_echo "$gl_cv_header_stdint_without_STDC_macros" >&6; }
13082 if test $gl_cv_header_stdint_without_STDC_macros = no
; then
13084 $as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h
13087 $as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h
13090 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5
13091 $as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; }
13092 if ${gl_cv_header_stdint_width+:} false
; then :
13093 $as_echo_n "(cached) " >&6
13095 gl_cv_header_stdint_width
=no
13096 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
13097 /* end confdefs.h. */
13099 /* Work if build is not clean. */
13100 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1
13101 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__
13102 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1
13104 #include <stdint.h>
13106 #include <stddef.h>
13107 #include <signal.h>
13109 # include <wchar.h>
13112 int iw = UINTMAX_WIDTH;
13122 if ac_fn_c_try_compile
"$LINENO"; then :
13123 gl_cv_header_stdint_width
=yes
13125 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
13127 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5
13128 $as_echo "$gl_cv_header_stdint_width" >&6; }
13129 if test "$gl_cv_header_stdint_width" = yes; then
13134 for ac_header
in sys
/inttypes.h sys
/bitypes.h
13136 as_ac_Header
=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
13137 ac_fn_c_check_header_mongrel
"$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
13138 if eval test \"x\$
"$as_ac_Header"\" = x
"yes"; then :
13139 cat >>confdefs.h
<<_ACEOF
13140 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
13147 if test $ac_cv_header_sys_inttypes_h = yes; then
13148 HAVE_SYS_INTTYPES_H
=1
13150 if test $ac_cv_header_sys_bitypes_h = yes; then
13151 HAVE_SYS_BITYPES_H
=1
13155 if test $APPLE_UNIVERSAL_BUILD = 0; then
13158 for gltype
in ptrdiff_t size_t
; do
13159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13160 $as_echo_n "checking for bit size of $gltype... " >&6; }
13161 if eval \
${gl_cv_bitsizeof_${gltype}+:} false
; then :
13162 $as_echo_n "(cached) " >&6
13164 if ac_fn_c_compute_int
"$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
13165 #include <stddef.h>
13166 #include <signal.h>
13168 # include <wchar.h>
13171 #include <limits.h>"; then :
13177 eval gl_cv_bitsizeof_
${gltype}=\
$result
13180 eval ac_res
=\
$gl_cv_bitsizeof_${gltype}
13181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13182 $as_echo "$ac_res" >&6; }
13183 eval result
=\
$gl_cv_bitsizeof_${gltype}
13184 if test $result = unknown
; then
13187 GLTYPE
=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13188 cat >>confdefs.h
<<_ACEOF
13189 #define BITSIZEOF_${GLTYPE} $result
13192 eval BITSIZEOF_
${GLTYPE}=\
$result
13199 for gltype
in sig_atomic_t wchar_t wint_t
; do
13200 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5
13201 $as_echo_n "checking for bit size of $gltype... " >&6; }
13202 if eval \
${gl_cv_bitsizeof_${gltype}+:} false
; then :
13203 $as_echo_n "(cached) " >&6
13205 if ac_fn_c_compute_int
"$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" "
13206 #include <stddef.h>
13207 #include <signal.h>
13209 # include <wchar.h>
13212 #include <limits.h>"; then :
13218 eval gl_cv_bitsizeof_
${gltype}=\
$result
13221 eval ac_res
=\
$gl_cv_bitsizeof_${gltype}
13222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13223 $as_echo "$ac_res" >&6; }
13224 eval result
=\
$gl_cv_bitsizeof_${gltype}
13225 if test $result = unknown
; then
13228 GLTYPE
=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13229 cat >>confdefs.h
<<_ACEOF
13230 #define BITSIZEOF_${GLTYPE} $result
13233 eval BITSIZEOF_
${GLTYPE}=\
$result
13239 for gltype
in sig_atomic_t wchar_t wint_t
; do
13240 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5
13241 $as_echo_n "checking whether $gltype is signed... " >&6; }
13242 if eval \
${gl_cv_type_${gltype}_signed+:} false
; then :
13243 $as_echo_n "(cached) " >&6
13245 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
13246 /* end confdefs.h. */
13248 #include <stddef.h>
13249 #include <signal.h>
13251 # include <wchar.h>
13254 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1];
13263 if ac_fn_c_try_compile
"$LINENO"; then :
13268 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
13269 eval gl_cv_type_
${gltype}_signed
=\
$result
13272 eval ac_res
=\
$gl_cv_type_${gltype}_signed
13273 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13274 $as_echo "$ac_res" >&6; }
13275 eval result
=\
$gl_cv_type_${gltype}_signed
13276 GLTYPE
=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13277 if test "$result" = yes; then
13278 cat >>confdefs.h
<<_ACEOF
13279 #define HAVE_SIGNED_${GLTYPE} 1
13282 eval HAVE_SIGNED_
${GLTYPE}=1
13284 eval HAVE_SIGNED_
${GLTYPE}=0
13289 gl_cv_type_ptrdiff_t_signed
=yes
13290 gl_cv_type_size_t_signed
=no
13291 if test $APPLE_UNIVERSAL_BUILD = 0; then
13294 for gltype
in ptrdiff_t size_t
; do
13295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13296 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13297 if eval \
${gl_cv_type_${gltype}_suffix+:} false
; then :
13298 $as_echo_n "(cached) " >&6
13300 eval gl_cv_type_
${gltype}_suffix
=no
13301 eval result
=\
$gl_cv_type_${gltype}_signed
13302 if test "$result" = yes; then
13307 for glsuf
in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64
; do
13309 '') gltype1
='int';;
13310 l
) gltype1
='long int';;
13311 ll
) gltype1
='long long int';;
13312 i64
) gltype1
='__int64';;
13313 u
) gltype1
='unsigned int';;
13314 ul
) gltype1
='unsigned long int';;
13315 ull
) gltype1
='unsigned long long int';;
13316 ui64
)gltype1
='unsigned __int64';;
13318 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
13319 /* end confdefs.h. */
13321 #include <stddef.h>
13322 #include <signal.h>
13324 # include <wchar.h>
13327 extern $gltype foo;
13328 extern $gltype1 foo;
13337 if ac_fn_c_try_compile
"$LINENO"; then :
13338 eval gl_cv_type_
${gltype}_suffix
=\
$glsuf
13340 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
13341 eval result
=\
$gl_cv_type_${gltype}_suffix
13342 test "$result" != no
&& break
13345 eval ac_res
=\
$gl_cv_type_${gltype}_suffix
13346 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13347 $as_echo "$ac_res" >&6; }
13348 GLTYPE
=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13349 eval result
=\
$gl_cv_type_${gltype}_suffix
13350 test "$result" = no
&& result
=
13351 eval ${GLTYPE}_SUFFIX
=\
$result
13352 cat >>confdefs.h
<<_ACEOF
13353 #define ${GLTYPE}_SUFFIX $result
13362 for gltype
in sig_atomic_t wchar_t wint_t
; do
13363 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5
13364 $as_echo_n "checking for $gltype integer literal suffix... " >&6; }
13365 if eval \
${gl_cv_type_${gltype}_suffix+:} false
; then :
13366 $as_echo_n "(cached) " >&6
13368 eval gl_cv_type_
${gltype}_suffix
=no
13369 eval result
=\
$gl_cv_type_${gltype}_signed
13370 if test "$result" = yes; then
13375 for glsuf
in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64
; do
13377 '') gltype1
='int';;
13378 l
) gltype1
='long int';;
13379 ll
) gltype1
='long long int';;
13380 i64
) gltype1
='__int64';;
13381 u
) gltype1
='unsigned int';;
13382 ul
) gltype1
='unsigned long int';;
13383 ull
) gltype1
='unsigned long long int';;
13384 ui64
)gltype1
='unsigned __int64';;
13386 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
13387 /* end confdefs.h. */
13389 #include <stddef.h>
13390 #include <signal.h>
13392 # include <wchar.h>
13395 extern $gltype foo;
13396 extern $gltype1 foo;
13405 if ac_fn_c_try_compile
"$LINENO"; then :
13406 eval gl_cv_type_
${gltype}_suffix
=\
$glsuf
13408 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
13409 eval result
=\
$gl_cv_type_${gltype}_suffix
13410 test "$result" != no
&& break
13413 eval ac_res
=\
$gl_cv_type_${gltype}_suffix
13414 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
13415 $as_echo "$ac_res" >&6; }
13416 GLTYPE
=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'`
13417 eval result
=\
$gl_cv_type_${gltype}_suffix
13418 test "$result" = no
&& result
=
13419 eval ${GLTYPE}_SUFFIX
=\
$result
13420 cat >>confdefs.h
<<_ACEOF
13421 #define ${GLTYPE}_SUFFIX $result
13428 if test $GNULIB_OVERRIDES_WINT_T = 1; then
13429 BITSIZEOF_WINT_T
=32
13437 LIMITS_H
='limits.h'
13438 if test -n "$LIMITS_H"; then
13439 GL_GENERATE_LIMITS_H_TRUE
=
13440 GL_GENERATE_LIMITS_H_FALSE
='#'
13442 GL_GENERATE_LIMITS_H_TRUE
='#'
13443 GL_GENERATE_LIMITS_H_FALSE
=
13452 if test -n "$STDINT_H"; then
13453 GL_GENERATE_STDINT_H_TRUE
=
13454 GL_GENERATE_STDINT_H_FALSE
='#'
13456 GL_GENERATE_STDINT_H_TRUE
='#'
13457 GL_GENERATE_STDINT_H_FALSE
=
13464 GNULIB_STRTOIMAX
=0;
13465 GNULIB_STRTOUMAX
=0;
13466 HAVE_DECL_IMAXABS
=1;
13467 HAVE_DECL_IMAXDIV
=1;
13468 HAVE_DECL_STRTOIMAX
=1;
13469 HAVE_DECL_STRTOUMAX
=1;
13471 REPLACE_STRTOIMAX
=0;
13472 REPLACE_STRTOUMAX
=0;
13473 INT32_MAX_LT_INTMAX_MAX
=1;
13474 INT64_MAX_EQ_LONG_MAX
='defined _LP64';
13475 PRIPTR_PREFIX
=__PRIPTR_PREFIX
;
13476 UINT32_MAX_LT_UINTMAX_MAX
=1;
13477 UINT64_MAX_EQ_ULONG_MAX
='defined _LP64';
13493 if test $gl_cv_have_include_next = yes; then
13494 gl_cv_next_inttypes_h
='<'inttypes.h
'>'
13496 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5
13497 $as_echo_n "checking absolute name of <inttypes.h>... " >&6; }
13498 if ${gl_cv_next_inttypes_h+:} false
; then :
13499 $as_echo_n "(cached) " >&6
13502 if test $ac_cv_header_inttypes_h = yes; then
13507 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
13508 /* end confdefs.h. */
13509 #include <inttypes.h>
13512 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
13513 *) gl_absname_cpp
="$ac_cpp" ;;
13518 gl_dirsep_regex
='[/\\]'
13521 gl_dirsep_regex
='\/'
13524 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
13525 gl_header_literal_regex
=`echo 'inttypes.h' \
13526 | sed -e "$gl_make_literal_regex_sed"`
13527 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
13528 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
13534 gl_cv_absolute_inttypes_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
13535 sed -n "$gl_absolute_header_sed"`
13537 gl_header
=$gl_cv_absolute_inttypes_h
13538 gl_cv_next_inttypes_h
='"'$gl_header'"'
13540 gl_cv_next_inttypes_h
='<'inttypes.h
'>'
13545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5
13546 $as_echo "$gl_cv_next_inttypes_h" >&6; }
13548 NEXT_INTTYPES_H
=$gl_cv_next_inttypes_h
13550 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
13551 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
13552 gl_next_as_first_directive
='<'inttypes.h
'>'
13554 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
13555 gl_next_as_first_directive
=$gl_cv_next_inttypes_h
13557 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H
=$gl_next_as_first_directive
13574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5
13575 $as_echo_n "checking where to find the exponent in a 'double'... " >&6; }
13576 if ${gl_cv_cc_double_expbit0+:} false
; then :
13577 $as_echo_n "(cached) " >&6
13580 if test "$cross_compiling" = yes; then :
13582 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
13583 /* end confdefs.h. */
13585 #if defined arm || defined __arm || defined __arm__
13590 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13591 $EGREP "mixed_endianness" >/dev
/null
2>&1; then :
13592 gl_cv_cc_double_expbit0
="unknown"
13596 if ${ac_cv_c_bigendian+:} false
; then :
13597 $as_echo_n "(cached) " >&6
13599 ac_cv_c_bigendian
=unknown
13600 # See if we're dealing with a universal compiler.
13601 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
13602 /* end confdefs.h. */
13603 #ifndef __APPLE_CC__
13604 not a universal capable compiler
13609 if ac_fn_c_try_compile
"$LINENO"; then :
13611 # Check for potential -arch flags. It is not universal unless
13612 # there are at least two -arch flags with different values.
13615 for ac_word
in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13616 if test -n "$ac_prev"; then
13618 i?
86 | x86_64 | ppc | ppc64
)
13619 if test -z "$ac_arch" ||
test "$ac_arch" = "$ac_word"; then
13622 ac_cv_c_bigendian
=universal
13628 elif test "x$ac_word" = "x-arch"; then
13633 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
13634 if test $ac_cv_c_bigendian = unknown
; then
13635 # See if sys/param.h defines the BYTE_ORDER macro.
13636 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
13637 /* end confdefs.h. */
13638 #include <sys/types.h>
13639 #include <sys/param.h>
13644 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13645 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13647 bogus endian macros
13654 if ac_fn_c_try_compile
"$LINENO"; then :
13655 # It does; now see whether it defined to BIG_ENDIAN or not.
13656 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
13657 /* end confdefs.h. */
13658 #include <sys/types.h>
13659 #include <sys/param.h>
13664 #if BYTE_ORDER != BIG_ENDIAN
13672 if ac_fn_c_try_compile
"$LINENO"; then :
13673 ac_cv_c_bigendian
=yes
13675 ac_cv_c_bigendian
=no
13677 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
13679 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
13681 if test $ac_cv_c_bigendian = unknown
; then
13682 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
13683 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
13684 /* end confdefs.h. */
13685 #include <limits.h>
13690 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
13691 bogus endian macros
13698 if ac_fn_c_try_compile
"$LINENO"; then :
13699 # It does; now see whether it defined to _BIG_ENDIAN or not.
13700 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
13701 /* end confdefs.h. */
13702 #include <limits.h>
13707 #ifndef _BIG_ENDIAN
13715 if ac_fn_c_try_compile
"$LINENO"; then :
13716 ac_cv_c_bigendian
=yes
13718 ac_cv_c_bigendian
=no
13720 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
13722 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
13724 if test $ac_cv_c_bigendian = unknown
; then
13725 # Compile a test program.
13726 if test "$cross_compiling" = yes; then :
13727 # Try to guess by grepping values from an object file.
13728 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
13729 /* end confdefs.h. */
13730 short int ascii_mm[] =
13731 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
13732 short int ascii_ii[] =
13733 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
13734 int use_ascii (int i) {
13735 return ascii_mm[i] + ascii_ii[i];
13737 short int ebcdic_ii[] =
13738 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
13739 short int ebcdic_mm[] =
13740 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
13741 int use_ebcdic (int i) {
13742 return ebcdic_mm[i] + ebcdic_ii[i];
13749 return use_ascii (foo) == use_ebcdic (foo);
13754 if ac_fn_c_try_compile
"$LINENO"; then :
13755 if grep BIGenDianSyS conftest.
$ac_objext >/dev
/null
; then
13756 ac_cv_c_bigendian
=yes
13758 if grep LiTTleEnDian conftest.
$ac_objext >/dev
/null
; then
13759 if test "$ac_cv_c_bigendian" = unknown
; then
13760 ac_cv_c_bigendian
=no
13762 # finding both strings is unlikely to happen, but who knows?
13763 ac_cv_c_bigendian
=unknown
13767 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
13769 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
13770 /* end confdefs.h. */
13771 $ac_includes_default
13776 /* Are we little or big endian? From Harbison&Steele. */
13780 char c[sizeof (long int)];
13783 return u.c[sizeof (long int) - 1] == 1;
13789 if ac_fn_c_try_run
"$LINENO"; then :
13790 ac_cv_c_bigendian
=no
13792 ac_cv_c_bigendian
=yes
13794 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
13795 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
13801 case $ac_cv_c_bigendian in #(
13803 gl_cv_cc_double_expbit0
="word 0 bit 20";; #(
13805 gl_cv_cc_double_expbit0
="word 1 bit 20" ;; #(
13808 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
13812 gl_cv_cc_double_expbit0
="unknown" ;;
13821 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
13822 /* end confdefs.h. */
13825 #include <stddef.h>
13827 #include <string.h>
13829 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
13830 typedef union { double value; unsigned int word[NWORDS]; } memory_double;
13831 static unsigned int ored_words[NWORDS];
13832 static unsigned int anded_words[NWORDS];
13833 static void add_to_ored_words (double x)
13837 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */
13838 memset (&m, 0, sizeof (memory_double));
13840 for (i = 0; i < NWORDS; i++)
13842 ored_words[i] |= m.word[i];
13843 anded_words[i] &= m.word[i];
13849 FILE *fp = fopen ("conftest.out", "w");
13852 for (j = 0; j < NWORDS; j++)
13853 anded_words[j] = ~ (unsigned int) 0;
13854 add_to_ored_words (0.25);
13855 add_to_ored_words (0.5);
13856 add_to_ored_words (1.0);
13857 add_to_ored_words (2.0);
13858 add_to_ored_words (4.0);
13859 /* Remove bits that are common (e.g. if representation of the first mantissa
13860 bit is explicit). */
13861 for (j = 0; j < NWORDS; j++)
13862 ored_words[j] &= ~anded_words[j];
13863 /* Now find the nonzero word. */
13864 for (j = 0; j < NWORDS; j++)
13865 if (ored_words[j] != 0)
13870 for (i = j + 1; i < NWORDS; i++)
13871 if (ored_words[i] != 0)
13873 fprintf (fp, "unknown");
13874 return (fclose (fp) != 0);
13877 if ((ored_words[j] >> i) & 1)
13879 fprintf (fp, "word %d bit %d", (int) j, (int) i);
13880 return (fclose (fp) != 0);
13883 fprintf (fp, "unknown");
13884 return (fclose (fp) != 0);
13888 if ac_fn_c_try_run
"$LINENO"; then :
13889 gl_cv_cc_double_expbit0
=`cat conftest.out`
13891 gl_cv_cc_double_expbit0
="unknown"
13893 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
13894 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
13900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5
13901 $as_echo "$gl_cv_cc_double_expbit0" >&6; }
13902 case "$gl_cv_cc_double_expbit0" in
13904 word
=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
13905 bit
=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'`
13907 cat >>confdefs.h
<<_ACEOF
13908 #define DBL_EXPBIT0_WORD $word
13912 cat >>confdefs.h
<<_ACEOF
13913 #define DBL_EXPBIT0_BIT $bit
13920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
13921 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
13922 if ${ac_cv_c_bigendian+:} false
; then :
13923 $as_echo_n "(cached) " >&6
13925 ac_cv_c_bigendian
=unknown
13926 # See if we're dealing with a universal compiler.
13927 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
13928 /* end confdefs.h. */
13929 #ifndef __APPLE_CC__
13930 not a universal capable compiler
13935 if ac_fn_c_try_compile
"$LINENO"; then :
13937 # Check for potential -arch flags. It is not universal unless
13938 # there are at least two -arch flags with different values.
13941 for ac_word
in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
13942 if test -n "$ac_prev"; then
13944 i?
86 | x86_64 | ppc | ppc64
)
13945 if test -z "$ac_arch" ||
test "$ac_arch" = "$ac_word"; then
13948 ac_cv_c_bigendian
=universal
13954 elif test "x$ac_word" = "x-arch"; then
13959 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
13960 if test $ac_cv_c_bigendian = unknown
; then
13961 # See if sys/param.h defines the BYTE_ORDER macro.
13962 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
13963 /* end confdefs.h. */
13964 #include <sys/types.h>
13965 #include <sys/param.h>
13970 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
13971 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
13973 bogus endian macros
13980 if ac_fn_c_try_compile
"$LINENO"; then :
13981 # It does; now see whether it defined to BIG_ENDIAN or not.
13982 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
13983 /* end confdefs.h. */
13984 #include <sys/types.h>
13985 #include <sys/param.h>
13990 #if BYTE_ORDER != BIG_ENDIAN
13998 if ac_fn_c_try_compile
"$LINENO"; then :
13999 ac_cv_c_bigendian
=yes
14001 ac_cv_c_bigendian
=no
14003 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
14005 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
14007 if test $ac_cv_c_bigendian = unknown
; then
14008 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
14009 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14010 /* end confdefs.h. */
14011 #include <limits.h>
14016 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
14017 bogus endian macros
14024 if ac_fn_c_try_compile
"$LINENO"; then :
14025 # It does; now see whether it defined to _BIG_ENDIAN or not.
14026 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14027 /* end confdefs.h. */
14028 #include <limits.h>
14033 #ifndef _BIG_ENDIAN
14041 if ac_fn_c_try_compile
"$LINENO"; then :
14042 ac_cv_c_bigendian
=yes
14044 ac_cv_c_bigendian
=no
14046 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
14048 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
14050 if test $ac_cv_c_bigendian = unknown
; then
14051 # Compile a test program.
14052 if test "$cross_compiling" = yes; then :
14053 # Try to guess by grepping values from an object file.
14054 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14055 /* end confdefs.h. */
14056 short int ascii_mm[] =
14057 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
14058 short int ascii_ii[] =
14059 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
14060 int use_ascii (int i) {
14061 return ascii_mm[i] + ascii_ii[i];
14063 short int ebcdic_ii[] =
14064 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
14065 short int ebcdic_mm[] =
14066 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
14067 int use_ebcdic (int i) {
14068 return ebcdic_mm[i] + ebcdic_ii[i];
14075 return use_ascii (foo) == use_ebcdic (foo);
14080 if ac_fn_c_try_compile
"$LINENO"; then :
14081 if grep BIGenDianSyS conftest.
$ac_objext >/dev
/null
; then
14082 ac_cv_c_bigendian
=yes
14084 if grep LiTTleEnDian conftest.
$ac_objext >/dev
/null
; then
14085 if test "$ac_cv_c_bigendian" = unknown
; then
14086 ac_cv_c_bigendian
=no
14088 # finding both strings is unlikely to happen, but who knows?
14089 ac_cv_c_bigendian
=unknown
14093 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
14095 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14096 /* end confdefs.h. */
14097 $ac_includes_default
14102 /* Are we little or big endian? From Harbison&Steele. */
14106 char c[sizeof (long int)];
14109 return u.c[sizeof (long int) - 1] == 1;
14115 if ac_fn_c_try_run
"$LINENO"; then :
14116 ac_cv_c_bigendian
=no
14118 ac_cv_c_bigendian
=yes
14120 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
14121 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
14126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
14127 $as_echo "$ac_cv_c_bigendian" >&6; }
14128 case $ac_cv_c_bigendian in #(
14130 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
14136 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
14140 as_fn_error $?
"unknown endianness
14141 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
14146 GNULIB_LOCALECONV
=0;
14147 GNULIB_SETLOCALE
=0;
14148 GNULIB_SETLOCALE_NULL
=0;
14149 GNULIB_DUPLOCALE
=0;
14150 GNULIB_LOCALENAME
=0;
14154 REPLACE_LOCALECONV
=0;
14155 REPLACE_SETLOCALE
=0;
14156 REPLACE_NEWLOCALE
=0;
14157 REPLACE_DUPLOCALE
=0;
14158 REPLACE_FREELOCALE
=0;
14159 REPLACE_STRUCT_LCONV
=0;
14163 HAVE_MAX_ALIGN_T
=1;
14167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5
14168 $as_echo_n "checking for wchar_t... " >&6; }
14169 if ${gt_cv_c_wchar_t+:} false
; then :
14170 $as_echo_n "(cached) " >&6
14172 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14173 /* end confdefs.h. */
14174 #include <stddef.h>
14175 wchar_t foo = (wchar_t)'\0';
14184 if ac_fn_c_try_compile
"$LINENO"; then :
14185 gt_cv_c_wchar_t
=yes
14189 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
14191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5
14192 $as_echo "$gt_cv_c_wchar_t" >&6; }
14193 if test $gt_cv_c_wchar_t = yes; then
14195 $as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h
14207 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
14208 $as_echo_n "checking for good max_align_t... " >&6; }
14209 if ${gl_cv_type_max_align_t+:} false
; then :
14210 $as_echo_n "(cached) " >&6
14212 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14213 /* end confdefs.h. */
14214 #include <stddef.h>
14215 unsigned int s = sizeof (max_align_t);
14216 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
14217 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
14218 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
14220 typedef struct { char a; max_align_t b; } max_helper;
14221 typedef struct { char a; long b; } long_helper;
14222 typedef struct { char a; double b; } double_helper;
14223 typedef struct { char a; long double b; } long_double_helper;
14224 int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
14225 int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
14226 int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
14236 if ac_fn_c_try_compile
"$LINENO"; then :
14237 gl_cv_type_max_align_t
=yes
14239 gl_cv_type_max_align_t
=no
14241 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
14244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
14245 $as_echo "$gl_cv_type_max_align_t" >&6; }
14246 if test $gl_cv_type_max_align_t = no
; then
14251 if test $gt_cv_c_wchar_t = no
; then
14256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
14257 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
14258 if ${gl_cv_decl_null_works+:} false
; then :
14259 $as_echo_n "(cached) " >&6
14261 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14262 /* end confdefs.h. */
14263 #include <stddef.h>
14264 int test[2 * (sizeof NULL == sizeof (void *)) -1];
14274 if ac_fn_c_try_compile
"$LINENO"; then :
14275 gl_cv_decl_null_works
=yes
14277 gl_cv_decl_null_works
=no
14279 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
14281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
14282 $as_echo "$gl_cv_decl_null_works" >&6; }
14283 if test $gl_cv_decl_null_works = no
; then
14289 if test -n "$STDDEF_H"; then
14290 GL_GENERATE_STDDEF_H_TRUE
=
14291 GL_GENERATE_STDDEF_H_FALSE
='#'
14293 GL_GENERATE_STDDEF_H_TRUE
='#'
14294 GL_GENERATE_STDDEF_H_FALSE
=
14297 if test -n "$STDDEF_H"; then
14306 if test $gl_cv_have_include_next = yes; then
14307 gl_cv_next_stddef_h
='<'stddef.h
'>'
14309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
14310 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
14311 if ${gl_cv_next_stddef_h+:} false
; then :
14312 $as_echo_n "(cached) " >&6
14317 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14318 /* end confdefs.h. */
14319 #include <stddef.h>
14322 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
14323 *) gl_absname_cpp
="$ac_cpp" ;;
14328 gl_dirsep_regex
='[/\\]'
14331 gl_dirsep_regex
='\/'
14334 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
14335 gl_header_literal_regex
=`echo 'stddef.h' \
14336 | sed -e "$gl_make_literal_regex_sed"`
14337 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
14338 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
14344 gl_cv_absolute_stddef_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
14345 sed -n "$gl_absolute_header_sed"`
14347 gl_header
=$gl_cv_absolute_stddef_h
14348 gl_cv_next_stddef_h
='"'$gl_header'"'
14352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
14353 $as_echo "$gl_cv_next_stddef_h" >&6; }
14355 NEXT_STDDEF_H
=$gl_cv_next_stddef_h
14357 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
14358 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
14359 gl_next_as_first_directive
='<'stddef.h
'>'
14361 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
14362 gl_next_as_first_directive
=$gl_cv_next_stddef_h
14364 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
=$gl_next_as_first_directive
14376 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5
14377 $as_echo_n "checking whether locale.h defines locale_t... " >&6; }
14378 if ${gl_cv_header_locale_has_locale_t+:} false
; then :
14379 $as_echo_n "(cached) " >&6
14381 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14382 /* end confdefs.h. */
14383 #include <locale.h>
14393 if ac_fn_c_try_compile
"$LINENO"; then :
14394 gl_cv_header_locale_has_locale_t
=yes
14396 gl_cv_header_locale_has_locale_t
=no
14398 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
14401 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5
14402 $as_echo "$gl_cv_header_locale_has_locale_t" >&6; }
14405 if test $ac_cv_header_xlocale_h = yes; then
14407 if test $gl_cv_header_locale_has_locale_t = yes; then
14408 gl_cv_header_locale_h_needs_xlocale_h
=no
14410 gl_cv_header_locale_h_needs_xlocale_h
=yes
14415 gl_cv_header_locale_h_needs_xlocale_h
=no
14416 if test $gl_cv_header_locale_has_locale_t = yes; then
14426 gl_threads_api
=none
14431 if test "$gl_use_threads" != no
; then
14434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
14435 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
14436 if ${gl_cv_have_weak+:} false
; then :
14437 $as_echo_n "(cached) " >&6
14440 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14441 /* end confdefs.h. */
14442 extern void xyzzy ();
14452 if ac_fn_c_try_link
"$LINENO"; then :
14453 gl_cv_have_weak
=maybe
14455 rm -f core conftest.err conftest.
$ac_objext \
14456 conftest
$ac_exeext conftest.
$ac_ext
14457 if test $gl_cv_have_weak = maybe
; then
14458 if test "$cross_compiling" = yes; then :
14459 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14460 /* end confdefs.h. */
14462 Extensible Linking Format
14466 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
14467 $EGREP "Extensible Linking Format" >/dev
/null
2>&1; then :
14468 gl_cv_have_weak
="guessing yes"
14470 gl_cv_have_weak
="guessing no"
14476 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14477 /* end confdefs.h. */
14483 return (fputs == NULL);
14486 if ac_fn_c_try_run
"$LINENO"; then :
14487 gl_cv_have_weak
=yes
14491 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
14492 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
14496 case " $LDFLAGS " in
14497 *" -static "*) gl_cv_have_weak
=no
;;
14499 case "$gl_cv_have_weak" in
14502 freebsd
* | dragonfly
*)
14504 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c
-lpthread >&5 2>&1
14505 cat <<EOF > conftest2.c
14506 #include <pthread.h>
14507 #pragma weak pthread_mutexattr_gettype
14510 return (pthread_mutexattr_gettype != NULL);
14513 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so
>&5 2>&1 \
14514 || gl_cv_have_weak
=no
14515 rm -f conftest1.c libempty.so conftest2.c conftest
14522 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
14523 $as_echo "$gl_cv_have_weak" >&6; }
14524 case "$gl_cv_have_weak" in
14527 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
14532 if case "$gl_cv_have_weak" in *yes) true
;; *) false
;; esac; then
14536 if test "$gl_use_threads" = isoc ||
test "$gl_use_threads" = isoc
+posix
; then
14538 gl_have_isoc_threads
="$ac_cv_header_threads_h"
14540 if test "$gl_use_threads" = yes \
14541 ||
test "$gl_use_threads" = posix \
14542 ||
test "$gl_use_threads" = isoc
+posix
; then
14545 if test -z "$gl_pthreadlib_body_done"; then
14549 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14550 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
14551 ac_fn_c_check_header_mongrel
"$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14552 if test "x$ac_cv_header_pthread_h" = xyes
; then :
14553 gl_have_pthread_h
=yes
14555 gl_have_pthread_h
=no
14559 if test "$gl_have_pthread_h" = yes; then
14560 # Other possible tests:
14561 # -lpthreads (FSU threads, PCthreads)
14563 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14564 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14565 # the second one only in libpthread, and lock.c needs it.
14567 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14568 # needs -pthread for some reason. See:
14569 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
14571 for gl_pthread
in '' '-pthread'; do
14572 LIBS
="$LIBS $gl_pthread"
14573 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14574 /* end confdefs.h. */
14575 #include <pthread.h>
14577 pthread_mutexattr_t ma;
14582 pthread_mutex_lock (&m);
14583 pthread_mutexattr_init (&ma);
14588 if ac_fn_c_try_link
"$LINENO"; then :
14590 LIBPTHREAD
=$gl_pthread
14591 LIBPMULTITHREAD
=$gl_pthread
14593 rm -f core conftest.err conftest.
$ac_objext \
14594 conftest
$ac_exeext conftest.
$ac_ext
14596 test $gl_pthread_api = yes && break
14599 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14600 # since it is defined as a macro on OSF/1.)
14601 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
14602 # The program links fine without libpthread. But it may actually
14603 # need to link with libpthread in order to create multiple threads.
14604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14605 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14606 if ${ac_cv_lib_pthread_pthread_kill+:} false
; then :
14607 $as_echo_n "(cached) " >&6
14609 ac_check_lib_save_LIBS
=$LIBS
14610 LIBS
="-lpthread $LIBS"
14611 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14612 /* end confdefs.h. */
14614 /* Override any GCC internal prototype to avoid an error.
14615 Use char because int might match the return type of a GCC
14616 builtin and then its argument prototype would still apply. */
14620 char pthread_kill ();
14624 return pthread_kill ();
14629 if ac_fn_c_try_link
"$LINENO"; then :
14630 ac_cv_lib_pthread_pthread_kill
=yes
14632 ac_cv_lib_pthread_pthread_kill
=no
14634 rm -f core conftest.err conftest.
$ac_objext \
14635 conftest
$ac_exeext conftest.
$ac_ext
14636 LIBS
=$ac_check_lib_save_LIBS
14638 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14639 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14640 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
; then :
14641 LIBPMULTITHREAD
=-lpthread
14642 # On Solaris and HP-UX, most pthread functions exist also in libc.
14643 # Therefore pthread_in_use() needs to actually try to create a
14644 # thread: pthread_create from libc will fail, whereas
14645 # pthread_create will actually create a thread.
14646 # On Solaris 10 or newer, this test is no longer needed, because
14647 # libc contains the fully functional pthread functions.
14649 solaris | solaris2.1
-9 | solaris2.1
-9.
* | hpux
*)
14651 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14657 elif test $gl_pthread_api != yes; then
14658 # Some library is needed. Try libpthread and libc_r.
14659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14660 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14661 if ${ac_cv_lib_pthread_pthread_kill+:} false
; then :
14662 $as_echo_n "(cached) " >&6
14664 ac_check_lib_save_LIBS
=$LIBS
14665 LIBS
="-lpthread $LIBS"
14666 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14667 /* end confdefs.h. */
14669 /* Override any GCC internal prototype to avoid an error.
14670 Use char because int might match the return type of a GCC
14671 builtin and then its argument prototype would still apply. */
14675 char pthread_kill ();
14679 return pthread_kill ();
14684 if ac_fn_c_try_link
"$LINENO"; then :
14685 ac_cv_lib_pthread_pthread_kill
=yes
14687 ac_cv_lib_pthread_pthread_kill
=no
14689 rm -f core conftest.err conftest.
$ac_objext \
14690 conftest
$ac_exeext conftest.
$ac_ext
14691 LIBS
=$ac_check_lib_save_LIBS
14693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
14694 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
14695 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
; then :
14697 LIBPTHREAD
=-lpthread
14698 LIBPMULTITHREAD
=-lpthread
14701 if test $gl_pthread_api != yes; then
14703 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
14704 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
14705 if ${ac_cv_lib_c_r_pthread_kill+:} false
; then :
14706 $as_echo_n "(cached) " >&6
14708 ac_check_lib_save_LIBS
=$LIBS
14710 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14711 /* end confdefs.h. */
14713 /* Override any GCC internal prototype to avoid an error.
14714 Use char because int might match the return type of a GCC
14715 builtin and then its argument prototype would still apply. */
14719 char pthread_kill ();
14723 return pthread_kill ();
14728 if ac_fn_c_try_link
"$LINENO"; then :
14729 ac_cv_lib_c_r_pthread_kill
=yes
14731 ac_cv_lib_c_r_pthread_kill
=no
14733 rm -f core conftest.err conftest.
$ac_objext \
14734 conftest
$ac_exeext conftest.
$ac_ext
14735 LIBS
=$ac_check_lib_save_LIBS
14737 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
14738 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
14739 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
; then :
14742 LIBPMULTITHREAD
=-lc_r
14748 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
14749 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
14750 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
14751 $as_echo "$gl_pthread_api" >&6; }
14754 if test $gl_pthread_api = yes; then
14756 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
14760 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14761 /* end confdefs.h. */
14771 if ac_fn_c_try_link
"$LINENO"; then :
14775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
14776 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
14777 if ${ac_cv_lib_rt_sched_yield+:} false
; then :
14778 $as_echo_n "(cached) " >&6
14780 ac_check_lib_save_LIBS
=$LIBS
14782 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14783 /* end confdefs.h. */
14785 /* Override any GCC internal prototype to avoid an error.
14786 Use char because int might match the return type of a GCC
14787 builtin and then its argument prototype would still apply. */
14791 char sched_yield ();
14795 return sched_yield ();
14800 if ac_fn_c_try_link
"$LINENO"; then :
14801 ac_cv_lib_rt_sched_yield
=yes
14803 ac_cv_lib_rt_sched_yield
=no
14805 rm -f core conftest.err conftest.
$ac_objext \
14806 conftest
$ac_exeext conftest.
$ac_ext
14807 LIBS
=$ac_check_lib_save_LIBS
14809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
14810 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
14811 if test "x$ac_cv_lib_rt_sched_yield" = xyes
; then :
14812 LIB_SCHED_YIELD
=-lrt
14814 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
14815 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
14816 if ${ac_cv_lib_posix4_sched_yield+:} false
; then :
14817 $as_echo_n "(cached) " >&6
14819 ac_check_lib_save_LIBS
=$LIBS
14820 LIBS
="-lposix4 $LIBS"
14821 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14822 /* end confdefs.h. */
14824 /* Override any GCC internal prototype to avoid an error.
14825 Use char because int might match the return type of a GCC
14826 builtin and then its argument prototype would still apply. */
14830 char sched_yield ();
14834 return sched_yield ();
14839 if ac_fn_c_try_link
"$LINENO"; then :
14840 ac_cv_lib_posix4_sched_yield
=yes
14842 ac_cv_lib_posix4_sched_yield
=no
14844 rm -f core conftest.err conftest.
$ac_objext \
14845 conftest
$ac_exeext conftest.
$ac_ext
14846 LIBS
=$ac_check_lib_save_LIBS
14848 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
14849 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
14850 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
; then :
14851 LIB_SCHED_YIELD
=-lposix4
14858 rm -f core conftest.err conftest.
$ac_objext \
14859 conftest
$ac_exeext conftest.
$ac_ext
14862 gl_pthreadlib_body_done
=done
14865 LIBTHREAD
=$LIBPTHREAD LTLIBTHREAD
=$LIBPTHREAD
14866 LIBMULTITHREAD
=$LIBPMULTITHREAD LTLIBMULTITHREAD
=$LIBPMULTITHREAD
14867 if test $gl_pthread_api = yes; then
14868 if test "$gl_use_threads" = isoc
+posix
&& test "$gl_have_isoc_threads" = yes; then
14869 gl_threads_api
='isoc+posix'
14871 $as_echo "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h
14873 LIBTHREAD
= LTLIBTHREAD
=
14875 gl_threads_api
=posix
14877 $as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h
14879 if test -n "$LIBMULTITHREAD" ||
test -n "$LTLIBMULTITHREAD"; then
14880 if case "$gl_cv_have_weak" in *yes) true
;; *) false
;; esac; then
14882 $as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h
14884 LIBTHREAD
= LTLIBTHREAD
=
14887 freebsd
* | dragonfly
*)
14888 if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then
14890 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
14900 if test $gl_threads_api = none
; then
14901 if test "$gl_use_threads" = isoc
&& test "$gl_have_isoc_threads" = yes; then
14905 if test -z "$gl_stdthreadlib_body_done"; then
14915 if test -z "$gl_pthreadlib_body_done"; then
14919 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that
14920 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY.
14921 ac_fn_c_check_header_mongrel
"$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default"
14922 if test "x$ac_cv_header_pthread_h" = xyes
; then :
14923 gl_have_pthread_h
=yes
14925 gl_have_pthread_h
=no
14929 if test "$gl_have_pthread_h" = yes; then
14930 # Other possible tests:
14931 # -lpthreads (FSU threads, PCthreads)
14933 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist
14934 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but
14935 # the second one only in libpthread, and lock.c needs it.
14937 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04
14938 # needs -pthread for some reason. See:
14939 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html
14941 for gl_pthread
in '' '-pthread'; do
14942 LIBS
="$LIBS $gl_pthread"
14943 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14944 /* end confdefs.h. */
14945 #include <pthread.h>
14947 pthread_mutexattr_t ma;
14952 pthread_mutex_lock (&m);
14953 pthread_mutexattr_init (&ma);
14958 if ac_fn_c_try_link
"$LINENO"; then :
14960 LIBPTHREAD
=$gl_pthread
14961 LIBPMULTITHREAD
=$gl_pthread
14963 rm -f core conftest.err conftest.
$ac_objext \
14964 conftest
$ac_exeext conftest.
$ac_ext
14966 test $gl_pthread_api = yes && break
14969 # Test for libpthread by looking for pthread_kill. (Not pthread_self,
14970 # since it is defined as a macro on OSF/1.)
14971 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then
14972 # The program links fine without libpthread. But it may actually
14973 # need to link with libpthread in order to create multiple threads.
14974 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
14975 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
14976 if ${ac_cv_lib_pthread_pthread_kill+:} false
; then :
14977 $as_echo_n "(cached) " >&6
14979 ac_check_lib_save_LIBS
=$LIBS
14980 LIBS
="-lpthread $LIBS"
14981 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
14982 /* end confdefs.h. */
14984 /* Override any GCC internal prototype to avoid an error.
14985 Use char because int might match the return type of a GCC
14986 builtin and then its argument prototype would still apply. */
14990 char pthread_kill ();
14994 return pthread_kill ();
14999 if ac_fn_c_try_link
"$LINENO"; then :
15000 ac_cv_lib_pthread_pthread_kill
=yes
15002 ac_cv_lib_pthread_pthread_kill
=no
15004 rm -f core conftest.err conftest.
$ac_objext \
15005 conftest
$ac_exeext conftest.
$ac_ext
15006 LIBS
=$ac_check_lib_save_LIBS
15008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15009 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
15010 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
; then :
15011 LIBPMULTITHREAD
=-lpthread
15012 # On Solaris and HP-UX, most pthread functions exist also in libc.
15013 # Therefore pthread_in_use() needs to actually try to create a
15014 # thread: pthread_create from libc will fail, whereas
15015 # pthread_create will actually create a thread.
15016 # On Solaris 10 or newer, this test is no longer needed, because
15017 # libc contains the fully functional pthread functions.
15019 solaris | solaris2.1
-9 | solaris2.1
-9.
* | hpux
*)
15021 $as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h
15027 elif test $gl_pthread_api != yes; then
15028 # Some library is needed. Try libpthread and libc_r.
15029 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5
15030 $as_echo_n "checking for pthread_kill in -lpthread... " >&6; }
15031 if ${ac_cv_lib_pthread_pthread_kill+:} false
; then :
15032 $as_echo_n "(cached) " >&6
15034 ac_check_lib_save_LIBS
=$LIBS
15035 LIBS
="-lpthread $LIBS"
15036 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
15037 /* end confdefs.h. */
15039 /* Override any GCC internal prototype to avoid an error.
15040 Use char because int might match the return type of a GCC
15041 builtin and then its argument prototype would still apply. */
15045 char pthread_kill ();
15049 return pthread_kill ();
15054 if ac_fn_c_try_link
"$LINENO"; then :
15055 ac_cv_lib_pthread_pthread_kill
=yes
15057 ac_cv_lib_pthread_pthread_kill
=no
15059 rm -f core conftest.err conftest.
$ac_objext \
15060 conftest
$ac_exeext conftest.
$ac_ext
15061 LIBS
=$ac_check_lib_save_LIBS
15063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5
15064 $as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; }
15065 if test "x$ac_cv_lib_pthread_pthread_kill" = xyes
; then :
15067 LIBPTHREAD
=-lpthread
15068 LIBPMULTITHREAD
=-lpthread
15071 if test $gl_pthread_api != yes; then
15073 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5
15074 $as_echo_n "checking for pthread_kill in -lc_r... " >&6; }
15075 if ${ac_cv_lib_c_r_pthread_kill+:} false
; then :
15076 $as_echo_n "(cached) " >&6
15078 ac_check_lib_save_LIBS
=$LIBS
15080 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
15081 /* end confdefs.h. */
15083 /* Override any GCC internal prototype to avoid an error.
15084 Use char because int might match the return type of a GCC
15085 builtin and then its argument prototype would still apply. */
15089 char pthread_kill ();
15093 return pthread_kill ();
15098 if ac_fn_c_try_link
"$LINENO"; then :
15099 ac_cv_lib_c_r_pthread_kill
=yes
15101 ac_cv_lib_c_r_pthread_kill
=no
15103 rm -f core conftest.err conftest.
$ac_objext \
15104 conftest
$ac_exeext conftest.
$ac_ext
15105 LIBS
=$ac_check_lib_save_LIBS
15107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5
15108 $as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; }
15109 if test "x$ac_cv_lib_c_r_pthread_kill" = xyes
; then :
15112 LIBPMULTITHREAD
=-lc_r
15118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5
15119 $as_echo_n "checking whether POSIX threads API is available... " >&6; }
15120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5
15121 $as_echo "$gl_pthread_api" >&6; }
15124 if test $gl_pthread_api = yes; then
15126 $as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h
15130 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
15131 /* end confdefs.h. */
15141 if ac_fn_c_try_link
"$LINENO"; then :
15145 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5
15146 $as_echo_n "checking for sched_yield in -lrt... " >&6; }
15147 if ${ac_cv_lib_rt_sched_yield+:} false
; then :
15148 $as_echo_n "(cached) " >&6
15150 ac_check_lib_save_LIBS
=$LIBS
15152 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
15153 /* end confdefs.h. */
15155 /* Override any GCC internal prototype to avoid an error.
15156 Use char because int might match the return type of a GCC
15157 builtin and then its argument prototype would still apply. */
15161 char sched_yield ();
15165 return sched_yield ();
15170 if ac_fn_c_try_link
"$LINENO"; then :
15171 ac_cv_lib_rt_sched_yield
=yes
15173 ac_cv_lib_rt_sched_yield
=no
15175 rm -f core conftest.err conftest.
$ac_objext \
15176 conftest
$ac_exeext conftest.
$ac_ext
15177 LIBS
=$ac_check_lib_save_LIBS
15179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5
15180 $as_echo "$ac_cv_lib_rt_sched_yield" >&6; }
15181 if test "x$ac_cv_lib_rt_sched_yield" = xyes
; then :
15182 LIB_SCHED_YIELD
=-lrt
15184 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5
15185 $as_echo_n "checking for sched_yield in -lposix4... " >&6; }
15186 if ${ac_cv_lib_posix4_sched_yield+:} false
; then :
15187 $as_echo_n "(cached) " >&6
15189 ac_check_lib_save_LIBS
=$LIBS
15190 LIBS
="-lposix4 $LIBS"
15191 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
15192 /* end confdefs.h. */
15194 /* Override any GCC internal prototype to avoid an error.
15195 Use char because int might match the return type of a GCC
15196 builtin and then its argument prototype would still apply. */
15200 char sched_yield ();
15204 return sched_yield ();
15209 if ac_fn_c_try_link
"$LINENO"; then :
15210 ac_cv_lib_posix4_sched_yield
=yes
15212 ac_cv_lib_posix4_sched_yield
=no
15214 rm -f core conftest.err conftest.
$ac_objext \
15215 conftest
$ac_exeext conftest.
$ac_ext
15216 LIBS
=$ac_check_lib_save_LIBS
15218 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5
15219 $as_echo "$ac_cv_lib_posix4_sched_yield" >&6; }
15220 if test "x$ac_cv_lib_posix4_sched_yield" = xyes
; then :
15221 LIB_SCHED_YIELD
=-lposix4
15228 rm -f core conftest.err conftest.
$ac_objext \
15229 conftest
$ac_exeext conftest.
$ac_ext
15232 gl_pthreadlib_body_done
=done
15235 if test $ac_cv_header_threads_h = yes; then
15236 for ac_func
in thrd_create
15238 ac_fn_c_check_func
"$LINENO" "thrd_create" "ac_cv_func_thrd_create"
15239 if test "x$ac_cv_func_thrd_create" = xyes
; then :
15240 cat >>confdefs.h
<<_ACEOF
15241 #define HAVE_THRD_CREATE 1
15247 if test $ac_cv_func_thrd_create = yes; then
15250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5
15251 $as_echo_n "checking for thrd_create in -lstdthreads... " >&6; }
15252 if ${ac_cv_lib_stdthreads_thrd_create+:} false
; then :
15253 $as_echo_n "(cached) " >&6
15255 ac_check_lib_save_LIBS
=$LIBS
15256 LIBS
="-lstdthreads $LIBS"
15257 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
15258 /* end confdefs.h. */
15260 /* Override any GCC internal prototype to avoid an error.
15261 Use char because int might match the return type of a GCC
15262 builtin and then its argument prototype would still apply. */
15266 char thrd_create ();
15270 return thrd_create ();
15275 if ac_fn_c_try_link
"$LINENO"; then :
15276 ac_cv_lib_stdthreads_thrd_create
=yes
15278 ac_cv_lib_stdthreads_thrd_create
=no
15280 rm -f core conftest.err conftest.
$ac_objext \
15281 conftest
$ac_exeext conftest.
$ac_ext
15282 LIBS
=$ac_check_lib_save_LIBS
15284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5
15285 $as_echo "$ac_cv_lib_stdthreads_thrd_create" >&6; }
15286 if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes
; then :
15288 LIBSTDTHREAD
='-lstdthreads -lpthread'
15292 LIBSTDTHREAD
="$LIBPMULTITHREAD"
15298 LIBSTDTHREAD
="$LIBPMULTITHREAD $LIB_SCHED_YIELD"
15304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5
15305 $as_echo_n "checking whether ISO C threads API is available... " >&6; }
15306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5
15307 $as_echo "$ac_cv_header_threads_h" >&6; }
15308 gl_stdthreadlib_body_done
=done
15311 LIBTHREAD
=$LIBSTDTHREAD LTLIBTHREAD
=$LIBSTDTHREAD
15312 LIBMULTITHREAD
=$LIBSTDTHREAD LTLIBMULTITHREAD
=$LIBSTDTHREAD
15313 gl_threads_api
=isoc
15315 $as_echo "#define USE_ISOC_THREADS 1" >>confdefs.h
15319 if test $gl_threads_api = none
; then
15320 case "$gl_use_threads" in
15321 yes | windows | win32
) # The 'win32' is for backward compatibility.
15322 if { case "$host_os" in
15327 gl_threads_api
=windows
15329 $as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h
15336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5
15337 $as_echo_n "checking for multithread API to use... " >&6; }
15338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5
15339 $as_echo "$gl_threads_api" >&6; }
15352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5
15353 $as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; }
15354 if ${gl_cv_func_malloc_posix+:} false
; then :
15355 $as_echo_n "(cached) " >&6
15358 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
15359 /* end confdefs.h. */
15364 #if defined _WIN32 && ! defined __CYGWIN__
15372 if ac_fn_c_try_compile
"$LINENO"; then :
15373 gl_cv_func_malloc_posix
=yes
15375 gl_cv_func_malloc_posix
=no
15377 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
15380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5
15381 $as_echo "$gl_cv_func_malloc_posix" >&6; }
15385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5
15386 $as_echo_n "checking for GNU libc compatible malloc... " >&6; }
15387 if ${ac_cv_func_malloc_0_nonnull+:} false
; then :
15388 $as_echo_n "(cached) " >&6
15390 if test "$cross_compiling" = yes; then :
15392 # Guess yes on platforms where we know the result.
15393 *-gnu* | gnu
* |
*-musl* | freebsd
* | netbsd
* | openbsd
* \
15394 | hpux
* | solaris
* | cygwin
* | mingw
*)
15395 ac_cv_func_malloc_0_nonnull
="guessing yes" ;;
15396 # If we don't know, obey --enable-cross-guesses.
15397 *) ac_cv_func_malloc_0_nonnull
="$gl_cross_guess_normal" ;;
15401 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
15402 /* end confdefs.h. */
15403 #include <stdlib.h>
15408 char *p = malloc (0);
15417 if ac_fn_c_try_run
"$LINENO"; then :
15418 ac_cv_func_malloc_0_nonnull
=yes
15420 ac_cv_func_malloc_0_nonnull
=no
15422 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
15423 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
15428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5
15429 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; }
15430 case "$ac_cv_func_malloc_0_nonnull" in
15432 gl_cv_func_malloc_0_nonnull
=1
15435 gl_cv_func_malloc_0_nonnull
=0
15440 cat >>confdefs.h
<<_ACEOF
15441 #define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull
15454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5
15455 $as_echo_n "checking for a traditional japanese locale... " >&6; }
15456 if ${gt_cv_locale_ja+:} false
; then :
15457 $as_echo_n "(cached) " >&6
15460 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
15461 /* end confdefs.h. */
15463 #include <locale.h>
15465 #if HAVE_LANGINFO_CODESET
15466 # include <langinfo.h>
15468 #include <stdlib.h>
15469 #include <string.h>
15474 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15475 imitates locale dependent behaviour by looking at the environment
15476 variables, and all locales use the UTF-8 encoding. */
15477 #if defined __BEOS__ || defined __HAIKU__
15480 /* Check whether the given locale name is recognized by the system. */
15481 # if defined _WIN32 && !defined __CYGWIN__
15482 /* On native Windows, setlocale(category, "") looks at the system settings,
15483 not at the environment variables. Also, when an encoding suffix such
15484 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15485 category of the locale to "C". */
15486 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15487 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15490 if (setlocale (LC_ALL, "") == NULL) return 1;
15492 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15493 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15494 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15495 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15496 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15497 some unit tests fail.
15498 On MirBSD 10, when an unsupported locale is specified, setlocale()
15499 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15500 # if HAVE_LANGINFO_CODESET
15502 const char *cs = nl_langinfo (CODESET);
15503 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15504 || strcmp (cs, "UTF-8") == 0)
15509 /* On Cygwin, avoid locale names without encoding suffix, because the
15510 locale_charset() function relies on the encoding suffix. Note that
15511 LC_ALL is set on the command line. */
15512 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15514 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales
15515 on Cygwin 1.5.x. */
15516 if (MB_CUR_MAX == 1)
15518 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15519 This excludes the UTF-8 encoding (except on MirBSD). */
15522 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15523 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15524 for (p = buf; *p != '\0'; p++)
15525 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15533 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15534 (eval $ac_link) 2>&5
15536 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15537 test $ac_status = 0; } && test -s conftest
$ac_exeext; then
15539 # Handle native Windows specially, because there setlocale() interprets
15540 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15541 # "fr" or "fra" as "French" or "French_France.1252",
15542 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15543 # "ja" as "Japanese" or "Japanese_Japan.932",
15546 # Note that on native Windows, the Japanese locale is
15547 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we
15548 # cannot use it here.
15549 gt_cv_locale_ja
=none
15552 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15553 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15554 # configure script would override the LC_ALL setting. Likewise for
15555 # LC_CTYPE, which is also set at the beginning of the configure script.
15556 # Test for the AIX locale name.
15557 if (LC_ALL
=ja_JP LC_TIME
= LC_CTYPE
= .
/conftest
; exit) 2>/dev
/null
; then
15558 gt_cv_locale_ja
=ja_JP
15560 # Test for the locale name with explicit encoding suffix.
15561 if (LC_ALL
=ja_JP.EUC-JP LC_TIME
= LC_CTYPE
= .
/conftest
; exit) 2>/dev
/null
; then
15562 gt_cv_locale_ja
=ja_JP.EUC-JP
15564 # Test for the HP-UX, OSF/1, NetBSD locale name.
15565 if (LC_ALL
=ja_JP.eucJP LC_TIME
= LC_CTYPE
= .
/conftest
; exit) 2>/dev
/null
; then
15566 gt_cv_locale_ja
=ja_JP.eucJP
15568 # Test for the IRIX, FreeBSD locale name.
15569 if (LC_ALL
=ja_JP.EUC LC_TIME
= LC_CTYPE
= .
/conftest
; exit) 2>/dev
/null
; then
15570 gt_cv_locale_ja
=ja_JP.EUC
15572 # Test for the Solaris 7 locale name.
15573 if (LC_ALL
=ja LC_TIME
= LC_CTYPE
= .
/conftest
; exit) 2>/dev
/null
; then
15576 # Special test for NetBSD 1.6.
15577 if test -f /usr
/share
/locale
/ja_JP.eucJP
/LC_CTYPE
; then
15578 gt_cv_locale_ja
=ja_JP.eucJP
15581 gt_cv_locale_ja
=none
15594 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5
15595 $as_echo "$gt_cv_locale_ja" >&6; }
15596 LOCALE_JA
=$gt_cv_locale_ja
15601 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5
15602 $as_echo_n "checking for a french Unicode locale... " >&6; }
15603 if ${gt_cv_locale_fr_utf8+:} false
; then :
15604 $as_echo_n "(cached) " >&6
15607 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
15608 /* end confdefs.h. */
15610 #include <locale.h>
15612 #if HAVE_LANGINFO_CODESET
15613 # include <langinfo.h>
15615 #include <stdlib.h>
15616 #include <string.h>
15620 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15621 imitates locale dependent behaviour by looking at the environment
15622 variables, and all locales use the UTF-8 encoding. */
15623 #if !(defined __BEOS__ || defined __HAIKU__)
15624 /* Check whether the given locale name is recognized by the system. */
15625 # if defined _WIN32 && !defined __CYGWIN__
15626 /* On native Windows, setlocale(category, "") looks at the system settings,
15627 not at the environment variables. Also, when an encoding suffix such
15628 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15629 category of the locale to "C". */
15630 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15631 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15634 if (setlocale (LC_ALL, "") == NULL) return 1;
15636 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15637 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15638 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15639 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15640 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15641 some unit tests fail. */
15642 # if HAVE_LANGINFO_CODESET
15644 const char *cs = nl_langinfo (CODESET);
15645 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0)
15650 /* On Cygwin, avoid locale names without encoding suffix, because the
15651 locale_charset() function relies on the encoding suffix. Note that
15652 LC_ALL is set on the command line. */
15653 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15655 /* Check whether in the abbreviation of the second month, the second
15656 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is
15657 two bytes long, with UTF-8 encoding. */
15658 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15659 if (strftime (buf, sizeof (buf), "%b", &t) < 4
15660 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v')
15663 #if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */
15664 /* Check whether the decimal separator is a comma.
15665 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point
15666 are nl_langinfo(RADIXCHAR) are both ".". */
15667 if (localeconv () ->decimal_point[0] != ',') return 1;
15673 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15674 (eval $ac_link) 2>&5
15676 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15677 test $ac_status = 0; } && test -s conftest
$ac_exeext; then
15679 # Handle native Windows specially, because there setlocale() interprets
15680 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15681 # "fr" or "fra" as "French" or "French_France.1252",
15682 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15683 # "ja" as "Japanese" or "Japanese_Japan.932",
15686 # Test for the hypothetical native Windows locale name.
15687 if (LC_ALL
=French_France
.65001 LC_TIME
= LC_CTYPE
= .
/conftest
; exit) 2>/dev
/null
; then
15688 gt_cv_locale_fr_utf8
=French_France
.65001
15691 gt_cv_locale_fr_utf8
=none
15695 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15696 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15697 # configure script would override the LC_ALL setting. Likewise for
15698 # LC_CTYPE, which is also set at the beginning of the configure script.
15699 # Test for the usual locale name.
15700 if (LC_ALL
=fr_FR LC_TIME
= LC_CTYPE
= .
/conftest
; exit) 2>/dev
/null
; then
15701 gt_cv_locale_fr_utf8
=fr_FR
15703 # Test for the locale name with explicit encoding suffix.
15704 if (LC_ALL
=fr_FR.UTF-8 LC_TIME
= LC_CTYPE
= .
/conftest
; exit) 2>/dev
/null
; then
15705 gt_cv_locale_fr_utf8
=fr_FR.UTF-8
15707 # Test for the Solaris 7 locale name.
15708 if (LC_ALL
=fr.UTF-8 LC_TIME
= LC_CTYPE
= .
/conftest
; exit) 2>/dev
/null
; then
15709 gt_cv_locale_fr_utf8
=fr.UTF-8
15712 gt_cv_locale_fr_utf8
=none
15722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5
15723 $as_echo "$gt_cv_locale_fr_utf8" >&6; }
15724 LOCALE_FR_UTF8
=$gt_cv_locale_fr_utf8
15730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5
15731 $as_echo_n "checking for a transitional chinese locale... " >&6; }
15732 if ${gt_cv_locale_zh_CN+:} false
; then :
15733 $as_echo_n "(cached) " >&6
15736 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
15737 /* end confdefs.h. */
15739 #include <locale.h>
15740 #include <stdlib.h>
15742 #if HAVE_LANGINFO_CODESET
15743 # include <langinfo.h>
15745 #include <stdlib.h>
15746 #include <string.h>
15751 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl
15752 imitates locale dependent behaviour by looking at the environment
15753 variables, and all locales use the UTF-8 encoding. */
15754 #if defined __BEOS__ || defined __HAIKU__
15757 /* Check whether the given locale name is recognized by the system. */
15758 # if defined _WIN32 && !defined __CYGWIN__
15759 /* On native Windows, setlocale(category, "") looks at the system settings,
15760 not at the environment variables. Also, when an encoding suffix such
15761 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE
15762 category of the locale to "C". */
15763 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL
15764 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0)
15767 if (setlocale (LC_ALL, "") == NULL) return 1;
15769 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646".
15770 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET)
15771 is empty, and the behaviour of Tcl 8.4 in this locale is not useful.
15772 On OpenBSD 4.0, when an unsupported locale is specified, setlocale()
15773 succeeds but then nl_langinfo(CODESET) is "646". In this situation,
15774 some unit tests fail.
15775 On MirBSD 10, when an unsupported locale is specified, setlocale()
15776 succeeds but then nl_langinfo(CODESET) is "UTF-8". */
15777 # if HAVE_LANGINFO_CODESET
15779 const char *cs = nl_langinfo (CODESET);
15780 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0
15781 || strcmp (cs, "UTF-8") == 0)
15786 /* On Cygwin, avoid locale names without encoding suffix, because the
15787 locale_charset() function relies on the encoding suffix. Note that
15788 LC_ALL is set on the command line. */
15789 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1;
15791 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs.
15792 This excludes the UTF-8 encoding (except on MirBSD). */
15795 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4;
15796 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1;
15797 for (p = buf; *p != '\0'; p++)
15798 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0)
15801 /* Check whether a typical GB18030 multibyte sequence is recognized as a
15802 single wide character. This excludes the GB2312 and GBK encodings. */
15803 if (mblen ("\203\062\332\066", 5) != 4)
15810 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5
15811 (eval $ac_link) 2>&5
15813 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
15814 test $ac_status = 0; } && test -s conftest
$ac_exeext; then
15816 # Handle native Windows specially, because there setlocale() interprets
15817 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256",
15818 # "fr" or "fra" as "French" or "French_France.1252",
15819 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252",
15820 # "ja" as "Japanese" or "Japanese_Japan.932",
15823 # Test for the hypothetical native Windows locale name.
15824 if (LC_ALL
=Chinese_China
.54936 LC_TIME
= LC_CTYPE
= .
/conftest
; exit) 2>/dev
/null
; then
15825 gt_cv_locale_zh_CN
=Chinese_China
.54936
15828 gt_cv_locale_zh_CN
=none
15832 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are
15833 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK.
15834 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core.
15835 gt_cv_locale_zh_CN
=none
15838 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because
15839 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the
15840 # configure script would override the LC_ALL setting. Likewise for
15841 # LC_CTYPE, which is also set at the beginning of the configure script.
15842 # Test for the locale name without encoding suffix.
15843 if (LC_ALL
=zh_CN LC_TIME
= LC_CTYPE
= .
/conftest
; exit) 2>/dev
/null
; then
15844 gt_cv_locale_zh_CN
=zh_CN
15846 # Test for the locale name with explicit encoding suffix.
15847 if (LC_ALL
=zh_CN.GB18030 LC_TIME
= LC_CTYPE
= .
/conftest
; exit) 2>/dev
/null
; then
15848 gt_cv_locale_zh_CN
=zh_CN.GB18030
15851 gt_cv_locale_zh_CN
=none
15857 # If there was a link error, due to mblen(), the system is so old that
15858 # it certainly doesn't have a chinese locale.
15859 gt_cv_locale_zh_CN
=none
15864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5
15865 $as_echo "$gt_cv_locale_zh_CN" >&6; }
15866 LOCALE_ZH_CN
=$gt_cv_locale_zh_CN
15869 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
15870 $as_echo_n "checking for inline... " >&6; }
15871 if ${ac_cv_c_inline+:} false
; then :
15872 $as_echo_n "(cached) " >&6
15875 for ac_kw
in inline __inline__ __inline
; do
15876 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
15877 /* end confdefs.h. */
15878 #ifndef __cplusplus
15880 static $ac_kw foo_t static_foo () {return 0; }
15881 $ac_kw foo_t foo () {return 0; }
15885 if ac_fn_c_try_compile
"$LINENO"; then :
15886 ac_cv_c_inline
=$ac_kw
15888 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
15889 test "$ac_cv_c_inline" != no
&& break
15893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
15894 $as_echo "$ac_cv_c_inline" >&6; }
15896 case $ac_cv_c_inline in
15899 case $ac_cv_c_inline in
15901 *) ac_val
=$ac_cv_c_inline;;
15903 cat >>confdefs.h
<<_ACEOF
15904 #ifndef __cplusplus
15905 #define inline $ac_val
15916 GNULIB_EXPLICIT_BZERO
=0;
15923 GNULIB_RAWMEMCHR
=0;
15926 GNULIB_STRCHRNUL
=0;
15934 GNULIB_STRCASESTR
=0;
15941 GNULIB_MBSCASECMP
=0;
15942 GNULIB_MBSNCASECMP
=0;
15943 GNULIB_MBSPCASECMP
=0;
15944 GNULIB_MBSCASESTR
=0;
15951 GNULIB_STRERROR_R
=0;
15952 GNULIB_STRERRORNAME_NP
=0;
15953 GNULIB_SIGABBREV_NP
=0;
15954 GNULIB_SIGDESCR_NP
=0;
15955 GNULIB_STRSIGNAL
=0;
15956 GNULIB_STRVERSCMP
=0;
15958 GNULIB_MDA_MEMCCPY
=1;
15959 GNULIB_MDA_STRDUP
=1;
15960 HAVE_EXPLICIT_BZERO
=1;
15963 HAVE_DECL_MEMMEM
=1;
15965 HAVE_DECL_MEMRCHR
=1;
15970 HAVE_DECL_STRDUP
=1;
15971 HAVE_DECL_STRNDUP
=1;
15972 HAVE_DECL_STRNLEN
=1;
15976 HAVE_DECL_STRTOK_R
=1;
15977 HAVE_DECL_STRERROR_R
=1;
15978 HAVE_STRERRORNAME_NP
=1;
15979 HAVE_SIGABBREV_NP
=1;
15980 HAVE_SIGDESCR_NP
=1;
15981 HAVE_DECL_STRSIGNAL
=1;
15987 REPLACE_STRCHRNUL
=0;
15993 REPLACE_STRCASESTR
=0;
15994 REPLACE_STRTOK_R
=0;
15995 REPLACE_STRERROR
=0;
15996 REPLACE_STRERROR_R
=0;
15997 REPLACE_STRERRORNAME_NP
=0;
15998 REPLACE_STRSIGNAL
=0;
15999 UNDEFINE_STRTOK_R
=0;
16006 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it
16007 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is
16008 # irrelevant for anonymous mappings.
16009 ac_fn_c_check_func
"$LINENO" "mmap" "ac_cv_func_mmap"
16010 if test "x$ac_cv_func_mmap" = xyes
; then :
16017 # Try to allow MAP_ANONYMOUS.
16018 gl_have_mmap_anonymous
=no
16019 if test $gl_have_mmap = yes; then
16020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5
16021 $as_echo_n "checking for MAP_ANONYMOUS... " >&6; }
16022 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
16023 /* end confdefs.h. */
16025 #include <sys/mman.h>
16026 #ifdef MAP_ANONYMOUS
16027 I cannot identify this map
16031 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16032 $EGREP "I cannot identify this map" >/dev
/null
2>&1; then :
16033 gl_have_mmap_anonymous
=yes
16037 if test $gl_have_mmap_anonymous != yes; then
16038 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
16039 /* end confdefs.h. */
16041 #include <sys/mman.h>
16043 I cannot identify this map
16047 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16048 $EGREP "I cannot identify this map" >/dev
/null
2>&1; then :
16050 $as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h
16052 gl_have_mmap_anonymous
=yes
16057 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5
16058 $as_echo "$gl_have_mmap_anonymous" >&6; }
16059 if test $gl_have_mmap_anonymous = yes; then
16061 $as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h
16070 # Detect platform-specific bugs in some versions of glibc:
16071 # memchr should not dereference anything with length 0
16072 # https://bugzilla.redhat.com/show_bug.cgi?id=499689
16073 # memchr should not dereference overestimated length after a match
16074 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737
16075 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162
16076 # memchr should cast the second argument to 'unsigned char'.
16077 # This bug exists in Android 4.3.
16078 # Assume that memchr works on platforms that lack mprotect.
16079 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5
16080 $as_echo_n "checking whether memchr works... " >&6; }
16081 if ${gl_cv_func_memchr_works+:} false
; then :
16082 $as_echo_n "(cached) " >&6
16084 if test "$cross_compiling" = yes; then :
16086 # Guess no on Android.
16087 linux
*-android*) gl_cv_func_memchr_works
="guessing no" ;;
16088 # Guess yes on native Windows.
16089 mingw
*) gl_cv_func_memchr_works
="guessing yes" ;;
16090 # If we don't know, obey --enable-cross-guesses.
16091 *) gl_cv_func_memchr_works
="$gl_cross_guess_normal" ;;
16095 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
16096 /* end confdefs.h. */
16098 #include <string.h>
16099 #if HAVE_SYS_MMAN_H
16100 # include <fcntl.h>
16101 # include <unistd.h>
16102 # include <sys/types.h>
16103 # include <sys/mman.h>
16105 # define MAP_FILE 0
16114 char *fence = NULL;
16115 #if HAVE_SYS_MMAN_H && HAVE_MPROTECT
16116 # if HAVE_MAP_ANONYMOUS
16117 const int flags = MAP_ANONYMOUS | MAP_PRIVATE;
16119 # else /* !HAVE_MAP_ANONYMOUS */
16120 const int flags = MAP_FILE | MAP_PRIVATE;
16121 int fd = open ("/dev/zero", O_RDONLY, 0666);
16125 int pagesize = getpagesize ();
16127 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE,
16129 if (two_pages != (char *)(-1)
16130 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0)
16131 fence = two_pages + pagesize;
16136 /* Test against bugs on glibc systems. */
16137 if (memchr (fence, 0, 0))
16139 strcpy (fence - 9, "12345678");
16140 if (memchr (fence - 9, 0, 79) != fence - 1)
16142 if (memchr (fence - 1, 0, 3) != fence - 1)
16144 /* Test against bug on AIX 7.2. */
16145 if (memchr (fence - 4, '6', 16) != fence - 4)
16148 /* Test against bug on Android 4.3. */
16154 if (memchr (input, 0x789abc00 | 'b', 3) != input + 1)
16163 if ac_fn_c_try_run
"$LINENO"; then :
16164 gl_cv_func_memchr_works
=yes
16166 gl_cv_func_memchr_works
=no
16168 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
16169 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
16174 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5
16175 $as_echo "$gl_cv_func_memchr_works" >&6; }
16176 case "$gl_cv_func_memchr_works" in
16178 *) REPLACE_MEMCHR
=1 ;;
16181 ac_fn_c_check_decl
"$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default"
16182 if test "x$ac_cv_have_decl_memmem" = xyes
; then :
16188 cat >>confdefs.h
<<_ACEOF
16189 #define HAVE_DECL_MEMMEM $ac_have_decl
16196 for ac_func
in memmem
16198 ac_fn_c_check_func
"$LINENO" "memmem" "ac_cv_func_memmem"
16199 if test "x$ac_cv_func_memmem" = xyes
; then :
16200 cat >>confdefs.h
<<_ACEOF
16201 #define HAVE_MEMMEM 1
16207 if test $ac_cv_func_memmem = yes; then
16213 if test $ac_cv_have_decl_memmem = no
; then
16216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
16217 $as_echo_n "checking whether memmem works... " >&6; }
16218 if ${gl_cv_func_memmem_works_always+:} false
; then :
16219 $as_echo_n "(cached) " >&6
16221 if test "$cross_compiling" = yes; then :
16222 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
16223 /* end confdefs.h. */
16225 #ifdef __GNU_LIBRARY__
16226 #include <features.h>
16227 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
16228 || __GLIBC_MINOR__ > 12)) \
16229 || (__GLIBC__ > 2)) \
16230 || defined __UCLIBC__
16233 #elif defined __CYGWIN__
16234 #include <cygwin/version.h>
16235 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
16243 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16244 $EGREP "Lucky user" >/dev
/null
2>&1; then :
16245 gl_cv_func_memmem_works_always
="guessing yes"
16247 gl_cv_func_memmem_works_always
="$gl_cross_guess_normal"
16253 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
16254 /* end confdefs.h. */
16256 #include <string.h> /* for memmem */
16257 #define P "_EF_BF_BD"
16258 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
16259 #define NEEDLE P P P P P
16266 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
16268 /* Check for empty needle behavior. */
16270 const char *haystack = "AAA";
16271 if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
16280 if ac_fn_c_try_run
"$LINENO"; then :
16281 gl_cv_func_memmem_works_always
=yes
16283 gl_cv_func_memmem_works_always
=no
16285 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
16286 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
16291 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
16292 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
16293 case "$gl_cv_func_memmem_works_always" in
16302 ac_fn_c_check_decl
"$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default"
16303 if test "x$ac_cv_have_decl_memrchr" = xyes
; then :
16309 cat >>confdefs.h
<<_ACEOF
16310 #define HAVE_DECL_MEMRCHR $ac_have_decl
16317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5
16318 $as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; }
16319 if ${gl_cv_minmax_in_limits_h+:} false
; then :
16320 $as_echo_n "(cached) " >&6
16322 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
16323 /* end confdefs.h. */
16324 #include <limits.h>
16325 int x = MIN (42, 17);
16334 if ac_fn_c_try_compile
"$LINENO"; then :
16335 gl_cv_minmax_in_limits_h
=yes
16337 gl_cv_minmax_in_limits_h
=no
16339 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
16341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5
16342 $as_echo "$gl_cv_minmax_in_limits_h" >&6; }
16343 if test $gl_cv_minmax_in_limits_h = yes; then
16345 $as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h
16354 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5
16355 $as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; }
16356 if ${gl_cv_minmax_in_sys_param_h+:} false
; then :
16357 $as_echo_n "(cached) " >&6
16359 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
16360 /* end confdefs.h. */
16361 #include <sys/param.h>
16362 int x = MIN (42, 17);
16371 if ac_fn_c_try_compile
"$LINENO"; then :
16372 gl_cv_minmax_in_sys_param_h
=yes
16374 gl_cv_minmax_in_sys_param_h
=no
16376 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
16378 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5
16379 $as_echo "$gl_cv_minmax_in_sys_param_h" >&6; }
16380 if test $gl_cv_minmax_in_sys_param_h = yes; then
16382 $as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h
16395 GNULIB_GETADDRINFO
=0;
16396 HAVE_STRUCT_ADDRINFO
=1;
16397 HAVE_DECL_FREEADDRINFO
=1;
16398 HAVE_DECL_GAI_STRERROR
=1;
16399 HAVE_DECL_GETADDRINFO
=1;
16400 HAVE_DECL_GETNAMEINFO
=1;
16401 REPLACE_GAI_STRERROR
=0;
16402 REPLACE_GETADDRINFO
=0;
16405 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5
16406 $as_echo_n "checking for O_CLOEXEC... " >&6; }
16407 if ${gl_cv_macro_O_CLOEXEC+:} false
; then :
16408 $as_echo_n "(cached) " >&6
16410 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
16411 /* end confdefs.h. */
16425 if ac_fn_c_try_compile
"$LINENO"; then :
16426 gl_cv_macro_O_CLOEXEC
=yes
16428 gl_cv_macro_O_CLOEXEC
=no
16430 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
16432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5
16433 $as_echo "$gl_cv_macro_O_CLOEXEC" >&6; }
16437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5
16438 $as_echo_n "checking for promoted mode_t type... " >&6; }
16439 if ${gl_cv_promoted_mode_t+:} false
; then :
16440 $as_echo_n "(cached) " >&6
16443 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
16444 /* end confdefs.h. */
16445 #include <sys/types.h>
16449 typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1];
16454 if ac_fn_c_try_compile
"$LINENO"; then :
16455 gl_cv_promoted_mode_t
='int'
16457 gl_cv_promoted_mode_t
='mode_t'
16459 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
16462 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5
16463 $as_echo "$gl_cv_promoted_mode_t" >&6; }
16465 cat >>confdefs.h
<<_ACEOF
16466 #define PROMOTED_MODE_T $gl_cv_promoted_mode_t
16478 ac_fn_c_check_decl
"$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default"
16479 if test "x$ac_cv_have_decl_setenv" = xyes
; then :
16485 cat >>confdefs.h
<<_ACEOF
16486 #define HAVE_DECL_SETENV $ac_have_decl
16494 if test $ac_cv_have_decl_setenv = no
; then
16502 for ac_header
in search.h
16504 ac_fn_c_check_header_mongrel
"$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default"
16505 if test "x$ac_cv_header_search_h" = xyes
; then :
16506 cat >>confdefs.h
<<_ACEOF
16507 #define HAVE_SEARCH_H 1
16514 for ac_func
in tsearch
16516 ac_fn_c_check_func
"$LINENO" "tsearch" "ac_cv_func_tsearch"
16517 if test "x$ac_cv_func_tsearch" = xyes
; then :
16518 cat >>confdefs.h
<<_ACEOF
16519 #define HAVE_TSEARCH 1
16528 GNULIB_PTHREAD_SIGMASK
=0;
16530 GNULIB_SIGNAL_H_SIGPIPE
=0;
16531 GNULIB_SIGPROCMASK
=0;
16532 GNULIB_SIGACTION
=0;
16533 HAVE_POSIX_SIGNALBLOCKING
=1;
16534 HAVE_PTHREAD_SIGMASK
=1;
16539 HAVE_STRUCT_SIGACTION_SA_SIGACTION
=1;
16541 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
=1;
16543 HAVE_SIGHANDLER_T
=1;
16544 REPLACE_PTHREAD_SIGMASK
=0;
16548 ac_fn_c_check_type
"$LINENO" "sigset_t" "ac_cv_type_sigset_t" "
16549 #include <signal.h>
16550 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */
16551 #include <sys/types.h>
16554 if test "x$ac_cv_type_sigset_t" = xyes
; then :
16556 cat >>confdefs.h
<<_ACEOF
16557 #define HAVE_SIGSET_T 1
16560 gl_cv_type_sigset_t
=yes
16562 gl_cv_type_sigset_t
=no
16565 if test $gl_cv_type_sigset_t != yes; then
16569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5
16570 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; }
16571 if ${ac_cv_header_stdbool_h+:} false
; then :
16572 $as_echo_n "(cached) " >&6
16574 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
16575 /* end confdefs.h. */
16577 #include <stdbool.h>
16582 typedef _Bool Bool;
16584 "error: bool is not defined"
16587 "error: false is not defined"
16590 "error: false is not 0"
16593 "error: true is not defined"
16596 "error: true is not 1"
16600 #ifndef __bool_true_false_are_defined
16601 "error: __bool_true_false_are_defined is not defined"
16604 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s;
16606 char a[true == 1 ? 1 : -1];
16607 char b[false == 0 ? 1 : -1];
16608 char c[__bool_true_false_are_defined == 1 ? 1 : -1];
16609 char d[(bool) 0.5 == true ? 1 : -1];
16610 /* See body of main program for 'e'. */
16611 char f[(Bool) 0.0 == false ? 1 : -1];
16613 char h[sizeof (Bool)];
16614 char i[sizeof s.t];
16615 enum { j = false, k = true, l = false * true, m = true * 256 };
16616 /* The following fails for
16617 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */
16619 char o[sizeof n == m * sizeof n[0] ? 1 : -1];
16620 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1];
16621 /* Catch a bug in an HP-UX C compiler. See
16622 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html
16623 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html
16634 *pq |= q; *pq |= ! q;
16635 *qq |= q; *qq |= ! q;
16636 /* Refer to every declared value, to avoid compiler optimizations. */
16637 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l
16638 + !m + !n + !o + !p + !q + !pq + !qq);
16644 if ac_fn_c_try_compile
"$LINENO"; then :
16645 ac_cv_header_stdbool_h
=yes
16647 ac_cv_header_stdbool_h
=no
16649 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
16651 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5
16652 $as_echo "$ac_cv_header_stdbool_h" >&6; }
16653 ac_fn_c_check_type
"$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default"
16654 if test "x$ac_cv_type__Bool" = xyes
; then :
16656 cat >>confdefs.h
<<_ACEOF
16657 #define HAVE__BOOL 1
16664 ac_fn_c_check_decl
"$LINENO" "fcloseall" "ac_cv_have_decl_fcloseall" "$ac_includes_default"
16665 if test "x$ac_cv_have_decl_fcloseall" = xyes
; then :
16671 cat >>confdefs.h
<<_ACEOF
16672 #define HAVE_DECL_FCLOSEALL $ac_have_decl
16675 ac_fn_c_check_decl
"$LINENO" "ecvt" "ac_cv_have_decl_ecvt" "$ac_includes_default"
16676 if test "x$ac_cv_have_decl_ecvt" = xyes
; then :
16682 cat >>confdefs.h
<<_ACEOF
16683 #define HAVE_DECL_ECVT $ac_have_decl
16686 ac_fn_c_check_decl
"$LINENO" "fcvt" "ac_cv_have_decl_fcvt" "$ac_includes_default"
16687 if test "x$ac_cv_have_decl_fcvt" = xyes
; then :
16693 cat >>confdefs.h
<<_ACEOF
16694 #define HAVE_DECL_FCVT $ac_have_decl
16697 ac_fn_c_check_decl
"$LINENO" "gcvt" "ac_cv_have_decl_gcvt" "$ac_includes_default"
16698 if test "x$ac_cv_have_decl_gcvt" = xyes
; then :
16704 cat >>confdefs.h
<<_ACEOF
16705 #define HAVE_DECL_GCVT $ac_have_decl
16708 ac_fn_c_check_decl
"$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default"
16709 if test "x$ac_cv_have_decl_strdup" = xyes
; then :
16715 cat >>confdefs.h
<<_ACEOF
16716 #define HAVE_DECL_STRDUP $ac_have_decl
16720 REPLACE_STRERROR_0
=0
16721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5
16722 $as_echo_n "checking whether strerror(0) succeeds... " >&6; }
16723 if ${gl_cv_func_strerror_0_works+:} false
; then :
16724 $as_echo_n "(cached) " >&6
16726 if test "$cross_compiling" = yes; then :
16728 # Guess yes on glibc systems.
16729 *-gnu* | gnu
*) gl_cv_func_strerror_0_works
="guessing yes" ;;
16730 # Guess yes on musl systems.
16731 *-musl*) gl_cv_func_strerror_0_works
="guessing yes" ;;
16732 # Guess yes on native Windows.
16733 mingw
*) gl_cv_func_strerror_0_works
="guessing yes" ;;
16734 # If we don't know, obey --enable-cross-guesses.
16735 *) gl_cv_func_strerror_0_works
="$gl_cross_guess_normal" ;;
16739 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
16740 /* end confdefs.h. */
16741 #include <string.h>
16750 str = strerror (0);
16751 if (!*str) result |= 1;
16752 if (errno) result |= 2;
16753 if (strstr (str, "nknown") || strstr (str, "ndefined"))
16760 if ac_fn_c_try_run
"$LINENO"; then :
16761 gl_cv_func_strerror_0_works
=yes
16763 gl_cv_func_strerror_0_works
=no
16765 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
16766 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
16771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5
16772 $as_echo "$gl_cv_func_strerror_0_works" >&6; }
16773 case "$gl_cv_func_strerror_0_works" in
16776 REPLACE_STRERROR_0
=1
16778 $as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h
16792 if test $ac_cv_func_strerror_r = yes; then
16793 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
16794 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5
16795 $as_echo_n "checking for strerror_r with POSIX signature... " >&6; }
16796 if ${gl_cv_func_strerror_r_posix_signature+:} false
; then :
16797 $as_echo_n "(cached) " >&6
16799 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
16800 /* end confdefs.h. */
16801 #include <string.h>
16802 int strerror_r (int, char *, size_t);
16812 if ac_fn_c_try_compile
"$LINENO"; then :
16813 gl_cv_func_strerror_r_posix_signature
=yes
16815 gl_cv_func_strerror_r_posix_signature
=no
16817 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
16820 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5
16821 $as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; }
16822 if test $gl_cv_func_strerror_r_posix_signature = yes; then
16823 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5
16824 $as_echo_n "checking whether strerror_r works... " >&6; }
16825 if ${gl_cv_func_strerror_r_works+:} false
; then :
16826 $as_echo_n "(cached) " >&6
16828 if test "$cross_compiling" = yes; then :
16832 aix
*) gl_cv_func_strerror_r_works
="guessing no";;
16833 # Guess no on HP-UX.
16834 hpux
*) gl_cv_func_strerror_r_works
="guessing no";;
16835 # Guess no on BSD variants.
16836 *bsd
*) gl_cv_func_strerror_r_works
="guessing no";;
16837 # Guess yes otherwise.
16838 *) gl_cv_func_strerror_r_works
="guessing yes";;
16842 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
16843 /* end confdefs.h. */
16845 #include <string.h>
16852 if (strerror_r (EACCES, buf, 0) < 0)
16855 if (strerror_r (EACCES, buf, sizeof buf) != 0)
16857 strcpy (buf, "Unknown");
16858 if (strerror_r (0, buf, sizeof buf) != 0)
16862 if (strstr (buf, "nknown") || strstr (buf, "ndefined"))
16866 if (strerror_r (-3, buf, sizeof buf) < 0)
16878 if ac_fn_c_try_run
"$LINENO"; then :
16879 gl_cv_func_strerror_r_works
=yes
16881 gl_cv_func_strerror_r_works
=no
16883 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
16884 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
16889 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16890 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
16893 if test $ac_cv_func___xpg_strerror_r = yes; then
16894 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5
16895 $as_echo_n "checking whether __xpg_strerror_r works... " >&6; }
16896 if ${gl_cv_func_strerror_r_works+:} false
; then :
16897 $as_echo_n "(cached) " >&6
16899 if test "$cross_compiling" = yes; then :
16900 gl_cv_func_strerror_r_works
="$gl_cross_guess_normal"
16903 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
16904 /* end confdefs.h. */
16906 #include <string.h>
16911 int __xpg_strerror_r(int, char *, size_t);
16917 char buf[256] = "^";
16919 char *str = strerror (-1);
16920 strcpy (copy, str);
16921 if (__xpg_strerror_r (-2, buf, 1) == 0)
16925 __xpg_strerror_r (-2, buf, 256);
16926 if (strcmp (str, copy))
16934 if ac_fn_c_try_run
"$LINENO"; then :
16935 gl_cv_func_strerror_r_works
=yes
16937 gl_cv_func_strerror_r_works
=no
16939 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
16940 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
16945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5
16946 $as_echo "$gl_cv_func_strerror_r_works" >&6; }
16952 ac_fn_c_check_decl
"$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default"
16953 if test "x$ac_cv_have_decl_strerror_r" = xyes
; then :
16959 cat >>confdefs.h
<<_ACEOF
16960 #define HAVE_DECL_STRERROR_R $ac_have_decl
16977 if test $gl_cv_have_include_next = yes; then
16978 gl_cv_next_string_h
='<'string.h
'>'
16980 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5
16981 $as_echo_n "checking absolute name of <string.h>... " >&6; }
16982 if ${gl_cv_next_string_h+:} false
; then :
16983 $as_echo_n "(cached) " >&6
16988 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
16989 /* end confdefs.h. */
16990 #include <string.h>
16993 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
16994 *) gl_absname_cpp
="$ac_cpp" ;;
16999 gl_dirsep_regex
='[/\\]'
17002 gl_dirsep_regex
='\/'
17005 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
17006 gl_header_literal_regex
=`echo 'string.h' \
17007 | sed -e "$gl_make_literal_regex_sed"`
17008 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17009 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17015 gl_cv_absolute_string_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17016 sed -n "$gl_absolute_header_sed"`
17018 gl_header
=$gl_cv_absolute_string_h
17019 gl_cv_next_string_h
='"'$gl_header'"'
17023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5
17024 $as_echo "$gl_cv_next_string_h" >&6; }
17026 NEXT_STRING_H
=$gl_cv_next_string_h
17028 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
17029 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17030 gl_next_as_first_directive
='<'string.h
'>'
17032 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17033 gl_next_as_first_directive
=$gl_cv_next_string_h
17035 NEXT_AS_FIRST_DIRECTIVE_STRING_H
=$gl_next_as_first_directive
17061 if test $gl_cv_have_include_next = yes; then
17062 gl_cv_next_strings_h
='<'strings.h
'>'
17064 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <strings.h>" >&5
17065 $as_echo_n "checking absolute name of <strings.h>... " >&6; }
17066 if ${gl_cv_next_strings_h+:} false
; then :
17067 $as_echo_n "(cached) " >&6
17070 if test $ac_cv_header_strings_h = yes; then
17075 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
17076 /* end confdefs.h. */
17077 #include <strings.h>
17080 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
17081 *) gl_absname_cpp
="$ac_cpp" ;;
17086 gl_dirsep_regex
='[/\\]'
17089 gl_dirsep_regex
='\/'
17092 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
17093 gl_header_literal_regex
=`echo 'strings.h' \
17094 | sed -e "$gl_make_literal_regex_sed"`
17095 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17096 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17102 gl_cv_absolute_strings_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17103 sed -n "$gl_absolute_header_sed"`
17105 gl_header
=$gl_cv_absolute_strings_h
17106 gl_cv_next_strings_h
='"'$gl_header'"'
17108 gl_cv_next_strings_h
='<'strings.h
'>'
17113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_strings_h" >&5
17114 $as_echo "$gl_cv_next_strings_h" >&6; }
17116 NEXT_STRINGS_H
=$gl_cv_next_strings_h
17118 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
17119 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17120 gl_next_as_first_directive
='<'strings.h
'>'
17122 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17123 gl_next_as_first_directive
=$gl_cv_next_strings_h
17125 NEXT_AS_FIRST_DIRECTIVE_STRINGS_H
=$gl_next_as_first_directive
17130 if test $ac_cv_header_strings_h = yes; then
17141 ac_fn_c_check_decl
"$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default"
17142 if test "x$ac_cv_have_decl_strnlen" = xyes
; then :
17148 cat >>confdefs.h
<<_ACEOF
17149 #define HAVE_DECL_STRNLEN $ac_have_decl
17155 if test $REPLACE_MEMCHR = 1; then
17158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
17159 $as_echo_n "checking whether strstr works... " >&6; }
17160 if ${gl_cv_func_strstr_works_always+:} false
; then :
17161 $as_echo_n "(cached) " >&6
17163 if test "$cross_compiling" = yes; then :
17164 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
17165 /* end confdefs.h. */
17167 #ifdef __GNU_LIBRARY__
17168 #include <features.h>
17169 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
17170 || defined __UCLIBC__
17173 #elif defined __CYGWIN__
17174 #include <cygwin/version.h>
17175 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
17183 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17184 $EGREP "Lucky user" >/dev
/null
2>&1; then :
17185 gl_cv_func_strstr_works_always
="guessing yes"
17187 gl_cv_func_strstr_works_always
="$gl_cross_guess_normal"
17193 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
17194 /* end confdefs.h. */
17196 #include <string.h> /* for strstr */
17197 #ifdef __GNU_LIBRARY__
17198 #include <features.h>
17199 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
17203 #define P "_EF_BF_BD"
17204 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
17205 #define NEEDLE P P P P P
17210 return !!strstr (HAYSTACK, NEEDLE);
17216 if ac_fn_c_try_run
"$LINENO"; then :
17217 gl_cv_func_strstr_works_always
=yes
17219 gl_cv_func_strstr_works_always
=no
17221 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
17222 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
17227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
17228 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
17229 case "$gl_cv_func_strstr_works_always" in
17237 ac_fn_c_check_decl
"$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default"
17238 if test "x$ac_cv_have_decl_strtok_r" = xyes
; then :
17244 cat >>confdefs.h
<<_ACEOF
17245 #define HAVE_DECL_STRTOK_R $ac_have_decl
17260 $as_echo "#define _USE_STD_STAT 1" >>confdefs.h
17272 if test $gl_cv_have_include_next = yes; then
17273 gl_cv_next_sys_types_h
='<'sys
/types.h
'>'
17275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5
17276 $as_echo_n "checking absolute name of <sys/types.h>... " >&6; }
17277 if ${gl_cv_next_sys_types_h+:} false
; then :
17278 $as_echo_n "(cached) " >&6
17283 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
17284 /* end confdefs.h. */
17285 #include <sys/types.h>
17288 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
17289 *) gl_absname_cpp
="$ac_cpp" ;;
17294 gl_dirsep_regex
='[/\\]'
17297 gl_dirsep_regex
='\/'
17300 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
17301 gl_header_literal_regex
=`echo 'sys/types.h' \
17302 | sed -e "$gl_make_literal_regex_sed"`
17303 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17304 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17310 gl_cv_absolute_sys_types_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17311 sed -n "$gl_absolute_header_sed"`
17313 gl_header
=$gl_cv_absolute_sys_types_h
17314 gl_cv_next_sys_types_h
='"'$gl_header'"'
17318 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5
17319 $as_echo "$gl_cv_next_sys_types_h" >&6; }
17321 NEXT_SYS_TYPES_H
=$gl_cv_next_sys_types_h
17323 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
17324 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17325 gl_next_as_first_directive
='<'sys
/types.h
'>'
17327 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17328 gl_next_as_first_directive
=$gl_cv_next_sys_types_h
17330 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H
=$gl_next_as_first_directive
17343 WINDOWS_STAT_INODES
=0
17354 GNULIB_LOCALTIME
=0;
17355 GNULIB_NANOSLEEP
=0;
17359 GNULIB_TIMESPEC_GET
=0;
17363 GNULIB_MDA_TZSET
=1;
17364 HAVE_DECL_LOCALTIME_R
=1;
17368 HAVE_TIMESPEC_GET
=1;
17370 REPLACE_CTIME
=GNULIB_PORTCHECK
;
17371 REPLACE_LOCALTIME_R
=GNULIB_PORTCHECK
;
17372 REPLACE_MKTIME
=GNULIB_PORTCHECK
;
17373 REPLACE_NANOSLEEP
=GNULIB_PORTCHECK
;
17374 REPLACE_STRFTIME
=GNULIB_PORTCHECK
;
17375 REPLACE_TIMEGM
=GNULIB_PORTCHECK
;
17376 REPLACE_TZSET
=GNULIB_PORTCHECK
;
17378 : ${GNULIB_GETTIMEOFDAY=0};
17380 REPLACE_LOCALTIME
=0;
17384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5
17385 $as_echo_n "checking for struct timespec in <time.h>... " >&6; }
17386 if ${gl_cv_sys_struct_timespec_in_time_h+:} false
; then :
17387 $as_echo_n "(cached) " >&6
17389 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
17390 /* end confdefs.h. */
17396 static struct timespec x; x.tv_sec = x.tv_nsec;
17401 if ac_fn_c_try_compile
"$LINENO"; then :
17402 gl_cv_sys_struct_timespec_in_time_h
=yes
17404 gl_cv_sys_struct_timespec_in_time_h
=no
17406 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
17408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5
17409 $as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; }
17411 TIME_H_DEFINES_STRUCT_TIMESPEC
=0
17412 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
=0
17413 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
=0
17414 UNISTD_H_DEFINES_STRUCT_TIMESPEC
=0
17415 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then
17416 TIME_H_DEFINES_STRUCT_TIMESPEC
=1
17418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5
17419 $as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; }
17420 if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false
; then :
17421 $as_echo_n "(cached) " >&6
17423 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
17424 /* end confdefs.h. */
17425 #include <sys/time.h>
17430 static struct timespec x; x.tv_sec = x.tv_nsec;
17435 if ac_fn_c_try_compile
"$LINENO"; then :
17436 gl_cv_sys_struct_timespec_in_sys_time_h
=yes
17438 gl_cv_sys_struct_timespec_in_sys_time_h
=no
17440 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
17442 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5
17443 $as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; }
17444 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then
17445 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC
=1
17447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5
17448 $as_echo_n "checking for struct timespec in <pthread.h>... " >&6; }
17449 if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false
; then :
17450 $as_echo_n "(cached) " >&6
17452 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
17453 /* end confdefs.h. */
17454 #include <pthread.h>
17459 static struct timespec x; x.tv_sec = x.tv_nsec;
17464 if ac_fn_c_try_compile
"$LINENO"; then :
17465 gl_cv_sys_struct_timespec_in_pthread_h
=yes
17467 gl_cv_sys_struct_timespec_in_pthread_h
=no
17469 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
17471 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5
17472 $as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; }
17473 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then
17474 PTHREAD_H_DEFINES_STRUCT_TIMESPEC
=1
17476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5
17477 $as_echo_n "checking for struct timespec in <unistd.h>... " >&6; }
17478 if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false
; then :
17479 $as_echo_n "(cached) " >&6
17481 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
17482 /* end confdefs.h. */
17483 #include <unistd.h>
17488 static struct timespec x; x.tv_sec = x.tv_nsec;
17493 if ac_fn_c_try_compile
"$LINENO"; then :
17494 gl_cv_sys_struct_timespec_in_unistd_h
=yes
17496 gl_cv_sys_struct_timespec_in_unistd_h
=no
17498 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
17500 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5
17501 $as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; }
17502 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then
17503 UNISTD_H_DEFINES_STRUCT_TIMESPEC
=1
17524 if test $gl_cv_have_include_next = yes; then
17525 gl_cv_next_time_h
='<'time.h
'>'
17527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5
17528 $as_echo_n "checking absolute name of <time.h>... " >&6; }
17529 if ${gl_cv_next_time_h+:} false
; then :
17530 $as_echo_n "(cached) " >&6
17535 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
17536 /* end confdefs.h. */
17540 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
17541 *) gl_absname_cpp
="$ac_cpp" ;;
17546 gl_dirsep_regex
='[/\\]'
17549 gl_dirsep_regex
='\/'
17552 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
17553 gl_header_literal_regex
=`echo 'time.h' \
17554 | sed -e "$gl_make_literal_regex_sed"`
17555 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17556 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17562 gl_cv_absolute_time_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17563 sed -n "$gl_absolute_header_sed"`
17565 gl_header
=$gl_cv_absolute_time_h
17566 gl_cv_next_time_h
='"'$gl_header'"'
17570 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5
17571 $as_echo "$gl_cv_next_time_h" >&6; }
17573 NEXT_TIME_H
=$gl_cv_next_time_h
17575 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
17576 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17577 gl_next_as_first_directive
='<'time.h
'>'
17579 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17580 gl_next_as_first_directive
=$gl_cv_next_time_h
17582 NEXT_AS_FIRST_DIRECTIVE_TIME_H
=$gl_next_as_first_directive
17591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME_UTC in <time.h>" >&5
17592 $as_echo_n "checking for TIME_UTC in <time.h>... " >&6; }
17593 if ${gl_cv_time_h_has_TIME_UTC+:} false
; then :
17594 $as_echo_n "(cached) " >&6
17596 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
17597 /* end confdefs.h. */
17603 static int x = TIME_UTC; x++;
17608 if ac_fn_c_try_compile
"$LINENO"; then :
17609 gl_cv_time_h_has_TIME_UTC
=yes
17611 gl_cv_time_h_has_TIME_UTC
=no
17613 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
17615 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_h_has_TIME_UTC" >&5
17616 $as_echo "$gl_cv_time_h_has_TIME_UTC" >&6; }
17617 if test $gl_cv_time_h_has_TIME_UTC = yes; then
17618 TIME_H_DEFINES_TIME_UTC
=1
17620 TIME_H_DEFINES_TIME_UTC
=0
17626 ac_fn_c_check_decl
"$LINENO" "execvpe" "ac_cv_have_decl_execvpe" "$ac_includes_default"
17627 if test "x$ac_cv_have_decl_execvpe" = xyes
; then :
17633 cat >>confdefs.h
<<_ACEOF
17634 #define HAVE_DECL_EXECVPE $ac_have_decl
17637 ac_fn_c_check_decl
"$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default"
17638 if test "x$ac_cv_have_decl_unsetenv" = xyes
; then :
17644 cat >>confdefs.h
<<_ACEOF
17645 #define HAVE_DECL_UNSETENV $ac_have_decl
17652 if test $ac_cv_header_crtdefs_h = yes; then
17662 GNULIB_ISWXDIGIT
=0;
17666 GNULIB_TOWCTRANS
=0;
17670 REPLACE_ISWBLANK
=0;
17671 REPLACE_ISWDIGIT
=0;
17672 REPLACE_ISWXDIGIT
=0;
17682 GL_COND_LIBTOOL_TRUE
=
17683 GL_COND_LIBTOOL_FALSE
='#'
17685 GL_COND_LIBTOOL_TRUE
='#'
17686 GL_COND_LIBTOOL_FALSE
=
17689 gl_cond_libtool
=false
17692 gl_m4_base
='import/m4'
17703 gl_source_base
='import'
17706 if test $ac_cv_func_alloca_works = no
; then
17710 # Define an additional variable used in the Makefile substitution.
17711 if test $ac_cv_working_alloca_h = yes; then
17712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5
17713 $as_echo_n "checking for alloca as a compiler built-in... " >&6; }
17714 if ${gl_cv_rpl_alloca+:} false
; then :
17715 $as_echo_n "(cached) " >&6
17718 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
17719 /* end confdefs.h. */
17721 #if defined __GNUC__ || defined _AIX || defined _MSC_VER
17726 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
17727 $EGREP "Need own alloca" >/dev
/null
2>&1; then :
17728 gl_cv_rpl_alloca
=yes
17730 gl_cv_rpl_alloca
=no
17736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5
17737 $as_echo "$gl_cv_rpl_alloca" >&6; }
17738 if test $gl_cv_rpl_alloca = yes; then
17740 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
17750 if test -n "$ALLOCA_H"; then
17751 GL_GENERATE_ALLOCA_H_TRUE
=
17752 GL_GENERATE_ALLOCA_H_FALSE
='#'
17754 GL_GENERATE_ALLOCA_H_TRUE
='#'
17755 GL_GENERATE_ALLOCA_H_FALSE
=
17759 if test $ac_cv_working_alloca_h = yes; then
17770 if test $ac_cv_header_arpa_inet_h = yes; then
17785 if test $gl_cv_have_include_next = yes; then
17786 gl_cv_next_arpa_inet_h
='<'arpa
/inet.h
'>'
17788 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5
17789 $as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; }
17790 if ${gl_cv_next_arpa_inet_h+:} false
; then :
17791 $as_echo_n "(cached) " >&6
17794 if test $ac_cv_header_arpa_inet_h = yes; then
17799 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
17800 /* end confdefs.h. */
17801 #include <arpa/inet.h>
17804 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
17805 *) gl_absname_cpp
="$ac_cpp" ;;
17810 gl_dirsep_regex
='[/\\]'
17813 gl_dirsep_regex
='\/'
17816 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
17817 gl_header_literal_regex
=`echo 'arpa/inet.h' \
17818 | sed -e "$gl_make_literal_regex_sed"`
17819 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
17820 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
17826 gl_cv_absolute_arpa_inet_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
17827 sed -n "$gl_absolute_header_sed"`
17829 gl_header
=$gl_cv_absolute_arpa_inet_h
17830 gl_cv_next_arpa_inet_h
='"'$gl_header'"'
17832 gl_cv_next_arpa_inet_h
='<'arpa
/inet.h
'>'
17837 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5
17838 $as_echo "$gl_cv_next_arpa_inet_h" >&6; }
17840 NEXT_ARPA_INET_H
=$gl_cv_next_arpa_inet_h
17842 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
17843 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
17844 gl_next_as_first_directive
='<'arpa
/inet.h
'>'
17846 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
17847 gl_next_as_first_directive
=$gl_cv_next_arpa_inet_h
17849 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H
=$gl_next_as_first_directive
17859 if test $ac_cv_header_sys_socket_h = yes; then
17862 if test $ac_cv_header_ws2tcpip_h = yes; then
17883 if test $ac_cv_func_btowc = no
; then
17890 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5
17891 $as_echo_n "checking whether btowc(0) is correct... " >&6; }
17892 if ${gl_cv_func_btowc_nul+:} false
; then :
17893 $as_echo_n "(cached) " >&6
17896 if test "$cross_compiling" = yes; then :
17899 # Guess no on Cygwin.
17900 cygwin
*) gl_cv_func_btowc_nul
="guessing no" ;;
17901 # Guess yes on native Windows.
17902 mingw
*) gl_cv_func_btowc_nul
="guessing yes" ;;
17903 # Guess yes otherwise.
17904 *) gl_cv_func_btowc_nul
="guessing yes" ;;
17908 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
17909 /* end confdefs.h. */
17914 if (btowc ('\0') != 0)
17919 if ac_fn_c_try_run
"$LINENO"; then :
17920 gl_cv_func_btowc_nul
=yes
17922 gl_cv_func_btowc_nul
=no
17924 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
17925 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
17930 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5
17931 $as_echo "$gl_cv_func_btowc_nul" >&6; }
17933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5
17934 $as_echo_n "checking whether btowc(EOF) is correct... " >&6; }
17935 if ${gl_cv_func_btowc_eof+:} false
; then :
17936 $as_echo_n "(cached) " >&6
17940 # Guess no on IRIX.
17941 irix
*) gl_cv_func_btowc_eof
="guessing no" ;;
17942 # Guess yes on native Windows.
17943 mingw
*) gl_cv_func_btowc_eof
="guessing yes" ;;
17944 # Guess yes otherwise.
17945 *) gl_cv_func_btowc_eof
="guessing yes" ;;
17947 if test $LOCALE_FR != none
; then
17948 if test "$cross_compiling" = yes; then :
17951 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
17952 /* end confdefs.h. */
17954 #include <locale.h>
17959 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
17961 if (btowc (EOF) != WEOF)
17967 if ac_fn_c_try_run
"$LINENO"; then :
17968 gl_cv_func_btowc_eof
=yes
17970 gl_cv_func_btowc_eof
=no
17972 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
17973 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
17979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5
17980 $as_echo "$gl_cv_func_btowc_eof" >&6; }
17982 case "$gl_cv_func_btowc_nul" in
17984 *) REPLACE_BTOWC
=1 ;;
17986 case "$gl_cv_func_btowc_eof" in
17988 *) REPLACE_BTOWC
=1 ;;
17992 if test $HAVE_BTOWC = 0 ||
test $REPLACE_BTOWC = 1; then
18001 gl_LIBOBJS
="$gl_LIBOBJS btowc.$ac_objext"
18018 $as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h
18023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5
18024 $as_echo_n "checking for __builtin_expect... " >&6; }
18025 if ${gl_cv___builtin_expect+:} false
; then :
18026 $as_echo_n "(cached) " >&6
18028 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
18029 /* end confdefs.h. */
18032 main (int argc, char **argv)
18034 argc = __builtin_expect (argc, 100);
18035 return argv[argc != 100][0];
18038 if ac_fn_c_try_link
"$LINENO"; then :
18039 gl_cv___builtin_expect
=yes
18041 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
18042 /* end confdefs.h. */
18044 #include <builtins.h>
18046 main (int argc, char **argv)
18048 argc = __builtin_expect (argc, 100);
18049 return argv[argc != 100][0];
18052 if ac_fn_c_try_link
"$LINENO"; then :
18053 gl_cv___builtin_expect
="in <builtins.h>"
18055 gl_cv___builtin_expect
=no
18057 rm -f core conftest.err conftest.
$ac_objext \
18058 conftest
$ac_exeext conftest.
$ac_ext
18060 rm -f core conftest.err conftest.
$ac_objext \
18061 conftest
$ac_exeext conftest.
$ac_ext
18063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5
18064 $as_echo "$gl_cv___builtin_expect" >&6; }
18065 if test "$gl_cv___builtin_expect" = yes; then
18066 $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h
18068 elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then
18069 $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h
18077 if test $ac_cv_func_canonicalize_file_name = no
; then
18078 HAVE_CANONICALIZE_FILE_NAME
=0
18079 if test $ac_cv_func_realpath = no
; then
18082 case "$gl_cv_func_realpath_works" in
18084 *) REPLACE_REALPATH
=1 ;;
18088 case "$gl_cv_func_realpath_works" in
18092 REPLACE_CANONICALIZE_FILE_NAME
=1
18098 if test $HAVE_CANONICALIZE_FILE_NAME = 0 ||
test $REPLACE_CANONICALIZE_FILE_NAME = 1; then
18107 gl_LIBOBJS
="$gl_LIBOBJS canonicalize-lgpl.$ac_objext"
18112 cat >>confdefs.h
<<_ACEOF
18113 #define GNULIB_CANONICALIZE_LGPL 1
18122 GNULIB_CANONICALIZE_FILE_NAME
=1
18128 $as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h
18143 $as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h
18158 $as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h
18164 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system supports file names of any length" >&5
18165 $as_echo_n "checking whether this system supports file names of any length... " >&6; }
18166 if ${gl_cv_have_unlimited_file_name_length+:} false
; then :
18167 $as_echo_n "(cached) " >&6
18169 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
18170 /* end confdefs.h. */
18172 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
18174 # include <unistd.h>
18176 #include <limits.h>
18177 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
18178 # include <sys/param.h>
18180 #if !defined PATH_MAX && defined MAXPATHLEN
18181 # define PATH_MAX MAXPATHLEN
18185 # define PATH_MAX 1024
18187 #if defined _WIN32 && ! defined __CYGWIN__
18189 # define PATH_MAX 260
18193 have_arbitrary_file_name_length_limit
18196 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18197 $EGREP "have_arbitrary_file_name_length_limit" >/dev
/null
2>&1; then :
18198 gl_cv_have_unlimited_file_name_length
=no
18200 gl_cv_have_unlimited_file_name_length
=yes
18205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_unlimited_file_name_length" >&5
18206 $as_echo "$gl_cv_have_unlimited_file_name_length" >&6; }
18208 if test $gl_cv_have_unlimited_file_name_length = no
; then
18217 gl_LIBOBJS
="$gl_LIBOBJS chdir-long.$ac_objext"
18222 if test $HAVE_CHOWN = 0 ||
test $REPLACE_CHOWN = 1; then
18231 gl_LIBOBJS
="$gl_LIBOBJS chown.$ac_objext"
18234 if test $REPLACE_CHOWN = 1 && test $ac_cv_func_fchown = no
; then
18243 gl_LIBOBJS
="$gl_LIBOBJS fchown-stub.$ac_objext"
18257 $as_echo "#define GNULIB_TEST_CHOWN 1" >>confdefs.h
18264 # Solaris 2.5.1 needs -lposix4 to get the clock_gettime function.
18265 # Solaris 7 prefers the library name -lrt to the obsolescent name -lposix4.
18267 # Save and restore LIBS so e.g., -lrt, isn't added to it. Otherwise, *all*
18268 # programs in the package would end up linked with that potentially-shared
18269 # library, inducing unnecessary run-time overhead.
18272 gl_saved_libs
=$LIBS
18273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5
18274 $as_echo_n "checking for library containing clock_gettime... " >&6; }
18275 if ${ac_cv_search_clock_gettime+:} false
; then :
18276 $as_echo_n "(cached) " >&6
18278 ac_func_search_save_LIBS
=$LIBS
18279 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
18280 /* end confdefs.h. */
18282 /* Override any GCC internal prototype to avoid an error.
18283 Use char because int might match the return type of a GCC
18284 builtin and then its argument prototype would still apply. */
18288 char clock_gettime ();
18292 return clock_gettime ();
18297 for ac_lib
in '' rt posix4
; do
18298 if test -z "$ac_lib"; then
18299 ac_res
="none required"
18302 LIBS
="-l$ac_lib $ac_func_search_save_LIBS"
18304 if ac_fn_c_try_link
"$LINENO"; then :
18305 ac_cv_search_clock_gettime
=$ac_res
18307 rm -f core conftest.err conftest.
$ac_objext \
18309 if ${ac_cv_search_clock_gettime+:} false
; then :
18313 if ${ac_cv_search_clock_gettime+:} false
; then :
18316 ac_cv_search_clock_gettime
=no
18318 rm conftest.
$ac_ext
18319 LIBS
=$ac_func_search_save_LIBS
18321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5
18322 $as_echo "$ac_cv_search_clock_gettime" >&6; }
18323 ac_res
=$ac_cv_search_clock_gettime
18324 if test "$ac_res" != no
; then :
18325 test "$ac_res" = "none required" || LIBS
="$ac_res $LIBS"
18326 test "$ac_cv_search_clock_gettime" = "none required" ||
18327 LIB_CLOCK_GETTIME
=$ac_cv_search_clock_gettime
18330 for ac_func
in clock_gettime clock_settime
18332 as_ac_var
=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
18333 ac_fn_c_check_func
"$LINENO" "$ac_func" "$as_ac_var"
18334 if eval test \"x\$
"$as_ac_var"\" = x
"yes"; then :
18335 cat >>confdefs.h
<<_ACEOF
18336 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
18342 LIBS
=$gl_saved_libs
18346 $as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h
18353 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
18362 if test $ac_cv_header_sys_socket_h != yes; then
18363 for ac_header
in winsock2.h
18365 ac_fn_c_check_header_mongrel
"$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
18366 if test "x$ac_cv_header_winsock2_h" = xyes
; then :
18367 cat >>confdefs.h
<<_ACEOF
18368 #define HAVE_WINSOCK2_H 1
18376 if test "$ac_cv_header_winsock2_h" = yes; then
18378 UNISTD_H_HAVE_WINSOCK2_H
=1
18379 SYS_IOCTL_H_HAVE_WINSOCK2_H
=1
18385 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then
18390 if test $REPLACE_CLOSE = 0; then
18394 if test $ac_cv_func_fchdir = no
; then
18398 if test $HAVE_FCHDIR = 0; then
18404 if test $REPLACE_CLOSE = 1; then
18413 gl_LIBOBJS
="$gl_LIBOBJS close.$ac_objext"
18427 $as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h
18434 for ac_func
in closedir
18436 ac_fn_c_check_func
"$LINENO" "closedir" "ac_cv_func_closedir"
18437 if test "x$ac_cv_func_closedir" = xyes
; then :
18438 cat >>confdefs.h
<<_ACEOF
18439 #define HAVE_CLOSEDIR 1
18445 if test $ac_cv_func_closedir = no
; then
18452 if test $ac_cv_func_fchdir = no
; then
18456 if test $HAVE_FCHDIR = 0; then
18457 if test $HAVE_CLOSEDIR = 1; then
18462 case $host_os,$HAVE_CLOSEDIR in
18464 REPLACE_CLOSEDIR
=1;;
18467 if test $HAVE_CLOSEDIR = 0 ||
test $REPLACE_CLOSEDIR = 1; then
18476 gl_LIBOBJS
="$gl_LIBOBJS closedir.$ac_objext"
18490 $as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h
18505 if test $gl_cv_have_include_next = yes; then
18506 gl_cv_next_ctype_h
='<'ctype.h
'>'
18508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5
18509 $as_echo_n "checking absolute name of <ctype.h>... " >&6; }
18510 if ${gl_cv_next_ctype_h+:} false
; then :
18511 $as_echo_n "(cached) " >&6
18516 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
18517 /* end confdefs.h. */
18521 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
18522 *) gl_absname_cpp
="$ac_cpp" ;;
18527 gl_dirsep_regex
='[/\\]'
18530 gl_dirsep_regex
='\/'
18533 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
18534 gl_header_literal_regex
=`echo 'ctype.h' \
18535 | sed -e "$gl_make_literal_regex_sed"`
18536 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18537 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18543 gl_cv_absolute_ctype_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18544 sed -n "$gl_absolute_header_sed"`
18546 gl_header
=$gl_cv_absolute_ctype_h
18547 gl_cv_next_ctype_h
='"'$gl_header'"'
18551 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5
18552 $as_echo "$gl_cv_next_ctype_h" >&6; }
18554 NEXT_CTYPE_H
=$gl_cv_next_ctype_h
18556 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
18557 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18558 gl_next_as_first_directive
='<'ctype.h
'>'
18560 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18561 gl_next_as_first_directive
=$gl_cv_next_ctype_h
18563 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H
=$gl_next_as_first_directive
18573 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5
18574 $as_echo_n "checking for d_ino member in directory struct... " >&6; }
18575 if ${gl_cv_struct_dirent_d_ino+:} false
; then :
18576 $as_echo_n "(cached) " >&6
18578 if test "$cross_compiling" = yes; then :
18580 # Guess yes on glibc systems with Linux kernel.
18581 linux
*-gnu*) gl_cv_struct_dirent_d_ino
="guessing yes" ;;
18582 # Guess yes on musl systems with Linux kernel.
18583 linux
*-musl*) gl_cv_struct_dirent_d_ino
="guessing yes" ;;
18584 # Guess no on native Windows.
18585 mingw
*) gl_cv_struct_dirent_d_ino
="guessing no" ;;
18586 # If we don't know, obey --enable-cross-guesses.
18587 *) gl_cv_struct_dirent_d_ino
="$gl_cross_guess_normal" ;;
18591 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
18592 /* end confdefs.h. */
18593 #include <sys/types.h>
18594 #include <sys/stat.h>
18595 #include <dirent.h>
18600 DIR *dp = opendir (".");
18607 { closedir (dp); return 2; }
18608 if (lstat (e->d_name, &st) != 0)
18609 { closedir (dp); return 3; }
18610 if (e->d_ino != st.st_ino)
18611 { closedir (dp); return 4; }
18619 if ac_fn_c_try_run
"$LINENO"; then :
18620 gl_cv_struct_dirent_d_ino
=yes
18622 gl_cv_struct_dirent_d_ino
=no
18624 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
18625 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
18629 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5
18630 $as_echo "$gl_cv_struct_dirent_d_ino" >&6; }
18631 case "$gl_cv_struct_dirent_d_ino" in
18634 $as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h
18640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5
18641 $as_echo_n "checking for d_type member in directory struct... " >&6; }
18642 if ${gl_cv_struct_dirent_d_type+:} false
; then :
18643 $as_echo_n "(cached) " >&6
18645 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
18646 /* end confdefs.h. */
18648 #include <sys/types.h>
18649 #include <dirent.h>
18654 struct dirent dp; dp.d_type = 0;
18659 if ac_fn_c_try_link
"$LINENO"; then :
18660 gl_cv_struct_dirent_d_type
=yes
18662 gl_cv_struct_dirent_d_type
=no
18664 rm -f core conftest.err conftest.
$ac_objext \
18665 conftest
$ac_exeext conftest.
$ac_ext
18669 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5
18670 $as_echo "$gl_cv_struct_dirent_d_type" >&6; }
18671 if test $gl_cv_struct_dirent_d_type = yes; then
18673 $as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h
18690 if test $gl_cv_have_include_next = yes; then
18691 gl_cv_next_dirent_h
='<'dirent.h
'>'
18693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5
18694 $as_echo_n "checking absolute name of <dirent.h>... " >&6; }
18695 if ${gl_cv_next_dirent_h+:} false
; then :
18696 $as_echo_n "(cached) " >&6
18699 if test $ac_cv_header_dirent_h = yes; then
18704 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
18705 /* end confdefs.h. */
18706 #include <dirent.h>
18709 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
18710 *) gl_absname_cpp
="$ac_cpp" ;;
18715 gl_dirsep_regex
='[/\\]'
18718 gl_dirsep_regex
='\/'
18721 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
18722 gl_header_literal_regex
=`echo 'dirent.h' \
18723 | sed -e "$gl_make_literal_regex_sed"`
18724 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
18725 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
18731 gl_cv_absolute_dirent_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
18732 sed -n "$gl_absolute_header_sed"`
18734 gl_header
=$gl_cv_absolute_dirent_h
18735 gl_cv_next_dirent_h
='"'$gl_header'"'
18737 gl_cv_next_dirent_h
='<'dirent.h
'>'
18742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5
18743 $as_echo "$gl_cv_next_dirent_h" >&6; }
18745 NEXT_DIRENT_H
=$gl_cv_next_dirent_h
18747 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
18748 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
18749 gl_next_as_first_directive
='<'dirent.h
'>'
18751 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
18752 gl_next_as_first_directive
=$gl_cv_next_dirent_h
18754 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H
=$gl_next_as_first_directive
18759 if test $ac_cv_header_dirent_h = yes; then
18775 for ac_func
in dirfd
18777 ac_fn_c_check_func
"$LINENO" "dirfd" "ac_cv_func_dirfd"
18778 if test "x$ac_cv_func_dirfd" = xyes
; then :
18779 cat >>confdefs.h
<<_ACEOF
18780 #define HAVE_DIRFD 1
18786 ac_fn_c_check_decl
"$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h>
18787 #include <dirent.h>
18789 if test "x$ac_cv_have_decl_dirfd" = xyes
; then :
18795 cat >>confdefs.h
<<_ACEOF
18796 #define HAVE_DECL_DIRFD $ac_have_decl
18799 if test $ac_cv_have_decl_dirfd = no
; then
18803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5
18804 $as_echo_n "checking whether dirfd is a macro... " >&6; }
18805 if ${gl_cv_func_dirfd_macro+:} false
; then :
18806 $as_echo_n "(cached) " >&6
18808 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
18809 /* end confdefs.h. */
18811 #include <sys/types.h>
18812 #include <dirent.h>
18814 dirent_header_defines_dirfd
18817 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
18818 $EGREP "dirent_header_defines_dirfd" >/dev
/null
2>&1; then :
18819 gl_cv_func_dirfd_macro
=yes
18821 gl_cv_func_dirfd_macro
=no
18826 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5
18827 $as_echo "$gl_cv_func_dirfd_macro" >&6; }
18829 # Use the replacement if we have no function or macro with that name,
18830 # or if OS/2 kLIBC whose dirfd() does not work.
18831 # Replace only if the system declares dirfd already.
18832 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in
18833 no
,no
,*,yes |
*,*,os2
*,yes)
18836 $as_echo "#define REPLACE_DIRFD 1" >>confdefs.h
18840 if test $ac_cv_func_dirfd = no
&& test $gl_cv_func_dirfd_macro = no \
18841 ||
test $REPLACE_DIRFD = 1; then
18850 gl_LIBOBJS
="$gl_LIBOBJS dirfd.$ac_objext"
18853 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5
18854 $as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; }
18855 if ${gl_cv_sys_dir_fd_member_name+:} false
; then :
18856 $as_echo_n "(cached) " >&6
18859 dirfd_save_CFLAGS
=$CFLAGS
18860 for ac_expr
in d_fd dd_fd
; do
18862 CFLAGS
="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr"
18863 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
18864 /* end confdefs.h. */
18866 #include <sys/types.h>
18867 #include <dirent.h>
18871 DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME;
18876 if ac_fn_c_try_compile
"$LINENO"; then :
18880 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
18881 CFLAGS
=$dirfd_save_CFLAGS
18882 test "$dir_fd_found" = yes && break
18884 test "$dir_fd_found" = yes || ac_expr
=no_such_member
18886 gl_cv_sys_dir_fd_member_name
=$ac_expr
18890 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5
18891 $as_echo "$gl_cv_sys_dir_fd_member_name" >&6; }
18892 if test $gl_cv_sys_dir_fd_member_name != no_such_member
; then
18894 cat >>confdefs.h
<<_ACEOF
18895 #define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name
18913 $as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h
18919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5
18920 $as_echo_n "checking whether // is distinct from /... " >&6; }
18921 if ${gl_cv_double_slash_root+:} false
; then :
18922 $as_echo_n "(cached) " >&6
18924 if test x
"$cross_compiling" = xyes
; then
18925 # When cross-compiling, there is no way to tell whether // is special
18926 # short of a list of hosts. However, the only known hosts to date
18927 # that have a distinct // are Apollo DomainOS (too old to port to),
18928 # Cygwin, and z/OS. If anyone knows of another system for which // has
18929 # special semantics and is distinct from /, please report it to
18930 # <bug-gnulib@gnu.org>.
18932 *-cygwin | i370-ibm-openedition
)
18933 gl_cv_double_slash_root
=yes ;;
18935 # Be optimistic and assume that / and // are the same when we
18937 gl_cv_double_slash_root
='unknown, assuming no' ;;
18940 set x
`ls -di / // 2>/dev/null`
18941 if test "$2" = "$4" && wc //dev
/null
>/dev
/null
2>&1; then
18942 gl_cv_double_slash_root
=no
18944 gl_cv_double_slash_root
=yes
18948 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5
18949 $as_echo "$gl_cv_double_slash_root" >&6; }
18950 if test "$gl_cv_double_slash_root" = yes; then
18952 $as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h
18960 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
18968 if test $ac_cv_func_fchdir = no
; then
18972 if test $HAVE_FCHDIR = 0; then
18976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5
18977 $as_echo_n "checking whether dup works... " >&6; }
18978 if ${gl_cv_func_dup_works+:} false
; then :
18979 $as_echo_n "(cached) " >&6
18981 if test "$cross_compiling" = yes; then :
18983 # Guess no on native Windows.
18984 mingw
*) gl_cv_func_dup_works
="guessing no" ;;
18985 *) gl_cv_func_dup_works
="guessing yes" ;;
18989 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
18990 /* end confdefs.h. */
18991 #include <unistd.h>
19001 /* On OS/2 kLIBC, dup does not work on a directory fd. */
19002 int fd = open (".", O_RDONLY);
19003 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0;
19010 if ac_fn_c_try_run
"$LINENO"; then :
19011 gl_cv_func_dup_works
=yes
19013 gl_cv_func_dup_works
=no
19015 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
19016 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
19021 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5
19022 $as_echo "$gl_cv_func_dup_works" >&6; }
19023 case "$gl_cv_func_dup_works" in
19030 if test $REPLACE_DUP = 1; then
19039 gl_LIBOBJS
="$gl_LIBOBJS dup.$ac_objext"
19054 $as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h
19061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5
19062 $as_echo_n "checking whether dup2 works... " >&6; }
19063 if ${gl_cv_func_dup2_works+:} false
; then :
19064 $as_echo_n "(cached) " >&6
19066 if test "$cross_compiling" = yes; then :
19068 mingw
*) # on this platform, dup2 always returns 0 for success
19069 gl_cv_func_dup2_works
="guessing no" ;;
19070 cygwin
*) # on cygwin 1.5.x, dup2(1,1) returns 0
19071 gl_cv_func_dup2_works
="guessing no" ;;
19073 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE,
19075 gl_cv_func_dup2_works
="guessing no" ;;
19076 haiku
*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC.
19077 gl_cv_func_dup2_works
="guessing no" ;;
19078 *-android*) # implemented using dup3(), which fails if oldfd == newfd
19079 gl_cv_func_dup2_works
="guessing no" ;;
19080 os2
*) # on OS/2 kLIBC, dup2() does not work on a directory fd.
19081 gl_cv_func_dup2_works
="guessing no" ;;
19082 *) gl_cv_func_dup2_works
="guessing yes" ;;
19085 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
19086 /* end confdefs.h. */
19090 #include <limits.h>
19091 #include <sys/resource.h>
19092 #include <unistd.h>
19097 #ifndef RLIM_SAVED_CUR
19098 # define RLIM_SAVED_CUR RLIM_INFINITY
19100 #ifndef RLIM_SAVED_MAX
19101 # define RLIM_SAVED_MAX RLIM_INFINITY
19108 int bad_fd = INT_MAX;
19109 struct rlimit rlim;
19110 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
19111 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
19112 && rlim.rlim_cur != RLIM_INFINITY
19113 && rlim.rlim_cur != RLIM_SAVED_MAX
19114 && rlim.rlim_cur != RLIM_SAVED_CUR)
19115 bad_fd = rlim.rlim_cur;
19117 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1)
19120 if (dup2 (1, 1) != 1)
19123 if (fcntl (1, F_GETFD) != FD_CLOEXEC)
19127 if (dup2 (0, 0) != -1)
19129 /* Many gnulib modules require POSIX conformance of EBADF. */
19130 if (dup2 (2, bad_fd) == -1 && errno != EBADF)
19132 /* Flush out some cygwin core dumps. */
19133 if (dup2 (2, -1) != -1 || errno != EBADF)
19137 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */
19139 int fd = open (".", O_RDONLY);
19142 else if (dup2 (fd, fd + 1) == -1)
19152 if ac_fn_c_try_run
"$LINENO"; then :
19153 gl_cv_func_dup2_works
=yes
19155 gl_cv_func_dup2_works
=no
19157 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
19158 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
19163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5
19164 $as_echo "$gl_cv_func_dup2_works" >&6; }
19165 case "$gl_cv_func_dup2_works" in
19169 for ac_func
in setdtablesize
19171 ac_fn_c_check_func
"$LINENO" "setdtablesize" "ac_cv_func_setdtablesize"
19172 if test "x$ac_cv_func_setdtablesize" = xyes
; then :
19173 cat >>confdefs.h
<<_ACEOF
19174 #define HAVE_SETDTABLESIZE 1
19186 if test $ac_cv_func_fchdir = no
; then
19190 if test $HAVE_FCHDIR = 0; then
19195 if test $REPLACE_DUP2 = 1; then
19204 gl_LIBOBJS
="$gl_LIBOBJS dup2.$ac_objext"
19219 $as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h
19235 $as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h
19241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5
19242 $as_echo_n "checking for error_at_line... " >&6; }
19243 if ${ac_cv_lib_error_at_line+:} false
; then :
19244 $as_echo_n "(cached) " >&6
19246 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
19247 /* end confdefs.h. */
19252 error_at_line (0, 0, "", 0, "an error occurred");
19257 if ac_fn_c_try_link
"$LINENO"; then :
19258 ac_cv_lib_error_at_line
=yes
19260 ac_cv_lib_error_at_line
=no
19262 rm -f core conftest.err conftest.
$ac_objext \
19263 conftest
$ac_exeext conftest.
$ac_ext
19265 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5
19266 $as_echo "$ac_cv_lib_error_at_line" >&6; }
19268 if test $ac_cv_lib_error_at_line = no
; then
19277 gl_LIBOBJS
="$gl_LIBOBJS error.$ac_objext"
19291 if test $ac_cv_have_decl_fchdir = no
; then
19296 if test $HAVE_FCHDIR = 0; then
19305 gl_LIBOBJS
="$gl_LIBOBJS fchdir.$ac_objext"
19309 $as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h
19311 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5
19312 $as_echo_n "checking whether open can visit directories... " >&6; }
19313 if ${gl_cv_func_open_directory_works+:} false
; then :
19314 $as_echo_n "(cached) " >&6
19316 if test "$cross_compiling" = yes; then :
19318 # Guess yes on Linux systems.
19319 linux-
* | linux
) gl_cv_func_open_directory_works
="guessing yes" ;;
19320 # Guess yes on glibc systems.
19321 *-gnu* | gnu
*) gl_cv_func_open_directory_works
="guessing yes" ;;
19322 # Guess no on native Windows.
19323 mingw
*) gl_cv_func_open_directory_works
="guessing no" ;;
19324 # If we don't know, obey --enable-cross-guesses.
19325 *) gl_cv_func_open_directory_works
="$gl_cross_guess_normal" ;;
19329 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
19330 /* end confdefs.h. */
19339 return open(".", O_RDONLY) < 0;
19344 if ac_fn_c_try_run
"$LINENO"; then :
19345 gl_cv_func_open_directory_works
=yes
19347 gl_cv_func_open_directory_works
=no
19349 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
19350 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
19354 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5
19355 $as_echo "$gl_cv_func_open_directory_works" >&6; }
19356 case "$gl_cv_func_open_directory_works" in
19360 $as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h
19377 $as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h
19386 if test $ac_cv_func_fcntl = no
; then
19390 if test $ac_cv_func_fcntl = no
; then
19397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5
19398 $as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; }
19399 if ${gl_cv_func_fcntl_f_dupfd_works+:} false
; then :
19400 $as_echo_n "(cached) " >&6
19402 if test "$cross_compiling" = yes; then :
19404 aix
* | cygwin
* | haiku
*)
19405 gl_cv_func_fcntl_f_dupfd_works
="guessing no" ;;
19406 *) gl_cv_func_fcntl_f_dupfd_works
="guessing yes" ;;
19409 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
19410 /* end confdefs.h. */
19413 #include <limits.h>
19414 #include <sys/resource.h>
19415 #include <unistd.h>
19420 #ifndef RLIM_SAVED_CUR
19421 # define RLIM_SAVED_CUR RLIM_INFINITY
19423 #ifndef RLIM_SAVED_MAX
19424 # define RLIM_SAVED_MAX RLIM_INFINITY
19431 int bad_fd = INT_MAX;
19432 struct rlimit rlim;
19433 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0
19434 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX
19435 && rlim.rlim_cur != RLIM_INFINITY
19436 && rlim.rlim_cur != RLIM_SAVED_MAX
19437 && rlim.rlim_cur != RLIM_SAVED_CUR)
19438 bad_fd = rlim.rlim_cur;
19439 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1;
19440 if (errno != EINVAL) result |= 2;
19441 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4;
19442 if (errno != EINVAL) result |= 8;
19443 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */
19446 fd = open (".", O_RDONLY);
19449 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1)
19459 if ac_fn_c_try_run
"$LINENO"; then :
19460 gl_cv_func_fcntl_f_dupfd_works
=yes
19462 gl_cv_func_fcntl_f_dupfd_works
=no
19464 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
19465 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
19469 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5
19470 $as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; }
19471 case $gl_cv_func_fcntl_f_dupfd_works in
19476 if test $ac_cv_func_fcntl = no
; then
19483 $as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h
19487 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5
19488 $as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; }
19489 if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false
; then :
19490 $as_echo_n "(cached) " >&6
19492 if test "$cross_compiling" = yes; then :
19494 # Guess no on NetBSD.
19495 netbsd
*) gl_cv_func_fcntl_f_dupfd_cloexec
="guessing no" ;;
19496 *) gl_cv_func_fcntl_f_dupfd_cloexec
="$gl_cross_guess_normal" ;;
19500 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
19501 /* end confdefs.h. */
19503 #include <unistd.h>
19504 int main (int argc, char *argv[])
19507 /* parent process */
19509 if (fcntl (1, F_DUPFD_CLOEXEC, 10) < 0)
19511 return execl ("./conftest", "./conftest", "child", NULL);
19514 /* child process */
19515 return (fcntl (10, F_GETFL) < 0 ? 0 : 42);
19520 if ac_fn_c_try_run
"$LINENO"; then :
19521 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
19522 /* end confdefs.h. */
19525 /* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace
19526 it to support the semantics on older kernels that failed with EINVAL. */
19538 if ac_fn_c_try_compile
"$LINENO"; then :
19539 gl_cv_func_fcntl_f_dupfd_cloexec
=yes
19541 gl_cv_func_fcntl_f_dupfd_cloexec
="needs runtime check"
19543 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
19546 gl_cv_func_fcntl_f_dupfd_cloexec
=no
19548 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
19549 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
19554 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5
19555 $as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; }
19556 case "$gl_cv_func_fcntl_f_dupfd_cloexec" in
19561 if test $ac_cv_func_fcntl = no
; then
19574 if test $ac_cv_func_fchdir = no
; then
19578 if test $HAVE_FCHDIR = 0; then
19582 if test $ac_cv_func_fcntl = no
; then
19591 if test $HAVE_FCNTL = 0 ||
test $REPLACE_FCNTL = 1; then
19600 gl_LIBOBJS
="$gl_LIBOBJS fcntl.$ac_objext"
19614 $as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h
19629 if test $gl_cv_have_include_next = yes; then
19630 gl_cv_next_fcntl_h
='<'fcntl.h
'>'
19632 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5
19633 $as_echo_n "checking absolute name of <fcntl.h>... " >&6; }
19634 if ${gl_cv_next_fcntl_h+:} false
; then :
19635 $as_echo_n "(cached) " >&6
19640 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
19641 /* end confdefs.h. */
19645 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
19646 *) gl_absname_cpp
="$ac_cpp" ;;
19651 gl_dirsep_regex
='[/\\]'
19654 gl_dirsep_regex
='\/'
19657 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
19658 gl_header_literal_regex
=`echo 'fcntl.h' \
19659 | sed -e "$gl_make_literal_regex_sed"`
19660 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
19661 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
19667 gl_cv_absolute_fcntl_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
19668 sed -n "$gl_absolute_header_sed"`
19670 gl_header
=$gl_cv_absolute_fcntl_h
19671 gl_cv_next_fcntl_h
='"'$gl_header'"'
19675 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5
19676 $as_echo "$gl_cv_next_fcntl_h" >&6; }
19678 NEXT_FCNTL_H
=$gl_cv_next_fcntl_h
19680 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
19681 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
19682 gl_next_as_first_directive
='<'fcntl.h
'>'
19684 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
19685 gl_next_as_first_directive
=$gl_cv_next_fcntl_h
19687 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H
=$gl_next_as_first_directive
19703 cat >>confdefs.h
<<_ACEOF
19704 #define GNULIB_FD_SAFER_FLAG 1
19713 ac_fn_c_check_decl
"$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" "
19714 #include <dirent.h>
19717 if test "x$ac_cv_have_decl_fdopendir" = xyes
; then :
19723 cat >>confdefs.h
<<_ACEOF
19724 #define HAVE_DECL_FDOPENDIR $ac_have_decl
19726 if test $ac_have_decl = 1; then :
19729 HAVE_DECL_FDOPENDIR
=0
19733 if test $ac_cv_func_fdopendir = no
; then
19736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5
19737 $as_echo_n "checking whether fdopendir works... " >&6; }
19738 if ${gl_cv_func_fdopendir_works+:} false
; then :
19739 $as_echo_n "(cached) " >&6
19741 if test "$cross_compiling" = yes; then :
19743 # Guess yes on glibc systems.
19744 *-gnu*) gl_cv_func_fdopendir_works
="guessing yes" ;;
19745 # Guess yes on musl systems.
19746 *-musl*) gl_cv_func_fdopendir_works
="guessing yes" ;;
19747 # If we don't know, obey --enable-cross-guesses.
19748 *) gl_cv_func_fdopendir_works
="$gl_cross_guess_normal" ;;
19752 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
19753 /* end confdefs.h. */
19755 #include <dirent.h>
19757 #include <unistd.h>
19762 #if !HAVE_DECL_FDOPENDIR
19764 # ifdef __cplusplus
19767 DIR *fdopendir (int);
19774 int fd = open ("conftest.c", O_RDONLY);
19775 if (fd < 0) result |= 1;
19776 if (fdopendir (fd)) result |= 2;
19777 if (close (fd)) result |= 4;
19784 if ac_fn_c_try_run
"$LINENO"; then :
19785 gl_cv_func_fdopendir_works
=yes
19787 gl_cv_func_fdopendir_works
=no
19789 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
19790 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
19794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5
19795 $as_echo "$gl_cv_func_fdopendir_works" >&6; }
19796 case "$gl_cv_func_fdopendir_works" in
19799 REPLACE_FDOPENDIR
=1
19804 if test $HAVE_FDOPENDIR = 0 ||
test $REPLACE_FDOPENDIR = 1; then
19813 gl_LIBOBJS
="$gl_LIBOBJS fdopendir.$ac_objext"
19827 $as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h
19833 cat >>confdefs.h
<<_ACEOF
19834 #define GNULIB_FDOPENDIR 1
19841 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ffs" >&5
19842 $as_echo_n "checking for ffs... " >&6; }
19843 if ${gl_cv_func_ffs+:} false
; then :
19844 $as_echo_n "(cached) " >&6
19846 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
19847 /* end confdefs.h. */
19848 #include <strings.h>
19854 int (*func) (int) = ffs;
19862 if ac_fn_c_try_link
"$LINENO"; then :
19867 rm -f core conftest.err conftest.
$ac_objext \
19868 conftest
$ac_exeext conftest.
$ac_ext
19871 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ffs" >&5
19872 $as_echo "$gl_cv_func_ffs" >&6; }
19873 if test $gl_cv_func_ffs = no
; then
19877 if test $HAVE_FFS = 0; then
19886 gl_LIBOBJS
="$gl_LIBOBJS ffs.$ac_objext"
19903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5
19904 $as_echo_n "checking for flexible array member... " >&6; }
19905 if ${ac_cv_c_flexmember+:} false
; then :
19906 $as_echo_n "(cached) " >&6
19908 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
19909 /* end confdefs.h. */
19910 #include <stdlib.h>
19912 #include <stddef.h>
19913 struct m { struct m *next, **list; char name[]; };
19914 struct s { struct s *p; struct m *m; int n; double d[]; };
19918 int m = getchar ();
19919 size_t nbytes = offsetof (struct s, d) + m * sizeof (double);
19920 nbytes += sizeof (struct s) - 1;
19921 nbytes -= nbytes % sizeof (struct s);
19922 struct s *p = malloc (nbytes);
19926 return p->d != (double *) NULL;
19931 if ac_fn_c_try_compile
"$LINENO"; then :
19932 ac_cv_c_flexmember
=yes
19934 ac_cv_c_flexmember
=no
19936 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
19938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5
19939 $as_echo "$ac_cv_c_flexmember" >&6; }
19940 if test $ac_cv_c_flexmember = yes; then
19942 $as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h
19945 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h
19953 REPLACE_FLOAT_LDBL
=0
19955 aix
* | beos
* | openbsd
* | mirbsd
* | irix
*)
19958 freebsd
* | dragonfly
*)
19959 case "$host_cpu" in
19964 # On x86_64 systems, the C compiler may still be generating
19966 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
19967 /* end confdefs.h. */
19968 #if defined __LP64__ || defined __x86_64__ || defined __amd64__
19975 if ac_fn_c_try_compile
"$LINENO"; then :
19980 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
19985 case "$host_cpu" in
19993 aix
* | freebsd
* | dragonfly
* | linux
*)
19994 if test -n "$FLOAT_H"; then
19995 REPLACE_FLOAT_LDBL
=1
20001 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5
20002 $as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; }
20003 if ${gl_cv_func_itold_works+:} false
; then :
20004 $as_echo_n "(cached) " >&6
20007 if test "$cross_compiling" = yes; then :
20010 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
20011 /* end confdefs.h. */
20012 #if defined __LP64__ || defined __arch64__
20019 if ac_fn_c_try_compile
"$LINENO"; then :
20020 gl_cv_func_itold_works
="guessing no"
20022 gl_cv_func_itold_works
="guessing yes"
20024 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
20026 # Guess yes on native Windows.
20027 mingw
*) gl_cv_func_itold_works
="guessing yes" ;;
20028 *) gl_cv_func_itold_works
="guessing yes" ;;
20032 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
20033 /* end confdefs.h. */
20036 volatile long double ld;
20045 if ac_fn_c_try_run
"$LINENO"; then :
20046 gl_cv_func_itold_works
=yes
20048 gl_cv_func_itold_works
=no
20050 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
20051 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
20056 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5
20057 $as_echo "$gl_cv_func_itold_works" >&6; }
20058 case "$gl_cv_func_itold_works" in
20065 if test -n "$FLOAT_H"; then
20074 if test $gl_cv_have_include_next = yes; then
20075 gl_cv_next_float_h
='<'float.h
'>'
20077 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5
20078 $as_echo_n "checking absolute name of <float.h>... " >&6; }
20079 if ${gl_cv_next_float_h+:} false
; then :
20080 $as_echo_n "(cached) " >&6
20085 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
20086 /* end confdefs.h. */
20090 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
20091 *) gl_absname_cpp
="$ac_cpp" ;;
20096 gl_dirsep_regex
='[/\\]'
20099 gl_dirsep_regex
='\/'
20102 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
20103 gl_header_literal_regex
=`echo 'float.h' \
20104 | sed -e "$gl_make_literal_regex_sed"`
20105 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
20106 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
20112 gl_cv_absolute_float_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
20113 sed -n "$gl_absolute_header_sed"`
20115 gl_header
=$gl_cv_absolute_float_h
20116 gl_cv_next_float_h
='"'$gl_header'"'
20120 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5
20121 $as_echo "$gl_cv_next_float_h" >&6; }
20123 NEXT_FLOAT_H
=$gl_cv_next_float_h
20125 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
20126 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
20127 gl_next_as_first_directive
='<'float.h
'>'
20129 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
20130 gl_next_as_first_directive
=$gl_cv_next_float_h
20132 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H
=$gl_next_as_first_directive
20139 if test -n "$FLOAT_H"; then
20140 GL_GENERATE_FLOAT_H_TRUE
=
20141 GL_GENERATE_FLOAT_H_FALSE
='#'
20143 GL_GENERATE_FLOAT_H_TRUE
='#'
20144 GL_GENERATE_FLOAT_H_FALSE
=
20149 if test $REPLACE_FLOAT_LDBL = 1; then
20158 gl_LIBOBJS
="$gl_LIBOBJS float.$ac_objext"
20161 if test $REPLACE_ITOLD = 1; then
20170 gl_LIBOBJS
="$gl_LIBOBJS itold.$ac_objext"
20177 gl_fnmatch_required_lowercase
=`
20178 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]'
20181 if test $ac_cv_func_fnmatch = no
; then
20184 gl_fnmatch_cache_var
="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}"
20185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5
20186 $as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; }
20187 if eval \
${$gl_fnmatch_cache_var+:} false
; then :
20188 $as_echo_n "(cached) " >&6
20190 if test $gl_fnmatch_required = GNU
; then
20191 gl_fnmatch_gnu_start
=
20192 gl_fnmatch_gnu_end
=
20194 gl_fnmatch_gnu_start
='#if 0'
20195 gl_fnmatch_gnu_end
='#endif'
20197 if test "$cross_compiling" = yes; then :
20199 # Guess yes on musl systems.
20200 *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;;
20201 # Guess no otherwise, even on glibc systems.
20202 *) eval "$gl_fnmatch_cache_var=\"guessing no\"" ;;
20206 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
20207 /* end confdefs.h. */
20208 #include <fnmatch.h>
20210 y (char const *pattern, char const *string, int flags)
20212 return fnmatch (pattern, string, flags) == 0;
20215 n (char const *pattern, char const *string, int flags)
20217 return fnmatch (pattern, string, flags) == FNM_NOMATCH;
20223 char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]";
20224 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]";
20225 static char const A_1[] = { 'A' - 1, 0 };
20226 static char const A01[] = { 'A' + 1, 0 };
20227 static char const a_1[] = { 'a' - 1, 0 };
20228 static char const a01[] = { 'a' + 1, 0 };
20229 static char const bs_1[] = { '\\\\' - 1, 0 };
20230 static char const bs01[] = { '\\\\' + 1, 0 };
20232 if (!n ("a*", "", 0))
20234 if (!y ("a*", "abc", 0))
20236 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */
20238 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME))
20240 if (!y ("a\\\\bc", "abc", 0))
20242 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE))
20244 if (!y ("*x", ".x", 0))
20246 if (!n ("*x", ".x", FNM_PERIOD))
20248 if (!y (Apat, "\\\\", 0))
20250 if (!y (Apat, "A", 0))
20252 if (!y (apat, "\\\\", 0))
20254 if (!y (apat, "a", 0))
20256 if (!(n (Apat, A_1, 0) == ('A' < '\\\\')))
20258 if (!(n (apat, a_1, 0) == ('a' < '\\\\')))
20260 if (!(y (Apat, A01, 0) == ('A' < '\\\\')))
20262 if (!(y (apat, a01, 0) == ('a' < '\\\\')))
20264 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\')))
20266 if (!(y (apat, bs_1, 0) == ('a' < '\\\\')))
20268 if (!(n (Apat, bs01, 0) == ('A' < '\\\\')))
20270 if (!(n (apat, bs01, 0) == ('a' < '\\\\')))
20272 $gl_fnmatch_gnu_start
20273 if (!y ("xxXX", "xXxX", FNM_CASEFOLD))
20275 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH))
20277 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME))
20279 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR))
20281 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR))
20283 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR))
20285 $gl_fnmatch_gnu_end
20292 if ac_fn_c_try_run
"$LINENO"; then :
20293 eval "$gl_fnmatch_cache_var=yes"
20295 eval "$gl_fnmatch_cache_var=no"
20297 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
20298 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
20303 eval ac_res
=\$
$gl_fnmatch_cache_var
20304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
20305 $as_echo "$ac_res" >&6; }
20306 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\""
20307 case "$gl_fnmatch_result" in
20309 *) REPLACE_FNMATCH
=1 ;;
20312 if test $HAVE_FNMATCH = 0 ||
test $REPLACE_FNMATCH = 1; then
20315 FNMATCH_H
='fnmatch.h'
20316 if test -n "$FNMATCH_H"; then
20317 GL_GENERATE_FNMATCH_H_TRUE
=
20318 GL_GENERATE_FNMATCH_H_FALSE
='#'
20320 GL_GENERATE_FNMATCH_H_TRUE
='#'
20321 GL_GENERATE_FNMATCH_H_FALSE
=
20327 if test $HAVE_FNMATCH = 0 ||
test $REPLACE_FNMATCH = 1; then
20336 gl_LIBOBJS
="$gl_LIBOBJS fnmatch.$ac_objext"
20354 $as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h
20363 if test $HAVE_FNMATCH = 0 ||
test $REPLACE_FNMATCH = 1; then
20372 gl_LIBOBJS
="$gl_LIBOBJS fnmatch.$ac_objext"
20381 cat >>confdefs.h
<<_ACEOF
20382 #define GNULIB_FNMATCH_GNU 1
20390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether free is known to preserve errno" >&5
20391 $as_echo_n "checking whether free is known to preserve errno... " >&6; }
20392 if ${gl_cv_func_free_preserves_errno+:} false
; then :
20393 $as_echo_n "(cached) " >&6
20395 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
20396 /* end confdefs.h. */
20397 #include <stdlib.h>
20402 #if 2 < __GLIBC__ + (33 <= __GLIBC_MINOR__)
20403 #elif defined __OpenBSD__
20404 #elif defined __sun
20406 #error "'free' is not known to preserve errno"
20413 if ac_fn_c_try_compile
"$LINENO"; then :
20414 gl_cv_func_free_preserves_errno
=yes
20416 gl_cv_func_free_preserves_errno
=no
20418 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
20421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_free_preserves_errno" >&5
20422 $as_echo "$gl_cv_func_free_preserves_errno" >&6; }
20424 case $gl_cv_func_free_preserves_errno in
20426 *) REPLACE_FREE
=1 ;;
20429 if test $REPLACE_FREE = 1; then
20438 gl_LIBOBJS
="$gl_LIBOBJS free.$ac_objext"
20447 GNULIB_FREE_POSIX
=1
20453 $as_echo "#define GNULIB_TEST_FREE_POSIX 1" >>confdefs.h
20458 if test $gl_func_frexp != yes; then
20467 gl_LIBOBJS
="$gl_LIBOBJS frexp.$ac_objext"
20481 $as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h
20486 if test $HAVE_DECL_FREXPL = 0 ||
test $gl_func_frexpl = no
; then
20495 gl_LIBOBJS
="$gl_LIBOBJS frexpl.$ac_objext"
20509 $as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h
20527 if test $ac_cv_func_fchdir = no
; then
20531 if test $HAVE_FCHDIR = 0; then
20532 case "$gl_cv_func_open_directory_works" in
20541 if test $REPLACE_FSTAT = 1; then
20550 gl_LIBOBJS
="$gl_LIBOBJS fstat.$ac_objext"
20562 gl_LIBOBJS
="$gl_LIBOBJS stat-w32.$ac_objext"
20583 $as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h
20594 if test $ac_cv_func_fstatat = no
; then
20597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5
20598 $as_echo_n "checking whether fstatat (..., 0) works... " >&6; }
20599 if ${gl_cv_func_fstatat_zero_flag+:} false
; then :
20600 $as_echo_n "(cached) " >&6
20602 if test "$cross_compiling" = yes; then :
20604 aix
*) gl_cv_func_fstatat_zero_flag
="guessing no";;
20605 *) gl_cv_func_fstatat_zero_flag
="guessing yes";;
20609 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
20610 /* end confdefs.h. */
20613 #include <sys/stat.h>
20618 return fstatat (AT_FDCWD, ".", &a, 0) != 0;
20622 if ac_fn_c_try_run
"$LINENO"; then :
20623 gl_cv_func_fstatat_zero_flag
=yes
20625 gl_cv_func_fstatat_zero_flag
=no
20627 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
20628 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
20633 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5
20634 $as_echo "$gl_cv_func_fstatat_zero_flag" >&6; }
20636 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in
20638 *) REPLACE_FSTATAT
=1 ;;
20643 REPLACE_FSTATAT
=1 ;;
20646 case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in
20649 $as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h
20655 if test $HAVE_FSTATAT = 0 ||
test $REPLACE_FSTATAT = 1; then
20664 gl_LIBOBJS
="$gl_LIBOBJS fstatat.$ac_objext"
20678 $as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h
20690 gl_cv_func_getcwd_path_max
=yes
20698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5
20699 $as_echo_n "checking whether getcwd handles long file names properly... " >&6; }
20700 if ${gl_cv_func_getcwd_path_max+:} false
; then :
20701 $as_echo_n "(cached) " >&6
20703 # Arrange for deletion of the temporary directory this test creates.
20704 ac_clean_files
="$ac_clean_files confdir3"
20705 if test "$cross_compiling" = yes; then :
20706 # Cross-compilation guesses:
20708 aix
*) # On AIX, it has the AIX bug.
20709 gl_cv_func_getcwd_path_max
='guessing no, it has the AIX bug' ;;
20710 gnu
*) # On Hurd, it is 'yes'.
20711 gl_cv_func_getcwd_path_max
='guessing yes' ;;
20712 linux
* | kfreebsd
*)
20713 # On older Linux+glibc it's 'no, but it is partly working',
20714 # on newer Linux+glibc it's 'yes'.
20715 # On Linux+musl libc, it's 'no, but it is partly working'.
20716 # On kFreeBSD+glibc, it's 'no, but it is partly working'.
20717 gl_cv_func_getcwd_path_max
='guessing no, but it is partly working' ;;
20718 *) # If we don't know, obey --enable-cross-guesses.
20719 gl_cv_func_getcwd_path_max
="$gl_cross_guess_normal" ;;
20723 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
20724 /* end confdefs.h. */
20727 #include <stdlib.h>
20729 # include <unistd.h>
20731 # include <direct.h>
20733 #include <string.h>
20734 #include <limits.h>
20735 #include <sys/stat.h>
20736 #include <sys/types.h>
20740 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
20742 # include <unistd.h>
20744 #include <limits.h>
20745 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
20746 # include <sys/param.h>
20748 #if !defined PATH_MAX && defined MAXPATHLEN
20749 # define PATH_MAX MAXPATHLEN
20753 # define PATH_MAX 1024
20755 #if defined _WIN32 && ! defined __CYGWIN__
20757 # define PATH_MAX 260
20762 # define AT_FDCWD 0
20764 #ifdef ENAMETOOLONG
20765 # define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG)
20767 # define is_ENAMETOOLONG(x) 0
20770 /* Use the getcwd function, not any macro. */
20779 # define S_IRWXU 0700
20782 /* The length of this name must be 8. */
20783 #define DIR_NAME "confdir3"
20784 #define DIR_NAME_LEN 8
20785 #define DIR_NAME_SIZE (DIR_NAME_LEN + 1)
20787 /* The length of "../". */
20788 #define DOTDOTSLASH_LEN 3
20790 /* Leftover bytes in the buffer, to work around library or OS bugs. */
20791 #define BUF_SLOP 20
20797 /* The Hurd doesn't define this, so getcwd can't exhibit the bug --
20798 at least not on a local file system. And if we were to start worrying
20799 about remote file systems, we'd have to enable the wrapper function
20800 all of the time, just to be safe. That's not worth the cost. */
20802 #elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \
20803 - DIR_NAME_SIZE - BUF_SLOP) \
20805 /* FIXME: Assuming there's a system for which this is true,
20806 this should be done in a compile test. */
20809 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1)
20810 + DIR_NAME_SIZE + BUF_SLOP];
20811 char *cwd = getcwd (buf, PATH_MAX);
20812 size_t initial_cwd_len;
20815 size_t n_chdirs = 0;
20820 cwd_len = initial_cwd_len = strlen (cwd);
20824 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN);
20827 cwd_len += DIR_NAME_SIZE;
20828 /* If mkdir or chdir fails, it could be that this system cannot create
20829 any file with an absolute name longer than PATH_MAX, such as cygwin.
20830 If so, leave fail as 0, because the current working directory can't
20831 be too long for getcwd if it can't even be created. On Linux with
20832 the 9p file system, mkdir fails with error EINVAL when cwd_len gets
20833 too long; ignore this failure because the getcwd() system call
20834 produces good results whereas the gnulib substitute calls getdents64
20835 which fails with error EPROTO.
20836 For other errors, be pessimistic and consider that as a failure,
20838 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0)
20840 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
20842 if (! (errno == EINVAL))
20848 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE)
20852 c = getcwd (buf, PATH_MAX);
20853 if (!c && errno == ENOENT)
20863 if (! (errno == ERANGE || is_ENAMETOOLONG (errno)))
20869 /* Our replacement needs to be able to stat() long ../../paths,
20870 so generate a path larger than PATH_MAX to check,
20871 avoiding the replacement if we can't stat(). */
20872 c = getcwd (buf, cwd_len + 1);
20873 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno))
20880 if (dotdot_max <= cwd_len - initial_cwd_len)
20882 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len)
20884 c = getcwd (buf, cwd_len + 1);
20887 if (! (errno == ERANGE || errno == ENOENT
20888 || is_ENAMETOOLONG (errno)))
20893 if (AT_FDCWD || errno == ERANGE || errno == ENOENT)
20901 if (c && strlen (c) != cwd_len)
20909 /* Leaving behind such a deep directory is not polite.
20910 So clean up here, right away, even though the driving
20911 shell script would also clean up. */
20915 /* Try rmdir first, in case the chdir failed. */
20917 for (i = 0; i <= n_chdirs; i++)
20919 if (chdir ("..") < 0)
20921 if (rmdir (DIR_NAME) != 0)
20931 if ac_fn_c_try_run
"$LINENO"; then :
20932 gl_cv_func_getcwd_path_max
=yes
20935 10|
11|
12) gl_cv_func_getcwd_path_max
='no, but it is partly working';;
20936 31) gl_cv_func_getcwd_path_max
='no, it has the AIX bug';;
20937 32) gl_cv_func_getcwd_path_max
='yes, but with shorter paths';;
20938 *) gl_cv_func_getcwd_path_max
=no
;;
20941 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
20942 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
20947 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5
20948 $as_echo "$gl_cv_func_getcwd_path_max" >&6; }
20950 case "$gl_cv_func_getcwd_null" in
20958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5
20959 $as_echo_n "checking for getpagesize... " >&6; }
20960 if ${gl_cv_func_getpagesize+:} false
; then :
20961 $as_echo_n "(cached) " >&6
20963 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
20964 /* end confdefs.h. */
20965 #include <unistd.h>
20969 return getpagesize();
20975 if ac_fn_c_try_link
"$LINENO"; then :
20976 gl_cv_func_getpagesize
=yes
20978 gl_cv_func_getpagesize
=no
20980 rm -f core conftest.err conftest.
$ac_objext \
20981 conftest
$ac_exeext conftest.
$ac_ext
20984 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5
20985 $as_echo "$gl_cv_func_getpagesize" >&6; }
20987 if test $gl_cv_func_getpagesize = yes; then
20989 cat >>confdefs.h
<<_ACEOF
20990 #define HAVE_GETPAGESIZE 1
20995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd succeeds when 4k < cwd_length < 16k" >&5
20996 $as_echo_n "checking whether getcwd succeeds when 4k < cwd_length < 16k... " >&6; }
20997 if ${gl_cv_func_getcwd_succeeds_beyond_4k+:} false
; then :
20998 $as_echo_n "(cached) " >&6
21000 # Remove any remnants of a previous test.
21001 rm -rf confdir-14B---
21002 # Arrange for deletion of the temporary directory this test creates.
21003 ac_clean_files
="$ac_clean_files confdir-14B---"
21004 if test "$cross_compiling" = yes; then :
21006 # Guess yes on musl systems.
21007 *-musl*) gl_cv_func_getcwd_succeeds_beyond_4k
="guessing yes" ;;
21008 # Guess no otherwise, even on glibc systems.
21009 *) gl_cv_func_getcwd_succeeds_beyond_4k
="guessing no"
21013 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
21014 /* end confdefs.h. */
21017 #include <stdlib.h>
21019 # include <unistd.h>
21020 #else /* on Windows with MSVC */
21021 # include <direct.h>
21023 #include <string.h>
21024 #include <sys/stat.h>
21027 /* Arrange to define PATH_MAX, like "pathmax.h" does. */
21029 # include <unistd.h>
21031 #include <limits.h>
21032 #if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
21033 # include <sys/param.h>
21035 #if !defined PATH_MAX && defined MAXPATHLEN
21036 # define PATH_MAX MAXPATHLEN
21040 # define PATH_MAX 1024
21042 #if defined _WIN32 && ! defined __CYGWIN__
21044 # define PATH_MAX 260
21053 # define S_IRWXU 0700
21056 /* FIXME: skip the run-test altogether on systems without getpagesize. */
21057 #if ! HAVE_GETPAGESIZE
21058 # define getpagesize() 0
21061 /* This size is chosen to be larger than PATH_MAX (4k), yet smaller than
21062 the 16kB pagesize on ia64 linux. Those conditions make the code below
21063 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */
21064 #define TARGET_LEN (5 * 1024)
21070 size_t initial_cwd_len;
21073 /* The bug is triggered when PATH_MAX < getpagesize (), so skip
21074 this relatively expensive and invasive test if that's not true. */
21076 int bug_possible = PATH_MAX < getpagesize ();
21078 int bug_possible = 0;
21080 if (! bug_possible)
21083 cwd = getcwd (NULL, 0);
21087 initial_cwd_len = strlen (cwd);
21092 static char const dir_name[] = "confdir-14B---";
21093 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len)
21094 / sizeof dir_name);
21096 for (d = 0; d < desired_depth; d++)
21098 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0)
21100 if (! (errno == ERANGE || errno == ENAMETOOLONG
21101 || errno == ENOENT))
21102 fail = 3; /* Unable to construct deep hierarchy. */
21107 /* If libc has the bug in question, this invocation of getcwd
21108 results in a failed assertion. */
21109 cwd = getcwd (NULL, 0);
21111 fail = 4; /* getcwd didn't assert, but it failed for a long name
21112 where the answer could have been learned. */
21115 /* Call rmdir first, in case the above chdir failed. */
21119 if (chdir ("..") < 0)
21132 if ac_fn_c_try_run
"$LINENO"; then :
21133 gl_cv_func_getcwd_succeeds_beyond_4k
=yes
21136 if test $ret -ge 128 ||
test $ret = 4; then
21137 gl_cv_func_getcwd_succeeds_beyond_4k
=no
21139 gl_cv_func_getcwd_succeeds_beyond_4k
=yes
21143 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
21144 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
21149 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_succeeds_beyond_4k" >&5
21150 $as_echo "$gl_cv_func_getcwd_succeeds_beyond_4k" >&6; }
21151 case "$gl_cv_func_getcwd_succeeds_beyond_4k" in
21164 case "$gl_cv_func_getcwd_path_max" in
21165 *"no" |
*"no, it has the AIX bug") ;;
21168 $as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h
21172 case "$gl_cv_func_getcwd_path_max" in
21173 *"no, but it is partly working")
21175 $as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h
21178 *"yes, but with shorter paths")
21180 $as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h
21185 if { case "$gl_cv_func_getcwd_null" in *yes) false
;; *) true
;; esac; } \
21186 ||
test $gl_cv_func_getcwd_posix_signature != yes \
21187 ||
{ case "$gl_cv_func_getcwd_path_max" in *yes*) false
;; *) true
;; esac; } \
21188 ||
test $gl_abort_bug = yes; then
21192 if test $REPLACE_GETCWD = 1; then
21201 gl_LIBOBJS
="$gl_LIBOBJS getcwd.$ac_objext"
21211 cat >>confdefs.h
<<_ACEOF
21212 #define GNULIB_GETCWD 1
21227 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
21236 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in
21243 if test $REPLACE_GETCWD = 1; then
21252 gl_LIBOBJS
="$gl_LIBOBJS getcwd-lgpl.$ac_objext"
21266 $as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h
21278 if test $ac_cv_func_getdelim = yes; then
21280 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5
21281 $as_echo_n "checking for working getdelim function... " >&6; }
21282 if ${gl_cv_func_working_getdelim+:} false
; then :
21283 $as_echo_n "(cached) " >&6
21285 echo fooNbarN |
tr -d '\012' |
tr N
'\012' > conftest.data
21286 if test "$cross_compiling" = yes; then :
21287 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
21288 /* end confdefs.h. */
21290 #include <features.h>
21291 #ifdef __GNU_LIBRARY__
21292 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
21298 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21299 $EGREP "Lucky GNU user" >/dev
/null
2>&1; then :
21300 gl_cv_func_working_getdelim
="guessing yes"
21303 *-musl*) gl_cv_func_working_getdelim
="guessing yes" ;;
21304 *) gl_cv_func_working_getdelim
="$gl_cross_guess_normal" ;;
21312 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
21313 /* end confdefs.h. */
21315 # include <stdio.h>
21316 # include <stdlib.h>
21317 # include <string.h>
21320 FILE *in = fopen ("./conftest.data", "r");
21324 /* Test result for a NULL buffer and a zero size.
21325 Based on a test program from Karl Heuer. */
21328 int len = getdelim (&line, &siz, '\n', in);
21329 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
21330 { free (line); fclose (in); return 2; }
21334 /* Test result for a NULL buffer and a non-zero size.
21335 This crashes on FreeBSD 8.0. */
21337 size_t siz = (size_t)(~0) / 4;
21338 if (getdelim (&line, &siz, '\n', in) == -1)
21339 { fclose (in); return 3; }
21347 if ac_fn_c_try_run
"$LINENO"; then :
21348 gl_cv_func_working_getdelim
=yes
21350 gl_cv_func_working_getdelim
=no
21352 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
21353 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
21358 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5
21359 $as_echo "$gl_cv_func_working_getdelim" >&6; }
21360 case "$gl_cv_func_working_getdelim" in
21362 *) REPLACE_GETDELIM
=1 ;;
21368 if test $ac_cv_have_decl_getdelim = no
; then
21369 HAVE_DECL_GETDELIM
=0
21372 if test $HAVE_GETDELIM = 0 ||
test $REPLACE_GETDELIM = 1; then
21381 gl_LIBOBJS
="$gl_LIBOBJS getdelim.$ac_objext"
21384 for ac_func
in flockfile funlockfile
21386 as_ac_var
=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
21387 ac_fn_c_check_func
"$LINENO" "$ac_func" "$as_ac_var"
21388 if eval test \"x\$
"$as_ac_var"\" = x
"yes"; then :
21389 cat >>confdefs.h
<<_ACEOF
21390 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
21396 ac_fn_c_check_decl
"$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default"
21397 if test "x$ac_cv_have_decl_getc_unlocked" = xyes
; then :
21403 cat >>confdefs.h
<<_ACEOF
21404 #define HAVE_DECL_GETC_UNLOCKED $ac_have_decl
21420 $as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h
21429 if test $ac_cv_func_getdtablesize = yes &&
21430 test $ac_cv_have_decl_getdtablesize = yes; then
21431 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5
21432 $as_echo_n "checking whether getdtablesize works... " >&6; }
21433 if ${gl_cv_func_getdtablesize_works+:} false
; then :
21434 $as_echo_n "(cached) " >&6
21437 vms
*) gl_cv_func_getdtablesize_works
="no (limitation)" ;;
21439 if test "$cross_compiling" = yes; then :
21441 cygwin
*) # on cygwin 1.5.25, getdtablesize() automatically grows
21442 gl_cv_func_getdtablesize_works
="guessing no" ;;
21443 *) gl_cv_func_getdtablesize_works
="guessing yes" ;;
21447 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
21448 /* end confdefs.h. */
21450 #include <unistd.h>
21459 int size = getdtablesize();
21460 if (dup2 (0, getdtablesize()) != -1)
21462 if (size != getdtablesize())
21469 if ac_fn_c_try_run
"$LINENO"; then :
21470 gl_cv_func_getdtablesize_works
=yes
21472 gl_cv_func_getdtablesize_works
=no
21474 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
21475 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
21482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5
21483 $as_echo "$gl_cv_func_getdtablesize_works" >&6; }
21484 case "$gl_cv_func_getdtablesize_works" in
21485 *yes |
"no (limitation)") ;;
21486 *) REPLACE_GETDTABLESIZE
=1 ;;
21489 HAVE_GETDTABLESIZE
=0
21492 if test $HAVE_GETDTABLESIZE = 0 ||
test $REPLACE_GETDTABLESIZE = 1; then
21501 gl_LIBOBJS
="$gl_LIBOBJS getdtablesize.$ac_objext"
21510 GNULIB_GETDTABLESIZE
=1
21516 $as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h
21527 gl_getline_needs_run_time_check
=no
21528 ac_fn_c_check_func
"$LINENO" "getline" "ac_cv_func_getline"
21529 if test "x$ac_cv_func_getline" = xyes
; then :
21530 gl_getline_needs_run_time_check
=yes
21532 am_cv_func_working_getline
=no
21535 if test $gl_getline_needs_run_time_check = yes; then
21536 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5
21537 $as_echo_n "checking for working getline function... " >&6; }
21538 if ${am_cv_func_working_getline+:} false
; then :
21539 $as_echo_n "(cached) " >&6
21541 echo fooNbarN |
tr -d '\012' |
tr N
'\012' > conftest.data
21542 if test "$cross_compiling" = yes; then :
21543 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
21544 /* end confdefs.h. */
21546 #include <features.h>
21547 #ifdef __GNU_LIBRARY__
21548 #if (__GLIBC__ >= 2) && !defined __UCLIBC__
21554 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21555 $EGREP "Lucky GNU user" >/dev
/null
2>&1; then :
21556 am_cv_func_working_getline
="guessing yes"
21559 *-musl*) am_cv_func_working_getline
="guessing yes" ;;
21560 *) am_cv_func_working_getline
="$gl_cross_guess_normal" ;;
21568 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
21569 /* end confdefs.h. */
21571 # include <stdio.h>
21572 # include <stdlib.h>
21573 # include <string.h>
21576 FILE *in = fopen ("./conftest.data", "r");
21580 /* Test result for a NULL buffer and a zero size.
21581 Based on a test program from Karl Heuer. */
21584 int len = getline (&line, &siz, in);
21585 if (!(len == 4 && line && strcmp (line, "foo\n") == 0))
21586 { free (line); fclose (in); return 2; }
21590 /* Test result for a NULL buffer and a non-zero size.
21591 This crashes on FreeBSD 8.0. */
21593 size_t siz = (size_t)(~0) / 4;
21594 if (getline (&line, &siz, in) == -1)
21595 { fclose (in); return 3; }
21603 if ac_fn_c_try_run
"$LINENO"; then :
21604 am_cv_func_working_getline
=yes
21606 am_cv_func_working_getline
=no
21608 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
21609 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
21614 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5
21615 $as_echo "$am_cv_func_working_getline" >&6; }
21618 if test $ac_cv_have_decl_getline = no
; then
21619 HAVE_DECL_GETLINE
=0
21622 case "$am_cv_func_working_getline" in
21629 if test $REPLACE_GETLINE = 1; then
21638 gl_LIBOBJS
="$gl_LIBOBJS getline.$ac_objext"
21655 $as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h
21665 if test $ac_cv_have_decl_getlogin_r = no
; then
21666 HAVE_DECL_GETLOGIN_R
=0
21670 if test $ac_cv_func_getlogin_r = no
; then
21675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5
21676 $as_echo_n "checking whether getlogin_r works with small buffers... " >&6; }
21677 if ${gl_cv_func_getlogin_r_works+:} false
; then :
21678 $as_echo_n "(cached) " >&6
21682 # Guess no on Mac OS X, OSF/1.
21683 darwin
* | osf
*) gl_cv_func_getlogin_r_works
="guessing no" ;;
21684 # Guess yes otherwise.
21685 *) gl_cv_func_getlogin_r_works
="guessing yes" ;;
21687 if test "$cross_compiling" = yes; then :
21690 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
21691 /* end confdefs.h. */
21693 #include <stddef.h>
21694 #include <string.h>
21695 #include <unistd.h>
21696 #if !HAVE_DECL_GETLOGIN_R
21698 # ifdef __cplusplus
21701 int getlogin_r (char *, size_t);
21709 if (getlogin_r (buf, 0) == 0)
21711 if (getlogin_r (buf, 1) == 0)
21713 if (getlogin_r (buf, 100) == 0)
21715 size_t n = strlen (buf);
21716 if (getlogin_r (buf, n) == 0)
21722 if ac_fn_c_try_run
"$LINENO"; then :
21723 gl_cv_func_getlogin_r_works
=yes
21725 gl_cv_func_getlogin_r_works
=no
21727 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
21728 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
21733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5
21734 $as_echo "$gl_cv_func_getlogin_r_works" >&6; }
21735 case "$gl_cv_func_getlogin_r_works" in
21737 *) REPLACE_GETLOGIN_R
=1 ;;
21741 if test $HAVE_GETLOGIN_R = 0 ||
test $REPLACE_GETLOGIN_R = 1; then
21750 gl_LIBOBJS
="$gl_LIBOBJS getlogin_r.$ac_objext"
21761 GNULIB_GETLOGIN_R
=1
21767 $as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h
21776 ac_fn_c_check_decl
"$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h>
21778 if test "x$ac_cv_have_decl_program_invocation_name" = xyes
; then :
21784 cat >>confdefs.h
<<_ACEOF
21785 #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl
21787 if test $ac_have_decl = 1; then :
21791 ac_fn_c_check_decl
"$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h>
21793 if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes
; then :
21799 cat >>confdefs.h
<<_ACEOF
21800 #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl
21802 if test $ac_have_decl = 1; then :
21806 ac_fn_c_check_decl
"$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h>
21808 if test "x$ac_cv_have_decl___argv" = xyes
; then :
21814 cat >>confdefs.h
<<_ACEOF
21815 #define HAVE_DECL___ARGV $ac_have_decl
21817 if test $ac_have_decl = 1; then :
21822 # Incur the cost of this test only if none of the above worked.
21823 if test $ac_found = 0; then
21824 # On OpenBSD 5.1, using the global __progname variable appears to be
21825 # the only way to implement getprogname.
21826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5
21827 $as_echo_n "checking whether __progname is defined in default libraries... " >&6; }
21828 if ${gl_cv_var___progname+:} false
; then :
21829 $as_echo_n "(cached) " >&6
21832 gl_cv_var___progname
=
21833 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
21834 /* end confdefs.h. */
21835 extern char *__progname;
21839 return *__progname;
21845 if ac_fn_c_try_link
"$LINENO"; then :
21846 gl_cv_var___progname
=yes
21849 rm -f core conftest.err conftest.
$ac_objext \
21850 conftest
$ac_exeext conftest.
$ac_ext
21854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5
21855 $as_echo "$gl_cv_var___progname" >&6; }
21856 if test "$gl_cv_var___progname" = yes; then
21858 $as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h
21867 if test "$ac_cv_func_getrandom" != yes; then
21870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5
21871 $as_echo_n "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; }
21872 if ${gl_cv_func_getrandom_ok+:} false
; then :
21873 $as_echo_n "(cached) " >&6
21875 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
21876 /* end confdefs.h. */
21877 /* Additional includes are needed before <sys/random.h> on uClibc
21879 #include <sys/types.h>
21880 #include <stdlib.h>
21881 #include <sys/random.h>
21882 ssize_t getrandom (void *, size_t, unsigned int);
21893 if ac_fn_c_try_compile
"$LINENO"; then :
21894 gl_cv_func_getrandom_ok
=yes
21896 gl_cv_func_getrandom_ok
=no
21898 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
21901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5
21902 $as_echo "$gl_cv_func_getrandom_ok" >&6; }
21903 if test $gl_cv_func_getrandom_ok = no
; then
21904 REPLACE_GETRANDOM
=1
21910 for ac_header
in bcrypt.h
21912 ac_fn_c_check_header_compile
"$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "#include <windows.h>
21915 if test "x$ac_cv_header_bcrypt_h" = xyes
; then :
21916 cat >>confdefs.h
<<_ACEOF
21917 #define HAVE_BCRYPT_H 1
21924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5
21925 $as_echo_n "checking whether the bcrypt library is guaranteed to be present... " >&6; }
21926 if ${gl_cv_lib_assume_bcrypt+:} false
; then :
21927 $as_echo_n "(cached) " >&6
21929 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
21930 /* end confdefs.h. */
21931 #include <windows.h>
21935 #if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7)
21944 if ac_fn_c_try_compile
"$LINENO"; then :
21945 gl_cv_lib_assume_bcrypt
=yes
21947 gl_cv_lib_assume_bcrypt
=no
21949 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
21952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5
21953 $as_echo "$gl_cv_lib_assume_bcrypt" >&6; }
21954 if test $gl_cv_lib_assume_bcrypt = yes; then
21956 $as_echo "#define HAVE_LIB_BCRYPT 1" >>confdefs.h
21958 LIB_GETRANDOM
='-lbcrypt'
21960 LIB_GETRANDOM
='-ladvapi32'
21968 if test $HAVE_GETRANDOM = 0 ||
test $REPLACE_GETRANDOM = 1; then
21977 gl_LIBOBJS
="$gl_LIBOBJS getrandom.$ac_objext"
21991 $as_echo "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h
22004 gl_gettimeofday_timezone
=void
22005 if test $ac_cv_func_gettimeofday != yes; then
22006 HAVE_GETTIMEOFDAY
=0
22008 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5
22009 $as_echo_n "checking for gettimeofday with POSIX signature... " >&6; }
22010 if ${gl_cv_func_gettimeofday_posix_signature+:} false
; then :
22011 $as_echo_n "(cached) " >&6
22013 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
22014 /* end confdefs.h. */
22015 #include <sys/time.h>
22017 int gettimeofday (struct timeval *restrict, void *restrict);
22022 /* glibc uses struct timezone * rather than the POSIX void *
22023 if _GNU_SOURCE is defined. However, since the only portable
22024 use of gettimeofday uses NULL as the second parameter, and
22025 since the glibc definition is actually more typesafe, it is
22026 not worth wrapping this to get a compliant signature. */
22027 int (*f) (struct timeval *restrict, void *restrict)
22030 return !(x | c.tv_sec | c.tv_usec);
22036 if ac_fn_c_try_compile
"$LINENO"; then :
22037 gl_cv_func_gettimeofday_posix_signature
=yes
22039 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
22040 /* end confdefs.h. */
22041 #include <sys/time.h>
22042 int gettimeofday (struct timeval *restrict, struct timezone *restrict);
22052 if ac_fn_c_try_compile
"$LINENO"; then :
22053 gl_cv_func_gettimeofday_posix_signature
=almost
22055 gl_cv_func_gettimeofday_posix_signature
=no
22057 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
22059 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
22061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5
22062 $as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; }
22063 if test $gl_cv_func_gettimeofday_posix_signature = almost
; then
22064 gl_gettimeofday_timezone
='struct timezone'
22065 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then
22066 REPLACE_GETTIMEOFDAY
=1
22068 if test $REPLACE_STRUCT_TIMEVAL = 1; then
22069 REPLACE_GETTIMEOFDAY
=1
22072 mingw
*) REPLACE_GETTIMEOFDAY
=1 ;;
22076 cat >>confdefs.h
<<_ACEOF
22077 #define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone
22081 if test $HAVE_GETTIMEOFDAY = 0 ||
test $REPLACE_GETTIMEOFDAY = 1; then
22090 gl_LIBOBJS
="$gl_LIBOBJS gettimeofday.$ac_objext"
22099 GNULIB_GETTIMEOFDAY
=1
22105 $as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h
22113 if test $ac_cv_func_glob = no
; then
22117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1 or 2" >&5
22118 $as_echo_n "checking for GNU glob interface version 1 or 2... " >&6; }
22119 if ${gl_cv_gnu_glob_interface_version_1_2+:} false
; then :
22120 $as_echo_n "(cached) " >&6
22122 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
22123 /* end confdefs.h. */
22124 #include <gnu-versions.h>
22125 char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 : -1];
22127 if ac_fn_c_try_compile
"$LINENO"; then :
22128 gl_cv_gnu_glob_interface_version_1_2
=yes
22130 gl_cv_gnu_glob_interface_version_1_2
=no
22132 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
22134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1_2" >&5
22135 $as_echo "$gl_cv_gnu_glob_interface_version_1_2" >&6; }
22136 if test "$gl_cv_gnu_glob_interface_version_1_2" = "no"; then
22140 if test $REPLACE_GLOB = 0; then
22141 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5
22142 $as_echo_n "checking whether glob lists broken symlinks... " >&6; }
22143 if ${gl_cv_glob_lists_symlinks+:} false
; then :
22144 $as_echo_n "(cached) " >&6
22146 if test $cross_compiling != yes; then
22147 if ln -s conf-doesntexist conf$$
-globtest 2>/dev
/null
; then
22148 gl_cv_glob_lists_symlinks
=maybe
22150 # If we can't make a symlink, then we cannot test this issue. Be
22151 # pessimistic about this.
22152 gl_cv_glob_lists_symlinks
=no
22154 if test $gl_cv_glob_lists_symlinks = maybe
; then
22155 if test "$cross_compiling" = yes; then :
22159 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
22160 /* end confdefs.h. */
22161 #include <stddef.h>
22167 if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH)
22175 if ac_fn_c_try_run
"$LINENO"; then :
22176 gl_cv_glob_lists_symlinks
=yes
22178 gl_cv_glob_lists_symlinks
=no
22180 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
22181 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
22185 rm -f conf$$
-globtest
22187 gl_cv_glob_lists_symlinks
="$gl_cross_guess_normal"
22191 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5
22192 $as_echo "$gl_cv_glob_lists_symlinks" >&6; }
22193 case "$gl_cv_glob_lists_symlinks" in
22195 *) REPLACE_GLOB
=1 ;;
22201 if test $ac_cv_func_glob_pattern_p = no
; then
22202 HAVE_GLOB_PATTERN_P
=0
22204 if test $REPLACE_GLOB = 1; then
22205 REPLACE_GLOB_PATTERN_P
=1
22209 if test $HAVE_GLOB = 0 ||
test $REPLACE_GLOB = 1; then
22213 if test -n "$GLOB_H"; then
22214 GL_GENERATE_GLOB_H_TRUE
=
22215 GL_GENERATE_GLOB_H_FALSE
='#'
22217 GL_GENERATE_GLOB_H_TRUE
='#'
22218 GL_GENERATE_GLOB_H_FALSE
=
22224 if test $HAVE_GLOB = 0 ||
test $REPLACE_GLOB = 1; then
22233 gl_LIBOBJS
="$gl_LIBOBJS glob.$ac_objext"
22243 gl_LIBOBJS
="$gl_LIBOBJS globfree.$ac_objext"
22251 if test $HAVE_GLOB_PATTERN_P = 0 ||
test $REPLACE_GLOB_PATTERN_P = 1; then
22260 gl_LIBOBJS
="$gl_LIBOBJS glob_pattern_p.$ac_objext"
22274 $as_echo "#define GNULIB_TEST_GLOB 1" >>confdefs.h
22280 LIB_HARD_LOCALE
="$LIB_SETLOCALE_NULL"
22295 if test $ac_cv_header_sys_socket_h != yes; then
22296 for ac_header
in winsock2.h
22298 ac_fn_c_check_header_mongrel
"$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
22299 if test "x$ac_cv_header_winsock2_h" = xyes
; then :
22300 cat >>confdefs.h
<<_ACEOF
22301 #define HAVE_WINSOCK2_H 1
22309 if test "$ac_cv_header_winsock2_h" = yes; then
22311 UNISTD_H_HAVE_WINSOCK2_H
=1
22312 SYS_IOCTL_H_HAVE_WINSOCK2_H
=1
22318 if test $HAVE_WINSOCK2_H = 1; then
22319 REPLACE_INET_NTOP
=1
22320 ac_fn_c_check_decl
"$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h>
22322 if test "x$ac_cv_have_decl_inet_ntop" = xyes
; then :
22328 cat >>confdefs.h
<<_ACEOF
22329 #define HAVE_DECL_INET_NTOP $ac_have_decl
22332 if test $ac_cv_have_decl_inet_ntop = yes; then
22333 INET_NTOP_LIB
="-lws2_32"
22335 HAVE_DECL_INET_NTOP
=0
22339 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5
22340 $as_echo_n "checking for library containing inet_ntop... " >&6; }
22341 if ${ac_cv_search_inet_ntop+:} false
; then :
22342 $as_echo_n "(cached) " >&6
22344 ac_func_search_save_LIBS
=$LIBS
22345 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
22346 /* end confdefs.h. */
22348 /* Override any GCC internal prototype to avoid an error.
22349 Use char because int might match the return type of a GCC
22350 builtin and then its argument prototype would still apply. */
22358 return inet_ntop ();
22363 for ac_lib
in '' nsl resolv network
; do
22364 if test -z "$ac_lib"; then
22365 ac_res
="none required"
22368 LIBS
="-l$ac_lib $ac_func_search_save_LIBS"
22370 if ac_fn_c_try_link
"$LINENO"; then :
22371 ac_cv_search_inet_ntop
=$ac_res
22373 rm -f core conftest.err conftest.
$ac_objext \
22375 if ${ac_cv_search_inet_ntop+:} false
; then :
22379 if ${ac_cv_search_inet_ntop+:} false
; then :
22382 ac_cv_search_inet_ntop
=no
22384 rm conftest.
$ac_ext
22385 LIBS
=$ac_func_search_save_LIBS
22387 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5
22388 $as_echo "$ac_cv_search_inet_ntop" >&6; }
22389 ac_res
=$ac_cv_search_inet_ntop
22390 if test "$ac_res" != no
; then :
22391 test "$ac_res" = "none required" || LIBS
="$ac_res $LIBS"
22394 for ac_func
in inet_ntop
22396 ac_fn_c_check_func
"$LINENO" "inet_ntop" "ac_cv_func_inet_ntop"
22397 if test "x$ac_cv_func_inet_ntop" = xyes
; then :
22398 cat >>confdefs.h
<<_ACEOF
22399 #define HAVE_INET_NTOP 1
22405 if test $ac_cv_func_inet_ntop = no
; then
22413 if test "$ac_cv_search_inet_ntop" != "no" \
22414 && test "$ac_cv_search_inet_ntop" != "none required"; then
22415 INET_NTOP_LIB
="$ac_cv_search_inet_ntop"
22419 ac_fn_c_check_decl
"$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h>
22421 # include <netdb.h>
22425 if test "x$ac_cv_have_decl_inet_ntop" = xyes
; then :
22431 cat >>confdefs.h
<<_ACEOF
22432 #define HAVE_DECL_INET_NTOP $ac_have_decl
22435 if test $ac_cv_have_decl_inet_ntop = no
; then
22436 HAVE_DECL_INET_NTOP
=0
22441 if test $HAVE_INET_NTOP = 0 ||
test $REPLACE_INET_NTOP = 1; then
22450 gl_LIBOBJS
="$gl_LIBOBJS inet_ntop.$ac_objext"
22470 if test -n "$STDINT_H"; then
22471 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
22472 /* end confdefs.h. */
22487 if ac_fn_c_try_compile
"$LINENO"; then :
22488 PRIPTR_PREFIX
='"l"'
22490 PRIPTR_PREFIX
='"ll"'
22492 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
22494 for glpfx
in '' l ll I64
; do
22496 '') gltype1
='int';;
22497 l
) gltype1
='long int';;
22498 ll
) gltype1
='long long int';;
22499 I64
) gltype1
='__int64';;
22501 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
22502 /* end confdefs.h. */
22503 #include <stdint.h>
22504 extern intptr_t foo;
22505 extern $gltype1 foo;
22514 if ac_fn_c_try_compile
"$LINENO"; then :
22515 PRIPTR_PREFIX
='"'$glpfx'"'
22517 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
22518 test -n "$PRIPTR_PREFIX" && break
22524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5
22525 $as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; }
22526 if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false
; then :
22527 $as_echo_n "(cached) " >&6
22529 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
22530 /* end confdefs.h. */
22531 /* Work also in C++ mode. */
22532 #define __STDC_LIMIT_MACROS 1
22534 /* Work if build is not clean. */
22535 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22537 #include <limits.h>
22539 #include <stdint.h>
22542 #if defined INT32_MAX && defined INTMAX_MAX
22543 #define CONDITION (INT32_MAX < INTMAX_MAX)
22545 #define CONDITION (sizeof (int) < sizeof (long long int))
22547 int test[CONDITION ? 1 : -1];
22556 if ac_fn_c_try_compile
"$LINENO"; then :
22557 gl_cv_test_INT32_MAX_LT_INTMAX_MAX
=yes
22559 gl_cv_test_INT32_MAX_LT_INTMAX_MAX
=no
22561 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
22563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5
22564 $as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; }
22565 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then
22566 INT32_MAX_LT_INTMAX_MAX
=1;
22568 INT32_MAX_LT_INTMAX_MAX
=0;
22572 if test $APPLE_UNIVERSAL_BUILD = 0; then
22574 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5
22575 $as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; }
22576 if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false
; then :
22577 $as_echo_n "(cached) " >&6
22579 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
22580 /* end confdefs.h. */
22581 /* Work also in C++ mode. */
22582 #define __STDC_LIMIT_MACROS 1
22584 /* Work if build is not clean. */
22585 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22587 #include <limits.h>
22589 #include <stdint.h>
22592 #if defined INT64_MAX
22593 #define CONDITION (INT64_MAX == LONG_MAX)
22595 #define CONDITION (sizeof (long long int) == sizeof (long int))
22597 int test[CONDITION ? 1 : -1];
22606 if ac_fn_c_try_compile
"$LINENO"; then :
22607 gl_cv_test_INT64_MAX_EQ_LONG_MAX
=yes
22609 gl_cv_test_INT64_MAX_EQ_LONG_MAX
=no
22611 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
22613 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5
22614 $as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; }
22615 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then
22616 INT64_MAX_EQ_LONG_MAX
=1;
22618 INT64_MAX_EQ_LONG_MAX
=0;
22623 INT64_MAX_EQ_LONG_MAX
=-1
22626 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5
22627 $as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; }
22628 if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false
; then :
22629 $as_echo_n "(cached) " >&6
22631 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
22632 /* end confdefs.h. */
22633 /* Work also in C++ mode. */
22634 #define __STDC_LIMIT_MACROS 1
22636 /* Work if build is not clean. */
22637 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22639 #include <limits.h>
22641 #include <stdint.h>
22644 #if defined UINT32_MAX && defined UINTMAX_MAX
22645 #define CONDITION (UINT32_MAX < UINTMAX_MAX)
22647 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int))
22649 int test[CONDITION ? 1 : -1];
22658 if ac_fn_c_try_compile
"$LINENO"; then :
22659 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX
=yes
22661 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX
=no
22663 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
22665 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5
22666 $as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; }
22667 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then
22668 UINT32_MAX_LT_UINTMAX_MAX
=1;
22670 UINT32_MAX_LT_UINTMAX_MAX
=0;
22674 if test $APPLE_UNIVERSAL_BUILD = 0; then
22676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5
22677 $as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; }
22678 if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false
; then :
22679 $as_echo_n "(cached) " >&6
22681 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
22682 /* end confdefs.h. */
22683 /* Work also in C++ mode. */
22684 #define __STDC_LIMIT_MACROS 1
22686 /* Work if build is not clean. */
22687 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H
22689 #include <limits.h>
22691 #include <stdint.h>
22694 #if defined UINT64_MAX
22695 #define CONDITION (UINT64_MAX == ULONG_MAX)
22697 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int))
22699 int test[CONDITION ? 1 : -1];
22708 if ac_fn_c_try_compile
"$LINENO"; then :
22709 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX
=yes
22711 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX
=no
22713 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
22715 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5
22716 $as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; }
22717 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then
22718 UINT64_MAX_EQ_ULONG_MAX
=1;
22720 UINT64_MAX_EQ_ULONG_MAX
=0;
22725 UINT64_MAX_EQ_ULONG_MAX
=-1
22735 if test $ac_cv_func_isblank = no
; then
22739 if test $HAVE_ISBLANK = 0; then
22748 gl_LIBOBJS
="$gl_LIBOBJS isblank.$ac_objext"
22753 cat >>confdefs.h
<<_ACEOF
22754 #define GNULIB_ISBLANK 1
22770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5
22771 $as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; }
22772 if ${gl_cv_func_isnand_no_libm+:} false
; then :
22773 $as_echo_n "(cached) " >&6
22776 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
22777 /* end confdefs.h. */
22779 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
22781 # define isnand(x) __builtin_isnan ((double)(x))
22784 # define isnand(x) isnan ((double)(x))
22795 if ac_fn_c_try_link
"$LINENO"; then :
22796 gl_cv_func_isnand_no_libm
=yes
22798 gl_cv_func_isnand_no_libm
=no
22800 rm -f core conftest.err conftest.
$ac_objext \
22801 conftest
$ac_exeext conftest.
$ac_ext
22804 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5
22805 $as_echo "$gl_cv_func_isnand_no_libm" >&6; }
22807 gl_func_isnand_no_libm
=$gl_cv_func_isnand_no_libm
22808 if test $gl_cv_func_isnand_no_libm = yes; then
22810 $as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h
22814 if test $gl_func_isnand_no_libm != yes; then
22823 gl_LIBOBJS
="$gl_LIBOBJS isnand.$ac_objext"
22831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5
22832 $as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; }
22833 if ${gl_cv_func_isnanl_no_libm+:} false
; then :
22834 $as_echo_n "(cached) " >&6
22837 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
22838 /* end confdefs.h. */
22840 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
22842 # define isnanl(x) __builtin_isnan ((long double)(x))
22843 #elif defined isnan
22845 # define isnanl(x) isnan ((long double)(x))
22856 if ac_fn_c_try_link
"$LINENO"; then :
22857 gl_cv_func_isnanl_no_libm
=yes
22859 gl_cv_func_isnanl_no_libm
=no
22861 rm -f core conftest.err conftest.
$ac_objext \
22862 conftest
$ac_exeext conftest.
$ac_ext
22865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5
22866 $as_echo "$gl_cv_func_isnanl_no_libm" >&6; }
22868 gl_func_isnanl_no_libm
=$gl_cv_func_isnanl_no_libm
22869 if test $gl_func_isnanl_no_libm = yes; then
22874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5
22875 $as_echo_n "checking whether isnanl works... " >&6; }
22876 if ${gl_cv_func_isnanl_works+:} false
; then :
22877 $as_echo_n "(cached) " >&6
22880 if test "$cross_compiling" = yes; then :
22882 mingw
*) # Guess yes on mingw, no on MSVC.
22883 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
22884 /* end confdefs.h. */
22891 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22892 $EGREP "Known" >/dev
/null
2>&1; then :
22893 gl_cv_func_isnanl_works
="guessing yes"
22895 gl_cv_func_isnanl_works
="guessing no"
22900 *) gl_cv_func_isnanl_works
="guessing yes" ;;
22904 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
22905 /* end confdefs.h. */
22908 #include <limits.h>
22910 #if (__GNUC__ >= 4) || (__clang_major__ >= 4)
22912 # define isnanl(x) __builtin_isnan ((long double)(x))
22913 #elif defined isnan
22915 # define isnanl(x) isnan ((long double)(x))
22918 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
22919 typedef union { unsigned int word[NWORDS]; long double value; }
22920 memory_long_double;
22921 /* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the
22922 runtime type conversion. */
22924 static long double NaNl ()
22927 return zero / zero;
22930 # define NaNl() (0.0L / 0.0L)
22936 if (!isnanl (NaNl ()))
22940 memory_long_double m;
22943 /* The isnanl function should be immune against changes in the sign bit and
22944 in the mantissa bits. The xor operation twiddles a bit that can only be
22945 a sign bit or a mantissa bit (since the exponent never extends to
22948 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1);
22949 for (i = 0; i < NWORDS; i++)
22951 if (!isnanl (m.value))
22955 #if ((defined __ia64 && LDBL_MANT_DIG == 64) || (defined __x86_64__ || defined __amd64__) || (defined __i386 || defined __i386__ || defined _I386 || defined _M_IX86 || defined _X86_)) && !HAVE_SAME_LONG_DOUBLE_AS_DOUBLE
22956 /* Representation of an 80-bit 'long double' as an initializer for a sequence
22957 of 'unsigned int' words. */
22958 # ifdef WORDS_BIGENDIAN
22959 # define LDBL80_WORDS(exponent,manthi,mantlo) \
22960 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \
22961 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \
22962 (unsigned int) (mantlo) << 16 \
22965 # define LDBL80_WORDS(exponent,manthi,mantlo) \
22966 { mantlo, manthi, exponent }
22969 static memory_long_double x =
22970 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) };
22971 if (!isnanl (x.value))
22975 /* Signalling NaN. */
22976 static memory_long_double x =
22977 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) };
22978 if (!isnanl (x.value))
22981 /* isnanl should return something even for noncanonical values. */
22982 { /* Pseudo-NaN. */
22983 static memory_long_double x =
22984 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) };
22985 if (isnanl (x.value) && !isnanl (x.value))
22988 { /* Pseudo-Infinity. */
22989 static memory_long_double x =
22990 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) };
22991 if (isnanl (x.value) && !isnanl (x.value))
22994 { /* Pseudo-Zero. */
22995 static memory_long_double x =
22996 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) };
22997 if (isnanl (x.value) && !isnanl (x.value))
23000 { /* Unnormalized number. */
23001 static memory_long_double x =
23002 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) };
23003 if (isnanl (x.value) && !isnanl (x.value))
23006 { /* Pseudo-Denormal. */
23007 static memory_long_double x =
23008 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) };
23009 if (isnanl (x.value) && !isnanl (x.value))
23017 if ac_fn_c_try_run
"$LINENO"; then :
23018 gl_cv_func_isnanl_works
=yes
23020 gl_cv_func_isnanl_works
=no
23022 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
23023 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
23028 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5
23029 $as_echo "$gl_cv_func_isnanl_works" >&6; }
23031 case "$gl_cv_func_isnanl_works" in
23033 *) gl_func_isnanl_no_libm
=no
;;
23036 if test $gl_func_isnanl_no_libm = yes; then
23038 $as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h
23042 if test $gl_func_isnanl_no_libm != yes; then
23051 gl_LIBOBJS
="$gl_LIBOBJS isnanl.$ac_objext"
23056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5
23057 $as_echo_n "checking where to find the exponent in a 'long double'... " >&6; }
23058 if ${gl_cv_cc_long_double_expbit0+:} false
; then :
23059 $as_echo_n "(cached) " >&6
23062 if test "$cross_compiling" = yes; then :
23064 gl_cv_cc_long_double_expbit0
="unknown"
23066 mingw
*) # On native Windows (little-endian), we know the result
23067 # in two cases: mingw, MSVC.
23068 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
23069 /* end confdefs.h. */
23076 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23077 $EGREP "Known" >/dev
/null
2>&1; then :
23078 gl_cv_cc_long_double_expbit0
="word 2 bit 0"
23082 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
23083 /* end confdefs.h. */
23090 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23091 $EGREP "Known" >/dev
/null
2>&1; then :
23092 gl_cv_cc_long_double_expbit0
="word 1 bit 20"
23100 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
23101 /* end confdefs.h. */
23104 #include <stddef.h>
23106 #include <string.h>
23108 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int))
23109 typedef union { long double value; unsigned int word[NWORDS]; }
23110 memory_long_double;
23111 static unsigned int ored_words[NWORDS];
23112 static unsigned int anded_words[NWORDS];
23113 static void add_to_ored_words (long double *x)
23115 memory_long_double m;
23117 /* Clear it first, in case
23118 sizeof (long double) < sizeof (memory_long_double). */
23119 memset (&m, 0, sizeof (memory_long_double));
23121 for (i = 0; i < NWORDS; i++)
23123 ored_words[i] |= m.word[i];
23124 anded_words[i] &= m.word[i];
23129 static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L };
23131 FILE *fp = fopen ("conftest.out", "w");
23134 for (j = 0; j < NWORDS; j++)
23135 anded_words[j] = ~ (unsigned int) 0;
23136 for (j = 0; j < 5; j++)
23137 add_to_ored_words (&samples[j]);
23138 /* Remove bits that are common (e.g. if representation of the first mantissa
23139 bit is explicit). */
23140 for (j = 0; j < NWORDS; j++)
23141 ored_words[j] &= ~anded_words[j];
23142 /* Now find the nonzero word. */
23143 for (j = 0; j < NWORDS; j++)
23144 if (ored_words[j] != 0)
23149 for (i = j + 1; i < NWORDS; i++)
23150 if (ored_words[i] != 0)
23152 fprintf (fp, "unknown");
23153 return (fclose (fp) != 0);
23156 if ((ored_words[j] >> i) & 1)
23158 fprintf (fp, "word %d bit %d", (int) j, (int) i);
23159 return (fclose (fp) != 0);
23162 fprintf (fp, "unknown");
23163 return (fclose (fp) != 0);
23167 if ac_fn_c_try_run
"$LINENO"; then :
23168 gl_cv_cc_long_double_expbit0
=`cat conftest.out`
23170 gl_cv_cc_long_double_expbit0
="unknown"
23172 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
23173 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
23179 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5
23180 $as_echo "$gl_cv_cc_long_double_expbit0" >&6; }
23181 case "$gl_cv_cc_long_double_expbit0" in
23183 word
=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'`
23184 bit
=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'`
23186 cat >>confdefs.h
<<_ACEOF
23187 #define LDBL_EXPBIT0_WORD $word
23191 cat >>confdefs.h
<<_ACEOF
23192 #define LDBL_EXPBIT0_BIT $bit
23203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5
23204 $as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; }
23205 if ${gl_cv_c___inline+:} false
; then :
23206 $as_echo_n "(cached) " >&6
23208 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
23209 /* end confdefs.h. */
23211 static __inline foo_t foo (void) { return 0; }
23220 if ac_fn_c_try_compile
"$LINENO"; then :
23221 gl_cv_c___inline
=yes
23223 gl_cv_c___inline
=no
23225 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
23227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5
23228 $as_echo "$gl_cv_c___inline" >&6; }
23229 if test $gl_cv_c___inline = yes; then
23231 $as_echo "#define HAVE___INLINE 1" >>confdefs.h
23239 LOCALCHARSET_TESTS_ENVIRONMENT
=
23254 $as_echo "#define _LCONV_C99 1" >>confdefs.h
23259 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5
23260 $as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; }
23261 if ${gl_cv_header_locale_h_posix2001+:} false
; then :
23262 $as_echo_n "(cached) " >&6
23264 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
23265 /* end confdefs.h. */
23266 #include <locale.h>
23267 int x = LC_MESSAGES;
23268 int y = sizeof (((struct lconv *) 0)->decimal_point);
23277 if ac_fn_c_try_compile
"$LINENO"; then :
23278 gl_cv_header_locale_h_posix2001
=yes
23280 gl_cv_header_locale_h_posix2001
=no
23282 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
23284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5
23285 $as_echo "$gl_cv_header_locale_h_posix2001" >&6; }
23287 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5
23288 $as_echo_n "checking whether struct lconv is properly defined... " >&6; }
23289 if ${gl_cv_sys_struct_lconv_ok+:} false
; then :
23290 $as_echo_n "(cached) " >&6
23292 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
23293 /* end confdefs.h. */
23294 #include <locale.h>
23296 int x = sizeof (l.decimal_point);
23297 int y = sizeof (l.int_p_cs_precedes);
23306 if ac_fn_c_try_compile
"$LINENO"; then :
23307 gl_cv_sys_struct_lconv_ok
=yes
23309 gl_cv_sys_struct_lconv_ok
=no
23311 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
23314 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5
23315 $as_echo "$gl_cv_sys_struct_lconv_ok" >&6; }
23316 if test $gl_cv_sys_struct_lconv_ok = no
; then
23319 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
23320 /* end confdefs.h. */
23327 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23328 $EGREP "Special" >/dev
/null
2>&1; then :
23331 REPLACE_STRUCT_LCONV
=1
23336 *) REPLACE_STRUCT_LCONV
=1 ;;
23348 if test $gl_cv_have_include_next = yes; then
23349 gl_cv_next_locale_h
='<'locale.h
'>'
23351 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5
23352 $as_echo_n "checking absolute name of <locale.h>... " >&6; }
23353 if ${gl_cv_next_locale_h+:} false
; then :
23354 $as_echo_n "(cached) " >&6
23359 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
23360 /* end confdefs.h. */
23361 #include <locale.h>
23364 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
23365 *) gl_absname_cpp
="$ac_cpp" ;;
23370 gl_dirsep_regex
='[/\\]'
23373 gl_dirsep_regex
='\/'
23376 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
23377 gl_header_literal_regex
=`echo 'locale.h' \
23378 | sed -e "$gl_make_literal_regex_sed"`
23379 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23380 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23386 gl_cv_absolute_locale_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23387 sed -n "$gl_absolute_header_sed"`
23389 gl_header
=$gl_cv_absolute_locale_h
23390 gl_cv_next_locale_h
='"'$gl_header'"'
23394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5
23395 $as_echo "$gl_cv_next_locale_h" >&6; }
23397 NEXT_LOCALE_H
=$gl_cv_next_locale_h
23399 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
23400 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23401 gl_next_as_first_directive
='<'locale.h
'>'
23403 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23404 gl_next_as_first_directive
=$gl_cv_next_locale_h
23406 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H
=$gl_next_as_first_directive
23418 if test "$gl_threads_api" = posix
; then
23419 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the
23420 # pthread_rwlock_* functions.
23422 ac_fn_c_check_type
"$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h>
23424 if test "x$ac_cv_type_pthread_rwlock_t" = xyes
; then :
23427 $as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h
23431 if $has_rwlock; then
23434 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5
23435 $as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; }
23436 if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false
; then :
23437 $as_echo_n "(cached) " >&6
23440 LIBS
="$LIBS $LIBMULTITHREAD"
23441 if test "$cross_compiling" = yes; then :
23443 # Guess no on glibc systems.
23444 *-gnu* | gnu
*) gl_cv_pthread_rwlock_rdlock_prefer_writer
="guessing no" ;;
23445 # Guess no on musl systems.
23446 *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer
="guessing no" ;;
23447 # Guess no on bionic systems.
23448 *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer
="guessing no" ;;
23449 # Guess yes on native Windows with the mingw-w64 winpthreads library.
23450 # Guess no on native Windows with the gnulib windows-rwlock module.
23451 mingw
*) if test "$gl_use_threads" = yes ||
test "$gl_use_threads" = posix
; then
23452 gl_cv_pthread_rwlock_rdlock_prefer_writer
="guessing yes"
23454 gl_cv_pthread_rwlock_rdlock_prefer_writer
="guessing no"
23457 # If we don't know, obey --enable-cross-guesses.
23458 *) gl_cv_pthread_rwlock_rdlock_prefer_writer
="$gl_cross_guess_normal" ;;
23462 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
23463 /* end confdefs.h. */
23466 #include <pthread.h>
23467 #include <stdlib.h>
23468 #include <unistd.h>
23470 #define SUCCEED() exit (0)
23471 #define FAILURE() exit (1)
23472 #define UNEXPECTED(n) (exit (10 + (n)))
23474 /* The main thread creates the waiting writer and the requesting reader threads
23475 in the default way; this guarantees that they have the same priority.
23476 We can reuse the main thread as first reader thread. */
23478 static pthread_rwlock_t lock;
23479 static pthread_t reader1;
23480 static pthread_t writer;
23481 static pthread_t reader2;
23482 static pthread_t timer;
23483 /* Used to pass control from writer to reader2 and from reader2 to timer,
23484 as in a relay race.
23485 Passing control from one running thread to another running thread
23486 is most likely faster than to create the second thread. */
23487 static pthread_mutex_t baton;
23490 timer_func (void *ignored)
23492 /* Step 13 (can be before or after step 12):
23493 The timer thread takes the baton, then waits a moment to make sure
23494 it can tell whether the second reader thread is blocked at step 12. */
23495 if (pthread_mutex_lock (&baton))
23498 /* By the time we get here, it's clear that the second reader thread is
23499 blocked at step 12. This is the desired behaviour. */
23504 reader2_func (void *ignored)
23508 /* Step 8 (can be before or after step 7):
23509 The second reader thread takes the baton, then waits a moment to make sure
23510 the writer thread has reached step 7. */
23511 if (pthread_mutex_lock (&baton))
23514 /* Step 9: The second reader thread requests the lock. */
23515 err = pthread_rwlock_tryrdlock (&lock);
23518 else if (err != EBUSY)
23520 /* Step 10: Launch a timer, to test whether the next call blocks. */
23521 if (pthread_create (&timer, NULL, timer_func, NULL))
23523 /* Step 11: Release the baton. */
23524 if (pthread_mutex_unlock (&baton))
23526 /* Step 12: The second reader thread requests the lock. */
23527 err = pthread_rwlock_rdlock (&lock);
23535 writer_func (void *ignored)
23537 /* Step 4: Take the baton, so that the second reader thread does not go ahead
23539 if (pthread_mutex_lock (&baton))
23541 /* Step 5: Create the second reader thread. */
23542 if (pthread_create (&reader2, NULL, reader2_func, NULL))
23544 /* Step 6: Release the baton. */
23545 if (pthread_mutex_unlock (&baton))
23547 /* Step 7: The writer thread requests the lock. */
23548 if (pthread_rwlock_wrlock (&lock))
23556 reader1 = pthread_self ();
23558 /* Step 1: The main thread initializes the lock and the baton. */
23559 if (pthread_rwlock_init (&lock, NULL))
23561 if (pthread_mutex_init (&baton, NULL))
23563 /* Step 2: The main thread acquires the lock as a reader. */
23564 if (pthread_rwlock_rdlock (&lock))
23566 /* Step 3: Create the writer thread. */
23567 if (pthread_create (&writer, NULL, writer_func, NULL))
23569 /* Job done. Go to sleep. */
23577 if ac_fn_c_try_run
"$LINENO"; then :
23578 gl_cv_pthread_rwlock_rdlock_prefer_writer
=yes
23580 gl_cv_pthread_rwlock_rdlock_prefer_writer
=no
23582 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
23583 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
23589 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5
23590 $as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; }
23591 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in
23594 $as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h
23600 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro.
23601 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
23602 /* end confdefs.h. */
23604 #include <pthread.h>
23609 #if __FreeBSD__ == 4
23610 error "No, in FreeBSD 4.0 recursive mutexes actually don't work."
23611 #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \
23612 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070)
23613 error "No, in Mac OS X < 10.7 recursive mutexes actually don't work."
23615 int x = (int)PTHREAD_MUTEX_RECURSIVE;
23623 if ac_fn_c_try_compile
"$LINENO"; then :
23625 $as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h
23628 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
23634 cat >>confdefs.h
<<_ACEOF
23635 #define GNULIB_LOCK 1
23643 if test $ac_cv_func_lstat = yes; then
23645 case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in
23654 if test $REPLACE_LSTAT = 1; then
23663 gl_LIBOBJS
="$gl_LIBOBJS lstat.$ac_objext"
23678 $as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h
23685 if test $gl_cv_func_malloc_posix = yes; then
23687 $as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h
23693 if test $REPLACE_MALLOC = 1; then
23702 gl_LIBOBJS
="$gl_LIBOBJS malloc.$ac_objext"
23710 GNULIB_MALLOC_POSIX
=1
23716 $as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h
23734 if test $gl_cv_have_include_next = yes; then
23735 gl_cv_next_math_h
='<'math.h
'>'
23737 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5
23738 $as_echo_n "checking absolute name of <math.h>... " >&6; }
23739 if ${gl_cv_next_math_h+:} false
; then :
23740 $as_echo_n "(cached) " >&6
23743 if test $ac_cv_header_math_h = yes; then
23748 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
23749 /* end confdefs.h. */
23753 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
23754 *) gl_absname_cpp
="$ac_cpp" ;;
23759 gl_dirsep_regex
='[/\\]'
23762 gl_dirsep_regex
='\/'
23765 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
23766 gl_header_literal_regex
=`echo 'math.h' \
23767 | sed -e "$gl_make_literal_regex_sed"`
23768 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
23769 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
23775 gl_cv_absolute_math_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
23776 sed -n "$gl_absolute_header_sed"`
23778 gl_header
=$gl_cv_absolute_math_h
23779 gl_cv_next_math_h
='"'$gl_header'"'
23781 gl_cv_next_math_h
='<'math.h
'>'
23786 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5
23787 $as_echo "$gl_cv_next_math_h" >&6; }
23789 NEXT_MATH_H
=$gl_cv_next_math_h
23791 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
23792 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
23793 gl_next_as_first_directive
='<'math.h
'>'
23795 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
23796 gl_next_as_first_directive
=$gl_cv_next_math_h
23798 NEXT_AS_FIRST_DIRECTIVE_MATH_H
=$gl_next_as_first_directive
23804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5
23805 $as_echo_n "checking whether NAN macro works... " >&6; }
23806 if ${gl_cv_header_math_nan_works+:} false
; then :
23807 $as_echo_n "(cached) " >&6
23809 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
23810 /* end confdefs.h. */
23815 /* Solaris 10 has a broken definition of NAN. Other platforms
23816 fail to provide NAN, or provide it only in C99 mode; this
23817 test only needs to fail when NAN is provided but wrong. */
23827 if ac_fn_c_try_compile
"$LINENO"; then :
23828 gl_cv_header_math_nan_works
=yes
23830 gl_cv_header_math_nan_works
=no
23832 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
23834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5
23835 $as_echo "$gl_cv_header_math_nan_works" >&6; }
23836 if test $gl_cv_header_math_nan_works = no
; then
23839 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5
23840 $as_echo_n "checking whether HUGE_VAL works... " >&6; }
23841 if ${gl_cv_header_math_huge_val_works+:} false
; then :
23842 $as_echo_n "(cached) " >&6
23844 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
23845 /* end confdefs.h. */
23850 /* Solaris 10 has a broken definition of HUGE_VAL. */
23851 double d = HUGE_VAL;
23857 if ac_fn_c_try_compile
"$LINENO"; then :
23858 gl_cv_header_math_huge_val_works
=yes
23860 gl_cv_header_math_huge_val_works
=no
23862 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
23864 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5
23865 $as_echo "$gl_cv_header_math_huge_val_works" >&6; }
23866 if test $gl_cv_header_math_huge_val_works = no
; then
23887 if case "$host_os" in
23889 *) test $ac_cv_func_mbsinit = yes ;;
23891 && test $ac_cv_func_mbrtowc = yes; then
23896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
23897 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
23898 if ${gl_cv_func_mbrtowc_incomplete_state+:} false
; then :
23899 $as_echo_n "(cached) " >&6
23903 # Guess no on AIX and OSF/1.
23904 aix
* | osf
*) gl_cv_func_mbrtowc_incomplete_state
="guessing no" ;;
23905 # Guess yes otherwise.
23906 *) gl_cv_func_mbrtowc_incomplete_state
="guessing yes" ;;
23908 if test $LOCALE_JA != none
; then
23909 if test "$cross_compiling" = yes; then :
23912 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
23913 /* end confdefs.h. */
23915 #include <locale.h>
23916 #include <string.h>
23920 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
23922 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
23926 memset (&state, '\0', sizeof (mbstate_t));
23927 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23928 if (mbsinit (&state))
23934 if ac_fn_c_try_run
"$LINENO"; then :
23935 gl_cv_func_mbrtowc_incomplete_state
=yes
23937 gl_cv_func_mbrtowc_incomplete_state
=no
23939 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
23940 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
23944 if test $LOCALE_FR_UTF8 != none
; then
23945 if test "$cross_compiling" = yes; then :
23948 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
23949 /* end confdefs.h. */
23951 #include <locale.h>
23952 #include <string.h>
23956 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
23958 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
23962 memset (&state, '\0', sizeof (mbstate_t));
23963 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
23964 if (mbsinit (&state))
23970 if ac_fn_c_try_run
"$LINENO"; then :
23971 gl_cv_func_mbrtowc_incomplete_state
=yes
23973 gl_cv_func_mbrtowc_incomplete_state
=no
23975 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
23976 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
23983 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
23984 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
23989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
23990 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
23991 if ${gl_cv_func_mbrtowc_sanitycheck+:} false
; then :
23992 $as_echo_n "(cached) " >&6
23996 # Guess no on Solaris 8.
23997 solaris2.8
) gl_cv_func_mbrtowc_sanitycheck
="guessing no" ;;
23998 # Guess yes otherwise.
23999 *) gl_cv_func_mbrtowc_sanitycheck
="guessing yes" ;;
24001 if test $LOCALE_ZH_CN != none
; then
24002 if test "$cross_compiling" = yes; then :
24005 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
24006 /* end confdefs.h. */
24008 #include <locale.h>
24009 #include <stdlib.h>
24010 #include <string.h>
24014 /* This fails on Solaris 8:
24015 mbrtowc returns 2, and sets wc to 0x00F0.
24016 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
24017 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24019 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
24023 memset (&state, '\0', sizeof (mbstate_t));
24024 if (mbrtowc (&wc, input + 3, 6, &state) != 4
24025 && mbtowc (&wc, input + 3, 6) == 4)
24031 if ac_fn_c_try_run
"$LINENO"; then :
24032 gl_cv_func_mbrtowc_sanitycheck
=yes
24034 gl_cv_func_mbrtowc_sanitycheck
=no
24036 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
24037 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
24043 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
24044 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
24046 REPLACE_MBSTATE_T
=0
24047 case "$gl_cv_func_mbrtowc_incomplete_state" in
24049 *) REPLACE_MBSTATE_T
=1 ;;
24051 case "$gl_cv_func_mbrtowc_sanitycheck" in
24053 *) REPLACE_MBSTATE_T
=1 ;;
24056 REPLACE_MBSTATE_T
=1
24061 if test $ac_cv_func_mbrtowc = no
; then
24063 ac_fn_c_check_decl
"$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" "
24067 if test "x$ac_cv_have_decl_mbrtowc" = xyes
; then :
24073 cat >>confdefs.h
<<_ACEOF
24074 #define HAVE_DECL_MBRTOWC $ac_have_decl
24077 if test $ac_cv_have_decl_mbrtowc = yes; then
24081 if test $REPLACE_MBSTATE_T = 1; then
24087 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5
24088 $as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; }
24089 if ${gl_cv_func_mbrtowc_null_arg1+:} false
; then :
24090 $as_echo_n "(cached) " >&6
24094 # Guess no on Solaris.
24095 solaris
*) gl_cv_func_mbrtowc_null_arg1
="guessing no" ;;
24096 # Guess yes otherwise.
24097 *) gl_cv_func_mbrtowc_null_arg1
="guessing yes" ;;
24099 if test $LOCALE_FR_UTF8 != none
; then
24100 if test "$cross_compiling" = yes; then :
24103 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
24104 /* end confdefs.h. */
24106 #include <locale.h>
24107 #include <stdlib.h>
24108 #include <string.h>
24114 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24116 char input[] = "\303\237er";
24121 memset (&state, '\0', sizeof (mbstate_t));
24122 wc = (wchar_t) 0xBADFACE;
24123 ret = mbrtowc (&wc, input, 5, &state);
24126 if (!mbsinit (&state))
24129 memset (&state, '\0', sizeof (mbstate_t));
24130 ret = mbrtowc (NULL, input, 5, &state);
24131 if (ret != 2) /* Solaris 7 fails here: ret is -1. */
24133 if (!mbsinit (&state))
24139 if ac_fn_c_try_run
"$LINENO"; then :
24140 gl_cv_func_mbrtowc_null_arg1
=yes
24142 gl_cv_func_mbrtowc_null_arg1
=no
24144 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
24145 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
24151 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5
24152 $as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; }
24157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5
24158 $as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; }
24159 if ${gl_cv_func_mbrtowc_null_arg2+:} false
; then :
24160 $as_echo_n "(cached) " >&6
24164 # Guess no on OSF/1.
24165 osf
*) gl_cv_func_mbrtowc_null_arg2
="guessing no" ;;
24166 # Guess yes otherwise.
24167 *) gl_cv_func_mbrtowc_null_arg2
="guessing yes" ;;
24169 if test $LOCALE_FR_UTF8 != none
; then
24170 if test "$cross_compiling" = yes; then :
24173 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
24174 /* end confdefs.h. */
24176 #include <locale.h>
24177 #include <string.h>
24181 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24187 memset (&state, '\0', sizeof (mbstate_t));
24188 wc = (wchar_t) 0xBADFACE;
24189 mbrtowc (&wc, NULL, 5, &state);
24190 /* Check that wc was not modified. */
24191 if (wc != (wchar_t) 0xBADFACE)
24197 if ac_fn_c_try_run
"$LINENO"; then :
24198 gl_cv_func_mbrtowc_null_arg2
=yes
24200 gl_cv_func_mbrtowc_null_arg2
=no
24202 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
24203 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
24209 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5
24210 $as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; }
24217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5
24218 $as_echo_n "checking whether mbrtowc has a correct return value... " >&6; }
24219 if ${gl_cv_func_mbrtowc_retval+:} false
; then :
24220 $as_echo_n "(cached) " >&6
24224 # Guess no on HP-UX, Solaris, native Windows.
24225 hpux
* | solaris
* | mingw
*) gl_cv_func_mbrtowc_retval
="guessing no" ;;
24226 # Guess yes otherwise.
24227 *) gl_cv_func_mbrtowc_retval
="guessing yes" ;;
24229 if test $LOCALE_FR_UTF8 != none ||
test $LOCALE_JA != none \
24230 ||
{ case "$host_os" in mingw
*) true
;; *) false
;; esac; }; then
24231 if test "$cross_compiling" = yes; then :
24234 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
24235 /* end confdefs.h. */
24237 #include <locale.h>
24238 #include <string.h>
24243 int found_some_locale = 0;
24244 /* This fails on Solaris. */
24245 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24247 char input[] = "B\303\274\303\237er"; /* "Büßer" */
24251 memset (&state, '\0', sizeof (mbstate_t));
24252 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24255 if (mbrtowc (&wc, input + 2, 5, &state) != 1)
24258 found_some_locale = 1;
24260 /* This fails on HP-UX 11.11. */
24261 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24263 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24267 memset (&state, '\0', sizeof (mbstate_t));
24268 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24271 if (mbrtowc (&wc, input + 2, 5, &state) != 2)
24274 found_some_locale = 1;
24276 /* This fails on native Windows. */
24277 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
24279 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */
24283 memset (&state, '\0', sizeof (mbstate_t));
24284 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24287 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24290 found_some_locale = 1;
24292 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
24294 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */
24298 memset (&state, '\0', sizeof (mbstate_t));
24299 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24302 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24305 found_some_locale = 1;
24307 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
24309 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */
24313 memset (&state, '\0', sizeof (mbstate_t));
24314 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2))
24317 if (mbrtowc (&wc, input + 4, 4, &state) != 1)
24320 found_some_locale = 1;
24322 return (found_some_locale ? result : 77);
24325 if ac_fn_c_try_run
"$LINENO"; then :
24326 gl_cv_func_mbrtowc_retval
=yes
24328 if test $?
!= 77; then
24329 gl_cv_func_mbrtowc_retval
=no
24333 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
24334 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
24340 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5
24341 $as_echo "$gl_cv_func_mbrtowc_retval" >&6; }
24346 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5
24347 $as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; }
24348 if ${gl_cv_func_mbrtowc_nul_retval+:} false
; then :
24349 $as_echo_n "(cached) " >&6
24353 # Guess no on Solaris 8 and 9.
24354 solaris2.
[89]) gl_cv_func_mbrtowc_nul_retval
="guessing no" ;;
24355 # Guess yes otherwise.
24356 *) gl_cv_func_mbrtowc_nul_retval
="guessing yes" ;;
24358 if test $LOCALE_ZH_CN != none
; then
24359 if test "$cross_compiling" = yes; then :
24362 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
24363 /* end confdefs.h. */
24365 #include <locale.h>
24366 #include <string.h>
24370 /* This fails on Solaris 8 and 9. */
24371 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
24376 memset (&state, '\0', sizeof (mbstate_t));
24377 if (mbrtowc (&wc, "", 1, &state) != 0)
24383 if ac_fn_c_try_run
"$LINENO"; then :
24384 gl_cv_func_mbrtowc_nul_retval
=yes
24386 gl_cv_func_mbrtowc_nul_retval
=no
24388 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
24389 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
24395 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5
24396 $as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; }
24400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5
24401 $as_echo_n "checking whether mbrtowc stores incomplete characters... " >&6; }
24402 if ${gl_cv_func_mbrtowc_stores_incomplete+:} false
; then :
24403 $as_echo_n "(cached) " >&6
24407 # Guess yes on native Windows.
24408 mingw
*) gl_cv_func_mbrtowc_stores_incomplete
="guessing yes" ;;
24409 *) gl_cv_func_mbrtowc_stores_incomplete
="guessing no" ;;
24413 if test "$cross_compiling" = yes; then :
24416 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
24417 /* end confdefs.h. */
24419 #include <locale.h>
24420 #include <string.h>
24425 if (setlocale (LC_ALL, "French_France.65001") != NULL)
24427 wchar_t wc = (wchar_t) 0xBADFACE;
24430 memset (&state, '\0', sizeof (mbstate_t));
24431 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
24432 && wc != (wchar_t) 0xBADFACE)
24435 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL)
24437 wchar_t wc = (wchar_t) 0xBADFACE;
24440 memset (&state, '\0', sizeof (mbstate_t));
24441 if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2)
24442 && wc != (wchar_t) 0xBADFACE)
24445 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL)
24447 wchar_t wc = (wchar_t) 0xBADFACE;
24450 memset (&state, '\0', sizeof (mbstate_t));
24451 if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2)
24452 && wc != (wchar_t) 0xBADFACE)
24455 if (setlocale (LC_ALL, "Chinese_China.936") != NULL)
24457 wchar_t wc = (wchar_t) 0xBADFACE;
24460 memset (&state, '\0', sizeof (mbstate_t));
24461 if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2)
24462 && wc != (wchar_t) 0xBADFACE)
24468 if ac_fn_c_try_run
"$LINENO"; then :
24469 gl_cv_func_mbrtowc_stores_incomplete
=no
24471 gl_cv_func_mbrtowc_stores_incomplete
=yes
24473 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
24474 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
24480 if test $LOCALE_FR_UTF8 != none
; then
24481 if test "$cross_compiling" = yes; then :
24484 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
24485 /* end confdefs.h. */
24487 #include <locale.h>
24488 #include <string.h>
24492 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
24494 wchar_t wc = (wchar_t) 0xBADFACE;
24497 memset (&state, '\0', sizeof (mbstate_t));
24498 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2)
24499 && wc != (wchar_t) 0xBADFACE)
24505 if ac_fn_c_try_run
"$LINENO"; then :
24506 gl_cv_func_mbrtowc_stores_incomplete
=no
24508 gl_cv_func_mbrtowc_stores_incomplete
=yes
24510 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
24511 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
24519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5
24520 $as_echo "$gl_cv_func_mbrtowc_stores_incomplete" >&6; }
24524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5
24525 $as_echo_n "checking whether mbrtowc works on empty input... " >&6; }
24526 if ${gl_cv_func_mbrtowc_empty_input+:} false
; then :
24527 $as_echo_n "(cached) " >&6
24531 # Guess no on AIX and glibc systems.
24532 aix
* |
*-gnu* | gnu
*) gl_cv_func_mbrtowc_empty_input
="guessing no" ;;
24533 # Guess yes on native Windows.
24534 mingw
*) gl_cv_func_mbrtowc_empty_input
="guessing yes" ;;
24535 *) gl_cv_func_mbrtowc_empty_input
="guessing yes" ;;
24537 if test "$cross_compiling" = yes; then :
24540 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
24541 /* end confdefs.h. */
24545 static mbstate_t mbs;
24549 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2;
24552 if ac_fn_c_try_run
"$LINENO"; then :
24553 gl_cv_func_mbrtowc_empty_input
=yes
24555 gl_cv_func_mbrtowc_empty_input
=no
24557 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
24558 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
24563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5
24564 $as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; }
24567 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5
24568 $as_echo_n "checking whether the C locale is free of encoding errors... " >&6; }
24569 if ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+:} false
; then :
24570 $as_echo_n "(cached) " >&6
24573 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ
="$gl_cross_guess_normal"
24575 if test "$cross_compiling" = yes; then :
24577 # Guess yes on native Windows.
24578 mingw
*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ
="guessing yes" ;;
24582 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
24583 /* end confdefs.h. */
24584 #include <limits.h>
24585 #include <locale.h>
24593 char *locale = setlocale (LC_ALL, "C");
24596 for (i = CHAR_MIN; i <= CHAR_MAX; i++)
24600 mbstate_t mbs = { 0, };
24601 size_t ss = mbrtowc (&wc, &c, 1, &mbs);
24611 if ac_fn_c_try_run
"$LINENO"; then :
24612 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ
=yes
24614 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ
=no
24616 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
24617 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
24622 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5
24623 $as_echo "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; }
24625 case "$gl_cv_func_mbrtowc_null_arg1" in
24628 $as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h
24633 case "$gl_cv_func_mbrtowc_null_arg2" in
24636 $as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h
24641 case "$gl_cv_func_mbrtowc_retval" in
24644 $as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h
24649 case "$gl_cv_func_mbrtowc_nul_retval" in
24652 $as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h
24657 case "$gl_cv_func_mbrtowc_stores_incomplete" in
24660 $as_echo "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h
24665 case "$gl_cv_func_mbrtowc_empty_input" in
24668 $as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h
24673 case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in
24676 $as_echo "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h
24683 if test $REPLACE_MBSTATE_T = 1; then
24685 mingw
*) LIB_MBRTOWC
= ;;
24689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
24690 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
24691 if ${gl_cv_have_weak+:} false
; then :
24692 $as_echo_n "(cached) " >&6
24695 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
24696 /* end confdefs.h. */
24697 extern void xyzzy ();
24707 if ac_fn_c_try_link
"$LINENO"; then :
24708 gl_cv_have_weak
=maybe
24710 rm -f core conftest.err conftest.
$ac_objext \
24711 conftest
$ac_exeext conftest.
$ac_ext
24712 if test $gl_cv_have_weak = maybe
; then
24713 if test "$cross_compiling" = yes; then :
24714 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
24715 /* end confdefs.h. */
24717 Extensible Linking Format
24721 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
24722 $EGREP "Extensible Linking Format" >/dev
/null
2>&1; then :
24723 gl_cv_have_weak
="guessing yes"
24725 gl_cv_have_weak
="guessing no"
24731 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
24732 /* end confdefs.h. */
24738 return (fputs == NULL);
24741 if ac_fn_c_try_run
"$LINENO"; then :
24742 gl_cv_have_weak
=yes
24746 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
24747 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
24751 case " $LDFLAGS " in
24752 *" -static "*) gl_cv_have_weak
=no
;;
24754 case "$gl_cv_have_weak" in
24757 freebsd
* | dragonfly
*)
24759 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c
-lpthread >&5 2>&1
24760 cat <<EOF > conftest2.c
24761 #include <pthread.h>
24762 #pragma weak pthread_mutexattr_gettype
24765 return (pthread_mutexattr_gettype != NULL);
24768 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so
>&5 2>&1 \
24769 || gl_cv_have_weak
=no
24770 rm -f conftest1.c libempty.so conftest2.c conftest
24777 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
24778 $as_echo "$gl_cv_have_weak" >&6; }
24779 case "$gl_cv_have_weak" in
24782 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
24787 case "$gl_cv_have_weak" in
24788 *yes) LIB_MBRTOWC
= ;;
24789 *) LIB_MBRTOWC
="$LIBPTHREAD" ;;
24798 if test $HAVE_MBRTOWC = 0 ||
test $REPLACE_MBRTOWC = 1; then
24807 gl_LIBOBJS
="$gl_LIBOBJS mbrtowc.$ac_objext"
24809 if test $REPLACE_MBSTATE_T = 1; then
24818 gl_LIBOBJS
="$gl_LIBOBJS lc-charset-dispatch.$ac_objext"
24828 gl_LIBOBJS
="$gl_LIBOBJS mbtowc-lock.$ac_objext"
24835 if test -n "$GCC"; then
24836 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
24837 $as_echo_n "checking whether the -Werror option is usable... " >&6; }
24838 if ${gl_cv_cc_vis_werror+:} false
; then :
24839 $as_echo_n "(cached) " >&6
24841 gl_save_CFLAGS
="$CFLAGS"
24842 CFLAGS
="$CFLAGS -Werror"
24843 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
24844 /* end confdefs.h. */
24854 if ac_fn_c_try_compile
"$LINENO"; then :
24855 gl_cv_cc_vis_werror
=yes
24857 gl_cv_cc_vis_werror
=no
24859 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
24860 CFLAGS
="$gl_save_CFLAGS"
24863 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
24864 $as_echo "$gl_cv_cc_vis_werror" >&6; }
24865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
24866 $as_echo_n "checking for simple visibility declarations... " >&6; }
24867 if ${gl_cv_cc_visibility+:} false
; then :
24868 $as_echo_n "(cached) " >&6
24870 gl_save_CFLAGS
="$CFLAGS"
24871 CFLAGS
="$CFLAGS -fvisibility=hidden"
24872 if test $gl_cv_cc_vis_werror = yes; then
24873 CFLAGS
="$CFLAGS -Werror"
24875 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
24876 /* end confdefs.h. */
24877 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
24878 extern __attribute__((__visibility__("default"))) int exportedvar;
24879 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
24880 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
24881 void dummyfunc (void) {}
24891 if ac_fn_c_try_compile
"$LINENO"; then :
24892 gl_cv_cc_visibility
=yes
24894 gl_cv_cc_visibility
=no
24896 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
24897 CFLAGS
="$gl_save_CFLAGS"
24900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
24901 $as_echo "$gl_cv_cc_visibility" >&6; }
24902 if test $gl_cv_cc_visibility = yes; then
24903 CFLAG_VISIBILITY
="-fvisibility=hidden"
24910 cat >>confdefs.h
<<_ACEOF
24911 #define HAVE_VISIBILITY $HAVE_VISIBILITY
24933 $as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h
24949 if case "$host_os" in
24951 *) test $ac_cv_func_mbsinit = yes ;;
24953 && test $ac_cv_func_mbrtowc = yes; then
24958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
24959 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
24960 if ${gl_cv_func_mbrtowc_incomplete_state+:} false
; then :
24961 $as_echo_n "(cached) " >&6
24965 # Guess no on AIX and OSF/1.
24966 aix
* | osf
*) gl_cv_func_mbrtowc_incomplete_state
="guessing no" ;;
24967 # Guess yes otherwise.
24968 *) gl_cv_func_mbrtowc_incomplete_state
="guessing yes" ;;
24970 if test $LOCALE_JA != none
; then
24971 if test "$cross_compiling" = yes; then :
24974 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
24975 /* end confdefs.h. */
24977 #include <locale.h>
24978 #include <string.h>
24982 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
24984 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
24988 memset (&state, '\0', sizeof (mbstate_t));
24989 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
24990 if (mbsinit (&state))
24996 if ac_fn_c_try_run
"$LINENO"; then :
24997 gl_cv_func_mbrtowc_incomplete_state
=yes
24999 gl_cv_func_mbrtowc_incomplete_state
=no
25001 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
25002 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
25006 if test $LOCALE_FR_UTF8 != none
; then
25007 if test "$cross_compiling" = yes; then :
25010 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
25011 /* end confdefs.h. */
25013 #include <locale.h>
25014 #include <string.h>
25018 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25020 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
25024 memset (&state, '\0', sizeof (mbstate_t));
25025 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25026 if (mbsinit (&state))
25032 if ac_fn_c_try_run
"$LINENO"; then :
25033 gl_cv_func_mbrtowc_incomplete_state
=yes
25035 gl_cv_func_mbrtowc_incomplete_state
=no
25037 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
25038 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
25045 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
25046 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
25051 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
25052 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
25053 if ${gl_cv_func_mbrtowc_sanitycheck+:} false
; then :
25054 $as_echo_n "(cached) " >&6
25058 # Guess no on Solaris 8.
25059 solaris2.8
) gl_cv_func_mbrtowc_sanitycheck
="guessing no" ;;
25060 # Guess yes otherwise.
25061 *) gl_cv_func_mbrtowc_sanitycheck
="guessing yes" ;;
25063 if test $LOCALE_ZH_CN != none
; then
25064 if test "$cross_compiling" = yes; then :
25067 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
25068 /* end confdefs.h. */
25070 #include <locale.h>
25071 #include <stdlib.h>
25072 #include <string.h>
25076 /* This fails on Solaris 8:
25077 mbrtowc returns 2, and sets wc to 0x00F0.
25078 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
25079 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25081 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
25085 memset (&state, '\0', sizeof (mbstate_t));
25086 if (mbrtowc (&wc, input + 3, 6, &state) != 4
25087 && mbtowc (&wc, input + 3, 6) == 4)
25093 if ac_fn_c_try_run
"$LINENO"; then :
25094 gl_cv_func_mbrtowc_sanitycheck
=yes
25096 gl_cv_func_mbrtowc_sanitycheck
=no
25098 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
25099 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
25105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
25106 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
25108 REPLACE_MBSTATE_T
=0
25109 case "$gl_cv_func_mbrtowc_incomplete_state" in
25111 *) REPLACE_MBSTATE_T
=1 ;;
25113 case "$gl_cv_func_mbrtowc_sanitycheck" in
25115 *) REPLACE_MBSTATE_T
=1 ;;
25118 REPLACE_MBSTATE_T
=1
25123 if test $ac_cv_func_mbsinit = no
; then
25125 ac_fn_c_check_decl
"$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" "
25129 if test "x$ac_cv_have_decl_mbsinit" = xyes
; then :
25135 cat >>confdefs.h
<<_ACEOF
25136 #define HAVE_DECL_MBSINIT $ac_have_decl
25139 if test $ac_cv_have_decl_mbsinit = yes; then
25143 if test $REPLACE_MBSTATE_T = 1; then
25147 mingw
*) REPLACE_MBSINIT
=1 ;;
25152 if test $HAVE_MBSINIT = 0 ||
test $REPLACE_MBSINIT = 1; then
25161 gl_LIBOBJS
="$gl_LIBOBJS mbsinit.$ac_objext"
25178 $as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h
25193 if case "$host_os" in
25195 *) test $ac_cv_func_mbsinit = yes ;;
25197 && test $ac_cv_func_mbrtowc = yes; then
25202 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5
25203 $as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; }
25204 if ${gl_cv_func_mbrtowc_incomplete_state+:} false
; then :
25205 $as_echo_n "(cached) " >&6
25209 # Guess no on AIX and OSF/1.
25210 aix
* | osf
*) gl_cv_func_mbrtowc_incomplete_state
="guessing no" ;;
25211 # Guess yes otherwise.
25212 *) gl_cv_func_mbrtowc_incomplete_state
="guessing yes" ;;
25214 if test $LOCALE_JA != none
; then
25215 if test "$cross_compiling" = yes; then :
25218 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
25219 /* end confdefs.h. */
25221 #include <locale.h>
25222 #include <string.h>
25226 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25228 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */
25232 memset (&state, '\0', sizeof (mbstate_t));
25233 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25234 if (mbsinit (&state))
25240 if ac_fn_c_try_run
"$LINENO"; then :
25241 gl_cv_func_mbrtowc_incomplete_state
=yes
25243 gl_cv_func_mbrtowc_incomplete_state
=no
25245 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
25246 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
25250 if test $LOCALE_FR_UTF8 != none
; then
25251 if test "$cross_compiling" = yes; then :
25254 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
25255 /* end confdefs.h. */
25257 #include <locale.h>
25258 #include <string.h>
25262 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25264 const char input[] = "B\303\274\303\237er"; /* "Büßer" */
25268 memset (&state, '\0', sizeof (mbstate_t));
25269 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2))
25270 if (mbsinit (&state))
25276 if ac_fn_c_try_run
"$LINENO"; then :
25277 gl_cv_func_mbrtowc_incomplete_state
=yes
25279 gl_cv_func_mbrtowc_incomplete_state
=no
25281 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
25282 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
25289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5
25290 $as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; }
25295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5
25296 $as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; }
25297 if ${gl_cv_func_mbrtowc_sanitycheck+:} false
; then :
25298 $as_echo_n "(cached) " >&6
25302 # Guess no on Solaris 8.
25303 solaris2.8
) gl_cv_func_mbrtowc_sanitycheck
="guessing no" ;;
25304 # Guess yes otherwise.
25305 *) gl_cv_func_mbrtowc_sanitycheck
="guessing yes" ;;
25307 if test $LOCALE_ZH_CN != none
; then
25308 if test "$cross_compiling" = yes; then :
25311 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
25312 /* end confdefs.h. */
25314 #include <locale.h>
25315 #include <stdlib.h>
25316 #include <string.h>
25320 /* This fails on Solaris 8:
25321 mbrtowc returns 2, and sets wc to 0x00F0.
25322 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */
25323 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25325 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */
25329 memset (&state, '\0', sizeof (mbstate_t));
25330 if (mbrtowc (&wc, input + 3, 6, &state) != 4
25331 && mbtowc (&wc, input + 3, 6) == 4)
25337 if ac_fn_c_try_run
"$LINENO"; then :
25338 gl_cv_func_mbrtowc_sanitycheck
=yes
25340 gl_cv_func_mbrtowc_sanitycheck
=no
25342 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
25343 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
25349 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5
25350 $as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; }
25352 REPLACE_MBSTATE_T
=0
25353 case "$gl_cv_func_mbrtowc_incomplete_state" in
25355 *) REPLACE_MBSTATE_T
=1 ;;
25357 case "$gl_cv_func_mbrtowc_sanitycheck" in
25359 *) REPLACE_MBSTATE_T
=1 ;;
25362 REPLACE_MBSTATE_T
=1
25367 if test $ac_cv_func_mbsrtowcs = no
; then
25369 ac_fn_c_check_decl
"$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" "
25373 if test "x$ac_cv_have_decl_mbsrtowcs" = xyes
; then :
25379 cat >>confdefs.h
<<_ACEOF
25380 #define HAVE_DECL_MBSRTOWCS $ac_have_decl
25383 if test $ac_cv_have_decl_mbsrtowcs = yes; then
25384 REPLACE_MBSRTOWCS
=1
25387 if test $REPLACE_MBSTATE_T = 1; then
25388 REPLACE_MBSRTOWCS
=1
25396 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5
25397 $as_echo_n "checking whether mbsrtowcs works... " >&6; }
25398 if ${gl_cv_func_mbsrtowcs_works+:} false
; then :
25399 $as_echo_n "(cached) " >&6
25403 # Guess no on HP-UX, Solaris, mingw.
25404 hpux
* | solaris
* | mingw
*) gl_cv_func_mbsrtowcs_works
="guessing no" ;;
25405 # Guess yes otherwise.
25406 *) gl_cv_func_mbsrtowcs_works
="guessing yes" ;;
25408 if test $LOCALE_FR != none ||
test $LOCALE_FR_UTF8 != none ||
test $LOCALE_JA != none ||
test $LOCALE_ZH_CN != none
; then
25409 if test "$cross_compiling" = yes; then :
25412 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
25413 /* end confdefs.h. */
25415 #include <locale.h>
25416 #include <string.h>
25421 /* Test whether the function supports a NULL destination argument.
25422 This fails on native Windows. */
25423 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL)
25425 const char input[] = "\337er";
25426 const char *src = input;
25429 memset (&state, '\0', sizeof (mbstate_t));
25430 if (mbsrtowcs (NULL, &src, 1, &state) != 3
25434 /* Test whether the function works when started with a conversion state
25435 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */
25436 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL)
25438 const char input[] = "B\303\274\303\237er";
25441 memset (&state, '\0', sizeof (mbstate_t));
25442 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
25443 if (!mbsinit (&state))
25445 const char *src = input + 2;
25446 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
25450 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL)
25452 const char input[] = "<\306\374\313\334\270\354>";
25455 memset (&state, '\0', sizeof (mbstate_t));
25456 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2))
25457 if (!mbsinit (&state))
25459 const char *src = input + 4;
25460 if (mbsrtowcs (NULL, &src, 10, &state) != 3)
25464 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL)
25466 const char input[] = "B\250\271\201\060\211\070er";
25469 memset (&state, '\0', sizeof (mbstate_t));
25470 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2))
25471 if (!mbsinit (&state))
25473 const char *src = input + 2;
25474 if (mbsrtowcs (NULL, &src, 10, &state) != 4)
25481 if ac_fn_c_try_run
"$LINENO"; then :
25482 gl_cv_func_mbsrtowcs_works
=yes
25484 gl_cv_func_mbsrtowcs_works
=no
25486 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
25487 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
25493 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5
25494 $as_echo "$gl_cv_func_mbsrtowcs_works" >&6; }
25496 case "$gl_cv_func_mbsrtowcs_works" in
25498 *) REPLACE_MBSRTOWCS
=1 ;;
25503 if test $HAVE_MBSRTOWCS = 0 ||
test $REPLACE_MBSRTOWCS = 1; then
25512 gl_LIBOBJS
="$gl_LIBOBJS mbsrtowcs.$ac_objext"
25522 gl_LIBOBJS
="$gl_LIBOBJS mbsrtowcs-state.$ac_objext"
25539 $as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h
25546 for ac_func
in mbtowc
25548 ac_fn_c_check_func
"$LINENO" "mbtowc" "ac_cv_func_mbtowc"
25549 if test "x$ac_cv_func_mbtowc" = xyes
; then :
25550 cat >>confdefs.h
<<_ACEOF
25551 #define HAVE_MBTOWC 1
25557 if test $ac_cv_func_mbtowc = no
; then
25565 if test $HAVE_MBTOWC = 0 ||
test $REPLACE_MBTOWC = 1; then
25574 gl_LIBOBJS
="$gl_LIBOBJS mbtowc.$ac_objext"
25591 $as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h
25596 if test $REPLACE_MEMCHR = 1; then
25605 gl_LIBOBJS
="$gl_LIBOBJS memchr.$ac_objext"
25608 for ac_header
in bp-sym.h
25610 ac_fn_c_check_header_mongrel
"$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default"
25611 if test "x$ac_cv_header_bp_sym_h" = xyes
; then :
25612 cat >>confdefs.h
<<_ACEOF
25613 #define HAVE_BP_SYM_H 1
25633 $as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h
25639 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then
25640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5
25641 $as_echo_n "checking whether memmem works in linear time... " >&6; }
25642 if ${gl_cv_func_memmem_works_fast+:} false
; then :
25643 $as_echo_n "(cached) " >&6
25645 if test "$cross_compiling" = yes; then :
25646 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
25647 /* end confdefs.h. */
25649 #include <features.h>
25650 #ifdef __GNU_LIBRARY__
25651 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \
25652 && !defined __UCLIBC__
25657 #include <cygwin/version.h>
25658 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0)
25664 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25665 $EGREP "Lucky user" >/dev
/null
2>&1; then :
25666 gl_cv_func_memmem_works_fast
="guessing yes"
25668 gl_cv_func_memmem_works_fast
="$gl_cross_guess_normal"
25674 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
25675 /* end confdefs.h. */
25677 #include <signal.h> /* for signal */
25678 #include <string.h> /* for memmem */
25679 #include <stdlib.h> /* for malloc */
25680 #include <unistd.h> /* for alarm */
25681 static void quit (int sig) { _exit (sig + 128); }
25688 size_t m = 1000000;
25689 char *haystack = (char *) malloc (2 * m + 1);
25690 char *needle = (char *) malloc (m + 1);
25691 /* Failure to compile this test due to missing alarm is okay,
25692 since all such platforms (mingw) also lack memmem. */
25693 signal (SIGALRM, quit);
25695 /* Check for quadratic performance. */
25696 if (haystack && needle)
25698 memset (haystack, 'A', 2 * m);
25699 haystack[2 * m] = 'B';
25700 memset (needle, 'A', m);
25702 if (!memmem (haystack, 2 * m + 1, needle, m + 1))
25705 /* Free allocated memory, in case some sanitizer is watching. */
25714 if ac_fn_c_try_run
"$LINENO"; then :
25715 gl_cv_func_memmem_works_fast
=yes
25717 gl_cv_func_memmem_works_fast
=no
25719 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
25720 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
25725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5
25726 $as_echo "$gl_cv_func_memmem_works_fast" >&6; }
25727 case "$gl_cv_func_memmem_works_fast" in
25735 if test $HAVE_MEMMEM = 0 ||
test $REPLACE_MEMMEM = 1; then
25744 gl_LIBOBJS
="$gl_LIBOBJS memmem.$ac_objext"
25751 for ac_func
in memmem
25753 ac_fn_c_check_func
"$LINENO" "memmem" "ac_cv_func_memmem"
25754 if test "x$ac_cv_func_memmem" = xyes
; then :
25755 cat >>confdefs.h
<<_ACEOF
25756 #define HAVE_MEMMEM 1
25762 if test $ac_cv_func_memmem = yes; then
25768 if test $ac_cv_have_decl_memmem = no
; then
25771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5
25772 $as_echo_n "checking whether memmem works... " >&6; }
25773 if ${gl_cv_func_memmem_works_always+:} false
; then :
25774 $as_echo_n "(cached) " >&6
25776 if test "$cross_compiling" = yes; then :
25777 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
25778 /* end confdefs.h. */
25780 #ifdef __GNU_LIBRARY__
25781 #include <features.h>
25782 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \
25783 || __GLIBC_MINOR__ > 12)) \
25784 || (__GLIBC__ > 2)) \
25785 || defined __UCLIBC__
25788 #elif defined __CYGWIN__
25789 #include <cygwin/version.h>
25790 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
25798 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
25799 $EGREP "Lucky user" >/dev
/null
2>&1; then :
25800 gl_cv_func_memmem_works_always
="guessing yes"
25802 gl_cv_func_memmem_works_always
="$gl_cross_guess_normal"
25808 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
25809 /* end confdefs.h. */
25811 #include <string.h> /* for memmem */
25812 #define P "_EF_BF_BD"
25813 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
25814 #define NEEDLE P P P P P
25821 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE)))
25823 /* Check for empty needle behavior. */
25825 const char *haystack = "AAA";
25826 if (memmem (haystack, 3, (const char *) 1, 0) != haystack)
25835 if ac_fn_c_try_run
"$LINENO"; then :
25836 gl_cv_func_memmem_works_always
=yes
25838 gl_cv_func_memmem_works_always
=no
25840 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
25841 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
25846 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5
25847 $as_echo "$gl_cv_func_memmem_works_always" >&6; }
25848 case "$gl_cv_func_memmem_works_always" in
25857 if test $HAVE_MEMMEM = 0 ||
test $REPLACE_MEMMEM = 1; then
25866 gl_LIBOBJS
="$gl_LIBOBJS memmem.$ac_objext"
25880 $as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h
25890 for ac_func
in mempcpy
25892 ac_fn_c_check_func
"$LINENO" "mempcpy" "ac_cv_func_mempcpy"
25893 if test "x$ac_cv_func_mempcpy" = xyes
; then :
25894 cat >>confdefs.h
<<_ACEOF
25895 #define HAVE_MEMPCPY 1
25901 if test $ac_cv_func_mempcpy = no
; then
25905 if test $HAVE_MEMPCPY = 0; then
25914 gl_LIBOBJS
="$gl_LIBOBJS mempcpy.$ac_objext"
25931 $as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h
25940 if test $ac_cv_have_decl_memrchr = no
; then
25941 HAVE_DECL_MEMRCHR
=0
25944 for ac_func
in memrchr
25946 ac_fn_c_check_func
"$LINENO" "memrchr" "ac_cv_func_memrchr"
25947 if test "x$ac_cv_func_memrchr" = xyes
; then :
25948 cat >>confdefs.h
<<_ACEOF
25949 #define HAVE_MEMRCHR 1
25956 if test $ac_cv_func_memrchr = no
; then
25965 gl_LIBOBJS
="$gl_LIBOBJS memrchr.$ac_objext"
25980 $as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h
25989 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5
25990 $as_echo_n "checking whether mkdir handles trailing slash... " >&6; }
25991 if ${gl_cv_func_mkdir_trailing_slash_works+:} false
; then :
25992 $as_echo_n "(cached) " >&6
25994 rm -rf conftest.dir
25995 if test "$cross_compiling" = yes; then :
25997 # Guess yes on Linux systems.
25998 linux-
* | linux
) gl_cv_func_mkdir_trailing_slash_works
="guessing yes" ;;
25999 # Guess yes on glibc systems.
26000 *-gnu* | gnu
*) gl_cv_func_mkdir_trailing_slash_works
="guessing yes" ;;
26001 # Guess yes on MSVC, no on mingw.
26002 mingw
*) cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
26003 /* end confdefs.h. */
26010 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26011 $EGREP "Known" >/dev
/null
2>&1; then :
26012 gl_cv_func_mkdir_trailing_slash_works
="guessing yes"
26014 gl_cv_func_mkdir_trailing_slash_works
="guessing no"
26019 # If we don't know, obey --enable-cross-guesses.
26020 *) gl_cv_func_mkdir_trailing_slash_works
="$gl_cross_guess_normal" ;;
26024 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
26025 /* end confdefs.h. */
26027 #include <sys/types.h>
26028 #include <sys/stat.h>
26036 return mkdir ("conftest.dir/", 0700);
26041 if ac_fn_c_try_run
"$LINENO"; then :
26042 gl_cv_func_mkdir_trailing_slash_works
=yes
26044 gl_cv_func_mkdir_trailing_slash_works
=no
26046 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
26047 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
26050 rm -rf conftest.dir
26053 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5
26054 $as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; }
26055 case "$gl_cv_func_mkdir_trailing_slash_works" in
26062 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5
26063 $as_echo_n "checking whether mkdir handles trailing dot... " >&6; }
26064 if ${gl_cv_func_mkdir_trailing_dot_works+:} false
; then :
26065 $as_echo_n "(cached) " >&6
26067 rm -rf conftest.dir
26068 if test "$cross_compiling" = yes; then :
26070 # Guess yes on glibc systems.
26071 *-gnu* | gnu
*) gl_cv_func_mkdir_trailing_dot_works
="guessing yes" ;;
26072 # Guess yes on musl systems.
26073 *-musl*) gl_cv_func_mkdir_trailing_dot_works
="guessing yes" ;;
26074 # Guess no on native Windows.
26075 mingw
*) gl_cv_func_mkdir_trailing_dot_works
="guessing no" ;;
26076 # If we don't know, obey --enable-cross-guesses.
26077 *) gl_cv_func_mkdir_trailing_dot_works
="$gl_cross_guess_normal" ;;
26081 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
26082 /* end confdefs.h. */
26084 #include <sys/types.h>
26085 #include <sys/stat.h>
26093 return !mkdir ("conftest.dir/./", 0700);
26098 if ac_fn_c_try_run
"$LINENO"; then :
26099 gl_cv_func_mkdir_trailing_dot_works
=yes
26101 gl_cv_func_mkdir_trailing_dot_works
=no
26103 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
26104 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
26107 rm -rf conftest.dir
26111 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5
26112 $as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; }
26113 case "$gl_cv_func_mkdir_trailing_dot_works" in
26118 $as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h
26123 if test $REPLACE_MKDIR = 1; then
26132 gl_LIBOBJS
="$gl_LIBOBJS mkdir.$ac_objext"
26146 $as_echo "#define GNULIB_TEST_MKDIR 1" >>confdefs.h
26152 for ac_func
in mkdtemp
26154 ac_fn_c_check_func
"$LINENO" "mkdtemp" "ac_cv_func_mkdtemp"
26155 if test "x$ac_cv_func_mkdtemp" = xyes
; then :
26156 cat >>confdefs.h
<<_ACEOF
26157 #define HAVE_MKDTEMP 1
26163 if test $ac_cv_func_mkdtemp = no
; then
26167 if test $HAVE_MKDTEMP = 0; then
26176 gl_LIBOBJS
="$gl_LIBOBJS mkdtemp.$ac_objext"
26192 $as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h
26202 if test $ac_cv_func_mkostemp != yes; then
26206 if test $HAVE_MKOSTEMP = 0; then
26215 gl_LIBOBJS
="$gl_LIBOBJS mkostemp.$ac_objext"
26222 cat >>confdefs.h
<<_ACEOF
26223 #define GNULIB_MKOSTEMP 1
26238 $as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h
26243 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26252 gl_LIBOBJS
="$gl_LIBOBJS msvc-inval.$ac_objext"
26256 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then
26265 gl_LIBOBJS
="$gl_LIBOBJS msvc-nothrow.$ac_objext"
26270 cat >>confdefs.h
<<_ACEOF
26271 #define GNULIB_MSVC_NOTHROW 1
26287 if test $gl_cv_have_include_next = yes; then
26288 gl_cv_next_netdb_h
='<'netdb.h
'>'
26290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netdb.h>" >&5
26291 $as_echo_n "checking absolute name of <netdb.h>... " >&6; }
26292 if ${gl_cv_next_netdb_h+:} false
; then :
26293 $as_echo_n "(cached) " >&6
26296 if test $ac_cv_header_netdb_h = yes; then
26301 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
26302 /* end confdefs.h. */
26306 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
26307 *) gl_absname_cpp
="$ac_cpp" ;;
26312 gl_dirsep_regex
='[/\\]'
26315 gl_dirsep_regex
='\/'
26318 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
26319 gl_header_literal_regex
=`echo 'netdb.h' \
26320 | sed -e "$gl_make_literal_regex_sed"`
26321 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26322 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26328 gl_cv_absolute_netdb_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26329 sed -n "$gl_absolute_header_sed"`
26331 gl_header
=$gl_cv_absolute_netdb_h
26332 gl_cv_next_netdb_h
='"'$gl_header'"'
26334 gl_cv_next_netdb_h
='<'netdb.h
'>'
26339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netdb_h" >&5
26340 $as_echo "$gl_cv_next_netdb_h" >&6; }
26342 NEXT_NETDB_H
=$gl_cv_next_netdb_h
26344 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
26345 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26346 gl_next_as_first_directive
='<'netdb.h
'>'
26348 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26349 gl_next_as_first_directive
=$gl_cv_next_netdb_h
26351 NEXT_AS_FIRST_DIRECTIVE_NETDB_H
=$gl_next_as_first_directive
26356 if test $ac_cv_header_netdb_h = yes; then
26368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5
26369 $as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; }
26370 if ${gl_cv_header_netinet_in_h_selfcontained+:} false
; then :
26371 $as_echo_n "(cached) " >&6
26374 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
26375 /* end confdefs.h. */
26376 #include <netinet/in.h>
26385 if ac_fn_c_try_compile
"$LINENO"; then :
26386 gl_cv_header_netinet_in_h_selfcontained
=yes
26388 gl_cv_header_netinet_in_h_selfcontained
=no
26390 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
26393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5
26394 $as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; }
26395 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then
26398 NETINET_IN_H
='netinet/in.h'
26399 for ac_header
in netinet
/in.h
26401 ac_fn_c_check_header_mongrel
"$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default"
26402 if test "x$ac_cv_header_netinet_in_h" = xyes
; then :
26403 cat >>confdefs.h
<<_ACEOF
26404 #define HAVE_NETINET_IN_H 1
26420 if test $gl_cv_have_include_next = yes; then
26421 gl_cv_next_netinet_in_h
='<'netinet
/in.h
'>'
26423 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5
26424 $as_echo_n "checking absolute name of <netinet/in.h>... " >&6; }
26425 if ${gl_cv_next_netinet_in_h+:} false
; then :
26426 $as_echo_n "(cached) " >&6
26429 if test $ac_cv_header_netinet_in_h = yes; then
26434 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
26435 /* end confdefs.h. */
26436 #include <netinet/in.h>
26439 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
26440 *) gl_absname_cpp
="$ac_cpp" ;;
26445 gl_dirsep_regex
='[/\\]'
26448 gl_dirsep_regex
='\/'
26451 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
26452 gl_header_literal_regex
=`echo 'netinet/in.h' \
26453 | sed -e "$gl_make_literal_regex_sed"`
26454 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
26455 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
26461 gl_cv_absolute_netinet_in_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
26462 sed -n "$gl_absolute_header_sed"`
26464 gl_header
=$gl_cv_absolute_netinet_in_h
26465 gl_cv_next_netinet_in_h
='"'$gl_header'"'
26467 gl_cv_next_netinet_in_h
='<'netinet
/in.h
'>'
26472 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5
26473 $as_echo "$gl_cv_next_netinet_in_h" >&6; }
26475 NEXT_NETINET_IN_H
=$gl_cv_next_netinet_in_h
26477 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
26478 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
26479 gl_next_as_first_directive
='<'netinet
/in.h
'>'
26481 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
26482 gl_next_as_first_directive
=$gl_cv_next_netinet_in_h
26484 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H
=$gl_next_as_first_directive
26489 if test $ac_cv_header_netinet_in_h = yes; then
26490 HAVE_NETINET_IN_H
=1
26492 HAVE_NETINET_IN_H
=0
26497 if test -n "$NETINET_IN_H"; then
26498 GL_GENERATE_NETINET_IN_H_TRUE
=
26499 GL_GENERATE_NETINET_IN_H_FALSE
='#'
26501 GL_GENERATE_NETINET_IN_H_TRUE
='#'
26502 GL_GENERATE_NETINET_IN_H_FALSE
=
26516 if test "$gl_cv_macro_O_CLOEXEC" != yes; then
26521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5
26522 $as_echo_n "checking whether open recognizes a trailing slash... " >&6; }
26523 if ${gl_cv_func_open_slash+:} false
; then :
26524 $as_echo_n "(cached) " >&6
26526 # Assume that if we have lstat, we can also check symlinks.
26527 if test $ac_cv_func_lstat = yes; then
26529 ln -s conftest.tmp conftest.lnk
26531 if test "$cross_compiling" = yes; then :
26534 freebsd
* | aix
* | hpux
* | solaris2.
[0-9] | solaris2.
[0-9].
*)
26535 gl_cv_func_open_slash
="guessing no" ;;
26537 gl_cv_func_open_slash
="guessing yes" ;;
26541 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
26542 /* end confdefs.h. */
26546 # include <unistd.h>
26556 if (open ("conftest.lnk/", O_RDONLY) != -1)
26559 if (open ("conftest.sl/", O_CREAT, 0600) >= 0)
26564 if ac_fn_c_try_run
"$LINENO"; then :
26565 gl_cv_func_open_slash
=yes
26567 gl_cv_func_open_slash
=no
26569 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
26570 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
26573 rm -f conftest.sl conftest.tmp conftest.lnk
26576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5
26577 $as_echo "$gl_cv_func_open_slash" >&6; }
26578 case "$gl_cv_func_open_slash" in
26581 $as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h
26586 case "$gl_cv_func_open_slash" in
26594 if test $REPLACE_OPEN = 0; then
26598 if test $ac_cv_func_fchdir = no
; then
26602 if test $HAVE_FCHDIR = 0; then
26609 if test $REPLACE_OPEN = 1; then
26618 gl_LIBOBJS
="$gl_LIBOBJS open.$ac_objext"
26636 $as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h
26646 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in
26650 # Solaris 10 lacks O_CLOEXEC.
26651 # Solaris 9 has *at functions, but uniformly mishandles trailing
26652 # slash in all of them.
26660 if test $HAVE_OPENAT = 0 ||
test $REPLACE_OPENAT = 1; then
26669 gl_LIBOBJS
="$gl_LIBOBJS openat.$ac_objext"
26678 cat >>confdefs.h
<<_ACEOF
26679 #define GNULIB_OPENAT 1
26693 $as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h
26700 for ac_func
in opendir
26702 ac_fn_c_check_func
"$LINENO" "opendir" "ac_cv_func_opendir"
26703 if test "x$ac_cv_func_opendir" = xyes
; then :
26704 cat >>confdefs.h
<<_ACEOF
26705 #define HAVE_OPENDIR 1
26711 if test $ac_cv_func_opendir = no
; then
26718 if test $ac_cv_func_fchdir = no
; then
26722 if test $HAVE_FCHDIR = 0; then
26723 if test $HAVE_OPENDIR = 1; then
26728 case $host_os,$HAVE_OPENDIR in
26730 REPLACE_OPENDIR
=1;;
26733 if test $HAVE_OPENDIR = 0 ||
test $REPLACE_OPENDIR = 1; then
26742 gl_LIBOBJS
="$gl_LIBOBJS opendir.$ac_objext"
26756 $as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h
26767 if test $ac_cv_func_pipe != yes; then
26771 if test $HAVE_PIPE = 0; then
26780 gl_LIBOBJS
="$gl_LIBOBJS pipe.$ac_objext"
26794 $as_echo "#define GNULIB_TEST_PIPE 1" >>confdefs.h
26802 for ac_func
in rawmemchr
26804 ac_fn_c_check_func
"$LINENO" "rawmemchr" "ac_cv_func_rawmemchr"
26805 if test "x$ac_cv_func_rawmemchr" = xyes
; then :
26806 cat >>confdefs.h
<<_ACEOF
26807 #define HAVE_RAWMEMCHR 1
26813 if test $ac_cv_func_rawmemchr = no
; then
26817 if test $HAVE_RAWMEMCHR = 0; then
26826 gl_LIBOBJS
="$gl_LIBOBJS rawmemchr.$ac_objext"
26841 $as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h
26848 for ac_func
in readdir
26850 ac_fn_c_check_func
"$LINENO" "readdir" "ac_cv_func_readdir"
26851 if test "x$ac_cv_func_readdir" = xyes
; then :
26852 cat >>confdefs.h
<<_ACEOF
26853 #define HAVE_READDIR 1
26859 if test $ac_cv_func_readdir = no
; then
26863 if test $HAVE_READDIR = 0; then
26872 gl_LIBOBJS
="$gl_LIBOBJS readdir.$ac_objext"
26886 $as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h
26893 if test $ac_cv_func_readlink = no
; then
26896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5
26897 $as_echo_n "checking whether readlink signature is correct... " >&6; }
26898 if ${gl_cv_decl_readlink_works+:} false
; then :
26899 $as_echo_n "(cached) " >&6
26901 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
26902 /* end confdefs.h. */
26903 #include <unistd.h>
26904 /* Cause compilation failure if original declaration has wrong type. */
26905 ssize_t readlink (const char *, char *, size_t);
26914 if ac_fn_c_try_compile
"$LINENO"; then :
26915 gl_cv_decl_readlink_works
=yes
26917 gl_cv_decl_readlink_works
=no
26919 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
26921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5
26922 $as_echo "$gl_cv_decl_readlink_works" >&6; }
26923 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5
26924 $as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; }
26925 if ${gl_cv_func_readlink_trailing_slash+:} false
; then :
26926 $as_echo_n "(cached) " >&6
26928 # We have readlink, so assume ln -s works.
26929 ln -s conftest.no-such conftest.link
26930 ln -s conftest.link conftest.lnk2
26931 if test "$cross_compiling" = yes; then :
26933 # Guess yes on Linux or glibc systems.
26934 linux-
* | linux |
*-gnu* | gnu
*)
26935 gl_cv_func_readlink_trailing_slash
="guessing yes" ;;
26936 # Guess no on AIX or HP-UX.
26938 gl_cv_func_readlink_trailing_slash
="guessing no" ;;
26939 # If we don't know, obey --enable-cross-guesses.
26941 gl_cv_func_readlink_trailing_slash
="$gl_cross_guess_normal" ;;
26945 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
26946 /* end confdefs.h. */
26947 #include <unistd.h>
26953 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1;
26958 if ac_fn_c_try_run
"$LINENO"; then :
26959 gl_cv_func_readlink_trailing_slash
=yes
26961 gl_cv_func_readlink_trailing_slash
=no
26963 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
26964 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
26967 rm -f conftest.link conftest.lnk2
26969 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_trailing_slash" >&5
26970 $as_echo "$gl_cv_func_readlink_trailing_slash" >&6; }
26971 case "$gl_cv_func_readlink_trailing_slash" in
26973 if test "$gl_cv_decl_readlink_works" != yes; then
26979 $as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h
26985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink truncates results correctly" >&5
26986 $as_echo_n "checking whether readlink truncates results correctly... " >&6; }
26987 if ${gl_cv_func_readlink_truncate+:} false
; then :
26988 $as_echo_n "(cached) " >&6
26990 # We have readlink, so assume ln -s works.
26991 ln -s ab conftest.link
26992 if test "$cross_compiling" = yes; then :
26994 # Guess yes on Linux or glibc systems.
26995 linux-
* | linux |
*-gnu* | gnu
*)
26996 gl_cv_func_readlink_truncate
="guessing yes" ;;
26997 # Guess no on AIX or HP-UX.
26999 gl_cv_func_readlink_truncate
="guessing no" ;;
27000 # If we don't know, obey --enable-cross-guesses.
27002 gl_cv_func_readlink_truncate
="$gl_cross_guess_normal" ;;
27006 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
27007 /* end confdefs.h. */
27008 #include <unistd.h>
27014 return readlink ("conftest.link", &c, 1) != 1;
27019 if ac_fn_c_try_run
"$LINENO"; then :
27020 gl_cv_func_readlink_truncate
=yes
27022 gl_cv_func_readlink_truncate
=no
27024 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
27025 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
27028 rm -f conftest.link conftest.lnk2
27030 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_truncate" >&5
27031 $as_echo "$gl_cv_func_readlink_truncate" >&6; }
27032 case $gl_cv_func_readlink_truncate in
27034 if test "$gl_cv_decl_readlink_works" != yes; then
27040 $as_echo "#define READLINK_TRUNCATE_BUG 1" >>confdefs.h
27047 if test $HAVE_READLINK = 0 ||
test $REPLACE_READLINK = 1; then
27056 gl_LIBOBJS
="$gl_LIBOBJS readlink.$ac_objext"
27073 $as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h
27080 if test $gl_cv_func_malloc_posix = yes; then
27082 $as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h
27088 if test $REPLACE_REALLOC = 1; then
27097 gl_LIBOBJS
="$gl_LIBOBJS realloc.$ac_objext"
27105 GNULIB_REALLOC_POSIX
=1
27111 $as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h
27120 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5
27121 $as_echo_n "checking whether rename honors trailing slash on destination... " >&6; }
27122 if ${gl_cv_func_rename_slash_dst_works+:} false
; then :
27123 $as_echo_n "(cached) " >&6
27125 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
27126 touch conftest.f
&& touch conftest.f1
&& mkdir conftest.d1 ||
27127 as_fn_error $?
"cannot create temporary files" "$LINENO" 5
27128 # Assume that if we have lstat, we can also check symlinks.
27129 if test $ac_cv_func_lstat = yes; then
27130 ln -s conftest.f conftest.lnk
27132 if test "$cross_compiling" = yes; then :
27134 # Guess yes on Linux systems.
27135 linux-
* | linux
) gl_cv_func_rename_slash_dst_works
="guessing yes" ;;
27136 # Guess yes on glibc systems.
27137 *-gnu*) gl_cv_func_rename_slash_dst_works
="guessing yes" ;;
27138 # Guess no on native Windows.
27139 mingw
*) gl_cv_func_rename_slash_dst_works
="guessing no" ;;
27140 # If we don't know, obey --enable-cross-guesses.
27141 *) gl_cv_func_rename_slash_dst_works
="$gl_cross_guess_normal" ;;
27145 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
27146 /* end confdefs.h. */
27148 # include <stdio.h>
27149 # include <stdlib.h>
27155 if (rename ("conftest.f1", "conftest.f2/") == 0)
27157 if (rename ("conftest.d1", "conftest.d2/") != 0)
27160 if (rename ("conftest.f", "conftest.lnk/") == 0)
27169 if ac_fn_c_try_run
"$LINENO"; then :
27170 gl_cv_func_rename_slash_dst_works
=yes
27172 gl_cv_func_rename_slash_dst_works
=no
27174 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
27175 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
27178 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk
27181 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5
27182 $as_echo "$gl_cv_func_rename_slash_dst_works" >&6; }
27183 case "$gl_cv_func_rename_slash_dst_works" in
27188 $as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h
27193 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5
27194 $as_echo_n "checking whether rename honors trailing slash on source... " >&6; }
27195 if ${gl_cv_func_rename_slash_src_works+:} false
; then :
27196 $as_echo_n "(cached) " >&6
27198 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
27199 touch conftest.f
&& touch conftest.f1
&& mkdir conftest.d1 ||
27200 as_fn_error $?
"cannot create temporary files" "$LINENO" 5
27201 # Assume that if we have lstat, we can also check symlinks.
27202 if test $ac_cv_func_lstat = yes; then
27203 ln -s conftest.f conftest.lnk
27205 if test "$cross_compiling" = yes; then :
27207 # Guess yes on Linux systems.
27208 linux-
* | linux
) gl_cv_func_rename_slash_src_works
="guessing yes" ;;
27209 # Guess yes on glibc systems.
27210 *-gnu*) gl_cv_func_rename_slash_src_works
="guessing yes" ;;
27211 # Guess yes on native Windows.
27212 mingw
*) gl_cv_func_rename_slash_src_works
="guessing yes" ;;
27213 # If we don't know, obey --enable-cross-guesses.
27214 *) gl_cv_func_rename_slash_src_works
="$gl_cross_guess_normal" ;;
27218 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
27219 /* end confdefs.h. */
27221 # include <stdio.h>
27222 # include <stdlib.h>
27228 if (rename ("conftest.f1/", "conftest.d3") == 0)
27230 if (rename ("conftest.d1/", "conftest.d2") != 0)
27233 if (rename ("conftest.lnk/", "conftest.f") == 0)
27242 if ac_fn_c_try_run
"$LINENO"; then :
27243 gl_cv_func_rename_slash_src_works
=yes
27245 gl_cv_func_rename_slash_src_works
=no
27247 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
27248 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
27251 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk
27254 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5
27255 $as_echo "$gl_cv_func_rename_slash_src_works" >&6; }
27256 case "$gl_cv_func_rename_slash_src_works" in
27261 $as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h
27267 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5
27268 $as_echo_n "checking whether rename manages hard links correctly... " >&6; }
27269 if ${gl_cv_func_rename_link_works+:} false
; then :
27270 $as_echo_n "(cached) " >&6
27272 if test $ac_cv_func_link = yes; then
27273 if test $cross_compiling != yes; then
27274 rm -rf conftest.f conftest.f1 conftest.f2
27275 if touch conftest.f conftest.f2
&& ln conftest.f conftest.f1
&&
27276 set x
`ls -i conftest.f conftest.f1` && test "" = ""; then
27277 if test "$cross_compiling" = yes; then :
27281 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
27282 /* end confdefs.h. */
27284 # include <errno.h>
27285 # include <stdio.h>
27286 # include <stdlib.h>
27287 # include <unistd.h>
27296 if (rename ("conftest.f", "conftest.f1"))
27298 if (unlink ("conftest.f1"))
27301 /* Allow either the POSIX-required behavior, where the
27302 previous rename kept conftest.f, or the (better) NetBSD
27303 behavior, where it removed conftest.f. */
27304 if (rename ("conftest.f", "conftest.f") != 0
27305 && errno != ENOENT)
27308 if (rename ("conftest.f1", "conftest.f1") == 0)
27310 if (rename ("conftest.f2", "conftest.f2") != 0)
27318 if ac_fn_c_try_run
"$LINENO"; then :
27319 gl_cv_func_rename_link_works
=yes
27321 gl_cv_func_rename_link_works
=no
27323 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
27324 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
27328 gl_cv_func_rename_link_works
="guessing no"
27330 rm -rf conftest.f conftest.f1 conftest.f2
27333 # Guess yes on Linux systems.
27334 linux-
* | linux
) gl_cv_func_rename_link_works
="guessing yes" ;;
27335 # Guess yes on glibc systems.
27336 *-gnu*) gl_cv_func_rename_link_works
="guessing yes" ;;
27337 # Guess yes on native Windows.
27338 mingw
*) gl_cv_func_rename_link_works
="guessing yes" ;;
27339 # If we don't know, obey --enable-cross-guesses.
27340 *) gl_cv_func_rename_link_works
="$gl_cross_guess_normal" ;;
27344 gl_cv_func_rename_link_works
=yes
27348 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5
27349 $as_echo "$gl_cv_func_rename_link_works" >&6; }
27350 case "$gl_cv_func_rename_link_works" in
27355 $as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h
27360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5
27361 $as_echo_n "checking whether rename manages existing destinations correctly... " >&6; }
27362 if ${gl_cv_func_rename_dest_works+:} false
; then :
27363 $as_echo_n "(cached) " >&6
27365 rm -rf conftest.f conftest.d1 conftest.d2
27366 touch conftest.f
&& mkdir conftest.d1 conftest.d2 ||
27367 as_fn_error $?
"cannot create temporary files" "$LINENO" 5
27368 if test "$cross_compiling" = yes; then :
27370 # Guess yes on Linux systems.
27371 linux-
* | linux
) gl_cv_func_rename_dest_works
="guessing yes" ;;
27372 # Guess yes on glibc systems.
27373 *-gnu*) gl_cv_func_rename_dest_works
="guessing yes" ;;
27374 # Guess no on native Windows.
27375 mingw
*) gl_cv_func_rename_dest_works
="guessing no" ;;
27376 # If we don't know, obey --enable-cross-guesses.
27377 *) gl_cv_func_rename_dest_works
="$gl_cross_guess_normal" ;;
27381 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
27382 /* end confdefs.h. */
27384 # include <stdio.h>
27385 # include <stdlib.h>
27391 if (rename ("conftest.d1", "conftest.d2") != 0)
27393 if (rename ("conftest.d2", "conftest.f") == 0)
27401 if ac_fn_c_try_run
"$LINENO"; then :
27402 gl_cv_func_rename_dest_works
=yes
27404 gl_cv_func_rename_dest_works
=no
27406 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
27407 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
27410 rm -rf conftest.f conftest.d1 conftest.d2
27413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5
27414 $as_echo "$gl_cv_func_rename_dest_works" >&6; }
27415 case "$gl_cv_func_rename_dest_works" in
27420 $as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h
27425 if test $REPLACE_RENAME = 1; then
27434 gl_LIBOBJS
="$gl_LIBOBJS rename.$ac_objext"
27448 $as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h
27455 for ac_func
in rewinddir
27457 ac_fn_c_check_func
"$LINENO" "rewinddir" "ac_cv_func_rewinddir"
27458 if test "x$ac_cv_func_rewinddir" = xyes
; then :
27459 cat >>confdefs.h
<<_ACEOF
27460 #define HAVE_REWINDDIR 1
27466 if test $ac_cv_func_rewinddir = no
; then
27470 if test $HAVE_REWINDDIR = 0; then
27479 gl_LIBOBJS
="$gl_LIBOBJS rewinddir.$ac_objext"
27493 $as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h
27500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5
27501 $as_echo_n "checking whether rmdir works... " >&6; }
27502 if ${gl_cv_func_rmdir_works+:} false
; then :
27503 $as_echo_n "(cached) " >&6
27506 touch conftest.
file
27507 if test "$cross_compiling" = yes; then :
27509 # Guess yes on Linux systems.
27510 linux-
* | linux
) gl_cv_func_rmdir_works
="guessing yes" ;;
27511 # Guess yes on glibc systems.
27512 *-gnu* | gnu
*) gl_cv_func_rmdir_works
="guessing yes" ;;
27513 # Guess no on native Windows.
27514 mingw
*) gl_cv_func_rmdir_works
="guessing no" ;;
27515 # If we don't know, obey --enable-cross-guesses.
27516 *) gl_cv_func_rmdir_works
="$gl_cross_guess_normal" ;;
27520 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
27521 /* end confdefs.h. */
27525 # include <unistd.h>
27526 #else /* on Windows with MSVC */
27527 # include <direct.h>
27537 if (!rmdir ("conftest.file/"))
27539 else if (errno != ENOTDIR)
27541 if (!rmdir ("conftest.dir/./"))
27549 if ac_fn_c_try_run
"$LINENO"; then :
27550 gl_cv_func_rmdir_works
=yes
27552 gl_cv_func_rmdir_works
=no
27554 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
27555 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
27558 rm -rf conftest.dir conftest.
file
27560 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5
27561 $as_echo "$gl_cv_func_rmdir_works" >&6; }
27562 case "$gl_cv_func_rmdir_works" in
27569 if test $REPLACE_RMDIR = 1; then
27578 gl_LIBOBJS
="$gl_LIBOBJS rmdir.$ac_objext"
27592 $as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h
27601 if test $ac_cv_func_setenv = no
; then
27604 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5
27605 $as_echo_n "checking whether setenv validates arguments... " >&6; }
27606 if ${gl_cv_func_setenv_works+:} false
; then :
27607 $as_echo_n "(cached) " >&6
27609 if test "$cross_compiling" = yes; then :
27611 # Guess yes on glibc systems.
27612 *-gnu* | gnu
*) gl_cv_func_setenv_works
="guessing yes" ;;
27613 # Guess yes on musl systems.
27614 *-musl*) gl_cv_func_setenv_works
="guessing yes" ;;
27615 # If we don't know, obey --enable-cross-guesses.
27616 *) gl_cv_func_setenv_works
="$gl_cross_guess_normal" ;;
27620 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
27621 /* end confdefs.h. */
27623 #include <stdlib.h>
27625 #include <string.h>
27633 if (setenv ("", "", 0) != -1)
27635 else if (errno != EINVAL)
27639 if (setenv ("a", "=", 1) != 0)
27641 else if (strcmp (getenv ("a"), "=") != 0)
27650 if ac_fn_c_try_run
"$LINENO"; then :
27651 gl_cv_func_setenv_works
=yes
27653 gl_cv_func_setenv_works
=no
27655 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
27656 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
27660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5
27661 $as_echo "$gl_cv_func_setenv_works" >&6; }
27662 case "$gl_cv_func_setenv_works" in
27670 if test $HAVE_SETENV = 0 ||
test $REPLACE_SETENV = 1; then
27679 gl_LIBOBJS
="$gl_LIBOBJS setenv.$ac_objext"
27693 $as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h
27702 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5
27703 $as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; }
27704 if ${gl_cv_func_setlocale_null_all_mtsafe+:} false
; then :
27705 $as_echo_n "(cached) " >&6
27708 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin.
27709 *-musl* | darwin
* | freebsd
* | netbsd
* | openbsd
* | aix
* | haiku
* | cygwin
*)
27710 gl_cv_func_setlocale_null_all_mtsafe
=no
;;
27711 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows.
27712 *-gnu* | gnu
* | hpux
* | irix
* | solaris
* | mingw
*)
27713 gl_cv_func_setlocale_null_all_mtsafe
=yes ;;
27714 # If we don't know, obey --enable-cross-guesses.
27716 gl_cv_func_setlocale_null_all_mtsafe
="$gl_cross_guess_normal" ;;
27720 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5
27721 $as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; }
27725 if test $gl_pthread_api = no
&& test $ac_cv_header_threads_h = no
; then
27726 gl_cv_func_setlocale_null_all_mtsafe
="trivially yes"
27730 case "$gl_cv_func_setlocale_null_all_mtsafe" in
27731 *yes) SETLOCALE_NULL_ALL_MTSAFE
=1 ;;
27732 *) SETLOCALE_NULL_ALL_MTSAFE
=0 ;;
27735 cat >>confdefs.h
<<_ACEOF
27736 #define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE
27740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5
27741 $as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; }
27742 if ${gl_cv_func_setlocale_null_one_mtsafe+:} false
; then :
27743 $as_echo_n "(cached) " >&6
27746 # Guess no on OpenBSD, AIX.
27748 gl_cv_func_setlocale_null_one_mtsafe
=no
;;
27749 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows.
27750 *-gnu* | gnu
* |
*-musl* | darwin
* | freebsd
* | netbsd
* | hpux
* | irix
* | solaris
* | haiku
* | cygwin
* | mingw
*)
27751 gl_cv_func_setlocale_null_one_mtsafe
=yes ;;
27752 # If we don't know, obey --enable-cross-guesses.
27754 gl_cv_func_setlocale_null_one_mtsafe
="$gl_cross_guess_normal" ;;
27758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5
27759 $as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; }
27763 if test $gl_pthread_api = no
&& test $ac_cv_header_threads_h = no
; then
27764 gl_cv_func_setlocale_null_one_mtsafe
="trivially yes"
27768 case "$gl_cv_func_setlocale_null_one_mtsafe" in
27769 *yes) SETLOCALE_NULL_ONE_MTSAFE
=1 ;;
27770 *) SETLOCALE_NULL_ONE_MTSAFE
=0 ;;
27773 cat >>confdefs.h
<<_ACEOF
27774 #define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE
27778 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 ||
test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
27780 mingw
*) LIB_SETLOCALE_NULL
= ;;
27784 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5
27785 $as_echo_n "checking whether imported symbols can be declared weak... " >&6; }
27786 if ${gl_cv_have_weak+:} false
; then :
27787 $as_echo_n "(cached) " >&6
27790 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
27791 /* end confdefs.h. */
27792 extern void xyzzy ();
27802 if ac_fn_c_try_link
"$LINENO"; then :
27803 gl_cv_have_weak
=maybe
27805 rm -f core conftest.err conftest.
$ac_objext \
27806 conftest
$ac_exeext conftest.
$ac_ext
27807 if test $gl_cv_have_weak = maybe
; then
27808 if test "$cross_compiling" = yes; then :
27809 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
27810 /* end confdefs.h. */
27812 Extensible Linking Format
27816 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
27817 $EGREP "Extensible Linking Format" >/dev
/null
2>&1; then :
27818 gl_cv_have_weak
="guessing yes"
27820 gl_cv_have_weak
="guessing no"
27826 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
27827 /* end confdefs.h. */
27833 return (fputs == NULL);
27836 if ac_fn_c_try_run
"$LINENO"; then :
27837 gl_cv_have_weak
=yes
27841 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
27842 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
27846 case " $LDFLAGS " in
27847 *" -static "*) gl_cv_have_weak
=no
;;
27849 case "$gl_cv_have_weak" in
27852 freebsd
* | dragonfly
*)
27854 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c
-lpthread >&5 2>&1
27855 cat <<EOF > conftest2.c
27856 #include <pthread.h>
27857 #pragma weak pthread_mutexattr_gettype
27860 return (pthread_mutexattr_gettype != NULL);
27863 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so
>&5 2>&1 \
27864 || gl_cv_have_weak
=no
27865 rm -f conftest1.c libempty.so conftest2.c conftest
27872 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5
27873 $as_echo "$gl_cv_have_weak" >&6; }
27874 case "$gl_cv_have_weak" in
27877 $as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h
27882 case "$gl_cv_have_weak" in
27883 *yes) LIB_SETLOCALE_NULL
= ;;
27884 *) LIB_SETLOCALE_NULL
="$LIBPTHREAD" ;;
27889 LIB_SETLOCALE_NULL
=
27893 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 ||
test $SETLOCALE_NULL_ONE_MTSAFE = 0; then
27902 gl_LIBOBJS
="$gl_LIBOBJS setlocale-lock.$ac_objext"
27909 if test -n "$GCC"; then
27910 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5
27911 $as_echo_n "checking whether the -Werror option is usable... " >&6; }
27912 if ${gl_cv_cc_vis_werror+:} false
; then :
27913 $as_echo_n "(cached) " >&6
27915 gl_save_CFLAGS
="$CFLAGS"
27916 CFLAGS
="$CFLAGS -Werror"
27917 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
27918 /* end confdefs.h. */
27928 if ac_fn_c_try_compile
"$LINENO"; then :
27929 gl_cv_cc_vis_werror
=yes
27931 gl_cv_cc_vis_werror
=no
27933 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
27934 CFLAGS
="$gl_save_CFLAGS"
27937 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5
27938 $as_echo "$gl_cv_cc_vis_werror" >&6; }
27939 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5
27940 $as_echo_n "checking for simple visibility declarations... " >&6; }
27941 if ${gl_cv_cc_visibility+:} false
; then :
27942 $as_echo_n "(cached) " >&6
27944 gl_save_CFLAGS
="$CFLAGS"
27945 CFLAGS
="$CFLAGS -fvisibility=hidden"
27946 if test $gl_cv_cc_vis_werror = yes; then
27947 CFLAGS
="$CFLAGS -Werror"
27949 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
27950 /* end confdefs.h. */
27951 extern __attribute__((__visibility__("hidden"))) int hiddenvar;
27952 extern __attribute__((__visibility__("default"))) int exportedvar;
27953 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void);
27954 extern __attribute__((__visibility__("default"))) int exportedfunc (void);
27955 void dummyfunc (void) {}
27965 if ac_fn_c_try_compile
"$LINENO"; then :
27966 gl_cv_cc_visibility
=yes
27968 gl_cv_cc_visibility
=no
27970 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
27971 CFLAGS
="$gl_save_CFLAGS"
27974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5
27975 $as_echo "$gl_cv_cc_visibility" >&6; }
27976 if test $gl_cv_cc_visibility = yes; then
27977 CFLAG_VISIBILITY
="-fvisibility=hidden"
27984 cat >>confdefs.h
<<_ACEOF
27985 #define HAVE_VISIBILITY $HAVE_VISIBILITY
27996 GNULIB_SETLOCALE_NULL
=1
28002 $as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h
28017 if test $gl_cv_have_include_next = yes; then
28018 gl_cv_next_signal_h
='<'signal.h
'>'
28020 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5
28021 $as_echo_n "checking absolute name of <signal.h>... " >&6; }
28022 if ${gl_cv_next_signal_h+:} false
; then :
28023 $as_echo_n "(cached) " >&6
28028 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
28029 /* end confdefs.h. */
28030 #include <signal.h>
28033 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
28034 *) gl_absname_cpp
="$ac_cpp" ;;
28039 gl_dirsep_regex
='[/\\]'
28042 gl_dirsep_regex
='\/'
28045 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
28046 gl_header_literal_regex
=`echo 'signal.h' \
28047 | sed -e "$gl_make_literal_regex_sed"`
28048 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28049 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28055 gl_cv_absolute_signal_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28056 sed -n "$gl_absolute_header_sed"`
28058 gl_header
=$gl_cv_absolute_signal_h
28059 gl_cv_next_signal_h
='"'$gl_header'"'
28063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5
28064 $as_echo "$gl_cv_next_signal_h" >&6; }
28066 NEXT_SIGNAL_H
=$gl_cv_next_signal_h
28068 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
28069 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28070 gl_next_as_first_directive
='<'signal.h
'>'
28072 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28073 gl_next_as_first_directive
=$gl_cv_next_signal_h
28075 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H
=$gl_next_as_first_directive
28081 # AIX declares sig_atomic_t to already include volatile, and C89 compilers
28082 # then choke on 'volatile sig_atomic_t'. C99 requires that it compile.
28083 ac_fn_c_check_type
"$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" "
28084 #include <signal.h>
28087 if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes
; then :
28090 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T
=0
28099 ac_fn_c_check_type
"$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "
28100 #include <signal.h>
28103 if test "x$ac_cv_type_sighandler_t" = xyes
; then :
28106 HAVE_SIGHANDLER_T
=0
28116 ac_fn_c_check_type
"$LINENO" "socklen_t" "ac_cv_type_socklen_t" "
28117 /* <sys/types.h> is not needed according to POSIX, but the
28118 <sys/socket.h> in i386-unknown-freebsd4.10 and
28119 powerpc-apple-darwin5.5 required it. */
28120 #include <sys/types.h>
28121 #if HAVE_SYS_SOCKET_H
28122 # include <sys/socket.h>
28123 #elif HAVE_WS2TCPIP_H
28124 # include <ws2tcpip.h>
28128 if test "x$ac_cv_type_socklen_t" = xyes
; then :
28131 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5
28132 $as_echo_n "checking for socklen_t equivalent... " >&6; }
28133 if ${gl_cv_socklen_t_equiv+:} false
; then :
28134 $as_echo_n "(cached) " >&6
28136 # Systems have either "struct sockaddr *" or
28137 # "void *" as the second argument to getpeername
28138 gl_cv_socklen_t_equiv
=
28139 for arg2
in "struct sockaddr" void
; do
28140 for t
in int size_t
"unsigned int" "long int" "unsigned long int"; do
28141 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
28142 /* end confdefs.h. */
28143 #include <sys/types.h>
28144 #include <sys/socket.h>
28146 int getpeername (int, $arg2 *, $t *);
28151 getpeername (0, 0, &len);
28156 if ac_fn_c_try_compile
"$LINENO"; then :
28157 gl_cv_socklen_t_equiv
="$t"
28159 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
28160 test "$gl_cv_socklen_t_equiv" != "" && break
28162 test "$gl_cv_socklen_t_equiv" != "" && break
28164 if test "$gl_cv_socklen_t_equiv" = ""; then
28165 as_fn_error $?
"Cannot find a type to use in place of socklen_t" "$LINENO" 5
28169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5
28170 $as_echo "$gl_cv_socklen_t_equiv" >&6; }
28172 cat >>confdefs.h
<<_ACEOF
28173 #define socklen_t $gl_cv_socklen_t_equiv
28179 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5
28180 $as_echo_n "checking for ssize_t... " >&6; }
28181 if ${gt_cv_ssize_t+:} false
; then :
28182 $as_echo_n "(cached) " >&6
28184 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
28185 /* end confdefs.h. */
28186 #include <sys/types.h>
28190 int x = sizeof (ssize_t *) + sizeof (ssize_t);
28196 if ac_fn_c_try_compile
"$LINENO"; then :
28201 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
28203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5
28204 $as_echo "$gt_cv_ssize_t" >&6; }
28205 if test $gt_cv_ssize_t = no
; then
28207 $as_echo "#define ssize_t int" >>confdefs.h
28219 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5
28220 $as_echo_n "checking whether stat handles trailing slashes on files... " >&6; }
28221 if ${gl_cv_func_stat_file_slash+:} false
; then :
28222 $as_echo_n "(cached) " >&6
28225 # Assume that if we have lstat, we can also check symlinks.
28226 if test $ac_cv_func_lstat = yes; then
28227 ln -s conftest.tmp conftest.lnk
28229 if test "$cross_compiling" = yes; then :
28231 # Guess yes on Linux systems.
28232 linux-
* | linux
) gl_cv_func_stat_file_slash
="guessing yes" ;;
28233 # Guess yes on glibc systems.
28234 *-gnu* | gnu
*) gl_cv_func_stat_file_slash
="guessing yes" ;;
28235 # If we don't know, obey --enable-cross-guesses.
28236 *) gl_cv_func_stat_file_slash
="$gl_cross_guess_normal" ;;
28240 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
28241 /* end confdefs.h. */
28242 #include <sys/stat.h>
28249 if (!stat ("conftest.tmp/", &st))
28252 if (!stat ("conftest.lnk/", &st))
28261 if ac_fn_c_try_run
"$LINENO"; then :
28262 gl_cv_func_stat_file_slash
=yes
28264 gl_cv_func_stat_file_slash
=no
28266 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
28267 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
28270 rm -f conftest.tmp conftest.lnk
28272 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5
28273 $as_echo "$gl_cv_func_stat_file_slash" >&6; }
28274 case $gl_cv_func_stat_file_slash in
28278 $as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h
28288 if test $REPLACE_STAT = 1; then
28297 gl_LIBOBJS
="$gl_LIBOBJS stat.$ac_objext"
28309 gl_LIBOBJS
="$gl_LIBOBJS stat-w32.$ac_objext"
28330 $as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h
28338 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>
28339 #include <sys/stat.h>
28341 if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes
; then :
28343 cat >>confdefs.h
<<_ACEOF
28344 #define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1
28347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5
28348 $as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; }
28349 if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false
; then :
28350 $as_echo_n "(cached) " >&6
28352 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
28353 /* end confdefs.h. */
28355 #include <sys/types.h>
28356 #include <sys/stat.h>
28357 #if HAVE_SYS_TIME_H
28358 # include <sys/time.h>
28361 struct timespec ts;
28374 if ac_fn_c_try_compile
"$LINENO"; then :
28375 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec
=yes
28377 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec
=no
28379 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
28381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5
28382 $as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; }
28383 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then
28385 $as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h
28389 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>
28390 #include <sys/stat.h>
28392 if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes
; then :
28394 cat >>confdefs.h
<<_ACEOF
28395 #define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1
28400 ac_fn_c_check_member
"$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h>
28401 #include <sys/stat.h>
28403 if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes
; then :
28405 cat >>confdefs.h
<<_ACEOF
28406 #define HAVE_STRUCT_STAT_ST_ATIMENSEC 1
28411 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>
28412 #include <sys/stat.h>
28414 if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes
; then :
28416 cat >>confdefs.h
<<_ACEOF
28417 #define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1
28433 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>
28434 #include <sys/stat.h>
28436 if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes
; then :
28438 cat >>confdefs.h
<<_ACEOF
28439 #define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1
28444 ac_fn_c_check_member
"$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h>
28445 #include <sys/stat.h>
28447 if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes
; then :
28449 cat >>confdefs.h
<<_ACEOF
28450 #define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1
28455 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>
28456 #include <sys/stat.h>
28458 if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes
; then :
28460 cat >>confdefs.h
<<_ACEOF
28461 #define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1
28473 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5
28474 $as_echo_n "checking for working stdalign.h... " >&6; }
28475 if ${gl_cv_header_working_stdalign_h+:} false
; then :
28476 $as_echo_n "(cached) " >&6
28478 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
28479 /* end confdefs.h. */
28480 #include <stdalign.h>
28481 #include <stddef.h>
28483 /* Test that alignof yields a result consistent with offsetof.
28484 This catches GCC bug 52023
28485 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */
28487 template <class t> struct alignof_helper { char a; t b; };
28488 # define ao(type) offsetof (alignof_helper<type>, b)
28490 # define ao(type) offsetof (struct { char a; type b; }, b)
28492 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1];
28493 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1];
28494 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1];
28496 /* Test _Alignas only on platforms where gnulib can help. */
28498 ((defined __cplusplus && 201103 <= __cplusplus) \
28499 || (defined __APPLE__ && defined __MACH__ \
28500 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
28502 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
28503 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \
28504 || 1300 <= _MSC_VER)
28505 struct alignas_test { char c; char alignas (8) alignas_8; };
28506 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8
28518 if ac_fn_c_try_compile
"$LINENO"; then :
28519 gl_cv_header_working_stdalign_h
=yes
28521 gl_cv_header_working_stdalign_h
=no
28523 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
28525 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5
28526 $as_echo "$gl_cv_header_working_stdalign_h" >&6; }
28528 if test $gl_cv_header_working_stdalign_h = yes; then
28531 STDALIGN_H
='stdalign.h'
28535 if test -n "$STDALIGN_H"; then
28536 GL_GENERATE_STDALIGN_H_TRUE
=
28537 GL_GENERATE_STDALIGN_H_FALSE
='#'
28539 GL_GENERATE_STDALIGN_H_TRUE
='#'
28540 GL_GENERATE_STDALIGN_H_FALSE
=
28548 if test "$ac_cv_header_stdbool_h" = yes; then
28551 if test -z "$GCC"; then
28552 STDBOOL_H
='stdbool.h'
28562 STDBOOL_H
='stdbool.h'
28565 if test -n "$STDBOOL_H"; then
28566 GL_GENERATE_STDBOOL_H_TRUE
=
28567 GL_GENERATE_STDBOOL_H_FALSE
='#'
28569 GL_GENERATE_STDBOOL_H_TRUE
='#'
28570 GL_GENERATE_STDBOOL_H_FALSE
=
28574 if test "$ac_cv_type__Bool" = yes; then
28589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5
28590 $as_echo_n "checking for good max_align_t... " >&6; }
28591 if ${gl_cv_type_max_align_t+:} false
; then :
28592 $as_echo_n "(cached) " >&6
28594 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
28595 /* end confdefs.h. */
28596 #include <stddef.h>
28597 unsigned int s = sizeof (max_align_t);
28598 #if defined __GNUC__ || defined __clang__ || defined __IBM__ALIGNOF__
28599 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1];
28600 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1];
28602 typedef struct { char a; max_align_t b; } max_helper;
28603 typedef struct { char a; long b; } long_helper;
28604 typedef struct { char a; double b; } double_helper;
28605 typedef struct { char a; long double b; } long_double_helper;
28606 int check3[2 * (offsetof (long_helper, b) <= offsetof (max_helper, b)) - 1];
28607 int check4[2 * (offsetof (double_helper, b) <= offsetof (max_helper, b)) - 1];
28608 int check5[2 * (offsetof (long_double_helper, b) <= offsetof (max_helper, b)) - 1];
28618 if ac_fn_c_try_compile
"$LINENO"; then :
28619 gl_cv_type_max_align_t
=yes
28621 gl_cv_type_max_align_t
=no
28623 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
28626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5
28627 $as_echo "$gl_cv_type_max_align_t" >&6; }
28628 if test $gl_cv_type_max_align_t = no
; then
28633 if test $gt_cv_c_wchar_t = no
; then
28638 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5
28639 $as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; }
28640 if ${gl_cv_decl_null_works+:} false
; then :
28641 $as_echo_n "(cached) " >&6
28643 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
28644 /* end confdefs.h. */
28645 #include <stddef.h>
28646 int test[2 * (sizeof NULL == sizeof (void *)) -1];
28656 if ac_fn_c_try_compile
"$LINENO"; then :
28657 gl_cv_decl_null_works
=yes
28659 gl_cv_decl_null_works
=no
28661 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
28663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5
28664 $as_echo "$gl_cv_decl_null_works" >&6; }
28665 if test $gl_cv_decl_null_works = no
; then
28671 if test -n "$STDDEF_H"; then
28672 GL_GENERATE_STDDEF_H_TRUE
=
28673 GL_GENERATE_STDDEF_H_FALSE
='#'
28675 GL_GENERATE_STDDEF_H_TRUE
='#'
28676 GL_GENERATE_STDDEF_H_FALSE
=
28679 if test -n "$STDDEF_H"; then
28688 if test $gl_cv_have_include_next = yes; then
28689 gl_cv_next_stddef_h
='<'stddef.h
'>'
28691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5
28692 $as_echo_n "checking absolute name of <stddef.h>... " >&6; }
28693 if ${gl_cv_next_stddef_h+:} false
; then :
28694 $as_echo_n "(cached) " >&6
28699 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
28700 /* end confdefs.h. */
28701 #include <stddef.h>
28704 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
28705 *) gl_absname_cpp
="$ac_cpp" ;;
28710 gl_dirsep_regex
='[/\\]'
28713 gl_dirsep_regex
='\/'
28716 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
28717 gl_header_literal_regex
=`echo 'stddef.h' \
28718 | sed -e "$gl_make_literal_regex_sed"`
28719 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28720 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28726 gl_cv_absolute_stddef_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28727 sed -n "$gl_absolute_header_sed"`
28729 gl_header
=$gl_cv_absolute_stddef_h
28730 gl_cv_next_stddef_h
='"'$gl_header'"'
28734 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5
28735 $as_echo "$gl_cv_next_stddef_h" >&6; }
28737 NEXT_STDDEF_H
=$gl_cv_next_stddef_h
28739 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
28740 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28741 gl_next_as_first_directive
='<'stddef.h
'>'
28743 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28744 gl_next_as_first_directive
=$gl_cv_next_stddef_h
28746 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H
=$gl_next_as_first_directive
28756 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h
28767 if test $gl_cv_have_include_next = yes; then
28768 gl_cv_next_stdio_h
='<'stdio.h
'>'
28770 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5
28771 $as_echo_n "checking absolute name of <stdio.h>... " >&6; }
28772 if ${gl_cv_next_stdio_h+:} false
; then :
28773 $as_echo_n "(cached) " >&6
28778 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
28779 /* end confdefs.h. */
28783 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
28784 *) gl_absname_cpp
="$ac_cpp" ;;
28789 gl_dirsep_regex
='[/\\]'
28792 gl_dirsep_regex
='\/'
28795 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
28796 gl_header_literal_regex
=`echo 'stdio.h' \
28797 | sed -e "$gl_make_literal_regex_sed"`
28798 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28799 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28805 gl_cv_absolute_stdio_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28806 sed -n "$gl_absolute_header_sed"`
28808 gl_header
=$gl_cv_absolute_stdio_h
28809 gl_cv_next_stdio_h
='"'$gl_header'"'
28813 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5
28814 $as_echo "$gl_cv_next_stdio_h" >&6; }
28816 NEXT_STDIO_H
=$gl_cv_next_stdio_h
28818 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
28819 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28820 gl_next_as_first_directive
='<'stdio.h
'>'
28822 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28823 gl_next_as_first_directive
=$gl_cv_next_stdio_h
28825 NEXT_AS_FIRST_DIRECTIVE_STDIO_H
=$gl_next_as_first_directive
28831 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5
28832 $as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; }
28833 if ${gl_cv_func_printf_attribute_flavor+:} false
; then :
28834 $as_echo_n "(cached) " >&6
28836 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
28837 /* end confdefs.h. */
28839 #define __STDC_FORMAT_MACROS 1
28841 #include <inttypes.h>
28842 /* For non-mingw systems, compilation will trivially succeed.
28843 For mingw, compilation will succeed for older mingw (system
28844 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */
28845 #if (defined _WIN32 && ! defined __CYGWIN__) && \
28846 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
28847 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1];
28858 if ac_fn_c_try_compile
"$LINENO"; then :
28859 gl_cv_func_printf_attribute_flavor
=system
28861 gl_cv_func_printf_attribute_flavor
=gnu
28863 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
28865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5
28866 $as_echo "$gl_cv_func_printf_attribute_flavor" >&6; }
28867 if test "$gl_cv_func_printf_attribute_flavor" = gnu
; then
28869 $as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h
28876 cat >>confdefs.h
<<_ACEOF
28877 #define GNULIB_FSCANF 1
28884 cat >>confdefs.h
<<_ACEOF
28885 #define GNULIB_SCANF 1
28916 if test $ac_cv_have_decl_fcloseall = no
; then
28917 HAVE_DECL_FCLOSEALL
=0
28930 if test $gl_cv_have_include_next = yes; then
28931 gl_cv_next_stdlib_h
='<'stdlib.h
'>'
28933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5
28934 $as_echo_n "checking absolute name of <stdlib.h>... " >&6; }
28935 if ${gl_cv_next_stdlib_h+:} false
; then :
28936 $as_echo_n "(cached) " >&6
28941 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
28942 /* end confdefs.h. */
28943 #include <stdlib.h>
28946 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
28947 *) gl_absname_cpp
="$ac_cpp" ;;
28952 gl_dirsep_regex
='[/\\]'
28955 gl_dirsep_regex
='\/'
28958 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
28959 gl_header_literal_regex
=`echo 'stdlib.h' \
28960 | sed -e "$gl_make_literal_regex_sed"`
28961 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
28962 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
28968 gl_cv_absolute_stdlib_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
28969 sed -n "$gl_absolute_header_sed"`
28971 gl_header
=$gl_cv_absolute_stdlib_h
28972 gl_cv_next_stdlib_h
='"'$gl_header'"'
28976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5
28977 $as_echo "$gl_cv_next_stdlib_h" >&6; }
28979 NEXT_STDLIB_H
=$gl_cv_next_stdlib_h
28981 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
28982 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
28983 gl_next_as_first_directive
='<'stdlib.h
'>'
28985 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
28986 gl_next_as_first_directive
=$gl_cv_next_stdlib_h
28988 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H
=$gl_next_as_first_directive
29001 if test $ac_cv_have_decl_ecvt = no
; then
29005 if test $ac_cv_have_decl_fcvt = no
; then
29009 if test $ac_cv_have_decl_gcvt = no
; then
29017 for ac_func
in strchrnul
29019 ac_fn_c_check_func
"$LINENO" "strchrnul" "ac_cv_func_strchrnul"
29020 if test "x$ac_cv_func_strchrnul" = xyes
; then :
29021 cat >>confdefs.h
<<_ACEOF
29022 #define HAVE_STRCHRNUL 1
29028 if test $ac_cv_func_strchrnul = no
; then
29031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5
29032 $as_echo_n "checking whether strchrnul works... " >&6; }
29033 if ${gl_cv_func_strchrnul_works+:} false
; then :
29034 $as_echo_n "(cached) " >&6
29036 if test "$cross_compiling" = yes; then :
29037 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
29038 /* end confdefs.h. */
29040 #if defined __CYGWIN__
29041 #include <cygwin/version.h>
29042 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9)
29050 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29051 $EGREP "Lucky user" >/dev
/null
2>&1; then :
29052 gl_cv_func_strchrnul_works
="guessing yes"
29054 gl_cv_func_strchrnul_works
="guessing no"
29060 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
29061 /* end confdefs.h. */
29063 #include <string.h> /* for strchrnul */
29068 const char *buf = "a";
29069 return strchrnul (buf, 'b') != buf + 1;
29075 if ac_fn_c_try_run
"$LINENO"; then :
29076 gl_cv_func_strchrnul_works
=yes
29078 gl_cv_func_strchrnul_works
=no
29080 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
29081 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
29086 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5
29087 $as_echo "$gl_cv_func_strchrnul_works" >&6; }
29088 case "$gl_cv_func_strchrnul_works" in
29090 *) REPLACE_STRCHRNUL
=1 ;;
29094 if test $HAVE_STRCHRNUL = 0 ||
test $REPLACE_STRCHRNUL = 1; then
29103 gl_LIBOBJS
="$gl_LIBOBJS strchrnul.$ac_objext"
29118 $as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h
29125 if test $gl_cv_func_malloc_posix != yes; then
29129 if test $ac_cv_have_decl_strdup = no
; then
29133 if test $REPLACE_STRDUP = 1; then
29142 gl_LIBOBJS
="$gl_LIBOBJS strdup.$ac_objext"
29157 $as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h
29168 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
29169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5
29170 $as_echo_n "checking for working strerror function... " >&6; }
29171 if ${gl_cv_func_working_strerror+:} false
; then :
29172 $as_echo_n "(cached) " >&6
29174 if test "$cross_compiling" = yes; then :
29176 # Guess yes on glibc systems.
29177 *-gnu* | gnu
*) gl_cv_func_working_strerror
="guessing yes" ;;
29178 # Guess yes on musl systems.
29179 *-musl*) gl_cv_func_working_strerror
="guessing yes" ;;
29180 # If we don't know, obey --enable-cross-guesses.
29181 *) gl_cv_func_working_strerror
="$gl_cross_guess_normal" ;;
29185 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
29186 /* end confdefs.h. */
29187 #include <string.h>
29192 if (!*strerror (-2)) return 1;
29197 if ac_fn_c_try_run
"$LINENO"; then :
29198 gl_cv_func_working_strerror
=yes
29200 gl_cv_func_working_strerror
=no
29202 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
29203 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
29208 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5
29209 $as_echo "$gl_cv_func_working_strerror" >&6; }
29210 case "$gl_cv_func_working_strerror" in
29217 case "$gl_cv_func_strerror_r_works" in
29218 *no
) REPLACE_STRERROR
=1 ;;
29225 if test $REPLACE_STRERROR = 1; then
29234 gl_LIBOBJS
="$gl_LIBOBJS strerror.$ac_objext"
29239 cat >>confdefs.h
<<_ACEOF
29240 #define GNULIB_STRERROR 1
29255 $as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h
29261 if test -n "$ERRNO_H" ||
test $REPLACE_STRERROR_0 = 1; then
29270 gl_LIBOBJS
="$gl_LIBOBJS strerror-override.$ac_objext"
29276 if test $ac_cv_header_sys_socket_h != yes; then
29277 for ac_header
in winsock2.h
29279 ac_fn_c_check_header_mongrel
"$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default"
29280 if test "x$ac_cv_header_winsock2_h" = xyes
; then :
29281 cat >>confdefs.h
<<_ACEOF
29282 #define HAVE_WINSOCK2_H 1
29290 if test "$ac_cv_header_winsock2_h" = yes; then
29292 UNISTD_H_HAVE_WINSOCK2_H
=1
29293 SYS_IOCTL_H_HAVE_WINSOCK2_H
=1
29307 if test $ac_cv_have_decl_strerror_r = no
; then
29308 HAVE_DECL_STRERROR_R
=0
29311 if test $ac_cv_func_strerror_r = yes; then
29312 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then
29313 if test $gl_cv_func_strerror_r_posix_signature = yes; then
29314 case "$gl_cv_func_strerror_r_works" in
29315 *no
) REPLACE_STRERROR_R
=1 ;;
29318 REPLACE_STRERROR_R
=1
29321 REPLACE_STRERROR_R
=1
29325 if test $HAVE_DECL_STRERROR_R = 0 ||
test $REPLACE_STRERROR_R = 1; then
29334 gl_LIBOBJS
="$gl_LIBOBJS strerror_r.$ac_objext"
29347 GNULIB_STRERROR_R
=1
29353 $as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h
29359 cat >>confdefs.h
<<_ACEOF
29360 #define GNULIB_STRERROR_R_POSIX 1
29376 if test $ac_cv_have_decl_strnlen = no
; then
29377 HAVE_DECL_STRNLEN
=0
29380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5
29381 $as_echo_n "checking for working strnlen... " >&6; }
29382 if ${ac_cv_func_strnlen_working+:} false
; then :
29383 $as_echo_n "(cached) " >&6
29385 if test "$cross_compiling" = yes; then :
29386 # Guess no on AIX systems, yes otherwise.
29388 aix
*) ac_cv_func_strnlen_working
=no
;;
29389 *) ac_cv_func_strnlen_working
=yes;;
29392 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
29393 /* end confdefs.h. */
29394 $ac_includes_default
29400 #define S_LEN (sizeof S - 1)
29402 /* At least one implementation is buggy: that of AIX 4.3 would
29403 give strnlen (S, 1) == 3. */
29406 for (i = 0; i < S_LEN + 1; ++i)
29408 int expected = i <= S_LEN ? i : S_LEN;
29409 if (strnlen (S, i) != expected)
29418 if ac_fn_c_try_run
"$LINENO"; then :
29419 ac_cv_func_strnlen_working
=yes
29421 ac_cv_func_strnlen_working
=no
29423 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
29424 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
29428 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5
29429 $as_echo "$ac_cv_func_strnlen_working" >&6; }
29430 test $ac_cv_func_strnlen_working = no
&& :
29433 if test $ac_cv_func_strnlen_working = no
; then
29438 if test $HAVE_DECL_STRNLEN = 0 ||
test $REPLACE_STRNLEN = 1; then
29447 gl_LIBOBJS
="$gl_LIBOBJS strnlen.$ac_objext"
29462 $as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h
29468 if test $REPLACE_STRSTR = 0; then
29469 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5
29470 $as_echo_n "checking whether strstr works in linear time... " >&6; }
29471 if ${gl_cv_func_strstr_linear+:} false
; then :
29472 $as_echo_n "(cached) " >&6
29474 if test "$cross_compiling" = yes; then :
29475 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
29476 /* end confdefs.h. */
29478 #include <features.h>
29479 #ifdef __GNU_LIBRARY__
29480 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
29481 && !(defined __i386__ || defined __x86_64__) \
29482 && !defined __UCLIBC__
29487 #include <cygwin/version.h>
29488 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
29494 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29495 $EGREP "Lucky user" >/dev
/null
2>&1; then :
29496 gl_cv_func_strstr_linear
="guessing yes"
29498 gl_cv_func_strstr_linear
="$gl_cross_guess_normal"
29504 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
29505 /* end confdefs.h. */
29508 /* z/OS does not deliver signals while strstr() is running (thanks to
29509 restrictions on its LE runtime), which prevents us from limiting the
29510 running time of this test. */
29511 # error "This test does not work properly on z/OS"
29513 #include <signal.h> /* for signal */
29514 #include <string.h> /* for strstr */
29515 #include <stdlib.h> /* for malloc */
29516 #include <unistd.h> /* for alarm */
29517 static void quit (int sig) { _exit (sig + 128); }
29524 size_t m = 1000000;
29525 char *haystack = (char *) malloc (2 * m + 2);
29526 char *needle = (char *) malloc (m + 2);
29527 /* Failure to compile this test due to missing alarm is okay,
29528 since all such platforms (mingw) also have quadratic strstr. */
29529 signal (SIGALRM, quit);
29531 /* Check for quadratic performance. */
29532 if (haystack && needle)
29534 memset (haystack, 'A', 2 * m);
29535 haystack[2 * m] = 'B';
29536 haystack[2 * m + 1] = 0;
29537 memset (needle, 'A', m);
29540 if (!strstr (haystack, needle))
29543 /* Free allocated memory, in case some sanitizer is watching. */
29552 if ac_fn_c_try_run
"$LINENO"; then :
29553 gl_cv_func_strstr_linear
=yes
29555 gl_cv_func_strstr_linear
=no
29557 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
29558 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
29563 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5
29564 $as_echo "$gl_cv_func_strstr_linear" >&6; }
29565 case "$gl_cv_func_strstr_linear" in
29573 if test $REPLACE_STRSTR = 1; then
29582 gl_LIBOBJS
="$gl_LIBOBJS strstr.$ac_objext"
29588 if test $REPLACE_MEMCHR = 1; then
29591 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5
29592 $as_echo_n "checking whether strstr works... " >&6; }
29593 if ${gl_cv_func_strstr_works_always+:} false
; then :
29594 $as_echo_n "(cached) " >&6
29596 if test "$cross_compiling" = yes; then :
29597 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
29598 /* end confdefs.h. */
29600 #ifdef __GNU_LIBRARY__
29601 #include <features.h>
29602 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \
29603 || defined __UCLIBC__
29606 #elif defined __CYGWIN__
29607 #include <cygwin/version.h>
29608 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7)
29616 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
29617 $EGREP "Lucky user" >/dev
/null
2>&1; then :
29618 gl_cv_func_strstr_works_always
="guessing yes"
29620 gl_cv_func_strstr_works_always
="$gl_cross_guess_normal"
29626 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
29627 /* end confdefs.h. */
29629 #include <string.h> /* for strstr */
29630 #ifdef __GNU_LIBRARY__
29631 #include <features.h>
29632 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28
29636 #define P "_EF_BF_BD"
29637 #define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P
29638 #define NEEDLE P P P P P
29643 return !!strstr (HAYSTACK, NEEDLE);
29649 if ac_fn_c_try_run
"$LINENO"; then :
29650 gl_cv_func_strstr_works_always
=yes
29652 gl_cv_func_strstr_works_always
=no
29654 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
29655 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
29660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5
29661 $as_echo "$gl_cv_func_strstr_works_always" >&6; }
29662 case "$gl_cv_func_strstr_works_always" in
29670 if test $REPLACE_STRSTR = 1; then
29679 gl_LIBOBJS
="$gl_LIBOBJS strstr.$ac_objext"
29693 $as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h
29701 for ac_func
in strtok_r
29703 ac_fn_c_check_func
"$LINENO" "strtok_r" "ac_cv_func_strtok_r"
29704 if test "x$ac_cv_func_strtok_r" = xyes
; then :
29705 cat >>confdefs.h
<<_ACEOF
29706 #define HAVE_STRTOK_R 1
29712 if test $ac_cv_func_strtok_r = yes; then
29714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5
29715 $as_echo_n "checking whether strtok_r works... " >&6; }
29716 if ${gl_cv_func_strtok_r_works+:} false
; then :
29717 $as_echo_n "(cached) " >&6
29719 if test "$cross_compiling" = yes; then :
29721 # Guess no on glibc systems.
29722 *-gnu* | gnu
*) gl_cv_func_strtok_r_works
="guessing no" ;;
29723 # Guess yes on native Windows.
29724 mingw
*) gl_cv_func_strtok_r_works
="guessing yes" ;;
29725 *) gl_cv_func_strtok_r_works
="guessing yes" ;;
29729 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
29730 /* end confdefs.h. */
29732 #ifndef __OPTIMIZE__
29733 # define __OPTIMIZE__ 1
29735 #undef __OPTIMIZE_SIZE__
29736 #undef __NO_INLINE__
29737 #include <stdlib.h>
29738 #include <string.h>
29743 static const char dummy[] = "\177\01a";
29744 char delimiters[] = "xxxxxxxx";
29745 char *save_ptr = (char *) dummy;
29746 strtok_r (delimiters, "x", &save_ptr);
29747 strtok_r (NULL, "x", &save_ptr);
29755 if ac_fn_c_try_run
"$LINENO"; then :
29756 gl_cv_func_strtok_r_works
=yes
29758 gl_cv_func_strtok_r_works
=no
29760 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
29761 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
29766 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5
29767 $as_echo "$gl_cv_func_strtok_r_works" >&6; }
29768 case "$gl_cv_func_strtok_r_works" in
29770 UNDEFINE_STRTOK_R
=1
29777 if test $ac_cv_have_decl_strtok_r = no
; then
29778 HAVE_DECL_STRTOK_R
=0
29781 if test $HAVE_STRTOK_R = 0 ||
test $REPLACE_STRTOK_R = 1; then
29790 gl_LIBOBJS
="$gl_LIBOBJS strtok_r.$ac_objext"
29807 $as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h
29822 if test $gl_cv_have_include_next = yes; then
29823 gl_cv_next_sys_random_h
='<'sys
/random.h
'>'
29825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5
29826 $as_echo_n "checking absolute name of <sys/random.h>... " >&6; }
29827 if ${gl_cv_next_sys_random_h+:} false
; then :
29828 $as_echo_n "(cached) " >&6
29831 if test $ac_cv_header_sys_random_h = yes; then
29836 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
29837 /* end confdefs.h. */
29838 #include <sys/random.h>
29841 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
29842 *) gl_absname_cpp
="$ac_cpp" ;;
29847 gl_dirsep_regex
='[/\\]'
29850 gl_dirsep_regex
='\/'
29853 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
29854 gl_header_literal_regex
=`echo 'sys/random.h' \
29855 | sed -e "$gl_make_literal_regex_sed"`
29856 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29857 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29863 gl_cv_absolute_sys_random_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29864 sed -n "$gl_absolute_header_sed"`
29866 gl_header
=$gl_cv_absolute_sys_random_h
29867 gl_cv_next_sys_random_h
='"'$gl_header'"'
29869 gl_cv_next_sys_random_h
='<'sys
/random.h
'>'
29874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5
29875 $as_echo "$gl_cv_next_sys_random_h" >&6; }
29877 NEXT_SYS_RANDOM_H
=$gl_cv_next_sys_random_h
29879 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
29880 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29881 gl_next_as_first_directive
='<'sys
/random.h
'>'
29883 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29884 gl_next_as_first_directive
=$gl_cv_next_sys_random_h
29886 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H
=$gl_next_as_first_directive
29891 if test $ac_cv_header_sys_random_h = yes; then
29892 HAVE_SYS_RANDOM_H
=1
29894 HAVE_SYS_RANDOM_H
=0
29899 if test $ac_cv_header_sys_random_h = yes; then
29900 UNISTD_H_HAVE_SYS_RANDOM_H
=1
29924 if test $gl_cv_have_include_next = yes; then
29925 gl_cv_next_sys_stat_h
='<'sys
/stat.h
'>'
29927 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5
29928 $as_echo_n "checking absolute name of <sys/stat.h>... " >&6; }
29929 if ${gl_cv_next_sys_stat_h+:} false
; then :
29930 $as_echo_n "(cached) " >&6
29933 if test $ac_cv_header_sys_stat_h = yes; then
29938 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
29939 /* end confdefs.h. */
29940 #include <sys/stat.h>
29943 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
29944 *) gl_absname_cpp
="$ac_cpp" ;;
29949 gl_dirsep_regex
='[/\\]'
29952 gl_dirsep_regex
='\/'
29955 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
29956 gl_header_literal_regex
=`echo 'sys/stat.h' \
29957 | sed -e "$gl_make_literal_regex_sed"`
29958 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
29959 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
29965 gl_cv_absolute_sys_stat_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
29966 sed -n "$gl_absolute_header_sed"`
29968 gl_header
=$gl_cv_absolute_sys_stat_h
29969 gl_cv_next_sys_stat_h
='"'$gl_header'"'
29971 gl_cv_next_sys_stat_h
='<'sys
/stat.h
'>'
29976 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5
29977 $as_echo "$gl_cv_next_sys_stat_h" >&6; }
29979 NEXT_SYS_STAT_H
=$gl_cv_next_sys_stat_h
29981 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
29982 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
29983 gl_next_as_first_directive
='<'sys
/stat.h
'>'
29985 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
29986 gl_next_as_first_directive
=$gl_cv_next_sys_stat_h
29988 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H
=$gl_next_as_first_directive
29997 WINDOWS_STAT_TIMESPEC
=0
30006 ac_fn_c_check_type
"$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h>
30007 #include <sys/stat.h>
30009 if test "x$ac_cv_type_nlink_t" = xyes
; then :
30013 $as_echo "#define nlink_t int" >>confdefs.h
30042 if test $gl_cv_have_include_next = yes; then
30043 gl_cv_next_sys_uio_h
='<'sys
/uio.h
'>'
30045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5
30046 $as_echo_n "checking absolute name of <sys/uio.h>... " >&6; }
30047 if ${gl_cv_next_sys_uio_h+:} false
; then :
30048 $as_echo_n "(cached) " >&6
30051 if test $ac_cv_header_sys_uio_h = yes; then
30056 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
30057 /* end confdefs.h. */
30058 #include <sys/uio.h>
30061 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
30062 *) gl_absname_cpp
="$ac_cpp" ;;
30067 gl_dirsep_regex
='[/\\]'
30070 gl_dirsep_regex
='\/'
30073 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
30074 gl_header_literal_regex
=`echo 'sys/uio.h' \
30075 | sed -e "$gl_make_literal_regex_sed"`
30076 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30077 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30083 gl_cv_absolute_sys_uio_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30084 sed -n "$gl_absolute_header_sed"`
30086 gl_header
=$gl_cv_absolute_sys_uio_h
30087 gl_cv_next_sys_uio_h
='"'$gl_header'"'
30089 gl_cv_next_sys_uio_h
='<'sys
/uio.h
'>'
30094 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5
30095 $as_echo "$gl_cv_next_sys_uio_h" >&6; }
30097 NEXT_SYS_UIO_H
=$gl_cv_next_sys_uio_h
30099 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
30100 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30101 gl_next_as_first_directive
='<'sys
/uio.h
'>'
30103 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30104 gl_next_as_first_directive
=$gl_cv_next_sys_uio_h
30106 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H
=$gl_next_as_first_directive
30111 if test $ac_cv_header_sys_uio_h = yes; then
30126 cat >>confdefs.h
<<_ACEOF
30127 #define GNULIB_TEMPNAME 1
30141 ac_fn_c_check_decl
"$LINENO" "localtime_r" "ac_cv_have_decl_localtime_r" "/* mingw's <time.h> provides the functions asctime_r, ctime_r,
30142 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
30143 been included before. */
30144 #if defined __MINGW32__
30145 # include <unistd.h>
30150 if test "x$ac_cv_have_decl_localtime_r" = xyes
; then :
30156 cat >>confdefs.h
<<_ACEOF
30157 #define HAVE_DECL_LOCALTIME_R $ac_have_decl
30160 if test $ac_cv_have_decl_localtime_r = no
; then
30161 HAVE_DECL_LOCALTIME_R
=0
30165 if test $ac_cv_func_localtime_r = yes; then
30167 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5
30168 $as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; }
30169 if ${gl_cv_time_r_posix+:} false
; then :
30170 $as_echo_n "(cached) " >&6
30172 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
30173 /* end confdefs.h. */
30174 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
30175 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
30176 been included before. */
30177 #if defined __MINGW32__
30178 # include <unistd.h>
30185 /* We don't need to append 'restrict's to the argument types,
30186 even though the POSIX signature has the 'restrict's,
30187 since C99 says they can't affect type compatibility. */
30188 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r;
30190 /* Check the return type is a pointer.
30191 On HP-UX 10 it is 'int'. */
30192 *localtime_r (0, 0);
30198 if ac_fn_c_try_compile
"$LINENO"; then :
30199 gl_cv_time_r_posix
=yes
30201 gl_cv_time_r_posix
=no
30203 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
30206 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5
30207 $as_echo "$gl_cv_time_r_posix" >&6; }
30208 if test $gl_cv_time_r_posix = yes; then
30209 REPLACE_LOCALTIME_R
=0
30211 REPLACE_LOCALTIME_R
=1
30215 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5
30216 $as_echo_n "checking whether localtime_r exists as an inline function... " >&6; }
30217 if ${gl_cv_func_localtime_r_inline+:} false
; then :
30218 $as_echo_n "(cached) " >&6
30220 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
30221 /* end confdefs.h. */
30222 /* mingw's <time.h> provides the functions asctime_r, ctime_r,
30223 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has
30224 been included before. */
30225 #if defined __MINGW32__
30226 # include <unistd.h>
30235 localtime_r (&a, &r);
30242 if ac_fn_c_try_link
"$LINENO"; then :
30243 gl_cv_func_localtime_r_inline
=yes
30245 gl_cv_func_localtime_r_inline
=no
30247 rm -f core conftest.err conftest.
$ac_objext \
30248 conftest
$ac_exeext conftest.
$ac_ext
30251 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5
30252 $as_echo "$gl_cv_func_localtime_r_inline" >&6; }
30253 if test $gl_cv_func_localtime_r_inline = yes; then
30254 REPLACE_LOCALTIME_R
=1
30258 if test $HAVE_LOCALTIME_R = 0 ||
test $REPLACE_LOCALTIME_R = 1; then
30267 gl_LIBOBJS
="$gl_LIBOBJS time_r.$ac_objext"
30284 $as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h
30300 if test $gl_cv_have_include_next = yes; then
30301 gl_cv_next_unistd_h
='<'unistd.h
'>'
30303 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5
30304 $as_echo_n "checking absolute name of <unistd.h>... " >&6; }
30305 if ${gl_cv_next_unistd_h+:} false
; then :
30306 $as_echo_n "(cached) " >&6
30309 if test $ac_cv_header_unistd_h = yes; then
30314 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
30315 /* end confdefs.h. */
30316 #include <unistd.h>
30319 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
30320 *) gl_absname_cpp
="$ac_cpp" ;;
30325 gl_dirsep_regex
='[/\\]'
30328 gl_dirsep_regex
='\/'
30331 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
30332 gl_header_literal_regex
=`echo 'unistd.h' \
30333 | sed -e "$gl_make_literal_regex_sed"`
30334 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30335 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30341 gl_cv_absolute_unistd_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30342 sed -n "$gl_absolute_header_sed"`
30344 gl_header
=$gl_cv_absolute_unistd_h
30345 gl_cv_next_unistd_h
='"'$gl_header'"'
30347 gl_cv_next_unistd_h
='<'unistd.h
'>'
30352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5
30353 $as_echo "$gl_cv_next_unistd_h" >&6; }
30355 NEXT_UNISTD_H
=$gl_cv_next_unistd_h
30357 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
30358 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30359 gl_next_as_first_directive
='<'unistd.h
'>'
30361 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30362 gl_next_as_first_directive
=$gl_cv_next_unistd_h
30364 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H
=$gl_next_as_first_directive
30369 if test $ac_cv_header_unistd_h = yes; then
30387 if test $ac_cv_have_decl_execvpe = no
; then
30388 HAVE_DECL_EXECVPE
=0
30397 if test $ac_cv_have_decl_unsetenv = no
; then
30398 HAVE_DECL_UNSETENV
=0
30400 for ac_func
in unsetenv
30402 ac_fn_c_check_func
"$LINENO" "unsetenv" "ac_cv_func_unsetenv"
30403 if test "x$ac_cv_func_unsetenv" = xyes
; then :
30404 cat >>confdefs.h
<<_ACEOF
30405 #define HAVE_UNSETENV 1
30411 if test $ac_cv_func_unsetenv = no
; then
30415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5
30416 $as_echo_n "checking for unsetenv() return type... " >&6; }
30417 if ${gt_cv_func_unsetenv_ret+:} false
; then :
30418 $as_echo_n "(cached) " >&6
30420 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
30421 /* end confdefs.h. */
30424 #define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */
30425 #include <stdlib.h>
30430 int unsetenv (const char *name);
30440 if ac_fn_c_try_compile
"$LINENO"; then :
30441 gt_cv_func_unsetenv_ret
='int'
30443 gt_cv_func_unsetenv_ret
='void'
30445 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
30447 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5
30448 $as_echo "$gt_cv_func_unsetenv_ret" >&6; }
30449 if test $gt_cv_func_unsetenv_ret = 'void'; then
30451 $as_echo "#define VOID_UNSETENV 1" >>confdefs.h
30456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5
30457 $as_echo_n "checking whether unsetenv obeys POSIX... " >&6; }
30458 if ${gl_cv_func_unsetenv_works+:} false
; then :
30459 $as_echo_n "(cached) " >&6
30461 if test "$cross_compiling" = yes; then :
30463 # Guess yes on glibc systems.
30464 *-gnu*) gl_cv_func_unsetenv_works
="guessing yes" ;;
30465 # If we don't know, obey --enable-cross-guesses.
30466 *) gl_cv_func_unsetenv_works
="$gl_cross_guess_normal" ;;
30470 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
30471 /* end confdefs.h. */
30473 #include <stdlib.h>
30475 extern char **environ;
30484 char entry1[] = "a=1";
30485 char entry2[] = "b=2";
30486 char *env[] = { entry1, entry2, NULL };
30487 if (putenv ((char *) "a=1")) return 1;
30488 if (putenv (entry2)) return 2;
30491 if (getenv ("a")) return 3;
30492 if (!unsetenv ("") || errno != EINVAL) return 4;
30495 if (!getenv ("a")) return 5;
30498 if (getenv ("a")) return 6;
30504 if ac_fn_c_try_run
"$LINENO"; then :
30505 gl_cv_func_unsetenv_works
=yes
30507 gl_cv_func_unsetenv_works
=no
30509 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
30510 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
30515 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5
30516 $as_echo "$gl_cv_func_unsetenv_works" >&6; }
30517 case "$gl_cv_func_unsetenv_works" in
30525 if test $HAVE_UNSETENV = 0 ||
test $REPLACE_UNSETENV = 1; then
30534 gl_LIBOBJS
="$gl_LIBOBJS unsetenv.$ac_objext"
30552 $as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h
30568 if test $gl_cv_have_include_next = yes; then
30569 gl_cv_next_wchar_h
='<'wchar.h
'>'
30571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5
30572 $as_echo_n "checking absolute name of <wchar.h>... " >&6; }
30573 if ${gl_cv_next_wchar_h+:} false
; then :
30574 $as_echo_n "(cached) " >&6
30577 if test $ac_cv_header_wchar_h = yes; then
30582 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
30583 /* end confdefs.h. */
30587 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
30588 *) gl_absname_cpp
="$ac_cpp" ;;
30593 gl_dirsep_regex
='[/\\]'
30596 gl_dirsep_regex
='\/'
30599 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
30600 gl_header_literal_regex
=`echo 'wchar.h' \
30601 | sed -e "$gl_make_literal_regex_sed"`
30602 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30603 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30609 gl_cv_absolute_wchar_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30610 sed -n "$gl_absolute_header_sed"`
30612 gl_header
=$gl_cv_absolute_wchar_h
30613 gl_cv_next_wchar_h
='"'$gl_header'"'
30615 gl_cv_next_wchar_h
='<'wchar.h
'>'
30620 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5
30621 $as_echo "$gl_cv_next_wchar_h" >&6; }
30623 NEXT_WCHAR_H
=$gl_cv_next_wchar_h
30625 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
30626 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30627 gl_next_as_first_directive
='<'wchar.h
'>'
30629 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30630 gl_next_as_first_directive
=$gl_cv_next_wchar_h
30632 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H
=$gl_next_as_first_directive
30637 if test $ac_cv_header_wchar_h = yes; then
30647 if test $gt_cv_c_wint_t = yes; then
30662 ac_fn_c_check_decl
"$LINENO" "wcsdup" "ac_cv_have_decl_wcsdup" "
30666 if test "x$ac_cv_have_decl_wcsdup" = xyes
; then :
30672 cat >>confdefs.h
<<_ACEOF
30673 #define HAVE_DECL_WCSDUP $ac_have_decl
30676 if test $ac_cv_have_decl_wcsdup = no
; then
30685 if test $ac_cv_func_iswcntrl = yes; then
30693 if test $gt_cv_c_wint_t = yes; then
30711 if test $gl_cv_have_include_next = yes; then
30712 gl_cv_next_wctype_h
='<'wctype.h
'>'
30714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5
30715 $as_echo_n "checking absolute name of <wctype.h>... " >&6; }
30716 if ${gl_cv_next_wctype_h+:} false
; then :
30717 $as_echo_n "(cached) " >&6
30720 if test $ac_cv_header_wctype_h = yes; then
30725 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
30726 /* end confdefs.h. */
30727 #include <wctype.h>
30730 aix
*) gl_absname_cpp
="$ac_cpp -C" ;;
30731 *) gl_absname_cpp
="$ac_cpp" ;;
30736 gl_dirsep_regex
='[/\\]'
30739 gl_dirsep_regex
='\/'
30742 gl_make_literal_regex_sed
='s,[]$^\\.*/[],\\&,g'
30743 gl_header_literal_regex
=`echo 'wctype.h' \
30744 | sed -e "$gl_make_literal_regex_sed"`
30745 gl_absolute_header_sed
="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{
30746 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/
30752 gl_cv_absolute_wctype_h
=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 |
30753 sed -n "$gl_absolute_header_sed"`
30755 gl_header
=$gl_cv_absolute_wctype_h
30756 gl_cv_next_wctype_h
='"'$gl_header'"'
30758 gl_cv_next_wctype_h
='<'wctype.h
'>'
30763 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5
30764 $as_echo "$gl_cv_next_wctype_h" >&6; }
30766 NEXT_WCTYPE_H
=$gl_cv_next_wctype_h
30768 if test $gl_cv_have_include_next = yes ||
test $gl_cv_have_include_next = buggy
; then
30769 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next'
30770 gl_next_as_first_directive
='<'wctype.h
'>'
30772 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include'
30773 gl_next_as_first_directive
=$gl_cv_next_wctype_h
30775 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H
=$gl_next_as_first_directive
30780 if test $ac_cv_header_wctype_h = yes; then
30781 if test $ac_cv_func_iswcntrl = yes; then
30782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5
30783 $as_echo_n "checking whether iswcntrl works... " >&6; }
30784 if ${gl_cv_func_iswcntrl_works+:} false
; then :
30785 $as_echo_n "(cached) " >&6
30788 if test "$cross_compiling" = yes; then :
30789 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
30790 /* end confdefs.h. */
30791 #include <stdlib.h>
30792 #if __GNU_LIBRARY__ == 1
30793 Linux libc5 i18n is broken.
30803 if ac_fn_c_try_compile
"$LINENO"; then :
30804 gl_cv_func_iswcntrl_works
="guessing yes"
30806 gl_cv_func_iswcntrl_works
="guessing no"
30808 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
30811 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
30812 /* end confdefs.h. */
30815 #include <wctype.h>
30816 int main () { return iswprint ('x') == 0; }
30819 if ac_fn_c_try_run
"$LINENO"; then :
30820 gl_cv_func_iswcntrl_works
=yes
30822 gl_cv_func_iswcntrl_works
=no
30824 rm -f core
*.core core.conftest.
* gmon.out bb.out conftest
$ac_exeext \
30825 conftest.
$ac_objext conftest.beam conftest.
$ac_ext
30830 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5
30831 $as_echo "$gl_cv_func_iswcntrl_works" >&6; }
30839 if test $GNULIB_OVERRIDES_WINT_T = 1; then
30842 case "$gl_cv_func_iswcntrl_works" in
30843 *yes) REPLACE_ISWCNTRL
=0 ;;
30844 *) REPLACE_ISWCNTRL
=1 ;;
30849 if test $HAVE_ISWCNTRL = 0 ||
test $REPLACE_ISWCNTRL = 1; then
30853 if test $REPLACE_ISWCNTRL = 1; then
30856 for ac_func
in towlower
30858 ac_fn_c_check_func
"$LINENO" "towlower" "ac_cv_func_towlower"
30859 if test "x$ac_cv_func_towlower" = xyes
; then :
30860 cat >>confdefs.h
<<_ACEOF
30861 #define HAVE_TOWLOWER 1
30867 if test $ac_cv_func_towlower = yes; then
30870 ac_fn_c_check_decl
"$LINENO" "towlower" "ac_cv_have_decl_towlower" "#include <wchar.h>
30872 # include <wctype.h>
30876 if test "x$ac_cv_have_decl_towlower" = xyes
; then :
30882 cat >>confdefs.h
<<_ACEOF
30883 #define HAVE_DECL_TOWLOWER $ac_have_decl
30886 if test $ac_cv_have_decl_towlower = yes; then
30895 if test $HAVE_ISWCNTRL = 0 ||
test $REPLACE_TOWLOWER = 1; then
30899 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5
30900 $as_echo_n "checking for wctype_t... " >&6; }
30901 if ${gl_cv_type_wctype_t+:} false
; then :
30902 $as_echo_n "(cached) " >&6
30904 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
30905 /* end confdefs.h. */
30908 # include <wctype.h>
30920 if ac_fn_c_try_compile
"$LINENO"; then :
30921 gl_cv_type_wctype_t
=yes
30923 gl_cv_type_wctype_t
=no
30925 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
30928 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5
30929 $as_echo "$gl_cv_type_wctype_t" >&6; }
30930 if test $gl_cv_type_wctype_t = no
; then
30934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5
30935 $as_echo_n "checking for wctrans_t... " >&6; }
30936 if ${gl_cv_type_wctrans_t+:} false
; then :
30937 $as_echo_n "(cached) " >&6
30939 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
30940 /* end confdefs.h. */
30942 #include <wctype.h>
30953 if ac_fn_c_try_compile
"$LINENO"; then :
30954 gl_cv_type_wctrans_t
=yes
30956 gl_cv_type_wctrans_t
=no
30958 rm -f core conftest.err conftest.
$ac_objext conftest.
$ac_ext
30961 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5
30962 $as_echo "$gl_cv_type_wctrans_t" >&6; }
30963 if test $gl_cv_type_wctrans_t = no
; then
30982 gl_LIBOBJS
="$gl_LIBOBJS windows-mutex.$ac_objext"
30997 gl_LIBOBJS
="$gl_LIBOBJS windows-once.$ac_objext"
31012 gl_LIBOBJS
="$gl_LIBOBJS windows-recmutex.$ac_objext"
31027 gl_LIBOBJS
="$gl_LIBOBJS windows-rwlock.$ac_objext"
31033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5
31034 $as_echo_n "checking for wmemchr... " >&6; }
31035 if ${gl_cv_func_wmemchr+:} false
; then :
31036 $as_echo_n "(cached) " >&6
31038 cat confdefs.h
- <<_ACEOF >conftest.$ac_ext
31039 /* end confdefs.h. */
31045 return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0);
31051 if ac_fn_c_try_link
"$LINENO"; then :
31052 gl_cv_func_wmemchr
=yes
31054 gl_cv_func_wmemchr
=no
31056 rm -f core conftest.err conftest.
$ac_objext \
31057 conftest
$ac_exeext conftest.
$ac_ext
31060 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5
31061 $as_echo "$gl_cv_func_wmemchr" >&6; }
31062 if test $gl_cv_func_wmemchr = no
; then
31066 if test $HAVE_WMEMCHR = 0; then
31075 gl_LIBOBJS
="$gl_LIBOBJS wmemchr.$ac_objext"
31089 $as_echo "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h
31101 if test $ac_cv_func_wmempcpy = no
; then
31105 if test $HAVE_WMEMPCPY = 0; then
31114 gl_LIBOBJS
="$gl_LIBOBJS wmempcpy.$ac_objext"
31128 $as_echo "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h
31132 # End of code from modules
31154 gl_source_base
='tests'
31155 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
31157 gl_module_indicator_condition
=$gltests_WITNESS
31167 LIBGNU_LIBDEPS
="$gl_libdeps"
31169 LIBGNU_LTLIBDEPS
="$gl_ltlibdeps"
31173 am__api_version
='1.15'
31175 # Find a good install program. We prefer a C program (faster),
31176 # so one script is as good as another. But avoid the broken or
31177 # incompatible versions:
31178 # SysV /etc/install, /usr/sbin/install
31179 # SunOS /usr/etc/install
31180 # IRIX /sbin/install
31182 # AmigaOS /C/install, which installs bootblocks on floppy discs
31183 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
31184 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
31185 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
31186 # OS/2's system install, which has a completely different semantic
31187 # ./install, which can be erroneously created by make from ./install.sh.
31188 # Reject install programs that cannot install multiple files.
31189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
31190 $as_echo_n "checking for a BSD-compatible install... " >&6; }
31191 if test -z "$INSTALL"; then
31192 if ${ac_cv_path_install+:} false
; then :
31193 $as_echo_n "(cached) " >&6
31195 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
31196 for as_dir
in $PATH
31199 test -z "$as_dir" && as_dir
=.
31200 # Account for people who put trailing slashes in PATH elements.
31201 case $as_dir/ in #((
31202 .
/ | .
// |
/[cC
]/* | \
31203 /etc
/* |
/usr
/sbin
/* |
/usr
/etc
/* |
/sbin
/* |
/usr
/afsws
/bin
/* | \
31204 ?
:[\\/]os2
[\\/]install[\\/]* | ?
:[\\/]OS2
[\\/]INSTALL
[\\/]* | \
31207 # OSF1 and SCO ODT 3.0 have their own names for install.
31208 # Don't use installbsd from OSF since it installs stuff as root
31210 for ac_prog
in ginstall scoinst
install; do
31211 for ac_exec_ext
in '' $ac_executable_extensions; do
31212 if as_fn_executable_p
"$as_dir/$ac_prog$ac_exec_ext"; then
31213 if test $ac_prog = install &&
31214 grep dspmsg
"$as_dir/$ac_prog$ac_exec_ext" >/dev
/null
2>&1; then
31215 # AIX install. It has an incompatible calling convention.
31217 elif test $ac_prog = install &&
31218 grep pwplus
"$as_dir/$ac_prog$ac_exec_ext" >/dev
/null
2>&1; then
31219 # program-specific install script used by HP pwplus--don't use.
31222 rm -rf conftest.one conftest.two conftest.dir
31223 echo one
> conftest.one
31224 echo two
> conftest.two
31226 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two
"`pwd`/conftest.dir" &&
31227 test -s conftest.one
&& test -s conftest.two
&&
31228 test -s conftest.dir
/conftest.one
&&
31229 test -s conftest.dir
/conftest.two
31231 ac_cv_path_install
="$as_dir/$ac_prog$ac_exec_ext -c"
31244 rm -rf conftest.one conftest.two conftest.dir
31247 if test "${ac_cv_path_install+set}" = set; then
31248 INSTALL
=$ac_cv_path_install
31250 # As a last resort, use the slow shell script. Don't cache a
31251 # value for INSTALL within a source directory, because that will
31252 # break other packages using the cache if that directory is
31253 # removed, or if the value is a relative name.
31254 INSTALL
=$ac_install_sh
31257 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
31258 $as_echo "$INSTALL" >&6; }
31260 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
31261 # It thinks the first close brace ends the variable substitution.
31262 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM
='${INSTALL}'
31264 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT
='${INSTALL}'
31266 test -z "$INSTALL_DATA" && INSTALL_DATA
='${INSTALL} -m 644'
31268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5
31269 $as_echo_n "checking whether build environment is sane... " >&6; }
31270 # Reject unsafe characters in $srcdir or the absolute working directory
31271 # name. Accept space and tab only in the latter.
31275 *[\\\"\
#\$\&\'\`$am_lf]*)
31276 as_fn_error $?
"unsafe absolute working directory name" "$LINENO" 5;;
31279 *[\\\"\
#\$\&\'\`$am_lf\ \ ]*)
31280 as_fn_error $?
"unsafe srcdir value: '$srcdir'" "$LINENO" 5;;
31283 # Do 'set' in a subshell so we don't clobber the current shell's
31284 # arguments. Must try -L first in case configure is actually a
31285 # symlink; some systems play weird games with the mod time of symlinks
31286 # (eg FreeBSD returns the mod time of the symlink's containing
31290 for am_try
in 1 2; do
31291 echo "timestamp, slept: $am_has_slept" > conftest.
file
31292 set X
`ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
31293 if test "$*" = "X"; then
31295 set X
`ls -t "$srcdir/configure" conftest.file`
31297 if test "$*" != "X $srcdir/configure conftest.file" \
31298 && test "$*" != "X conftest.file $srcdir/configure"; then
31300 # If neither matched, then we have a broken ls. This can happen
31301 # if, for instance, CONFIG_SHELL is bash and it inherits a
31302 # broken ls alias from the environment. This has actually
31303 # happened. Such a system could not be considered "sane".
31304 as_fn_error $?
"ls -t appears to fail. Make sure there is not a broken
31305 alias in your environment" "$LINENO" 5
31307 if test "$2" = conftest.
file ||
test $am_try -eq 2; then
31314 test "$2" = conftest.
file
31320 as_fn_error $?
"newly created file is older than distributed files!
31321 Check your system clock" "$LINENO" 5
31323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31324 $as_echo "yes" >&6; }
31325 # If we didn't sleep, we still need to ensure time stamps of config.status and
31326 # generated files are strictly newer.
31328 if grep 'slept: no' conftest.
file >/dev
/null
2>&1; then
31333 rm -f conftest.
file
31335 test "$program_prefix" != NONE
&&
31336 program_transform_name
="s&^&$program_prefix&;$program_transform_name"
31337 # Use a double $ so make ignores it.
31338 test "$program_suffix" != NONE
&&
31339 program_transform_name
="s&\$&$program_suffix&;$program_transform_name"
31340 # Double any \ or $.
31341 # By default was `s,x,x', remove it if useless.
31342 ac_script
='s/[\\$]/&&/g;s/;s,x,x,$//'
31343 program_transform_name
=`$as_echo "$program_transform_name" | sed "$ac_script"`
31345 # Expand $ac_aux_dir to an absolute path.
31346 am_aux_dir
=`cd "$ac_aux_dir" && pwd`
31348 if test x
"${MISSING+set}" != xset
; then
31349 case $am_aux_dir in
31351 MISSING
="\${SHELL} \"$am_aux_dir/missing\"" ;;
31353 MISSING
="\${SHELL} $am_aux_dir/missing" ;;
31356 # Use eval to expand $SHELL
31357 if eval "$MISSING --is-lightweight"; then
31358 am_missing_run
="$MISSING "
31361 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5
31362 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;}
31365 if test x
"${install_sh+set}" != xset
; then
31366 case $am_aux_dir in
31368 install_sh
="\${SHELL} '$am_aux_dir/install-sh'" ;;
31370 install_sh
="\${SHELL} $am_aux_dir/install-sh"
31374 # Installed binaries are usually stripped using 'strip' when the user
31375 # run "make install-strip". However 'strip' might not be the right
31376 # tool to use in cross-compilation environments, therefore Automake
31377 # will honor the 'STRIP' environment variable to overrule this program.
31378 if test "$cross_compiling" != no
; then
31379 if test -n "$ac_tool_prefix"; then
31380 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
31381 set dummy
${ac_tool_prefix}strip
; ac_word
=$2
31382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31383 $as_echo_n "checking for $ac_word... " >&6; }
31384 if ${ac_cv_prog_STRIP+:} false
; then :
31385 $as_echo_n "(cached) " >&6
31387 if test -n "$STRIP"; then
31388 ac_cv_prog_STRIP
="$STRIP" # Let the user override the test.
31390 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
31391 for as_dir
in $PATH
31394 test -z "$as_dir" && as_dir
=.
31395 for ac_exec_ext
in '' $ac_executable_extensions; do
31396 if as_fn_executable_p
"$as_dir/$ac_word$ac_exec_ext"; then
31397 ac_cv_prog_STRIP
="${ac_tool_prefix}strip"
31398 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31407 STRIP
=$ac_cv_prog_STRIP
31408 if test -n "$STRIP"; then
31409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
31410 $as_echo "$STRIP" >&6; }
31412 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31413 $as_echo "no" >&6; }
31418 if test -z "$ac_cv_prog_STRIP"; then
31420 # Extract the first word of "strip", so it can be a program name with args.
31421 set dummy strip
; ac_word
=$2
31422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31423 $as_echo_n "checking for $ac_word... " >&6; }
31424 if ${ac_cv_prog_ac_ct_STRIP+:} false
; then :
31425 $as_echo_n "(cached) " >&6
31427 if test -n "$ac_ct_STRIP"; then
31428 ac_cv_prog_ac_ct_STRIP
="$ac_ct_STRIP" # Let the user override the test.
31430 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
31431 for as_dir
in $PATH
31434 test -z "$as_dir" && as_dir
=.
31435 for ac_exec_ext
in '' $ac_executable_extensions; do
31436 if as_fn_executable_p
"$as_dir/$ac_word$ac_exec_ext"; then
31437 ac_cv_prog_ac_ct_STRIP
="strip"
31438 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31447 ac_ct_STRIP
=$ac_cv_prog_ac_ct_STRIP
31448 if test -n "$ac_ct_STRIP"; then
31449 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
31450 $as_echo "$ac_ct_STRIP" >&6; }
31452 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31453 $as_echo "no" >&6; }
31456 if test "x$ac_ct_STRIP" = x
; then
31459 case $cross_compiling:$ac_tool_warned in
31461 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
31462 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
31463 ac_tool_warned
=yes ;;
31468 STRIP
="$ac_cv_prog_STRIP"
31472 INSTALL_STRIP_PROGRAM
="\$(install_sh) -c -s"
31474 for ac_prog
in gawk mawk nawk
awk
31476 # Extract the first word of "$ac_prog", so it can be a program name with args.
31477 set dummy
$ac_prog; ac_word
=$2
31478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31479 $as_echo_n "checking for $ac_word... " >&6; }
31480 if ${ac_cv_prog_AWK+:} false
; then :
31481 $as_echo_n "(cached) " >&6
31483 if test -n "$AWK"; then
31484 ac_cv_prog_AWK
="$AWK" # Let the user override the test.
31486 as_save_IFS
=$IFS; IFS
=$PATH_SEPARATOR
31487 for as_dir
in $PATH
31490 test -z "$as_dir" && as_dir
=.
31491 for ac_exec_ext
in '' $ac_executable_extensions; do
31492 if as_fn_executable_p
"$as_dir/$ac_word$ac_exec_ext"; then
31493 ac_cv_prog_AWK
="$ac_prog"
31494 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31503 AWK
=$ac_cv_prog_AWK
31504 if test -n "$AWK"; then
31505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
31506 $as_echo "$AWK" >&6; }
31508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31509 $as_echo "no" >&6; }
31513 test -n "$AWK" && break
31516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5
31517 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
31519 ac_make
=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
31520 if eval \
${ac_cv_prog_make_${ac_make}_set+:} false
; then :
31521 $as_echo_n "(cached) " >&6
31523 cat >conftest.
make <<\_ACEOF
31526 @
echo '@@@%%%=$(MAKE)=@@@%%%'
31528 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
31529 case `${MAKE-make} -f conftest.make 2>/dev/null` in
31530 *@@@
%%%=?
*=@@@
%%%*)
31531 eval ac_cv_prog_make_
${ac_make}_set
=yes;;
31533 eval ac_cv_prog_make_
${ac_make}_set
=no
;;
31535 rm -f conftest.
make
31537 if eval test \
$ac_cv_prog_make_${ac_make}_set
= yes; then
31538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31539 $as_echo "yes" >&6; }
31542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31543 $as_echo "no" >&6; }
31544 SET_MAKE
="MAKE=${MAKE-make}"
31547 rm -rf .tst
2>/dev
/null
31548 mkdir .tst
2>/dev
/null
31549 if test -d .tst
; then
31554 rmdir .tst
2>/dev
/null
31556 DEPDIR
="${am__leading_dot}deps"
31558 ac_config_commands
="$ac_config_commands depfiles"
31561 am_make
=${MAKE-make}
31562 cat > confinc
<< 'END'
31564 @
echo this is the am__doit target
31567 # If we don't find an include directive, just comment out the code.
31568 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5
31569 $as_echo_n "checking for style of include used by $am_make... " >&6; }
31573 # First try GNU make style include.
31574 echo "include confinc" > confmf
31575 # Ignore all kinds of additional output from 'make'.
31576 case `$am_make -s -f confmf 2> /dev/null` in #(
31577 *the\ am__doit\ target
*)
31578 am__include
=include
31583 # Now try BSD make style include.
31584 if test "$am__include" = "#"; then
31585 echo '.include "confinc"' > confmf
31586 case `$am_make -s -f confmf 2> /dev/null` in #(
31587 *the\ am__doit\ target
*)
31588 am__include
=.include
31596 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5
31597 $as_echo "$_am_result" >&6; }
31598 rm -f confinc confmf
31600 # Check whether --enable-dependency-tracking was given.
31601 if test "${enable_dependency_tracking+set}" = set; then :
31602 enableval
=$enable_dependency_tracking;
31605 if test "x$enable_dependency_tracking" != xno
; then
31606 am_depcomp
="$ac_aux_dir/depcomp"
31610 if test "x$enable_dependency_tracking" != xno; then
31619 # Check whether --enable-silent-rules was given.
31620 if test "${enable_silent_rules+set}" = set; then :
31621 enableval
=$enable_silent_rules;
31624 case $enable_silent_rules in # (((
31625 yes) AM_DEFAULT_VERBOSITY
=0;;
31626 no
) AM_DEFAULT_VERBOSITY
=1;;
31627 *) AM_DEFAULT_VERBOSITY
=1;;
31629 am_make
=${MAKE-make}
31630 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
31631 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
31632 if ${am_cv_make_support_nested_variables+:} false
; then :
31633 $as_echo_n "(cached) " >&6
31635 if $as_echo 'TRUE=$(BAR$(V))
31641 .PHONY: am__doit' |
$am_make -f - >/dev
/null
2>&1; then
31642 am_cv_make_support_nested_variables
=yes
31644 am_cv_make_support_nested_variables
=no
31647 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
31648 $as_echo "$am_cv_make_support_nested_variables" >&6; }
31649 if test $am_cv_make_support_nested_variables = yes; then
31651 AM_DEFAULT_V
='$(AM_DEFAULT_VERBOSITY)'
31653 AM_V
=$AM_DEFAULT_VERBOSITY
31654 AM_DEFAULT_V
=$AM_DEFAULT_VERBOSITY
31658 if test "`cd $srcdir && pwd`" != "`pwd`"; then
31659 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
31660 # is not polluted with repeated "-I."
31661 am__isrc
=' -I$(srcdir)'
31662 # test to see if srcdir already configured
31663 if test -f $srcdir/config.status
; then
31664 as_fn_error $?
"source directory already configured; run \"make distclean\" there first" "$LINENO" 5
31668 # test whether we have cygpath
31669 if test -z "$CYGPATH_W"; then
31670 if (cygpath
--version) >/dev
/null
2>/dev
/null
; then
31671 CYGPATH_W
='cygpath -w'
31678 # Define the identity of the package.
31680 VERSION
='UNUSED-VERSION'
31683 # Some tools Automake needs.
31685 ACLOCAL
=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"}
31688 AUTOCONF
=${AUTOCONF-"${am_missing_run}autoconf"}
31691 AUTOMAKE
=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"}
31694 AUTOHEADER
=${AUTOHEADER-"${am_missing_run}autoheader"}
31697 MAKEINFO
=${MAKEINFO-"${am_missing_run}makeinfo"}
31699 # For better backward compatibility. To be removed once Automake 1.9.x
31700 # dies out for good. For more background, see:
31701 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html>
31702 # <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html>
31703 mkdir_p
='$(MKDIR_P)'
31705 # We need awk for the "check" target (and possibly the TAP driver). The
31706 # system "awk" is bad on some platforms.
31707 # Always define AMTAR for backward compatibility. Yes, it's still used
31708 # in the wild :-( We should find a proper way to deprecate it ...
31709 AMTAR
='$${TAR-tar}'
31712 # We'll loop over all known methods to create a tar archive until one works.
31713 _am_tools
='gnutar pax cpio none'
31715 am__tar
='$${TAR-tar} chof - "$$tardir"' am__untar
='$${TAR-tar} xf -'
31721 depcc
="$CC" am_compiler_list
=
31723 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
31724 $as_echo_n "checking dependency style of $depcc... " >&6; }
31725 if ${am_cv_CC_dependencies_compiler_type+:} false
; then :
31726 $as_echo_n "(cached) " >&6
31728 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then
31729 # We make a subdir and do the tests there. Otherwise we can end up
31730 # making bogus files that we don't know about and never remove. For
31731 # instance it was reported that on HP-UX the gcc test will end up
31732 # making a dummy file named 'D' -- because '-MD' means "put the output
31734 rm -rf conftest.dir
31736 # Copy depcomp to subdir because otherwise we won't find it if we're
31737 # using a relative directory.
31738 cp "$am_depcomp" conftest.dir
31740 # We will build objects and dependencies in a subdirectory because
31741 # it helps to detect inapplicable dependency modes. For instance
31742 # both Tru64's cc and ICC support -MD to output dependencies as a
31743 # side effect of compilation, but ICC will put the dependencies in
31744 # the current directory while Tru64 will put them in the object
31748 am_cv_CC_dependencies_compiler_type
=none
31749 if test "$am_compiler_list" = ""; then
31750 am_compiler_list
=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
31752 am__universal
=false
31753 case " $depcc " in #(
31754 *\
-arch\
*\
-arch\
*) am__universal
=true
;;
31757 for depmode
in $am_compiler_list; do
31758 # Setup a source with many dependencies, because some compilers
31759 # like to wrap large dependency lists on column 80 (with \), and
31760 # we should not choose a depcomp mode which is confused by this.
31762 # We need to recreate these files for each test, as the compiler may
31763 # overwrite some of them when testing with obscure command lines.
31764 # This happens at least with the AIX C compiler.
31766 for i
in 1 2 3 4 5 6; do
31767 echo '#include "conftst'$i'.h"' >> sub
/conftest.c
31768 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with
31769 # Solaris 10 /bin/sh.
31770 echo '/* dummy */' > sub
/conftst
$i.h
31772 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
31774 # We check with '-c' and '-o' for the sake of the "dashmstdout"
31775 # mode. It turns out that the SunPro C++ compiler does not properly
31776 # handle '-M -o', and we need to detect this. Also, some Intel
31777 # versions had trouble with output in subdirs.
31778 am__obj
=sub
/conftest.
${OBJEXT-o}
31779 am__minus_obj
="-o $am__obj"
31782 # This depmode causes a compiler race in universal mode.
31783 test "$am__universal" = false ||
continue
31786 # After this tag, mechanisms are not by side-effect, so they'll
31787 # only be used when explicitly requested.
31788 if test "x$enable_dependency_tracking" = xyes
; then
31794 msvc7 | msvc7msys | msvisualcpp | msvcmsys
)
31795 # This compiler won't grok '-c -o', but also, the minuso test has
31796 # not run yet. These depmodes are late enough in the game, and
31797 # so weak that their functioning should not be impacted.
31798 am__obj
=conftest.
${OBJEXT-o}
31803 if depmode
=$depmode \
31804 source=sub
/conftest.c object
=$am__obj \
31805 depfile
=sub
/conftest.Po tmpdepfile
=sub
/conftest.TPo \
31806 $SHELL .
/depcomp
$depcc -c $am__minus_obj sub
/conftest.c \
31807 >/dev
/null
2>conftest.err
&&
31808 grep sub
/conftst1.h sub
/conftest.Po
> /dev
/null
2>&1 &&
31809 grep sub
/conftst6.h sub
/conftest.Po
> /dev
/null
2>&1 &&
31810 grep $am__obj sub
/conftest.Po
> /dev
/null
2>&1 &&
31811 ${MAKE-make} -s -f confmf
> /dev
/null
2>&1; then
31812 # icc doesn't choke on unknown options, it will just issue warnings
31813 # or remarks (even with -Werror). So we grep stderr for any message
31814 # that says an option was ignored or not supported.
31815 # When given -MP, icc 7.0 and 7.1 complain thusly:
31816 # icc: Command line warning: ignoring option '-M'; no argument required
31817 # The diagnosis changed in icc 8.0:
31818 # icc: Command line remark: option '-MP' not supported
31819 if (grep 'ignoring option' conftest.err ||
31820 grep 'not supported' conftest.err
) >/dev
/null
2>&1; then :; else
31821 am_cv_CC_dependencies_compiler_type
=$depmode
31828 rm -rf conftest.dir
31830 am_cv_CC_dependencies_compiler_type
=none
31834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
31835 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
31836 CCDEPMODE
=depmode
=$am_cv_CC_dependencies_compiler_type
31839 test "x$enable_dependency_tracking" != xno \
31840 && test "$am_cv_CC_dependencies_compiler_type" = gcc3
; then
31841 am__fastdepCC_TRUE
=
31842 am__fastdepCC_FALSE
='#'
31844 am__fastdepCC_TRUE
='#'
31845 am__fastdepCC_FALSE
=
31850 # POSIX will say in a future version that running "rm -f" with no argument
31851 # is OK; and we want to be able to make that assumption in our Makefile
31852 # recipes. So use an aggressive probe to check that the usage we want is
31853 # actually supported "in the wild" to an acceptable degree.
31854 # See automake bug#10828.
31855 # To make any issue more visible, cause the running configure to be aborted
31856 # by default if the 'rm' program in use doesn't match our expectations; the
31857 # user can still override this though.
31858 if rm -f && rm -fr && rm -rf; then : OK
; else
31862 Your 'rm' program seems unable to run without file operands specified
31863 on the command line, even when the '-f' option is present. This is contrary
31864 to the behaviour of most rm programs out there, and not conforming with
31865 the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542>
31867 Please tell bug-automake@gnu.org about your system, including the value
31868 of your $PATH and any error possibly output before this message. This
31869 can help us improve future automake versions.
31872 if test x
"$ACCEPT_INFERIOR_RM_PROGRAM" = x
"yes"; then
31873 echo 'Configuration will proceed anyway, since you have set the' >&2
31874 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2
31878 Aborting the configuration process, to ensure you take notice of the issue.
31880 You can download and install GNU coreutils to get an 'rm' implementation
31881 that behaves properly: <http://www.gnu.org/software/coreutils/>.
31883 If you want to complete the configuration process using your problematic
31884 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM
31885 to "yes", and re-run configure.
31888 as_fn_error $?
"Your 'rm' program is bad, sorry." "$LINENO" 5
31893 # Check whether --enable-silent-rules was given.
31894 if test "${enable_silent_rules+set}" = set; then :
31895 enableval
=$enable_silent_rules;
31898 case $enable_silent_rules in # (((
31899 yes) AM_DEFAULT_VERBOSITY
=0;;
31900 no
) AM_DEFAULT_VERBOSITY
=1;;
31901 *) AM_DEFAULT_VERBOSITY
=0;;
31903 am_make
=${MAKE-make}
31904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5
31905 $as_echo_n "checking whether $am_make supports nested variables... " >&6; }
31906 if ${am_cv_make_support_nested_variables+:} false
; then :
31907 $as_echo_n "(cached) " >&6
31909 if $as_echo 'TRUE=$(BAR$(V))
31915 .PHONY: am__doit' |
$am_make -f - >/dev
/null
2>&1; then
31916 am_cv_make_support_nested_variables
=yes
31918 am_cv_make_support_nested_variables
=no
31921 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5
31922 $as_echo "$am_cv_make_support_nested_variables" >&6; }
31923 if test $am_cv_make_support_nested_variables = yes; then
31925 AM_DEFAULT_V
='$(AM_DEFAULT_VERBOSITY)'
31927 AM_V
=$AM_DEFAULT_VERBOSITY
31928 AM_DEFAULT_V
=$AM_DEFAULT_VERBOSITY
31933 # --------------------- #
31934 # Checks for programs. #
31935 # --------------------- #
31938 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
31939 $as_echo_n "checking whether ln -s works... " >&6; }
31941 if test "$LN_S" = "ln -s"; then
31942 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31943 $as_echo "yes" >&6; }
31945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
31946 $as_echo "no, using $LN_S" >&6; }
31949 if test -n "$ac_tool_prefix"; then
31950 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
31951 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
31952 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31953 $as_echo_n "checking for $ac_word... " >&6; }
31954 if ${ac_cv_prog_RANLIB+:} false; then :
31955 $as_echo_n "(cached) " >&6
31957 if test -n "$RANLIB"; then
31958 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
31960 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31961 for as_dir in $PATH
31964 test -z "$as_dir" && as_dir=.
31965 for ac_exec_ext in '' $ac_executable_extensions; do
31966 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31967 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
31968 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31977 RANLIB=$ac_cv_prog_RANLIB
31978 if test -n "$RANLIB"; then
31979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
31980 $as_echo "$RANLIB" >&6; }
31982 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31983 $as_echo "no" >&6; }
31988 if test -z "$ac_cv_prog_RANLIB"; then
31989 ac_ct_RANLIB=$RANLIB
31990 # Extract the first word of "ranlib", so it can be a program name with args.
31991 set dummy ranlib; ac_word=$2
31992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31993 $as_echo_n "checking for $ac_word... " >&6; }
31994 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
31995 $as_echo_n "(cached) " >&6
31997 if test -n "$ac_ct_RANLIB"; then
31998 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
32000 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32001 for as_dir in $PATH
32004 test -z "$as_dir" && as_dir=.
32005 for ac_exec_ext in '' $ac_executable_extensions; do
32006 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32007 ac_cv_prog_ac_ct_RANLIB="ranlib"
32008 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32017 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
32018 if test -n "$ac_ct_RANLIB"; then
32019 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
32020 $as_echo "$ac_ct_RANLIB" >&6; }
32022 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32023 $as_echo "no" >&6; }
32026 if test "x$ac_ct_RANLIB" = x; then
32029 case $cross_compiling:$ac_tool_warned in
32031 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32032 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32033 ac_tool_warned=yes ;;
32035 RANLIB=$ac_ct_RANLIB
32038 RANLIB="$ac_cv_prog_RANLIB"
32042 if test -n "$ac_tool_prefix"; then
32043 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
32044 set dummy ${ac_tool_prefix}ar; ac_word=$2
32045 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32046 $as_echo_n "checking for $ac_word... " >&6; }
32047 if ${ac_cv_prog_AR+:} false; then :
32048 $as_echo_n "(cached) " >&6
32050 if test -n "$AR"; then
32051 ac_cv_prog_AR="$AR" # Let the user override the test.
32053 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32054 for as_dir in $PATH
32057 test -z "$as_dir" && as_dir=.
32058 for ac_exec_ext in '' $ac_executable_extensions; do
32059 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32060 ac_cv_prog_AR="${ac_tool_prefix}ar"
32061 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32071 if test -n "$AR"; then
32072 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
32073 $as_echo "$AR" >&6; }
32075 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32076 $as_echo "no" >&6; }
32081 if test -z "$ac_cv_prog_AR"; then
32083 # Extract the first word of "ar", so it can be a program name with args.
32084 set dummy ar; ac_word=$2
32085 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32086 $as_echo_n "checking for $ac_word... " >&6; }
32087 if ${ac_cv_prog_ac_ct_AR+:} false; then :
32088 $as_echo_n "(cached) " >&6
32090 if test -n "$ac_ct_AR"; then
32091 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
32093 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32094 for as_dir in $PATH
32097 test -z "$as_dir" && as_dir=.
32098 for ac_exec_ext in '' $ac_executable_extensions; do
32099 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32100 ac_cv_prog_ac_ct_AR="ar"
32101 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32110 ac_ct_AR=$ac_cv_prog_ac_ct_AR
32111 if test -n "$ac_ct_AR"; then
32112 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
32113 $as_echo "$ac_ct_AR" >&6; }
32115 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32116 $as_echo "no" >&6; }
32119 if test "x$ac_ct_AR" = x; then
32122 case $cross_compiling:$ac_tool_warned in
32124 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
32125 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
32126 ac_tool_warned=yes ;;
32131 AR="$ac_cv_prog_AR"
32135 # ---------------------- #
32136 # Checks for libraries. #
32137 # ---------------------- #
32139 ac_config_files="$ac_config_files Makefile.gnulib.inc"
32142 ac_config_files="$ac_config_files Makefile import/Makefile"
32144 ac_config_commands="$ac_config_commands default"
32146 cat >confcache <<\_ACEOF
32147 # This file is a shell script that caches the results of configure
32148 # tests run on this system so they can be shared between configure
32149 # scripts and configure runs, see configure's option
--config-cache.
32150 # It is not useful on other systems. If it contains results you don't
32151 # want to keep, you may remove or edit it.
32153 # config.status only pays attention to the cache file if you give it
32154 # the --recheck option to rerun configure.
32156 # `ac_cv_env_foo' variables (set or unset) will be overridden when
32157 # loading this file, other *unset* `ac_cv_foo' will be assigned the
32158 # following values.
32162 # The following way of writing the cache mishandles newlines in values,
32163 # but we know of no workaround that is simple, portable, and efficient.
32164 # So, we kill variables containing newlines.
32165 # Ultrix sh set writes to stderr and can't be redirected directly,
32166 # and sets the high bit in the cache file unless we assign to the vars.
32168 for ac_var
in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
32169 eval ac_val
=\$
$ac_var
32173 *_cv_
*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
32174 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
32177 _ | IFS | as_nl
) ;; #(
32178 BASH_ARGV | BASH_SOURCE
) eval $ac_var= ;; #(
32179 *) { eval $ac_var=; unset $ac_var;} ;;
32185 case $as_nl`(ac_space=' '; set) 2>&1` in #(
32186 *${as_nl}ac_space
=\
*)
32187 # `set' does not quote correctly, so add quotes: double-quote
32188 # substitution turns \\\\ into \\, and sed turns \\ into \.
32191 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
32194 # `set' quotes correctly as required by POSIX, so do not add quotes.
32195 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
32204 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
32206 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
32208 if diff "$cache_file" confcache
>/dev
/null
2>&1; then :; else
32209 if test -w "$cache_file"; then
32210 if test "x$cache_file" != "x/dev/null"; then
32211 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
32212 $as_echo "$as_me: updating cache $cache_file" >&6;}
32213 if test ! -f "$cache_file" ||
test -h "$cache_file"; then
32214 cat confcache
>"$cache_file"
32216 case $cache_file in #(
32218 mv -f confcache
"$cache_file"$$
&&
32219 mv -f "$cache_file"$$
"$cache_file" ;; #(
32221 mv -f confcache
"$cache_file" ;;
32226 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
32227 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
32232 test "x$prefix" = xNONE
&& prefix
=$ac_default_prefix
32233 # Let make expand exec_prefix.
32234 test "x$exec_prefix" = xNONE
&& exec_prefix
='${prefix}'
32236 DEFS
=-DHAVE_CONFIG_H
32240 for ac_i
in : $LIBOBJS; do test "x$ac_i" = x
: && continue
32241 # 1. Remove the extension, and $U if already installed.
32242 ac_script
='s/\$U\././;s/\.o$//;s/\.obj$//'
32243 ac_i
=`$as_echo "$ac_i" | sed "$ac_script"`
32244 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
32245 # will be set to the directory where LIBOBJS objects are built.
32246 as_fn_append ac_libobjs
" \${LIBOBJDIR}$ac_i\$U.$ac_objext"
32247 as_fn_append ac_ltlibobjs
" \${LIBOBJDIR}$ac_i"'$U.lo'
32249 LIBOBJS
=$ac_libobjs
32251 LTLIBOBJS
=$ac_ltlibobjs
32254 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
32255 as_fn_error $?
"conditional \"MAINTAINER_MODE\" was never defined.
32256 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32258 if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then
32259 as_fn_error $?
"conditional \"GL_COND_LIBTOOL\" was never defined.
32260 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32262 if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then
32263 as_fn_error $?
"conditional \"GL_GENERATE_ALLOCA_H\" was never defined.
32264 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32266 if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then
32267 as_fn_error $?
"conditional \"GL_GENERATE_ERRNO_H\" was never defined.
32268 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32270 if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then
32271 as_fn_error $?
"conditional \"GL_GENERATE_FLOAT_H\" was never defined.
32272 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32274 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
32275 as_fn_error $?
"conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
32276 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32278 if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then
32279 as_fn_error $?
"conditional \"GL_GENERATE_FNMATCH_H\" was never defined.
32280 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32282 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
32283 as_fn_error $?
"conditional \"GL_GENERATE_GLOB_H\" was never defined.
32284 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32286 if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then
32287 as_fn_error $?
"conditional \"GL_GENERATE_GLOB_H\" was never defined.
32288 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32290 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
32291 as_fn_error $?
"conditional \"GL_GENERATE_LIMITS_H\" was never defined.
32292 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32294 if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then
32295 as_fn_error $?
"conditional \"GL_GENERATE_LIMITS_H\" was never defined.
32296 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32298 if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then
32299 as_fn_error $?
"conditional \"GL_GENERATE_STDINT_H\" was never defined.
32300 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32304 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
32305 as_fn_error $?
"conditional \"GL_GENERATE_STDDEF_H\" was never defined.
32306 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32308 if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then
32309 as_fn_error $?
"conditional \"GL_GENERATE_NETINET_IN_H\" was never defined.
32310 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32312 if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then
32313 as_fn_error $?
"conditional \"GL_GENERATE_STDALIGN_H\" was never defined.
32314 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32316 if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then
32317 as_fn_error $?
"conditional \"GL_GENERATE_STDBOOL_H\" was never defined.
32318 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32320 if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then
32321 as_fn_error $?
"conditional \"GL_GENERATE_STDDEF_H\" was never defined.
32322 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32327 if test -n "$gl_LIBOBJS"; then
32328 # Remove the extension.
32329 sed_drop_objext
='s/\.o$//;s/\.obj$//'
32330 for i
in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
32331 gl_libobjs
="$gl_libobjs $i.$ac_objext"
32332 gl_ltlibobjs
="$gl_ltlibobjs $i.lo"
32335 gl_LIBOBJS
=$gl_libobjs
32337 gl_LTLIBOBJS
=$gl_ltlibobjs
32343 if test -n "$gltests_LIBOBJS"; then
32344 # Remove the extension.
32345 sed_drop_objext
='s/\.o$//;s/\.obj$//'
32346 for i
in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do
32347 gltests_libobjs
="$gltests_libobjs $i.$ac_objext"
32348 gltests_ltlibobjs
="$gltests_ltlibobjs $i.lo"
32351 gltests_LIBOBJS
=$gltests_libobjs
32353 gltests_LTLIBOBJS
=$gltests_ltlibobjs
32356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
32357 $as_echo_n "checking that generated files are newer than configure... " >&6; }
32358 if test -n "$am_sleep_pid"; then
32359 # Hide warnings about reused PIDs.
32360 wait $am_sleep_pid 2>/dev
/null
32362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
32363 $as_echo "done" >&6; }
32364 if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then
32365 as_fn_error $?
"conditional \"AMDEP\" was never defined.
32366 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32368 if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then
32369 as_fn_error $?
"conditional \"am__fastdepCC\" was never defined.
32370 Usually this means the macro was only invoked conditionally." "$LINENO" 5
32372 if test -n "$EXEEXT"; then
32374 am__EXEEXT_FALSE
='#'
32376 am__EXEEXT_TRUE
='#'
32381 : "${CONFIG_STATUS=./config.status}"
32383 ac_clean_files_save
=$ac_clean_files
32384 ac_clean_files
="$ac_clean_files $CONFIG_STATUS"
32385 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
32386 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
32388 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
32390 # Generated by $as_me.
32391 # Run this file to recreate the current configuration.
32392 # Compiler output produced by configure, useful for debugging
32393 # configure, is in config.log if it exists.
32396 ac_cs_recheck=false
32399 SHELL=\${CONFIG_SHELL-$SHELL}
32402 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail
=1
32403 ## -------------------- ##
32404 ## M4sh Initialization. ##
32405 ## -------------------- ##
32407 # Be more Bourne compatible
32408 DUALCASE
=1; export DUALCASE
# for MKS sh
32409 if test -n "${ZSH_VERSION+set}" && (emulate sh
) >/dev
/null
2>&1; then :
32412 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
32413 # is contrary to our usage. Disable this feature.
32414 alias -g '${1+"$@"}'='"$@"'
32415 setopt NO_GLOB_SUBST
32417 case `(set -o) 2>/dev/null` in #(
32429 # Printing a long string crashes Solaris 7 /usr/bin/printf.
32430 as_echo
='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
32431 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
32432 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
32433 # Prefer a ksh shell builtin over an external printf program on Solaris,
32434 # but without wasting forks for bash or zsh.
32435 if test -z "$BASH_VERSION$ZSH_VERSION" \
32436 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
32437 as_echo='print
-r --'
32438 as_echo_n='print
-rn --'
32439 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
32440 as_echo='printf %s
\n'
32441 as_echo_n='printf %s
'
32443 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
32444 as_echo_body='eval /usr
/ucb
/echo -n "$1$as_nl"'
32445 as_echo_n='/usr
/ucb
/echo -n'
32447 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
32448 as_echo_n_body='eval
32452 expr "X$arg" : "X\\(.*\\)$as_nl";
32453 arg
=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
32455 expr "X$arg" : "X\\(.*\\)" |
tr -d "$as_nl"
32457 export as_echo_n_body
32458 as_echo_n='sh
-c $as_echo_n_body as_echo
'
32460 export as_echo_body
32461 as_echo='sh
-c $as_echo_body as_echo
'
32464 # The user is always right.
32465 if test "${PATH_SEPARATOR+set}" != set; then
32467 (PATH='/bin
;/bin
'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
32468 (PATH='/bin
:/bin
'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
32475 # We need space, tab and new line, in precisely that order. Quoting is
32476 # there to prevent editors from complaining about space-tab.
32477 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
32478 # splitting by setting IFS to empty value.)
32481 # Find who we are. Look in the path if we contain no directory separator.
32484 *[\\/]* ) as_myself=$0 ;;
32485 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32486 for as_dir in $PATH
32489 test -z "$as_dir" && as_dir=.
32490 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
32496 # We did not find ourselves, most probably we were run as `sh COMMAND'
32497 # in which case we are not to be found in the path.
32498 if test "x$as_myself" = x
; then
32501 if test ! -f "$as_myself"; then
32502 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
32506 # Unset variables that we do not need and which cause bugs (e.g. in
32507 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
32508 # suppresses any "Segmentation fault" message there. '((' could
32509 # trigger a bug in pdksh 5.2.14.
32510 for as_var
in BASH_ENV ENV MAIL MAILPATH
32511 do eval test x\
${$as_var+set} = xset \
32512 && ( (unset $as_var) ||
exit 1) >/dev
/null
2>&1 && unset $as_var ||
:
32525 (unset CDPATH
) >/dev
/null
2>&1 && unset CDPATH
32528 # as_fn_error STATUS ERROR [LINENO LOG_FD]
32529 # ----------------------------------------
32530 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
32531 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
32532 # script with STATUS, using 1 if that was 0.
32535 as_status
=$1; test $as_status -eq 0 && as_status
=1
32537 as_lineno
=${as_lineno-"$3"} as_lineno_stack
=as_lineno_stack
=$as_lineno_stack
32538 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
32540 $as_echo "$as_me: error: $2" >&2
32541 as_fn_exit
$as_status
32545 # as_fn_set_status STATUS
32546 # -----------------------
32547 # Set $? to STATUS, without forking.
32548 as_fn_set_status
()
32551 } # as_fn_set_status
32553 # as_fn_exit STATUS
32554 # -----------------
32555 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
32559 as_fn_set_status
$1
32565 # Portably unset VAR.
32568 { eval $1=; unset $1;}
32570 as_unset
=as_fn_unset
32571 # as_fn_append VAR VALUE
32572 # ----------------------
32573 # Append the text in VALUE to the end of the definition contained in VAR. Take
32574 # advantage of any shell optimizations that allow amortized linear growth over
32575 # repeated appends, instead of the typical quadratic growth present in naive
32577 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev
/null
; then :
32578 eval 'as_fn_append ()
32589 # as_fn_arith ARG...
32590 # ------------------
32591 # Perform arithmetic evaluation on the ARGs, and store the result in the
32592 # global $as_val. Take advantage of shells that can avoid forks. The arguments
32593 # must be portable across $(()) and expr.
32594 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev
/null
; then :
32595 eval 'as_fn_arith ()
32602 as_val
=`expr "$@" || test $? -eq 1`
32607 if expr a
: '\(a\)' >/dev
/null
2>&1 &&
32608 test "X`expr 00001 : '.*\(...\)'`" = X001
; then
32614 if (basename -- /) >/dev
/null
2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
32615 as_basename
=basename
32620 if (as_dir
=`dirname -- /` && test "X$as_dir" = X
/) >/dev
/null
2>&1; then
32626 as_me
=`$as_basename -- "$0" ||
32627 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
32628 X"$0" : 'X\(//\)$' \| \
32629 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
32631 sed '/^.*\/\([^/][^/]*\)\/*$/{
32645 # Avoid depending upon Character Ranges.
32646 as_cr_letters
='abcdefghijklmnopqrstuvwxyz'
32647 as_cr_LETTERS
='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
32648 as_cr_Letters
=$as_cr_letters$as_cr_LETTERS
32649 as_cr_digits
='0123456789'
32650 as_cr_alnum
=$as_cr_Letters$as_cr_digits
32652 ECHO_C
= ECHO_N
= ECHO_T
=
32653 case `echo -n x` in #(((((
32655 case `echo 'xy\c'` in
32656 *c
*) ECHO_T
=' ';; # ECHO_T is single tab character.
32658 *) echo `echo ksh88 bug on AIX 6.1` > /dev
/null
32665 rm -f conf$$ conf$$.exe conf$$.
file
32666 if test -d conf$$.dir
; then
32667 rm -f conf$$.dir
/conf$$.
file
32670 mkdir conf$$.dir
2>/dev
/null
32672 if (echo >conf$$.
file) 2>/dev
/null
; then
32673 if ln -s conf$$.
file conf$$
2>/dev
/null
; then
32675 # ... but there are two gotchas:
32676 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
32677 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
32678 # In both cases, we have to default to `cp -pR'.
32679 ln -s conf$$.
file conf$$.dir
2>/dev
/null
&& test ! -f conf$$.exe ||
32681 elif ln conf$$.
file conf$$
2>/dev
/null
; then
32689 rm -f conf$$ conf$$.exe conf$$.dir
/conf$$.
file conf$$.
file
32690 rmdir conf$$.dir
2>/dev
/null
32695 # Create "$as_dir" as a directory, including parents if necessary.
32700 -*) as_dir
=.
/$as_dir;;
32702 test -d "$as_dir" ||
eval $as_mkdir_p ||
{
32706 *\'*) as_qdir
=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
32707 *) as_qdir
=$as_dir;;
32709 as_dirs
="'$as_qdir' $as_dirs"
32710 as_dir
=`$as_dirname -- "$as_dir" ||
32711 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
32712 X"$as_dir" : 'X\(//\)[^/]' \| \
32713 X"$as_dir" : 'X\(//\)$' \| \
32714 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
32715 $as_echo X"$as_dir" |
32716 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
32720 /^X\(\/\/\)[^/].*/{
32733 test -d "$as_dir" && break
32735 test -z "$as_dirs" ||
eval "mkdir $as_dirs"
32736 } ||
test -d "$as_dir" || as_fn_error $?
"cannot create directory $as_dir"
32740 if mkdir
-p .
2>/dev
/null
; then
32741 as_mkdir_p
='mkdir -p "$as_dir"'
32743 test -d .
/-p && rmdir .
/-p
32748 # as_fn_executable_p FILE
32749 # -----------------------
32750 # Test if FILE is an executable regular file.
32751 as_fn_executable_p
()
32753 test -f "$1" && test -x "$1"
32754 } # as_fn_executable_p
32755 as_test_x
='test -x'
32756 as_executable_p
=as_fn_executable_p
32758 # Sed expression to map a string onto a valid CPP name.
32759 as_tr_cpp
="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
32761 # Sed expression to map a string onto a valid variable name.
32762 as_tr_sh
="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
32766 ## ----------------------------------- ##
32767 ## Main body of $CONFIG_STATUS script. ##
32768 ## ----------------------------------- ##
32770 test $as_write_fail = 0 && chmod +x
$CONFIG_STATUS || ac_write_fail
=1
32772 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail
=1
32773 # Save the log message, to keep $0 and so on meaningful, and to
32774 # report actual input values of CONFIG_FILES etc. instead of their
32775 # values after options handling.
32777 This file was extended by libgnu $as_me UNUSED-VERSION, which was
32778 generated by GNU Autoconf 2.69. Invocation command line was
32780 CONFIG_FILES = $CONFIG_FILES
32781 CONFIG_HEADERS = $CONFIG_HEADERS
32782 CONFIG_LINKS = $CONFIG_LINKS
32783 CONFIG_COMMANDS = $CONFIG_COMMANDS
32786 on `(hostname || uname -n) 2>/dev/null | sed 1q`
32791 case $ac_config_files in *"
32792 "*) set x
$ac_config_files; shift; ac_config_files
=$
*;;
32795 case $ac_config_headers in *"
32796 "*) set x
$ac_config_headers; shift; ac_config_headers
=$
*;;
32800 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32801 # Files that config.status was made for.
32802 config_files="$ac_config_files"
32803 config_headers="$ac_config_headers"
32804 config_commands="$ac_config_commands"
32808 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail
=1
32810 \`$as_me' instantiates files and other configuration actions
32811 from templates according to the current configuration. Unless the files
32812 and actions are specified as TAGs, all are instantiated by default.
32814 Usage: $0 [OPTION]... [TAG]...
32816 -h, --help print this help, then exit
32817 -V, --version print version number and configuration settings, then exit
32818 --config print configuration, then exit
32819 -q, --quiet, --silent
32820 do not print progress messages
32821 -d, --debug don't remove temporary files
32822 --recheck update $as_me by reconfiguring in the same conditions
32823 --file=FILE[:TEMPLATE]
32824 instantiate the configuration file FILE
32825 --header=FILE[:TEMPLATE]
32826 instantiate the configuration header FILE
32828 Configuration files:
32831 Configuration headers:
32834 Configuration commands:
32837 Report bugs to the package provider."
32840 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32841 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
32843 libgnu config.status UNUSED-VERSION
32844 configured by $0, generated by GNU Autoconf 2.69,
32845 with options \\"\$ac_cs_config\\"
32847 Copyright (C) 2012 Free Software Foundation, Inc.
32848 This config.status script is free software; the Free Software Foundation
32849 gives unlimited permission to copy, distribute and modify it."
32856 test -n "\$AWK" || AWK=awk
32859 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail
=1
32860 # The default lists apply if the user does not specify any file.
32866 ac_option
=`expr "X$1" : 'X\([^=]*\)='`
32867 ac_optarg
=`expr "X$1" : 'X[^=]*=\(.*\)'`
32871 ac_option
=`expr "X$1" : 'X\([^=]*\)='`
32883 # Handling of the options.
32884 -recheck |
--recheck |
--rechec |
--reche |
--rech |
--rec |
--re |
--r)
32886 --version |
--versio |
--versi |
--vers |
--ver |
--ve |
--v |
-V )
32887 $as_echo "$ac_cs_version"; exit ;;
32888 --config |
--confi |
--conf |
--con |
--co |
--c )
32889 $as_echo "$ac_cs_config"; exit ;;
32890 --debug |
--debu |
--deb |
--de |
--d |
-d )
32892 --file |
--fil |
--fi |
--f )
32895 *\'*) ac_optarg
=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32896 '') as_fn_error $?
"missing file argument" ;;
32898 as_fn_append CONFIG_FILES
" '$ac_optarg'"
32899 ac_need_defaults
=false
;;
32900 --header |
--heade |
--head |
--hea )
32903 *\'*) ac_optarg
=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
32905 as_fn_append CONFIG_HEADERS
" '$ac_optarg'"
32906 ac_need_defaults
=false
;;
32908 # Conflict between --help and --header
32909 as_fn_error $?
"ambiguous option: \`$1'
32910 Try \`$0 --help' for more information.";;
32911 --help |
--hel |
-h )
32912 $as_echo "$ac_cs_usage"; exit ;;
32913 -q |
-quiet |
--quiet |
--quie |
--qui |
--qu |
--q \
32914 |
-silent |
--silent |
--silen |
--sile |
--sil |
--si |
--s)
32917 # This is an error.
32918 -*) as_fn_error $?
"unrecognized option: \`$1'
32919 Try \`$0 --help' for more information." ;;
32921 *) as_fn_append ac_config_targets
" $1"
32922 ac_need_defaults
=false
;;
32928 ac_configure_extra_args
=
32930 if $ac_cs_silent; then
32932 ac_configure_extra_args
="$ac_configure_extra_args --silent"
32936 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32937 if \$ac_cs_recheck; then
32938 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
32940 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
32941 CONFIG_SHELL='$SHELL'
32942 export CONFIG_SHELL
32947 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail
=1
32951 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
32952 ## Running $as_me. ##
32958 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
32962 AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"
32966 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail
=1
32968 # Handling of arguments.
32969 for ac_config_target
in $ac_config_targets
32971 case $ac_config_target in
32972 "config.h") CONFIG_HEADERS
="$CONFIG_HEADERS config.h:config.in" ;;
32973 "depfiles") CONFIG_COMMANDS
="$CONFIG_COMMANDS depfiles" ;;
32974 "Makefile.gnulib.inc") CONFIG_FILES
="$CONFIG_FILES Makefile.gnulib.inc" ;;
32975 "Makefile") CONFIG_FILES
="$CONFIG_FILES Makefile" ;;
32976 "import/Makefile") CONFIG_FILES
="$CONFIG_FILES import/Makefile" ;;
32977 "default") CONFIG_COMMANDS
="$CONFIG_COMMANDS default" ;;
32979 *) as_fn_error $?
"invalid argument: \`$ac_config_target'" "$LINENO" 5;;
32984 # If the user did not use the arguments to specify the items to instantiate,
32985 # then the envvar interface is used. Set only those that are not.
32986 # We use the long form for the default assignment because of an extremely
32987 # bizarre bug on SunOS 4.1.3.
32988 if $ac_need_defaults; then
32989 test "${CONFIG_FILES+set}" = set || CONFIG_FILES
=$config_files
32990 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS
=$config_headers
32991 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS
=$config_commands
32994 # Have a temporary directory for convenience. Make it in the build tree
32995 # simply because there is no reason against having it here, and in addition,
32996 # creating and moving files from /tmp can sometimes cause problems.
32997 # Hook for its removal unless debugging.
32998 # Note that there is a small window in which the directory will not be cleaned:
32999 # after its creation but before its name has been assigned to `$tmp'.
33003 trap 'exit_status=$?
33004 : "${ac_tmp:=$tmp}"
33005 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
33007 trap 'as_fn_exit 1' 1 2 13 15
33009 # Create a (secure) tmp directory for tmp files.
33012 tmp
=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
33016 tmp
=.
/conf$$
-$RANDOM
33017 (umask 077 && mkdir
"$tmp")
33018 } || as_fn_error $?
"cannot create a temporary directory in ." "$LINENO" 5
33021 # Set up the scripts for CONFIG_FILES section.
33022 # No need to generate them if there are no CONFIG_FILES.
33023 # This happens for instance with `./config.status config.h'.
33024 if test -n "$CONFIG_FILES"; then
33027 ac_cr
=`echo X | tr X '\015'`
33028 # On cygwin, bash can eat \r inside `` if the user requested igncr.
33029 # But we know of no other shell where ac_cr would be empty at this
33030 # point, so we can use a bashism as a fallback.
33031 if test "x$ac_cr" = x
; then
33032 eval ac_cr
=\$
\'\\r
\'
33034 ac_cs_awk_cr
=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
33035 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
33038 ac_cs_awk_cr
=$ac_cr
33041 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
33046 echo "cat >conf$$subs.awk <<_ACEOF" &&
33047 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
33049 } >conf$$subs.sh ||
33050 as_fn_error $? "could not
make $CONFIG_STATUS" "$LINENO" 5
33051 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
33053 for ac_last_try in false false false false false :; do
33054 . ./conf$$subs.sh ||
33055 as_fn_error $? "could not
make $CONFIG_STATUS" "$LINENO" 5
33057 ac_delim_n=`sed -n "s
/.
*$ac_delim\$
/X
/p
" conf$$subs.awk | grep -c X`
33058 if test $ac_delim_n = $ac_delim_num; then
33060 elif $ac_last_try; then
33061 as_fn_error $? "could not
make $CONFIG_STATUS" "$LINENO" 5
33063 ac_delim="$ac_delim!$ac_delim _
$ac_delim!! "
33066 rm -f conf$$subs.sh
33068 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33069 cat >>"\
$ac_tmp/subs1.
awk" <<\\_ACAWK &&
33073 s/^/S["/; s
/!.
*/"]=/
33083 s/\(.\{148\}\)..*/\1/
33085 s/["\\]/\\&/g
; s
/^
/"/; s/$/\\n"\\/
33090 s
/["\\]/\\&/g; s/^/"/; s
/$
/"\\/
33097 s/\(.\{148\}\)..*/\1/
33099 s/["\\]/\\&/g
; s
/^
/"/; s/$/"/
33103 s
/["\\]/\\&/g; s/^/"/; s
/$
/"\\/
33108 ' <conf$$subs.awk | sed '
33113 ' >>$CONFIG_STATUS || ac_write_fail=1
33114 rm -f conf$$subs.awk
33115 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33117 cat >>"\
$ac_tmp/subs1.
awk" <<_ACAWK &&
33118 for (key in S) S_is_set[key] = 1
33124 nfields = split(line, field, "@
")
33126 len = length(field[1])
33127 for (i = 2; i < nfields; i++) {
33129 keylen = length(key)
33130 if (S_is_set[key]) {
33132 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
33133 len += length(value) + length(field[++i])
33144 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33145 if sed "s
/$ac_cr//" < /dev/null > /dev/null 2>&1; then
33146 sed "s
/$ac_cr\$
//; s
/$ac_cr/$ac_cs_awk_cr/g
"
33149 fi < "$ac_tmp/subs1.
awk" > "$ac_tmp/subs.
awk" \
33150 || as_fn_error $? "could not setup config files machinery
" "$LINENO" 5
33153 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
33154 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".
", strip leading and
33155 # trailing colons and then remove the whole line if VPATH becomes empty
33156 # (actually we leave an empty line to preserve line numbers).
33157 if test "x
$srcdir" = x.; then
33158 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
33176 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
33177 fi # test -n "$CONFIG_FILES"
33179 # Set up the scripts for CONFIG_HEADERS section.
33180 # No need to generate them if there are no CONFIG_HEADERS.
33181 # This happens for instance with `./config.status Makefile'.
33182 if test -n "$CONFIG_HEADERS"; then
33183 cat >"$ac_tmp/defines.
awk" <<\_ACAWK ||
33187 # Transform confdefs.h into an awk script `defines.awk', embedded as
33188 # here-document in config.status, that substitutes the proper values into
33189 # config.h.in to produce config.h.
33191 # Create a delimiter string that does not exist in confdefs.h, to ease
33192 # handling of long lines.
33194 for ac_last_try in false false :; do
33195 ac_tt=`sed -n "/$ac_delim/p
" confdefs.h`
33196 if test -z "$ac_tt"; then
33198 elif $ac_last_try; then
33199 as_fn_error $? "could not
make $CONFIG_HEADERS" "$LINENO" 5
33201 ac_delim="$ac_delim!$ac_delim _
$ac_delim!! "
33205 # For the awk script, D is an array of macro values keyed by name,
33206 # likewise P contains macro parameters if any. Preserve backslash
33207 # newline sequences.
33209 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
33211 s/.\{148\}/&'"$ac_delim"'/g
33214 s/^[ ]*#[ ]*define[ ][ ]*/ /
33221 s
/^ \
('"$ac_word_re"'\
)\
(([^
()]*)\
)[ ]*\
(.
*\
)/P
["\1"]="\2"\
33223 s
/^ \
('"$ac_word_re"'\
)[ ]*\
(.
*\
)/D
["\1"]=" \2"/p
33227 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\
1"]="\
2"\
33228 D["\
1"]=" \
3\\\\\\n
"\\/p
33230 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\
1"]=" \
2\\\\\\n
"\\/p
33235 s/.\{148\}/&'"$ac_delim"'/g
33240 s/["\\]/\\&/g
; s
/^
/"/; s/$/"/p
33243 s
/["\\]/\\&/g; s/^/"/; s
/$
/\\\\\\n
"\\/p
33245 ' <confdefs.h | sed '
33246 s/'"$ac_delim"'/"\\\
33247 "/g' >>$CONFIG_STATUS || ac_write_fail=1
33249 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33250 for (key in D) D_is_set[key] = 1
33253 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
33255 split(line, arg, " ")
33256 if (arg[1] == "#") {
33260 defundef
= substr
(arg
[1], 2)
33263 split(mac1
, mac2
, "(") #)
33265 prefix
= substr
(line
, 1, index
(line
, defundef
) - 1)
33266 if (D_is_set
[macro
]) {
33267 # Preserve the white space surrounding the "#".
33268 print prefix
"define", macro P
[macro
] D
[macro
]
33271 # Replace #undef with comments. This is necessary, for example,
33272 # in the case of _POSIX_SOURCE, which is predefined and required
33273 # on some systems where configure will not decide to define it.
33274 if (defundef
== "undef") {
33275 print
"/*", prefix defundef
, macro
, "*/"
33283 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail
=1
33284 as_fn_error $?
"could not setup config headers machinery" "$LINENO" 5
33285 fi # test -n "$CONFIG_HEADERS"
33288 eval set X
" :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS"
33293 :[FHLC
]) ac_mode
=$ac_tag; continue;;
33295 case $ac_mode$ac_tag in
33297 :L
* |
:C
*:*) as_fn_error $?
"invalid tag \`$ac_tag'" "$LINENO" 5;;
33298 :[FH
]-) ac_tag
=-:-;;
33299 :[FH
]*) ac_tag
=$ac_tag:$ac_tag.
in;;
33316 -) ac_f
="$ac_tmp/stdin";;
33317 *) # Look for the file first in the build tree, then in the source tree
33318 # (if the path is not absolute). The absolute path cannot be DOS-style,
33319 # because $ac_f cannot contain `:'.
33323 *) test -f "$srcdir/$ac_f" && ac_f
="$srcdir/$ac_f";;
33325 as_fn_error
1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
33327 case $ac_f in *\'*) ac_f
=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
33328 as_fn_append ac_file_inputs
" '$ac_f'"
33331 # Let's still pretend it is `configure' which instantiates (i.e., don't
33332 # use $as_me), people would be surprised to read:
33333 # /* config.h. Generated by config.status. */
33334 configure_input
='Generated from '`
33335 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
33337 if test x
"$ac_file" != x-
; then
33338 configure_input
="$ac_file. $configure_input"
33339 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
33340 $as_echo "$as_me: creating $ac_file" >&6;}
33342 # Neutralize special characters interpreted by sed in replacement strings.
33343 case $configure_input in #(
33344 *\
&* |
*\|
* |
*\\* )
33345 ac_sed_conf_input
=`$as_echo "$configure_input" |
33346 sed 's/[\\\\&|]/\\\\&/g'`;; #(
33347 *) ac_sed_conf_input
=$configure_input;;
33351 *:-:* |
*:-) cat >"$ac_tmp/stdin" \
33352 || as_fn_error $?
"could not create $ac_file" "$LINENO" 5 ;;
33357 ac_dir
=`$as_dirname -- "$ac_file" ||
33358 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33359 X"$ac_file" : 'X\(//\)[^/]' \| \
33360 X"$ac_file" : 'X\(//\)$' \| \
33361 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
33362 $as_echo X"$ac_file" |
33363 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33367 /^X\(\/\/\)[^/].*/{
33380 as_dir
="$ac_dir"; as_fn_mkdir_p
33384 .
) ac_dir_suffix
= ac_top_builddir_sub
=. ac_top_build_prefix
= ;;
33386 ac_dir_suffix
=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
33387 # A ".." for each directory in $ac_dir_suffix.
33388 ac_top_builddir_sub
=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
33389 case $ac_top_builddir_sub in
33390 "") ac_top_builddir_sub
=. ac_top_build_prefix
= ;;
33391 *) ac_top_build_prefix
=$ac_top_builddir_sub/ ;;
33394 ac_abs_top_builddir
=$ac_pwd
33395 ac_abs_builddir
=$ac_pwd$ac_dir_suffix
33396 # for backward compatibility:
33397 ac_top_builddir
=$ac_top_build_prefix
33400 .
) # We are building in place.
33402 ac_top_srcdir
=$ac_top_builddir_sub
33403 ac_abs_top_srcdir
=$ac_pwd ;;
33404 [\\/]* | ?
:[\\/]* ) # Absolute name.
33405 ac_srcdir
=$srcdir$ac_dir_suffix;
33406 ac_top_srcdir
=$srcdir
33407 ac_abs_top_srcdir
=$srcdir ;;
33408 *) # Relative name.
33409 ac_srcdir
=$ac_top_build_prefix$srcdir$ac_dir_suffix
33410 ac_top_srcdir
=$ac_top_build_prefix$srcdir
33411 ac_abs_top_srcdir
=$ac_pwd/$srcdir ;;
33413 ac_abs_srcdir
=$ac_abs_top_srcdir$ac_dir_suffix
33423 [\\/$
]* | ?
:[\\/]* ) ac_INSTALL
=$INSTALL ;;
33424 *) ac_INSTALL
=$ac_top_build_prefix$INSTALL ;;
33426 ac_MKDIR_P
=$MKDIR_P
33428 [\\/$
]* | ?
:[\\/]* ) ;;
33429 */*) ac_MKDIR_P
=$ac_top_build_prefix$MKDIR_P ;;
33433 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail
=1
33434 # If the template does not know about datarootdir, expand it.
33435 # FIXME: This hack should be removed a few years after 2.60.
33436 ac_datarootdir_hack
=; ac_datarootdir_seen
=
33447 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
33448 *datarootdir
*) ac_datarootdir_seen
=yes;;
33449 *@datadir@
*|
*@docdir@
*|
*@infodir@
*|
*@localedir@
*|
*@mandir@
*)
33450 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
33451 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
33453 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33454 ac_datarootdir_hack='
33455 s&@datadir@&$datadir&g
33456 s&@docdir@&$docdir&g
33457 s&@infodir@&$infodir&g
33458 s&@localedir@&$localedir&g
33459 s&@mandir@&$mandir&g
33460 s&\\\${datarootdir}&$datarootdir&g' ;;
33464 # Neutralize VPATH when `$srcdir' = `.'.
33465 # Shell code in configure.ac might set extrasub.
33466 # FIXME: do we really want to maintain this feature?
33467 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
33468 ac_sed_extra="$ac_vpsub
33471 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail
=1
33473 /@
[a-zA-Z_
][a-zA-Z_0-9
]*@
/!b
33474 s|@configure_input@|
$ac_sed_conf_input|
;t t
33475 s
&@top_builddir@
&$ac_top_builddir_sub&;t t
33476 s
&@top_build_prefix@
&$ac_top_build_prefix&;t t
33477 s
&@srcdir@
&$ac_srcdir&;t t
33478 s
&@abs_srcdir@
&$ac_abs_srcdir&;t t
33479 s
&@top_srcdir@
&$ac_top_srcdir&;t t
33480 s
&@abs_top_srcdir@
&$ac_abs_top_srcdir&;t t
33481 s
&@builddir@
&$ac_builddir&;t t
33482 s
&@abs_builddir@
&$ac_abs_builddir&;t t
33483 s
&@abs_top_builddir@
&$ac_abs_top_builddir&;t t
33484 s
&@INSTALL@
&$ac_INSTALL&;t t
33485 s
&@MKDIR_P@
&$ac_MKDIR_P&;t t
33486 $ac_datarootdir_hack
33488 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.
awk" \
33489 >$ac_tmp/out || as_fn_error $? "could not create
$ac_file" "$LINENO" 5
33491 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
33492 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out
"`; test -n "$ac_out"; } &&
33493 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
33494 "$ac_tmp/out
"`; test -z "$ac_out"; } &&
33495 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING
: $ac_file contains a reference to the variable \
`datarootdir'
33496 which seems to be undefined. Please make sure it is defined" >&5
33497 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir
'
33498 which seems to be undefined. Please make sure it is defined" >&2;}
33500 rm -f "$ac_tmp/stdin"
33502 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
33503 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
33505 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33511 if test x"$ac_file" != x-; then
33513 $as_echo "/* $configure_input */" \
33514 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
33515 } >"$ac_tmp/config.h" \
33516 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33517 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
33518 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
33519 $as_echo "$as_me: $ac_file is unchanged" >&6;}
33522 mv "$ac_tmp/config.h" "$ac_file" \
33523 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
33526 $as_echo "/* $configure_input */" \
33527 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
33528 || as_fn_error $? "could not create -" "$LINENO" 5
33530 # Compute "$ac_file"'s index
in $config_headers.
33533 for _am_header
in $config_headers :; do
33534 case $_am_header in
33535 $_am_arg |
$_am_arg:* )
33538 _am_stamp_count
=`expr $_am_stamp_count + 1` ;;
33541 echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" ||
33542 $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33543 X"$_am_arg" : 'X\(//\)[^/]' \| \
33544 X"$_am_arg" : 'X\(//\)$' \| \
33545 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null ||
33546 $as_echo X"$_am_arg" |
33547 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33551 /^X\(\/\/\)[^/].*/{
33563 s/.*/./; q'`/stamp-h
$_am_stamp_count
33566 :C
) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
33567 $as_echo "$as_me: executing $ac_file commands" >&6;}
33572 case $ac_file$ac_mode in
33573 "depfiles":C
) test x
"$AMDEP_TRUE" != x
"" ||
{
33574 # Older Autoconf quotes --file arguments for eval, but not when files
33575 # are listed without --file. Let's play safe and only enable the eval
33576 # if we detect the quoting.
33577 case $CONFIG_FILES in
33578 *\'*) eval set x
"$CONFIG_FILES" ;;
33579 *) set x
$CONFIG_FILES ;;
33584 # Strip MF so we end up with the name of the file.
33585 mf
=`echo "$mf" | sed -e 's/:.*$//'`
33586 # Check whether this is an Automake generated Makefile or not.
33587 # We used to match only the files named 'Makefile.in', but
33588 # some people rename them; so instead we look at the file content.
33589 # Grep'ing the first line is not enough: some people post-process
33590 # each Makefile.in and add a new line on top of each file to say so.
33591 # Grep'ing the whole file is not good either: AIX grep has a line
33592 # limit of 2048, but all sed's we know have understand at least 4000.
33593 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" |
grep X
>/dev
/null
2>&1; then
33594 dirpart
=`$as_dirname -- "$mf" ||
33595 $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33596 X"$mf" : 'X\(//\)[^/]' \| \
33597 X"$mf" : 'X\(//\)$' \| \
33598 X"$mf" : 'X\(/\)' \| . 2>/dev/null ||
33600 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33604 /^X\(\/\/\)[^/].*/{
33620 # Extract the definition of DEPDIR, am__include, and am__quote
33621 # from the Makefile without running 'make'.
33622 DEPDIR
=`sed -n 's/^DEPDIR = //p' < "$mf"`
33623 test -z "$DEPDIR" && continue
33624 am__include
=`sed -n 's/^am__include = //p' < "$mf"`
33625 test -z "$am__include" && continue
33626 am__quote
=`sed -n 's/^am__quote = //p' < "$mf"`
33627 # Find all dependency output files, they are included files with
33628 # $(DEPDIR) in their names. We invoke sed twice because it is the
33629 # simplest approach to changing $(DEPDIR) to its actual value in the
33631 for file in `sed -n "
33632 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
33633 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do
33634 # Make sure the directory exists.
33635 test -f "$dirpart/$file" && continue
33636 fdir
=`$as_dirname -- "$file" ||
33637 $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
33638 X"$file" : 'X\(//\)[^/]' \| \
33639 X"$file" : 'X\(//\)$' \| \
33640 X"$file" : 'X\(/\)' \| . 2>/dev/null ||
33641 $as_echo X"$file" |
33642 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
33646 /^X\(\/\/\)[^/].*/{
33659 as_dir
=$dirpart/$fdir; as_fn_mkdir_p
33660 # echo "creating $dirpart/$file"
33661 echo '# dummy' > "$dirpart/$file"
33667 case x
$CONFIG_HEADERS in
33668 xconfig.h
:config.
in)
33679 ac_clean_files
=$ac_clean_files_save
33681 test $ac_write_fail = 0 ||
33682 as_fn_error $?
"write failure creating $CONFIG_STATUS" "$LINENO" 5
33685 # configure is writing to config.log, and then calls config.status.
33686 # config.status does its own redirection, appending to config.log.
33687 # Unfortunately, on DOS this fails, as config.log is still kept open
33688 # by configure, so config.status won't be able to write to it; its
33689 # output is simply discarded. So we exec the FD to /dev/null,
33690 # effectively closing config.log, so it can be properly (re)opened and
33691 # appended to by config.status. When coming back to configure, we
33692 # need to make the FD available again.
33693 if test "$no_create" != yes; then
33695 ac_config_status_args
=
33696 test "$silent" = yes &&
33697 ac_config_status_args
="$ac_config_status_args --quiet"
33699 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success
=false
33701 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
33702 # would make configure fail if this is the last instruction.
33703 $ac_cs_success || as_fn_exit
1
33705 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no
; then
33706 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
33707 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}