1#! /bin/sh 2# Guess values for system-dependent variables and create Makefiles. 3# Generated by GNU Autoconf 2.69 for libgnu UNUSED-VERSION. 4# 5# 6# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. 7# 8# 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## -------------------- ## 14 15# Be more Bourne compatible 16DUALCASE=1; export DUALCASE # for MKS sh 17if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 18 emulate sh 19 NULLCMD=: 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+"$@"}'='"$@"' 23 setopt NO_GLOB_SUBST 24else 25 case `(set -o) 2>/dev/null` in #( 26 *posix*) : 27 set -o posix ;; #( 28 *) : 29 ;; 30esac 31fi 32 33 34as_nl=' 35' 36export as_nl 37# Printing a long string crashes Solaris 7 /usr/bin/printf. 38as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 39as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 40as_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. 43if test -z "$BASH_VERSION$ZSH_VERSION" \ 44 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 45 as_echo='print -r --' 46 as_echo_n='print -rn --' 47elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 48 as_echo='printf %s\n' 49 as_echo_n='printf %s' 50else 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' 54 else 55 as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 56 as_echo_n_body='eval 57 arg=$1; 58 case $arg in #( 59 *"$as_nl"*) 60 expr "X$arg" : "X\\(.*\\)$as_nl"; 61 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 62 esac; 63 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 64 ' 65 export as_echo_n_body 66 as_echo_n='sh -c $as_echo_n_body as_echo' 67 fi 68 export as_echo_body 69 as_echo='sh -c $as_echo_body as_echo' 70fi 71 72# The user is always right. 73if test "${PATH_SEPARATOR+set}" != set; then 74 PATH_SEPARATOR=: 75 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 76 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 77 PATH_SEPARATOR=';' 78 } 79fi 80 81 82# IFS 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.) 87IFS=" "" $as_nl" 88 89# Find who we are. Look in the path if we contain no directory separator. 90as_myself= 91case $0 in #(( 92 *[\\/]* ) as_myself=$0 ;; 93 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 94for as_dir in $PATH 95do 96 IFS=$as_save_IFS 97 test -z "$as_dir" && as_dir=. 98 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 99 done 100IFS=$as_save_IFS 101 102 ;; 103esac 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. 106if test "x$as_myself" = x; then 107 as_myself=$0 108fi 109if test ! -f "$as_myself"; then 110 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 111 exit 1 112fi 113 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. 118for as_var in BASH_ENV ENV MAIL MAILPATH 119do eval test x\${$as_var+set} = xset \ 120 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 121done 122PS1='$ ' 123PS2='> ' 124PS4='+ ' 125 126# NLS nuisances. 127LC_ALL=C 128export LC_ALL 129LANGUAGE=C 130export LANGUAGE 131 132# CDPATH. 133(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 134 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. 143BASH_ENV=/dev/null 144ENV=/dev/null 145(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 146case $- in # (((( 147 *v*x* | *x*v* ) as_opts=-vx ;; 148 *v* ) as_opts=-v ;; 149 *x* ) as_opts=-x ;; 150 * ) as_opts= ;; 151esac 152exec $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 156as_fn_exit 255 157 fi 158 # We don't want this to propagate to other subprocesses. 159 { _as_can_reexec=; unset _as_can_reexec;} 160if test "x$CONFIG_SHELL" = x; then 161 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : 162 emulate sh 163 NULLCMD=: 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+\"\$@\"}'='\"\$@\"' 167 setopt NO_GLOB_SUBST 168else 169 case \`(set -o) 2>/dev/null\` in #( 170 *posix*) : 171 set -o posix ;; #( 172 *) : 173 ;; 174esac 175fi 176" 177 as_required="as_fn_return () { (exit \$1); } 178as_fn_success () { as_fn_return 0; } 179as_fn_failure () { as_fn_return 1; } 180as_fn_ret_success () { return 0; } 181as_fn_ret_failure () { return 1; } 182 183exitcode=0 184as_fn_success || { exitcode=1; echo as_fn_success failed.; } 185as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } 186as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } 187as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } 188if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : 189 190else 191 exitcode=1; echo positional parameters were not saved. 192fi 193test x\$exitcode = x0 || exit 1 194test -x / || 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 199test \$(( 1 + 1 )) = 2 || exit 1" 200 if (eval "$as_required") 2>/dev/null; then : 201 as_have_required=yes 202else 203 as_have_required=no 204fi 205 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : 206 207else 208 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 209as_found=false 210for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 211do 212 IFS=$as_save_IFS 213 test -z "$as_dir" && as_dir=. 214 as_found=: 215 case $as_dir in #( 216 /*) 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 : 224 break 2 225fi 226fi 227 done;; 228 esac 229 as_found=false 230done 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 234fi; } 235IFS=$as_save_IFS 236 237 238 if test "x$CONFIG_SHELL" != x; then : 239 export CONFIG_SHELL 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. 244BASH_ENV=/dev/null 245ENV=/dev/null 246(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 247case $- in # (((( 248 *v*x* | *x*v* ) as_opts=-vx ;; 249 *v* ) as_opts=-v ;; 250 *x* ) as_opts=-x ;; 251 * ) as_opts= ;; 252esac 253exec $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 257exit 255 258fi 259 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." 266 else 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." 271 fi 272 exit 1 273fi 274fi 275fi 276SHELL=${CONFIG_SHELL-/bin/sh} 277export SHELL 278# Unset more variables known to interfere with behavior of common tools. 279CLICOLOR_FORCE= GREP_OPTIONS= 280unset CLICOLOR_FORCE GREP_OPTIONS 281 282## --------------------- ## 283## M4sh Shell Functions. ## 284## --------------------- ## 285# as_fn_unset VAR 286# --------------- 287# Portably unset VAR. 288as_fn_unset () 289{ 290 { eval $1=; unset $1;} 291} 292as_unset=as_fn_unset 293 294# as_fn_set_status STATUS 295# ----------------------- 296# Set $? to STATUS, without forking. 297as_fn_set_status () 298{ 299 return $1 300} # as_fn_set_status 301 302# as_fn_exit STATUS 303# ----------------- 304# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 305as_fn_exit () 306{ 307 set +e 308 as_fn_set_status $1 309 exit $1 310} # as_fn_exit 311 312# as_fn_mkdir_p 313# ------------- 314# Create "$as_dir" as a directory, including parents if necessary. 315as_fn_mkdir_p () 316{ 317 318 case $as_dir in #( 319 -*) as_dir=./$as_dir;; 320 esac 321 test -d "$as_dir" || eval $as_mkdir_p || { 322 as_dirs= 323 while :; do 324 case $as_dir in #( 325 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 326 *) as_qdir=$as_dir;; 327 esac 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\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 336 s//\1/ 337 q 338 } 339 /^X\(\/\/\)[^/].*/{ 340 s//\1/ 341 q 342 } 343 /^X\(\/\/\)$/{ 344 s//\1/ 345 q 346 } 347 /^X\(\/\).*/{ 348 s//\1/ 349 q 350 } 351 s/.*/./; q'` 352 test -d "$as_dir" && break 353 done 354 test -z "$as_dirs" || eval "mkdir $as_dirs" 355 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 356 357 358} # as_fn_mkdir_p 359 360# as_fn_executable_p FILE 361# ----------------------- 362# Test if FILE is an executable regular file. 363as_fn_executable_p () 364{ 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 372# implementations. 373if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 374 eval 'as_fn_append () 375 { 376 eval $1+=\$2 377 }' 378else 379 as_fn_append () 380 { 381 eval $1=\$$1\$2 382 } 383fi # as_fn_append 384 385# as_fn_arith ARG... 386# ------------------ 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. 390if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 391 eval 'as_fn_arith () 392 { 393 as_val=$(( $* )) 394 }' 395else 396 as_fn_arith () 397 { 398 as_val=`expr "$@" || test $? -eq 1` 399 } 400fi # as_fn_arith 401 402 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. 408as_fn_error () 409{ 410 as_status=$1; test $as_status -eq 0 && as_status=1 411 if test "$4"; then 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 414 fi 415 $as_echo "$as_me: error: $2" >&2 416 as_fn_exit $as_status 417} # as_fn_error 418 419if expr a : '\(a\)' >/dev/null 2>&1 && 420 test "X`expr 00001 : '.*\(...\)'`" = X001; then 421 as_expr=expr 422else 423 as_expr=false 424fi 425 426if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 427 as_basename=basename 428else 429 as_basename=false 430fi 431 432if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 433 as_dirname=dirname 434else 435 as_dirname=false 436fi 437 438as_me=`$as_basename -- "$0" || 439$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 440 X"$0" : 'X\(//\)$' \| \ 441 X"$0" : 'X\(/\)' \| . 2>/dev/null || 442$as_echo X/"$0" | 443 sed '/^.*\/\([^/][^/]*\)\/*$/{ 444 s//\1/ 445 q 446 } 447 /^X\/\(\/\/\)$/{ 448 s//\1/ 449 q 450 } 451 /^X\/\(\/\).*/{ 452 s//\1/ 453 q 454 } 455 s/.*/./; q'` 456 457# Avoid depending upon Character Ranges. 458as_cr_letters='abcdefghijklmnopqrstuvwxyz' 459as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 460as_cr_Letters=$as_cr_letters$as_cr_LETTERS 461as_cr_digits='0123456789' 462as_cr_alnum=$as_cr_Letters$as_cr_digits 463 464 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. :-) 470 sed -n ' 471 p 472 /[$]LINENO/= 473 ' <$as_myself | 474 sed ' 475 s/[$]LINENO.*/&-/ 476 t lineno 477 b 478 :lineno 479 N 480 :loop 481 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ 482 t loop 483 s/-\n.*// 484 ' >$as_me.lineno && 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; } 487 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). 495 . "./$as_me.lineno" 496 # Exit status is that of the last command. 497 exit 498} 499 500ECHO_C= ECHO_N= ECHO_T= 501case `echo -n x` in #((((( 502-n*) 503 case `echo 'xy\c'` in 504 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 505 xy) ECHO_C='\c';; 506 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 507 ECHO_T=' ';; 508 esac;; 509*) 510 ECHO_N='-n';; 511esac 512 513rm -f conf$$ conf$$.exe conf$$.file 514if test -d conf$$.dir; then 515 rm -f conf$$.dir/conf$$.file 516else 517 rm -f conf$$.dir 518 mkdir conf$$.dir 2>/dev/null 519fi 520if (echo >conf$$.file) 2>/dev/null; then 521 if ln -s conf$$.file conf$$ 2>/dev/null; then 522 as_ln_s='ln -s' 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 || 528 as_ln_s='cp -pR' 529 elif ln conf$$.file conf$$ 2>/dev/null; then 530 as_ln_s=ln 531 else 532 as_ln_s='cp -pR' 533 fi 534else 535 as_ln_s='cp -pR' 536fi 537rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 538rmdir conf$$.dir 2>/dev/null 539 540if mkdir -p . 2>/dev/null; then 541 as_mkdir_p='mkdir -p "$as_dir"' 542else 543 test -d ./-p && rmdir ./-p 544 as_mkdir_p=false 545fi 546 547as_test_x='test -x' 548as_executable_p=as_fn_executable_p 549 550# Sed expression to map a string onto a valid CPP name. 551as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 552 553# Sed expression to map a string onto a valid variable name. 554as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 555 556 557test -n "$DJDIR" || exec 7<&0 </dev/null 558exec 6>&1 559 560# Name of the host. 561# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, 562# so uname gets run too. 563ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` 564 565# 566# Initializations. 567# 568ac_default_prefix=/usr/local 569ac_clean_files= 570ac_config_libobj_dir=. 571LIBOBJS= 572cross_compiling=no 573subdirs= 574MFLAGS= 575MAKEFLAGS= 576 577# Identity of this package. 578PACKAGE_NAME='libgnu' 579PACKAGE_TARNAME='libgnu' 580PACKAGE_VERSION='UNUSED-VERSION' 581PACKAGE_STRING='libgnu UNUSED-VERSION' 582PACKAGE_BUGREPORT='' 583PACKAGE_URL='' 584 585ac_unique_file="import/memmem.c" 586# Factoring default headers for most tests. 587ac_includes_default="\ 588#include <stdio.h> 589#ifdef HAVE_SYS_TYPES_H 590# include <sys/types.h> 591#endif 592#ifdef HAVE_SYS_STAT_H 593# include <sys/stat.h> 594#endif 595#ifdef STDC_HEADERS 596# include <stdlib.h> 597# include <stddef.h> 598#else 599# ifdef HAVE_STDLIB_H 600# include <stdlib.h> 601# endif 602#endif 603#ifdef HAVE_STRING_H 604# if !defined STDC_HEADERS && defined HAVE_MEMORY_H 605# include <memory.h> 606# endif 607# include <string.h> 608#endif 609#ifdef HAVE_STRINGS_H 610# include <strings.h> 611#endif 612#ifdef HAVE_INTTYPES_H 613# include <inttypes.h> 614#endif 615#ifdef HAVE_STDINT_H 616# include <stdint.h> 617#endif 618#ifdef HAVE_UNISTD_H 619# include <unistd.h> 620#endif" 621 622gl_use_threads_default= 623gl_use_winpthreads_default= 624ac_header_list= 625ac_func_list= 626gl_fnmatch_required=POSIX 627ac_subst_vars='am__EXEEXT_FALSE 628am__EXEEXT_TRUE 629gltests_LTLIBOBJS 630gltests_LIBOBJS 631gl_LTLIBOBJS 632gl_LIBOBJS 633LTLIBOBJS 634LIBOBJS 635LN_S 636AM_BACKSLASH 637AM_DEFAULT_VERBOSITY 638AM_DEFAULT_V 639AM_V 640am__fastdepCC_FALSE 641am__fastdepCC_TRUE 642CCDEPMODE 643am__nodep 644AMDEPBACKSLASH 645AMDEP_FALSE 646AMDEP_TRUE 647am__include 648DEPDIR 649am__untar 650am__tar 651AMTAR 652am__leading_dot 653SET_MAKE 654AWK 655mkdir_p 656INSTALL_STRIP_PROGRAM 657STRIP 658install_sh 659MAKEINFO 660AUTOHEADER 661AUTOMAKE 662AUTOCONF 663ACLOCAL 664VERSION 665PACKAGE 666CYGPATH_W 667am__isrc 668INSTALL_DATA 669INSTALL_SCRIPT 670INSTALL_PROGRAM 671LIBGNU_LTLIBDEPS 672LIBGNU_LIBDEPS 673gltests_WITNESS 674REPLACE_TOWLOWER 675REPLACE_ISWCNTRL 676HAVE_WCTYPE_H 677NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H 678NEXT_WCTYPE_H 679HAVE_ISWCNTRL 680REPLACE_ISWXDIGIT 681REPLACE_ISWDIGIT 682REPLACE_ISWBLANK 683HAVE_WCTRANS_T 684HAVE_WCTYPE_T 685HAVE_ISWBLANK 686GNULIB_TOWCTRANS 687GNULIB_WCTRANS 688GNULIB_ISWCTYPE 689GNULIB_WCTYPE 690GNULIB_ISWXDIGIT 691GNULIB_ISWDIGIT 692GNULIB_ISWBLANK 693HAVE_CRTDEFS_H 694HAVE_WINT_T 695NEXT_AS_FIRST_DIRECTIVE_WCHAR_H 696NEXT_WCHAR_H 697HAVE_UNISTD_H 698NEXT_AS_FIRST_DIRECTIVE_UNISTD_H 699NEXT_UNISTD_H 700UNISTD_H_DEFINES_STRUCT_TIMESPEC 701PTHREAD_H_DEFINES_STRUCT_TIMESPEC 702SYS_TIME_H_DEFINES_STRUCT_TIMESPEC 703TIME_H_DEFINES_STRUCT_TIMESPEC 704NEXT_AS_FIRST_DIRECTIVE_TIME_H 705NEXT_TIME_H 706HAVE_SYS_UIO_H 707NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H 708NEXT_SYS_UIO_H 709WINDOWS_STAT_INODES 710WINDOWS_64_BIT_OFF_T 711NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H 712NEXT_SYS_TYPES_H 713HAVE_SYS_RANDOM_H 714NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H 715NEXT_SYS_RANDOM_H 716NEXT_AS_FIRST_DIRECTIVE_STRING_H 717NEXT_STRING_H 718NEXT_AS_FIRST_DIRECTIVE_STDLIB_H 719NEXT_STDLIB_H 720NEXT_AS_FIRST_DIRECTIVE_STDIO_H 721NEXT_STDIO_H 722HAVE__BOOL 723GL_GENERATE_STDBOOL_H_FALSE 724GL_GENERATE_STDBOOL_H_TRUE 725STDBOOL_H 726GL_GENERATE_STDALIGN_H_FALSE 727GL_GENERATE_STDALIGN_H_TRUE 728STDALIGN_H 729NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H 730NEXT_SIGNAL_H 731REPLACE_RAISE 732REPLACE_PTHREAD_SIGMASK 733HAVE_SIGHANDLER_T 734HAVE_TYPE_VOLATILE_SIG_ATOMIC_T 735HAVE_STRUCT_SIGACTION_SA_SIGACTION 736HAVE_SIGACTION 737HAVE_SIGINFO_T 738HAVE_SIGSET_T 739HAVE_RAISE 740HAVE_PTHREAD_SIGMASK 741HAVE_POSIX_SIGNALBLOCKING 742GNULIB_SIGACTION 743GNULIB_SIGPROCMASK 744GNULIB_SIGNAL_H_SIGPIPE 745GNULIB_RAISE 746GNULIB_PTHREAD_SIGMASK 747REPLACE_VSPRINTF 748REPLACE_VSNPRINTF 749REPLACE_VPRINTF 750REPLACE_VFPRINTF 751REPLACE_VDPRINTF 752REPLACE_VASPRINTF 753REPLACE_TMPFILE 754REPLACE_STDIO_WRITE_FUNCS 755REPLACE_STDIO_READ_FUNCS 756REPLACE_SPRINTF 757REPLACE_SNPRINTF 758REPLACE_RENAMEAT 759REPLACE_RENAME 760REPLACE_REMOVE 761REPLACE_PRINTF 762REPLACE_POPEN 763REPLACE_PERROR 764REPLACE_OBSTACK_PRINTF 765REPLACE_GETLINE 766REPLACE_GETDELIM 767REPLACE_FTELLO 768REPLACE_FTELL 769REPLACE_FSEEKO 770REPLACE_FSEEK 771REPLACE_FREOPEN 772REPLACE_FPURGE 773REPLACE_FPRINTF 774REPLACE_FOPEN 775REPLACE_FFLUSH 776REPLACE_FDOPEN 777REPLACE_FCLOSE 778REPLACE_DPRINTF 779HAVE_VDPRINTF 780HAVE_VASPRINTF 781HAVE_RENAMEAT 782HAVE_POPEN 783HAVE_PCLOSE 784HAVE_FTELLO 785HAVE_FSEEKO 786HAVE_DPRINTF 787HAVE_DECL_VSNPRINTF 788HAVE_DECL_SNPRINTF 789HAVE_DECL_OBSTACK_PRINTF 790HAVE_DECL_GETLINE 791HAVE_DECL_GETDELIM 792HAVE_DECL_FTELLO 793HAVE_DECL_FSEEKO 794HAVE_DECL_FPURGE 795GNULIB_VSPRINTF_POSIX 796GNULIB_VSNPRINTF 797GNULIB_VPRINTF_POSIX 798GNULIB_VPRINTF 799GNULIB_VFPRINTF_POSIX 800GNULIB_VFPRINTF 801GNULIB_VDPRINTF 802GNULIB_VSCANF 803GNULIB_VFSCANF 804GNULIB_VASPRINTF 805GNULIB_TMPFILE 806GNULIB_STDIO_H_SIGPIPE 807GNULIB_STDIO_H_NONBLOCKING 808GNULIB_SPRINTF_POSIX 809GNULIB_SNPRINTF 810GNULIB_SCANF 811GNULIB_RENAMEAT 812GNULIB_RENAME 813GNULIB_REMOVE 814GNULIB_PUTS 815GNULIB_PUTCHAR 816GNULIB_PUTC 817GNULIB_PRINTF_POSIX 818GNULIB_PRINTF 819GNULIB_POPEN 820GNULIB_PERROR 821GNULIB_PCLOSE 822GNULIB_OBSTACK_PRINTF_POSIX 823GNULIB_OBSTACK_PRINTF 824GNULIB_GETLINE 825GNULIB_GETDELIM 826GNULIB_GETCHAR 827GNULIB_GETC 828GNULIB_FWRITE 829GNULIB_FTELLO 830GNULIB_FTELL 831GNULIB_FSEEKO 832GNULIB_FSEEK 833GNULIB_FSCANF 834GNULIB_FREOPEN 835GNULIB_FREAD 836GNULIB_FPUTS 837GNULIB_FPUTC 838GNULIB_FPURGE 839GNULIB_FPRINTF_POSIX 840GNULIB_FPRINTF 841GNULIB_FOPEN 842GNULIB_FGETS 843GNULIB_FGETC 844GNULIB_FFLUSH 845GNULIB_FDOPEN 846GNULIB_FCLOSE 847GNULIB_DPRINTF 848GL_GENERATE_NETINET_IN_H_FALSE 849GL_GENERATE_NETINET_IN_H_TRUE 850NETINET_IN_H 851HAVE_NETINET_IN_H 852NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H 853NEXT_NETINET_IN_H 854UNDEFINE_STRTOK_R 855REPLACE_STRSIGNAL 856REPLACE_STRERROR_R 857REPLACE_STRERROR 858REPLACE_STRTOK_R 859REPLACE_STRCASESTR 860REPLACE_STRSTR 861REPLACE_STRNLEN 862REPLACE_STRNDUP 863REPLACE_STRNCAT 864REPLACE_STRDUP 865REPLACE_STRCHRNUL 866REPLACE_STPNCPY 867REPLACE_MEMMEM 868REPLACE_MEMCHR 869HAVE_STRVERSCMP 870HAVE_DECL_STRSIGNAL 871HAVE_DECL_STRERROR_R 872HAVE_DECL_STRTOK_R 873HAVE_STRCASESTR 874HAVE_STRSEP 875HAVE_STRPBRK 876HAVE_DECL_STRNLEN 877HAVE_DECL_STRNDUP 878HAVE_DECL_STRDUP 879HAVE_STRCHRNUL 880HAVE_STPNCPY 881HAVE_STPCPY 882HAVE_RAWMEMCHR 883HAVE_DECL_MEMRCHR 884HAVE_MEMPCPY 885HAVE_DECL_MEMMEM 886HAVE_MEMCHR 887HAVE_FFSLL 888HAVE_FFSL 889HAVE_EXPLICIT_BZERO 890HAVE_MBSLEN 891GNULIB_STRVERSCMP 892GNULIB_STRSIGNAL 893GNULIB_STRERROR_R 894GNULIB_STRERROR 895GNULIB_MBSTOK_R 896GNULIB_MBSSEP 897GNULIB_MBSSPN 898GNULIB_MBSPBRK 899GNULIB_MBSCSPN 900GNULIB_MBSCASESTR 901GNULIB_MBSPCASECMP 902GNULIB_MBSNCASECMP 903GNULIB_MBSCASECMP 904GNULIB_MBSSTR 905GNULIB_MBSRCHR 906GNULIB_MBSCHR 907GNULIB_MBSNLEN 908GNULIB_MBSLEN 909GNULIB_STRTOK_R 910GNULIB_STRCASESTR 911GNULIB_STRSTR 912GNULIB_STRSEP 913GNULIB_STRPBRK 914GNULIB_STRNLEN 915GNULIB_STRNDUP 916GNULIB_STRNCAT 917GNULIB_STRDUP 918GNULIB_STRCHRNUL 919GNULIB_STPNCPY 920GNULIB_STPCPY 921GNULIB_RAWMEMCHR 922GNULIB_MEMRCHR 923GNULIB_MEMPCPY 924GNULIB_MEMMEM 925GNULIB_MEMCHR 926GNULIB_FFSLL 927GNULIB_FFSL 928GNULIB_EXPLICIT_BZERO 929HAVE_VISIBILITY 930CFLAG_VISIBILITY 931LIB_MBRTOWC 932LOCALE_ZH_CN 933LOCALE_FR_UTF8 934LOCALE_JA 935NEXT_AS_FIRST_DIRECTIVE_MATH_H 936NEXT_MATH_H 937LTLIBMULTITHREAD 938LIBMULTITHREAD 939LTLIBTHREAD 940LIBTHREAD 941LIBSTDTHREAD 942NEXT_AS_FIRST_DIRECTIVE_LOCALE_H 943NEXT_LOCALE_H 944HAVE_XLOCALE_H 945NEXT_AS_FIRST_DIRECTIVE_STDDEF_H 946NEXT_STDDEF_H 947GL_GENERATE_STDDEF_H_FALSE 948GL_GENERATE_STDDEF_H_TRUE 949STDDEF_H 950HAVE_WCHAR_T 951HAVE_MAX_ALIGN_T 952REPLACE_NULL 953REPLACE_STRUCT_LCONV 954REPLACE_FREELOCALE 955REPLACE_DUPLOCALE 956REPLACE_NEWLOCALE 957REPLACE_SETLOCALE 958REPLACE_LOCALECONV 959HAVE_FREELOCALE 960HAVE_DUPLOCALE 961HAVE_NEWLOCALE 962GNULIB_LOCALENAME 963GNULIB_DUPLOCALE 964GNULIB_SETLOCALE_NULL 965GNULIB_SETLOCALE 966GNULIB_LOCALECONV 967LOCALCHARSET_TESTS_ENVIRONMENT 968NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H 969NEXT_INTTYPES_H 970UINT64_MAX_EQ_ULONG_MAX 971UINT32_MAX_LT_UINTMAX_MAX 972PRIPTR_PREFIX 973PRI_MACROS_BROKEN 974INT64_MAX_EQ_LONG_MAX 975INT32_MAX_LT_INTMAX_MAX 976REPLACE_STRTOUMAX 977REPLACE_STRTOIMAX 978HAVE_IMAXDIV_T 979HAVE_DECL_STRTOUMAX 980HAVE_DECL_STRTOIMAX 981HAVE_DECL_IMAXDIV 982HAVE_DECL_IMAXABS 983GNULIB_STRTOUMAX 984GNULIB_STRTOIMAX 985GNULIB_IMAXDIV 986GNULIB_IMAXABS 987GL_GENERATE_STDINT_H_FALSE 988GL_GENERATE_STDINT_H_TRUE 989STDINT_H 990HAVE_SYS_INTTYPES_H 991HAVE_SYS_BITYPES_H 992HAVE_C99_STDINT_H 993WINT_T_SUFFIX 994WCHAR_T_SUFFIX 995SIG_ATOMIC_T_SUFFIX 996SIZE_T_SUFFIX 997PTRDIFF_T_SUFFIX 998HAVE_SIGNED_WINT_T 999HAVE_SIGNED_WCHAR_T 1000HAVE_SIGNED_SIG_ATOMIC_T 1001BITSIZEOF_WINT_T 1002BITSIZEOF_WCHAR_T 1003BITSIZEOF_SIG_ATOMIC_T 1004BITSIZEOF_SIZE_T 1005BITSIZEOF_PTRDIFF_T 1006APPLE_UNIVERSAL_BUILD 1007HAVE_STDINT_H 1008NEXT_AS_FIRST_DIRECTIVE_STDINT_H 1009NEXT_STDINT_H 1010HAVE_SYS_TYPES_H 1011HAVE_INTTYPES_H 1012HAVE_WCHAR_H 1013GNULIB_OVERRIDES_WINT_T 1014GL_GENERATE_LIMITS_H_FALSE 1015GL_GENERATE_LIMITS_H_TRUE 1016LIMITS_H 1017NEXT_AS_FIRST_DIRECTIVE_LIMITS_H 1018NEXT_LIMITS_H 1019HAVE_SYS_SOCKET_H 1020NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H 1021NEXT_SYS_SOCKET_H 1022HAVE_ACCEPT4 1023HAVE_SA_FAMILY_T 1024HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1025HAVE_STRUCT_SOCKADDR_STORAGE 1026GNULIB_ACCEPT4 1027GNULIB_SHUTDOWN 1028GNULIB_SETSOCKOPT 1029GNULIB_SENDTO 1030GNULIB_RECVFROM 1031GNULIB_SEND 1032GNULIB_RECV 1033GNULIB_LISTEN 1034GNULIB_GETSOCKOPT 1035GNULIB_GETSOCKNAME 1036GNULIB_GETPEERNAME 1037GNULIB_BIND 1038GNULIB_ACCEPT 1039GNULIB_CONNECT 1040GNULIB_SOCKET 1041INET_NTOP_LIB 1042LIB_HARD_LOCALE 1043LIB_SETLOCALE_NULL 1044LIB_SCHED_YIELD 1045LIBPMULTITHREAD 1046LIBPTHREAD 1047GL_GENERATE_GLOB_H_FALSE 1048GL_GENERATE_GLOB_H_TRUE 1049GLOB_H 1050HAVE_GLOB_H 1051NEXT_AS_FIRST_DIRECTIVE_GLOB_H 1052NEXT_GLOB_H 1053REPLACE_GLOB_PATTERN_P 1054REPLACE_GLOB 1055HAVE_GLOB_PATTERN_P 1056HAVE_GLOB 1057GNULIB_GLOB 1058REPLACE_LOCALTIME 1059REPLACE_GMTIME 1060REPLACE_TZSET 1061REPLACE_TIMEGM 1062REPLACE_STRFTIME 1063REPLACE_NANOSLEEP 1064REPLACE_MKTIME 1065REPLACE_LOCALTIME_R 1066REPLACE_CTIME 1067HAVE_TIMEZONE_T 1068HAVE_TZSET 1069HAVE_TIMEGM 1070HAVE_STRPTIME 1071HAVE_NANOSLEEP 1072HAVE_DECL_LOCALTIME_R 1073GNULIB_TZSET 1074GNULIB_TIME_RZ 1075GNULIB_TIME_R 1076GNULIB_TIMEGM 1077GNULIB_STRPTIME 1078GNULIB_STRFTIME 1079GNULIB_NANOSLEEP 1080GNULIB_LOCALTIME 1081GNULIB_MKTIME 1082GNULIB_CTIME 1083NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H 1084NEXT_SYS_TIME_H 1085REPLACE_STRUCT_TIMEVAL 1086REPLACE_GETTIMEOFDAY 1087HAVE_SYS_TIME_H 1088HAVE_STRUCT_TIMEVAL 1089HAVE_GETTIMEOFDAY 1090GNULIB_GETTIMEOFDAY 1091LTLIBINTL 1092LIBINTL 1093LIB_GETRANDOM 1094REPLACE_GETRANDOM 1095HAVE_GETRANDOM 1096GNULIB_GETRANDOM 1097LIB_GETLOGIN 1098WINDOWS_64_BIT_ST_SIZE 1099WINDOWS_STAT_TIMESPEC 1100NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H 1101NEXT_SYS_STAT_H 1102REPLACE_UTIMENSAT 1103REPLACE_STAT 1104REPLACE_MKNOD 1105REPLACE_MKFIFO 1106REPLACE_MKDIR 1107REPLACE_LSTAT 1108REPLACE_FUTIMENS 1109REPLACE_FSTATAT 1110REPLACE_FSTAT 1111REPLACE_FCHMODAT 1112HAVE_UTIMENSAT 1113HAVE_MKNODAT 1114HAVE_MKNOD 1115HAVE_MKFIFOAT 1116HAVE_MKFIFO 1117HAVE_MKDIRAT 1118HAVE_LSTAT 1119HAVE_LCHMOD 1120HAVE_FUTIMENS 1121HAVE_FSTATAT 1122HAVE_FCHMODAT 1123GNULIB_OVERRIDES_STRUCT_STAT 1124GNULIB_UTIMENSAT 1125GNULIB_STAT 1126GNULIB_MKNODAT 1127GNULIB_MKNOD 1128GNULIB_MKFIFOAT 1129GNULIB_MKFIFO 1130GNULIB_MKDIRAT 1131GNULIB_LSTAT 1132GNULIB_LCHMOD 1133GNULIB_FUTIMENS 1134GNULIB_FSTATAT 1135GNULIB_FSTAT 1136GNULIB_FCHMODAT 1137FREXPL_LIBM 1138HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1139FREXP_LIBM 1140REPLACE_TRUNCL 1141REPLACE_TRUNCF 1142REPLACE_TRUNC 1143REPLACE_TANHF 1144REPLACE_TANF 1145REPLACE_SQRTL 1146REPLACE_SQRTF 1147REPLACE_SINHF 1148REPLACE_SINF 1149REPLACE_SIGNBIT_USING_GCC 1150REPLACE_SIGNBIT 1151REPLACE_ROUNDL 1152REPLACE_ROUNDF 1153REPLACE_ROUND 1154REPLACE_RINTL 1155REPLACE_REMAINDERL 1156REPLACE_REMAINDERF 1157REPLACE_REMAINDER 1158REPLACE_NAN 1159REPLACE_MODFL 1160REPLACE_MODFF 1161REPLACE_MODF 1162REPLACE_LOGBL 1163REPLACE_LOGBF 1164REPLACE_LOGB 1165REPLACE_LOG2L 1166REPLACE_LOG2F 1167REPLACE_LOG2 1168REPLACE_LOG1PL 1169REPLACE_LOG1PF 1170REPLACE_LOG1P 1171REPLACE_LOG10L 1172REPLACE_LOG10F 1173REPLACE_LOG10 1174REPLACE_LOGL 1175REPLACE_LOGF 1176REPLACE_LOG 1177REPLACE_LDEXPL 1178REPLACE_ISNAN 1179REPLACE_ISINF 1180REPLACE_ISFINITE 1181REPLACE_ILOGBL 1182REPLACE_ILOGBF 1183REPLACE_ILOGB 1184REPLACE_HYPOTL 1185REPLACE_HYPOTF 1186REPLACE_HYPOT 1187REPLACE_HUGE_VAL 1188REPLACE_FREXPL 1189REPLACE_FREXP 1190REPLACE_FREXPF 1191REPLACE_FMODL 1192REPLACE_FMODF 1193REPLACE_FMOD 1194REPLACE_FMAL 1195REPLACE_FMAF 1196REPLACE_FMA 1197REPLACE_FLOORL 1198REPLACE_FLOORF 1199REPLACE_FLOOR 1200REPLACE_FABSL 1201REPLACE_EXP2L 1202REPLACE_EXP2 1203REPLACE_EXPM1L 1204REPLACE_EXPM1F 1205REPLACE_EXPM1 1206REPLACE_EXPL 1207REPLACE_EXPF 1208REPLACE_COSHF 1209REPLACE_COSF 1210REPLACE_CEILL 1211REPLACE_CEILF 1212REPLACE_CEIL 1213REPLACE_CBRTL 1214REPLACE_CBRTF 1215REPLACE_ATAN2F 1216REPLACE_ATANF 1217REPLACE_ASINF 1218REPLACE_ACOSF 1219HAVE_DECL_TRUNCL 1220HAVE_DECL_TRUNCF 1221HAVE_DECL_TRUNC 1222HAVE_DECL_TANL 1223HAVE_DECL_SQRTL 1224HAVE_DECL_SINL 1225HAVE_DECL_ROUNDL 1226HAVE_DECL_ROUNDF 1227HAVE_DECL_ROUND 1228HAVE_DECL_RINTF 1229HAVE_DECL_REMAINDERL 1230HAVE_DECL_REMAINDER 1231HAVE_DECL_LOGB 1232HAVE_DECL_LOG2L 1233HAVE_DECL_LOG2F 1234HAVE_DECL_LOG2 1235HAVE_DECL_LOG10L 1236HAVE_DECL_LOGL 1237HAVE_DECL_LDEXPL 1238HAVE_DECL_FREXPL 1239HAVE_DECL_FLOORL 1240HAVE_DECL_FLOORF 1241HAVE_DECL_EXPM1L 1242HAVE_DECL_EXP2L 1243HAVE_DECL_EXP2F 1244HAVE_DECL_EXP2 1245HAVE_DECL_EXPL 1246HAVE_DECL_COSL 1247HAVE_DECL_COPYSIGNF 1248HAVE_DECL_CEILL 1249HAVE_DECL_CEILF 1250HAVE_DECL_CBRTL 1251HAVE_DECL_CBRTF 1252HAVE_DECL_ATANL 1253HAVE_DECL_ASINL 1254HAVE_DECL_ACOSL 1255HAVE_TANHF 1256HAVE_TANL 1257HAVE_TANF 1258HAVE_SQRTL 1259HAVE_SQRTF 1260HAVE_SINHF 1261HAVE_SINL 1262HAVE_SINF 1263HAVE_RINTL 1264HAVE_RINT 1265HAVE_REMAINDERF 1266HAVE_REMAINDER 1267HAVE_POWF 1268HAVE_MODFL 1269HAVE_MODFF 1270HAVE_LOGBL 1271HAVE_LOGBF 1272HAVE_LOG1PL 1273HAVE_LOG1PF 1274HAVE_LOG1P 1275HAVE_LOG10L 1276HAVE_LOG10F 1277HAVE_LOGL 1278HAVE_LOGF 1279HAVE_LDEXPF 1280HAVE_ISNANL 1281HAVE_ISNAND 1282HAVE_ISNANF 1283HAVE_ILOGBL 1284HAVE_ILOGBF 1285HAVE_ILOGB 1286HAVE_HYPOTL 1287HAVE_HYPOTF 1288HAVE_FREXPF 1289HAVE_FMODL 1290HAVE_FMODF 1291HAVE_FMAL 1292HAVE_FMAF 1293HAVE_FMA 1294HAVE_FABSL 1295HAVE_FABSF 1296HAVE_EXPM1F 1297HAVE_EXPM1 1298HAVE_EXPL 1299HAVE_EXPF 1300HAVE_COSHF 1301HAVE_COSL 1302HAVE_COSF 1303HAVE_COPYSIGNL 1304HAVE_COPYSIGN 1305HAVE_CBRTL 1306HAVE_CBRTF 1307HAVE_CBRT 1308HAVE_ATAN2F 1309HAVE_ATANL 1310HAVE_ATANF 1311HAVE_ASINL 1312HAVE_ASINF 1313HAVE_ACOSL 1314HAVE_ACOSF 1315GNULIB_TRUNCL 1316GNULIB_TRUNCF 1317GNULIB_TRUNC 1318GNULIB_TANHF 1319GNULIB_TANL 1320GNULIB_TANF 1321GNULIB_SQRTL 1322GNULIB_SQRTF 1323GNULIB_SINHF 1324GNULIB_SINL 1325GNULIB_SINF 1326GNULIB_SIGNBIT 1327GNULIB_ROUNDL 1328GNULIB_ROUNDF 1329GNULIB_ROUND 1330GNULIB_RINTL 1331GNULIB_RINTF 1332GNULIB_RINT 1333GNULIB_REMAINDERL 1334GNULIB_REMAINDERF 1335GNULIB_REMAINDER 1336GNULIB_POWF 1337GNULIB_MODFL 1338GNULIB_MODFF 1339GNULIB_MODF 1340GNULIB_LOGBL 1341GNULIB_LOGBF 1342GNULIB_LOGB 1343GNULIB_LOG2L 1344GNULIB_LOG2F 1345GNULIB_LOG2 1346GNULIB_LOG1PL 1347GNULIB_LOG1PF 1348GNULIB_LOG1P 1349GNULIB_LOG10L 1350GNULIB_LOG10F 1351GNULIB_LOG10 1352GNULIB_LOGL 1353GNULIB_LOGF 1354GNULIB_LOG 1355GNULIB_LDEXPL 1356GNULIB_LDEXPF 1357GNULIB_ISNANL 1358GNULIB_ISNAND 1359GNULIB_ISNANF 1360GNULIB_ISNAN 1361GNULIB_ISINF 1362GNULIB_ISFINITE 1363GNULIB_ILOGBL 1364GNULIB_ILOGBF 1365GNULIB_ILOGB 1366GNULIB_HYPOTL 1367GNULIB_HYPOTF 1368GNULIB_HYPOT 1369GNULIB_FREXPL 1370GNULIB_FREXP 1371GNULIB_FREXPF 1372GNULIB_FMODL 1373GNULIB_FMODF 1374GNULIB_FMOD 1375GNULIB_FMAL 1376GNULIB_FMAF 1377GNULIB_FMA 1378GNULIB_FLOORL 1379GNULIB_FLOORF 1380GNULIB_FLOOR 1381GNULIB_FABSL 1382GNULIB_FABSF 1383GNULIB_EXPM1L 1384GNULIB_EXPM1F 1385GNULIB_EXPM1 1386GNULIB_EXP2L 1387GNULIB_EXP2F 1388GNULIB_EXP2 1389GNULIB_EXPL 1390GNULIB_EXPF 1391GNULIB_COSHF 1392GNULIB_COSL 1393GNULIB_COSF 1394GNULIB_COPYSIGNL 1395GNULIB_COPYSIGNF 1396GNULIB_COPYSIGN 1397GNULIB_CEILL 1398GNULIB_CEILF 1399GNULIB_CEIL 1400GNULIB_CBRTL 1401GNULIB_CBRTF 1402GNULIB_CBRT 1403GNULIB_ATAN2F 1404GNULIB_ATANL 1405GNULIB_ATANF 1406GNULIB_ASINL 1407GNULIB_ASINF 1408GNULIB_ACOSL 1409GNULIB_ACOSF 1410GL_GENERATE_FNMATCH_H_FALSE 1411GL_GENERATE_FNMATCH_H_TRUE 1412FNMATCH_H 1413HAVE_FNMATCH_H 1414NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H 1415NEXT_FNMATCH_H 1416REPLACE_FNMATCH 1417HAVE_FNMATCH 1418GNULIB_FNMATCH 1419REPLACE_ITOLD 1420GL_GENERATE_FLOAT_H_FALSE 1421GL_GENERATE_FLOAT_H_TRUE 1422FLOAT_H 1423NEXT_AS_FIRST_DIRECTIVE_FLOAT_H 1424NEXT_FLOAT_H 1425NEXT_AS_FIRST_DIRECTIVE_FCNTL_H 1426NEXT_FCNTL_H 1427REPLACE_OPENAT 1428REPLACE_OPEN 1429REPLACE_FCNTL 1430REPLACE_CREAT 1431HAVE_OPENAT 1432HAVE_FCNTL 1433GNULIB_OPENAT 1434GNULIB_OPEN 1435GNULIB_NONBLOCKING 1436GNULIB_FCNTL 1437GNULIB_CREAT 1438EOVERFLOW_VALUE 1439EOVERFLOW_HIDDEN 1440ENOLINK_VALUE 1441ENOLINK_HIDDEN 1442EMULTIHOP_VALUE 1443EMULTIHOP_HIDDEN 1444GL_GENERATE_ERRNO_H_FALSE 1445GL_GENERATE_ERRNO_H_TRUE 1446ERRNO_H 1447NEXT_AS_FIRST_DIRECTIVE_ERRNO_H 1448NEXT_ERRNO_H 1449HAVE_DIRENT_H 1450NEXT_AS_FIRST_DIRECTIVE_DIRENT_H 1451NEXT_DIRENT_H 1452NEXT_AS_FIRST_DIRECTIVE_CTYPE_H 1453NEXT_CTYPE_H 1454HAVE_ISBLANK 1455GNULIB_ISBLANK 1456REPLACE_FDOPENDIR 1457REPLACE_DIRFD 1458REPLACE_CLOSEDIR 1459REPLACE_OPENDIR 1460HAVE_ALPHASORT 1461HAVE_SCANDIR 1462HAVE_FDOPENDIR 1463HAVE_DECL_FDOPENDIR 1464HAVE_DECL_DIRFD 1465HAVE_CLOSEDIR 1466HAVE_REWINDDIR 1467HAVE_READDIR 1468HAVE_OPENDIR 1469GNULIB_ALPHASORT 1470GNULIB_SCANDIR 1471GNULIB_FDOPENDIR 1472GNULIB_DIRFD 1473GNULIB_CLOSEDIR 1474GNULIB_REWINDDIR 1475GNULIB_READDIR 1476GNULIB_OPENDIR 1477HAVE_WINSOCK2_H 1478HAVE_MSVC_INVALID_PARAMETER_HANDLER 1479UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS 1480UNISTD_H_HAVE_WINSOCK2_H 1481UNISTD_H_HAVE_SYS_RANDOM_H 1482REPLACE_WRITE 1483REPLACE_USLEEP 1484REPLACE_UNLINKAT 1485REPLACE_UNLINK 1486REPLACE_TTYNAME_R 1487REPLACE_TRUNCATE 1488REPLACE_SYMLINKAT 1489REPLACE_SYMLINK 1490REPLACE_SLEEP 1491REPLACE_RMDIR 1492REPLACE_READLINKAT 1493REPLACE_READLINK 1494REPLACE_READ 1495REPLACE_PWRITE 1496REPLACE_PREAD 1497REPLACE_LSEEK 1498REPLACE_LINKAT 1499REPLACE_LINK 1500REPLACE_LCHOWN 1501REPLACE_ISATTY 1502REPLACE_GETPASS 1503REPLACE_GETPAGESIZE 1504REPLACE_GETGROUPS 1505REPLACE_GETLOGIN_R 1506REPLACE_GETDTABLESIZE 1507REPLACE_GETDOMAINNAME 1508REPLACE_GETCWD 1509REPLACE_FTRUNCATE 1510REPLACE_FCHOWNAT 1511REPLACE_FACCESSAT 1512REPLACE_DUP2 1513REPLACE_DUP 1514REPLACE_CLOSE 1515REPLACE_CHOWN 1516REPLACE_ACCESS 1517HAVE_SYS_PARAM_H 1518HAVE_OS_H 1519HAVE_DECL_TTYNAME_R 1520HAVE_DECL_TRUNCATE 1521HAVE_DECL_SETHOSTNAME 1522HAVE_DECL_GETUSERSHELL 1523HAVE_DECL_GETPAGESIZE 1524HAVE_DECL_GETLOGIN_R 1525HAVE_DECL_GETLOGIN 1526HAVE_DECL_GETDOMAINNAME 1527HAVE_DECL_FDATASYNC 1528HAVE_DECL_FCHDIR 1529HAVE_DECL_ENVIRON 1530HAVE_USLEEP 1531HAVE_UNLINKAT 1532HAVE_SYMLINKAT 1533HAVE_SYMLINK 1534HAVE_SLEEP 1535HAVE_SETHOSTNAME 1536HAVE_READLINKAT 1537HAVE_READLINK 1538HAVE_PWRITE 1539HAVE_PREAD 1540HAVE_PIPE2 1541HAVE_PIPE 1542HAVE_LINKAT 1543HAVE_LINK 1544HAVE_LCHOWN 1545HAVE_GROUP_MEMBER 1546HAVE_GETPASS 1547HAVE_GETPAGESIZE 1548HAVE_GETLOGIN 1549HAVE_GETHOSTNAME 1550HAVE_GETGROUPS 1551HAVE_GETENTROPY 1552HAVE_GETDTABLESIZE 1553HAVE_FTRUNCATE 1554HAVE_FSYNC 1555HAVE_FDATASYNC 1556HAVE_FCHOWNAT 1557HAVE_FCHDIR 1558HAVE_FACCESSAT 1559HAVE_EUIDACCESS 1560HAVE_DUP3 1561HAVE_DUP2 1562HAVE_COPY_FILE_RANGE 1563HAVE_CHOWN 1564GNULIB_WRITE 1565GNULIB_USLEEP 1566GNULIB_UNLINKAT 1567GNULIB_UNLINK 1568GNULIB_UNISTD_H_SIGPIPE 1569GNULIB_UNISTD_H_NONBLOCKING 1570GNULIB_TTYNAME_R 1571GNULIB_TRUNCATE 1572GNULIB_SYMLINKAT 1573GNULIB_SYMLINK 1574GNULIB_SLEEP 1575GNULIB_SETHOSTNAME 1576GNULIB_RMDIR 1577GNULIB_READLINKAT 1578GNULIB_READLINK 1579GNULIB_READ 1580GNULIB_PWRITE 1581GNULIB_PREAD 1582GNULIB_PIPE2 1583GNULIB_PIPE 1584GNULIB_LSEEK 1585GNULIB_LINKAT 1586GNULIB_LINK 1587GNULIB_LCHOWN 1588GNULIB_ISATTY 1589GNULIB_GROUP_MEMBER 1590GNULIB_GETUSERSHELL 1591GNULIB_GETPASS 1592GNULIB_GETPAGESIZE 1593GNULIB_GETOPT_POSIX 1594GNULIB_GETLOGIN_R 1595GNULIB_GETLOGIN 1596GNULIB_GETHOSTNAME 1597GNULIB_GETGROUPS 1598GNULIB_GETENTROPY 1599GNULIB_GETDTABLESIZE 1600GNULIB_GETDOMAINNAME 1601GNULIB_GETCWD 1602GNULIB_FTRUNCATE 1603GNULIB_FSYNC 1604GNULIB_FDATASYNC 1605GNULIB_FCHOWNAT 1606GNULIB_FCHDIR 1607GNULIB_FACCESSAT 1608GNULIB_EUIDACCESS 1609GNULIB_ENVIRON 1610GNULIB_DUP3 1611GNULIB_DUP2 1612GNULIB_DUP 1613GNULIB_COPY_FILE_RANGE 1614GNULIB_CLOSE 1615GNULIB_CHOWN 1616GNULIB_CHDIR 1617GNULIB_ACCESS 1618REPLACE_WCTOMB 1619REPLACE_UNSETENV 1620REPLACE_STRTOLD 1621REPLACE_STRTOD 1622REPLACE_SETSTATE 1623REPLACE_SETENV 1624REPLACE_REALPATH 1625REPLACE_REALLOC 1626REPLACE_RANDOM_R 1627REPLACE_RANDOM 1628REPLACE_QSORT_R 1629REPLACE_PUTENV 1630REPLACE_PTSNAME_R 1631REPLACE_PTSNAME 1632REPLACE_MKSTEMP 1633REPLACE_MBTOWC 1634REPLACE_MALLOC 1635REPLACE_INITSTATE 1636REPLACE_CANONICALIZE_FILE_NAME 1637REPLACE_CALLOC 1638HAVE_DECL_UNSETENV 1639HAVE_UNLOCKPT 1640HAVE_SYS_LOADAVG_H 1641HAVE_STRUCT_RANDOM_DATA 1642HAVE_STRTOULL 1643HAVE_STRTOLL 1644HAVE_STRTOLD 1645HAVE_STRTOD 1646HAVE_DECL_SETSTATE 1647HAVE_SETSTATE 1648HAVE_DECL_SETENV 1649HAVE_SETENV 1650HAVE_SECURE_GETENV 1651HAVE_RPMATCH 1652HAVE_REALPATH 1653HAVE_REALLOCARRAY 1654HAVE_RANDOM_R 1655HAVE_RANDOM_H 1656HAVE_RANDOM 1657HAVE_QSORT_R 1658HAVE_PTSNAME_R 1659HAVE_PTSNAME 1660HAVE_POSIX_OPENPT 1661HAVE_MKSTEMPS 1662HAVE_MKSTEMP 1663HAVE_MKOSTEMPS 1664HAVE_MKOSTEMP 1665HAVE_MKDTEMP 1666HAVE_MBTOWC 1667HAVE_DECL_INITSTATE 1668HAVE_INITSTATE 1669HAVE_GRANTPT 1670HAVE_GETSUBOPT 1671HAVE_DECL_GETLOADAVG 1672HAVE_CANONICALIZE_FILE_NAME 1673HAVE_ATOLL 1674HAVE__EXIT 1675GNULIB_WCTOMB 1676GNULIB_UNSETENV 1677GNULIB_UNLOCKPT 1678GNULIB_SYSTEM_POSIX 1679GNULIB_STRTOULL 1680GNULIB_STRTOLL 1681GNULIB_STRTOLD 1682GNULIB_STRTOD 1683GNULIB_SETENV 1684GNULIB_SECURE_GETENV 1685GNULIB_RPMATCH 1686GNULIB_REALPATH 1687GNULIB_REALLOC_POSIX 1688GNULIB_REALLOCARRAY 1689GNULIB_RANDOM_R 1690GNULIB_RANDOM 1691GNULIB_QSORT_R 1692GNULIB_PUTENV 1693GNULIB_PTSNAME_R 1694GNULIB_PTSNAME 1695GNULIB_POSIX_OPENPT 1696GNULIB_MKSTEMPS 1697GNULIB_MKSTEMP 1698GNULIB_MKOSTEMPS 1699GNULIB_MKOSTEMP 1700GNULIB_MKDTEMP 1701GNULIB_MBTOWC 1702GNULIB_MALLOC_POSIX 1703GNULIB_GRANTPT 1704GNULIB_GETSUBOPT 1705GNULIB_GETLOADAVG 1706GNULIB_CANONICALIZE_FILE_NAME 1707GNULIB_CALLOC_POSIX 1708GNULIB_ATOLL 1709GNULIB__EXIT 1710LOCALE_FR 1711REPLACE_WCSTOK 1712REPLACE_WCSFTIME 1713REPLACE_WCSWIDTH 1714REPLACE_WCWIDTH 1715REPLACE_WCSNRTOMBS 1716REPLACE_WCSRTOMBS 1717REPLACE_WCRTOMB 1718REPLACE_MBSNRTOWCS 1719REPLACE_MBSRTOWCS 1720REPLACE_MBRLEN 1721REPLACE_MBRTOWC 1722REPLACE_MBSINIT 1723REPLACE_WCTOB 1724REPLACE_BTOWC 1725REPLACE_MBSTATE_T 1726HAVE_DECL_WCWIDTH 1727HAVE_DECL_WCTOB 1728HAVE_WCSFTIME 1729HAVE_WCSWIDTH 1730HAVE_WCSTOK 1731HAVE_WCSSTR 1732HAVE_WCSPBRK 1733HAVE_WCSSPN 1734HAVE_WCSCSPN 1735HAVE_WCSRCHR 1736HAVE_WCSCHR 1737HAVE_WCSDUP 1738HAVE_WCSXFRM 1739HAVE_WCSCOLL 1740HAVE_WCSNCASECMP 1741HAVE_WCSCASECMP 1742HAVE_WCSNCMP 1743HAVE_WCSCMP 1744HAVE_WCSNCAT 1745HAVE_WCSCAT 1746HAVE_WCPNCPY 1747HAVE_WCSNCPY 1748HAVE_WCPCPY 1749HAVE_WCSCPY 1750HAVE_WCSNLEN 1751HAVE_WCSLEN 1752HAVE_WMEMSET 1753HAVE_WMEMPCPY 1754HAVE_WMEMMOVE 1755HAVE_WMEMCPY 1756HAVE_WMEMCMP 1757HAVE_WMEMCHR 1758HAVE_WCSNRTOMBS 1759HAVE_WCSRTOMBS 1760HAVE_WCRTOMB 1761HAVE_MBSNRTOWCS 1762HAVE_MBSRTOWCS 1763HAVE_MBRLEN 1764HAVE_MBRTOWC 1765HAVE_MBSINIT 1766HAVE_BTOWC 1767GNULIB_WCSFTIME 1768GNULIB_WCSWIDTH 1769GNULIB_WCSTOK 1770GNULIB_WCSSTR 1771GNULIB_WCSPBRK 1772GNULIB_WCSSPN 1773GNULIB_WCSCSPN 1774GNULIB_WCSRCHR 1775GNULIB_WCSCHR 1776GNULIB_WCSDUP 1777GNULIB_WCSXFRM 1778GNULIB_WCSCOLL 1779GNULIB_WCSNCASECMP 1780GNULIB_WCSCASECMP 1781GNULIB_WCSNCMP 1782GNULIB_WCSCMP 1783GNULIB_WCSNCAT 1784GNULIB_WCSCAT 1785GNULIB_WCPNCPY 1786GNULIB_WCSNCPY 1787GNULIB_WCPCPY 1788GNULIB_WCSCPY 1789GNULIB_WCSNLEN 1790GNULIB_WCSLEN 1791GNULIB_WMEMSET 1792GNULIB_WMEMPCPY 1793GNULIB_WMEMMOVE 1794GNULIB_WMEMCPY 1795GNULIB_WMEMCMP 1796GNULIB_WMEMCHR 1797GNULIB_WCWIDTH 1798GNULIB_WCSNRTOMBS 1799GNULIB_WCSRTOMBS 1800GNULIB_WCRTOMB 1801GNULIB_MBSNRTOWCS 1802GNULIB_MBSRTOWCS 1803GNULIB_MBRLEN 1804GNULIB_MBRTOWC 1805GNULIB_MBSINIT 1806GNULIB_WCTOB 1807GNULIB_BTOWC 1808MKDIR_P 1809HAVE_WS2TCPIP_H 1810HAVE_FEATURES_H 1811NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H 1812NEXT_ARPA_INET_H 1813PRAGMA_COLUMNS 1814PRAGMA_SYSTEM_HEADER 1815INCLUDE_NEXT_AS_FIRST_DIRECTIVE 1816INCLUDE_NEXT 1817HAVE_ARPA_INET_H 1818REPLACE_INET_PTON 1819REPLACE_INET_NTOP 1820HAVE_DECL_INET_PTON 1821HAVE_DECL_INET_NTOP 1822GNULIB_INET_PTON 1823GNULIB_INET_NTOP 1824HAVE_ALLOCA_H 1825GL_GENERATE_ALLOCA_H_FALSE 1826GL_GENERATE_ALLOCA_H_TRUE 1827ALLOCA_H 1828ALLOCA 1829GL_COND_LIBTOOL_FALSE 1830GL_COND_LIBTOOL_TRUE 1831RANLIB 1832ARFLAGS 1833AR 1834LARGEFILE_CPPFLAGS 1835target_os 1836target_vendor 1837target_cpu 1838target 1839host_os 1840host_vendor 1841host_cpu 1842host 1843build_os 1844build_vendor 1845build_cpu 1846build 1847EGREP 1848GREP 1849CPP 1850OBJEXT 1851EXEEXT 1852ac_ct_CC 1853CPPFLAGS 1854LDFLAGS 1855CFLAGS 1856CC 1857MAINT 1858MAINTAINER_MODE_FALSE 1859MAINTAINER_MODE_TRUE 1860target_alias 1861host_alias 1862build_alias 1863LIBS 1864ECHO_T 1865ECHO_N 1866ECHO_C 1867DEFS 1868mandir 1869localedir 1870libdir 1871psdir 1872pdfdir 1873dvidir 1874htmldir 1875infodir 1876docdir 1877oldincludedir 1878includedir 1879localstatedir 1880sharedstatedir 1881sysconfdir 1882datadir 1883datarootdir 1884libexecdir 1885sbindir 1886bindir 1887program_transform_name 1888prefix 1889exec_prefix 1890PACKAGE_URL 1891PACKAGE_BUGREPORT 1892PACKAGE_STRING 1893PACKAGE_VERSION 1894PACKAGE_TARNAME 1895PACKAGE_NAME 1896PATH_SEPARATOR 1897SHELL 1898am__quote' 1899ac_subst_files='' 1900ac_user_opts=' 1901enable_option_checking 1902enable_maintainer_mode 1903enable_plugins 1904enable_largefile 1905enable_threads 1906enable_cross_guesses 1907enable_dependency_tracking 1908enable_silent_rules 1909' 1910 ac_precious_vars='build_alias 1911host_alias 1912target_alias 1913CC 1914CFLAGS 1915LDFLAGS 1916LIBS 1917CPPFLAGS 1918CPP' 1919 1920 1921# Initialize some variables set by options. 1922ac_init_help= 1923ac_init_version=false 1924ac_unrecognized_opts= 1925ac_unrecognized_sep= 1926# The variables have the same names as the options, with 1927# dashes changed to underlines. 1928cache_file=/dev/null 1929exec_prefix=NONE 1930no_create= 1931no_recursion= 1932prefix=NONE 1933program_prefix=NONE 1934program_suffix=NONE 1935program_transform_name=s,x,x, 1936silent= 1937site= 1938srcdir= 1939verbose= 1940x_includes=NONE 1941x_libraries=NONE 1942 1943# Installation directory options. 1944# These are left unexpanded so users can "make install exec_prefix=/foo" 1945# and all the variables that are supposed to be based on exec_prefix 1946# by default will actually change. 1947# Use braces instead of parens because sh, perl, etc. also accept them. 1948# (The list follows the same order as the GNU Coding Standards.) 1949bindir='${exec_prefix}/bin' 1950sbindir='${exec_prefix}/sbin' 1951libexecdir='${exec_prefix}/libexec' 1952datarootdir='${prefix}/share' 1953datadir='${datarootdir}' 1954sysconfdir='${prefix}/etc' 1955sharedstatedir='${prefix}/com' 1956localstatedir='${prefix}/var' 1957includedir='${prefix}/include' 1958oldincludedir='/usr/include' 1959docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' 1960infodir='${datarootdir}/info' 1961htmldir='${docdir}' 1962dvidir='${docdir}' 1963pdfdir='${docdir}' 1964psdir='${docdir}' 1965libdir='${exec_prefix}/lib' 1966localedir='${datarootdir}/locale' 1967mandir='${datarootdir}/man' 1968 1969ac_prev= 1970ac_dashdash= 1971for ac_option 1972do 1973 # If the previous option needs an argument, assign it. 1974 if test -n "$ac_prev"; then 1975 eval $ac_prev=\$ac_option 1976 ac_prev= 1977 continue 1978 fi 1979 1980 case $ac_option in 1981 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; 1982 *=) ac_optarg= ;; 1983 *) ac_optarg=yes ;; 1984 esac 1985 1986 # Accept the important Cygnus configure options, so we can diagnose typos. 1987 1988 case $ac_dashdash$ac_option in 1989 --) 1990 ac_dashdash=yes ;; 1991 1992 -bindir | --bindir | --bindi | --bind | --bin | --bi) 1993 ac_prev=bindir ;; 1994 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 1995 bindir=$ac_optarg ;; 1996 1997 -build | --build | --buil | --bui | --bu) 1998 ac_prev=build_alias ;; 1999 -build=* | --build=* | --buil=* | --bui=* | --bu=*) 2000 build_alias=$ac_optarg ;; 2001 2002 -cache-file | --cache-file | --cache-fil | --cache-fi \ 2003 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 2004 ac_prev=cache_file ;; 2005 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 2006 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 2007 cache_file=$ac_optarg ;; 2008 2009 --config-cache | -C) 2010 cache_file=config.cache ;; 2011 2012 -datadir | --datadir | --datadi | --datad) 2013 ac_prev=datadir ;; 2014 -datadir=* | --datadir=* | --datadi=* | --datad=*) 2015 datadir=$ac_optarg ;; 2016 2017 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ 2018 | --dataroo | --dataro | --datar) 2019 ac_prev=datarootdir ;; 2020 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ 2021 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) 2022 datarootdir=$ac_optarg ;; 2023 2024 -disable-* | --disable-*) 2025 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` 2026 # Reject names that are not valid shell variable names. 2027 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 2028 as_fn_error $? "invalid feature name: $ac_useropt" 2029 ac_useropt_orig=$ac_useropt 2030 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 2031 case $ac_user_opts in 2032 *" 2033"enable_$ac_useropt" 2034"*) ;; 2035 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" 2036 ac_unrecognized_sep=', ';; 2037 esac 2038 eval enable_$ac_useropt=no ;; 2039 2040 -docdir | --docdir | --docdi | --doc | --do) 2041 ac_prev=docdir ;; 2042 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) 2043 docdir=$ac_optarg ;; 2044 2045 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) 2046 ac_prev=dvidir ;; 2047 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) 2048 dvidir=$ac_optarg ;; 2049 2050 -enable-* | --enable-*) 2051 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` 2052 # Reject names that are not valid shell variable names. 2053 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 2054 as_fn_error $? "invalid feature name: $ac_useropt" 2055 ac_useropt_orig=$ac_useropt 2056 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 2057 case $ac_user_opts in 2058 *" 2059"enable_$ac_useropt" 2060"*) ;; 2061 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" 2062 ac_unrecognized_sep=', ';; 2063 esac 2064 eval enable_$ac_useropt=\$ac_optarg ;; 2065 2066 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 2067 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 2068 | --exec | --exe | --ex) 2069 ac_prev=exec_prefix ;; 2070 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 2071 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 2072 | --exec=* | --exe=* | --ex=*) 2073 exec_prefix=$ac_optarg ;; 2074 2075 -gas | --gas | --ga | --g) 2076 # Obsolete; use --with-gas. 2077 with_gas=yes ;; 2078 2079 -help | --help | --hel | --he | -h) 2080 ac_init_help=long ;; 2081 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) 2082 ac_init_help=recursive ;; 2083 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) 2084 ac_init_help=short ;; 2085 2086 -host | --host | --hos | --ho) 2087 ac_prev=host_alias ;; 2088 -host=* | --host=* | --hos=* | --ho=*) 2089 host_alias=$ac_optarg ;; 2090 2091 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) 2092 ac_prev=htmldir ;; 2093 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ 2094 | --ht=*) 2095 htmldir=$ac_optarg ;; 2096 2097 -includedir | --includedir | --includedi | --included | --include \ 2098 | --includ | --inclu | --incl | --inc) 2099 ac_prev=includedir ;; 2100 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 2101 | --includ=* | --inclu=* | --incl=* | --inc=*) 2102 includedir=$ac_optarg ;; 2103 2104 -infodir | --infodir | --infodi | --infod | --info | --inf) 2105 ac_prev=infodir ;; 2106 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 2107 infodir=$ac_optarg ;; 2108 2109 -libdir | --libdir | --libdi | --libd) 2110 ac_prev=libdir ;; 2111 -libdir=* | --libdir=* | --libdi=* | --libd=*) 2112 libdir=$ac_optarg ;; 2113 2114 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 2115 | --libexe | --libex | --libe) 2116 ac_prev=libexecdir ;; 2117 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 2118 | --libexe=* | --libex=* | --libe=*) 2119 libexecdir=$ac_optarg ;; 2120 2121 -localedir | --localedir | --localedi | --localed | --locale) 2122 ac_prev=localedir ;; 2123 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) 2124 localedir=$ac_optarg ;; 2125 2126 -localstatedir | --localstatedir | --localstatedi | --localstated \ 2127 | --localstate | --localstat | --localsta | --localst | --locals) 2128 ac_prev=localstatedir ;; 2129 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 2130 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 2131 localstatedir=$ac_optarg ;; 2132 2133 -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 2134 ac_prev=mandir ;; 2135 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 2136 mandir=$ac_optarg ;; 2137 2138 -nfp | --nfp | --nf) 2139 # Obsolete; use --without-fp. 2140 with_fp=no ;; 2141 2142 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 2143 | --no-cr | --no-c | -n) 2144 no_create=yes ;; 2145 2146 -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 2147 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 2148 no_recursion=yes ;; 2149 2150 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 2151 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 2152 | --oldin | --oldi | --old | --ol | --o) 2153 ac_prev=oldincludedir ;; 2154 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 2155 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 2156 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 2157 oldincludedir=$ac_optarg ;; 2158 2159 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 2160 ac_prev=prefix ;; 2161 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 2162 prefix=$ac_optarg ;; 2163 2164 -program-prefix | --program-prefix | --program-prefi | --program-pref \ 2165 | --program-pre | --program-pr | --program-p) 2166 ac_prev=program_prefix ;; 2167 -program-prefix=* | --program-prefix=* | --program-prefi=* \ 2168 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 2169 program_prefix=$ac_optarg ;; 2170 2171 -program-suffix | --program-suffix | --program-suffi | --program-suff \ 2172 | --program-suf | --program-su | --program-s) 2173 ac_prev=program_suffix ;; 2174 -program-suffix=* | --program-suffix=* | --program-suffi=* \ 2175 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 2176 program_suffix=$ac_optarg ;; 2177 2178 -program-transform-name | --program-transform-name \ 2179 | --program-transform-nam | --program-transform-na \ 2180 | --program-transform-n | --program-transform- \ 2181 | --program-transform | --program-transfor \ 2182 | --program-transfo | --program-transf \ 2183 | --program-trans | --program-tran \ 2184 | --progr-tra | --program-tr | --program-t) 2185 ac_prev=program_transform_name ;; 2186 -program-transform-name=* | --program-transform-name=* \ 2187 | --program-transform-nam=* | --program-transform-na=* \ 2188 | --program-transform-n=* | --program-transform-=* \ 2189 | --program-transform=* | --program-transfor=* \ 2190 | --program-transfo=* | --program-transf=* \ 2191 | --program-trans=* | --program-tran=* \ 2192 | --progr-tra=* | --program-tr=* | --program-t=*) 2193 program_transform_name=$ac_optarg ;; 2194 2195 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) 2196 ac_prev=pdfdir ;; 2197 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) 2198 pdfdir=$ac_optarg ;; 2199 2200 -psdir | --psdir | --psdi | --psd | --ps) 2201 ac_prev=psdir ;; 2202 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) 2203 psdir=$ac_optarg ;; 2204 2205 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 2206 | -silent | --silent | --silen | --sile | --sil) 2207 silent=yes ;; 2208 2209 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 2210 ac_prev=sbindir ;; 2211 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 2212 | --sbi=* | --sb=*) 2213 sbindir=$ac_optarg ;; 2214 2215 -sharedstatedir | --sharedstatedir | --sharedstatedi \ 2216 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 2217 | --sharedst | --shareds | --shared | --share | --shar \ 2218 | --sha | --sh) 2219 ac_prev=sharedstatedir ;; 2220 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 2221 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 2222 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 2223 | --sha=* | --sh=*) 2224 sharedstatedir=$ac_optarg ;; 2225 2226 -site | --site | --sit) 2227 ac_prev=site ;; 2228 -site=* | --site=* | --sit=*) 2229 site=$ac_optarg ;; 2230 2231 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 2232 ac_prev=srcdir ;; 2233 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 2234 srcdir=$ac_optarg ;; 2235 2236 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 2237 | --syscon | --sysco | --sysc | --sys | --sy) 2238 ac_prev=sysconfdir ;; 2239 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 2240 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 2241 sysconfdir=$ac_optarg ;; 2242 2243 -target | --target | --targe | --targ | --tar | --ta | --t) 2244 ac_prev=target_alias ;; 2245 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 2246 target_alias=$ac_optarg ;; 2247 2248 -v | -verbose | --verbose | --verbos | --verbo | --verb) 2249 verbose=yes ;; 2250 2251 -version | --version | --versio | --versi | --vers | -V) 2252 ac_init_version=: ;; 2253 2254 -with-* | --with-*) 2255 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` 2256 # Reject names that are not valid shell variable names. 2257 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 2258 as_fn_error $? "invalid package name: $ac_useropt" 2259 ac_useropt_orig=$ac_useropt 2260 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 2261 case $ac_user_opts in 2262 *" 2263"with_$ac_useropt" 2264"*) ;; 2265 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" 2266 ac_unrecognized_sep=', ';; 2267 esac 2268 eval with_$ac_useropt=\$ac_optarg ;; 2269 2270 -without-* | --without-*) 2271 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` 2272 # Reject names that are not valid shell variable names. 2273 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 2274 as_fn_error $? "invalid package name: $ac_useropt" 2275 ac_useropt_orig=$ac_useropt 2276 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 2277 case $ac_user_opts in 2278 *" 2279"with_$ac_useropt" 2280"*) ;; 2281 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" 2282 ac_unrecognized_sep=', ';; 2283 esac 2284 eval with_$ac_useropt=no ;; 2285 2286 --x) 2287 # Obsolete; use --with-x. 2288 with_x=yes ;; 2289 2290 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 2291 | --x-incl | --x-inc | --x-in | --x-i) 2292 ac_prev=x_includes ;; 2293 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 2294 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 2295 x_includes=$ac_optarg ;; 2296 2297 -x-libraries | --x-libraries | --x-librarie | --x-librari \ 2298 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 2299 ac_prev=x_libraries ;; 2300 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 2301 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 2302 x_libraries=$ac_optarg ;; 2303 2304 -*) as_fn_error $? "unrecognized option: \`$ac_option' 2305Try \`$0 --help' for more information" 2306 ;; 2307 2308 *=*) 2309 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` 2310 # Reject names that are not valid shell variable names. 2311 case $ac_envvar in #( 2312 '' | [0-9]* | *[!_$as_cr_alnum]* ) 2313 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; 2314 esac 2315 eval $ac_envvar=\$ac_optarg 2316 export $ac_envvar ;; 2317 2318 *) 2319 # FIXME: should be removed in autoconf 3.0. 2320 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 2321 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 2322 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 2323 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" 2324 ;; 2325 2326 esac 2327done 2328 2329if test -n "$ac_prev"; then 2330 ac_option=--`echo $ac_prev | sed 's/_/-/g'` 2331 as_fn_error $? "missing argument to $ac_option" 2332fi 2333 2334if test -n "$ac_unrecognized_opts"; then 2335 case $enable_option_checking in 2336 no) ;; 2337 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; 2338 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; 2339 esac 2340fi 2341 2342# Check all directory arguments for consistency. 2343for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ 2344 datadir sysconfdir sharedstatedir localstatedir includedir \ 2345 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 2346 libdir localedir mandir 2347do 2348 eval ac_val=\$$ac_var 2349 # Remove trailing slashes. 2350 case $ac_val in 2351 */ ) 2352 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` 2353 eval $ac_var=\$ac_val;; 2354 esac 2355 # Be sure to have absolute directory names. 2356 case $ac_val in 2357 [\\/$]* | ?:[\\/]* ) continue;; 2358 NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 2359 esac 2360 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 2361done 2362 2363# There might be people who depend on the old broken behavior: `$host' 2364# used to hold the argument of --host etc. 2365# FIXME: To remove some day. 2366build=$build_alias 2367host=$host_alias 2368target=$target_alias 2369 2370# FIXME: To remove some day. 2371if test "x$host_alias" != x; then 2372 if test "x$build_alias" = x; then 2373 cross_compiling=maybe 2374 elif test "x$build_alias" != "x$host_alias"; then 2375 cross_compiling=yes 2376 fi 2377fi 2378 2379ac_tool_prefix= 2380test -n "$host_alias" && ac_tool_prefix=$host_alias- 2381 2382test "$silent" = yes && exec 6>/dev/null 2383 2384 2385ac_pwd=`pwd` && test -n "$ac_pwd" && 2386ac_ls_di=`ls -di .` && 2387ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || 2388 as_fn_error $? "working directory cannot be determined" 2389test "X$ac_ls_di" = "X$ac_pwd_ls_di" || 2390 as_fn_error $? "pwd does not report name of working directory" 2391 2392 2393# Find the source files, if location was not specified. 2394if test -z "$srcdir"; then 2395 ac_srcdir_defaulted=yes 2396 # Try the directory containing this script, then the parent directory. 2397 ac_confdir=`$as_dirname -- "$as_myself" || 2398$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 2399 X"$as_myself" : 'X\(//\)[^/]' \| \ 2400 X"$as_myself" : 'X\(//\)$' \| \ 2401 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || 2402$as_echo X"$as_myself" | 2403 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 2404 s//\1/ 2405 q 2406 } 2407 /^X\(\/\/\)[^/].*/{ 2408 s//\1/ 2409 q 2410 } 2411 /^X\(\/\/\)$/{ 2412 s//\1/ 2413 q 2414 } 2415 /^X\(\/\).*/{ 2416 s//\1/ 2417 q 2418 } 2419 s/.*/./; q'` 2420 srcdir=$ac_confdir 2421 if test ! -r "$srcdir/$ac_unique_file"; then 2422 srcdir=.. 2423 fi 2424else 2425 ac_srcdir_defaulted=no 2426fi 2427if test ! -r "$srcdir/$ac_unique_file"; then 2428 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 2429 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" 2430fi 2431ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" 2432ac_abs_confdir=`( 2433 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" 2434 pwd)` 2435# When building in place, set srcdir=. 2436if test "$ac_abs_confdir" = "$ac_pwd"; then 2437 srcdir=. 2438fi 2439# Remove unnecessary trailing slashes from srcdir. 2440# Double slashes in file names in object file debugging info 2441# mess up M-x gdb in Emacs. 2442case $srcdir in 2443*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; 2444esac 2445for ac_var in $ac_precious_vars; do 2446 eval ac_env_${ac_var}_set=\${${ac_var}+set} 2447 eval ac_env_${ac_var}_value=\$${ac_var} 2448 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} 2449 eval ac_cv_env_${ac_var}_value=\$${ac_var} 2450done 2451 2452# 2453# Report the --help message. 2454# 2455if test "$ac_init_help" = "long"; then 2456 # Omit some internal or obsolete options to make the list less imposing. 2457 # This message is too long to be a string in the A/UX 3.1 sh. 2458 cat <<_ACEOF 2459\`configure' configures libgnu UNUSED-VERSION to adapt to many kinds of systems. 2460 2461Usage: $0 [OPTION]... [VAR=VALUE]... 2462 2463To assign environment variables (e.g., CC, CFLAGS...), specify them as 2464VAR=VALUE. See below for descriptions of some of the useful variables. 2465 2466Defaults for the options are specified in brackets. 2467 2468Configuration: 2469 -h, --help display this help and exit 2470 --help=short display options specific to this package 2471 --help=recursive display the short help of all the included packages 2472 -V, --version display version information and exit 2473 -q, --quiet, --silent do not print \`checking ...' messages 2474 --cache-file=FILE cache test results in FILE [disabled] 2475 -C, --config-cache alias for \`--cache-file=config.cache' 2476 -n, --no-create do not create output files 2477 --srcdir=DIR find the sources in DIR [configure dir or \`..'] 2478 2479Installation directories: 2480 --prefix=PREFIX install architecture-independent files in PREFIX 2481 [$ac_default_prefix] 2482 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 2483 [PREFIX] 2484 2485By default, \`make install' will install all the files in 2486\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify 2487an installation prefix other than \`$ac_default_prefix' using \`--prefix', 2488for instance \`--prefix=\$HOME'. 2489 2490For better control, use the options below. 2491 2492Fine tuning of the installation directories: 2493 --bindir=DIR user executables [EPREFIX/bin] 2494 --sbindir=DIR system admin executables [EPREFIX/sbin] 2495 --libexecdir=DIR program executables [EPREFIX/libexec] 2496 --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 2497 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 2498 --localstatedir=DIR modifiable single-machine data [PREFIX/var] 2499 --libdir=DIR object code libraries [EPREFIX/lib] 2500 --includedir=DIR C header files [PREFIX/include] 2501 --oldincludedir=DIR C header files for non-gcc [/usr/include] 2502 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 2503 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 2504 --infodir=DIR info documentation [DATAROOTDIR/info] 2505 --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 2506 --mandir=DIR man documentation [DATAROOTDIR/man] 2507 --docdir=DIR documentation root [DATAROOTDIR/doc/libgnu] 2508 --htmldir=DIR html documentation [DOCDIR] 2509 --dvidir=DIR dvi documentation [DOCDIR] 2510 --pdfdir=DIR pdf documentation [DOCDIR] 2511 --psdir=DIR ps documentation [DOCDIR] 2512_ACEOF 2513 2514 cat <<\_ACEOF 2515 2516Program names: 2517 --program-prefix=PREFIX prepend PREFIX to installed program names 2518 --program-suffix=SUFFIX append SUFFIX to installed program names 2519 --program-transform-name=PROGRAM run sed PROGRAM on installed program names 2520 2521System types: 2522 --build=BUILD configure for building on BUILD [guessed] 2523 --host=HOST cross-compile to build programs to run on HOST [BUILD] 2524 --target=TARGET configure for building compilers for TARGET [HOST] 2525_ACEOF 2526fi 2527 2528if test -n "$ac_init_help"; then 2529 case $ac_init_help in 2530 short | recursive ) echo "Configuration of libgnu UNUSED-VERSION:";; 2531 esac 2532 cat <<\_ACEOF 2533 2534Optional Features: 2535 --disable-option-checking ignore unrecognized --enable/--with options 2536 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 2537 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 2538 --enable-maintainer-mode 2539 enable make rules and dependencies not useful (and 2540 sometimes confusing) to the casual installer 2541 --enable-plugins Enable support for plugins 2542 --disable-largefile omit support for large files 2543 --enable-threads={isoc|posix|isoc+posix|windows} 2544 specify multithreading API 2545 --disable-threads build without multithread safety 2546 --enable-cross-guesses={conservative|risky} 2547 specify policy for cross-compilation guesses 2548 --enable-dependency-tracking 2549 do not reject slow dependency extractors 2550 --disable-dependency-tracking 2551 speeds up one-time build 2552 --enable-silent-rules less verbose build output (undo: "make V=1") 2553 --disable-silent-rules verbose build output (undo: "make V=0") 2554 2555Some influential environment variables: 2556 CC C compiler command 2557 CFLAGS C compiler flags 2558 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a 2559 nonstandard directory <lib dir> 2560 LIBS libraries to pass to the linker, e.g. -l<library> 2561 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if 2562 you have headers in a nonstandard directory <include dir> 2563 CPP C preprocessor 2564 2565Use these variables to override the choices made by `configure' or to help 2566it to find libraries and programs with nonstandard names/locations. 2567 2568Report bugs to the package provider. 2569_ACEOF 2570ac_status=$? 2571fi 2572 2573if test "$ac_init_help" = "recursive"; then 2574 # If there are subdirs, report their specific --help. 2575 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue 2576 test -d "$ac_dir" || 2577 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || 2578 continue 2579 ac_builddir=. 2580 2581case "$ac_dir" in 2582.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 2583*) 2584 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 2585 # A ".." for each directory in $ac_dir_suffix. 2586 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 2587 case $ac_top_builddir_sub in 2588 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 2589 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 2590 esac ;; 2591esac 2592ac_abs_top_builddir=$ac_pwd 2593ac_abs_builddir=$ac_pwd$ac_dir_suffix 2594# for backward compatibility: 2595ac_top_builddir=$ac_top_build_prefix 2596 2597case $srcdir in 2598 .) # We are building in place. 2599 ac_srcdir=. 2600 ac_top_srcdir=$ac_top_builddir_sub 2601 ac_abs_top_srcdir=$ac_pwd ;; 2602 [\\/]* | ?:[\\/]* ) # Absolute name. 2603 ac_srcdir=$srcdir$ac_dir_suffix; 2604 ac_top_srcdir=$srcdir 2605 ac_abs_top_srcdir=$srcdir ;; 2606 *) # Relative name. 2607 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 2608 ac_top_srcdir=$ac_top_build_prefix$srcdir 2609 ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 2610esac 2611ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 2612 2613 cd "$ac_dir" || { ac_status=$?; continue; } 2614 # Check for guested configure. 2615 if test -f "$ac_srcdir/configure.gnu"; then 2616 echo && 2617 $SHELL "$ac_srcdir/configure.gnu" --help=recursive 2618 elif test -f "$ac_srcdir/configure"; then 2619 echo && 2620 $SHELL "$ac_srcdir/configure" --help=recursive 2621 else 2622 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 2623 fi || ac_status=$? 2624 cd "$ac_pwd" || { ac_status=$?; break; } 2625 done 2626fi 2627 2628test -n "$ac_init_help" && exit $ac_status 2629if $ac_init_version; then 2630 cat <<\_ACEOF 2631libgnu configure UNUSED-VERSION 2632generated by GNU Autoconf 2.69 2633 2634Copyright (C) 2012 Free Software Foundation, Inc. 2635This configure script is free software; the Free Software Foundation 2636gives unlimited permission to copy, distribute and modify it. 2637_ACEOF 2638 exit 2639fi 2640 2641## ------------------------ ## 2642## Autoconf initialization. ## 2643## ------------------------ ## 2644 2645# ac_fn_c_try_compile LINENO 2646# -------------------------- 2647# Try to compile conftest.$ac_ext, and return whether this succeeded. 2648ac_fn_c_try_compile () 2649{ 2650 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2651 rm -f conftest.$ac_objext 2652 if { { ac_try="$ac_compile" 2653case "(($ac_try" in 2654 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2655 *) ac_try_echo=$ac_try;; 2656esac 2657eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2658$as_echo "$ac_try_echo"; } >&5 2659 (eval "$ac_compile") 2>conftest.err 2660 ac_status=$? 2661 if test -s conftest.err; then 2662 grep -v '^ *+' conftest.err >conftest.er1 2663 cat conftest.er1 >&5 2664 mv -f conftest.er1 conftest.err 2665 fi 2666 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2667 test $ac_status = 0; } && { 2668 test -z "$ac_c_werror_flag" || 2669 test ! -s conftest.err 2670 } && test -s conftest.$ac_objext; then : 2671 ac_retval=0 2672else 2673 $as_echo "$as_me: failed program was:" >&5 2674sed 's/^/| /' conftest.$ac_ext >&5 2675 2676 ac_retval=1 2677fi 2678 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2679 as_fn_set_status $ac_retval 2680 2681} # ac_fn_c_try_compile 2682 2683# ac_fn_c_try_cpp LINENO 2684# ---------------------- 2685# Try to preprocess conftest.$ac_ext, and return whether this succeeded. 2686ac_fn_c_try_cpp () 2687{ 2688 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2689 if { { ac_try="$ac_cpp conftest.$ac_ext" 2690case "(($ac_try" in 2691 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2692 *) ac_try_echo=$ac_try;; 2693esac 2694eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2695$as_echo "$ac_try_echo"; } >&5 2696 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err 2697 ac_status=$? 2698 if test -s conftest.err; then 2699 grep -v '^ *+' conftest.err >conftest.er1 2700 cat conftest.er1 >&5 2701 mv -f conftest.er1 conftest.err 2702 fi 2703 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2704 test $ac_status = 0; } > conftest.i && { 2705 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 2706 test ! -s conftest.err 2707 }; then : 2708 ac_retval=0 2709else 2710 $as_echo "$as_me: failed program was:" >&5 2711sed 's/^/| /' conftest.$ac_ext >&5 2712 2713 ac_retval=1 2714fi 2715 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2716 as_fn_set_status $ac_retval 2717 2718} # ac_fn_c_try_cpp 2719 2720# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES 2721# ------------------------------------------------------- 2722# Tests whether HEADER exists, giving a warning if it cannot be compiled using 2723# the include files in INCLUDES and setting the cache variable VAR 2724# accordingly. 2725ac_fn_c_check_header_mongrel () 2726{ 2727 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2728 if eval \${$3+:} false; then : 2729 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2730$as_echo_n "checking for $2... " >&6; } 2731if eval \${$3+:} false; then : 2732 $as_echo_n "(cached) " >&6 2733fi 2734eval ac_res=\$$3 2735 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2736$as_echo "$ac_res" >&6; } 2737else 2738 # Is the header compilable? 2739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 2740$as_echo_n "checking $2 usability... " >&6; } 2741cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2742/* end confdefs.h. */ 2743$4 2744#include <$2> 2745_ACEOF 2746if ac_fn_c_try_compile "$LINENO"; then : 2747 ac_header_compiler=yes 2748else 2749 ac_header_compiler=no 2750fi 2751rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2752{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 2753$as_echo "$ac_header_compiler" >&6; } 2754 2755# Is the header present? 2756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 2757$as_echo_n "checking $2 presence... " >&6; } 2758cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2759/* end confdefs.h. */ 2760#include <$2> 2761_ACEOF 2762if ac_fn_c_try_cpp "$LINENO"; then : 2763 ac_header_preproc=yes 2764else 2765 ac_header_preproc=no 2766fi 2767rm -f conftest.err conftest.i conftest.$ac_ext 2768{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 2769$as_echo "$ac_header_preproc" >&6; } 2770 2771# So? What about this header? 2772case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( 2773 yes:no: ) 2774 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 2775$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} 2776 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 2777$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} 2778 ;; 2779 no:yes:* ) 2780 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 2781$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} 2782 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 2783$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} 2784 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 2785$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} 2786 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 2787$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} 2788 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 2789$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} 2790 ;; 2791esac 2792 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2793$as_echo_n "checking for $2... " >&6; } 2794if eval \${$3+:} false; then : 2795 $as_echo_n "(cached) " >&6 2796else 2797 eval "$3=\$ac_header_compiler" 2798fi 2799eval ac_res=\$$3 2800 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2801$as_echo "$ac_res" >&6; } 2802fi 2803 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2804 2805} # ac_fn_c_check_header_mongrel 2806 2807# ac_fn_c_try_run LINENO 2808# ---------------------- 2809# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes 2810# that executables *can* be run. 2811ac_fn_c_try_run () 2812{ 2813 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2814 if { { ac_try="$ac_link" 2815case "(($ac_try" in 2816 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2817 *) ac_try_echo=$ac_try;; 2818esac 2819eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2820$as_echo "$ac_try_echo"; } >&5 2821 (eval "$ac_link") 2>&5 2822 ac_status=$? 2823 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2824 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' 2825 { { case "(($ac_try" in 2826 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2827 *) ac_try_echo=$ac_try;; 2828esac 2829eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2830$as_echo "$ac_try_echo"; } >&5 2831 (eval "$ac_try") 2>&5 2832 ac_status=$? 2833 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2834 test $ac_status = 0; }; }; then : 2835 ac_retval=0 2836else 2837 $as_echo "$as_me: program exited with status $ac_status" >&5 2838 $as_echo "$as_me: failed program was:" >&5 2839sed 's/^/| /' conftest.$ac_ext >&5 2840 2841 ac_retval=$ac_status 2842fi 2843 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 2844 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2845 as_fn_set_status $ac_retval 2846 2847} # ac_fn_c_try_run 2848 2849# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES 2850# ------------------------------------------------------- 2851# Tests whether HEADER exists and can be compiled using the include files in 2852# INCLUDES, setting the cache variable VAR accordingly. 2853ac_fn_c_check_header_compile () 2854{ 2855 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2857$as_echo_n "checking for $2... " >&6; } 2858if eval \${$3+:} false; then : 2859 $as_echo_n "(cached) " >&6 2860else 2861 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2862/* end confdefs.h. */ 2863$4 2864#include <$2> 2865_ACEOF 2866if ac_fn_c_try_compile "$LINENO"; then : 2867 eval "$3=yes" 2868else 2869 eval "$3=no" 2870fi 2871rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2872fi 2873eval ac_res=\$$3 2874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2875$as_echo "$ac_res" >&6; } 2876 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2877 2878} # ac_fn_c_check_header_compile 2879 2880# ac_fn_c_try_link LINENO 2881# ----------------------- 2882# Try to link conftest.$ac_ext, and return whether this succeeded. 2883ac_fn_c_try_link () 2884{ 2885 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2886 rm -f conftest.$ac_objext conftest$ac_exeext 2887 if { { ac_try="$ac_link" 2888case "(($ac_try" in 2889 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2890 *) ac_try_echo=$ac_try;; 2891esac 2892eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2893$as_echo "$ac_try_echo"; } >&5 2894 (eval "$ac_link") 2>conftest.err 2895 ac_status=$? 2896 if test -s conftest.err; then 2897 grep -v '^ *+' conftest.err >conftest.er1 2898 cat conftest.er1 >&5 2899 mv -f conftest.er1 conftest.err 2900 fi 2901 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2902 test $ac_status = 0; } && { 2903 test -z "$ac_c_werror_flag" || 2904 test ! -s conftest.err 2905 } && test -s conftest$ac_exeext && { 2906 test "$cross_compiling" = yes || 2907 test -x conftest$ac_exeext 2908 }; then : 2909 ac_retval=0 2910else 2911 $as_echo "$as_me: failed program was:" >&5 2912sed 's/^/| /' conftest.$ac_ext >&5 2913 2914 ac_retval=1 2915fi 2916 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information 2917 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would 2918 # interfere with the next link command; also delete a directory that is 2919 # left behind by Apple's compiler. We do this before executing the actions. 2920 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 2921 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2922 as_fn_set_status $ac_retval 2923 2924} # ac_fn_c_try_link 2925 2926# ac_fn_c_check_type LINENO TYPE VAR INCLUDES 2927# ------------------------------------------- 2928# Tests whether TYPE exists after having included INCLUDES, setting cache 2929# variable VAR accordingly. 2930ac_fn_c_check_type () 2931{ 2932 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2934$as_echo_n "checking for $2... " >&6; } 2935if eval \${$3+:} false; then : 2936 $as_echo_n "(cached) " >&6 2937else 2938 eval "$3=no" 2939 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2940/* end confdefs.h. */ 2941$4 2942int 2943main () 2944{ 2945if (sizeof ($2)) 2946 return 0; 2947 ; 2948 return 0; 2949} 2950_ACEOF 2951if ac_fn_c_try_compile "$LINENO"; then : 2952 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2953/* end confdefs.h. */ 2954$4 2955int 2956main () 2957{ 2958if (sizeof (($2))) 2959 return 0; 2960 ; 2961 return 0; 2962} 2963_ACEOF 2964if ac_fn_c_try_compile "$LINENO"; then : 2965 2966else 2967 eval "$3=yes" 2968fi 2969rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2970fi 2971rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2972fi 2973eval ac_res=\$$3 2974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2975$as_echo "$ac_res" >&6; } 2976 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2977 2978} # ac_fn_c_check_type 2979 2980# ac_fn_c_check_func LINENO FUNC VAR 2981# ---------------------------------- 2982# Tests whether FUNC exists, setting the cache variable VAR accordingly 2983ac_fn_c_check_func () 2984{ 2985 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2987$as_echo_n "checking for $2... " >&6; } 2988if eval \${$3+:} false; then : 2989 $as_echo_n "(cached) " >&6 2990else 2991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2992/* end confdefs.h. */ 2993/* Define $2 to an innocuous variant, in case <limits.h> declares $2. 2994 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 2995#define $2 innocuous_$2 2996 2997/* System header to define __stub macros and hopefully few prototypes, 2998 which can conflict with char $2 (); below. 2999 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 3000 <limits.h> exists even on freestanding compilers. */ 3001 3002#ifdef __STDC__ 3003# include <limits.h> 3004#else 3005# include <assert.h> 3006#endif 3007 3008#undef $2 3009 3010/* Override any GCC internal prototype to avoid an error. 3011 Use char because int might match the return type of a GCC 3012 builtin and then its argument prototype would still apply. */ 3013#ifdef __cplusplus 3014extern "C" 3015#endif 3016char $2 (); 3017/* The GNU C library defines this for functions which it implements 3018 to always fail with ENOSYS. Some functions are actually named 3019 something starting with __ and the normal name is an alias. */ 3020#if defined __stub_$2 || defined __stub___$2 3021choke me 3022#endif 3023 3024int 3025main () 3026{ 3027return $2 (); 3028 ; 3029 return 0; 3030} 3031_ACEOF 3032if ac_fn_c_try_link "$LINENO"; then : 3033 eval "$3=yes" 3034else 3035 eval "$3=no" 3036fi 3037rm -f core conftest.err conftest.$ac_objext \ 3038 conftest$ac_exeext conftest.$ac_ext 3039fi 3040eval ac_res=\$$3 3041 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 3042$as_echo "$ac_res" >&6; } 3043 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 3044 3045} # ac_fn_c_check_func 3046 3047# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES 3048# --------------------------------------------- 3049# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR 3050# accordingly. 3051ac_fn_c_check_decl () 3052{ 3053 ac_save_ac_compile="$ac_compile" 3054 if test -n "$ac_compile_for_check_decl"; then 3055 ac_compile="$ac_compile_for_check_decl" 3056 fi 3057 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 3058 as_decl_name=`echo $2|sed 's/ *(.*//'` 3059 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` 3060 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 3061$as_echo_n "checking whether $as_decl_name is declared... " >&6; } 3062if eval \${$3+:} false; then : 3063 $as_echo_n "(cached) " >&6 3064else 3065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3066/* end confdefs.h. */ 3067$4 3068int 3069main () 3070{ 3071#ifndef $as_decl_name 3072#ifdef __cplusplus 3073 (void) $as_decl_use; 3074#else 3075 (void) $as_decl_name; 3076#endif 3077#endif 3078 3079 ; 3080 return 0; 3081} 3082_ACEOF 3083if ac_fn_c_try_compile "$LINENO"; then : 3084 eval "$3=yes" 3085else 3086 eval "$3=no" 3087fi 3088rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3089fi 3090eval ac_res=\$$3 3091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 3092$as_echo "$ac_res" >&6; } 3093 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 3094 ac_compile="$ac_save_ac_compile" 3095 3096} # ac_fn_c_check_decl 3097 3098# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES 3099# -------------------------------------------- 3100# Tries to find the compile-time value of EXPR in a program that includes 3101# INCLUDES, setting VAR accordingly. Returns whether the value could be 3102# computed 3103ac_fn_c_compute_int () 3104{ 3105 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 3106 if test "$cross_compiling" = yes; then 3107 # Depending upon the size, compute the lo and hi bounds. 3108cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3109/* end confdefs.h. */ 3110$4 3111int 3112main () 3113{ 3114static int test_array [1 - 2 * !(($2) >= 0)]; 3115test_array [0] = 0; 3116return test_array [0]; 3117 3118 ; 3119 return 0; 3120} 3121_ACEOF 3122if ac_fn_c_try_compile "$LINENO"; then : 3123 ac_lo=0 ac_mid=0 3124 while :; do 3125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3126/* end confdefs.h. */ 3127$4 3128int 3129main () 3130{ 3131static int test_array [1 - 2 * !(($2) <= $ac_mid)]; 3132test_array [0] = 0; 3133return test_array [0]; 3134 3135 ; 3136 return 0; 3137} 3138_ACEOF 3139if ac_fn_c_try_compile "$LINENO"; then : 3140 ac_hi=$ac_mid; break 3141else 3142 as_fn_arith $ac_mid + 1 && ac_lo=$as_val 3143 if test $ac_lo -le $ac_mid; then 3144 ac_lo= ac_hi= 3145 break 3146 fi 3147 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val 3148fi 3149rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3150 done 3151else 3152 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3153/* end confdefs.h. */ 3154$4 3155int 3156main () 3157{ 3158static int test_array [1 - 2 * !(($2) < 0)]; 3159test_array [0] = 0; 3160return test_array [0]; 3161 3162 ; 3163 return 0; 3164} 3165_ACEOF 3166if ac_fn_c_try_compile "$LINENO"; then : 3167 ac_hi=-1 ac_mid=-1 3168 while :; do 3169 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3170/* end confdefs.h. */ 3171$4 3172int 3173main () 3174{ 3175static int test_array [1 - 2 * !(($2) >= $ac_mid)]; 3176test_array [0] = 0; 3177return test_array [0]; 3178 3179 ; 3180 return 0; 3181} 3182_ACEOF 3183if ac_fn_c_try_compile "$LINENO"; then : 3184 ac_lo=$ac_mid; break 3185else 3186 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val 3187 if test $ac_mid -le $ac_hi; then 3188 ac_lo= ac_hi= 3189 break 3190 fi 3191 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val 3192fi 3193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3194 done 3195else 3196 ac_lo= ac_hi= 3197fi 3198rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3199fi 3200rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3201# Binary search between lo and hi bounds. 3202while test "x$ac_lo" != "x$ac_hi"; do 3203 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val 3204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3205/* end confdefs.h. */ 3206$4 3207int 3208main () 3209{ 3210static int test_array [1 - 2 * !(($2) <= $ac_mid)]; 3211test_array [0] = 0; 3212return test_array [0]; 3213 3214 ; 3215 return 0; 3216} 3217_ACEOF 3218if ac_fn_c_try_compile "$LINENO"; then : 3219 ac_hi=$ac_mid 3220else 3221 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val 3222fi 3223rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3224done 3225case $ac_lo in #(( 3226?*) eval "$3=\$ac_lo"; ac_retval=0 ;; 3227'') ac_retval=1 ;; 3228esac 3229 else 3230 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3231/* end confdefs.h. */ 3232$4 3233static long int longval () { return $2; } 3234static unsigned long int ulongval () { return $2; } 3235#include <stdio.h> 3236#include <stdlib.h> 3237int 3238main () 3239{ 3240 3241 FILE *f = fopen ("conftest.val", "w"); 3242 if (! f) 3243 return 1; 3244 if (($2) < 0) 3245 { 3246 long int i = longval (); 3247 if (i != ($2)) 3248 return 1; 3249 fprintf (f, "%ld", i); 3250 } 3251 else 3252 { 3253 unsigned long int i = ulongval (); 3254 if (i != ($2)) 3255 return 1; 3256 fprintf (f, "%lu", i); 3257 } 3258 /* Do not output a trailing newline, as this causes \r\n confusion 3259 on some platforms. */ 3260 return ferror (f) || fclose (f) != 0; 3261 3262 ; 3263 return 0; 3264} 3265_ACEOF 3266if ac_fn_c_try_run "$LINENO"; then : 3267 echo >>conftest.val; read $3 <conftest.val; ac_retval=0 3268else 3269 ac_retval=1 3270fi 3271rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 3272 conftest.$ac_objext conftest.beam conftest.$ac_ext 3273rm -f conftest.val 3274 3275 fi 3276 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 3277 as_fn_set_status $ac_retval 3278 3279} # ac_fn_c_compute_int 3280 3281# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES 3282# ---------------------------------------------------- 3283# Tries to find if the field MEMBER exists in type AGGR, after including 3284# INCLUDES, setting cache variable VAR accordingly. 3285ac_fn_c_check_member () 3286{ 3287 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 3288 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 3289$as_echo_n "checking for $2.$3... " >&6; } 3290if eval \${$4+:} false; then : 3291 $as_echo_n "(cached) " >&6 3292else 3293 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3294/* end confdefs.h. */ 3295$5 3296int 3297main () 3298{ 3299static $2 ac_aggr; 3300if (ac_aggr.$3) 3301return 0; 3302 ; 3303 return 0; 3304} 3305_ACEOF 3306if ac_fn_c_try_compile "$LINENO"; then : 3307 eval "$4=yes" 3308else 3309 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3310/* end confdefs.h. */ 3311$5 3312int 3313main () 3314{ 3315static $2 ac_aggr; 3316if (sizeof ac_aggr.$3) 3317return 0; 3318 ; 3319 return 0; 3320} 3321_ACEOF 3322if ac_fn_c_try_compile "$LINENO"; then : 3323 eval "$4=yes" 3324else 3325 eval "$4=no" 3326fi 3327rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3328fi 3329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3330fi 3331eval ac_res=\$$4 3332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 3333$as_echo "$ac_res" >&6; } 3334 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 3335 3336} # ac_fn_c_check_member 3337cat >config.log <<_ACEOF 3338This file contains any messages produced by compilers while 3339running configure, to aid debugging if configure makes a mistake. 3340 3341It was created by libgnu $as_me UNUSED-VERSION, which was 3342generated by GNU Autoconf 2.69. Invocation command line was 3343 3344 $ $0 $@ 3345 3346_ACEOF 3347exec 5>>config.log 3348{ 3349cat <<_ASUNAME 3350## --------- ## 3351## Platform. ## 3352## --------- ## 3353 3354hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 3355uname -m = `(uname -m) 2>/dev/null || echo unknown` 3356uname -r = `(uname -r) 2>/dev/null || echo unknown` 3357uname -s = `(uname -s) 2>/dev/null || echo unknown` 3358uname -v = `(uname -v) 2>/dev/null || echo unknown` 3359 3360/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` 3361/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` 3362 3363/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 3364/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 3365/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 3366/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` 3367/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 3368/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 3369/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 3370 3371_ASUNAME 3372 3373as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3374for as_dir in $PATH 3375do 3376 IFS=$as_save_IFS 3377 test -z "$as_dir" && as_dir=. 3378 $as_echo "PATH: $as_dir" 3379 done 3380IFS=$as_save_IFS 3381 3382} >&5 3383 3384cat >&5 <<_ACEOF 3385 3386 3387## ----------- ## 3388## Core tests. ## 3389## ----------- ## 3390 3391_ACEOF 3392 3393 3394# Keep a trace of the command line. 3395# Strip out --no-create and --no-recursion so they do not pile up. 3396# Strip out --silent because we don't want to record it for future runs. 3397# Also quote any args containing shell meta-characters. 3398# Make two passes to allow for proper duplicate-argument suppression. 3399ac_configure_args= 3400ac_configure_args0= 3401ac_configure_args1= 3402ac_must_keep_next=false 3403for ac_pass in 1 2 3404do 3405 for ac_arg 3406 do 3407 case $ac_arg in 3408 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; 3409 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 3410 | -silent | --silent | --silen | --sile | --sil) 3411 continue ;; 3412 *\'*) 3413 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 3414 esac 3415 case $ac_pass in 3416 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 3417 2) 3418 as_fn_append ac_configure_args1 " '$ac_arg'" 3419 if test $ac_must_keep_next = true; then 3420 ac_must_keep_next=false # Got value, back to normal. 3421 else 3422 case $ac_arg in 3423 *=* | --config-cache | -C | -disable-* | --disable-* \ 3424 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ 3425 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ 3426 | -with-* | --with-* | -without-* | --without-* | --x) 3427 case "$ac_configure_args0 " in 3428 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; 3429 esac 3430 ;; 3431 -* ) ac_must_keep_next=true ;; 3432 esac 3433 fi 3434 as_fn_append ac_configure_args " '$ac_arg'" 3435 ;; 3436 esac 3437 done 3438done 3439{ ac_configure_args0=; unset ac_configure_args0;} 3440{ ac_configure_args1=; unset ac_configure_args1;} 3441 3442# When interrupted or exit'd, cleanup temporary files, and complete 3443# config.log. We remove comments because anyway the quotes in there 3444# would cause problems or look ugly. 3445# WARNING: Use '\'' to represent an apostrophe within the trap. 3446# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. 3447trap 'exit_status=$? 3448 # Save into config.log some information that might help in debugging. 3449 { 3450 echo 3451 3452 $as_echo "## ---------------- ## 3453## Cache variables. ## 3454## ---------------- ##" 3455 echo 3456 # The following way of writing the cache mishandles newlines in values, 3457( 3458 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do 3459 eval ac_val=\$$ac_var 3460 case $ac_val in #( 3461 *${as_nl}*) 3462 case $ac_var in #( 3463 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 3464$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 3465 esac 3466 case $ac_var in #( 3467 _ | IFS | as_nl) ;; #( 3468 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 3469 *) { eval $ac_var=; unset $ac_var;} ;; 3470 esac ;; 3471 esac 3472 done 3473 (set) 2>&1 | 3474 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( 3475 *${as_nl}ac_space=\ *) 3476 sed -n \ 3477 "s/'\''/'\''\\\\'\'''\''/g; 3478 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" 3479 ;; #( 3480 *) 3481 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 3482 ;; 3483 esac | 3484 sort 3485) 3486 echo 3487 3488 $as_echo "## ----------------- ## 3489## Output variables. ## 3490## ----------------- ##" 3491 echo 3492 for ac_var in $ac_subst_vars 3493 do 3494 eval ac_val=\$$ac_var 3495 case $ac_val in 3496 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 3497 esac 3498 $as_echo "$ac_var='\''$ac_val'\''" 3499 done | sort 3500 echo 3501 3502 if test -n "$ac_subst_files"; then 3503 $as_echo "## ------------------- ## 3504## File substitutions. ## 3505## ------------------- ##" 3506 echo 3507 for ac_var in $ac_subst_files 3508 do 3509 eval ac_val=\$$ac_var 3510 case $ac_val in 3511 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 3512 esac 3513 $as_echo "$ac_var='\''$ac_val'\''" 3514 done | sort 3515 echo 3516 fi 3517 3518 if test -s confdefs.h; then 3519 $as_echo "## ----------- ## 3520## confdefs.h. ## 3521## ----------- ##" 3522 echo 3523 cat confdefs.h 3524 echo 3525 fi 3526 test "$ac_signal" != 0 && 3527 $as_echo "$as_me: caught signal $ac_signal" 3528 $as_echo "$as_me: exit $exit_status" 3529 } >&5 3530 rm -f core *.core core.conftest.* && 3531 rm -f -r conftest* confdefs* conf$$* $ac_clean_files && 3532 exit $exit_status 3533' 0 3534for ac_signal in 1 2 13 15; do 3535 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal 3536done 3537ac_signal=0 3538 3539# confdefs.h avoids OS command line length limits that DEFS can exceed. 3540rm -f -r conftest* confdefs.h 3541 3542$as_echo "/* confdefs.h */" > confdefs.h 3543 3544# Predefined preprocessor variables. 3545 3546cat >>confdefs.h <<_ACEOF 3547#define PACKAGE_NAME "$PACKAGE_NAME" 3548_ACEOF 3549 3550cat >>confdefs.h <<_ACEOF 3551#define PACKAGE_TARNAME "$PACKAGE_TARNAME" 3552_ACEOF 3553 3554cat >>confdefs.h <<_ACEOF 3555#define PACKAGE_VERSION "$PACKAGE_VERSION" 3556_ACEOF 3557 3558cat >>confdefs.h <<_ACEOF 3559#define PACKAGE_STRING "$PACKAGE_STRING" 3560_ACEOF 3561 3562cat >>confdefs.h <<_ACEOF 3563#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" 3564_ACEOF 3565 3566cat >>confdefs.h <<_ACEOF 3567#define PACKAGE_URL "$PACKAGE_URL" 3568_ACEOF 3569 3570 3571# Let the site file select an alternate cache file if it wants to. 3572# Prefer an explicitly selected file to automatically selected ones. 3573ac_site_file1=NONE 3574ac_site_file2=NONE 3575if test -n "$CONFIG_SITE"; then 3576 # We do not want a PATH search for config.site. 3577 case $CONFIG_SITE in #(( 3578 -*) ac_site_file1=./$CONFIG_SITE;; 3579 */*) ac_site_file1=$CONFIG_SITE;; 3580 *) ac_site_file1=./$CONFIG_SITE;; 3581 esac 3582elif test "x$prefix" != xNONE; then 3583 ac_site_file1=$prefix/share/config.site 3584 ac_site_file2=$prefix/etc/config.site 3585else 3586 ac_site_file1=$ac_default_prefix/share/config.site 3587 ac_site_file2=$ac_default_prefix/etc/config.site 3588fi 3589for ac_site_file in "$ac_site_file1" "$ac_site_file2" 3590do 3591 test "x$ac_site_file" = xNONE && continue 3592 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then 3593 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 3594$as_echo "$as_me: loading site script $ac_site_file" >&6;} 3595 sed 's/^/| /' "$ac_site_file" >&5 3596 . "$ac_site_file" \ 3597 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3598$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 3599as_fn_error $? "failed to load site script $ac_site_file 3600See \`config.log' for more details" "$LINENO" 5; } 3601 fi 3602done 3603 3604if test -r "$cache_file"; then 3605 # Some versions of bash will fail to source /dev/null (special files 3606 # actually), so we avoid doing that. DJGPP emulates it as a regular file. 3607 if test /dev/null != "$cache_file" && test -f "$cache_file"; then 3608 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 3609$as_echo "$as_me: loading cache $cache_file" >&6;} 3610 case $cache_file in 3611 [\\/]* | ?:[\\/]* ) . "$cache_file";; 3612 *) . "./$cache_file";; 3613 esac 3614 fi 3615else 3616 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 3617$as_echo "$as_me: creating cache $cache_file" >&6;} 3618 >$cache_file 3619fi 3620 3621as_fn_append ac_header_list " arpa/inet.h" 3622as_fn_append ac_header_list " features.h" 3623as_fn_append ac_header_list " sys/socket.h" 3624as_fn_append ac_func_list " btowc" 3625as_fn_append ac_func_list " canonicalize_file_name" 3626as_fn_append ac_func_list " getcwd" 3627as_fn_append ac_func_list " readlink" 3628as_fn_append ac_func_list " realpath" 3629as_fn_append ac_header_list " sys/param.h" 3630as_fn_append ac_header_list " unistd.h" 3631as_fn_append ac_func_list " _set_invalid_parameter_handler" 3632as_fn_append ac_func_list " fchdir" 3633as_fn_append ac_header_list " dirent.h" 3634as_fn_append ac_func_list " fcntl" 3635as_fn_append ac_func_list " symlink" 3636as_fn_append ac_func_list " fdopendir" 3637as_fn_append ac_func_list " mempcpy" 3638as_fn_append ac_header_list " fnmatch.h" 3639as_fn_append ac_func_list " fnmatch" 3640as_fn_append ac_func_list " mbsrtowcs" 3641gl_fnmatch_required=GNU 3642as_fn_append ac_header_list " sys/stat.h" 3643as_fn_append ac_func_list " fstatat" 3644as_fn_append ac_func_list " getdtablesize" 3645as_fn_append ac_func_list " getlogin_r" 3646as_fn_append ac_func_list " getprogname" 3647as_fn_append ac_func_list " getexecname" 3648as_fn_append ac_func_list " getrandom" 3649as_fn_append ac_header_list " sys/time.h" 3650as_fn_append ac_func_list " gettimeofday" 3651as_fn_append ac_header_list " glob.h" 3652as_fn_append ac_func_list " glob" 3653as_fn_append ac_func_list " glob_pattern_p" 3654as_fn_append ac_func_list " getpwnam_r" 3655as_fn_append ac_header_list " threads.h" 3656as_fn_append ac_header_list " netdb.h" 3657as_fn_append ac_header_list " netinet/in.h" 3658as_fn_append ac_header_list " limits.h" 3659as_fn_append ac_header_list " wchar.h" 3660as_fn_append ac_header_list " stdint.h" 3661as_fn_append ac_header_list " inttypes.h" 3662as_fn_append ac_func_list " isblank" 3663as_fn_append ac_header_list " xlocale.h" 3664as_fn_append ac_func_list " lstat" 3665as_fn_append ac_header_list " math.h" 3666as_fn_append ac_func_list " mbsinit" 3667as_fn_append ac_func_list " mbrtowc" 3668as_fn_append ac_header_list " sys/mman.h" 3669as_fn_append ac_func_list " mprotect" 3670as_fn_append ac_func_list " mkostemp" 3671as_fn_append ac_func_list " openat" 3672as_fn_append ac_func_list " link" 3673as_fn_append ac_func_list " setenv" 3674as_fn_append ac_func_list " strdup" 3675as_fn_append ac_func_list " strerror_r" 3676as_fn_append ac_func_list " __xpg_strerror_r" 3677as_fn_append ac_func_list " catgets" 3678as_fn_append ac_func_list " snprintf" 3679as_fn_append ac_header_list " sys/random.h" 3680as_fn_append ac_header_list " sys/uio.h" 3681as_fn_append ac_func_list " localtime_r" 3682as_fn_append ac_func_list " pipe" 3683as_fn_append ac_header_list " crtdefs.h" 3684as_fn_append ac_func_list " iswcntrl" 3685as_fn_append ac_header_list " wctype.h" 3686as_fn_append ac_func_list " wmempcpy" 3687# Check that the precious variables saved in the cache have kept the same 3688# value. 3689ac_cache_corrupted=false 3690for ac_var in $ac_precious_vars; do 3691 eval ac_old_set=\$ac_cv_env_${ac_var}_set 3692 eval ac_new_set=\$ac_env_${ac_var}_set 3693 eval ac_old_val=\$ac_cv_env_${ac_var}_value 3694 eval ac_new_val=\$ac_env_${ac_var}_value 3695 case $ac_old_set,$ac_new_set in 3696 set,) 3697 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 3698$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} 3699 ac_cache_corrupted=: ;; 3700 ,set) 3701 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 3702$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 3703 ac_cache_corrupted=: ;; 3704 ,);; 3705 *) 3706 if test "x$ac_old_val" != "x$ac_new_val"; then 3707 # differences in whitespace do not lead to failure. 3708 ac_old_val_w=`echo x $ac_old_val` 3709 ac_new_val_w=`echo x $ac_new_val` 3710 if test "$ac_old_val_w" != "$ac_new_val_w"; then 3711 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 3712$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} 3713 ac_cache_corrupted=: 3714 else 3715 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 3716$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} 3717 eval $ac_var=\$ac_old_val 3718 fi 3719 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 3720$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} 3721 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 3722$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} 3723 fi;; 3724 esac 3725 # Pass precious variables to config.status. 3726 if test "$ac_new_set" = set; then 3727 case $ac_new_val in 3728 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; 3729 *) ac_arg=$ac_var=$ac_new_val ;; 3730 esac 3731 case " $ac_configure_args " in 3732 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. 3733 *) as_fn_append ac_configure_args " '$ac_arg'" ;; 3734 esac 3735 fi 3736done 3737if $ac_cache_corrupted; then 3738 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3739$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 3740 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 3741$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} 3742 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 3743fi 3744## -------------------- ## 3745## Main body of script. ## 3746## -------------------- ## 3747 3748ac_ext=c 3749ac_cpp='$CPP $CPPFLAGS' 3750ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3751ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 3752ac_compiler_gnu=$ac_cv_c_compiler_gnu 3753 3754 3755 3756 3757 3758 3759ac_config_headers="$ac_config_headers config.h:config.in" 3760 3761 3762 3763 3764{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 3765$as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } 3766 # Check whether --enable-maintainer-mode was given. 3767if test "${enable_maintainer_mode+set}" = set; then : 3768 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval 3769else 3770 USE_MAINTAINER_MODE=no 3771fi 3772 3773 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 3774$as_echo "$USE_MAINTAINER_MODE" >&6; } 3775 if test $USE_MAINTAINER_MODE = yes; then 3776 MAINTAINER_MODE_TRUE= 3777 MAINTAINER_MODE_FALSE='#' 3778else 3779 MAINTAINER_MODE_TRUE='#' 3780 MAINTAINER_MODE_FALSE= 3781fi 3782 3783 MAINT=$MAINTAINER_MODE_TRUE 3784 3785 3786 3787ac_ext=c 3788ac_cpp='$CPP $CPPFLAGS' 3789ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3790ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 3791ac_compiler_gnu=$ac_cv_c_compiler_gnu 3792if test -n "$ac_tool_prefix"; then 3793 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. 3794set dummy ${ac_tool_prefix}gcc; ac_word=$2 3795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3796$as_echo_n "checking for $ac_word... " >&6; } 3797if ${ac_cv_prog_CC+:} false; then : 3798 $as_echo_n "(cached) " >&6 3799else 3800 if test -n "$CC"; then 3801 ac_cv_prog_CC="$CC" # Let the user override the test. 3802else 3803as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3804for as_dir in $PATH 3805do 3806 IFS=$as_save_IFS 3807 test -z "$as_dir" && as_dir=. 3808 for ac_exec_ext in '' $ac_executable_extensions; do 3809 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 3810 ac_cv_prog_CC="${ac_tool_prefix}gcc" 3811 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3812 break 2 3813 fi 3814done 3815 done 3816IFS=$as_save_IFS 3817 3818fi 3819fi 3820CC=$ac_cv_prog_CC 3821if test -n "$CC"; then 3822 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3823$as_echo "$CC" >&6; } 3824else 3825 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3826$as_echo "no" >&6; } 3827fi 3828 3829 3830fi 3831if test -z "$ac_cv_prog_CC"; then 3832 ac_ct_CC=$CC 3833 # Extract the first word of "gcc", so it can be a program name with args. 3834set dummy gcc; ac_word=$2 3835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3836$as_echo_n "checking for $ac_word... " >&6; } 3837if ${ac_cv_prog_ac_ct_CC+:} false; then : 3838 $as_echo_n "(cached) " >&6 3839else 3840 if test -n "$ac_ct_CC"; then 3841 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 3842else 3843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3844for as_dir in $PATH 3845do 3846 IFS=$as_save_IFS 3847 test -z "$as_dir" && as_dir=. 3848 for ac_exec_ext in '' $ac_executable_extensions; do 3849 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 3850 ac_cv_prog_ac_ct_CC="gcc" 3851 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3852 break 2 3853 fi 3854done 3855 done 3856IFS=$as_save_IFS 3857 3858fi 3859fi 3860ac_ct_CC=$ac_cv_prog_ac_ct_CC 3861if test -n "$ac_ct_CC"; then 3862 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 3863$as_echo "$ac_ct_CC" >&6; } 3864else 3865 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3866$as_echo "no" >&6; } 3867fi 3868 3869 if test "x$ac_ct_CC" = x; then 3870 CC="" 3871 else 3872 case $cross_compiling:$ac_tool_warned in 3873yes:) 3874{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 3875$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 3876ac_tool_warned=yes ;; 3877esac 3878 CC=$ac_ct_CC 3879 fi 3880else 3881 CC="$ac_cv_prog_CC" 3882fi 3883 3884if test -z "$CC"; then 3885 if test -n "$ac_tool_prefix"; then 3886 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. 3887set dummy ${ac_tool_prefix}cc; ac_word=$2 3888{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3889$as_echo_n "checking for $ac_word... " >&6; } 3890if ${ac_cv_prog_CC+:} false; then : 3891 $as_echo_n "(cached) " >&6 3892else 3893 if test -n "$CC"; then 3894 ac_cv_prog_CC="$CC" # Let the user override the test. 3895else 3896as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3897for as_dir in $PATH 3898do 3899 IFS=$as_save_IFS 3900 test -z "$as_dir" && as_dir=. 3901 for ac_exec_ext in '' $ac_executable_extensions; do 3902 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 3903 ac_cv_prog_CC="${ac_tool_prefix}cc" 3904 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3905 break 2 3906 fi 3907done 3908 done 3909IFS=$as_save_IFS 3910 3911fi 3912fi 3913CC=$ac_cv_prog_CC 3914if test -n "$CC"; then 3915 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3916$as_echo "$CC" >&6; } 3917else 3918 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3919$as_echo "no" >&6; } 3920fi 3921 3922 3923 fi 3924fi 3925if test -z "$CC"; then 3926 # Extract the first word of "cc", so it can be a program name with args. 3927set dummy cc; ac_word=$2 3928{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3929$as_echo_n "checking for $ac_word... " >&6; } 3930if ${ac_cv_prog_CC+:} false; then : 3931 $as_echo_n "(cached) " >&6 3932else 3933 if test -n "$CC"; then 3934 ac_cv_prog_CC="$CC" # Let the user override the test. 3935else 3936 ac_prog_rejected=no 3937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3938for as_dir in $PATH 3939do 3940 IFS=$as_save_IFS 3941 test -z "$as_dir" && as_dir=. 3942 for ac_exec_ext in '' $ac_executable_extensions; do 3943 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 3944 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then 3945 ac_prog_rejected=yes 3946 continue 3947 fi 3948 ac_cv_prog_CC="cc" 3949 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 3950 break 2 3951 fi 3952done 3953 done 3954IFS=$as_save_IFS 3955 3956if test $ac_prog_rejected = yes; then 3957 # We found a bogon in the path, so make sure we never use it. 3958 set dummy $ac_cv_prog_CC 3959 shift 3960 if test $# != 0; then 3961 # We chose a different compiler from the bogus one. 3962 # However, it has the same basename, so the bogon will be chosen 3963 # first if we set CC to just the basename; use the full file name. 3964 shift 3965 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" 3966 fi 3967fi 3968fi 3969fi 3970CC=$ac_cv_prog_CC 3971if test -n "$CC"; then 3972 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 3973$as_echo "$CC" >&6; } 3974else 3975 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 3976$as_echo "no" >&6; } 3977fi 3978 3979 3980fi 3981if test -z "$CC"; then 3982 if test -n "$ac_tool_prefix"; then 3983 for ac_prog in cl.exe 3984 do 3985 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 3986set dummy $ac_tool_prefix$ac_prog; ac_word=$2 3987{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 3988$as_echo_n "checking for $ac_word... " >&6; } 3989if ${ac_cv_prog_CC+:} false; then : 3990 $as_echo_n "(cached) " >&6 3991else 3992 if test -n "$CC"; then 3993 ac_cv_prog_CC="$CC" # Let the user override the test. 3994else 3995as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3996for as_dir in $PATH 3997do 3998 IFS=$as_save_IFS 3999 test -z "$as_dir" && as_dir=. 4000 for ac_exec_ext in '' $ac_executable_extensions; do 4001 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4002 ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 4003 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4004 break 2 4005 fi 4006done 4007 done 4008IFS=$as_save_IFS 4009 4010fi 4011fi 4012CC=$ac_cv_prog_CC 4013if test -n "$CC"; then 4014 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 4015$as_echo "$CC" >&6; } 4016else 4017 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4018$as_echo "no" >&6; } 4019fi 4020 4021 4022 test -n "$CC" && break 4023 done 4024fi 4025if test -z "$CC"; then 4026 ac_ct_CC=$CC 4027 for ac_prog in cl.exe 4028do 4029 # Extract the first word of "$ac_prog", so it can be a program name with args. 4030set dummy $ac_prog; ac_word=$2 4031{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4032$as_echo_n "checking for $ac_word... " >&6; } 4033if ${ac_cv_prog_ac_ct_CC+:} false; then : 4034 $as_echo_n "(cached) " >&6 4035else 4036 if test -n "$ac_ct_CC"; then 4037 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 4038else 4039as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4040for as_dir in $PATH 4041do 4042 IFS=$as_save_IFS 4043 test -z "$as_dir" && as_dir=. 4044 for ac_exec_ext in '' $ac_executable_extensions; do 4045 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4046 ac_cv_prog_ac_ct_CC="$ac_prog" 4047 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4048 break 2 4049 fi 4050done 4051 done 4052IFS=$as_save_IFS 4053 4054fi 4055fi 4056ac_ct_CC=$ac_cv_prog_ac_ct_CC 4057if test -n "$ac_ct_CC"; then 4058 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 4059$as_echo "$ac_ct_CC" >&6; } 4060else 4061 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4062$as_echo "no" >&6; } 4063fi 4064 4065 4066 test -n "$ac_ct_CC" && break 4067done 4068 4069 if test "x$ac_ct_CC" = x; then 4070 CC="" 4071 else 4072 case $cross_compiling:$ac_tool_warned in 4073yes:) 4074{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 4075$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 4076ac_tool_warned=yes ;; 4077esac 4078 CC=$ac_ct_CC 4079 fi 4080fi 4081 4082fi 4083if test -z "$CC"; then 4084 if test -n "$ac_tool_prefix"; then 4085 # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. 4086set dummy ${ac_tool_prefix}clang; ac_word=$2 4087{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4088$as_echo_n "checking for $ac_word... " >&6; } 4089if ${ac_cv_prog_CC+:} false; then : 4090 $as_echo_n "(cached) " >&6 4091else 4092 if test -n "$CC"; then 4093 ac_cv_prog_CC="$CC" # Let the user override the test. 4094else 4095as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4096for as_dir in $PATH 4097do 4098 IFS=$as_save_IFS 4099 test -z "$as_dir" && as_dir=. 4100 for ac_exec_ext in '' $ac_executable_extensions; do 4101 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4102 ac_cv_prog_CC="${ac_tool_prefix}clang" 4103 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4104 break 2 4105 fi 4106done 4107 done 4108IFS=$as_save_IFS 4109 4110fi 4111fi 4112CC=$ac_cv_prog_CC 4113if test -n "$CC"; then 4114 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 4115$as_echo "$CC" >&6; } 4116else 4117 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4118$as_echo "no" >&6; } 4119fi 4120 4121 4122fi 4123if test -z "$ac_cv_prog_CC"; then 4124 ac_ct_CC=$CC 4125 # Extract the first word of "clang", so it can be a program name with args. 4126set dummy clang; ac_word=$2 4127{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4128$as_echo_n "checking for $ac_word... " >&6; } 4129if ${ac_cv_prog_ac_ct_CC+:} false; then : 4130 $as_echo_n "(cached) " >&6 4131else 4132 if test -n "$ac_ct_CC"; then 4133 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 4134else 4135as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4136for as_dir in $PATH 4137do 4138 IFS=$as_save_IFS 4139 test -z "$as_dir" && as_dir=. 4140 for ac_exec_ext in '' $ac_executable_extensions; do 4141 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4142 ac_cv_prog_ac_ct_CC="clang" 4143 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4144 break 2 4145 fi 4146done 4147 done 4148IFS=$as_save_IFS 4149 4150fi 4151fi 4152ac_ct_CC=$ac_cv_prog_ac_ct_CC 4153if test -n "$ac_ct_CC"; then 4154 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 4155$as_echo "$ac_ct_CC" >&6; } 4156else 4157 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4158$as_echo "no" >&6; } 4159fi 4160 4161 if test "x$ac_ct_CC" = x; then 4162 CC="" 4163 else 4164 case $cross_compiling:$ac_tool_warned in 4165yes:) 4166{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 4167$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 4168ac_tool_warned=yes ;; 4169esac 4170 CC=$ac_ct_CC 4171 fi 4172else 4173 CC="$ac_cv_prog_CC" 4174fi 4175 4176fi 4177 4178 4179test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4180$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4181as_fn_error $? "no acceptable C compiler found in \$PATH 4182See \`config.log' for more details" "$LINENO" 5; } 4183 4184# Provide some information about the compiler. 4185$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 4186set X $ac_compile 4187ac_compiler=$2 4188for ac_option in --version -v -V -qversion -version; do 4189 { { ac_try="$ac_compiler $ac_option >&5" 4190case "(($ac_try" in 4191 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4192 *) ac_try_echo=$ac_try;; 4193esac 4194eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 4195$as_echo "$ac_try_echo"; } >&5 4196 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 4197 ac_status=$? 4198 if test -s conftest.err; then 4199 sed '10a\ 4200... rest of stderr output deleted ... 4201 10q' conftest.err >conftest.er1 4202 cat conftest.er1 >&5 4203 fi 4204 rm -f conftest.er1 conftest.err 4205 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 4206 test $ac_status = 0; } 4207done 4208 4209cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4210/* end confdefs.h. */ 4211 4212int 4213main () 4214{ 4215 4216 ; 4217 return 0; 4218} 4219_ACEOF 4220ac_clean_files_save=$ac_clean_files 4221ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" 4222# Try to create an executable without -o first, disregard a.out. 4223# It will help us diagnose broken compilers, and finding out an intuition 4224# of exeext. 4225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 4226$as_echo_n "checking whether the C compiler works... " >&6; } 4227ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 4228 4229# The possible output files: 4230ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" 4231 4232ac_rmfiles= 4233for ac_file in $ac_files 4234do 4235 case $ac_file in 4236 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 4237 * ) ac_rmfiles="$ac_rmfiles $ac_file";; 4238 esac 4239done 4240rm -f $ac_rmfiles 4241 4242if { { ac_try="$ac_link_default" 4243case "(($ac_try" in 4244 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4245 *) ac_try_echo=$ac_try;; 4246esac 4247eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 4248$as_echo "$ac_try_echo"; } >&5 4249 (eval "$ac_link_default") 2>&5 4250 ac_status=$? 4251 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 4252 test $ac_status = 0; }; then : 4253 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. 4254# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' 4255# in a Makefile. We should not override ac_cv_exeext if it was cached, 4256# so that the user can short-circuit this test for compilers unknown to 4257# Autoconf. 4258for ac_file in $ac_files '' 4259do 4260 test -f "$ac_file" || continue 4261 case $ac_file in 4262 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) 4263 ;; 4264 [ab].out ) 4265 # We found the default executable, but exeext='' is most 4266 # certainly right. 4267 break;; 4268 *.* ) 4269 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; 4270 then :; else 4271 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 4272 fi 4273 # We set ac_cv_exeext here because the later test for it is not 4274 # safe: cross compilers may not add the suffix if given an `-o' 4275 # argument, so we may need to know it at that point already. 4276 # Even if this section looks crufty: it has the advantage of 4277 # actually working. 4278 break;; 4279 * ) 4280 break;; 4281 esac 4282done 4283test "$ac_cv_exeext" = no && ac_cv_exeext= 4284 4285else 4286 ac_file='' 4287fi 4288if test -z "$ac_file"; then : 4289 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4290$as_echo "no" >&6; } 4291$as_echo "$as_me: failed program was:" >&5 4292sed 's/^/| /' conftest.$ac_ext >&5 4293 4294{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4295$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4296as_fn_error 77 "C compiler cannot create executables 4297See \`config.log' for more details" "$LINENO" 5; } 4298else 4299 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4300$as_echo "yes" >&6; } 4301fi 4302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 4303$as_echo_n "checking for C compiler default output file name... " >&6; } 4304{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 4305$as_echo "$ac_file" >&6; } 4306ac_exeext=$ac_cv_exeext 4307 4308rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out 4309ac_clean_files=$ac_clean_files_save 4310{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 4311$as_echo_n "checking for suffix of executables... " >&6; } 4312if { { ac_try="$ac_link" 4313case "(($ac_try" in 4314 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4315 *) ac_try_echo=$ac_try;; 4316esac 4317eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 4318$as_echo "$ac_try_echo"; } >&5 4319 (eval "$ac_link") 2>&5 4320 ac_status=$? 4321 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 4322 test $ac_status = 0; }; then : 4323 # If both `conftest.exe' and `conftest' are `present' (well, observable) 4324# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will 4325# work properly (i.e., refer to `conftest.exe'), while it won't with 4326# `rm'. 4327for ac_file in conftest.exe conftest conftest.*; do 4328 test -f "$ac_file" || continue 4329 case $ac_file in 4330 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 4331 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 4332 break;; 4333 * ) break;; 4334 esac 4335done 4336else 4337 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4338$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4339as_fn_error $? "cannot compute suffix of executables: cannot compile and link 4340See \`config.log' for more details" "$LINENO" 5; } 4341fi 4342rm -f conftest conftest$ac_cv_exeext 4343{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 4344$as_echo "$ac_cv_exeext" >&6; } 4345 4346rm -f conftest.$ac_ext 4347EXEEXT=$ac_cv_exeext 4348ac_exeext=$EXEEXT 4349cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4350/* end confdefs.h. */ 4351#include <stdio.h> 4352int 4353main () 4354{ 4355FILE *f = fopen ("conftest.out", "w"); 4356 return ferror (f) || fclose (f) != 0; 4357 4358 ; 4359 return 0; 4360} 4361_ACEOF 4362ac_clean_files="$ac_clean_files conftest.out" 4363# Check that the compiler produces executables we can run. If not, either 4364# the compiler is broken, or we cross compile. 4365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 4366$as_echo_n "checking whether we are cross compiling... " >&6; } 4367if test "$cross_compiling" != yes; then 4368 { { ac_try="$ac_link" 4369case "(($ac_try" in 4370 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4371 *) ac_try_echo=$ac_try;; 4372esac 4373eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 4374$as_echo "$ac_try_echo"; } >&5 4375 (eval "$ac_link") 2>&5 4376 ac_status=$? 4377 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 4378 test $ac_status = 0; } 4379 if { ac_try='./conftest$ac_cv_exeext' 4380 { { case "(($ac_try" in 4381 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4382 *) ac_try_echo=$ac_try;; 4383esac 4384eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 4385$as_echo "$ac_try_echo"; } >&5 4386 (eval "$ac_try") 2>&5 4387 ac_status=$? 4388 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 4389 test $ac_status = 0; }; }; then 4390 cross_compiling=no 4391 else 4392 if test "$cross_compiling" = maybe; then 4393 cross_compiling=yes 4394 else 4395 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4396$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4397as_fn_error $? "cannot run C compiled programs. 4398If you meant to cross compile, use \`--host'. 4399See \`config.log' for more details" "$LINENO" 5; } 4400 fi 4401 fi 4402fi 4403{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 4404$as_echo "$cross_compiling" >&6; } 4405 4406rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out 4407ac_clean_files=$ac_clean_files_save 4408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 4409$as_echo_n "checking for suffix of object files... " >&6; } 4410if ${ac_cv_objext+:} false; then : 4411 $as_echo_n "(cached) " >&6 4412else 4413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4414/* end confdefs.h. */ 4415 4416int 4417main () 4418{ 4419 4420 ; 4421 return 0; 4422} 4423_ACEOF 4424rm -f conftest.o conftest.obj 4425if { { ac_try="$ac_compile" 4426case "(($ac_try" in 4427 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4428 *) ac_try_echo=$ac_try;; 4429esac 4430eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 4431$as_echo "$ac_try_echo"; } >&5 4432 (eval "$ac_compile") 2>&5 4433 ac_status=$? 4434 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 4435 test $ac_status = 0; }; then : 4436 for ac_file in conftest.o conftest.obj conftest.*; do 4437 test -f "$ac_file" || continue; 4438 case $ac_file in 4439 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; 4440 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` 4441 break;; 4442 esac 4443done 4444else 4445 $as_echo "$as_me: failed program was:" >&5 4446sed 's/^/| /' conftest.$ac_ext >&5 4447 4448{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4449$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4450as_fn_error $? "cannot compute suffix of object files: cannot compile 4451See \`config.log' for more details" "$LINENO" 5; } 4452fi 4453rm -f conftest.$ac_cv_objext conftest.$ac_ext 4454fi 4455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 4456$as_echo "$ac_cv_objext" >&6; } 4457OBJEXT=$ac_cv_objext 4458ac_objext=$OBJEXT 4459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 4460$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } 4461if ${ac_cv_c_compiler_gnu+:} false; then : 4462 $as_echo_n "(cached) " >&6 4463else 4464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4465/* end confdefs.h. */ 4466 4467int 4468main () 4469{ 4470#ifndef __GNUC__ 4471 choke me 4472#endif 4473 4474 ; 4475 return 0; 4476} 4477_ACEOF 4478if ac_fn_c_try_compile "$LINENO"; then : 4479 ac_compiler_gnu=yes 4480else 4481 ac_compiler_gnu=no 4482fi 4483rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 4484ac_cv_c_compiler_gnu=$ac_compiler_gnu 4485 4486fi 4487{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 4488$as_echo "$ac_cv_c_compiler_gnu" >&6; } 4489if test $ac_compiler_gnu = yes; then 4490 GCC=yes 4491else 4492 GCC= 4493fi 4494ac_test_CFLAGS=${CFLAGS+set} 4495ac_save_CFLAGS=$CFLAGS 4496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 4497$as_echo_n "checking whether $CC accepts -g... " >&6; } 4498if ${ac_cv_prog_cc_g+:} false; then : 4499 $as_echo_n "(cached) " >&6 4500else 4501 ac_save_c_werror_flag=$ac_c_werror_flag 4502 ac_c_werror_flag=yes 4503 ac_cv_prog_cc_g=no 4504 CFLAGS="-g" 4505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4506/* end confdefs.h. */ 4507 4508int 4509main () 4510{ 4511 4512 ; 4513 return 0; 4514} 4515_ACEOF 4516if ac_fn_c_try_compile "$LINENO"; then : 4517 ac_cv_prog_cc_g=yes 4518else 4519 CFLAGS="" 4520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4521/* end confdefs.h. */ 4522 4523int 4524main () 4525{ 4526 4527 ; 4528 return 0; 4529} 4530_ACEOF 4531if ac_fn_c_try_compile "$LINENO"; then : 4532 4533else 4534 ac_c_werror_flag=$ac_save_c_werror_flag 4535 CFLAGS="-g" 4536 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4537/* end confdefs.h. */ 4538 4539int 4540main () 4541{ 4542 4543 ; 4544 return 0; 4545} 4546_ACEOF 4547if ac_fn_c_try_compile "$LINENO"; then : 4548 ac_cv_prog_cc_g=yes 4549fi 4550rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 4551fi 4552rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 4553fi 4554rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 4555 ac_c_werror_flag=$ac_save_c_werror_flag 4556fi 4557{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 4558$as_echo "$ac_cv_prog_cc_g" >&6; } 4559if test "$ac_test_CFLAGS" = set; then 4560 CFLAGS=$ac_save_CFLAGS 4561elif test $ac_cv_prog_cc_g = yes; then 4562 if test "$GCC" = yes; then 4563 CFLAGS="-g -O2" 4564 else 4565 CFLAGS="-g" 4566 fi 4567else 4568 if test "$GCC" = yes; then 4569 CFLAGS="-O2" 4570 else 4571 CFLAGS= 4572 fi 4573fi 4574{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 4575$as_echo_n "checking for $CC option to enable C11 features... " >&6; } 4576if ${ac_cv_prog_cc_c11+:} false; then : 4577 $as_echo_n "(cached) " >&6 4578else 4579 ac_cv_prog_cc_c11=no 4580ac_save_CC=$CC 4581cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4582/* end confdefs.h. */ 4583#include <stdarg.h> 4584#include <stdbool.h> 4585#include <stddef.h> 4586#include <stdlib.h> 4587#include <wchar.h> 4588#include <stdio.h> 4589 4590// Check varargs macros. These examples are taken from C99 6.10.3.5. 4591#define debug(...) fprintf (stderr, __VA_ARGS__) 4592#define showlist(...) puts (#__VA_ARGS__) 4593#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) 4594static void 4595test_varargs_macros (void) 4596{ 4597 int x = 1234; 4598 int y = 5678; 4599 debug ("Flag"); 4600 debug ("X = %d\n", x); 4601 showlist (The first, second, and third items.); 4602 report (x>y, "x is %d but y is %d", x, y); 4603} 4604 4605// Check long long types. 4606#define BIG64 18446744073709551615ull 4607#define BIG32 4294967295ul 4608#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) 4609#if !BIG_OK 4610 your preprocessor is broken; 4611#endif 4612#if BIG_OK 4613#else 4614 your preprocessor is broken; 4615#endif 4616static long long int bignum = -9223372036854775807LL; 4617static unsigned long long int ubignum = BIG64; 4618 4619struct incomplete_array 4620{ 4621 int datasize; 4622 double data[]; 4623}; 4624 4625struct named_init { 4626 int number; 4627 const wchar_t *name; 4628 double average; 4629}; 4630 4631typedef const char *ccp; 4632 4633static inline int 4634test_restrict (ccp restrict text) 4635{ 4636 // See if C++-style comments work. 4637 // Iterate through items via the restricted pointer. 4638 // Also check for declarations in for loops. 4639 for (unsigned int i = 0; *(text+i) != '\0'; ++i) 4640 continue; 4641 return 0; 4642} 4643 4644// Check varargs and va_copy. 4645static bool 4646test_varargs (const char *format, ...) 4647{ 4648 va_list args; 4649 va_start (args, format); 4650 va_list args_copy; 4651 va_copy (args_copy, args); 4652 4653 const char *str = ""; 4654 int number = 0; 4655 float fnumber = 0; 4656 4657 while (*format) 4658 { 4659 switch (*format++) 4660 { 4661 case 's': // string 4662 str = va_arg (args_copy, const char *); 4663 break; 4664 case 'd': // int 4665 number = va_arg (args_copy, int); 4666 break; 4667 case 'f': // float 4668 fnumber = va_arg (args_copy, double); 4669 break; 4670 default: 4671 break; 4672 } 4673 } 4674 va_end (args_copy); 4675 va_end (args); 4676 4677 return *str && number && fnumber; 4678} 4679// Check _Alignas. 4680char _Alignas (double) aligned_as_double; 4681char _Alignas (0) no_special_alignment; 4682extern char aligned_as_int; 4683char _Alignas (0) _Alignas (int) aligned_as_int; 4684 4685// Check _Alignof. 4686enum 4687{ 4688 int_alignment = _Alignof (int), 4689 int_array_alignment = _Alignof (int[100]), 4690 char_alignment = _Alignof (char) 4691}; 4692_Static_assert (0 < -_Alignof (int), "_Alignof is signed"); 4693 4694// Check _Noreturn. 4695int _Noreturn does_not_return (void) { for (;;) continue; } 4696 4697// Check _Static_assert. 4698struct test_static_assert 4699{ 4700 int x; 4701 _Static_assert (sizeof (int) <= sizeof (long int), 4702 "_Static_assert does not work in struct"); 4703 long int y; 4704}; 4705 4706// Check UTF-8 literals. 4707#define u8 syntax error! 4708char const utf8_literal[] = u8"happens to be ASCII" "another string"; 4709 4710// Check duplicate typedefs. 4711typedef long *long_ptr; 4712typedef long int *long_ptr; 4713typedef long_ptr long_ptr; 4714 4715// Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. 4716struct anonymous 4717{ 4718 union { 4719 struct { int i; int j; }; 4720 struct { int k; long int l; } w; 4721 }; 4722 int m; 4723} v1; 4724 4725int 4726main () 4727{ 4728 4729 // Check bool. 4730 _Bool success = false; 4731 4732 // Check restrict. 4733 if (test_restrict ("String literal") == 0) 4734 success = true; 4735 char *restrict newvar = "Another string"; 4736 4737 // Check varargs. 4738 success &= test_varargs ("s, d' f .", "string", 65, 34.234); 4739 test_varargs_macros (); 4740 4741 // Check flexible array members. 4742 struct incomplete_array *ia = 4743 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); 4744 ia->datasize = 10; 4745 for (int i = 0; i < ia->datasize; ++i) 4746 ia->data[i] = i * 1.234; 4747 4748 // Check named initializers. 4749 struct named_init ni = { 4750 .number = 34, 4751 .name = L"Test wide string", 4752 .average = 543.34343, 4753 }; 4754 4755 ni.number = 58; 4756 4757 int dynamic_array[ni.number]; 4758 dynamic_array[ni.number - 1] = 543; 4759 4760 // work around unused variable warnings 4761 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' 4762 || dynamic_array[ni.number - 1] != 543); 4763 4764 v1.i = 2; 4765 v1.w.k = 5; 4766 _Static_assert ((offsetof (struct anonymous, i) 4767 == offsetof (struct anonymous, w.k)), 4768 "Anonymous union alignment botch"); 4769 4770 ; 4771 return 0; 4772} 4773_ACEOF 4774for ac_arg in '' -std=gnu11 4775do 4776 CC="$ac_save_CC $ac_arg" 4777 if ac_fn_c_try_compile "$LINENO"; then : 4778 ac_cv_prog_cc_c11=$ac_arg 4779fi 4780rm -f core conftest.err conftest.$ac_objext 4781 test "x$ac_cv_prog_cc_c11" != "xno" && break 4782done 4783rm -f conftest.$ac_ext 4784CC=$ac_save_CC 4785 4786fi 4787# AC_CACHE_VAL 4788ac_prog_cc_stdc_options= 4789case "x$ac_cv_prog_cc_c11" in 4790 x) 4791 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 4792$as_echo "none needed" >&6; } ;; 4793 xno) 4794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 4795$as_echo "unsupported" >&6; } ;; 4796 *) 4797 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c11" 4798 CC=$CC$ac_prog_cc_stdc_options 4799 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 4800$as_echo "$ac_cv_prog_cc_c11" >&6; } ;; 4801esac 4802if test "x$ac_cv_prog_cc_c11" != xno; then : 4803 ac_prog_cc_stdc=c11 4804 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 4805else 4806 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 4807$as_echo_n "checking for $CC option to enable C99 features... " >&6; } 4808if ${ac_cv_prog_cc_c99+:} false; then : 4809 $as_echo_n "(cached) " >&6 4810else 4811 ac_cv_prog_cc_c99=no 4812ac_save_CC=$CC 4813cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4814/* end confdefs.h. */ 4815#include <stdarg.h> 4816#include <stdbool.h> 4817#include <stddef.h> 4818#include <stdlib.h> 4819#include <wchar.h> 4820#include <stdio.h> 4821 4822// Check varargs macros. These examples are taken from C99 6.10.3.5. 4823#define debug(...) fprintf (stderr, __VA_ARGS__) 4824#define showlist(...) puts (#__VA_ARGS__) 4825#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) 4826static void 4827test_varargs_macros (void) 4828{ 4829 int x = 1234; 4830 int y = 5678; 4831 debug ("Flag"); 4832 debug ("X = %d\n", x); 4833 showlist (The first, second, and third items.); 4834 report (x>y, "x is %d but y is %d", x, y); 4835} 4836 4837// Check long long types. 4838#define BIG64 18446744073709551615ull 4839#define BIG32 4294967295ul 4840#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) 4841#if !BIG_OK 4842 your preprocessor is broken; 4843#endif 4844#if BIG_OK 4845#else 4846 your preprocessor is broken; 4847#endif 4848static long long int bignum = -9223372036854775807LL; 4849static unsigned long long int ubignum = BIG64; 4850 4851struct incomplete_array 4852{ 4853 int datasize; 4854 double data[]; 4855}; 4856 4857struct named_init { 4858 int number; 4859 const wchar_t *name; 4860 double average; 4861}; 4862 4863typedef const char *ccp; 4864 4865static inline int 4866test_restrict (ccp restrict text) 4867{ 4868 // See if C++-style comments work. 4869 // Iterate through items via the restricted pointer. 4870 // Also check for declarations in for loops. 4871 for (unsigned int i = 0; *(text+i) != '\0'; ++i) 4872 continue; 4873 return 0; 4874} 4875 4876// Check varargs and va_copy. 4877static bool 4878test_varargs (const char *format, ...) 4879{ 4880 va_list args; 4881 va_start (args, format); 4882 va_list args_copy; 4883 va_copy (args_copy, args); 4884 4885 const char *str = ""; 4886 int number = 0; 4887 float fnumber = 0; 4888 4889 while (*format) 4890 { 4891 switch (*format++) 4892 { 4893 case 's': // string 4894 str = va_arg (args_copy, const char *); 4895 break; 4896 case 'd': // int 4897 number = va_arg (args_copy, int); 4898 break; 4899 case 'f': // float 4900 fnumber = va_arg (args_copy, double); 4901 break; 4902 default: 4903 break; 4904 } 4905 } 4906 va_end (args_copy); 4907 va_end (args); 4908 4909 return *str && number && fnumber; 4910} 4911int 4912main () 4913{ 4914 4915 // Check bool. 4916 _Bool success = false; 4917 4918 // Check restrict. 4919 if (test_restrict ("String literal") == 0) 4920 success = true; 4921 char *restrict newvar = "Another string"; 4922 4923 // Check varargs. 4924 success &= test_varargs ("s, d' f .", "string", 65, 34.234); 4925 test_varargs_macros (); 4926 4927 // Check flexible array members. 4928 struct incomplete_array *ia = 4929 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); 4930 ia->datasize = 10; 4931 for (int i = 0; i < ia->datasize; ++i) 4932 ia->data[i] = i * 1.234; 4933 4934 // Check named initializers. 4935 struct named_init ni = { 4936 .number = 34, 4937 .name = L"Test wide string", 4938 .average = 543.34343, 4939 }; 4940 4941 ni.number = 58; 4942 4943 int dynamic_array[ni.number]; 4944 dynamic_array[ni.number - 1] = 543; 4945 4946 // work around unused variable warnings 4947 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' 4948 || dynamic_array[ni.number - 1] != 543); 4949 4950 ; 4951 return 0; 4952} 4953_ACEOF 4954for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc1x -qlanglvl=extc99 4955do 4956 CC="$ac_save_CC $ac_arg" 4957 if ac_fn_c_try_compile "$LINENO"; then : 4958 ac_cv_prog_cc_c99=$ac_arg 4959fi 4960rm -f core conftest.err conftest.$ac_objext 4961 test "x$ac_cv_prog_cc_c99" != "xno" && break 4962done 4963rm -f conftest.$ac_ext 4964CC=$ac_save_CC 4965 4966fi 4967# AC_CACHE_VAL 4968ac_prog_cc_stdc_options= 4969case "x$ac_cv_prog_cc_c99" in 4970 x) 4971 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 4972$as_echo "none needed" >&6; } ;; 4973 xno) 4974 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 4975$as_echo "unsupported" >&6; } ;; 4976 *) 4977 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c99" 4978 CC=$CC$ac_prog_cc_stdc_options 4979 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 4980$as_echo "$ac_cv_prog_cc_c99" >&6; } ;; 4981esac 4982if test "x$ac_cv_prog_cc_c99" != xno; then : 4983 ac_prog_cc_stdc=c99 4984 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 4985else 4986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 4987$as_echo_n "checking for $CC option to enable C89 features... " >&6; } 4988if ${ac_cv_prog_cc_c89+:} false; then : 4989 $as_echo_n "(cached) " >&6 4990else 4991 ac_cv_prog_cc_c89=no 4992ac_save_CC=$CC 4993cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4994/* end confdefs.h. */ 4995#include <stdarg.h> 4996#include <stdio.h> 4997struct stat; 4998/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ 4999struct buf { int x; }; 5000FILE * (*rcsopen) (struct buf *, struct stat *, int); 5001static char *e (p, i) 5002 char **p; 5003 int i; 5004{ 5005 return p[i]; 5006} 5007static char *f (char * (*g) (char **, int), char **p, ...) 5008{ 5009 char *s; 5010 va_list v; 5011 va_start (v,p); 5012 s = g (p, va_arg (v,int)); 5013 va_end (v); 5014 return s; 5015} 5016 5017/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has 5018 function prototypes and stuff, but not '\xHH' hex character constants. 5019 These don't provoke an error unfortunately, instead are silently treated 5020 as 'x'. The following induces an error, until -std is added to get 5021 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an 5022 array size at least. It's necessary to write '\x00'==0 to get something 5023 that's true only with -std. */ 5024int osf4_cc_array ['\x00' == 0 ? 1 : -1]; 5025 5026/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters 5027 inside strings and character constants. */ 5028#define FOO(x) 'x' 5029int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; 5030 5031int test (int i, double x); 5032struct s1 {int (*f) (int a);}; 5033struct s2 {int (*f) (double a);}; 5034int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); 5035int argc; 5036char **argv; 5037int 5038main () 5039{ 5040return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; 5041 ; 5042 return 0; 5043} 5044_ACEOF 5045for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ 5046 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 5047do 5048 CC="$ac_save_CC $ac_arg" 5049 if ac_fn_c_try_compile "$LINENO"; then : 5050 ac_cv_prog_cc_c89=$ac_arg 5051fi 5052rm -f core conftest.err conftest.$ac_objext 5053 test "x$ac_cv_prog_cc_c89" != "xno" && break 5054done 5055rm -f conftest.$ac_ext 5056CC=$ac_save_CC 5057 5058fi 5059# AC_CACHE_VAL 5060ac_prog_cc_stdc_options= 5061case "x$ac_cv_prog_cc_c89" in 5062 x) 5063 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 5064$as_echo "none needed" >&6; } ;; 5065 xno) 5066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 5067$as_echo "unsupported" >&6; } ;; 5068 *) 5069 ac_prog_cc_stdc_options=" $ac_cv_prog_cc_c89" 5070 CC=$CC$ac_prog_cc_stdc_options 5071 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 5072$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; 5073esac 5074if test "x$ac_cv_prog_cc_c89" != xno; then : 5075 ac_prog_cc_stdc=c89 5076 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 5077else 5078 ac_prog_cc_stdc=no 5079 ac_cv_prog_cc_stdc=no 5080fi 5081 5082fi 5083 5084fi 5085 5086ac_ext=c 5087ac_cpp='$CPP $CPPFLAGS' 5088ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 5089ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 5090ac_compiler_gnu=$ac_cv_c_compiler_gnu 5091 5092 5093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler is clang" >&5 5094$as_echo_n "checking whether the compiler is clang... " >&6; } 5095if ${gl_cv_compiler_clang+:} false; then : 5096 $as_echo_n "(cached) " >&6 5097else 5098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5099/* end confdefs.h. */ 5100 5101 #ifdef __clang__ 5102 barfbarf 5103 #endif 5104 5105int 5106main () 5107{ 5108 5109 ; 5110 return 0; 5111} 5112 5113_ACEOF 5114if ac_fn_c_try_compile "$LINENO"; then : 5115 gl_cv_compiler_clang=no 5116else 5117 gl_cv_compiler_clang=yes 5118fi 5119rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5120 5121fi 5122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_clang" >&5 5123$as_echo "$gl_cv_compiler_clang" >&6; } 5124 5125 5126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compiler option needed when checking for declarations" >&5 5127$as_echo_n "checking for compiler option needed when checking for declarations... " >&6; } 5128if ${gl_cv_compiler_check_decl_option+:} false; then : 5129 $as_echo_n "(cached) " >&6 5130else 5131 if test $gl_cv_compiler_clang = yes; then 5132 save_ac_compile="$ac_compile" 5133 ac_compile="$ac_compile -Werror=implicit-function-declaration" 5134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5135/* end confdefs.h. */ 5136 5137int 5138main () 5139{ 5140 5141 ; 5142 return 0; 5143} 5144_ACEOF 5145if ac_fn_c_try_compile "$LINENO"; then : 5146 gl_cv_compiler_check_decl_option='-Werror=implicit-function-declaration' 5147else 5148 gl_cv_compiler_check_decl_option=none 5149fi 5150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5151 ac_compile="$save_ac_compile" 5152 else 5153 gl_cv_compiler_check_decl_option=none 5154 fi 5155 5156fi 5157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_compiler_check_decl_option" >&5 5158$as_echo "$gl_cv_compiler_check_decl_option" >&6; } 5159 if test "x$gl_cv_compiler_check_decl_option" != xnone; then 5160 ac_compile_for_check_decl="$ac_compile $gl_cv_compiler_check_decl_option" 5161 else 5162 ac_compile_for_check_decl="$ac_compile" 5163 fi 5164 5165 5166 5167ac_ext=c 5168ac_cpp='$CPP $CPPFLAGS' 5169ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 5170ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 5171ac_compiler_gnu=$ac_cv_c_compiler_gnu 5172{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 5173$as_echo_n "checking how to run the C preprocessor... " >&6; } 5174# On Suns, sometimes $CPP names a directory. 5175if test -n "$CPP" && test -d "$CPP"; then 5176 CPP= 5177fi 5178if test -z "$CPP"; then 5179 if ${ac_cv_prog_CPP+:} false; then : 5180 $as_echo_n "(cached) " >&6 5181else 5182 # Double quotes because CPP needs to be expanded 5183 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" 5184 do 5185 ac_preproc_ok=false 5186for ac_c_preproc_warn_flag in '' yes 5187do 5188 # Use a header file that comes with gcc, so configuring glibc 5189 # with a fresh cross-compiler works. 5190 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 5191 # <limits.h> exists even on freestanding compilers. 5192 # On the NeXT, cc -E runs the code through the compiler's parser, 5193 # not just through cpp. "Syntax error" is here to catch this case. 5194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5195/* end confdefs.h. */ 5196#ifdef __STDC__ 5197# include <limits.h> 5198#else 5199# include <assert.h> 5200#endif 5201 Syntax error 5202_ACEOF 5203if ac_fn_c_try_cpp "$LINENO"; then : 5204 5205else 5206 # Broken: fails on valid input. 5207continue 5208fi 5209rm -f conftest.err conftest.i conftest.$ac_ext 5210 5211 # OK, works on sane cases. Now check whether nonexistent headers 5212 # can be detected and how. 5213 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5214/* end confdefs.h. */ 5215#include <ac_nonexistent.h> 5216_ACEOF 5217if ac_fn_c_try_cpp "$LINENO"; then : 5218 # Broken: success on invalid input. 5219continue 5220else 5221 # Passes both tests. 5222ac_preproc_ok=: 5223break 5224fi 5225rm -f conftest.err conftest.i conftest.$ac_ext 5226 5227done 5228# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 5229rm -f conftest.i conftest.err conftest.$ac_ext 5230if $ac_preproc_ok; then : 5231 break 5232fi 5233 5234 done 5235 ac_cv_prog_CPP=$CPP 5236 5237fi 5238 CPP=$ac_cv_prog_CPP 5239else 5240 ac_cv_prog_CPP=$CPP 5241fi 5242{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 5243$as_echo "$CPP" >&6; } 5244ac_preproc_ok=false 5245for ac_c_preproc_warn_flag in '' yes 5246do 5247 # Use a header file that comes with gcc, so configuring glibc 5248 # with a fresh cross-compiler works. 5249 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 5250 # <limits.h> exists even on freestanding compilers. 5251 # On the NeXT, cc -E runs the code through the compiler's parser, 5252 # not just through cpp. "Syntax error" is here to catch this case. 5253 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5254/* end confdefs.h. */ 5255#ifdef __STDC__ 5256# include <limits.h> 5257#else 5258# include <assert.h> 5259#endif 5260 Syntax error 5261_ACEOF 5262if ac_fn_c_try_cpp "$LINENO"; then : 5263 5264else 5265 # Broken: fails on valid input. 5266continue 5267fi 5268rm -f conftest.err conftest.i conftest.$ac_ext 5269 5270 # OK, works on sane cases. Now check whether nonexistent headers 5271 # can be detected and how. 5272 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5273/* end confdefs.h. */ 5274#include <ac_nonexistent.h> 5275_ACEOF 5276if ac_fn_c_try_cpp "$LINENO"; then : 5277 # Broken: success on invalid input. 5278continue 5279else 5280 # Passes both tests. 5281ac_preproc_ok=: 5282break 5283fi 5284rm -f conftest.err conftest.i conftest.$ac_ext 5285 5286done 5287# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 5288rm -f conftest.i conftest.err conftest.$ac_ext 5289if $ac_preproc_ok; then : 5290 5291else 5292 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 5293$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 5294as_fn_error $? "C preprocessor \"$CPP\" fails sanity check 5295See \`config.log' for more details" "$LINENO" 5; } 5296fi 5297 5298ac_ext=c 5299ac_cpp='$CPP $CPPFLAGS' 5300ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 5301ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 5302ac_compiler_gnu=$ac_cv_c_compiler_gnu 5303 5304 5305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 5306$as_echo_n "checking for grep that handles long lines and -e... " >&6; } 5307if ${ac_cv_path_GREP+:} false; then : 5308 $as_echo_n "(cached) " >&6 5309else 5310 if test -z "$GREP"; then 5311 ac_path_GREP_found=false 5312 # Loop through the user's path and test for each of PROGNAME-LIST 5313 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5314for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 5315do 5316 IFS=$as_save_IFS 5317 test -z "$as_dir" && as_dir=. 5318 for ac_prog in grep ggrep; do 5319 for ac_exec_ext in '' $ac_executable_extensions; do 5320 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" 5321 as_fn_executable_p "$ac_path_GREP" || continue 5322# Check for GNU ac_path_GREP and select it if it is found. 5323 # Check for GNU $ac_path_GREP 5324case `"$ac_path_GREP" --version 2>&1` in 5325*GNU*) 5326 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; 5327*) 5328 ac_count=0 5329 $as_echo_n 0123456789 >"conftest.in" 5330 while : 5331 do 5332 cat "conftest.in" "conftest.in" >"conftest.tmp" 5333 mv "conftest.tmp" "conftest.in" 5334 cp "conftest.in" "conftest.nl" 5335 $as_echo 'GREP' >> "conftest.nl" 5336 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break 5337 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 5338 as_fn_arith $ac_count + 1 && ac_count=$as_val 5339 if test $ac_count -gt ${ac_path_GREP_max-0}; then 5340 # Best one so far, save it but keep looking for a better one 5341 ac_cv_path_GREP="$ac_path_GREP" 5342 ac_path_GREP_max=$ac_count 5343 fi 5344 # 10*(2^10) chars as input seems more than enough 5345 test $ac_count -gt 10 && break 5346 done 5347 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 5348esac 5349 5350 $ac_path_GREP_found && break 3 5351 done 5352 done 5353 done 5354IFS=$as_save_IFS 5355 if test -z "$ac_cv_path_GREP"; then 5356 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 5357 fi 5358else 5359 ac_cv_path_GREP=$GREP 5360fi 5361 5362fi 5363{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 5364$as_echo "$ac_cv_path_GREP" >&6; } 5365 GREP="$ac_cv_path_GREP" 5366 5367 5368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 5369$as_echo_n "checking for egrep... " >&6; } 5370if ${ac_cv_path_EGREP+:} false; then : 5371 $as_echo_n "(cached) " >&6 5372else 5373 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 5374 then ac_cv_path_EGREP="$GREP -E" 5375 else 5376 if test -z "$EGREP"; then 5377 ac_path_EGREP_found=false 5378 # Loop through the user's path and test for each of PROGNAME-LIST 5379 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5380for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 5381do 5382 IFS=$as_save_IFS 5383 test -z "$as_dir" && as_dir=. 5384 for ac_prog in egrep; do 5385 for ac_exec_ext in '' $ac_executable_extensions; do 5386 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" 5387 as_fn_executable_p "$ac_path_EGREP" || continue 5388# Check for GNU ac_path_EGREP and select it if it is found. 5389 # Check for GNU $ac_path_EGREP 5390case `"$ac_path_EGREP" --version 2>&1` in 5391*GNU*) 5392 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; 5393*) 5394 ac_count=0 5395 $as_echo_n 0123456789 >"conftest.in" 5396 while : 5397 do 5398 cat "conftest.in" "conftest.in" >"conftest.tmp" 5399 mv "conftest.tmp" "conftest.in" 5400 cp "conftest.in" "conftest.nl" 5401 $as_echo 'EGREP' >> "conftest.nl" 5402 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break 5403 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 5404 as_fn_arith $ac_count + 1 && ac_count=$as_val 5405 if test $ac_count -gt ${ac_path_EGREP_max-0}; then 5406 # Best one so far, save it but keep looking for a better one 5407 ac_cv_path_EGREP="$ac_path_EGREP" 5408 ac_path_EGREP_max=$ac_count 5409 fi 5410 # 10*(2^10) chars as input seems more than enough 5411 test $ac_count -gt 10 && break 5412 done 5413 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 5414esac 5415 5416 $ac_path_EGREP_found && break 3 5417 done 5418 done 5419 done 5420IFS=$as_save_IFS 5421 if test -z "$ac_cv_path_EGREP"; then 5422 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 5423 fi 5424else 5425 ac_cv_path_EGREP=$EGREP 5426fi 5427 5428 fi 5429fi 5430{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 5431$as_echo "$ac_cv_path_EGREP" >&6; } 5432 EGREP="$ac_cv_path_EGREP" 5433 5434 5435{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 5436$as_echo_n "checking for ANSI C header files... " >&6; } 5437if ${ac_cv_header_stdc+:} false; then : 5438 $as_echo_n "(cached) " >&6 5439else 5440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5441/* end confdefs.h. */ 5442#include <stdlib.h> 5443#include <stdarg.h> 5444#include <string.h> 5445#include <float.h> 5446 5447int 5448main () 5449{ 5450 5451 ; 5452 return 0; 5453} 5454_ACEOF 5455if ac_fn_c_try_compile "$LINENO"; then : 5456 ac_cv_header_stdc=yes 5457else 5458 ac_cv_header_stdc=no 5459fi 5460rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5461 5462if test $ac_cv_header_stdc = yes; then 5463 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 5464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5465/* end confdefs.h. */ 5466#include <string.h> 5467 5468_ACEOF 5469if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 5470 $EGREP "memchr" >/dev/null 2>&1; then : 5471 5472else 5473 ac_cv_header_stdc=no 5474fi 5475rm -f conftest* 5476 5477fi 5478 5479if test $ac_cv_header_stdc = yes; then 5480 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 5481 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5482/* end confdefs.h. */ 5483#include <stdlib.h> 5484 5485_ACEOF 5486if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 5487 $EGREP "free" >/dev/null 2>&1; then : 5488 5489else 5490 ac_cv_header_stdc=no 5491fi 5492rm -f conftest* 5493 5494fi 5495 5496if test $ac_cv_header_stdc = yes; then 5497 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 5498 if test "$cross_compiling" = yes; then : 5499 : 5500else 5501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5502/* end confdefs.h. */ 5503#include <ctype.h> 5504#include <stdlib.h> 5505#if ((' ' & 0x0FF) == 0x020) 5506# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 5507# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 5508#else 5509# define ISLOWER(c) \ 5510 (('a' <= (c) && (c) <= 'i') \ 5511 || ('j' <= (c) && (c) <= 'r') \ 5512 || ('s' <= (c) && (c) <= 'z')) 5513# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) 5514#endif 5515 5516#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 5517int 5518main () 5519{ 5520 int i; 5521 for (i = 0; i < 256; i++) 5522 if (XOR (islower (i), ISLOWER (i)) 5523 || toupper (i) != TOUPPER (i)) 5524 return 2; 5525 return 0; 5526} 5527_ACEOF 5528if ac_fn_c_try_run "$LINENO"; then : 5529 5530else 5531 ac_cv_header_stdc=no 5532fi 5533rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 5534 conftest.$ac_objext conftest.beam conftest.$ac_ext 5535fi 5536 5537fi 5538fi 5539{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 5540$as_echo "$ac_cv_header_stdc" >&6; } 5541if test $ac_cv_header_stdc = yes; then 5542 5543$as_echo "#define STDC_HEADERS 1" >>confdefs.h 5544 5545fi 5546 5547# On IRIX 5.3, sys/types and inttypes.h are conflicting. 5548for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ 5549 inttypes.h stdint.h unistd.h 5550do : 5551 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 5552ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default 5553" 5554if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 5555 cat >>confdefs.h <<_ACEOF 5556#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 5557_ACEOF 5558 5559fi 5560 5561done 5562 5563 5564 5565 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" 5566if test "x$ac_cv_header_minix_config_h" = xyes; then : 5567 MINIX=yes 5568else 5569 MINIX= 5570fi 5571 5572 5573 if test "$MINIX" = yes; then 5574 5575$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h 5576 5577 5578$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h 5579 5580 5581$as_echo "#define _MINIX 1" >>confdefs.h 5582 5583 5584$as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h 5585 5586 fi 5587 5588 5589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 5590$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } 5591if ${ac_cv_safe_to_define___extensions__+:} false; then : 5592 $as_echo_n "(cached) " >&6 5593else 5594 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5595/* end confdefs.h. */ 5596 5597# define __EXTENSIONS__ 1 5598 $ac_includes_default 5599int 5600main () 5601{ 5602 5603 ; 5604 return 0; 5605} 5606_ACEOF 5607if ac_fn_c_try_compile "$LINENO"; then : 5608 ac_cv_safe_to_define___extensions__=yes 5609else 5610 ac_cv_safe_to_define___extensions__=no 5611fi 5612rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5613fi 5614{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 5615$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } 5616 test $ac_cv_safe_to_define___extensions__ = yes && 5617 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h 5618 5619 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h 5620 5621 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h 5622 5623 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h 5624 5625 $as_echo "#define _NETBSD_SOURCE 1" >>confdefs.h 5626 5627 $as_echo "#define _OPENBSD_SOURCE 1" >>confdefs.h 5628 5629 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h 5630 5631 $as_echo "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h 5632 5633 $as_echo "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h 5634 5635 $as_echo "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h 5636 5637 $as_echo "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h 5638 5639 $as_echo "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h 5640 5641 $as_echo "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h 5642 5643 $as_echo "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h 5644 5645 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h 5646 5647 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 5648$as_echo_n "checking whether _XOPEN_SOURCE should be defined... " >&6; } 5649if ${ac_cv_should_define__xopen_source+:} false; then : 5650 $as_echo_n "(cached) " >&6 5651else 5652 ac_cv_should_define__xopen_source=no 5653 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5654/* end confdefs.h. */ 5655 5656 #include <wchar.h> 5657 mbstate_t x; 5658int 5659main () 5660{ 5661 5662 ; 5663 return 0; 5664} 5665_ACEOF 5666if ac_fn_c_try_compile "$LINENO"; then : 5667 5668else 5669 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5670/* end confdefs.h. */ 5671 5672 #define _XOPEN_SOURCE 500 5673 #include <wchar.h> 5674 mbstate_t x; 5675int 5676main () 5677{ 5678 5679 ; 5680 return 0; 5681} 5682_ACEOF 5683if ac_fn_c_try_compile "$LINENO"; then : 5684 ac_cv_should_define__xopen_source=yes 5685fi 5686rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5687fi 5688rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5689fi 5690{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 5691$as_echo "$ac_cv_should_define__xopen_source" >&6; } 5692 test $ac_cv_should_define__xopen_source = yes && 5693 $as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h 5694 5695 $as_echo "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h 5696 5697 5698# Needs to run before gl_EARLY so it can override AC_SYS_LARGEFILE included 5699# there. 5700ac_aux_dir= 5701for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do 5702 if test -f "$ac_dir/install-sh"; then 5703 ac_aux_dir=$ac_dir 5704 ac_install_sh="$ac_aux_dir/install-sh -c" 5705 break 5706 elif test -f "$ac_dir/install.sh"; then 5707 ac_aux_dir=$ac_dir 5708 ac_install_sh="$ac_aux_dir/install.sh -c" 5709 break 5710 elif test -f "$ac_dir/shtool"; then 5711 ac_aux_dir=$ac_dir 5712 ac_install_sh="$ac_aux_dir/shtool install -c" 5713 break 5714 fi 5715done 5716if test -z "$ac_aux_dir"; then 5717 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 5718fi 5719 5720# These three variables are undocumented and unsupported, 5721# and are intended to be withdrawn in a future Autoconf release. 5722# They can cause serious problems if a builder's source tree is in a directory 5723# whose full name contains unusual characters. 5724ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. 5725ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. 5726ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. 5727 5728 5729# Make sure we can run config.sub. 5730$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || 5731 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 5732 5733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 5734$as_echo_n "checking build system type... " >&6; } 5735if ${ac_cv_build+:} false; then : 5736 $as_echo_n "(cached) " >&6 5737else 5738 ac_build_alias=$build_alias 5739test "x$ac_build_alias" = x && 5740 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` 5741test "x$ac_build_alias" = x && 5742 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 5743ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || 5744 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 5745 5746fi 5747{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 5748$as_echo "$ac_cv_build" >&6; } 5749case $ac_cv_build in 5750*-*-*) ;; 5751*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; 5752esac 5753build=$ac_cv_build 5754ac_save_IFS=$IFS; IFS='-' 5755set x $ac_cv_build 5756shift 5757build_cpu=$1 5758build_vendor=$2 5759shift; shift 5760# Remember, the first character of IFS is used to create $*, 5761# except with old shells: 5762build_os=$* 5763IFS=$ac_save_IFS 5764case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac 5765 5766 5767{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 5768$as_echo_n "checking host system type... " >&6; } 5769if ${ac_cv_host+:} false; then : 5770 $as_echo_n "(cached) " >&6 5771else 5772 if test "x$host_alias" = x; then 5773 ac_cv_host=$ac_cv_build 5774else 5775 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || 5776 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 5777fi 5778 5779fi 5780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 5781$as_echo "$ac_cv_host" >&6; } 5782case $ac_cv_host in 5783*-*-*) ;; 5784*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; 5785esac 5786host=$ac_cv_host 5787ac_save_IFS=$IFS; IFS='-' 5788set x $ac_cv_host 5789shift 5790host_cpu=$1 5791host_vendor=$2 5792shift; shift 5793# Remember, the first character of IFS is used to create $*, 5794# except with old shells: 5795host_os=$* 5796IFS=$ac_save_IFS 5797case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac 5798 5799 5800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 5801$as_echo_n "checking target system type... " >&6; } 5802if ${ac_cv_target+:} false; then : 5803 $as_echo_n "(cached) " >&6 5804else 5805 if test "x$target_alias" = x; then 5806 ac_cv_target=$ac_cv_host 5807else 5808 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || 5809 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 5810fi 5811 5812fi 5813{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 5814$as_echo "$ac_cv_target" >&6; } 5815case $ac_cv_target in 5816*-*-*) ;; 5817*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; 5818esac 5819target=$ac_cv_target 5820ac_save_IFS=$IFS; IFS='-' 5821set x $ac_cv_target 5822shift 5823target_cpu=$1 5824target_vendor=$2 5825shift; shift 5826# Remember, the first character of IFS is used to create $*, 5827# except with old shells: 5828target_os=$* 5829IFS=$ac_save_IFS 5830case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac 5831 5832 5833# The aliases save the names the user supplied, while $host etc. 5834# will get canonicalized. 5835test -n "$target_alias" && 5836 test "$program_prefix$program_suffix$program_transform_name" = \ 5837 NONENONEs,x,x, && 5838 program_prefix=${target_alias}- 5839 5840# The tests for host and target for $enable_largefile require 5841# canonical names. 5842 5843 5844 5845# As the $enable_largefile decision depends on --enable-plugins we must set it 5846# even in directories otherwise not depending on the $plugins option. 5847 5848 5849 maybe_plugins=no 5850 for ac_header in dlfcn.h 5851do : 5852 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default 5853" 5854if test "x$ac_cv_header_dlfcn_h" = xyes; then : 5855 cat >>confdefs.h <<_ACEOF 5856#define HAVE_DLFCN_H 1 5857_ACEOF 5858 maybe_plugins=yes 5859fi 5860 5861done 5862 5863 for ac_header in windows.h 5864do : 5865 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default 5866" 5867if test "x$ac_cv_header_windows_h" = xyes; then : 5868 cat >>confdefs.h <<_ACEOF 5869#define HAVE_WINDOWS_H 1 5870_ACEOF 5871 maybe_plugins=yes 5872fi 5873 5874done 5875 5876 5877 # Check whether --enable-plugins was given. 5878if test "${enable_plugins+set}" = set; then : 5879 enableval=$enable_plugins; case "${enableval}" in 5880 no) plugins=no ;; 5881 *) plugins=yes 5882 if test "$maybe_plugins" != "yes" ; then 5883 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 5884 fi ;; 5885 esac 5886else 5887 plugins=$maybe_plugins 5888 5889fi 5890 5891 if test "$plugins" = "yes"; then 5892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 5893$as_echo_n "checking for library containing dlsym... " >&6; } 5894if ${ac_cv_search_dlsym+:} false; then : 5895 $as_echo_n "(cached) " >&6 5896else 5897 ac_func_search_save_LIBS=$LIBS 5898cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5899/* end confdefs.h. */ 5900 5901/* Override any GCC internal prototype to avoid an error. 5902 Use char because int might match the return type of a GCC 5903 builtin and then its argument prototype would still apply. */ 5904#ifdef __cplusplus 5905extern "C" 5906#endif 5907char dlsym (); 5908int 5909main () 5910{ 5911return dlsym (); 5912 ; 5913 return 0; 5914} 5915_ACEOF 5916for ac_lib in '' dl; do 5917 if test -z "$ac_lib"; then 5918 ac_res="none required" 5919 else 5920 ac_res=-l$ac_lib 5921 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 5922 fi 5923 if ac_fn_c_try_link "$LINENO"; then : 5924 ac_cv_search_dlsym=$ac_res 5925fi 5926rm -f core conftest.err conftest.$ac_objext \ 5927 conftest$ac_exeext 5928 if ${ac_cv_search_dlsym+:} false; then : 5929 break 5930fi 5931done 5932if ${ac_cv_search_dlsym+:} false; then : 5933 5934else 5935 ac_cv_search_dlsym=no 5936fi 5937rm conftest.$ac_ext 5938LIBS=$ac_func_search_save_LIBS 5939fi 5940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 5941$as_echo "$ac_cv_search_dlsym" >&6; } 5942ac_res=$ac_cv_search_dlsym 5943if test "$ac_res" != no; then : 5944 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 5945 5946fi 5947 5948 fi 5949 5950 5951case "${host}" in 5952 sparc-*-solaris*|i?86-*-solaris*) 5953 # On native 32-bit Solaris/SPARC and x86, large-file and procfs support 5954 # were mutually exclusive until Solaris 11.3. Without procfs support, 5955 # the bfd/ elf module cannot provide certain routines such as 5956 # elfcore_write_prpsinfo or elfcore_write_prstatus. So unless the user 5957 # explicitly requested large-file support through the 5958 # --enable-largefile switch, disable large-file support in favor of 5959 # procfs support. 5960 # 5961 # Check if <sys/procfs.h> is incompatible with large-file support. 5962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5963/* end confdefs.h. */ 5964#define _FILE_OFFSET_BITS 64 5965#define _STRUCTURED_PROC 1 5966#include <sys/procfs.h> 5967int 5968main () 5969{ 5970 5971 ; 5972 return 0; 5973} 5974_ACEOF 5975if ac_fn_c_try_compile "$LINENO"; then : 5976 acx_cv_procfs_lfs=yes 5977else 5978 acx_cv_procfs_lfs=no 5979fi 5980rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5981 # 5982 # Forcefully disable large-file support only if necessary, gdb is in 5983 # tree and enabled. 5984 if test "${target}" = "${host}" -a "$acx_cv_procfs_lfs" = no \ 5985 -a -d $srcdir/../gdb -a "$enable_gdb" != no; then 5986 : ${enable_largefile="no"} 5987 if test "$plugins" = yes; then 5988 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 5989plugin support disabled; require large-file support which is incompatible with GDB." >&5 5990$as_echo "$as_me: WARNING: 5991plugin support disabled; require large-file support which is incompatible with GDB." >&2;} 5992 plugins=no 5993 fi 5994 fi 5995 # 5996 # Explicitly undef _FILE_OFFSET_BITS if enable_largefile=no for the 5997 # benefit of g++ 9+ which predefines it on Solaris. 5998 if test "$enable_largefile" = no; then 5999 LARGEFILE_CPPFLAGS="-U_FILE_OFFSET_BITS" 6000 6001 fi 6002 ;; 6003esac 6004 6005# Check whether --enable-largefile was given. 6006if test "${enable_largefile+set}" = set; then : 6007 enableval=$enable_largefile; 6008fi 6009 6010if test "$enable_largefile" != no; then 6011 6012 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 6013$as_echo_n "checking for special C compiler options needed for large files... " >&6; } 6014if ${ac_cv_sys_largefile_CC+:} false; then : 6015 $as_echo_n "(cached) " >&6 6016else 6017 ac_cv_sys_largefile_CC=no 6018 if test "$GCC" != yes; then 6019 ac_save_CC=$CC 6020 while :; do 6021 # IRIX 6.2 and later do not support large files by default, 6022 # so use the C compiler's -n32 option if that helps. 6023 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6024/* end confdefs.h. */ 6025#include <sys/types.h> 6026 /* Check that off_t can represent 2**63 - 1 correctly. 6027 We can't simply define LARGE_OFF_T to be 9223372036854775807, 6028 since some C++ compilers masquerading as C compilers 6029 incorrectly reject 9223372036854775807. */ 6030#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) 6031 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 6032 && LARGE_OFF_T % 2147483647 == 1) 6033 ? 1 : -1]; 6034int 6035main () 6036{ 6037 6038 ; 6039 return 0; 6040} 6041_ACEOF 6042 if ac_fn_c_try_compile "$LINENO"; then : 6043 break 6044fi 6045rm -f core conftest.err conftest.$ac_objext 6046 CC="$CC -n32" 6047 if ac_fn_c_try_compile "$LINENO"; then : 6048 ac_cv_sys_largefile_CC=' -n32'; break 6049fi 6050rm -f core conftest.err conftest.$ac_objext 6051 break 6052 done 6053 CC=$ac_save_CC 6054 rm -f conftest.$ac_ext 6055 fi 6056fi 6057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 6058$as_echo "$ac_cv_sys_largefile_CC" >&6; } 6059 if test "$ac_cv_sys_largefile_CC" != no; then 6060 CC=$CC$ac_cv_sys_largefile_CC 6061 fi 6062 6063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 6064$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } 6065if ${ac_cv_sys_file_offset_bits+:} false; then : 6066 $as_echo_n "(cached) " >&6 6067else 6068 while :; do 6069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6070/* end confdefs.h. */ 6071#include <sys/types.h> 6072 /* Check that off_t can represent 2**63 - 1 correctly. 6073 We can't simply define LARGE_OFF_T to be 9223372036854775807, 6074 since some C++ compilers masquerading as C compilers 6075 incorrectly reject 9223372036854775807. */ 6076#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) 6077 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 6078 && LARGE_OFF_T % 2147483647 == 1) 6079 ? 1 : -1]; 6080int 6081main () 6082{ 6083 6084 ; 6085 return 0; 6086} 6087_ACEOF 6088if ac_fn_c_try_compile "$LINENO"; then : 6089 ac_cv_sys_file_offset_bits=no; break 6090fi 6091rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6093/* end confdefs.h. */ 6094#define _FILE_OFFSET_BITS 64 6095#include <sys/types.h> 6096 /* Check that off_t can represent 2**63 - 1 correctly. 6097 We can't simply define LARGE_OFF_T to be 9223372036854775807, 6098 since some C++ compilers masquerading as C compilers 6099 incorrectly reject 9223372036854775807. */ 6100#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) 6101 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 6102 && LARGE_OFF_T % 2147483647 == 1) 6103 ? 1 : -1]; 6104int 6105main () 6106{ 6107 6108 ; 6109 return 0; 6110} 6111_ACEOF 6112if ac_fn_c_try_compile "$LINENO"; then : 6113 ac_cv_sys_file_offset_bits=64; break 6114fi 6115rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6116 ac_cv_sys_file_offset_bits=unknown 6117 break 6118done 6119fi 6120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 6121$as_echo "$ac_cv_sys_file_offset_bits" >&6; } 6122case $ac_cv_sys_file_offset_bits in #( 6123 no | unknown) ;; 6124 *) 6125cat >>confdefs.h <<_ACEOF 6126#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits 6127_ACEOF 6128;; 6129esac 6130rm -rf conftest* 6131 if test $ac_cv_sys_file_offset_bits = unknown; then 6132 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 6133$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } 6134if ${ac_cv_sys_large_files+:} false; then : 6135 $as_echo_n "(cached) " >&6 6136else 6137 while :; do 6138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6139/* end confdefs.h. */ 6140#include <sys/types.h> 6141 /* Check that off_t can represent 2**63 - 1 correctly. 6142 We can't simply define LARGE_OFF_T to be 9223372036854775807, 6143 since some C++ compilers masquerading as C compilers 6144 incorrectly reject 9223372036854775807. */ 6145#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) 6146 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 6147 && LARGE_OFF_T % 2147483647 == 1) 6148 ? 1 : -1]; 6149int 6150main () 6151{ 6152 6153 ; 6154 return 0; 6155} 6156_ACEOF 6157if ac_fn_c_try_compile "$LINENO"; then : 6158 ac_cv_sys_large_files=no; break 6159fi 6160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6161 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6162/* end confdefs.h. */ 6163#define _LARGE_FILES 1 6164#include <sys/types.h> 6165 /* Check that off_t can represent 2**63 - 1 correctly. 6166 We can't simply define LARGE_OFF_T to be 9223372036854775807, 6167 since some C++ compilers masquerading as C compilers 6168 incorrectly reject 9223372036854775807. */ 6169#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) 6170 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 6171 && LARGE_OFF_T % 2147483647 == 1) 6172 ? 1 : -1]; 6173int 6174main () 6175{ 6176 6177 ; 6178 return 0; 6179} 6180_ACEOF 6181if ac_fn_c_try_compile "$LINENO"; then : 6182 ac_cv_sys_large_files=1; break 6183fi 6184rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6185 ac_cv_sys_large_files=unknown 6186 break 6187done 6188fi 6189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 6190$as_echo "$ac_cv_sys_large_files" >&6; } 6191case $ac_cv_sys_large_files in #( 6192 no | unknown) ;; 6193 *) 6194cat >>confdefs.h <<_ACEOF 6195#define _LARGE_FILES $ac_cv_sys_large_files 6196_ACEOF 6197;; 6198esac 6199rm -rf conftest* 6200 fi 6201fi 6202 6203 6204 6205 6206 6207 6208 6209 6210 6211 6212 6213 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5 6214$as_echo_n "checking for Minix Amsterdam compiler... " >&6; } 6215if ${gl_cv_c_amsterdam_compiler+:} false; then : 6216 $as_echo_n "(cached) " >&6 6217else 6218 6219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6220/* end confdefs.h. */ 6221 6222#ifdef __ACK__ 6223Amsterdam 6224#endif 6225 6226_ACEOF 6227if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 6228 $EGREP "Amsterdam" >/dev/null 2>&1; then : 6229 gl_cv_c_amsterdam_compiler=yes 6230else 6231 gl_cv_c_amsterdam_compiler=no 6232fi 6233rm -f conftest* 6234 6235 6236fi 6237{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5 6238$as_echo "$gl_cv_c_amsterdam_compiler" >&6; } 6239 6240 if test $gl_cv_c_amsterdam_compiler = yes; then 6241 if test -z "$AR"; then 6242 AR='cc -c.a' 6243 fi 6244 if test -z "$ARFLAGS"; then 6245 ARFLAGS='-o' 6246 fi 6247 else 6248 : 6249 fi 6250 6251 if test -n "$ac_tool_prefix"; then 6252 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. 6253set dummy ${ac_tool_prefix}ar; ac_word=$2 6254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6255$as_echo_n "checking for $ac_word... " >&6; } 6256if ${ac_cv_prog_AR+:} false; then : 6257 $as_echo_n "(cached) " >&6 6258else 6259 if test -n "$AR"; then 6260 ac_cv_prog_AR="$AR" # Let the user override the test. 6261else 6262as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6263for as_dir in $PATH 6264do 6265 IFS=$as_save_IFS 6266 test -z "$as_dir" && as_dir=. 6267 for ac_exec_ext in '' $ac_executable_extensions; do 6268 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6269 ac_cv_prog_AR="${ac_tool_prefix}ar" 6270 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6271 break 2 6272 fi 6273done 6274 done 6275IFS=$as_save_IFS 6276 6277fi 6278fi 6279AR=$ac_cv_prog_AR 6280if test -n "$AR"; then 6281 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 6282$as_echo "$AR" >&6; } 6283else 6284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6285$as_echo "no" >&6; } 6286fi 6287 6288 6289fi 6290if test -z "$ac_cv_prog_AR"; then 6291 ac_ct_AR=$AR 6292 # Extract the first word of "ar", so it can be a program name with args. 6293set dummy ar; ac_word=$2 6294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6295$as_echo_n "checking for $ac_word... " >&6; } 6296if ${ac_cv_prog_ac_ct_AR+:} false; then : 6297 $as_echo_n "(cached) " >&6 6298else 6299 if test -n "$ac_ct_AR"; then 6300 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. 6301else 6302as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6303for as_dir in $PATH 6304do 6305 IFS=$as_save_IFS 6306 test -z "$as_dir" && as_dir=. 6307 for ac_exec_ext in '' $ac_executable_extensions; do 6308 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6309 ac_cv_prog_ac_ct_AR="ar" 6310 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6311 break 2 6312 fi 6313done 6314 done 6315IFS=$as_save_IFS 6316 6317fi 6318fi 6319ac_ct_AR=$ac_cv_prog_ac_ct_AR 6320if test -n "$ac_ct_AR"; then 6321 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 6322$as_echo "$ac_ct_AR" >&6; } 6323else 6324 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6325$as_echo "no" >&6; } 6326fi 6327 6328 if test "x$ac_ct_AR" = x; then 6329 AR="ar" 6330 else 6331 case $cross_compiling:$ac_tool_warned in 6332yes:) 6333{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 6334$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 6335ac_tool_warned=yes ;; 6336esac 6337 AR=$ac_ct_AR 6338 fi 6339else 6340 AR="$ac_cv_prog_AR" 6341fi 6342 6343 if test -z "$ARFLAGS"; then 6344 ARFLAGS='cr' 6345 fi 6346 6347 6348 6349 if test -z "$RANLIB"; then 6350 if test $gl_cv_c_amsterdam_compiler = yes; then 6351 RANLIB=':' 6352 else 6353 if test -n "$ac_tool_prefix"; then 6354 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. 6355set dummy ${ac_tool_prefix}ranlib; ac_word=$2 6356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6357$as_echo_n "checking for $ac_word... " >&6; } 6358if ${ac_cv_prog_RANLIB+:} false; then : 6359 $as_echo_n "(cached) " >&6 6360else 6361 if test -n "$RANLIB"; then 6362 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 6363else 6364as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6365for as_dir in $PATH 6366do 6367 IFS=$as_save_IFS 6368 test -z "$as_dir" && as_dir=. 6369 for ac_exec_ext in '' $ac_executable_extensions; do 6370 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6371 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" 6372 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6373 break 2 6374 fi 6375done 6376 done 6377IFS=$as_save_IFS 6378 6379fi 6380fi 6381RANLIB=$ac_cv_prog_RANLIB 6382if test -n "$RANLIB"; then 6383 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 6384$as_echo "$RANLIB" >&6; } 6385else 6386 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6387$as_echo "no" >&6; } 6388fi 6389 6390 6391fi 6392if test -z "$ac_cv_prog_RANLIB"; then 6393 ac_ct_RANLIB=$RANLIB 6394 # Extract the first word of "ranlib", so it can be a program name with args. 6395set dummy ranlib; ac_word=$2 6396{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6397$as_echo_n "checking for $ac_word... " >&6; } 6398if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : 6399 $as_echo_n "(cached) " >&6 6400else 6401 if test -n "$ac_ct_RANLIB"; then 6402 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. 6403else 6404as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6405for as_dir in $PATH 6406do 6407 IFS=$as_save_IFS 6408 test -z "$as_dir" && as_dir=. 6409 for ac_exec_ext in '' $ac_executable_extensions; do 6410 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6411 ac_cv_prog_ac_ct_RANLIB="ranlib" 6412 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6413 break 2 6414 fi 6415done 6416 done 6417IFS=$as_save_IFS 6418 6419fi 6420fi 6421ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB 6422if test -n "$ac_ct_RANLIB"; then 6423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 6424$as_echo "$ac_ct_RANLIB" >&6; } 6425else 6426 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6427$as_echo "no" >&6; } 6428fi 6429 6430 if test "x$ac_ct_RANLIB" = x; then 6431 RANLIB=":" 6432 else 6433 case $cross_compiling:$ac_tool_warned in 6434yes:) 6435{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 6436$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 6437ac_tool_warned=yes ;; 6438esac 6439 RANLIB=$ac_ct_RANLIB 6440 fi 6441else 6442 RANLIB="$ac_cv_prog_RANLIB" 6443fi 6444 6445 fi 6446 fi 6447 6448 6449 6450 6451 6452 6453 # IEEE behaviour is the default on all CPUs except Alpha and SH 6454 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4 6455 # and the GCC 4.1.2 manual). 6456 case "$host_cpu" in 6457 alpha*) 6458 # On Alpha systems, a compiler option provides the behaviour. 6459 # See the ieee(3) manual page, also available at 6460 # <https://backdrift.org/man/tru64/man3/ieee.3.html> 6461 if test -n "$GCC"; then 6462 # GCC has the option -mieee. 6463 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact. 6464 CPPFLAGS="$CPPFLAGS -mieee" 6465 else 6466 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact. 6467 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact. 6468 CPPFLAGS="$CPPFLAGS -ieee" 6469 fi 6470 ;; 6471 sh*) 6472 if test -n "$GCC"; then 6473 # GCC has the option -mieee. 6474 CPPFLAGS="$CPPFLAGS -mieee" 6475 fi 6476 ;; 6477 esac 6478 6479 6480 6481 6482 6483 6484 6485 # Check whether --enable-threads was given. 6486if test "${enable_threads+set}" = set; then : 6487 enableval=$enable_threads; gl_use_threads=$enableval 6488else 6489 if test -n "$gl_use_threads_default"; then 6490 gl_use_threads="$gl_use_threads_default" 6491 else 6492 case "$host_os" in 6493 osf*) gl_use_threads=no ;; 6494 cygwin*) 6495 case `uname -r` in 6496 1.[0-5].*) gl_use_threads=no ;; 6497 *) gl_use_threads=yes ;; 6498 esac 6499 ;; 6500 mingw*) 6501 case "$gl_use_winpthreads_default" in 6502 yes) gl_use_threads=posix ;; 6503 no) gl_use_threads=windows ;; 6504 *) gl_use_threads=yes ;; 6505 esac 6506 ;; 6507 *) gl_use_threads=yes ;; 6508 esac 6509 fi 6510 6511fi 6512 6513 if test "$gl_use_threads" = yes \ 6514 || test "$gl_use_threads" = isoc \ 6515 || test "$gl_use_threads" = posix \ 6516 || test "$gl_use_threads" = isoc+posix; then 6517 # For using <threads.h> or <pthread.h>: 6518 6519 6520 if test -z "$gl_anythreadlib_early_done"; then 6521 case "$host_os" in 6522 osf*) 6523 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it 6524 # groks <pthread.h>. cc also understands the flag -pthread, but 6525 # we don't use it because 1. gcc-2.95 doesn't understand -pthread, 6526 # 2. putting a flag into CPPFLAGS that has an effect on the linker 6527 # causes the AC_LINK_IFELSE test below to succeed unexpectedly, 6528 # leading to wrong values of LIBTHREAD and LTLIBTHREAD. 6529 CPPFLAGS="$CPPFLAGS -D_REENTRANT" 6530 ;; 6531 esac 6532 # Some systems optimize for single-threaded programs by default, and 6533 # need special flags to disable these optimizations. For example, the 6534 # definition of 'errno' in <errno.h>. 6535 case "$host_os" in 6536 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; 6537 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; 6538 esac 6539 gl_anythreadlib_early_done=done 6540 fi 6541 6542 fi 6543 6544 6545 6546 # Pre-early section. 6547 6548 6549 6550 6551 # Code from module absolute-header: 6552 # Code from module alloca: 6553 # Code from module alloca-opt: 6554 # Code from module arpa_inet: 6555 # Code from module assure: 6556 # Code from module at-internal: 6557 # Code from module attribute: 6558 # Code from module btowc: 6559 # Code from module builtin-expect: 6560 # Code from module c99: 6561 # Code from module canonicalize-lgpl: 6562 # Code from module chdir: 6563 # Code from module chdir-long: 6564 # Code from module cloexec: 6565 # Code from module close: 6566 # Code from module closedir: 6567 # Code from module count-one-bits: 6568 # Code from module ctype: 6569 # Code from module d-ino: 6570 # Code from module d-type: 6571 # Code from module dirent: 6572 # Code from module dirfd: 6573 # Code from module dirname-lgpl: 6574 # Code from module double-slash-root: 6575 # Code from module dup: 6576 # Code from module dup2: 6577 # Code from module environ: 6578 # Code from module errno: 6579 # Code from module error: 6580 # Code from module exitfail: 6581 # Code from module extensions: 6582 # Code from module extern-inline: 6583 # Code from module fchdir: 6584 # Code from module fcntl: 6585 # Code from module fcntl-h: 6586 # Code from module fd-hook: 6587 # Code from module fd-safer-flag: 6588 # Code from module fdopendir: 6589 # Code from module filename: 6590 # Code from module filenamecat-lgpl: 6591 # Code from module flexmember: 6592 # Code from module float: 6593 # Code from module fnmatch: 6594 # Code from module fnmatch-gnu: 6595 # Code from module fnmatch-h: 6596 # Code from module fpieee: 6597 6598 # Code from module fpucw: 6599 # Code from module frexp: 6600 # Code from module frexpl: 6601 # Code from module fstat: 6602 # Code from module fstatat: 6603 # Code from module getcwd: 6604 # Code from module getcwd-lgpl: 6605 # Code from module getdtablesize: 6606 # Code from module getlogin_r: 6607 # Code from module getprogname: 6608 # Code from module getrandom: 6609 # Code from module gettext-h: 6610 # Code from module gettimeofday: 6611 # Code from module glob: 6612 # Code from module glob-h: 6613 # Code from module hard-locale: 6614 # Code from module include_next: 6615 # Code from module inet_ntop: 6616 # Code from module intprops: 6617 # Code from module inttypes: 6618 # Code from module inttypes-incomplete: 6619 # Code from module isblank: 6620 # Code from module isnand-nolibm: 6621 # Code from module isnanl-nolibm: 6622 # Code from module largefile: 6623 6624 # Code from module libc-config: 6625 # Code from module limits-h: 6626 # Code from module localcharset: 6627 # Code from module locale: 6628 # Code from module localtime-buffer: 6629 # Code from module lock: 6630 # Code from module lstat: 6631 # Code from module malloc-posix: 6632 # Code from module malloca: 6633 # Code from module math: 6634 # Code from module mbrtowc: 6635 # Code from module mbsinit: 6636 # Code from module mbsrtowcs: 6637 # Code from module mbtowc: 6638 # Code from module memchr: 6639 # Code from module memmem: 6640 # Code from module memmem-simple: 6641 # Code from module mempcpy: 6642 # Code from module memrchr: 6643 # Code from module minmax: 6644 # Code from module mkdir: 6645 # Code from module mkdtemp: 6646 # Code from module mkostemp: 6647 # Code from module msvc-inval: 6648 # Code from module msvc-nothrow: 6649 # Code from module multiarch: 6650 # Code from module netinet_in: 6651 # Code from module nocrash: 6652 # Code from module open: 6653 # Code from module openat: 6654 # Code from module openat-die: 6655 # Code from module openat-h: 6656 # Code from module opendir: 6657 # Code from module pathmax: 6658 # Code from module rawmemchr: 6659 # Code from module readdir: 6660 # Code from module readlink: 6661 # Code from module realloc-posix: 6662 # Code from module rename: 6663 # Code from module rewinddir: 6664 # Code from module rmdir: 6665 # Code from module same-inode: 6666 # Code from module save-cwd: 6667 # Code from module scratch_buffer: 6668 # Code from module setenv: 6669 # Code from module setlocale-null: 6670 # Code from module signal-h: 6671 # Code from module snippet/_Noreturn: 6672 # Code from module snippet/arg-nonnull: 6673 # Code from module snippet/c++defs: 6674 # Code from module snippet/warn-on-use: 6675 # Code from module socklen: 6676 # Code from module ssize_t: 6677 # Code from module stat: 6678 # Code from module stat-time: 6679 # Code from module std-gnu11: 6680 # Code from module stdalign: 6681 # Code from module stdbool: 6682 # Code from module stddef: 6683 # Code from module stdint: 6684 # Code from module stdio: 6685 # Code from module stdlib: 6686 # Code from module strchrnul: 6687 # Code from module strdup-posix: 6688 # Code from module streq: 6689 # Code from module strerror: 6690 # Code from module strerror-override: 6691 # Code from module strerror_r-posix: 6692 # Code from module string: 6693 # Code from module strnlen: 6694 # Code from module strnlen1: 6695 # Code from module strstr: 6696 # Code from module strstr-simple: 6697 # Code from module strtok_r: 6698 # Code from module sys_random: 6699 # Code from module sys_socket: 6700 # Code from module sys_stat: 6701 # Code from module sys_time: 6702 # Code from module sys_types: 6703 # Code from module sys_uio: 6704 # Code from module tempname: 6705 # Code from module threadlib: 6706 6707 6708 6709 # Code from module time: 6710 # Code from module time_r: 6711 # Code from module unistd: 6712 # Code from module unistd-safer: 6713 # Code from module unsetenv: 6714 # Code from module update-copyright: 6715 # Code from module verify: 6716 # Code from module wchar: 6717 # Code from module wctype-h: 6718 # Code from module windows-mutex: 6719 # Code from module windows-once: 6720 # Code from module windows-recmutex: 6721 # Code from module windows-rwlock: 6722 # Code from module wmemchr: 6723 # Code from module wmempcpy: 6724 # Code from module xalloc-oversized: 6725 6726 6727am_cv_prog_cc_stdc=$ac_cv_prog_cc_stdc 6728 6729 6730ac_aux_dir= 6731for ac_dir in .. "$srcdir"/..; do 6732 if test -f "$ac_dir/install-sh"; then 6733 ac_aux_dir=$ac_dir 6734 ac_install_sh="$ac_aux_dir/install-sh -c" 6735 break 6736 elif test -f "$ac_dir/install.sh"; then 6737 ac_aux_dir=$ac_dir 6738 ac_install_sh="$ac_aux_dir/install.sh -c" 6739 break 6740 elif test -f "$ac_dir/shtool"; then 6741 ac_aux_dir=$ac_dir 6742 ac_install_sh="$ac_aux_dir/shtool install -c" 6743 break 6744 fi 6745done 6746if test -z "$ac_aux_dir"; then 6747 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 6748fi 6749 6750# These three variables are undocumented and unsupported, 6751# and are intended to be withdrawn in a future Autoconf release. 6752# They can cause serious problems if a builder's source tree is in a directory 6753# whose full name contains unusual characters. 6754ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. 6755ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. 6756ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. 6757 6758 6759 6760 6761 6762 6763 6764 6765 6766 6767 6768 # Check whether --enable-cross-guesses was given. 6769if test "${enable_cross_guesses+set}" = set; then : 6770 enableval=$enable_cross_guesses; if test "x$enableval" != xconservative && test "x$enableval" != xrisky; then 6771 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-cross-guesses" >&5 6772$as_echo "$as_me: WARNING: invalid argument supplied to --enable-cross-guesses" >&2;} 6773 enableval=conservative 6774 fi 6775 gl_cross_guesses="$enableval" 6776else 6777 gl_cross_guesses=conservative 6778fi 6779 6780 if test $gl_cross_guesses = risky; then 6781 gl_cross_guess_normal="guessing yes" 6782 gl_cross_guess_inverted="guessing no" 6783 else 6784 gl_cross_guess_normal="guessing no" 6785 gl_cross_guess_inverted="guessing yes" 6786 fi 6787 LIBC_FATAL_STDERR_=1 6788 export LIBC_FATAL_STDERR_ 6789 6790 6791ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" 6792if test "x$ac_cv_type_size_t" = xyes; then : 6793 6794else 6795 6796cat >>confdefs.h <<_ACEOF 6797#define size_t unsigned int 6798_ACEOF 6799 6800fi 6801 6802# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works 6803# for constant arguments. Useless! 6804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 6805$as_echo_n "checking for working alloca.h... " >&6; } 6806if ${ac_cv_working_alloca_h+:} false; then : 6807 $as_echo_n "(cached) " >&6 6808else 6809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6810/* end confdefs.h. */ 6811#include <alloca.h> 6812int 6813main () 6814{ 6815char *p = (char *) alloca (2 * sizeof (int)); 6816 if (p) return 0; 6817 ; 6818 return 0; 6819} 6820_ACEOF 6821if ac_fn_c_try_link "$LINENO"; then : 6822 ac_cv_working_alloca_h=yes 6823else 6824 ac_cv_working_alloca_h=no 6825fi 6826rm -f core conftest.err conftest.$ac_objext \ 6827 conftest$ac_exeext conftest.$ac_ext 6828fi 6829{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 6830$as_echo "$ac_cv_working_alloca_h" >&6; } 6831if test $ac_cv_working_alloca_h = yes; then 6832 6833$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h 6834 6835fi 6836 6837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 6838$as_echo_n "checking for alloca... " >&6; } 6839if ${ac_cv_func_alloca_works+:} false; then : 6840 $as_echo_n "(cached) " >&6 6841else 6842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6843/* end confdefs.h. */ 6844#ifdef __GNUC__ 6845# define alloca __builtin_alloca 6846#else 6847# ifdef _MSC_VER 6848# include <malloc.h> 6849# define alloca _alloca 6850# elif defined(__NetBSD__) || defined(__FreeBSD__) || defined(__DragonFly__) || defined(__OpenBSD__) 6851# include <stdlib.h> 6852# else 6853# ifdef HAVE_ALLOCA_H 6854# include <alloca.h> 6855# else 6856# ifdef _AIX 6857 #pragma alloca 6858# else 6859# ifndef alloca /* predefined by HP cc +Olibcalls */ 6860void *alloca (size_t); 6861# endif 6862# endif 6863# endif 6864# endif 6865#endif 6866 6867int 6868main () 6869{ 6870char *p = (char *) alloca (1); 6871 if (p) return 0; 6872 ; 6873 return 0; 6874} 6875_ACEOF 6876if ac_fn_c_try_link "$LINENO"; then : 6877 ac_cv_func_alloca_works=yes 6878else 6879 ac_cv_func_alloca_works=no 6880fi 6881rm -f core conftest.err conftest.$ac_objext \ 6882 conftest$ac_exeext conftest.$ac_ext 6883fi 6884{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 6885$as_echo "$ac_cv_func_alloca_works" >&6; } 6886 6887if test $ac_cv_func_alloca_works = yes; then 6888 6889$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h 6890 6891else 6892 # The SVR3 libPW and SVR4 libucb both contain incompatible functions 6893# that cause trouble. Some versions do not even contain alloca or 6894# contain a buggy version. If you still want to use their alloca, 6895# use ar to extract alloca.o from them instead of compiling alloca.c. 6896 6897 6898 6899 6900 6901ALLOCA=\${LIBOBJDIR}alloca.$ac_objext 6902 6903$as_echo "#define C_ALLOCA 1" >>confdefs.h 6904 6905 6906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 6907$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } 6908if ${ac_cv_os_cray+:} false; then : 6909 $as_echo_n "(cached) " >&6 6910else 6911 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6912/* end confdefs.h. */ 6913#if defined CRAY && ! defined CRAY2 6914webecray 6915#else 6916wenotbecray 6917#endif 6918 6919_ACEOF 6920if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 6921 $EGREP "webecray" >/dev/null 2>&1; then : 6922 ac_cv_os_cray=yes 6923else 6924 ac_cv_os_cray=no 6925fi 6926rm -f conftest* 6927 6928fi 6929{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 6930$as_echo "$ac_cv_os_cray" >&6; } 6931if test $ac_cv_os_cray = yes; then 6932 for ac_func in _getb67 GETB67 getb67; do 6933 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 6934ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 6935if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 6936 6937cat >>confdefs.h <<_ACEOF 6938#define CRAY_STACKSEG_END $ac_func 6939_ACEOF 6940 6941 break 6942fi 6943 6944 done 6945fi 6946 6947{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 6948$as_echo_n "checking stack direction for C alloca... " >&6; } 6949if ${ac_cv_c_stack_direction+:} false; then : 6950 $as_echo_n "(cached) " >&6 6951else 6952 if test "$cross_compiling" = yes; then : 6953 ac_cv_c_stack_direction=0 6954else 6955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6956/* end confdefs.h. */ 6957$ac_includes_default 6958int 6959find_stack_direction (int *addr, int depth) 6960{ 6961 int dir, dummy = 0; 6962 if (! addr) 6963 addr = &dummy; 6964 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; 6965 dir = depth ? find_stack_direction (addr, depth - 1) : 0; 6966 return dir + dummy; 6967} 6968 6969int 6970main (int argc, char **argv) 6971{ 6972 return find_stack_direction (0, argc + !argv + 20) < 0; 6973} 6974_ACEOF 6975if ac_fn_c_try_run "$LINENO"; then : 6976 ac_cv_c_stack_direction=1 6977else 6978 ac_cv_c_stack_direction=-1 6979fi 6980rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 6981 conftest.$ac_objext conftest.beam conftest.$ac_ext 6982fi 6983 6984fi 6985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 6986$as_echo "$ac_cv_c_stack_direction" >&6; } 6987cat >>confdefs.h <<_ACEOF 6988#define STACK_DIRECTION $ac_cv_c_stack_direction 6989_ACEOF 6990 6991 6992fi 6993 6994 6995 GNULIB_INET_NTOP=0; 6996 GNULIB_INET_PTON=0; 6997 HAVE_DECL_INET_NTOP=1; 6998 HAVE_DECL_INET_PTON=1; 6999 REPLACE_INET_NTOP=0; 7000 REPLACE_INET_PTON=0; 7001 7002 7003 7004 7005 for ac_header in $ac_header_list 7006do : 7007 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 7008ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default 7009" 7010if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 7011 cat >>confdefs.h <<_ACEOF 7012#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 7013_ACEOF 7014 7015fi 7016 7017done 7018 7019 7020 7021 7022 7023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 7024$as_echo_n "checking whether the preprocessor supports include_next... " >&6; } 7025if ${gl_cv_have_include_next+:} false; then : 7026 $as_echo_n "(cached) " >&6 7027else 7028 rm -rf conftestd1a conftestd1b conftestd2 7029 mkdir conftestd1a conftestd1b conftestd2 7030 cat <<EOF > conftestd1a/conftest.h 7031#define DEFINED_IN_CONFTESTD1 7032#include_next <conftest.h> 7033#ifdef DEFINED_IN_CONFTESTD2 7034int foo; 7035#else 7036#error "include_next doesn't work" 7037#endif 7038EOF 7039 cat <<EOF > conftestd1b/conftest.h 7040#define DEFINED_IN_CONFTESTD1 7041#include <stdio.h> 7042#include_next <conftest.h> 7043#ifdef DEFINED_IN_CONFTESTD2 7044int foo; 7045#else 7046#error "include_next doesn't work" 7047#endif 7048EOF 7049 cat <<EOF > conftestd2/conftest.h 7050#ifndef DEFINED_IN_CONFTESTD1 7051#error "include_next test doesn't work" 7052#endif 7053#define DEFINED_IN_CONFTESTD2 7054EOF 7055 gl_save_CPPFLAGS="$CPPFLAGS" 7056 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" 7057 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7058/* end confdefs.h. */ 7059#include <conftest.h> 7060_ACEOF 7061if ac_fn_c_try_compile "$LINENO"; then : 7062 gl_cv_have_include_next=yes 7063else 7064 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" 7065 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7066/* end confdefs.h. */ 7067#include <conftest.h> 7068_ACEOF 7069if ac_fn_c_try_compile "$LINENO"; then : 7070 gl_cv_have_include_next=buggy 7071else 7072 gl_cv_have_include_next=no 7073fi 7074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7075 7076fi 7077rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7078 CPPFLAGS="$gl_save_CPPFLAGS" 7079 rm -rf conftestd1a conftestd1b conftestd2 7080 7081fi 7082{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 7083$as_echo "$gl_cv_have_include_next" >&6; } 7084 PRAGMA_SYSTEM_HEADER= 7085 if test $gl_cv_have_include_next = yes; then 7086 INCLUDE_NEXT=include_next 7087 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next 7088 if test -n "$GCC"; then 7089 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' 7090 fi 7091 else 7092 if test $gl_cv_have_include_next = buggy; then 7093 INCLUDE_NEXT=include 7094 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next 7095 else 7096 INCLUDE_NEXT=include 7097 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include 7098 fi 7099 fi 7100 7101 7102 7103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 7104$as_echo_n "checking whether system header files limit the line length... " >&6; } 7105if ${gl_cv_pragma_columns+:} false; then : 7106 $as_echo_n "(cached) " >&6 7107else 7108 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7109/* end confdefs.h. */ 7110 7111#ifdef __TANDEM 7112choke me 7113#endif 7114 7115_ACEOF 7116if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 7117 $EGREP "choke me" >/dev/null 2>&1; then : 7118 gl_cv_pragma_columns=yes 7119else 7120 gl_cv_pragma_columns=no 7121fi 7122rm -f conftest* 7123 7124 7125fi 7126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 7127$as_echo "$gl_cv_pragma_columns" >&6; } 7128 if test $gl_cv_pragma_columns = yes; then 7129 PRAGMA_COLUMNS="#pragma COLUMNS 10000" 7130 else 7131 PRAGMA_COLUMNS= 7132 fi 7133 7134 7135 7136 7137 7138 7139 if test $ac_cv_header_features_h = yes; then 7140 HAVE_FEATURES_H=1 7141 else 7142 HAVE_FEATURES_H=0 7143 fi 7144 7145 7146 7147 7148 7149 if test $ac_cv_header_sys_socket_h = no; then 7150 for ac_header in ws2tcpip.h 7151do : 7152 ac_fn_c_check_header_mongrel "$LINENO" "ws2tcpip.h" "ac_cv_header_ws2tcpip_h" "$ac_includes_default" 7153if test "x$ac_cv_header_ws2tcpip_h" = xyes; then : 7154 cat >>confdefs.h <<_ACEOF 7155#define HAVE_WS2TCPIP_H 1 7156_ACEOF 7157 7158fi 7159 7160done 7161 7162 fi 7163 7164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 7165$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } 7166if test -z "$MKDIR_P"; then 7167 if ${ac_cv_path_mkdir+:} false; then : 7168 $as_echo_n "(cached) " >&6 7169else 7170 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 7171for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin 7172do 7173 IFS=$as_save_IFS 7174 test -z "$as_dir" && as_dir=. 7175 for ac_prog in mkdir gmkdir; do 7176 for ac_exec_ext in '' $ac_executable_extensions; do 7177 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue 7178 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 7179 'mkdir (GNU coreutils) '* | \ 7180 'mkdir (coreutils) '* | \ 7181 'mkdir (fileutils) '4.1*) 7182 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext 7183 break 3;; 7184 esac 7185 done 7186 done 7187 done 7188IFS=$as_save_IFS 7189 7190fi 7191 7192 test -d ./--version && rmdir ./--version 7193 if test "${ac_cv_path_mkdir+set}" = set; then 7194 MKDIR_P="$ac_cv_path_mkdir -p" 7195 else 7196 # As a last resort, use the slow shell script. Don't cache a 7197 # value for MKDIR_P within a source directory, because that will 7198 # break other packages using the cache if that directory is 7199 # removed, or if the value is a relative name. 7200 MKDIR_P="$ac_install_sh -d" 7201 fi 7202fi 7203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 7204$as_echo "$MKDIR_P" >&6; } 7205 7206 7207 GNULIB_BTOWC=0; 7208 GNULIB_WCTOB=0; 7209 GNULIB_MBSINIT=0; 7210 GNULIB_MBRTOWC=0; 7211 GNULIB_MBRLEN=0; 7212 GNULIB_MBSRTOWCS=0; 7213 GNULIB_MBSNRTOWCS=0; 7214 GNULIB_WCRTOMB=0; 7215 GNULIB_WCSRTOMBS=0; 7216 GNULIB_WCSNRTOMBS=0; 7217 GNULIB_WCWIDTH=0; 7218 GNULIB_WMEMCHR=0; 7219 GNULIB_WMEMCMP=0; 7220 GNULIB_WMEMCPY=0; 7221 GNULIB_WMEMMOVE=0; 7222 GNULIB_WMEMPCPY=0; 7223 GNULIB_WMEMSET=0; 7224 GNULIB_WCSLEN=0; 7225 GNULIB_WCSNLEN=0; 7226 GNULIB_WCSCPY=0; 7227 GNULIB_WCPCPY=0; 7228 GNULIB_WCSNCPY=0; 7229 GNULIB_WCPNCPY=0; 7230 GNULIB_WCSCAT=0; 7231 GNULIB_WCSNCAT=0; 7232 GNULIB_WCSCMP=0; 7233 GNULIB_WCSNCMP=0; 7234 GNULIB_WCSCASECMP=0; 7235 GNULIB_WCSNCASECMP=0; 7236 GNULIB_WCSCOLL=0; 7237 GNULIB_WCSXFRM=0; 7238 GNULIB_WCSDUP=0; 7239 GNULIB_WCSCHR=0; 7240 GNULIB_WCSRCHR=0; 7241 GNULIB_WCSCSPN=0; 7242 GNULIB_WCSSPN=0; 7243 GNULIB_WCSPBRK=0; 7244 GNULIB_WCSSTR=0; 7245 GNULIB_WCSTOK=0; 7246 GNULIB_WCSWIDTH=0; 7247 GNULIB_WCSFTIME=0; 7248 HAVE_BTOWC=1; 7249 HAVE_MBSINIT=1; 7250 HAVE_MBRTOWC=1; 7251 HAVE_MBRLEN=1; 7252 HAVE_MBSRTOWCS=1; 7253 HAVE_MBSNRTOWCS=1; 7254 HAVE_WCRTOMB=1; 7255 HAVE_WCSRTOMBS=1; 7256 HAVE_WCSNRTOMBS=1; 7257 HAVE_WMEMCHR=1; 7258 HAVE_WMEMCMP=1; 7259 HAVE_WMEMCPY=1; 7260 HAVE_WMEMMOVE=1; 7261 HAVE_WMEMPCPY=1; 7262 HAVE_WMEMSET=1; 7263 HAVE_WCSLEN=1; 7264 HAVE_WCSNLEN=1; 7265 HAVE_WCSCPY=1; 7266 HAVE_WCPCPY=1; 7267 HAVE_WCSNCPY=1; 7268 HAVE_WCPNCPY=1; 7269 HAVE_WCSCAT=1; 7270 HAVE_WCSNCAT=1; 7271 HAVE_WCSCMP=1; 7272 HAVE_WCSNCMP=1; 7273 HAVE_WCSCASECMP=1; 7274 HAVE_WCSNCASECMP=1; 7275 HAVE_WCSCOLL=1; 7276 HAVE_WCSXFRM=1; 7277 HAVE_WCSDUP=1; 7278 HAVE_WCSCHR=1; 7279 HAVE_WCSRCHR=1; 7280 HAVE_WCSCSPN=1; 7281 HAVE_WCSSPN=1; 7282 HAVE_WCSPBRK=1; 7283 HAVE_WCSSTR=1; 7284 HAVE_WCSTOK=1; 7285 HAVE_WCSWIDTH=1; 7286 HAVE_WCSFTIME=1; 7287 HAVE_DECL_WCTOB=1; 7288 HAVE_DECL_WCWIDTH=1; 7289 REPLACE_MBSTATE_T=0; 7290 REPLACE_BTOWC=0; 7291 REPLACE_WCTOB=0; 7292 REPLACE_MBSINIT=0; 7293 REPLACE_MBRTOWC=0; 7294 REPLACE_MBRLEN=0; 7295 REPLACE_MBSRTOWCS=0; 7296 REPLACE_MBSNRTOWCS=0; 7297 REPLACE_WCRTOMB=0; 7298 REPLACE_WCSRTOMBS=0; 7299 REPLACE_WCSNRTOMBS=0; 7300 REPLACE_WCWIDTH=0; 7301 REPLACE_WCSWIDTH=0; 7302 REPLACE_WCSFTIME=0; 7303 REPLACE_WCSTOK=0; 7304 7305 7306 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5 7307$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; } 7308if ${gl_cv_header_wchar_h_correct_inline+:} false; then : 7309 $as_echo_n "(cached) " >&6 7310else 7311 gl_cv_header_wchar_h_correct_inline=yes 7312 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7313/* end confdefs.h. */ 7314 7315 #define wcstod renamed_wcstod 7316/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 7317 <wchar.h>. 7318 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 7319 included before <wchar.h>. */ 7320#include <stddef.h> 7321#include <stdio.h> 7322#include <time.h> 7323#include <wchar.h> 7324extern int zero (void); 7325int main () { return zero(); } 7326 7327_ACEOF 7328 save_ac_compile="$ac_compile" 7329 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest1/` 7330 if echo '#include "conftest.c"' >conftest1.c && 7331 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 7332 (eval $ac_compile) 2>&5 7333 ac_status=$? 7334 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 7335 test $ac_status = 0; }; then 7336 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7337/* end confdefs.h. */ 7338 7339 #define wcstod renamed_wcstod 7340/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 7341 <wchar.h>. 7342 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 7343 included before <wchar.h>. */ 7344#include <stddef.h> 7345#include <stdio.h> 7346#include <time.h> 7347#include <wchar.h> 7348int zero (void) { return 0; } 7349 7350_ACEOF 7351 ac_compile=`echo "$save_ac_compile" | sed s/conftest/conftest2/` 7352 if echo '#include "conftest.c"' >conftest2.c && 7353 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 7354 (eval $ac_compile) 2>&5 7355 ac_status=$? 7356 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 7357 test $ac_status = 0; }; then 7358 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then 7359 : 7360 else 7361 gl_cv_header_wchar_h_correct_inline=no 7362 fi 7363 fi 7364 fi 7365 ac_compile="$save_ac_compile" 7366 rm -f conftest12.c conftest12.$ac_objext conftest$ac_exeext 7367 7368fi 7369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5 7370$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; } 7371 if test $gl_cv_header_wchar_h_correct_inline = no; then 7372 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). 7373This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in 7374C99 mode. You have four options: 7375 - Add the flag -fgnu89-inline to CC and reconfigure, or 7376 - Fix your include files, using parts of 7377 <https://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or 7378 - Use a gcc version older than 4.3, or 7379 - Don't use the flags -std=c99 or -std=gnu99. 7380Configuration aborted." "$LINENO" 5 7381 fi 7382 7383 7384 7385 7386 for ac_func in $ac_func_list 7387do : 7388 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 7389ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 7390if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 7391 cat >>confdefs.h <<_ACEOF 7392#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 7393_ACEOF 7394 7395fi 7396done 7397 7398 7399 7400 7401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 7402$as_echo_n "checking for nl_langinfo and CODESET... " >&6; } 7403if ${am_cv_langinfo_codeset+:} false; then : 7404 $as_echo_n "(cached) " >&6 7405else 7406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7407/* end confdefs.h. */ 7408#include <langinfo.h> 7409int 7410main () 7411{ 7412char* cs = nl_langinfo(CODESET); return !cs; 7413 ; 7414 return 0; 7415} 7416_ACEOF 7417if ac_fn_c_try_link "$LINENO"; then : 7418 am_cv_langinfo_codeset=yes 7419else 7420 am_cv_langinfo_codeset=no 7421fi 7422rm -f core conftest.err conftest.$ac_objext \ 7423 conftest$ac_exeext conftest.$ac_ext 7424 7425fi 7426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 7427$as_echo "$am_cv_langinfo_codeset" >&6; } 7428 if test $am_cv_langinfo_codeset = yes; then 7429 7430$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h 7431 7432 fi 7433 7434 7435 7436 7437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional french locale" >&5 7438$as_echo_n "checking for a traditional french locale... " >&6; } 7439if ${gt_cv_locale_fr+:} false; then : 7440 $as_echo_n "(cached) " >&6 7441else 7442 7443 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7444/* end confdefs.h. */ 7445 7446#include <locale.h> 7447#include <time.h> 7448#if HAVE_LANGINFO_CODESET 7449# include <langinfo.h> 7450#endif 7451#include <stdlib.h> 7452#include <string.h> 7453struct tm t; 7454char buf[16]; 7455int main () { 7456 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl 7457 imitates locale dependent behaviour by looking at the environment 7458 variables, and all locales use the UTF-8 encoding. */ 7459#if defined __BEOS__ || defined __HAIKU__ 7460 return 1; 7461#else 7462 /* Check whether the given locale name is recognized by the system. */ 7463# if defined _WIN32 && !defined __CYGWIN__ 7464 /* On native Windows, setlocale(category, "") looks at the system settings, 7465 not at the environment variables. Also, when an encoding suffix such 7466 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE 7467 category of the locale to "C". */ 7468 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL 7469 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) 7470 return 1; 7471# else 7472 if (setlocale (LC_ALL, "") == NULL) return 1; 7473# endif 7474 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". 7475 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) 7476 is empty, and the behaviour of Tcl 8.4 in this locale is not useful. 7477 On OpenBSD 4.0, when an unsupported locale is specified, setlocale() 7478 succeeds but then nl_langinfo(CODESET) is "646". In this situation, 7479 some unit tests fail. 7480 On MirBSD 10, when an unsupported locale is specified, setlocale() 7481 succeeds but then nl_langinfo(CODESET) is "UTF-8". */ 7482# if HAVE_LANGINFO_CODESET 7483 { 7484 const char *cs = nl_langinfo (CODESET); 7485 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 7486 || strcmp (cs, "UTF-8") == 0) 7487 return 1; 7488 } 7489# endif 7490# ifdef __CYGWIN__ 7491 /* On Cygwin, avoid locale names without encoding suffix, because the 7492 locale_charset() function relies on the encoding suffix. Note that 7493 LC_ALL is set on the command line. */ 7494 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; 7495# endif 7496 /* Check whether in the abbreviation of the second month, the second 7497 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is only 7498 one byte long. This excludes the UTF-8 encoding. */ 7499 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; 7500 if (strftime (buf, sizeof (buf), "%b", &t) < 3 || buf[2] != 'v') return 1; 7501# if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ 7502 /* Check whether the decimal separator is a comma. 7503 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point 7504 are nl_langinfo(RADIXCHAR) are both ".". */ 7505 if (localeconv () ->decimal_point[0] != ',') return 1; 7506# endif 7507 return 0; 7508#endif 7509} 7510 7511_ACEOF 7512 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 7513 (eval $ac_link) 2>&5 7514 ac_status=$? 7515 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 7516 test $ac_status = 0; } && test -s conftest$ac_exeext; then 7517 case "$host_os" in 7518 # Handle native Windows specially, because there setlocale() interprets 7519 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", 7520 # "fr" or "fra" as "French" or "French_France.1252", 7521 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", 7522 # "ja" as "Japanese" or "Japanese_Japan.932", 7523 # and similar. 7524 mingw*) 7525 # Test for the native Windows locale name. 7526 if (LC_ALL=French_France.1252 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 7527 gt_cv_locale_fr=French_France.1252 7528 else 7529 # None found. 7530 gt_cv_locale_fr=none 7531 fi 7532 ;; 7533 *) 7534 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because 7535 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the 7536 # configure script would override the LC_ALL setting. Likewise for 7537 # LC_CTYPE, which is also set at the beginning of the configure script. 7538 # Test for the usual locale name. 7539 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 7540 gt_cv_locale_fr=fr_FR 7541 else 7542 # Test for the locale name with explicit encoding suffix. 7543 if (LC_ALL=fr_FR.ISO-8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 7544 gt_cv_locale_fr=fr_FR.ISO-8859-1 7545 else 7546 # Test for the AIX, OSF/1, FreeBSD, NetBSD, OpenBSD locale name. 7547 if (LC_ALL=fr_FR.ISO8859-1 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 7548 gt_cv_locale_fr=fr_FR.ISO8859-1 7549 else 7550 # Test for the HP-UX locale name. 7551 if (LC_ALL=fr_FR.iso88591 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 7552 gt_cv_locale_fr=fr_FR.iso88591 7553 else 7554 # Test for the Solaris 7 locale name. 7555 if (LC_ALL=fr LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 7556 gt_cv_locale_fr=fr 7557 else 7558 # None found. 7559 gt_cv_locale_fr=none 7560 fi 7561 fi 7562 fi 7563 fi 7564 fi 7565 ;; 7566 esac 7567 fi 7568 rm -fr conftest* 7569 7570fi 7571{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr" >&5 7572$as_echo "$gt_cv_locale_fr" >&6; } 7573 LOCALE_FR=$gt_cv_locale_fr 7574 7575 7576 7577 GNULIB__EXIT=0; 7578 GNULIB_ATOLL=0; 7579 GNULIB_CALLOC_POSIX=0; 7580 GNULIB_CANONICALIZE_FILE_NAME=0; 7581 GNULIB_GETLOADAVG=0; 7582 GNULIB_GETSUBOPT=0; 7583 GNULIB_GRANTPT=0; 7584 GNULIB_MALLOC_POSIX=0; 7585 GNULIB_MBTOWC=0; 7586 GNULIB_MKDTEMP=0; 7587 GNULIB_MKOSTEMP=0; 7588 GNULIB_MKOSTEMPS=0; 7589 GNULIB_MKSTEMP=0; 7590 GNULIB_MKSTEMPS=0; 7591 GNULIB_POSIX_OPENPT=0; 7592 GNULIB_PTSNAME=0; 7593 GNULIB_PTSNAME_R=0; 7594 GNULIB_PUTENV=0; 7595 GNULIB_QSORT_R=0; 7596 GNULIB_RANDOM=0; 7597 GNULIB_RANDOM_R=0; 7598 GNULIB_REALLOCARRAY=0; 7599 GNULIB_REALLOC_POSIX=0; 7600 GNULIB_REALPATH=0; 7601 GNULIB_RPMATCH=0; 7602 GNULIB_SECURE_GETENV=0; 7603 GNULIB_SETENV=0; 7604 GNULIB_STRTOD=0; 7605 GNULIB_STRTOLD=0; 7606 GNULIB_STRTOLL=0; 7607 GNULIB_STRTOULL=0; 7608 GNULIB_SYSTEM_POSIX=0; 7609 GNULIB_UNLOCKPT=0; 7610 GNULIB_UNSETENV=0; 7611 GNULIB_WCTOMB=0; 7612 HAVE__EXIT=1; 7613 HAVE_ATOLL=1; 7614 HAVE_CANONICALIZE_FILE_NAME=1; 7615 HAVE_DECL_GETLOADAVG=1; 7616 HAVE_GETSUBOPT=1; 7617 HAVE_GRANTPT=1; 7618 HAVE_INITSTATE=1; 7619 HAVE_DECL_INITSTATE=1; 7620 HAVE_MBTOWC=1; 7621 HAVE_MKDTEMP=1; 7622 HAVE_MKOSTEMP=1; 7623 HAVE_MKOSTEMPS=1; 7624 HAVE_MKSTEMP=1; 7625 HAVE_MKSTEMPS=1; 7626 HAVE_POSIX_OPENPT=1; 7627 HAVE_PTSNAME=1; 7628 HAVE_PTSNAME_R=1; 7629 HAVE_QSORT_R=1; 7630 HAVE_RANDOM=1; 7631 HAVE_RANDOM_H=1; 7632 HAVE_RANDOM_R=1; 7633 HAVE_REALLOCARRAY=1; 7634 HAVE_REALPATH=1; 7635 HAVE_RPMATCH=1; 7636 HAVE_SECURE_GETENV=1; 7637 HAVE_SETENV=1; 7638 HAVE_DECL_SETENV=1; 7639 HAVE_SETSTATE=1; 7640 HAVE_DECL_SETSTATE=1; 7641 HAVE_STRTOD=1; 7642 HAVE_STRTOLD=1; 7643 HAVE_STRTOLL=1; 7644 HAVE_STRTOULL=1; 7645 HAVE_STRUCT_RANDOM_DATA=1; 7646 HAVE_SYS_LOADAVG_H=0; 7647 HAVE_UNLOCKPT=1; 7648 HAVE_DECL_UNSETENV=1; 7649 REPLACE_CALLOC=0; 7650 REPLACE_CANONICALIZE_FILE_NAME=0; 7651 REPLACE_INITSTATE=0; 7652 REPLACE_MALLOC=0; 7653 REPLACE_MBTOWC=0; 7654 REPLACE_MKSTEMP=0; 7655 REPLACE_PTSNAME=0; 7656 REPLACE_PTSNAME_R=0; 7657 REPLACE_PUTENV=0; 7658 REPLACE_QSORT_R=0; 7659 REPLACE_RANDOM=0; 7660 REPLACE_RANDOM_R=0; 7661 REPLACE_REALLOC=0; 7662 REPLACE_REALPATH=0; 7663 REPLACE_SETENV=0; 7664 REPLACE_SETSTATE=0; 7665 REPLACE_STRTOD=0; 7666 REPLACE_STRTOLD=0; 7667 REPLACE_UNSETENV=0; 7668 REPLACE_WCTOMB=0; 7669 7670 7671 7672 7673 7674 7675 7676 7677 7678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 7679$as_echo_n "checking whether // is distinct from /... " >&6; } 7680if ${gl_cv_double_slash_root+:} false; then : 7681 $as_echo_n "(cached) " >&6 7682else 7683 if test x"$cross_compiling" = xyes ; then 7684 # When cross-compiling, there is no way to tell whether // is special 7685 # short of a list of hosts. However, the only known hosts to date 7686 # that have a distinct // are Apollo DomainOS (too old to port to), 7687 # Cygwin, and z/OS. If anyone knows of another system for which // has 7688 # special semantics and is distinct from /, please report it to 7689 # <bug-gnulib@gnu.org>. 7690 case $host in 7691 *-cygwin | i370-ibm-openedition) 7692 gl_cv_double_slash_root=yes ;; 7693 *) 7694 # Be optimistic and assume that / and // are the same when we 7695 # don't know. 7696 gl_cv_double_slash_root='unknown, assuming no' ;; 7697 esac 7698 else 7699 set x `ls -di / // 2>/dev/null` 7700 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then 7701 gl_cv_double_slash_root=no 7702 else 7703 gl_cv_double_slash_root=yes 7704 fi 7705 fi 7706fi 7707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 7708$as_echo "$gl_cv_double_slash_root" >&6; } 7709 if test "$gl_cv_double_slash_root" = yes; then 7710 7711$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h 7712 7713 fi 7714 7715 7716 7717 7718 7719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether realpath works" >&5 7720$as_echo_n "checking whether realpath works... " >&6; } 7721if ${gl_cv_func_realpath_works+:} false; then : 7722 $as_echo_n "(cached) " >&6 7723else 7724 7725 touch conftest.a 7726 mkdir conftest.d 7727 if test "$cross_compiling" = yes; then : 7728 case "$host_os" in 7729 # Guess yes on glibc systems. 7730 *-gnu* | gnu*) gl_cv_func_realpath_works="guessing yes" ;; 7731 # Guess yes on musl systems. 7732 *-musl*) gl_cv_func_realpath_works="guessing yes" ;; 7733 # Guess no on native Windows. 7734 mingw*) gl_cv_func_realpath_works="guessing no" ;; 7735 # If we don't know, obey --enable-cross-guesses. 7736 *) gl_cv_func_realpath_works="$gl_cross_guess_normal" ;; 7737 esac 7738 7739else 7740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7741/* end confdefs.h. */ 7742 7743 7744 7745#include <stdlib.h> 7746#if defined __MACH__ && defined __APPLE__ 7747/* Avoid a crash on Mac OS X. */ 7748#include <mach/mach.h> 7749#include <mach/mach_error.h> 7750#include <mach/thread_status.h> 7751#include <mach/exception.h> 7752#include <mach/task.h> 7753#include <pthread.h> 7754/* The exception port on which our thread listens. */ 7755static mach_port_t our_exception_port; 7756/* The main function of the thread listening for exceptions of type 7757 EXC_BAD_ACCESS. */ 7758static void * 7759mach_exception_thread (void *arg) 7760{ 7761 /* Buffer for a message to be received. */ 7762 struct { 7763 mach_msg_header_t head; 7764 mach_msg_body_t msgh_body; 7765 char data[1024]; 7766 } msg; 7767 mach_msg_return_t retval; 7768 /* Wait for a message on the exception port. */ 7769 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), 7770 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); 7771 if (retval != MACH_MSG_SUCCESS) 7772 abort (); 7773 exit (1); 7774} 7775static void 7776nocrash_init (void) 7777{ 7778 mach_port_t self = mach_task_self (); 7779 /* Allocate a port on which the thread shall listen for exceptions. */ 7780 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) 7781 == KERN_SUCCESS) { 7782 /* See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ 7783 if (mach_port_insert_right (self, our_exception_port, our_exception_port, 7784 MACH_MSG_TYPE_MAKE_SEND) 7785 == KERN_SUCCESS) { 7786 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting 7787 for us. */ 7788 exception_mask_t mask = EXC_MASK_BAD_ACCESS; 7789 /* Create the thread listening on the exception port. */ 7790 pthread_attr_t attr; 7791 pthread_t thread; 7792 if (pthread_attr_init (&attr) == 0 7793 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 7794 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { 7795 pthread_attr_destroy (&attr); 7796 /* Replace the exception port info for these exceptions with our own. 7797 Note that we replace the exception port for the entire task, not only 7798 for a particular thread. This has the effect that when our exception 7799 port gets the message, the thread specific exception port has already 7800 been asked, and we don't need to bother about it. 7801 See https://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ 7802 task_set_exception_ports (self, mask, our_exception_port, 7803 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); 7804 } 7805 } 7806 } 7807} 7808#elif defined _WIN32 && ! defined __CYGWIN__ 7809/* Avoid a crash on native Windows. */ 7810#define WIN32_LEAN_AND_MEAN 7811#include <windows.h> 7812#include <winerror.h> 7813static LONG WINAPI 7814exception_filter (EXCEPTION_POINTERS *ExceptionInfo) 7815{ 7816 switch (ExceptionInfo->ExceptionRecord->ExceptionCode) 7817 { 7818 case EXCEPTION_ACCESS_VIOLATION: 7819 case EXCEPTION_IN_PAGE_ERROR: 7820 case EXCEPTION_STACK_OVERFLOW: 7821 case EXCEPTION_GUARD_PAGE: 7822 case EXCEPTION_PRIV_INSTRUCTION: 7823 case EXCEPTION_ILLEGAL_INSTRUCTION: 7824 case EXCEPTION_DATATYPE_MISALIGNMENT: 7825 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: 7826 case EXCEPTION_NONCONTINUABLE_EXCEPTION: 7827 exit (1); 7828 } 7829 return EXCEPTION_CONTINUE_SEARCH; 7830} 7831static void 7832nocrash_init (void) 7833{ 7834 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); 7835} 7836#else 7837/* Avoid a crash on POSIX systems. */ 7838#include <signal.h> 7839#include <unistd.h> 7840/* A POSIX signal handler. */ 7841static void 7842exception_handler (int sig) 7843{ 7844 _exit (1); 7845} 7846static void 7847nocrash_init (void) 7848{ 7849#ifdef SIGSEGV 7850 signal (SIGSEGV, exception_handler); 7851#endif 7852#ifdef SIGBUS 7853 signal (SIGBUS, exception_handler); 7854#endif 7855} 7856#endif 7857 7858 #include <stdlib.h> 7859 #include <string.h> 7860 7861int 7862main () 7863{ 7864 7865 int result = 0; 7866 { 7867 char *name = realpath ("conftest.a", NULL); 7868 if (!(name && *name == '/')) 7869 result |= 1; 7870 free (name); 7871 } 7872 { 7873 char *name = realpath ("conftest.b/../conftest.a", NULL); 7874 if (name != NULL) 7875 result |= 2; 7876 free (name); 7877 } 7878 { 7879 char *name = realpath ("conftest.a/", NULL); 7880 if (name != NULL) 7881 result |= 4; 7882 free (name); 7883 } 7884 { 7885 char *name1 = realpath (".", NULL); 7886 char *name2 = realpath ("conftest.d//./..", NULL); 7887 if (! name1 || ! name2 || strcmp (name1, name2)) 7888 result |= 8; 7889 free (name1); 7890 free (name2); 7891 } 7892 return result; 7893 7894 ; 7895 return 0; 7896} 7897 7898_ACEOF 7899if ac_fn_c_try_run "$LINENO"; then : 7900 gl_cv_func_realpath_works=yes 7901else 7902 gl_cv_func_realpath_works=no 7903fi 7904rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 7905 conftest.$ac_objext conftest.beam conftest.$ac_ext 7906fi 7907 7908 rm -rf conftest.a conftest.d 7909 7910fi 7911{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_realpath_works" >&5 7912$as_echo "$gl_cv_func_realpath_works" >&6; } 7913 case "$gl_cv_func_realpath_works" in 7914 *yes) 7915 7916$as_echo "#define FUNC_REALPATH_WORKS 1" >>confdefs.h 7917 7918 ;; 7919 esac 7920 7921 7922 7923 7924 7925 7926 7927 7928 7929 7930 7931 GNULIB_ACCESS=0; 7932 GNULIB_CHDIR=0; 7933 GNULIB_CHOWN=0; 7934 GNULIB_CLOSE=0; 7935 GNULIB_COPY_FILE_RANGE=0; 7936 GNULIB_DUP=0; 7937 GNULIB_DUP2=0; 7938 GNULIB_DUP3=0; 7939 GNULIB_ENVIRON=0; 7940 GNULIB_EUIDACCESS=0; 7941 GNULIB_FACCESSAT=0; 7942 GNULIB_FCHDIR=0; 7943 GNULIB_FCHOWNAT=0; 7944 GNULIB_FDATASYNC=0; 7945 GNULIB_FSYNC=0; 7946 GNULIB_FTRUNCATE=0; 7947 GNULIB_GETCWD=0; 7948 GNULIB_GETDOMAINNAME=0; 7949 GNULIB_GETDTABLESIZE=0; 7950 GNULIB_GETENTROPY=0; 7951 GNULIB_GETGROUPS=0; 7952 GNULIB_GETHOSTNAME=0; 7953 GNULIB_GETLOGIN=0; 7954 GNULIB_GETLOGIN_R=0; 7955 GNULIB_GETOPT_POSIX=0; 7956 GNULIB_GETPAGESIZE=0; 7957 GNULIB_GETPASS=0; 7958 GNULIB_GETUSERSHELL=0; 7959 GNULIB_GROUP_MEMBER=0; 7960 GNULIB_ISATTY=0; 7961 GNULIB_LCHOWN=0; 7962 GNULIB_LINK=0; 7963 GNULIB_LINKAT=0; 7964 GNULIB_LSEEK=0; 7965 GNULIB_PIPE=0; 7966 GNULIB_PIPE2=0; 7967 GNULIB_PREAD=0; 7968 GNULIB_PWRITE=0; 7969 GNULIB_READ=0; 7970 GNULIB_READLINK=0; 7971 GNULIB_READLINKAT=0; 7972 GNULIB_RMDIR=0; 7973 GNULIB_SETHOSTNAME=0; 7974 GNULIB_SLEEP=0; 7975 GNULIB_SYMLINK=0; 7976 GNULIB_SYMLINKAT=0; 7977 GNULIB_TRUNCATE=0; 7978 GNULIB_TTYNAME_R=0; 7979 GNULIB_UNISTD_H_NONBLOCKING=0; 7980 GNULIB_UNISTD_H_SIGPIPE=0; 7981 GNULIB_UNLINK=0; 7982 GNULIB_UNLINKAT=0; 7983 GNULIB_USLEEP=0; 7984 GNULIB_WRITE=0; 7985 HAVE_CHOWN=1; 7986 HAVE_COPY_FILE_RANGE=1; 7987 HAVE_DUP2=1; 7988 HAVE_DUP3=1; 7989 HAVE_EUIDACCESS=1; 7990 HAVE_FACCESSAT=1; 7991 HAVE_FCHDIR=1; 7992 HAVE_FCHOWNAT=1; 7993 HAVE_FDATASYNC=1; 7994 HAVE_FSYNC=1; 7995 HAVE_FTRUNCATE=1; 7996 HAVE_GETDTABLESIZE=1; 7997 HAVE_GETENTROPY=1; 7998 HAVE_GETGROUPS=1; 7999 HAVE_GETHOSTNAME=1; 8000 HAVE_GETLOGIN=1; 8001 HAVE_GETPAGESIZE=1; 8002 HAVE_GETPASS=1; 8003 HAVE_GROUP_MEMBER=1; 8004 HAVE_LCHOWN=1; 8005 HAVE_LINK=1; 8006 HAVE_LINKAT=1; 8007 HAVE_PIPE=1; 8008 HAVE_PIPE2=1; 8009 HAVE_PREAD=1; 8010 HAVE_PWRITE=1; 8011 HAVE_READLINK=1; 8012 HAVE_READLINKAT=1; 8013 HAVE_SETHOSTNAME=1; 8014 HAVE_SLEEP=1; 8015 HAVE_SYMLINK=1; 8016 HAVE_SYMLINKAT=1; 8017 HAVE_UNLINKAT=1; 8018 HAVE_USLEEP=1; 8019 HAVE_DECL_ENVIRON=1; 8020 HAVE_DECL_FCHDIR=1; 8021 HAVE_DECL_FDATASYNC=1; 8022 HAVE_DECL_GETDOMAINNAME=1; 8023 HAVE_DECL_GETLOGIN=1; 8024 HAVE_DECL_GETLOGIN_R=1; 8025 HAVE_DECL_GETPAGESIZE=1; 8026 HAVE_DECL_GETUSERSHELL=1; 8027 HAVE_DECL_SETHOSTNAME=1; 8028 HAVE_DECL_TRUNCATE=1; 8029 HAVE_DECL_TTYNAME_R=1; 8030 HAVE_OS_H=0; 8031 HAVE_SYS_PARAM_H=0; 8032 REPLACE_ACCESS=0; 8033 REPLACE_CHOWN=0; 8034 REPLACE_CLOSE=0; 8035 REPLACE_DUP=0; 8036 REPLACE_DUP2=0; 8037 REPLACE_FACCESSAT=0; 8038 REPLACE_FCHOWNAT=0; 8039 REPLACE_FTRUNCATE=0; 8040 REPLACE_GETCWD=0; 8041 REPLACE_GETDOMAINNAME=0; 8042 REPLACE_GETDTABLESIZE=0; 8043 REPLACE_GETLOGIN_R=0; 8044 REPLACE_GETGROUPS=0; 8045 REPLACE_GETPAGESIZE=0; 8046 REPLACE_GETPASS=0; 8047 REPLACE_ISATTY=0; 8048 REPLACE_LCHOWN=0; 8049 REPLACE_LINK=0; 8050 REPLACE_LINKAT=0; 8051 REPLACE_LSEEK=0; 8052 REPLACE_PREAD=0; 8053 REPLACE_PWRITE=0; 8054 REPLACE_READ=0; 8055 REPLACE_READLINK=0; 8056 REPLACE_READLINKAT=0; 8057 REPLACE_RMDIR=0; 8058 REPLACE_SLEEP=0; 8059 REPLACE_SYMLINK=0; 8060 REPLACE_SYMLINKAT=0; 8061 REPLACE_TRUNCATE=0; 8062 REPLACE_TTYNAME_R=0; 8063 REPLACE_UNLINK=0; 8064 REPLACE_UNLINKAT=0; 8065 REPLACE_USLEEP=0; 8066 REPLACE_WRITE=0; 8067 UNISTD_H_HAVE_SYS_RANDOM_H=0; 8068 UNISTD_H_HAVE_WINSOCK2_H=0; 8069 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; 8070 8071 8072 8073 8074 8075 8076 8077 8078 8079 8080 8081 if test $ac_cv_func__set_invalid_parameter_handler = yes; then 8082 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 8083 8084$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h 8085 8086 else 8087 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 8088 fi 8089 8090 8091 8092 8093 8094 GNULIB_OPENDIR=0; 8095 GNULIB_READDIR=0; 8096 GNULIB_REWINDDIR=0; 8097 GNULIB_CLOSEDIR=0; 8098 GNULIB_DIRFD=0; 8099 GNULIB_FDOPENDIR=0; 8100 GNULIB_SCANDIR=0; 8101 GNULIB_ALPHASORT=0; 8102 HAVE_OPENDIR=1; 8103 HAVE_READDIR=1; 8104 HAVE_REWINDDIR=1; 8105 HAVE_CLOSEDIR=1; 8106 HAVE_DECL_DIRFD=1; 8107 HAVE_DECL_FDOPENDIR=1; 8108 HAVE_FDOPENDIR=1; 8109 HAVE_SCANDIR=1; 8110 HAVE_ALPHASORT=1; 8111 REPLACE_OPENDIR=0; 8112 REPLACE_CLOSEDIR=0; 8113 REPLACE_DIRFD=0; 8114 REPLACE_FDOPENDIR=0; 8115 8116 8117 GNULIB_ISBLANK=0; 8118 HAVE_ISBLANK=1; 8119 8120 8121 8122 8123 8124 8125 8126 8127 8128 8129 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5 8130$as_echo_n "checking if environ is properly declared... " >&6; } 8131if ${gt_cv_var_environ_declaration+:} false; then : 8132 $as_echo_n "(cached) " >&6 8133else 8134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8135/* end confdefs.h. */ 8136#if HAVE_UNISTD_H 8137 #include <unistd.h> 8138 #endif 8139 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */ 8140 #include <stdlib.h> 8141 8142 extern struct { int foo; } environ; 8143int 8144main () 8145{ 8146environ.foo = 1; 8147 ; 8148 return 0; 8149} 8150_ACEOF 8151if ac_fn_c_try_compile "$LINENO"; then : 8152 gt_cv_var_environ_declaration=no 8153else 8154 gt_cv_var_environ_declaration=yes 8155fi 8156rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8157fi 8158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5 8159$as_echo "$gt_cv_var_environ_declaration" >&6; } 8160 if test $gt_cv_var_environ_declaration = yes; then 8161 8162$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h 8163 8164 fi 8165 8166 8167 if test $gt_cv_var_environ_declaration != yes; then 8168 HAVE_DECL_ENVIRON=0 8169 fi 8170 8171 8172 8173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5 8174$as_echo_n "checking for complete errno.h... " >&6; } 8175if ${gl_cv_header_errno_h_complete+:} false; then : 8176 $as_echo_n "(cached) " >&6 8177else 8178 8179 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8180/* end confdefs.h. */ 8181 8182#include <errno.h> 8183#if !defined ETXTBSY 8184booboo 8185#endif 8186#if !defined ENOMSG 8187booboo 8188#endif 8189#if !defined EIDRM 8190booboo 8191#endif 8192#if !defined ENOLINK 8193booboo 8194#endif 8195#if !defined EPROTO 8196booboo 8197#endif 8198#if !defined EMULTIHOP 8199booboo 8200#endif 8201#if !defined EBADMSG 8202booboo 8203#endif 8204#if !defined EOVERFLOW 8205booboo 8206#endif 8207#if !defined ENOTSUP 8208booboo 8209#endif 8210#if !defined ENETRESET 8211booboo 8212#endif 8213#if !defined ECONNABORTED 8214booboo 8215#endif 8216#if !defined ESTALE 8217booboo 8218#endif 8219#if !defined EDQUOT 8220booboo 8221#endif 8222#if !defined ECANCELED 8223booboo 8224#endif 8225#if !defined EOWNERDEAD 8226booboo 8227#endif 8228#if !defined ENOTRECOVERABLE 8229booboo 8230#endif 8231#if !defined EILSEQ 8232booboo 8233#endif 8234 8235_ACEOF 8236if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 8237 $EGREP "booboo" >/dev/null 2>&1; then : 8238 gl_cv_header_errno_h_complete=no 8239else 8240 gl_cv_header_errno_h_complete=yes 8241fi 8242rm -f conftest* 8243 8244 8245fi 8246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5 8247$as_echo "$gl_cv_header_errno_h_complete" >&6; } 8248 if test $gl_cv_header_errno_h_complete = yes; then 8249 ERRNO_H='' 8250 else 8251 8252 8253 8254 8255 8256 8257 8258 8259 if test $gl_cv_have_include_next = yes; then 8260 gl_cv_next_errno_h='<'errno.h'>' 8261 else 8262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5 8263$as_echo_n "checking absolute name of <errno.h>... " >&6; } 8264if ${gl_cv_next_errno_h+:} false; then : 8265 $as_echo_n "(cached) " >&6 8266else 8267 8268 8269 8270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8271/* end confdefs.h. */ 8272#include <errno.h> 8273_ACEOF 8274 case "$host_os" in 8275 aix*) gl_absname_cpp="$ac_cpp -C" ;; 8276 *) gl_absname_cpp="$ac_cpp" ;; 8277 esac 8278 8279 case "$host_os" in 8280 mingw*) 8281 gl_dirsep_regex='[/\\]' 8282 ;; 8283 *) 8284 gl_dirsep_regex='\/' 8285 ;; 8286 esac 8287 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 8288 gl_header_literal_regex=`echo 'errno.h' \ 8289 | sed -e "$gl_make_literal_regex_sed"` 8290 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 8291 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 8292 s|^/[^/]|//&| 8293 p 8294 q 8295 }' 8296 8297 gl_cv_absolute_errno_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 8298 sed -n "$gl_absolute_header_sed"` 8299 8300 gl_header=$gl_cv_absolute_errno_h 8301 gl_cv_next_errno_h='"'$gl_header'"' 8302 8303 8304fi 8305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5 8306$as_echo "$gl_cv_next_errno_h" >&6; } 8307 fi 8308 NEXT_ERRNO_H=$gl_cv_next_errno_h 8309 8310 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 8311 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 8312 gl_next_as_first_directive='<'errno.h'>' 8313 else 8314 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 8315 gl_next_as_first_directive=$gl_cv_next_errno_h 8316 fi 8317 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive 8318 8319 8320 8321 8322 ERRNO_H='errno.h' 8323 fi 8324 8325 if test -n "$ERRNO_H"; then 8326 GL_GENERATE_ERRNO_H_TRUE= 8327 GL_GENERATE_ERRNO_H_FALSE='#' 8328else 8329 GL_GENERATE_ERRNO_H_TRUE='#' 8330 GL_GENERATE_ERRNO_H_FALSE= 8331fi 8332 8333 8334 if test -n "$ERRNO_H"; then 8335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5 8336$as_echo_n "checking for EMULTIHOP value... " >&6; } 8337if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then : 8338 $as_echo_n "(cached) " >&6 8339else 8340 8341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8342/* end confdefs.h. */ 8343 8344#include <errno.h> 8345#ifdef EMULTIHOP 8346yes 8347#endif 8348 8349_ACEOF 8350if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 8351 $EGREP "yes" >/dev/null 2>&1; then : 8352 gl_cv_header_errno_h_EMULTIHOP=yes 8353else 8354 gl_cv_header_errno_h_EMULTIHOP=no 8355fi 8356rm -f conftest* 8357 8358 if test $gl_cv_header_errno_h_EMULTIHOP = no; then 8359 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8360/* end confdefs.h. */ 8361 8362#define _XOPEN_SOURCE_EXTENDED 1 8363#include <errno.h> 8364#ifdef EMULTIHOP 8365yes 8366#endif 8367 8368_ACEOF 8369if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 8370 $EGREP "yes" >/dev/null 2>&1; then : 8371 gl_cv_header_errno_h_EMULTIHOP=hidden 8372fi 8373rm -f conftest* 8374 8375 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then 8376 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" " 8377#define _XOPEN_SOURCE_EXTENDED 1 8378#include <errno.h> 8379/* The following two lines are a workaround against an autoconf-2.52 bug. */ 8380#include <stdio.h> 8381#include <stdlib.h> 8382"; then : 8383 8384fi 8385 8386 fi 8387 fi 8388 8389fi 8390{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5 8391$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; } 8392 case $gl_cv_header_errno_h_EMULTIHOP in 8393 yes | no) 8394 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE= 8395 ;; 8396 *) 8397 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP" 8398 ;; 8399 esac 8400 8401 8402 fi 8403 8404 8405 if test -n "$ERRNO_H"; then 8406 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5 8407$as_echo_n "checking for ENOLINK value... " >&6; } 8408if ${gl_cv_header_errno_h_ENOLINK+:} false; then : 8409 $as_echo_n "(cached) " >&6 8410else 8411 8412 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8413/* end confdefs.h. */ 8414 8415#include <errno.h> 8416#ifdef ENOLINK 8417yes 8418#endif 8419 8420_ACEOF 8421if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 8422 $EGREP "yes" >/dev/null 2>&1; then : 8423 gl_cv_header_errno_h_ENOLINK=yes 8424else 8425 gl_cv_header_errno_h_ENOLINK=no 8426fi 8427rm -f conftest* 8428 8429 if test $gl_cv_header_errno_h_ENOLINK = no; then 8430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8431/* end confdefs.h. */ 8432 8433#define _XOPEN_SOURCE_EXTENDED 1 8434#include <errno.h> 8435#ifdef ENOLINK 8436yes 8437#endif 8438 8439_ACEOF 8440if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 8441 $EGREP "yes" >/dev/null 2>&1; then : 8442 gl_cv_header_errno_h_ENOLINK=hidden 8443fi 8444rm -f conftest* 8445 8446 if test $gl_cv_header_errno_h_ENOLINK = hidden; then 8447 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" " 8448#define _XOPEN_SOURCE_EXTENDED 1 8449#include <errno.h> 8450/* The following two lines are a workaround against an autoconf-2.52 bug. */ 8451#include <stdio.h> 8452#include <stdlib.h> 8453"; then : 8454 8455fi 8456 8457 fi 8458 fi 8459 8460fi 8461{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5 8462$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; } 8463 case $gl_cv_header_errno_h_ENOLINK in 8464 yes | no) 8465 ENOLINK_HIDDEN=0; ENOLINK_VALUE= 8466 ;; 8467 *) 8468 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK" 8469 ;; 8470 esac 8471 8472 8473 fi 8474 8475 8476 if test -n "$ERRNO_H"; then 8477 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5 8478$as_echo_n "checking for EOVERFLOW value... " >&6; } 8479if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then : 8480 $as_echo_n "(cached) " >&6 8481else 8482 8483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8484/* end confdefs.h. */ 8485 8486#include <errno.h> 8487#ifdef EOVERFLOW 8488yes 8489#endif 8490 8491_ACEOF 8492if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 8493 $EGREP "yes" >/dev/null 2>&1; then : 8494 gl_cv_header_errno_h_EOVERFLOW=yes 8495else 8496 gl_cv_header_errno_h_EOVERFLOW=no 8497fi 8498rm -f conftest* 8499 8500 if test $gl_cv_header_errno_h_EOVERFLOW = no; then 8501 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8502/* end confdefs.h. */ 8503 8504#define _XOPEN_SOURCE_EXTENDED 1 8505#include <errno.h> 8506#ifdef EOVERFLOW 8507yes 8508#endif 8509 8510_ACEOF 8511if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 8512 $EGREP "yes" >/dev/null 2>&1; then : 8513 gl_cv_header_errno_h_EOVERFLOW=hidden 8514fi 8515rm -f conftest* 8516 8517 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then 8518 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" " 8519#define _XOPEN_SOURCE_EXTENDED 1 8520#include <errno.h> 8521/* The following two lines are a workaround against an autoconf-2.52 bug. */ 8522#include <stdio.h> 8523#include <stdlib.h> 8524"; then : 8525 8526fi 8527 8528 fi 8529 fi 8530 8531fi 8532{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5 8533$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; } 8534 case $gl_cv_header_errno_h_EOVERFLOW in 8535 yes | no) 8536 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE= 8537 ;; 8538 *) 8539 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW" 8540 ;; 8541 esac 8542 8543 8544 fi 8545 8546 8547ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" 8548if test "x$ac_cv_have_decl_strerror_r" = xyes; then : 8549 ac_have_decl=1 8550else 8551 ac_have_decl=0 8552fi 8553 8554cat >>confdefs.h <<_ACEOF 8555#define HAVE_DECL_STRERROR_R $ac_have_decl 8556_ACEOF 8557 8558for ac_func in strerror_r 8559do : 8560 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" 8561if test "x$ac_cv_func_strerror_r" = xyes; then : 8562 cat >>confdefs.h <<_ACEOF 8563#define HAVE_STRERROR_R 1 8564_ACEOF 8565 8566fi 8567done 8568 8569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 8570$as_echo_n "checking whether strerror_r returns char *... " >&6; } 8571if ${ac_cv_func_strerror_r_char_p+:} false; then : 8572 $as_echo_n "(cached) " >&6 8573else 8574 8575 ac_cv_func_strerror_r_char_p=no 8576 if test $ac_cv_have_decl_strerror_r = yes; then 8577 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8578/* end confdefs.h. */ 8579$ac_includes_default 8580int 8581main () 8582{ 8583 8584 char buf[100]; 8585 char x = *strerror_r (0, buf, sizeof buf); 8586 char *p = strerror_r (0, buf, sizeof buf); 8587 return !p || x; 8588 8589 ; 8590 return 0; 8591} 8592_ACEOF 8593if ac_fn_c_try_compile "$LINENO"; then : 8594 ac_cv_func_strerror_r_char_p=yes 8595fi 8596rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8597 else 8598 # strerror_r is not declared. Choose between 8599 # systems that have relatively inaccessible declarations for the 8600 # function. BeOS and DEC UNIX 4.0 fall in this category, but the 8601 # former has a strerror_r that returns char*, while the latter 8602 # has a strerror_r that returns `int'. 8603 # This test should segfault on the DEC system. 8604 if test "$cross_compiling" = yes; then : 8605 : 8606else 8607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8608/* end confdefs.h. */ 8609$ac_includes_default 8610 extern char *strerror_r (); 8611int 8612main () 8613{ 8614char buf[100]; 8615 char x = *strerror_r (0, buf, sizeof buf); 8616 return ! isalpha (x); 8617 ; 8618 return 0; 8619} 8620_ACEOF 8621if ac_fn_c_try_run "$LINENO"; then : 8622 ac_cv_func_strerror_r_char_p=yes 8623fi 8624rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 8625 conftest.$ac_objext conftest.beam conftest.$ac_ext 8626fi 8627 8628 fi 8629 8630fi 8631{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 8632$as_echo "$ac_cv_func_strerror_r_char_p" >&6; } 8633if test $ac_cv_func_strerror_r_char_p = yes; then 8634 8635$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h 8636 8637fi 8638 8639 8640 XGETTEXT_EXTRA_OPTIONS= 8641 8642 8643 8644 8645ac_fn_c_check_decl "$LINENO" "fchdir" "ac_cv_have_decl_fchdir" "$ac_includes_default" 8646if test "x$ac_cv_have_decl_fchdir" = xyes; then : 8647 ac_have_decl=1 8648else 8649 ac_have_decl=0 8650fi 8651 8652cat >>confdefs.h <<_ACEOF 8653#define HAVE_DECL_FCHDIR $ac_have_decl 8654_ACEOF 8655 8656 8657 GNULIB_CREAT=0; 8658 GNULIB_FCNTL=0; 8659 GNULIB_NONBLOCKING=0; 8660 GNULIB_OPEN=0; 8661 GNULIB_OPENAT=0; 8662 HAVE_FCNTL=1; 8663 HAVE_OPENAT=1; 8664 REPLACE_CREAT=0; 8665 REPLACE_FCNTL=0; 8666 REPLACE_OPEN=0; 8667 REPLACE_OPENAT=0; 8668 8669 8670 8671 8672 8673 8674 8675 8676 8677 8678 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 8679$as_echo_n "checking for working fcntl.h... " >&6; } 8680if ${gl_cv_header_working_fcntl_h+:} false; then : 8681 $as_echo_n "(cached) " >&6 8682else 8683 if test "$cross_compiling" = yes; then : 8684 case "$host_os" in 8685 # Guess 'no' on native Windows. 8686 mingw*) gl_cv_header_working_fcntl_h='no' ;; 8687 *) gl_cv_header_working_fcntl_h=cross-compiling ;; 8688 esac 8689 8690else 8691 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8692/* end confdefs.h. */ 8693#include <sys/types.h> 8694 #include <sys/stat.h> 8695 #if HAVE_UNISTD_H 8696 # include <unistd.h> 8697 #else /* on Windows with MSVC */ 8698 # include <io.h> 8699 # include <stdlib.h> 8700 # defined sleep(n) _sleep ((n) * 1000) 8701 #endif 8702 #include <fcntl.h> 8703 #ifndef O_NOATIME 8704 #define O_NOATIME 0 8705 #endif 8706 #ifndef O_NOFOLLOW 8707 #define O_NOFOLLOW 0 8708 #endif 8709 static int const constants[] = 8710 { 8711 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, 8712 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY 8713 }; 8714 8715int 8716main () 8717{ 8718 8719 int result = !constants; 8720 #if HAVE_SYMLINK 8721 { 8722 static char const sym[] = "conftest.sym"; 8723 if (symlink ("/dev/null", sym) != 0) 8724 result |= 2; 8725 else 8726 { 8727 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0); 8728 if (fd >= 0) 8729 { 8730 close (fd); 8731 result |= 4; 8732 } 8733 } 8734 if (unlink (sym) != 0 || symlink (".", sym) != 0) 8735 result |= 2; 8736 else 8737 { 8738 int fd = open (sym, O_RDONLY | O_NOFOLLOW); 8739 if (fd >= 0) 8740 { 8741 close (fd); 8742 result |= 4; 8743 } 8744 } 8745 unlink (sym); 8746 } 8747 #endif 8748 { 8749 static char const file[] = "confdefs.h"; 8750 int fd = open (file, O_RDONLY | O_NOATIME); 8751 if (fd < 0) 8752 result |= 8; 8753 else 8754 { 8755 struct stat st0; 8756 if (fstat (fd, &st0) != 0) 8757 result |= 16; 8758 else 8759 { 8760 char c; 8761 sleep (1); 8762 if (read (fd, &c, 1) != 1) 8763 result |= 24; 8764 else 8765 { 8766 if (close (fd) != 0) 8767 result |= 32; 8768 else 8769 { 8770 struct stat st1; 8771 if (stat (file, &st1) != 0) 8772 result |= 40; 8773 else 8774 if (st0.st_atime != st1.st_atime) 8775 result |= 64; 8776 } 8777 } 8778 } 8779 } 8780 } 8781 return result; 8782 ; 8783 return 0; 8784} 8785_ACEOF 8786if ac_fn_c_try_run "$LINENO"; then : 8787 gl_cv_header_working_fcntl_h=yes 8788else 8789 case $? in #( 8790 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( 8791 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( 8792 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( 8793 *) gl_cv_header_working_fcntl_h='no';; 8794 esac 8795fi 8796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 8797 conftest.$ac_objext conftest.beam conftest.$ac_ext 8798fi 8799 8800 8801fi 8802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5 8803$as_echo "$gl_cv_header_working_fcntl_h" >&6; } 8804 8805 case $gl_cv_header_working_fcntl_h in #( 8806 *O_NOATIME* | no | cross-compiling) ac_val=0;; #( 8807 *) ac_val=1;; 8808 esac 8809 8810cat >>confdefs.h <<_ACEOF 8811#define HAVE_WORKING_O_NOATIME $ac_val 8812_ACEOF 8813 8814 8815 case $gl_cv_header_working_fcntl_h in #( 8816 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( 8817 *) ac_val=1;; 8818 esac 8819 8820cat >>confdefs.h <<_ACEOF 8821#define HAVE_WORKING_O_NOFOLLOW $ac_val 8822_ACEOF 8823 8824 8825ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" 8826if test "x$ac_cv_type_pid_t" = xyes; then : 8827 8828else 8829 8830cat >>confdefs.h <<_ACEOF 8831#define pid_t int 8832_ACEOF 8833 8834fi 8835 8836ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" 8837if test "x$ac_cv_type_mode_t" = xyes; then : 8838 8839else 8840 8841cat >>confdefs.h <<_ACEOF 8842#define mode_t int 8843_ACEOF 8844 8845fi 8846 8847 8848 8849 8850 8851 8852 GNULIB_FNMATCH=0; 8853 HAVE_FNMATCH=1; 8854 REPLACE_FNMATCH=0; 8855 8856 8857 8858 8859 8860 8861 8862 8863 8864 8865 8866 8867 8868 8869 8870 8871 if test $gl_cv_have_include_next = yes; then 8872 gl_cv_next_fnmatch_h='<'fnmatch.h'>' 8873 else 8874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fnmatch.h>" >&5 8875$as_echo_n "checking absolute name of <fnmatch.h>... " >&6; } 8876if ${gl_cv_next_fnmatch_h+:} false; then : 8877 $as_echo_n "(cached) " >&6 8878else 8879 8880 if test $ac_cv_header_fnmatch_h = yes; then 8881 8882 8883 8884 8885 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8886/* end confdefs.h. */ 8887#include <fnmatch.h> 8888_ACEOF 8889 case "$host_os" in 8890 aix*) gl_absname_cpp="$ac_cpp -C" ;; 8891 *) gl_absname_cpp="$ac_cpp" ;; 8892 esac 8893 8894 case "$host_os" in 8895 mingw*) 8896 gl_dirsep_regex='[/\\]' 8897 ;; 8898 *) 8899 gl_dirsep_regex='\/' 8900 ;; 8901 esac 8902 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 8903 gl_header_literal_regex=`echo 'fnmatch.h' \ 8904 | sed -e "$gl_make_literal_regex_sed"` 8905 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 8906 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 8907 s|^/[^/]|//&| 8908 p 8909 q 8910 }' 8911 8912 gl_cv_absolute_fnmatch_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 8913 sed -n "$gl_absolute_header_sed"` 8914 8915 gl_header=$gl_cv_absolute_fnmatch_h 8916 gl_cv_next_fnmatch_h='"'$gl_header'"' 8917 else 8918 gl_cv_next_fnmatch_h='<'fnmatch.h'>' 8919 fi 8920 8921 8922fi 8923{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fnmatch_h" >&5 8924$as_echo "$gl_cv_next_fnmatch_h" >&6; } 8925 fi 8926 NEXT_FNMATCH_H=$gl_cv_next_fnmatch_h 8927 8928 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 8929 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 8930 gl_next_as_first_directive='<'fnmatch.h'>' 8931 else 8932 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 8933 gl_next_as_first_directive=$gl_cv_next_fnmatch_h 8934 fi 8935 NEXT_AS_FIRST_DIRECTIVE_FNMATCH_H=$gl_next_as_first_directive 8936 8937 8938 8939 8940 8941 8942 8943 if test $ac_cv_header_fnmatch_h = yes; then 8944 HAVE_FNMATCH_H=1 8945 else 8946 HAVE_FNMATCH_H=0 8947 fi 8948 8949 8950 FNMATCH_H='' 8951 if false; then 8952 FNMATCH_H=fnmatch.h 8953 else 8954 if test $ac_cv_header_fnmatch_h != yes; then 8955 FNMATCH_H=fnmatch.h 8956 fi 8957 fi 8958 8959 8960 if test -n "$FNMATCH_H"; then 8961 GL_GENERATE_FNMATCH_H_TRUE= 8962 GL_GENERATE_FNMATCH_H_FALSE='#' 8963else 8964 GL_GENERATE_FNMATCH_H_TRUE='#' 8965 GL_GENERATE_FNMATCH_H_FALSE= 8966fi 8967 8968 8969 8970 8971 8972 8973 8974 8975 8976 8977 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 8978$as_echo_n "checking for mbstate_t... " >&6; } 8979if ${ac_cv_type_mbstate_t+:} false; then : 8980 $as_echo_n "(cached) " >&6 8981else 8982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8983/* end confdefs.h. */ 8984$ac_includes_default 8985/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 8986 <wchar.h>. 8987 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 8988 included before <wchar.h>. */ 8989#include <stddef.h> 8990#include <stdio.h> 8991#include <time.h> 8992#include <wchar.h> 8993int 8994main () 8995{ 8996mbstate_t x; return sizeof x; 8997 ; 8998 return 0; 8999} 9000_ACEOF 9001if ac_fn_c_try_compile "$LINENO"; then : 9002 ac_cv_type_mbstate_t=yes 9003else 9004 ac_cv_type_mbstate_t=no 9005fi 9006rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9007fi 9008{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 9009$as_echo "$ac_cv_type_mbstate_t" >&6; } 9010 if test $ac_cv_type_mbstate_t = yes; then 9011 9012$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h 9013 9014 else 9015 9016$as_echo "#define mbstate_t int" >>confdefs.h 9017 9018 fi 9019 9020 9021 9022 9023 GNULIB_ACOSF=0; 9024 GNULIB_ACOSL=0; 9025 GNULIB_ASINF=0; 9026 GNULIB_ASINL=0; 9027 GNULIB_ATANF=0; 9028 GNULIB_ATANL=0; 9029 GNULIB_ATAN2F=0; 9030 GNULIB_CBRT=0; 9031 GNULIB_CBRTF=0; 9032 GNULIB_CBRTL=0; 9033 GNULIB_CEIL=0; 9034 GNULIB_CEILF=0; 9035 GNULIB_CEILL=0; 9036 GNULIB_COPYSIGN=0; 9037 GNULIB_COPYSIGNF=0; 9038 GNULIB_COPYSIGNL=0; 9039 GNULIB_COSF=0; 9040 GNULIB_COSL=0; 9041 GNULIB_COSHF=0; 9042 GNULIB_EXPF=0; 9043 GNULIB_EXPL=0; 9044 GNULIB_EXP2=0; 9045 GNULIB_EXP2F=0; 9046 GNULIB_EXP2L=0; 9047 GNULIB_EXPM1=0; 9048 GNULIB_EXPM1F=0; 9049 GNULIB_EXPM1L=0; 9050 GNULIB_FABSF=0; 9051 GNULIB_FABSL=0; 9052 GNULIB_FLOOR=0; 9053 GNULIB_FLOORF=0; 9054 GNULIB_FLOORL=0; 9055 GNULIB_FMA=0; 9056 GNULIB_FMAF=0; 9057 GNULIB_FMAL=0; 9058 GNULIB_FMOD=0; 9059 GNULIB_FMODF=0; 9060 GNULIB_FMODL=0; 9061 GNULIB_FREXPF=0; 9062 GNULIB_FREXP=0; 9063 GNULIB_FREXPL=0; 9064 GNULIB_HYPOT=0; 9065 GNULIB_HYPOTF=0; 9066 GNULIB_HYPOTL=0; 9067 GNULIB_ILOGB=0; 9068 GNULIB_ILOGBF=0; 9069 GNULIB_ILOGBL=0; 9070 GNULIB_ISFINITE=0; 9071 GNULIB_ISINF=0; 9072 GNULIB_ISNAN=0; 9073 GNULIB_ISNANF=0; 9074 GNULIB_ISNAND=0; 9075 GNULIB_ISNANL=0; 9076 GNULIB_LDEXPF=0; 9077 GNULIB_LDEXPL=0; 9078 GNULIB_LOG=0; 9079 GNULIB_LOGF=0; 9080 GNULIB_LOGL=0; 9081 GNULIB_LOG10=0; 9082 GNULIB_LOG10F=0; 9083 GNULIB_LOG10L=0; 9084 GNULIB_LOG1P=0; 9085 GNULIB_LOG1PF=0; 9086 GNULIB_LOG1PL=0; 9087 GNULIB_LOG2=0; 9088 GNULIB_LOG2F=0; 9089 GNULIB_LOG2L=0; 9090 GNULIB_LOGB=0; 9091 GNULIB_LOGBF=0; 9092 GNULIB_LOGBL=0; 9093 GNULIB_MODF=0; 9094 GNULIB_MODFF=0; 9095 GNULIB_MODFL=0; 9096 GNULIB_POWF=0; 9097 GNULIB_REMAINDER=0; 9098 GNULIB_REMAINDERF=0; 9099 GNULIB_REMAINDERL=0; 9100 GNULIB_RINT=0; 9101 GNULIB_RINTF=0; 9102 GNULIB_RINTL=0; 9103 GNULIB_ROUND=0; 9104 GNULIB_ROUNDF=0; 9105 GNULIB_ROUNDL=0; 9106 GNULIB_SIGNBIT=0; 9107 GNULIB_SINF=0; 9108 GNULIB_SINL=0; 9109 GNULIB_SINHF=0; 9110 GNULIB_SQRTF=0; 9111 GNULIB_SQRTL=0; 9112 GNULIB_TANF=0; 9113 GNULIB_TANL=0; 9114 GNULIB_TANHF=0; 9115 GNULIB_TRUNC=0; 9116 GNULIB_TRUNCF=0; 9117 GNULIB_TRUNCL=0; 9118 HAVE_ACOSF=1; 9119 HAVE_ACOSL=1; 9120 HAVE_ASINF=1; 9121 HAVE_ASINL=1; 9122 HAVE_ATANF=1; 9123 HAVE_ATANL=1; 9124 HAVE_ATAN2F=1; 9125 HAVE_CBRT=1; 9126 HAVE_CBRTF=1; 9127 HAVE_CBRTL=1; 9128 HAVE_COPYSIGN=1; 9129 HAVE_COPYSIGNL=1; 9130 HAVE_COSF=1; 9131 HAVE_COSL=1; 9132 HAVE_COSHF=1; 9133 HAVE_EXPF=1; 9134 HAVE_EXPL=1; 9135 HAVE_EXPM1=1; 9136 HAVE_EXPM1F=1; 9137 HAVE_FABSF=1; 9138 HAVE_FABSL=1; 9139 HAVE_FMA=1; 9140 HAVE_FMAF=1; 9141 HAVE_FMAL=1; 9142 HAVE_FMODF=1; 9143 HAVE_FMODL=1; 9144 HAVE_FREXPF=1; 9145 HAVE_HYPOTF=1; 9146 HAVE_HYPOTL=1; 9147 HAVE_ILOGB=1; 9148 HAVE_ILOGBF=1; 9149 HAVE_ILOGBL=1; 9150 HAVE_ISNANF=1; 9151 HAVE_ISNAND=1; 9152 HAVE_ISNANL=1; 9153 HAVE_LDEXPF=1; 9154 HAVE_LOGF=1; 9155 HAVE_LOGL=1; 9156 HAVE_LOG10F=1; 9157 HAVE_LOG10L=1; 9158 HAVE_LOG1P=1; 9159 HAVE_LOG1PF=1; 9160 HAVE_LOG1PL=1; 9161 HAVE_LOGBF=1; 9162 HAVE_LOGBL=1; 9163 HAVE_MODFF=1; 9164 HAVE_MODFL=1; 9165 HAVE_POWF=1; 9166 HAVE_REMAINDER=1; 9167 HAVE_REMAINDERF=1; 9168 HAVE_RINT=1; 9169 HAVE_RINTL=1; 9170 HAVE_SINF=1; 9171 HAVE_SINL=1; 9172 HAVE_SINHF=1; 9173 HAVE_SQRTF=1; 9174 HAVE_SQRTL=1; 9175 HAVE_TANF=1; 9176 HAVE_TANL=1; 9177 HAVE_TANHF=1; 9178 HAVE_DECL_ACOSL=1; 9179 HAVE_DECL_ASINL=1; 9180 HAVE_DECL_ATANL=1; 9181 HAVE_DECL_CBRTF=1; 9182 HAVE_DECL_CBRTL=1; 9183 HAVE_DECL_CEILF=1; 9184 HAVE_DECL_CEILL=1; 9185 HAVE_DECL_COPYSIGNF=1; 9186 HAVE_DECL_COSL=1; 9187 HAVE_DECL_EXPL=1; 9188 HAVE_DECL_EXP2=1; 9189 HAVE_DECL_EXP2F=1; 9190 HAVE_DECL_EXP2L=1; 9191 HAVE_DECL_EXPM1L=1; 9192 HAVE_DECL_FLOORF=1; 9193 HAVE_DECL_FLOORL=1; 9194 HAVE_DECL_FREXPL=1; 9195 HAVE_DECL_LDEXPL=1; 9196 HAVE_DECL_LOGL=1; 9197 HAVE_DECL_LOG10L=1; 9198 HAVE_DECL_LOG2=1; 9199 HAVE_DECL_LOG2F=1; 9200 HAVE_DECL_LOG2L=1; 9201 HAVE_DECL_LOGB=1; 9202 HAVE_DECL_REMAINDER=1; 9203 HAVE_DECL_REMAINDERL=1; 9204 HAVE_DECL_RINTF=1; 9205 HAVE_DECL_ROUND=1; 9206 HAVE_DECL_ROUNDF=1; 9207 HAVE_DECL_ROUNDL=1; 9208 HAVE_DECL_SINL=1; 9209 HAVE_DECL_SQRTL=1; 9210 HAVE_DECL_TANL=1; 9211 HAVE_DECL_TRUNC=1; 9212 HAVE_DECL_TRUNCF=1; 9213 HAVE_DECL_TRUNCL=1; 9214 REPLACE_ACOSF=0; 9215 REPLACE_ASINF=0; 9216 REPLACE_ATANF=0; 9217 REPLACE_ATAN2F=0; 9218 REPLACE_CBRTF=0; 9219 REPLACE_CBRTL=0; 9220 REPLACE_CEIL=0; 9221 REPLACE_CEILF=0; 9222 REPLACE_CEILL=0; 9223 REPLACE_COSF=0; 9224 REPLACE_COSHF=0; 9225 REPLACE_EXPF=0; 9226 REPLACE_EXPL=0; 9227 REPLACE_EXPM1=0; 9228 REPLACE_EXPM1F=0; 9229 REPLACE_EXPM1L=0; 9230 REPLACE_EXP2=0; 9231 REPLACE_EXP2L=0; 9232 REPLACE_FABSL=0; 9233 REPLACE_FLOOR=0; 9234 REPLACE_FLOORF=0; 9235 REPLACE_FLOORL=0; 9236 REPLACE_FMA=0; 9237 REPLACE_FMAF=0; 9238 REPLACE_FMAL=0; 9239 REPLACE_FMOD=0; 9240 REPLACE_FMODF=0; 9241 REPLACE_FMODL=0; 9242 REPLACE_FREXPF=0; 9243 REPLACE_FREXP=0; 9244 REPLACE_FREXPL=0; 9245 REPLACE_HUGE_VAL=0; 9246 REPLACE_HYPOT=0; 9247 REPLACE_HYPOTF=0; 9248 REPLACE_HYPOTL=0; 9249 REPLACE_ILOGB=0; 9250 REPLACE_ILOGBF=0; 9251 REPLACE_ILOGBL=0; 9252 REPLACE_ISFINITE=0; 9253 REPLACE_ISINF=0; 9254 REPLACE_ISNAN=0; 9255 REPLACE_LDEXPL=0; 9256 REPLACE_LOG=0; 9257 REPLACE_LOGF=0; 9258 REPLACE_LOGL=0; 9259 REPLACE_LOG10=0; 9260 REPLACE_LOG10F=0; 9261 REPLACE_LOG10L=0; 9262 REPLACE_LOG1P=0; 9263 REPLACE_LOG1PF=0; 9264 REPLACE_LOG1PL=0; 9265 REPLACE_LOG2=0; 9266 REPLACE_LOG2F=0; 9267 REPLACE_LOG2L=0; 9268 REPLACE_LOGB=0; 9269 REPLACE_LOGBF=0; 9270 REPLACE_LOGBL=0; 9271 REPLACE_MODF=0; 9272 REPLACE_MODFF=0; 9273 REPLACE_MODFL=0; 9274 REPLACE_NAN=0; 9275 REPLACE_REMAINDER=0; 9276 REPLACE_REMAINDERF=0; 9277 REPLACE_REMAINDERL=0; 9278 REPLACE_RINTL=0; 9279 REPLACE_ROUND=0; 9280 REPLACE_ROUNDF=0; 9281 REPLACE_ROUNDL=0; 9282 REPLACE_SIGNBIT=0; 9283 REPLACE_SIGNBIT_USING_GCC=0; 9284 REPLACE_SINF=0; 9285 REPLACE_SINHF=0; 9286 REPLACE_SQRTF=0; 9287 REPLACE_SQRTL=0; 9288 REPLACE_TANF=0; 9289 REPLACE_TANHF=0; 9290 REPLACE_TRUNC=0; 9291 REPLACE_TRUNCF=0; 9292 REPLACE_TRUNCL=0; 9293 9294 9295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5 9296$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; } 9297if ${gl_cv_func_frexp_no_libm+:} false; then : 9298 $as_echo_n "(cached) " >&6 9299else 9300 9301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9302/* end confdefs.h. */ 9303#include <math.h> 9304 double x; 9305int 9306main () 9307{ 9308int e; return frexp (x, &e) > 0; 9309 ; 9310 return 0; 9311} 9312_ACEOF 9313if ac_fn_c_try_link "$LINENO"; then : 9314 gl_cv_func_frexp_no_libm=yes 9315else 9316 gl_cv_func_frexp_no_libm=no 9317fi 9318rm -f core conftest.err conftest.$ac_objext \ 9319 conftest$ac_exeext conftest.$ac_ext 9320 9321fi 9322{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5 9323$as_echo "$gl_cv_func_frexp_no_libm" >&6; } 9324 9325ac_fn_c_check_decl "$LINENO" "alarm" "ac_cv_have_decl_alarm" "$ac_includes_default" 9326if test "x$ac_cv_have_decl_alarm" = xyes; then : 9327 ac_have_decl=1 9328else 9329 ac_have_decl=0 9330fi 9331 9332cat >>confdefs.h <<_ACEOF 9333#define HAVE_DECL_ALARM $ac_have_decl 9334_ACEOF 9335 9336 9337 9338 9339 FREXP_LIBM= 9340 if test $gl_cv_func_frexp_no_libm = no; then 9341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used with libm" >&5 9342$as_echo_n "checking whether frexp() can be used with libm... " >&6; } 9343if ${gl_cv_func_frexp_in_libm+:} false; then : 9344 $as_echo_n "(cached) " >&6 9345else 9346 9347 save_LIBS="$LIBS" 9348 LIBS="$LIBS -lm" 9349 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9350/* end confdefs.h. */ 9351#include <math.h> 9352 double x; 9353int 9354main () 9355{ 9356int e; return frexp (x, &e) > 0; 9357 ; 9358 return 0; 9359} 9360_ACEOF 9361if ac_fn_c_try_link "$LINENO"; then : 9362 gl_cv_func_frexp_in_libm=yes 9363else 9364 gl_cv_func_frexp_in_libm=no 9365fi 9366rm -f core conftest.err conftest.$ac_objext \ 9367 conftest$ac_exeext conftest.$ac_ext 9368 LIBS="$save_LIBS" 9369 9370fi 9371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_in_libm" >&5 9372$as_echo "$gl_cv_func_frexp_in_libm" >&6; } 9373 if test $gl_cv_func_frexp_in_libm = yes; then 9374 FREXP_LIBM=-lm 9375 fi 9376 fi 9377 if test $gl_cv_func_frexp_no_libm = yes \ 9378 || test $gl_cv_func_frexp_in_libm = yes; then 9379 save_LIBS="$LIBS" 9380 LIBS="$LIBS $FREXP_LIBM" 9381 9382 9383 9384 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5 9385$as_echo_n "checking whether frexp works... " >&6; } 9386if ${gl_cv_func_frexp_works+:} false; then : 9387 $as_echo_n "(cached) " >&6 9388else 9389 9390 if test "$cross_compiling" = yes; then : 9391 case "$host_os" in 9392 netbsd*) gl_cv_func_frexp_works="guessing yes" ;; 9393 irix*) gl_cv_func_frexp_works="guessing no" ;; 9394 mingw*) # Guess yes with MSVC, no with mingw. 9395 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9396/* end confdefs.h. */ 9397 9398#ifdef _MSC_VER 9399 Good 9400#endif 9401 9402_ACEOF 9403if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 9404 $EGREP "Good" >/dev/null 2>&1; then : 9405 gl_cv_func_frexp_works="guessing yes" 9406else 9407 gl_cv_func_frexp_works="guessing no" 9408fi 9409rm -f conftest* 9410 9411 ;; 9412 *) gl_cv_func_frexp_works="guessing yes" ;; 9413 esac 9414 9415else 9416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9417/* end confdefs.h. */ 9418 9419#include <float.h> 9420#include <math.h> 9421#include <string.h> 9422#if HAVE_DECL_ALARM 9423# include <signal.h> 9424# include <unistd.h> 9425#endif 9426/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. 9427 ICC 10.0 has a bug when optimizing the expression -zero. 9428 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling 9429 to PowerPC on Mac OS X 10.5. */ 9430#if defined __hpux || defined __sgi || defined __ICC 9431static double 9432compute_minus_zero (void) 9433{ 9434 return -DBL_MIN * DBL_MIN; 9435} 9436# define minus_zero compute_minus_zero () 9437#else 9438double minus_zero = -0.0; 9439#endif 9440int main() 9441{ 9442 int result = 0; 9443 int i; 9444 volatile double x; 9445 double zero = 0.0; 9446#if HAVE_DECL_ALARM 9447 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite 9448 number. Let the test fail in this case. */ 9449 signal (SIGALRM, SIG_DFL); 9450 alarm (5); 9451#endif 9452 /* Test on denormalized numbers. */ 9453 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) 9454 ; 9455 if (x > 0.0) 9456 { 9457 int exp; 9458 double y = frexp (x, &exp); 9459 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022. 9460 On NetBSD: y = 0.75. Correct: y = 0.5. */ 9461 if (y != 0.5) 9462 result |= 1; 9463 } 9464 /* Test on infinite numbers. */ 9465 x = 1.0 / zero; 9466 { 9467 int exp; 9468 double y = frexp (x, &exp); 9469 if (y != x) 9470 result |= 2; 9471 } 9472 /* Test on negative zero. */ 9473 x = minus_zero; 9474 { 9475 int exp; 9476 double y = frexp (x, &exp); 9477 if (memcmp (&y, &x, sizeof x)) 9478 result |= 4; 9479 } 9480 return result; 9481} 9482_ACEOF 9483if ac_fn_c_try_run "$LINENO"; then : 9484 gl_cv_func_frexp_works=yes 9485else 9486 gl_cv_func_frexp_works=no 9487fi 9488rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 9489 conftest.$ac_objext conftest.beam conftest.$ac_ext 9490fi 9491 9492 9493fi 9494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5 9495$as_echo "$gl_cv_func_frexp_works" >&6; } 9496 9497 LIBS="$save_LIBS" 9498 case "$gl_cv_func_frexp_works" in 9499 *yes) gl_func_frexp=yes ;; 9500 *) gl_func_frexp=no; REPLACE_FREXP=1; FREXP_LIBM= ;; 9501 esac 9502 else 9503 gl_func_frexp=no 9504 fi 9505 if test $gl_func_frexp = yes; then 9506 9507$as_echo "#define HAVE_FREXP 1" >>confdefs.h 9508 9509 fi 9510 9511 9512 9513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5 9514$as_echo_n "checking whether long double and double are the same... " >&6; } 9515if ${gl_cv_long_double_equals_double+:} false; then : 9516 $as_echo_n "(cached) " >&6 9517else 9518 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9519/* end confdefs.h. */ 9520#include <float.h> 9521int 9522main () 9523{ 9524typedef int check[sizeof (long double) == sizeof (double) 9525 && LDBL_MANT_DIG == DBL_MANT_DIG 9526 && LDBL_MAX_EXP == DBL_MAX_EXP 9527 && LDBL_MIN_EXP == DBL_MIN_EXP 9528 ? 1 : -1]; 9529 9530 ; 9531 return 0; 9532} 9533_ACEOF 9534if ac_fn_c_try_compile "$LINENO"; then : 9535 gl_cv_long_double_equals_double=yes 9536else 9537 gl_cv_long_double_equals_double=no 9538fi 9539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9540 9541fi 9542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5 9543$as_echo "$gl_cv_long_double_equals_double" >&6; } 9544 if test $gl_cv_long_double_equals_double = yes; then 9545 9546$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h 9547 9548 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1 9549 else 9550 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0 9551 fi 9552 9553 9554 9555 9556 9557 9558 9559 9560 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h> 9561" 9562if test "x$ac_cv_have_decl_frexpl" = xyes; then : 9563 9564else 9565 HAVE_DECL_FREXPL=0 9566fi 9567 9568 9569 FREXPL_LIBM= 9570 if test $HAVE_DECL_FREXPL = 1; then 9571 9572 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5 9573$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; } 9574if ${gl_cv_func_frexpl_no_libm+:} false; then : 9575 $as_echo_n "(cached) " >&6 9576else 9577 9578 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9579/* end confdefs.h. */ 9580#include <math.h> 9581 long double x; 9582int 9583main () 9584{ 9585int e; return frexpl (x, &e) > 0; 9586 ; 9587 return 0; 9588} 9589_ACEOF 9590if ac_fn_c_try_link "$LINENO"; then : 9591 gl_cv_func_frexpl_no_libm=yes 9592else 9593 gl_cv_func_frexpl_no_libm=no 9594fi 9595rm -f core conftest.err conftest.$ac_objext \ 9596 conftest$ac_exeext conftest.$ac_ext 9597 9598fi 9599{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5 9600$as_echo "$gl_cv_func_frexpl_no_libm" >&6; } 9601 9602 if test $gl_cv_func_frexpl_no_libm = no; then 9603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used with libm" >&5 9604$as_echo_n "checking whether frexpl() can be used with libm... " >&6; } 9605if ${gl_cv_func_frexpl_in_libm+:} false; then : 9606 $as_echo_n "(cached) " >&6 9607else 9608 9609 save_LIBS="$LIBS" 9610 LIBS="$LIBS -lm" 9611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9612/* end confdefs.h. */ 9613#include <math.h> 9614 long double x; 9615int 9616main () 9617{ 9618int e; return frexpl (x, &e) > 0; 9619 ; 9620 return 0; 9621} 9622_ACEOF 9623if ac_fn_c_try_link "$LINENO"; then : 9624 gl_cv_func_frexpl_in_libm=yes 9625else 9626 gl_cv_func_frexpl_in_libm=no 9627fi 9628rm -f core conftest.err conftest.$ac_objext \ 9629 conftest$ac_exeext conftest.$ac_ext 9630 LIBS="$save_LIBS" 9631 9632fi 9633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_in_libm" >&5 9634$as_echo "$gl_cv_func_frexpl_in_libm" >&6; } 9635 if test $gl_cv_func_frexpl_in_libm = yes; then 9636 FREXPL_LIBM=-lm 9637 fi 9638 fi 9639 if test $gl_cv_func_frexpl_no_libm = yes \ 9640 || test $gl_cv_func_frexpl_in_libm = yes; then 9641 save_LIBS="$LIBS" 9642 LIBS="$LIBS $FREXPL_LIBM" 9643 9644 9645 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5 9646$as_echo_n "checking whether frexpl works... " >&6; } 9647if ${gl_cv_func_frexpl_works+:} false; then : 9648 $as_echo_n "(cached) " >&6 9649else 9650 9651 if test "$cross_compiling" = yes; then : 9652 9653 case "$host_os" in 9654 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*) 9655 gl_cv_func_frexpl_works="guessing no";; 9656 *) gl_cv_func_frexpl_works="guessing yes";; 9657 esac 9658 9659else 9660 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9661/* end confdefs.h. */ 9662 9663#include <float.h> 9664#include <math.h> 9665/* Override the values of <float.h>, like done in float.in.h. */ 9666#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) 9667# undef LDBL_MIN_EXP 9668# define LDBL_MIN_EXP (-16381) 9669#endif 9670#if defined __i386__ && (defined __FreeBSD__ || defined __DragonFly__) 9671# undef LDBL_MIN_EXP 9672# define LDBL_MIN_EXP (-16381) 9673#endif 9674#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__ 9675# undef LDBL_MIN_EXP 9676# define LDBL_MIN_EXP DBL_MIN_EXP 9677#endif 9678#if defined __sgi && (LDBL_MANT_DIG >= 106) 9679# if defined __GNUC__ 9680# undef LDBL_MIN_EXP 9681# define LDBL_MIN_EXP DBL_MIN_EXP 9682# endif 9683#endif 9684extern 9685#ifdef __cplusplus 9686"C" 9687#endif 9688long double frexpl (long double, int *); 9689int main() 9690{ 9691 int result = 0; 9692 volatile long double x; 9693 /* Test on finite numbers that fails on AIX 5.1. */ 9694 x = 16.0L; 9695 { 9696 int exp = -9999; 9697 frexpl (x, &exp); 9698 if (exp != 5) 9699 result |= 1; 9700 } 9701 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl 9702 function returns an invalid (incorrectly normalized) value: it returns 9703 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 } 9704 but the correct result is 9705 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */ 9706 x = 1.01L; 9707 { 9708 int exp = -9999; 9709 long double y = frexpl (x, &exp); 9710 if (!(exp == 1 && y == 0.505L)) 9711 result |= 2; 9712 } 9713 /* Test on large finite numbers. This fails on BeOS at i = 16322, while 9714 LDBL_MAX_EXP = 16384. 9715 In the loop end test, we test x against Infinity, rather than comparing 9716 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */ 9717 { 9718 int i; 9719 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L) 9720 { 9721 int exp = -9999; 9722 frexpl (x, &exp); 9723 if (exp != i) 9724 { 9725 result |= 4; 9726 break; 9727 } 9728 } 9729 } 9730 /* Test on denormalized numbers. */ 9731 { 9732 int i; 9733 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L) 9734 ; 9735 if (x > 0.0L) 9736 { 9737 int exp; 9738 long double y = frexpl (x, &exp); 9739 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932, 9740 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */ 9741 if (exp != LDBL_MIN_EXP - 1) 9742 result |= 8; 9743 } 9744 } 9745 /* Test on infinite numbers. */ 9746 x = 1.0L / 0.0L; 9747 { 9748 int exp; 9749 long double y = frexpl (x, &exp); 9750 if (y != x) 9751 result |= 16; 9752 } 9753 return result; 9754} 9755_ACEOF 9756if ac_fn_c_try_run "$LINENO"; then : 9757 gl_cv_func_frexpl_works=yes 9758else 9759 gl_cv_func_frexpl_works=no 9760fi 9761rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 9762 conftest.$ac_objext conftest.beam conftest.$ac_ext 9763fi 9764 9765 9766fi 9767{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5 9768$as_echo "$gl_cv_func_frexpl_works" >&6; } 9769 9770 LIBS="$save_LIBS" 9771 case "$gl_cv_func_frexpl_works" in 9772 *yes) gl_func_frexpl=yes ;; 9773 *) gl_func_frexpl=no; REPLACE_FREXPL=1 ;; 9774 esac 9775 else 9776 gl_func_frexpl=no 9777 fi 9778 if test $gl_func_frexpl = yes; then 9779 9780$as_echo "#define HAVE_FREXPL 1" >>confdefs.h 9781 9782 fi 9783 fi 9784 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then 9785 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then 9786 9787 FREXPL_LIBM="$FREXP_LIBM" 9788 else 9789 FREXPL_LIBM= 9790 fi 9791 fi 9792 9793 9794 9795 GNULIB_FCHMODAT=0; 9796 GNULIB_FSTAT=0; 9797 GNULIB_FSTATAT=0; 9798 GNULIB_FUTIMENS=0; 9799 GNULIB_LCHMOD=0; 9800 GNULIB_LSTAT=0; 9801 GNULIB_MKDIRAT=0; 9802 GNULIB_MKFIFO=0; 9803 GNULIB_MKFIFOAT=0; 9804 GNULIB_MKNOD=0; 9805 GNULIB_MKNODAT=0; 9806 GNULIB_STAT=0; 9807 GNULIB_UTIMENSAT=0; 9808 GNULIB_OVERRIDES_STRUCT_STAT=0; 9809 HAVE_FCHMODAT=1; 9810 HAVE_FSTATAT=1; 9811 HAVE_FUTIMENS=1; 9812 HAVE_LCHMOD=1; 9813 HAVE_LSTAT=1; 9814 HAVE_MKDIRAT=1; 9815 HAVE_MKFIFO=1; 9816 HAVE_MKFIFOAT=1; 9817 HAVE_MKNOD=1; 9818 HAVE_MKNODAT=1; 9819 HAVE_UTIMENSAT=1; 9820 REPLACE_FCHMODAT=0; 9821 REPLACE_FSTAT=0; 9822 REPLACE_FSTATAT=0; 9823 REPLACE_FUTIMENS=0; 9824 REPLACE_LSTAT=0; 9825 REPLACE_MKDIR=0; 9826 REPLACE_MKFIFO=0; 9827 REPLACE_MKNOD=0; 9828 REPLACE_STAT=0; 9829 REPLACE_UTIMENSAT=0; 9830 9831{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 9832$as_echo_n "checking whether stat file-mode macros are broken... " >&6; } 9833if ${ac_cv_header_stat_broken+:} false; then : 9834 $as_echo_n "(cached) " >&6 9835else 9836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9837/* end confdefs.h. */ 9838#include <sys/types.h> 9839#include <sys/stat.h> 9840 9841#if defined S_ISBLK && defined S_IFDIR 9842extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; 9843#endif 9844 9845#if defined S_ISBLK && defined S_IFCHR 9846extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; 9847#endif 9848 9849#if defined S_ISLNK && defined S_IFREG 9850extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; 9851#endif 9852 9853#if defined S_ISSOCK && defined S_IFREG 9854extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; 9855#endif 9856 9857_ACEOF 9858if ac_fn_c_try_compile "$LINENO"; then : 9859 ac_cv_header_stat_broken=no 9860else 9861 ac_cv_header_stat_broken=yes 9862fi 9863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9864fi 9865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 9866$as_echo "$ac_cv_header_stat_broken" >&6; } 9867if test $ac_cv_header_stat_broken = yes; then 9868 9869$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h 9870 9871fi 9872 9873 9874 9875 9876 9877 case "$host_os" in 9878 mingw*) 9879 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5 9880$as_echo_n "checking for 64-bit off_t... " >&6; } 9881if ${gl_cv_type_off_t_64+:} false; then : 9882 $as_echo_n "(cached) " >&6 9883else 9884 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9885/* end confdefs.h. */ 9886#include <sys/types.h> 9887 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1]; 9888 9889int 9890main () 9891{ 9892 9893 ; 9894 return 0; 9895} 9896_ACEOF 9897if ac_fn_c_try_compile "$LINENO"; then : 9898 gl_cv_type_off_t_64=yes 9899else 9900 gl_cv_type_off_t_64=no 9901fi 9902rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9903 9904fi 9905{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5 9906$as_echo "$gl_cv_type_off_t_64" >&6; } 9907 if test $gl_cv_type_off_t_64 = no; then 9908 WINDOWS_64_BIT_OFF_T=1 9909 else 9910 WINDOWS_64_BIT_OFF_T=0 9911 fi 9912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit st_size" >&5 9913$as_echo_n "checking for 64-bit st_size... " >&6; } 9914if ${gl_cv_member_st_size_64+:} false; then : 9915 $as_echo_n "(cached) " >&6 9916else 9917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9918/* end confdefs.h. */ 9919#include <sys/types.h> 9920 struct stat buf; 9921 int verify_st_size_size[sizeof (buf.st_size) >= 8 ? 1 : -1]; 9922 9923int 9924main () 9925{ 9926 9927 ; 9928 return 0; 9929} 9930_ACEOF 9931if ac_fn_c_try_compile "$LINENO"; then : 9932 gl_cv_member_st_size_64=yes 9933else 9934 gl_cv_member_st_size_64=no 9935fi 9936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9937 9938fi 9939{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_member_st_size_64" >&5 9940$as_echo "$gl_cv_member_st_size_64" >&6; } 9941 if test $gl_cv_member_st_size_64 = no; then 9942 WINDOWS_64_BIT_ST_SIZE=1 9943 else 9944 WINDOWS_64_BIT_ST_SIZE=0 9945 fi 9946 ;; 9947 *) 9948 WINDOWS_64_BIT_OFF_T=0 9949 WINDOWS_64_BIT_ST_SIZE=0 9950 ;; 9951 esac 9952 9953{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 9954$as_echo_n "checking for C/C++ restrict keyword... " >&6; } 9955if ${ac_cv_c_restrict+:} false; then : 9956 $as_echo_n "(cached) " >&6 9957else 9958 ac_cv_c_restrict=no 9959 # The order here caters to the fact that C++ does not require restrict. 9960 for ac_kw in __restrict __restrict__ _Restrict restrict; do 9961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9962/* end confdefs.h. */ 9963typedef int *int_ptr; 9964 int foo (int_ptr $ac_kw ip) { return ip[0]; } 9965 int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ 9966 int bar (int ip[$ac_kw]) { return ip[0]; } 9967 9968int 9969main () 9970{ 9971int s[1]; 9972 int *$ac_kw t = s; 9973 t[0] = 0; 9974 return foo (t) + bar (t); 9975 9976 ; 9977 return 0; 9978} 9979_ACEOF 9980if ac_fn_c_try_compile "$LINENO"; then : 9981 ac_cv_c_restrict=$ac_kw 9982fi 9983rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9984 test "$ac_cv_c_restrict" != no && break 9985 done 9986 9987fi 9988{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 9989$as_echo "$ac_cv_c_restrict" >&6; } 9990 9991 case $ac_cv_c_restrict in 9992 restrict) ;; 9993 no) $as_echo "#define restrict /**/" >>confdefs.h 9994 ;; 9995 *) cat >>confdefs.h <<_ACEOF 9996#define restrict $ac_cv_c_restrict 9997_ACEOF 9998 ;; 9999 esac 10000 10001 10002 10003 10004 10005 10006 10007 10008 10009 10010 10011 10012 10013 10014 10015 if test $gl_cv_have_include_next = yes; then 10016 gl_cv_next_sys_stat_h='<'sys/stat.h'>' 10017 else 10018 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5 10019$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; } 10020if ${gl_cv_next_sys_stat_h+:} false; then : 10021 $as_echo_n "(cached) " >&6 10022else 10023 10024 if test $ac_cv_header_sys_stat_h = yes; then 10025 10026 10027 10028 10029 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10030/* end confdefs.h. */ 10031#include <sys/stat.h> 10032_ACEOF 10033 case "$host_os" in 10034 aix*) gl_absname_cpp="$ac_cpp -C" ;; 10035 *) gl_absname_cpp="$ac_cpp" ;; 10036 esac 10037 10038 case "$host_os" in 10039 mingw*) 10040 gl_dirsep_regex='[/\\]' 10041 ;; 10042 *) 10043 gl_dirsep_regex='\/' 10044 ;; 10045 esac 10046 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 10047 gl_header_literal_regex=`echo 'sys/stat.h' \ 10048 | sed -e "$gl_make_literal_regex_sed"` 10049 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 10050 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 10051 s|^/[^/]|//&| 10052 p 10053 q 10054 }' 10055 10056 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 10057 sed -n "$gl_absolute_header_sed"` 10058 10059 gl_header=$gl_cv_absolute_sys_stat_h 10060 gl_cv_next_sys_stat_h='"'$gl_header'"' 10061 else 10062 gl_cv_next_sys_stat_h='<'sys/stat.h'>' 10063 fi 10064 10065 10066fi 10067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 10068$as_echo "$gl_cv_next_sys_stat_h" >&6; } 10069 fi 10070 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h 10071 10072 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 10073 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 10074 gl_next_as_first_directive='<'sys/stat.h'>' 10075 else 10076 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 10077 gl_next_as_first_directive=$gl_cv_next_sys_stat_h 10078 fi 10079 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive 10080 10081 10082 10083 10084 10085 10086 10087 10088 WINDOWS_STAT_TIMESPEC=0 10089 10090 10091 10092 10093 10094 10095 10096 10097 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h> 10098 #include <sys/stat.h> 10099" 10100if test "x$ac_cv_type_nlink_t" = xyes; then : 10101 10102else 10103 10104$as_echo "#define nlink_t int" >>confdefs.h 10105 10106fi 10107 10108 10109 10110 10111 10112 10113 10114 10115 10116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 10117$as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } 10118if ${gl_cv_func_lstat_dereferences_slashed_symlink+:} false; then : 10119 $as_echo_n "(cached) " >&6 10120else 10121 rm -f conftest.sym conftest.file 10122 echo >conftest.file 10123 if test "$cross_compiling" = yes; then : 10124 case "$host_os" in 10125 linux-* | linux) 10126 # Guess yes on Linux systems. 10127 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; 10128 *-gnu* | gnu*) 10129 # Guess yes on glibc systems. 10130 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; 10131 *bsd*) 10132 # Guess yes on bsd systems. 10133 gl_cv_func_lstat_dereferences_slashed_symlink="guessing yes" ;; 10134 mingw*) 10135 # Guess no on native Windows. 10136 gl_cv_func_lstat_dereferences_slashed_symlink="guessing no" ;; 10137 *) 10138 # If we don't know, obey --enable-cross-guesses. 10139 gl_cv_func_lstat_dereferences_slashed_symlink="$gl_cross_guess_normal" ;; 10140 esac 10141 10142else 10143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10144/* end confdefs.h. */ 10145$ac_includes_default 10146int 10147main () 10148{ 10149struct stat sbuf; 10150 if (symlink ("conftest.file", "conftest.sym") != 0) 10151 return 1; 10152 /* Linux will dereference the symlink and fail, as required by 10153 POSIX. That is better in the sense that it means we will not 10154 have to compile and use the lstat wrapper. */ 10155 return lstat ("conftest.sym/", &sbuf) == 0; 10156 10157 ; 10158 return 0; 10159} 10160_ACEOF 10161if ac_fn_c_try_run "$LINENO"; then : 10162 gl_cv_func_lstat_dereferences_slashed_symlink=yes 10163else 10164 gl_cv_func_lstat_dereferences_slashed_symlink=no 10165fi 10166rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 10167 conftest.$ac_objext conftest.beam conftest.$ac_ext 10168fi 10169 10170 rm -f conftest.sym conftest.file 10171 10172fi 10173{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_lstat_dereferences_slashed_symlink" >&5 10174$as_echo "$gl_cv_func_lstat_dereferences_slashed_symlink" >&6; } 10175 case "$gl_cv_func_lstat_dereferences_slashed_symlink" in 10176 *yes) 10177 10178cat >>confdefs.h <<_ACEOF 10179#define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 10180_ACEOF 10181 10182 ;; 10183 esac 10184 10185 10186 10187 10188 10189 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd (NULL, 0) allocates memory for result" >&5 10190$as_echo_n "checking whether getcwd (NULL, 0) allocates memory for result... " >&6; } 10191if ${gl_cv_func_getcwd_null+:} false; then : 10192 $as_echo_n "(cached) " >&6 10193else 10194 if test "$cross_compiling" = yes; then : 10195 case "$host_os" in 10196 # Guess yes on glibc systems. 10197 *-gnu* | gnu*) gl_cv_func_getcwd_null="guessing yes";; 10198 # Guess yes on musl systems. 10199 *-musl*) gl_cv_func_getcwd_null="guessing yes";; 10200 # Guess yes on Cygwin. 10201 cygwin*) gl_cv_func_getcwd_null="guessing yes";; 10202 # If we don't know, obey --enable-cross-guesses. 10203 *) gl_cv_func_getcwd_null="$gl_cross_guess_normal";; 10204 esac 10205 10206else 10207 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10208/* end confdefs.h. */ 10209 10210# include <stdlib.h> 10211# if HAVE_UNISTD_H 10212# include <unistd.h> 10213# else /* on Windows with MSVC */ 10214# include <direct.h> 10215# endif 10216# ifndef getcwd 10217 char *getcwd (); 10218# endif 10219 10220int 10221main () 10222{ 10223 10224#if defined _WIN32 && ! defined __CYGWIN__ 10225/* mingw cwd does not start with '/', but getcwd does allocate. 10226 However, mingw fails to honor non-zero size. */ 10227#else 10228 if (chdir ("/") != 0) 10229 return 1; 10230 else 10231 { 10232 char *f = getcwd (NULL, 0); 10233 if (! f) 10234 return 2; 10235 if (f[0] != '/') 10236 { free (f); return 3; } 10237 if (f[1] != '\0') 10238 { free (f); return 4; } 10239 free (f); 10240 return 0; 10241 } 10242#endif 10243 10244 ; 10245 return 0; 10246} 10247_ACEOF 10248if ac_fn_c_try_run "$LINENO"; then : 10249 gl_cv_func_getcwd_null=yes 10250else 10251 gl_cv_func_getcwd_null=no 10252fi 10253rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 10254 conftest.$ac_objext conftest.beam conftest.$ac_ext 10255fi 10256 10257fi 10258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_null" >&5 10259$as_echo "$gl_cv_func_getcwd_null" >&6; } 10260 10261 10262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getcwd with POSIX signature" >&5 10263$as_echo_n "checking for getcwd with POSIX signature... " >&6; } 10264if ${gl_cv_func_getcwd_posix_signature+:} false; then : 10265 $as_echo_n "(cached) " >&6 10266else 10267 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10268/* end confdefs.h. */ 10269#include <unistd.h> 10270int 10271main () 10272{ 10273extern 10274 #ifdef __cplusplus 10275 "C" 10276 #endif 10277 char *getcwd (char *, size_t); 10278 10279 ; 10280 return 0; 10281} 10282 10283_ACEOF 10284if ac_fn_c_try_compile "$LINENO"; then : 10285 gl_cv_func_getcwd_posix_signature=yes 10286else 10287 gl_cv_func_getcwd_posix_signature=no 10288fi 10289rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10290 10291fi 10292{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_posix_signature" >&5 10293$as_echo "$gl_cv_func_getcwd_posix_signature" >&6; } 10294 10295ac_fn_c_check_decl "$LINENO" "getcwd" "ac_cv_have_decl_getcwd" "$ac_includes_default" 10296if test "x$ac_cv_have_decl_getcwd" = xyes; then : 10297 ac_have_decl=1 10298else 10299 ac_have_decl=0 10300fi 10301 10302cat >>confdefs.h <<_ACEOF 10303#define HAVE_DECL_GETCWD $ac_have_decl 10304_ACEOF 10305 10306 10307 10308ac_fn_c_check_decl "$LINENO" "getdtablesize" "ac_cv_have_decl_getdtablesize" "$ac_includes_default" 10309if test "x$ac_cv_have_decl_getdtablesize" = xyes; then : 10310 ac_have_decl=1 10311else 10312 ac_have_decl=0 10313fi 10314 10315cat >>confdefs.h <<_ACEOF 10316#define HAVE_DECL_GETDTABLESIZE $ac_have_decl 10317_ACEOF 10318 10319ac_fn_c_check_decl "$LINENO" "getlogin_r" "ac_cv_have_decl_getlogin_r" "$ac_includes_default" 10320if test "x$ac_cv_have_decl_getlogin_r" = xyes; then : 10321 ac_have_decl=1 10322else 10323 ac_have_decl=0 10324fi 10325 10326cat >>confdefs.h <<_ACEOF 10327#define HAVE_DECL_GETLOGIN_R $ac_have_decl 10328_ACEOF 10329 10330 10331 10332ac_fn_c_check_decl "$LINENO" "getlogin" "ac_cv_have_decl_getlogin" "$ac_includes_default" 10333if test "x$ac_cv_have_decl_getlogin" = xyes; then : 10334 ac_have_decl=1 10335else 10336 ac_have_decl=0 10337fi 10338 10339cat >>confdefs.h <<_ACEOF 10340#define HAVE_DECL_GETLOGIN $ac_have_decl 10341_ACEOF 10342 10343 10344 10345 case $host_os in 10346 mingw*) 10347 LIB_GETLOGIN='-ladvapi32' ;; 10348 *) 10349 LIB_GETLOGIN= ;; 10350 esac 10351 10352 10353 10354 10355 10356 10357 10358 GNULIB_GETRANDOM=0; 10359 HAVE_GETRANDOM=1; 10360 REPLACE_GETRANDOM=0; 10361 10362 10363 10364 10365 GNULIB_GETTIMEOFDAY=0; 10366 HAVE_GETTIMEOFDAY=1; 10367 HAVE_STRUCT_TIMEVAL=1; 10368 HAVE_SYS_TIME_H=1; 10369 REPLACE_GETTIMEOFDAY=0; 10370 REPLACE_STRUCT_TIMEVAL=0; 10371 10372 10373 10374 10375 10376 10377 10378 10379 10380 10381 10382 10383 10384 10385 10386 10387 if test $gl_cv_have_include_next = yes; then 10388 gl_cv_next_sys_time_h='<'sys/time.h'>' 10389 else 10390 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/time.h>" >&5 10391$as_echo_n "checking absolute name of <sys/time.h>... " >&6; } 10392if ${gl_cv_next_sys_time_h+:} false; then : 10393 $as_echo_n "(cached) " >&6 10394else 10395 10396 if test $ac_cv_header_sys_time_h = yes; then 10397 10398 10399 10400 10401 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10402/* end confdefs.h. */ 10403#include <sys/time.h> 10404_ACEOF 10405 case "$host_os" in 10406 aix*) gl_absname_cpp="$ac_cpp -C" ;; 10407 *) gl_absname_cpp="$ac_cpp" ;; 10408 esac 10409 10410 case "$host_os" in 10411 mingw*) 10412 gl_dirsep_regex='[/\\]' 10413 ;; 10414 *) 10415 gl_dirsep_regex='\/' 10416 ;; 10417 esac 10418 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 10419 gl_header_literal_regex=`echo 'sys/time.h' \ 10420 | sed -e "$gl_make_literal_regex_sed"` 10421 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 10422 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 10423 s|^/[^/]|//&| 10424 p 10425 q 10426 }' 10427 10428 gl_cv_absolute_sys_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 10429 sed -n "$gl_absolute_header_sed"` 10430 10431 gl_header=$gl_cv_absolute_sys_time_h 10432 gl_cv_next_sys_time_h='"'$gl_header'"' 10433 else 10434 gl_cv_next_sys_time_h='<'sys/time.h'>' 10435 fi 10436 10437 10438fi 10439{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_time_h" >&5 10440$as_echo "$gl_cv_next_sys_time_h" >&6; } 10441 fi 10442 NEXT_SYS_TIME_H=$gl_cv_next_sys_time_h 10443 10444 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 10445 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 10446 gl_next_as_first_directive='<'sys/time.h'>' 10447 else 10448 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 10449 gl_next_as_first_directive=$gl_cv_next_sys_time_h 10450 fi 10451 NEXT_AS_FIRST_DIRECTIVE_SYS_TIME_H=$gl_next_as_first_directive 10452 10453 10454 10455 10456 10457 if test $ac_cv_header_sys_time_h != yes; then 10458 HAVE_SYS_TIME_H=0 10459 fi 10460 10461 10462 10463 10464 10465 if test $ac_cv_header_sys_socket_h != yes; then 10466 for ac_header in winsock2.h 10467do : 10468 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" 10469if test "x$ac_cv_header_winsock2_h" = xyes; then : 10470 cat >>confdefs.h <<_ACEOF 10471#define HAVE_WINSOCK2_H 1 10472_ACEOF 10473 10474fi 10475 10476done 10477 10478 fi 10479 if test "$ac_cv_header_winsock2_h" = yes; then 10480 HAVE_WINSOCK2_H=1 10481 UNISTD_H_HAVE_WINSOCK2_H=1 10482 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 10483 else 10484 HAVE_WINSOCK2_H=0 10485 fi 10486 10487 10488 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timeval" >&5 10489$as_echo_n "checking for struct timeval... " >&6; } 10490if ${gl_cv_sys_struct_timeval+:} false; then : 10491 $as_echo_n "(cached) " >&6 10492else 10493 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10494/* end confdefs.h. */ 10495#if HAVE_SYS_TIME_H 10496 #include <sys/time.h> 10497 #endif 10498 #include <time.h> 10499 #if HAVE_WINSOCK2_H 10500 # include <winsock2.h> 10501 #endif 10502 10503int 10504main () 10505{ 10506static struct timeval x; x.tv_sec = x.tv_usec; 10507 ; 10508 return 0; 10509} 10510_ACEOF 10511if ac_fn_c_try_compile "$LINENO"; then : 10512 gl_cv_sys_struct_timeval=yes 10513else 10514 gl_cv_sys_struct_timeval=no 10515fi 10516rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10517 10518fi 10519{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval" >&5 10520$as_echo "$gl_cv_sys_struct_timeval" >&6; } 10521 if test $gl_cv_sys_struct_timeval != yes; then 10522 HAVE_STRUCT_TIMEVAL=0 10523 else 10524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wide-enough struct timeval.tv_sec member" >&5 10525$as_echo_n "checking for wide-enough struct timeval.tv_sec member... " >&6; } 10526if ${gl_cv_sys_struct_timeval_tv_sec+:} false; then : 10527 $as_echo_n "(cached) " >&6 10528else 10529 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10530/* end confdefs.h. */ 10531#if HAVE_SYS_TIME_H 10532 #include <sys/time.h> 10533 #endif 10534 #include <time.h> 10535 #if HAVE_WINSOCK2_H 10536 # include <winsock2.h> 10537 #endif 10538 10539int 10540main () 10541{ 10542static struct timeval x; 10543 typedef int verify_tv_sec_type[ 10544 sizeof (time_t) <= sizeof x.tv_sec ? 1 : -1 10545 ]; 10546 10547 ; 10548 return 0; 10549} 10550_ACEOF 10551if ac_fn_c_try_compile "$LINENO"; then : 10552 gl_cv_sys_struct_timeval_tv_sec=yes 10553else 10554 gl_cv_sys_struct_timeval_tv_sec=no 10555fi 10556rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10557 10558fi 10559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timeval_tv_sec" >&5 10560$as_echo "$gl_cv_sys_struct_timeval_tv_sec" >&6; } 10561 if test $gl_cv_sys_struct_timeval_tv_sec != yes; then 10562 REPLACE_STRUCT_TIMEVAL=1 10563 fi 10564 fi 10565 10566 10567 10568 10569 10570 10571 10572 10573 10574 10575 10576 NEED_LOCALTIME_BUFFER=0 10577 10578 10579 GNULIB_CTIME=0; 10580 GNULIB_MKTIME=0; 10581 GNULIB_LOCALTIME=0; 10582 GNULIB_NANOSLEEP=0; 10583 GNULIB_STRFTIME=0; 10584 GNULIB_STRPTIME=0; 10585 GNULIB_TIMEGM=0; 10586 GNULIB_TIME_R=0; 10587 GNULIB_TIME_RZ=0; 10588 GNULIB_TZSET=0; 10589 HAVE_DECL_LOCALTIME_R=1; 10590 HAVE_NANOSLEEP=1; 10591 HAVE_STRPTIME=1; 10592 HAVE_TIMEGM=1; 10593 HAVE_TZSET=1; 10594 HAVE_TIMEZONE_T=0; 10595 REPLACE_CTIME=GNULIB_PORTCHECK; 10596 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; 10597 REPLACE_MKTIME=GNULIB_PORTCHECK; 10598 REPLACE_NANOSLEEP=GNULIB_PORTCHECK; 10599 REPLACE_STRFTIME=GNULIB_PORTCHECK; 10600 REPLACE_TIMEGM=GNULIB_PORTCHECK; 10601 REPLACE_TZSET=GNULIB_PORTCHECK; 10602 10603 : ${GNULIB_GETTIMEOFDAY=0}; 10604 REPLACE_GMTIME=0; 10605 REPLACE_LOCALTIME=0; 10606 10607 10608 GNULIB_GLOB=0; 10609 HAVE_GLOB=1; 10610 HAVE_GLOB_PATTERN_P=1; 10611 REPLACE_GLOB=0; 10612 REPLACE_GLOB_PATTERN_P=0; 10613 10614 10615 10616 10617 10618 10619 10620 10621 10622 10623 10624 10625 10626 10627 10628 10629 10630 if test $gl_cv_have_include_next = yes; then 10631 gl_cv_next_glob_h='<'glob.h'>' 10632 else 10633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <glob.h>" >&5 10634$as_echo_n "checking absolute name of <glob.h>... " >&6; } 10635if ${gl_cv_next_glob_h+:} false; then : 10636 $as_echo_n "(cached) " >&6 10637else 10638 10639 if test $ac_cv_header_glob_h = yes; then 10640 10641 10642 10643 10644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10645/* end confdefs.h. */ 10646#include <glob.h> 10647_ACEOF 10648 case "$host_os" in 10649 aix*) gl_absname_cpp="$ac_cpp -C" ;; 10650 *) gl_absname_cpp="$ac_cpp" ;; 10651 esac 10652 10653 case "$host_os" in 10654 mingw*) 10655 gl_dirsep_regex='[/\\]' 10656 ;; 10657 *) 10658 gl_dirsep_regex='\/' 10659 ;; 10660 esac 10661 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 10662 gl_header_literal_regex=`echo 'glob.h' \ 10663 | sed -e "$gl_make_literal_regex_sed"` 10664 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 10665 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 10666 s|^/[^/]|//&| 10667 p 10668 q 10669 }' 10670 10671 gl_cv_absolute_glob_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 10672 sed -n "$gl_absolute_header_sed"` 10673 10674 gl_header=$gl_cv_absolute_glob_h 10675 gl_cv_next_glob_h='"'$gl_header'"' 10676 else 10677 gl_cv_next_glob_h='<'glob.h'>' 10678 fi 10679 10680 10681fi 10682{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_glob_h" >&5 10683$as_echo "$gl_cv_next_glob_h" >&6; } 10684 fi 10685 NEXT_GLOB_H=$gl_cv_next_glob_h 10686 10687 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 10688 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 10689 gl_next_as_first_directive='<'glob.h'>' 10690 else 10691 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 10692 gl_next_as_first_directive=$gl_cv_next_glob_h 10693 fi 10694 NEXT_AS_FIRST_DIRECTIVE_GLOB_H=$gl_next_as_first_directive 10695 10696 10697 10698 10699 10700 if test $ac_cv_header_glob_h = yes; then 10701 HAVE_GLOB_H=1 10702 else 10703 HAVE_GLOB_H=0 10704 fi 10705 10706 10707 GLOB_H='' 10708 if false; then 10709 GLOB_H=glob.h 10710 else 10711 if test $ac_cv_header_glob_h != yes; then 10712 GLOB_H=glob.h 10713 fi 10714 fi 10715 10716 10717 if test -n "$GLOB_H"; then 10718 GL_GENERATE_GLOB_H_TRUE= 10719 GL_GENERATE_GLOB_H_FALSE='#' 10720else 10721 GL_GENERATE_GLOB_H_TRUE='#' 10722 GL_GENERATE_GLOB_H_FALSE= 10723fi 10724 10725 10726 10727 10728 10729 10730 10731 10732 10733 10734 10735 10736 10737 10738 10739 10740 if test -z "$gl_pthreadlib_body_done"; then 10741 gl_pthread_api=no 10742 LIBPTHREAD= 10743 LIBPMULTITHREAD= 10744 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that 10745 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY. 10746 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" 10747if test "x$ac_cv_header_pthread_h" = xyes; then : 10748 gl_have_pthread_h=yes 10749else 10750 gl_have_pthread_h=no 10751fi 10752 10753 10754 if test "$gl_have_pthread_h" = yes; then 10755 # Other possible tests: 10756 # -lpthreads (FSU threads, PCthreads) 10757 # -lgthreads 10758 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist 10759 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but 10760 # the second one only in libpthread, and lock.c needs it. 10761 # 10762 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 10763 # needs -pthread for some reason. See: 10764 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html 10765 save_LIBS=$LIBS 10766 for gl_pthread in '' '-pthread'; do 10767 LIBS="$LIBS $gl_pthread" 10768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10769/* end confdefs.h. */ 10770#include <pthread.h> 10771 pthread_mutex_t m; 10772 pthread_mutexattr_t ma; 10773 10774int 10775main () 10776{ 10777pthread_mutex_lock (&m); 10778 pthread_mutexattr_init (&ma); 10779 ; 10780 return 0; 10781} 10782_ACEOF 10783if ac_fn_c_try_link "$LINENO"; then : 10784 gl_pthread_api=yes 10785 LIBPTHREAD=$gl_pthread 10786 LIBPMULTITHREAD=$gl_pthread 10787fi 10788rm -f core conftest.err conftest.$ac_objext \ 10789 conftest$ac_exeext conftest.$ac_ext 10790 LIBS=$save_LIBS 10791 test $gl_pthread_api = yes && break 10792 done 10793 10794 # Test for libpthread by looking for pthread_kill. (Not pthread_self, 10795 # since it is defined as a macro on OSF/1.) 10796 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then 10797 # The program links fine without libpthread. But it may actually 10798 # need to link with libpthread in order to create multiple threads. 10799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 10800$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } 10801if ${ac_cv_lib_pthread_pthread_kill+:} false; then : 10802 $as_echo_n "(cached) " >&6 10803else 10804 ac_check_lib_save_LIBS=$LIBS 10805LIBS="-lpthread $LIBS" 10806cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10807/* end confdefs.h. */ 10808 10809/* Override any GCC internal prototype to avoid an error. 10810 Use char because int might match the return type of a GCC 10811 builtin and then its argument prototype would still apply. */ 10812#ifdef __cplusplus 10813extern "C" 10814#endif 10815char pthread_kill (); 10816int 10817main () 10818{ 10819return pthread_kill (); 10820 ; 10821 return 0; 10822} 10823_ACEOF 10824if ac_fn_c_try_link "$LINENO"; then : 10825 ac_cv_lib_pthread_pthread_kill=yes 10826else 10827 ac_cv_lib_pthread_pthread_kill=no 10828fi 10829rm -f core conftest.err conftest.$ac_objext \ 10830 conftest$ac_exeext conftest.$ac_ext 10831LIBS=$ac_check_lib_save_LIBS 10832fi 10833{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 10834$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } 10835if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : 10836 LIBPMULTITHREAD=-lpthread 10837 # On Solaris and HP-UX, most pthread functions exist also in libc. 10838 # Therefore pthread_in_use() needs to actually try to create a 10839 # thread: pthread_create from libc will fail, whereas 10840 # pthread_create will actually create a thread. 10841 # On Solaris 10 or newer, this test is no longer needed, because 10842 # libc contains the fully functional pthread functions. 10843 case "$host_os" in 10844 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*) 10845 10846$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h 10847 10848 esac 10849 10850fi 10851 10852 elif test $gl_pthread_api != yes; then 10853 # Some library is needed. Try libpthread and libc_r. 10854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 10855$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } 10856if ${ac_cv_lib_pthread_pthread_kill+:} false; then : 10857 $as_echo_n "(cached) " >&6 10858else 10859 ac_check_lib_save_LIBS=$LIBS 10860LIBS="-lpthread $LIBS" 10861cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10862/* end confdefs.h. */ 10863 10864/* Override any GCC internal prototype to avoid an error. 10865 Use char because int might match the return type of a GCC 10866 builtin and then its argument prototype would still apply. */ 10867#ifdef __cplusplus 10868extern "C" 10869#endif 10870char pthread_kill (); 10871int 10872main () 10873{ 10874return pthread_kill (); 10875 ; 10876 return 0; 10877} 10878_ACEOF 10879if ac_fn_c_try_link "$LINENO"; then : 10880 ac_cv_lib_pthread_pthread_kill=yes 10881else 10882 ac_cv_lib_pthread_pthread_kill=no 10883fi 10884rm -f core conftest.err conftest.$ac_objext \ 10885 conftest$ac_exeext conftest.$ac_ext 10886LIBS=$ac_check_lib_save_LIBS 10887fi 10888{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 10889$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } 10890if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : 10891 gl_pthread_api=yes 10892 LIBPTHREAD=-lpthread 10893 LIBPMULTITHREAD=-lpthread 10894fi 10895 10896 if test $gl_pthread_api != yes; then 10897 # For FreeBSD 4. 10898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 10899$as_echo_n "checking for pthread_kill in -lc_r... " >&6; } 10900if ${ac_cv_lib_c_r_pthread_kill+:} false; then : 10901 $as_echo_n "(cached) " >&6 10902else 10903 ac_check_lib_save_LIBS=$LIBS 10904LIBS="-lc_r $LIBS" 10905cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10906/* end confdefs.h. */ 10907 10908/* Override any GCC internal prototype to avoid an error. 10909 Use char because int might match the return type of a GCC 10910 builtin and then its argument prototype would still apply. */ 10911#ifdef __cplusplus 10912extern "C" 10913#endif 10914char pthread_kill (); 10915int 10916main () 10917{ 10918return pthread_kill (); 10919 ; 10920 return 0; 10921} 10922_ACEOF 10923if ac_fn_c_try_link "$LINENO"; then : 10924 ac_cv_lib_c_r_pthread_kill=yes 10925else 10926 ac_cv_lib_c_r_pthread_kill=no 10927fi 10928rm -f core conftest.err conftest.$ac_objext \ 10929 conftest$ac_exeext conftest.$ac_ext 10930LIBS=$ac_check_lib_save_LIBS 10931fi 10932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 10933$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } 10934if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then : 10935 gl_pthread_api=yes 10936 LIBPTHREAD=-lc_r 10937 LIBPMULTITHREAD=-lc_r 10938fi 10939 10940 fi 10941 fi 10942 fi 10943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5 10944$as_echo_n "checking whether POSIX threads API is available... " >&6; } 10945 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5 10946$as_echo "$gl_pthread_api" >&6; } 10947 10948 10949 if test $gl_pthread_api = yes; then 10950 10951$as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h 10952 10953 fi 10954 10955 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10956/* end confdefs.h. */ 10957#include <sched.h> 10958int 10959main () 10960{ 10961sched_yield (); 10962 ; 10963 return 0; 10964} 10965_ACEOF 10966if ac_fn_c_try_link "$LINENO"; then : 10967 LIB_SCHED_YIELD= 10968 10969else 10970 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5 10971$as_echo_n "checking for sched_yield in -lrt... " >&6; } 10972if ${ac_cv_lib_rt_sched_yield+:} false; then : 10973 $as_echo_n "(cached) " >&6 10974else 10975 ac_check_lib_save_LIBS=$LIBS 10976LIBS="-lrt $LIBS" 10977cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10978/* end confdefs.h. */ 10979 10980/* Override any GCC internal prototype to avoid an error. 10981 Use char because int might match the return type of a GCC 10982 builtin and then its argument prototype would still apply. */ 10983#ifdef __cplusplus 10984extern "C" 10985#endif 10986char sched_yield (); 10987int 10988main () 10989{ 10990return sched_yield (); 10991 ; 10992 return 0; 10993} 10994_ACEOF 10995if ac_fn_c_try_link "$LINENO"; then : 10996 ac_cv_lib_rt_sched_yield=yes 10997else 10998 ac_cv_lib_rt_sched_yield=no 10999fi 11000rm -f core conftest.err conftest.$ac_objext \ 11001 conftest$ac_exeext conftest.$ac_ext 11002LIBS=$ac_check_lib_save_LIBS 11003fi 11004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5 11005$as_echo "$ac_cv_lib_rt_sched_yield" >&6; } 11006if test "x$ac_cv_lib_rt_sched_yield" = xyes; then : 11007 LIB_SCHED_YIELD=-lrt 11008else 11009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5 11010$as_echo_n "checking for sched_yield in -lposix4... " >&6; } 11011if ${ac_cv_lib_posix4_sched_yield+:} false; then : 11012 $as_echo_n "(cached) " >&6 11013else 11014 ac_check_lib_save_LIBS=$LIBS 11015LIBS="-lposix4 $LIBS" 11016cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11017/* end confdefs.h. */ 11018 11019/* Override any GCC internal prototype to avoid an error. 11020 Use char because int might match the return type of a GCC 11021 builtin and then its argument prototype would still apply. */ 11022#ifdef __cplusplus 11023extern "C" 11024#endif 11025char sched_yield (); 11026int 11027main () 11028{ 11029return sched_yield (); 11030 ; 11031 return 0; 11032} 11033_ACEOF 11034if ac_fn_c_try_link "$LINENO"; then : 11035 ac_cv_lib_posix4_sched_yield=yes 11036else 11037 ac_cv_lib_posix4_sched_yield=no 11038fi 11039rm -f core conftest.err conftest.$ac_objext \ 11040 conftest$ac_exeext conftest.$ac_ext 11041LIBS=$ac_check_lib_save_LIBS 11042fi 11043{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5 11044$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; } 11045if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then : 11046 LIB_SCHED_YIELD=-lposix4 11047fi 11048 11049fi 11050 11051 11052fi 11053rm -f core conftest.err conftest.$ac_objext \ 11054 conftest$ac_exeext conftest.$ac_ext 11055 11056 11057 gl_pthreadlib_body_done=done 11058 fi 11059 11060 11061 11062 11063 11064 11065 11066 11067 11068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5 11069$as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; } 11070if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then : 11071 $as_echo_n "(cached) " >&6 11072else 11073 case "$host_os" in 11074 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin. 11075 *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*) 11076 gl_cv_func_setlocale_null_all_mtsafe=no ;; 11077 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows. 11078 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*) 11079 gl_cv_func_setlocale_null_all_mtsafe=yes ;; 11080 # If we don't know, obey --enable-cross-guesses. 11081 *) 11082 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;; 11083 esac 11084 11085fi 11086{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5 11087$as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; } 11088 case "$host_os" in 11089 mingw*) ;; 11090 *) 11091 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then 11092 gl_cv_func_setlocale_null_all_mtsafe="trivially yes" 11093 fi 11094 ;; 11095 esac 11096 case "$gl_cv_func_setlocale_null_all_mtsafe" in 11097 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;; 11098 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;; 11099 esac 11100 11101cat >>confdefs.h <<_ACEOF 11102#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE 11103_ACEOF 11104 11105 11106 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5 11107$as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; } 11108if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then : 11109 $as_echo_n "(cached) " >&6 11110else 11111 case "$host_os" in 11112 # Guess no on OpenBSD, AIX. 11113 openbsd* | aix*) 11114 gl_cv_func_setlocale_null_one_mtsafe=no ;; 11115 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows. 11116 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*) 11117 gl_cv_func_setlocale_null_one_mtsafe=yes ;; 11118 # If we don't know, obey --enable-cross-guesses. 11119 *) 11120 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;; 11121 esac 11122 11123fi 11124{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5 11125$as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; } 11126 case "$host_os" in 11127 mingw*) ;; 11128 *) 11129 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then 11130 gl_cv_func_setlocale_null_one_mtsafe="trivially yes" 11131 fi 11132 ;; 11133 esac 11134 case "$gl_cv_func_setlocale_null_one_mtsafe" in 11135 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;; 11136 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;; 11137 esac 11138 11139cat >>confdefs.h <<_ACEOF 11140#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE 11141_ACEOF 11142 11143 11144 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then 11145 case "$host_os" in 11146 mingw*) LIB_SETLOCALE_NULL= ;; 11147 *) 11148 11149 11150 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 11151$as_echo_n "checking whether imported symbols can be declared weak... " >&6; } 11152if ${gl_cv_have_weak+:} false; then : 11153 $as_echo_n "(cached) " >&6 11154else 11155 gl_cv_have_weak=no 11156 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11157/* end confdefs.h. */ 11158extern void xyzzy (); 11159#pragma weak xyzzy 11160int 11161main () 11162{ 11163xyzzy(); 11164 ; 11165 return 0; 11166} 11167_ACEOF 11168if ac_fn_c_try_link "$LINENO"; then : 11169 gl_cv_have_weak=maybe 11170fi 11171rm -f core conftest.err conftest.$ac_objext \ 11172 conftest$ac_exeext conftest.$ac_ext 11173 if test $gl_cv_have_weak = maybe; then 11174 if test "$cross_compiling" = yes; then : 11175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11176/* end confdefs.h. */ 11177#ifdef __ELF__ 11178 Extensible Linking Format 11179 #endif 11180 11181_ACEOF 11182if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 11183 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : 11184 gl_cv_have_weak="guessing yes" 11185else 11186 gl_cv_have_weak="guessing no" 11187fi 11188rm -f conftest* 11189 11190 11191else 11192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11193/* end confdefs.h. */ 11194 11195#include <stdio.h> 11196#pragma weak fputs 11197int main () 11198{ 11199 return (fputs == NULL); 11200} 11201_ACEOF 11202if ac_fn_c_try_run "$LINENO"; then : 11203 gl_cv_have_weak=yes 11204else 11205 gl_cv_have_weak=no 11206fi 11207rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 11208 conftest.$ac_objext conftest.beam conftest.$ac_ext 11209fi 11210 11211 fi 11212 case " $LDFLAGS " in 11213 *" -static "*) gl_cv_have_weak=no ;; 11214 esac 11215 case "$gl_cv_have_weak" in 11216 *yes) 11217 case "$host_os" in 11218 freebsd* | dragonfly*) 11219 : > conftest1.c 11220 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1 11221 cat <<EOF > conftest2.c 11222#include <pthread.h> 11223#pragma weak pthread_mutexattr_gettype 11224int main () 11225{ 11226 return (pthread_mutexattr_gettype != NULL); 11227} 11228EOF 11229 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \ 11230 || gl_cv_have_weak=no 11231 rm -f conftest1.c libempty.so conftest2.c conftest 11232 ;; 11233 esac 11234 ;; 11235 esac 11236 11237fi 11238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 11239$as_echo "$gl_cv_have_weak" >&6; } 11240 case "$gl_cv_have_weak" in 11241 *yes) 11242 11243$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h 11244 11245 ;; 11246 esac 11247 11248 case "$gl_cv_have_weak" in 11249 *yes) LIB_SETLOCALE_NULL= ;; 11250 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;; 11251 esac 11252 ;; 11253 esac 11254 else 11255 LIB_SETLOCALE_NULL= 11256 fi 11257 11258 11259 11260 11261 11262 GNULIB_SOCKET=0; 11263 GNULIB_CONNECT=0; 11264 GNULIB_ACCEPT=0; 11265 GNULIB_BIND=0; 11266 GNULIB_GETPEERNAME=0; 11267 GNULIB_GETSOCKNAME=0; 11268 GNULIB_GETSOCKOPT=0; 11269 GNULIB_LISTEN=0; 11270 GNULIB_RECV=0; 11271 GNULIB_SEND=0; 11272 GNULIB_RECVFROM=0; 11273 GNULIB_SENDTO=0; 11274 GNULIB_SETSOCKOPT=0; 11275 GNULIB_SHUTDOWN=0; 11276 GNULIB_ACCEPT4=0; 11277 HAVE_STRUCT_SOCKADDR_STORAGE=1; 11278 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=1; 11279 11280 HAVE_SA_FAMILY_T=1; 11281 HAVE_ACCEPT4=1; 11282 11283 11284 11285 11286 11287 case "$host_os" in 11288 osf*) 11289 11290$as_echo "#define _POSIX_PII_SOCKET 1" >>confdefs.h 11291 11292 ;; 11293 esac 11294 11295 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> is self-contained" >&5 11296$as_echo_n "checking whether <sys/socket.h> is self-contained... " >&6; } 11297if ${gl_cv_header_sys_socket_h_selfcontained+:} false; then : 11298 $as_echo_n "(cached) " >&6 11299else 11300 11301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11302/* end confdefs.h. */ 11303#include <sys/socket.h> 11304int 11305main () 11306{ 11307 11308 ; 11309 return 0; 11310} 11311_ACEOF 11312if ac_fn_c_try_compile "$LINENO"; then : 11313 gl_cv_header_sys_socket_h_selfcontained=yes 11314else 11315 gl_cv_header_sys_socket_h_selfcontained=no 11316fi 11317rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11318 11319fi 11320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_selfcontained" >&5 11321$as_echo "$gl_cv_header_sys_socket_h_selfcontained" >&6; } 11322 if test $gl_cv_header_sys_socket_h_selfcontained = yes; then 11323 for ac_func in shutdown 11324do : 11325 ac_fn_c_check_func "$LINENO" "shutdown" "ac_cv_func_shutdown" 11326if test "x$ac_cv_func_shutdown" = xyes; then : 11327 cat >>confdefs.h <<_ACEOF 11328#define HAVE_SHUTDOWN 1 11329_ACEOF 11330 11331fi 11332done 11333 11334 if test $ac_cv_func_shutdown = yes; then 11335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/socket.h> defines the SHUT_* macros" >&5 11336$as_echo_n "checking whether <sys/socket.h> defines the SHUT_* macros... " >&6; } 11337if ${gl_cv_header_sys_socket_h_shut+:} false; then : 11338 $as_echo_n "(cached) " >&6 11339else 11340 11341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11342/* end confdefs.h. */ 11343#include <sys/socket.h> 11344int 11345main () 11346{ 11347int a[] = { SHUT_RD, SHUT_WR, SHUT_RDWR }; 11348 ; 11349 return 0; 11350} 11351_ACEOF 11352if ac_fn_c_try_compile "$LINENO"; then : 11353 gl_cv_header_sys_socket_h_shut=yes 11354else 11355 gl_cv_header_sys_socket_h_shut=no 11356fi 11357rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11358 11359fi 11360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_sys_socket_h_shut" >&5 11361$as_echo "$gl_cv_header_sys_socket_h_shut" >&6; } 11362 if test $gl_cv_header_sys_socket_h_shut = no; then 11363 SYS_SOCKET_H='sys/socket.h' 11364 fi 11365 fi 11366 fi 11367 # We need to check for ws2tcpip.h now. 11368 11369 11370 11371 11372 11373 11374 11375 11376 11377 11378 11379 if test $gl_cv_have_include_next = yes; then 11380 gl_cv_next_sys_socket_h='<'sys/socket.h'>' 11381 else 11382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/socket.h>" >&5 11383$as_echo_n "checking absolute name of <sys/socket.h>... " >&6; } 11384if ${gl_cv_next_sys_socket_h+:} false; then : 11385 $as_echo_n "(cached) " >&6 11386else 11387 11388 if test $ac_cv_header_sys_socket_h = yes; then 11389 11390 11391 11392 11393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11394/* end confdefs.h. */ 11395#include <sys/socket.h> 11396_ACEOF 11397 case "$host_os" in 11398 aix*) gl_absname_cpp="$ac_cpp -C" ;; 11399 *) gl_absname_cpp="$ac_cpp" ;; 11400 esac 11401 11402 case "$host_os" in 11403 mingw*) 11404 gl_dirsep_regex='[/\\]' 11405 ;; 11406 *) 11407 gl_dirsep_regex='\/' 11408 ;; 11409 esac 11410 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 11411 gl_header_literal_regex=`echo 'sys/socket.h' \ 11412 | sed -e "$gl_make_literal_regex_sed"` 11413 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 11414 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 11415 s|^/[^/]|//&| 11416 p 11417 q 11418 }' 11419 11420 gl_cv_absolute_sys_socket_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 11421 sed -n "$gl_absolute_header_sed"` 11422 11423 gl_header=$gl_cv_absolute_sys_socket_h 11424 gl_cv_next_sys_socket_h='"'$gl_header'"' 11425 else 11426 gl_cv_next_sys_socket_h='<'sys/socket.h'>' 11427 fi 11428 11429 11430fi 11431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_socket_h" >&5 11432$as_echo "$gl_cv_next_sys_socket_h" >&6; } 11433 fi 11434 NEXT_SYS_SOCKET_H=$gl_cv_next_sys_socket_h 11435 11436 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 11437 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 11438 gl_next_as_first_directive='<'sys/socket.h'>' 11439 else 11440 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 11441 gl_next_as_first_directive=$gl_cv_next_sys_socket_h 11442 fi 11443 NEXT_AS_FIRST_DIRECTIVE_SYS_SOCKET_H=$gl_next_as_first_directive 11444 11445 11446 11447 11448 if test $ac_cv_header_sys_socket_h = yes; then 11449 HAVE_SYS_SOCKET_H=1 11450 else 11451 HAVE_SYS_SOCKET_H=0 11452 fi 11453 11454 11455 11456 if test $ac_cv_header_sys_socket_h = yes; then 11457 HAVE_WS2TCPIP_H=0 11458 else 11459 if test $ac_cv_header_ws2tcpip_h = yes; then 11460 HAVE_WS2TCPIP_H=1 11461 else 11462 HAVE_WS2TCPIP_H=0 11463 fi 11464 fi 11465 11466 11467 11468 ac_fn_c_check_type "$LINENO" "struct sockaddr_storage" "ac_cv_type_struct_sockaddr_storage" " 11469 /* sys/types.h is not needed according to POSIX, but the 11470 sys/socket.h in i386-unknown-freebsd4.10 and 11471 powerpc-apple-darwin5.5 required it. */ 11472#include <sys/types.h> 11473#ifdef HAVE_SYS_SOCKET_H 11474#include <sys/socket.h> 11475#endif 11476#ifdef HAVE_WS2TCPIP_H 11477#include <ws2tcpip.h> 11478#endif 11479 11480" 11481if test "x$ac_cv_type_struct_sockaddr_storage" = xyes; then : 11482 11483cat >>confdefs.h <<_ACEOF 11484#define HAVE_STRUCT_SOCKADDR_STORAGE 1 11485_ACEOF 11486 11487 11488fi 11489ac_fn_c_check_type "$LINENO" "sa_family_t" "ac_cv_type_sa_family_t" " 11490 /* sys/types.h is not needed according to POSIX, but the 11491 sys/socket.h in i386-unknown-freebsd4.10 and 11492 powerpc-apple-darwin5.5 required it. */ 11493#include <sys/types.h> 11494#ifdef HAVE_SYS_SOCKET_H 11495#include <sys/socket.h> 11496#endif 11497#ifdef HAVE_WS2TCPIP_H 11498#include <ws2tcpip.h> 11499#endif 11500 11501" 11502if test "x$ac_cv_type_sa_family_t" = xyes; then : 11503 11504cat >>confdefs.h <<_ACEOF 11505#define HAVE_SA_FAMILY_T 1 11506_ACEOF 11507 11508 11509fi 11510 11511 if test $ac_cv_type_struct_sockaddr_storage = no; then 11512 HAVE_STRUCT_SOCKADDR_STORAGE=0 11513 fi 11514 if test $ac_cv_type_sa_family_t = no; then 11515 HAVE_SA_FAMILY_T=0 11516 fi 11517 if test $ac_cv_type_struct_sockaddr_storage != no; then 11518 ac_fn_c_check_member "$LINENO" "struct sockaddr_storage" "ss_family" "ac_cv_member_struct_sockaddr_storage_ss_family" "#include <sys/types.h> 11519 #ifdef HAVE_SYS_SOCKET_H 11520 #include <sys/socket.h> 11521 #endif 11522 #ifdef HAVE_WS2TCPIP_H 11523 #include <ws2tcpip.h> 11524 #endif 11525 11526" 11527if test "x$ac_cv_member_struct_sockaddr_storage_ss_family" = xyes; then : 11528 11529cat >>confdefs.h <<_ACEOF 11530#define HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY 1 11531_ACEOF 11532 11533 11534else 11535 HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY=0 11536fi 11537 11538 fi 11539 if test $HAVE_STRUCT_SOCKADDR_STORAGE = 0 || test $HAVE_SA_FAMILY_T = 0 \ 11540 || test $HAVE_STRUCT_SOCKADDR_STORAGE_SS_FAMILY = 0; then 11541 SYS_SOCKET_H='sys/socket.h' 11542 fi 11543 11544 11545 11546 11547 if test $ac_cv_header_sys_socket_h != yes; then 11548 for ac_header in winsock2.h 11549do : 11550 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" 11551if test "x$ac_cv_header_winsock2_h" = xyes; then : 11552 cat >>confdefs.h <<_ACEOF 11553#define HAVE_WINSOCK2_H 1 11554_ACEOF 11555 11556fi 11557 11558done 11559 11560 fi 11561 if test "$ac_cv_header_winsock2_h" = yes; then 11562 HAVE_WINSOCK2_H=1 11563 UNISTD_H_HAVE_WINSOCK2_H=1 11564 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 11565 else 11566 HAVE_WINSOCK2_H=0 11567 fi 11568 11569 11570 11571 11572 11573 11574 11575 11576 11577 11578 11579 11580 11581 11582 11583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv4 sockets" >&5 11584$as_echo_n "checking for IPv4 sockets... " >&6; } 11585if ${gl_cv_socket_ipv4+:} false; then : 11586 $as_echo_n "(cached) " >&6 11587else 11588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11589/* end confdefs.h. */ 11590#include <sys/types.h> 11591#ifdef HAVE_SYS_SOCKET_H 11592#include <sys/socket.h> 11593#endif 11594#ifdef HAVE_NETINET_IN_H 11595#include <netinet/in.h> 11596#endif 11597#ifdef HAVE_WINSOCK2_H 11598#include <winsock2.h> 11599#endif 11600int 11601main () 11602{ 11603int x = AF_INET; struct in_addr y; struct sockaddr_in z; 11604 if (&x && &y && &z) return 0; 11605 ; 11606 return 0; 11607} 11608_ACEOF 11609if ac_fn_c_try_compile "$LINENO"; then : 11610 gl_cv_socket_ipv4=yes 11611else 11612 gl_cv_socket_ipv4=no 11613fi 11614rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11615fi 11616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv4" >&5 11617$as_echo "$gl_cv_socket_ipv4" >&6; } 11618 if test $gl_cv_socket_ipv4 = yes; then 11619 11620$as_echo "#define HAVE_IPV4 1" >>confdefs.h 11621 11622 fi 11623 11624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 sockets" >&5 11625$as_echo_n "checking for IPv6 sockets... " >&6; } 11626if ${gl_cv_socket_ipv6+:} false; then : 11627 $as_echo_n "(cached) " >&6 11628else 11629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11630/* end confdefs.h. */ 11631#include <sys/types.h> 11632#ifdef HAVE_SYS_SOCKET_H 11633#include <sys/socket.h> 11634#endif 11635#ifdef HAVE_NETINET_IN_H 11636#include <netinet/in.h> 11637#endif 11638#ifdef HAVE_WINSOCK2_H 11639#include <winsock2.h> 11640#endif 11641#ifdef HAVE_WS2TCPIP_H 11642#include <ws2tcpip.h> 11643#endif 11644int 11645main () 11646{ 11647int x = AF_INET6; struct in6_addr y; struct sockaddr_in6 z; 11648 if (&x && &y && &z) return 0; 11649 ; 11650 return 0; 11651} 11652_ACEOF 11653if ac_fn_c_try_compile "$LINENO"; then : 11654 gl_cv_socket_ipv6=yes 11655else 11656 gl_cv_socket_ipv6=no 11657fi 11658rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11659fi 11660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socket_ipv6" >&5 11661$as_echo "$gl_cv_socket_ipv6" >&6; } 11662 if test $gl_cv_socket_ipv6 = yes; then 11663 11664$as_echo "#define HAVE_IPV6 1" >>confdefs.h 11665 11666 fi 11667 11668 11669 11670 11671 11672 11673 11674 11675 11676 11677 11678 11679 11680 if test $gl_cv_have_include_next = yes; then 11681 gl_cv_next_limits_h='<'limits.h'>' 11682 else 11683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <limits.h>" >&5 11684$as_echo_n "checking absolute name of <limits.h>... " >&6; } 11685if ${gl_cv_next_limits_h+:} false; then : 11686 $as_echo_n "(cached) " >&6 11687else 11688 11689 if test $ac_cv_header_limits_h = yes; then 11690 11691 11692 11693 11694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11695/* end confdefs.h. */ 11696#include <limits.h> 11697_ACEOF 11698 case "$host_os" in 11699 aix*) gl_absname_cpp="$ac_cpp -C" ;; 11700 *) gl_absname_cpp="$ac_cpp" ;; 11701 esac 11702 11703 case "$host_os" in 11704 mingw*) 11705 gl_dirsep_regex='[/\\]' 11706 ;; 11707 *) 11708 gl_dirsep_regex='\/' 11709 ;; 11710 esac 11711 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 11712 gl_header_literal_regex=`echo 'limits.h' \ 11713 | sed -e "$gl_make_literal_regex_sed"` 11714 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 11715 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 11716 s|^/[^/]|//&| 11717 p 11718 q 11719 }' 11720 11721 gl_cv_absolute_limits_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 11722 sed -n "$gl_absolute_header_sed"` 11723 11724 gl_header=$gl_cv_absolute_limits_h 11725 gl_cv_next_limits_h='"'$gl_header'"' 11726 else 11727 gl_cv_next_limits_h='<'limits.h'>' 11728 fi 11729 11730 11731fi 11732{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_limits_h" >&5 11733$as_echo "$gl_cv_next_limits_h" >&6; } 11734 fi 11735 NEXT_LIMITS_H=$gl_cv_next_limits_h 11736 11737 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 11738 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 11739 gl_next_as_first_directive='<'limits.h'>' 11740 else 11741 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 11742 gl_next_as_first_directive=$gl_cv_next_limits_h 11743 fi 11744 NEXT_AS_FIRST_DIRECTIVE_LIMITS_H=$gl_next_as_first_directive 11745 11746 11747 11748 11749 11750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc." >&5 11751$as_echo_n "checking whether limits.h has LLONG_MAX, WORD_BIT, ULLONG_WIDTH etc.... " >&6; } 11752if ${gl_cv_header_limits_width+:} false; then : 11753 $as_echo_n "(cached) " >&6 11754else 11755 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11756/* end confdefs.h. */ 11757#ifndef __STDC_WANT_IEC_60559_BFP_EXT__ 11758 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 11759 #endif 11760 #include <limits.h> 11761 long long llm = LLONG_MAX; 11762 int wb = WORD_BIT; 11763 int ullw = ULLONG_WIDTH; 11764 11765int 11766main () 11767{ 11768 11769 ; 11770 return 0; 11771} 11772_ACEOF 11773if ac_fn_c_try_compile "$LINENO"; then : 11774 gl_cv_header_limits_width=yes 11775else 11776 gl_cv_header_limits_width=no 11777fi 11778rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11779fi 11780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_limits_width" >&5 11781$as_echo "$gl_cv_header_limits_width" >&6; } 11782 if test "$gl_cv_header_limits_width" = yes; then 11783 LIMITS_H= 11784 else 11785 LIMITS_H=limits.h 11786 fi 11787 11788 if test -n "$LIMITS_H"; then 11789 GL_GENERATE_LIMITS_H_TRUE= 11790 GL_GENERATE_LIMITS_H_FALSE='#' 11791else 11792 GL_GENERATE_LIMITS_H_TRUE='#' 11793 GL_GENERATE_LIMITS_H_FALSE= 11794fi 11795 11796 11797 11798 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 11799$as_echo_n "checking for wint_t... " >&6; } 11800if ${gt_cv_c_wint_t+:} false; then : 11801 $as_echo_n "(cached) " >&6 11802else 11803 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11804/* end confdefs.h. */ 11805 11806/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 11807 <wchar.h>. 11808 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included 11809 before <wchar.h>. */ 11810#include <stddef.h> 11811#include <stdio.h> 11812#include <time.h> 11813#include <wchar.h> 11814 wint_t foo = (wchar_t)'\0'; 11815int 11816main () 11817{ 11818 11819 ; 11820 return 0; 11821} 11822_ACEOF 11823if ac_fn_c_try_compile "$LINENO"; then : 11824 gt_cv_c_wint_t=yes 11825else 11826 gt_cv_c_wint_t=no 11827fi 11828rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11829fi 11830{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 11831$as_echo "$gt_cv_c_wint_t" >&6; } 11832 if test $gt_cv_c_wint_t = yes; then 11833 11834$as_echo "#define HAVE_WINT_T 1" >>confdefs.h 11835 11836 11837 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wint_t is too small" >&5 11838$as_echo_n "checking whether wint_t is too small... " >&6; } 11839if ${gl_cv_type_wint_t_too_small+:} false; then : 11840 $as_echo_n "(cached) " >&6 11841else 11842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11843/* end confdefs.h. */ 11844 11845/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 11846 <wchar.h>. 11847 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 11848 included before <wchar.h>. */ 11849#if !(defined __GLIBC__ && !defined __UCLIBC__) 11850# include <stddef.h> 11851# include <stdio.h> 11852# include <time.h> 11853#endif 11854#include <wchar.h> 11855 int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1]; 11856 11857int 11858main () 11859{ 11860 11861 ; 11862 return 0; 11863} 11864_ACEOF 11865if ac_fn_c_try_compile "$LINENO"; then : 11866 gl_cv_type_wint_t_too_small=no 11867else 11868 gl_cv_type_wint_t_too_small=yes 11869fi 11870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11871fi 11872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_too_small" >&5 11873$as_echo "$gl_cv_type_wint_t_too_small" >&6; } 11874 if test $gl_cv_type_wint_t_too_small = yes; then 11875 GNULIB_OVERRIDES_WINT_T=1 11876 else 11877 GNULIB_OVERRIDES_WINT_T=0 11878 fi 11879 else 11880 GNULIB_OVERRIDES_WINT_T=0 11881 fi 11882 11883 11884 11885 11886 11887 11888 11889 gl_cv_c_multiarch=no 11890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11891/* end confdefs.h. */ 11892#ifndef __APPLE_CC__ 11893 not a universal capable compiler 11894 #endif 11895 typedef int dummy; 11896 11897_ACEOF 11898if ac_fn_c_try_compile "$LINENO"; then : 11899 11900 arch= 11901 prev= 11902 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do 11903 if test -n "$prev"; then 11904 case $word in 11905 i?86 | x86_64 | ppc | ppc64) 11906 if test -z "$arch" || test "$arch" = "$word"; then 11907 arch="$word" 11908 else 11909 gl_cv_c_multiarch=yes 11910 fi 11911 ;; 11912 esac 11913 prev= 11914 else 11915 if test "x$word" = "x-arch"; then 11916 prev=arch 11917 fi 11918 fi 11919 done 11920 11921fi 11922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11923 if test $gl_cv_c_multiarch = yes; then 11924 APPLE_UNIVERSAL_BUILD=1 11925 else 11926 APPLE_UNIVERSAL_BUILD=0 11927 fi 11928 11929 11930 11931 11932 11933 11934 11935 11936$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h 11937 11938 11939$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h 11940 11941 11942 11943 if test $ac_cv_header_wchar_h = yes; then 11944 HAVE_WCHAR_H=1 11945 else 11946 HAVE_WCHAR_H=0 11947 fi 11948 11949 11950 if test $ac_cv_header_inttypes_h = yes; then 11951 HAVE_INTTYPES_H=1 11952 else 11953 HAVE_INTTYPES_H=0 11954 fi 11955 11956 11957 if test $ac_cv_header_sys_types_h = yes; then 11958 HAVE_SYS_TYPES_H=1 11959 else 11960 HAVE_SYS_TYPES_H=0 11961 fi 11962 11963 11964 11965 11966 11967 11968 11969 11970 11971 11972 11973 if test $gl_cv_have_include_next = yes; then 11974 gl_cv_next_stdint_h='<'stdint.h'>' 11975 else 11976 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5 11977$as_echo_n "checking absolute name of <stdint.h>... " >&6; } 11978if ${gl_cv_next_stdint_h+:} false; then : 11979 $as_echo_n "(cached) " >&6 11980else 11981 11982 if test $ac_cv_header_stdint_h = yes; then 11983 11984 11985 11986 11987 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11988/* end confdefs.h. */ 11989#include <stdint.h> 11990_ACEOF 11991 case "$host_os" in 11992 aix*) gl_absname_cpp="$ac_cpp -C" ;; 11993 *) gl_absname_cpp="$ac_cpp" ;; 11994 esac 11995 11996 case "$host_os" in 11997 mingw*) 11998 gl_dirsep_regex='[/\\]' 11999 ;; 12000 *) 12001 gl_dirsep_regex='\/' 12002 ;; 12003 esac 12004 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 12005 gl_header_literal_regex=`echo 'stdint.h' \ 12006 | sed -e "$gl_make_literal_regex_sed"` 12007 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 12008 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 12009 s|^/[^/]|//&| 12010 p 12011 q 12012 }' 12013 12014 gl_cv_absolute_stdint_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 12015 sed -n "$gl_absolute_header_sed"` 12016 12017 gl_header=$gl_cv_absolute_stdint_h 12018 gl_cv_next_stdint_h='"'$gl_header'"' 12019 else 12020 gl_cv_next_stdint_h='<'stdint.h'>' 12021 fi 12022 12023 12024fi 12025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 12026$as_echo "$gl_cv_next_stdint_h" >&6; } 12027 fi 12028 NEXT_STDINT_H=$gl_cv_next_stdint_h 12029 12030 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 12031 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 12032 gl_next_as_first_directive='<'stdint.h'>' 12033 else 12034 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 12035 gl_next_as_first_directive=$gl_cv_next_stdint_h 12036 fi 12037 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive 12038 12039 12040 12041 12042 if test $ac_cv_header_stdint_h = yes; then 12043 HAVE_STDINT_H=1 12044 else 12045 HAVE_STDINT_H=0 12046 fi 12047 12048 12049 if test $ac_cv_header_stdint_h = yes; then 12050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 12051$as_echo_n "checking whether stdint.h conforms to C99... " >&6; } 12052if ${gl_cv_header_working_stdint_h+:} false; then : 12053 $as_echo_n "(cached) " >&6 12054else 12055 gl_cv_header_working_stdint_h=no 12056 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12057/* end confdefs.h. */ 12058 12059 12060#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ 12061#define __STDC_CONSTANT_MACROS 1 12062#define __STDC_LIMIT_MACROS 1 12063#include <stdint.h> 12064/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ 12065#if !(defined WCHAR_MIN && defined WCHAR_MAX) 12066#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" 12067#endif 12068 12069 12070 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 12071 included before <wchar.h>. */ 12072 #include <stddef.h> 12073 #include <signal.h> 12074 #if HAVE_WCHAR_H 12075 # include <stdio.h> 12076 # include <time.h> 12077 # include <wchar.h> 12078 #endif 12079 12080 12081#ifdef INT8_MAX 12082int8_t a1 = INT8_MAX; 12083int8_t a1min = INT8_MIN; 12084#endif 12085#ifdef INT16_MAX 12086int16_t a2 = INT16_MAX; 12087int16_t a2min = INT16_MIN; 12088#endif 12089#ifdef INT32_MAX 12090int32_t a3 = INT32_MAX; 12091int32_t a3min = INT32_MIN; 12092#endif 12093#ifdef INT64_MAX 12094int64_t a4 = INT64_MAX; 12095int64_t a4min = INT64_MIN; 12096#endif 12097#ifdef UINT8_MAX 12098uint8_t b1 = UINT8_MAX; 12099#else 12100typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; 12101#endif 12102#ifdef UINT16_MAX 12103uint16_t b2 = UINT16_MAX; 12104#endif 12105#ifdef UINT32_MAX 12106uint32_t b3 = UINT32_MAX; 12107#endif 12108#ifdef UINT64_MAX 12109uint64_t b4 = UINT64_MAX; 12110#endif 12111int_least8_t c1 = INT8_C (0x7f); 12112int_least8_t c1max = INT_LEAST8_MAX; 12113int_least8_t c1min = INT_LEAST8_MIN; 12114int_least16_t c2 = INT16_C (0x7fff); 12115int_least16_t c2max = INT_LEAST16_MAX; 12116int_least16_t c2min = INT_LEAST16_MIN; 12117int_least32_t c3 = INT32_C (0x7fffffff); 12118int_least32_t c3max = INT_LEAST32_MAX; 12119int_least32_t c3min = INT_LEAST32_MIN; 12120int_least64_t c4 = INT64_C (0x7fffffffffffffff); 12121int_least64_t c4max = INT_LEAST64_MAX; 12122int_least64_t c4min = INT_LEAST64_MIN; 12123uint_least8_t d1 = UINT8_C (0xff); 12124uint_least8_t d1max = UINT_LEAST8_MAX; 12125uint_least16_t d2 = UINT16_C (0xffff); 12126uint_least16_t d2max = UINT_LEAST16_MAX; 12127uint_least32_t d3 = UINT32_C (0xffffffff); 12128uint_least32_t d3max = UINT_LEAST32_MAX; 12129uint_least64_t d4 = UINT64_C (0xffffffffffffffff); 12130uint_least64_t d4max = UINT_LEAST64_MAX; 12131int_fast8_t e1 = INT_FAST8_MAX; 12132int_fast8_t e1min = INT_FAST8_MIN; 12133int_fast16_t e2 = INT_FAST16_MAX; 12134int_fast16_t e2min = INT_FAST16_MIN; 12135int_fast32_t e3 = INT_FAST32_MAX; 12136int_fast32_t e3min = INT_FAST32_MIN; 12137int_fast64_t e4 = INT_FAST64_MAX; 12138int_fast64_t e4min = INT_FAST64_MIN; 12139uint_fast8_t f1 = UINT_FAST8_MAX; 12140uint_fast16_t f2 = UINT_FAST16_MAX; 12141uint_fast32_t f3 = UINT_FAST32_MAX; 12142uint_fast64_t f4 = UINT_FAST64_MAX; 12143#ifdef INTPTR_MAX 12144intptr_t g = INTPTR_MAX; 12145intptr_t gmin = INTPTR_MIN; 12146#endif 12147#ifdef UINTPTR_MAX 12148uintptr_t h = UINTPTR_MAX; 12149#endif 12150intmax_t i = INTMAX_MAX; 12151uintmax_t j = UINTMAX_MAX; 12152 12153/* Check that SIZE_MAX has the correct type, if possible. */ 12154#if 201112 <= __STDC_VERSION__ 12155int k = _Generic (SIZE_MAX, size_t: 0); 12156#elif (2 <= __GNUC__ || defined __IBM__TYPEOF__ \ 12157 || (0x5110 <= __SUNPRO_C && !__STDC__)) 12158extern size_t k; 12159extern __typeof__ (SIZE_MAX) k; 12160#endif 12161 12162#include <limits.h> /* for CHAR_BIT */ 12163#define TYPE_MINIMUM(t) \ 12164 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) 12165#define TYPE_MAXIMUM(t) \ 12166 ((t) ((t) 0 < (t) -1 \ 12167 ? (t) -1 \ 12168 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) 12169struct s { 12170 int check_PTRDIFF: 12171 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) 12172 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) 12173 ? 1 : -1; 12174 /* Detect bug in FreeBSD 6.0 / ia64. */ 12175 int check_SIG_ATOMIC: 12176 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) 12177 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) 12178 ? 1 : -1; 12179 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; 12180 int check_WCHAR: 12181 WCHAR_MIN == TYPE_MINIMUM (wchar_t) 12182 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) 12183 ? 1 : -1; 12184 /* Detect bug in mingw. */ 12185 int check_WINT: 12186 WINT_MIN == TYPE_MINIMUM (wint_t) 12187 && WINT_MAX == TYPE_MAXIMUM (wint_t) 12188 ? 1 : -1; 12189 12190 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ 12191 int check_UINT8_C: 12192 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; 12193 int check_UINT16_C: 12194 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; 12195 12196 /* Detect bugs in OpenBSD 3.9 stdint.h. */ 12197#ifdef UINT8_MAX 12198 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; 12199#endif 12200#ifdef UINT16_MAX 12201 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; 12202#endif 12203#ifdef UINT32_MAX 12204 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; 12205#endif 12206#ifdef UINT64_MAX 12207 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; 12208#endif 12209 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; 12210 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; 12211 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; 12212 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; 12213 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; 12214 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; 12215 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; 12216 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; 12217 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; 12218 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; 12219 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; 12220}; 12221 12222int 12223main () 12224{ 12225 12226 ; 12227 return 0; 12228} 12229_ACEOF 12230if ac_fn_c_try_compile "$LINENO"; then : 12231 if test "$cross_compiling" = yes; then : 12232 case "$host_os" in 12233 # Guess yes on native Windows. 12234 mingw*) gl_cv_header_working_stdint_h="guessing yes" ;; 12235 # In general, assume it works. 12236 *) gl_cv_header_working_stdint_h="guessing yes" ;; 12237 esac 12238 12239else 12240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12241/* end confdefs.h. */ 12242 12243 12244#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ 12245#define __STDC_CONSTANT_MACROS 1 12246#define __STDC_LIMIT_MACROS 1 12247#include <stdint.h> 12248 12249 12250 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 12251 included before <wchar.h>. */ 12252 #include <stddef.h> 12253 #include <signal.h> 12254 #if HAVE_WCHAR_H 12255 # include <stdio.h> 12256 # include <time.h> 12257 # include <wchar.h> 12258 #endif 12259 12260 12261#include <stdio.h> 12262#include <string.h> 12263#define MVAL(macro) MVAL1(macro) 12264#define MVAL1(expression) #expression 12265static const char *macro_values[] = 12266 { 12267#ifdef INT8_MAX 12268 MVAL (INT8_MAX), 12269#endif 12270#ifdef INT16_MAX 12271 MVAL (INT16_MAX), 12272#endif 12273#ifdef INT32_MAX 12274 MVAL (INT32_MAX), 12275#endif 12276#ifdef INT64_MAX 12277 MVAL (INT64_MAX), 12278#endif 12279#ifdef UINT8_MAX 12280 MVAL (UINT8_MAX), 12281#endif 12282#ifdef UINT16_MAX 12283 MVAL (UINT16_MAX), 12284#endif 12285#ifdef UINT32_MAX 12286 MVAL (UINT32_MAX), 12287#endif 12288#ifdef UINT64_MAX 12289 MVAL (UINT64_MAX), 12290#endif 12291 NULL 12292 }; 12293 12294int 12295main () 12296{ 12297 12298 const char **mv; 12299 for (mv = macro_values; *mv != NULL; mv++) 12300 { 12301 const char *value = *mv; 12302 /* Test whether it looks like a cast expression. */ 12303 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 12304 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 12305 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 12306 || strncmp (value, "((int)"/*)*/, 6) == 0 12307 || strncmp (value, "((signed short)"/*)*/, 15) == 0 12308 || strncmp (value, "((signed char)"/*)*/, 14) == 0) 12309 return mv - macro_values + 1; 12310 } 12311 return 0; 12312 12313 ; 12314 return 0; 12315} 12316_ACEOF 12317if ac_fn_c_try_run "$LINENO"; then : 12318 gl_cv_header_working_stdint_h=yes 12319fi 12320rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 12321 conftest.$ac_objext conftest.beam conftest.$ac_ext 12322fi 12323 12324 12325fi 12326rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12327 12328fi 12329{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 12330$as_echo "$gl_cv_header_working_stdint_h" >&6; } 12331 fi 12332 12333 HAVE_C99_STDINT_H=0 12334 HAVE_SYS_BITYPES_H=0 12335 HAVE_SYS_INTTYPES_H=0 12336 STDINT_H=stdint.h 12337 case "$gl_cv_header_working_stdint_h" in 12338 *yes) 12339 HAVE_C99_STDINT_H=1 12340 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h predates C++11" >&5 12341$as_echo_n "checking whether stdint.h predates C++11... " >&6; } 12342if ${gl_cv_header_stdint_predates_cxx11_h+:} false; then : 12343 $as_echo_n "(cached) " >&6 12344else 12345 gl_cv_header_stdint_predates_cxx11_h=yes 12346 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12347/* end confdefs.h. */ 12348 12349 12350#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ 12351#include <stdint.h> 12352 12353 12354 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 12355 included before <wchar.h>. */ 12356 #include <stddef.h> 12357 #include <signal.h> 12358 #if HAVE_WCHAR_H 12359 # include <stdio.h> 12360 # include <time.h> 12361 # include <wchar.h> 12362 #endif 12363 12364 12365intmax_t im = INTMAX_MAX; 12366int32_t i32 = INT32_C (0x7fffffff); 12367 12368int 12369main () 12370{ 12371 12372 ; 12373 return 0; 12374} 12375_ACEOF 12376if ac_fn_c_try_compile "$LINENO"; then : 12377 gl_cv_header_stdint_predates_cxx11_h=no 12378fi 12379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12380fi 12381{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_predates_cxx11_h" >&5 12382$as_echo "$gl_cv_header_stdint_predates_cxx11_h" >&6; } 12383 12384 if test "$gl_cv_header_stdint_predates_cxx11_h" = yes; then 12385 12386$as_echo "#define __STDC_CONSTANT_MACROS 1" >>confdefs.h 12387 12388 12389$as_echo "#define __STDC_LIMIT_MACROS 1" >>confdefs.h 12390 12391 fi 12392 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h has UINTMAX_WIDTH etc." >&5 12393$as_echo_n "checking whether stdint.h has UINTMAX_WIDTH etc.... " >&6; } 12394if ${gl_cv_header_stdint_width+:} false; then : 12395 $as_echo_n "(cached) " >&6 12396else 12397 gl_cv_header_stdint_width=no 12398 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12399/* end confdefs.h. */ 12400 12401 /* Work if build is not clean. */ 12402 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 12403 #ifndef __STDC_WANT_IEC_60559_BFP_EXT__ 12404 #define __STDC_WANT_IEC_60559_BFP_EXT__ 1 12405 #endif 12406 #include <stdint.h> 12407 12408 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 12409 included before <wchar.h>. */ 12410 #include <stddef.h> 12411 #include <signal.h> 12412 #if HAVE_WCHAR_H 12413 # include <stdio.h> 12414 # include <time.h> 12415 # include <wchar.h> 12416 #endif 12417 12418 int iw = UINTMAX_WIDTH; 12419 12420int 12421main () 12422{ 12423 12424 ; 12425 return 0; 12426} 12427_ACEOF 12428if ac_fn_c_try_compile "$LINENO"; then : 12429 gl_cv_header_stdint_width=yes 12430fi 12431rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12432fi 12433{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_width" >&5 12434$as_echo "$gl_cv_header_stdint_width" >&6; } 12435 if test "$gl_cv_header_stdint_width" = yes; then 12436 STDINT_H= 12437 fi 12438 ;; 12439 *) 12440 for ac_header in sys/inttypes.h sys/bitypes.h 12441do : 12442 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 12443ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 12444if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 12445 cat >>confdefs.h <<_ACEOF 12446#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 12447_ACEOF 12448 12449fi 12450 12451done 12452 12453 if test $ac_cv_header_sys_inttypes_h = yes; then 12454 HAVE_SYS_INTTYPES_H=1 12455 fi 12456 if test $ac_cv_header_sys_bitypes_h = yes; then 12457 HAVE_SYS_BITYPES_H=1 12458 fi 12459 12460 12461 if test $APPLE_UNIVERSAL_BUILD = 0; then 12462 12463 12464 for gltype in ptrdiff_t size_t ; do 12465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 12466$as_echo_n "checking for bit size of $gltype... " >&6; } 12467if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : 12468 $as_echo_n "(cached) " >&6 12469else 12470 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " 12471 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 12472 included before <wchar.h>. */ 12473 #include <stddef.h> 12474 #include <signal.h> 12475 #if HAVE_WCHAR_H 12476 # include <stdio.h> 12477 # include <time.h> 12478 # include <wchar.h> 12479 #endif 12480 12481#include <limits.h>"; then : 12482 12483else 12484 result=unknown 12485fi 12486 12487 eval gl_cv_bitsizeof_${gltype}=\$result 12488 12489fi 12490eval ac_res=\$gl_cv_bitsizeof_${gltype} 12491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 12492$as_echo "$ac_res" >&6; } 12493 eval result=\$gl_cv_bitsizeof_${gltype} 12494 if test $result = unknown; then 12495 result=0 12496 fi 12497 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` 12498 cat >>confdefs.h <<_ACEOF 12499#define BITSIZEOF_${GLTYPE} $result 12500_ACEOF 12501 12502 eval BITSIZEOF_${GLTYPE}=\$result 12503 done 12504 12505 12506 fi 12507 12508 12509 for gltype in sig_atomic_t wchar_t wint_t ; do 12510 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 12511$as_echo_n "checking for bit size of $gltype... " >&6; } 12512if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : 12513 $as_echo_n "(cached) " >&6 12514else 12515 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " 12516 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 12517 included before <wchar.h>. */ 12518 #include <stddef.h> 12519 #include <signal.h> 12520 #if HAVE_WCHAR_H 12521 # include <stdio.h> 12522 # include <time.h> 12523 # include <wchar.h> 12524 #endif 12525 12526#include <limits.h>"; then : 12527 12528else 12529 result=unknown 12530fi 12531 12532 eval gl_cv_bitsizeof_${gltype}=\$result 12533 12534fi 12535eval ac_res=\$gl_cv_bitsizeof_${gltype} 12536 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 12537$as_echo "$ac_res" >&6; } 12538 eval result=\$gl_cv_bitsizeof_${gltype} 12539 if test $result = unknown; then 12540 result=0 12541 fi 12542 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` 12543 cat >>confdefs.h <<_ACEOF 12544#define BITSIZEOF_${GLTYPE} $result 12545_ACEOF 12546 12547 eval BITSIZEOF_${GLTYPE}=\$result 12548 done 12549 12550 12551 12552 12553 for gltype in sig_atomic_t wchar_t wint_t ; do 12554 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 12555$as_echo_n "checking whether $gltype is signed... " >&6; } 12556if eval \${gl_cv_type_${gltype}_signed+:} false; then : 12557 $as_echo_n "(cached) " >&6 12558else 12559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12560/* end confdefs.h. */ 12561 12562 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 12563 included before <wchar.h>. */ 12564 #include <stddef.h> 12565 #include <signal.h> 12566 #if HAVE_WCHAR_H 12567 # include <stdio.h> 12568 # include <time.h> 12569 # include <wchar.h> 12570 #endif 12571 12572 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; 12573int 12574main () 12575{ 12576 12577 ; 12578 return 0; 12579} 12580_ACEOF 12581if ac_fn_c_try_compile "$LINENO"; then : 12582 result=yes 12583else 12584 result=no 12585fi 12586rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12587 eval gl_cv_type_${gltype}_signed=\$result 12588 12589fi 12590eval ac_res=\$gl_cv_type_${gltype}_signed 12591 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 12592$as_echo "$ac_res" >&6; } 12593 eval result=\$gl_cv_type_${gltype}_signed 12594 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` 12595 if test "$result" = yes; then 12596 cat >>confdefs.h <<_ACEOF 12597#define HAVE_SIGNED_${GLTYPE} 1 12598_ACEOF 12599 12600 eval HAVE_SIGNED_${GLTYPE}=1 12601 else 12602 eval HAVE_SIGNED_${GLTYPE}=0 12603 fi 12604 done 12605 12606 12607 gl_cv_type_ptrdiff_t_signed=yes 12608 gl_cv_type_size_t_signed=no 12609 if test $APPLE_UNIVERSAL_BUILD = 0; then 12610 12611 12612 for gltype in ptrdiff_t size_t ; do 12613 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 12614$as_echo_n "checking for $gltype integer literal suffix... " >&6; } 12615if eval \${gl_cv_type_${gltype}_suffix+:} false; then : 12616 $as_echo_n "(cached) " >&6 12617else 12618 eval gl_cv_type_${gltype}_suffix=no 12619 eval result=\$gl_cv_type_${gltype}_signed 12620 if test "$result" = yes; then 12621 glsufu= 12622 else 12623 glsufu=u 12624 fi 12625 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do 12626 case $glsuf in 12627 '') gltype1='int';; 12628 l) gltype1='long int';; 12629 ll) gltype1='long long int';; 12630 i64) gltype1='__int64';; 12631 u) gltype1='unsigned int';; 12632 ul) gltype1='unsigned long int';; 12633 ull) gltype1='unsigned long long int';; 12634 ui64)gltype1='unsigned __int64';; 12635 esac 12636 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12637/* end confdefs.h. */ 12638 12639 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 12640 included before <wchar.h>. */ 12641 #include <stddef.h> 12642 #include <signal.h> 12643 #if HAVE_WCHAR_H 12644 # include <stdio.h> 12645 # include <time.h> 12646 # include <wchar.h> 12647 #endif 12648 12649 extern $gltype foo; 12650 extern $gltype1 foo; 12651int 12652main () 12653{ 12654 12655 ; 12656 return 0; 12657} 12658_ACEOF 12659if ac_fn_c_try_compile "$LINENO"; then : 12660 eval gl_cv_type_${gltype}_suffix=\$glsuf 12661fi 12662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12663 eval result=\$gl_cv_type_${gltype}_suffix 12664 test "$result" != no && break 12665 done 12666fi 12667eval ac_res=\$gl_cv_type_${gltype}_suffix 12668 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 12669$as_echo "$ac_res" >&6; } 12670 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` 12671 eval result=\$gl_cv_type_${gltype}_suffix 12672 test "$result" = no && result= 12673 eval ${GLTYPE}_SUFFIX=\$result 12674 cat >>confdefs.h <<_ACEOF 12675#define ${GLTYPE}_SUFFIX $result 12676_ACEOF 12677 12678 done 12679 12680 12681 fi 12682 12683 12684 for gltype in sig_atomic_t wchar_t wint_t ; do 12685 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 12686$as_echo_n "checking for $gltype integer literal suffix... " >&6; } 12687if eval \${gl_cv_type_${gltype}_suffix+:} false; then : 12688 $as_echo_n "(cached) " >&6 12689else 12690 eval gl_cv_type_${gltype}_suffix=no 12691 eval result=\$gl_cv_type_${gltype}_signed 12692 if test "$result" = yes; then 12693 glsufu= 12694 else 12695 glsufu=u 12696 fi 12697 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do 12698 case $glsuf in 12699 '') gltype1='int';; 12700 l) gltype1='long int';; 12701 ll) gltype1='long long int';; 12702 i64) gltype1='__int64';; 12703 u) gltype1='unsigned int';; 12704 ul) gltype1='unsigned long int';; 12705 ull) gltype1='unsigned long long int';; 12706 ui64)gltype1='unsigned __int64';; 12707 esac 12708 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12709/* end confdefs.h. */ 12710 12711 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 12712 included before <wchar.h>. */ 12713 #include <stddef.h> 12714 #include <signal.h> 12715 #if HAVE_WCHAR_H 12716 # include <stdio.h> 12717 # include <time.h> 12718 # include <wchar.h> 12719 #endif 12720 12721 extern $gltype foo; 12722 extern $gltype1 foo; 12723int 12724main () 12725{ 12726 12727 ; 12728 return 0; 12729} 12730_ACEOF 12731if ac_fn_c_try_compile "$LINENO"; then : 12732 eval gl_cv_type_${gltype}_suffix=\$glsuf 12733fi 12734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12735 eval result=\$gl_cv_type_${gltype}_suffix 12736 test "$result" != no && break 12737 done 12738fi 12739eval ac_res=\$gl_cv_type_${gltype}_suffix 12740 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 12741$as_echo "$ac_res" >&6; } 12742 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` 12743 eval result=\$gl_cv_type_${gltype}_suffix 12744 test "$result" = no && result= 12745 eval ${GLTYPE}_SUFFIX=\$result 12746 cat >>confdefs.h <<_ACEOF 12747#define ${GLTYPE}_SUFFIX $result 12748_ACEOF 12749 12750 done 12751 12752 12753 12754 if test $GNULIB_OVERRIDES_WINT_T = 1; then 12755 BITSIZEOF_WINT_T=32 12756 fi 12757 12758 ;; 12759 esac 12760 12761 12762 12763 LIMITS_H='limits.h' 12764 if test -n "$LIMITS_H"; then 12765 GL_GENERATE_LIMITS_H_TRUE= 12766 GL_GENERATE_LIMITS_H_FALSE='#' 12767else 12768 GL_GENERATE_LIMITS_H_TRUE='#' 12769 GL_GENERATE_LIMITS_H_FALSE= 12770fi 12771 12772 12773 12774 12775 12776 12777 12778 if test -n "$STDINT_H"; then 12779 GL_GENERATE_STDINT_H_TRUE= 12780 GL_GENERATE_STDINT_H_FALSE='#' 12781else 12782 GL_GENERATE_STDINT_H_TRUE='#' 12783 GL_GENERATE_STDINT_H_FALSE= 12784fi 12785 12786 12787 12788 12789 12790 GNULIB_IMAXABS=0; 12791 GNULIB_IMAXDIV=0; 12792 GNULIB_STRTOIMAX=0; 12793 GNULIB_STRTOUMAX=0; 12794 HAVE_DECL_IMAXABS=1; 12795 HAVE_DECL_IMAXDIV=1; 12796 HAVE_DECL_STRTOIMAX=1; 12797 HAVE_DECL_STRTOUMAX=1; 12798 HAVE_IMAXDIV_T=1; 12799 REPLACE_STRTOIMAX=0; 12800 REPLACE_STRTOUMAX=0; 12801 INT32_MAX_LT_INTMAX_MAX=1; 12802 INT64_MAX_EQ_LONG_MAX='defined _LP64'; 12803 PRI_MACROS_BROKEN=0; 12804 PRIPTR_PREFIX=__PRIPTR_PREFIX; 12805 UINT32_MAX_LT_UINTMAX_MAX=1; 12806 UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; 12807 12808 12809 12810 12811 12812 12813 12814 12815 12816 12817 12818 12819 12820 12821 12822 if test $gl_cv_have_include_next = yes; then 12823 gl_cv_next_inttypes_h='<'inttypes.h'>' 12824 else 12825 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5 12826$as_echo_n "checking absolute name of <inttypes.h>... " >&6; } 12827if ${gl_cv_next_inttypes_h+:} false; then : 12828 $as_echo_n "(cached) " >&6 12829else 12830 12831 if test $ac_cv_header_inttypes_h = yes; then 12832 12833 12834 12835 12836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12837/* end confdefs.h. */ 12838#include <inttypes.h> 12839_ACEOF 12840 case "$host_os" in 12841 aix*) gl_absname_cpp="$ac_cpp -C" ;; 12842 *) gl_absname_cpp="$ac_cpp" ;; 12843 esac 12844 12845 case "$host_os" in 12846 mingw*) 12847 gl_dirsep_regex='[/\\]' 12848 ;; 12849 *) 12850 gl_dirsep_regex='\/' 12851 ;; 12852 esac 12853 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 12854 gl_header_literal_regex=`echo 'inttypes.h' \ 12855 | sed -e "$gl_make_literal_regex_sed"` 12856 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 12857 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 12858 s|^/[^/]|//&| 12859 p 12860 q 12861 }' 12862 12863 gl_cv_absolute_inttypes_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 12864 sed -n "$gl_absolute_header_sed"` 12865 12866 gl_header=$gl_cv_absolute_inttypes_h 12867 gl_cv_next_inttypes_h='"'$gl_header'"' 12868 else 12869 gl_cv_next_inttypes_h='<'inttypes.h'>' 12870 fi 12871 12872 12873fi 12874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 12875$as_echo "$gl_cv_next_inttypes_h" >&6; } 12876 fi 12877 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h 12878 12879 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 12880 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 12881 gl_next_as_first_directive='<'inttypes.h'>' 12882 else 12883 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 12884 gl_next_as_first_directive=$gl_cv_next_inttypes_h 12885 fi 12886 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive 12887 12888 12889 12890 12891 12892 12893 12894 12895 12896 12897 12898 12899 12900 12901 for ac_header in inttypes.h 12902do : 12903 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" 12904if test "x$ac_cv_header_inttypes_h" = xyes; then : 12905 cat >>confdefs.h <<_ACEOF 12906#define HAVE_INTTYPES_H 1 12907_ACEOF 12908 12909fi 12910 12911done 12912 12913 if test $ac_cv_header_inttypes_h = yes; then 12914 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5 12915$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } 12916if ${gt_cv_inttypes_pri_broken+:} false; then : 12917 $as_echo_n "(cached) " >&6 12918else 12919 12920 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12921/* end confdefs.h. */ 12922 12923#include <inttypes.h> 12924#ifdef PRId32 12925char *p = PRId32; 12926#endif 12927 12928int 12929main () 12930{ 12931 12932 ; 12933 return 0; 12934} 12935_ACEOF 12936if ac_fn_c_try_compile "$LINENO"; then : 12937 gt_cv_inttypes_pri_broken=no 12938else 12939 gt_cv_inttypes_pri_broken=yes 12940fi 12941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12942 12943fi 12944{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5 12945$as_echo "$gt_cv_inttypes_pri_broken" >&6; } 12946 fi 12947 if test "$gt_cv_inttypes_pri_broken" = yes; then 12948 12949cat >>confdefs.h <<_ACEOF 12950#define PRI_MACROS_BROKEN 1 12951_ACEOF 12952 12953 PRI_MACROS_BROKEN=1 12954 else 12955 PRI_MACROS_BROKEN=0 12956 fi 12957 12958 12959 12960 12961 12962 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5 12963$as_echo_n "checking where to find the exponent in a 'double'... " >&6; } 12964if ${gl_cv_cc_double_expbit0+:} false; then : 12965 $as_echo_n "(cached) " >&6 12966else 12967 12968 if test "$cross_compiling" = yes; then : 12969 12970 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12971/* end confdefs.h. */ 12972 12973#if defined arm || defined __arm || defined __arm__ 12974 mixed_endianness 12975#endif 12976 12977_ACEOF 12978if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 12979 $EGREP "mixed_endianness" >/dev/null 2>&1; then : 12980 gl_cv_cc_double_expbit0="unknown" 12981else 12982 12983 : 12984if ${ac_cv_c_bigendian+:} false; then : 12985 $as_echo_n "(cached) " >&6 12986else 12987 ac_cv_c_bigendian=unknown 12988 # See if we're dealing with a universal compiler. 12989 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12990/* end confdefs.h. */ 12991#ifndef __APPLE_CC__ 12992 not a universal capable compiler 12993 #endif 12994 typedef int dummy; 12995 12996_ACEOF 12997if ac_fn_c_try_compile "$LINENO"; then : 12998 12999 # Check for potential -arch flags. It is not universal unless 13000 # there are at least two -arch flags with different values. 13001 ac_arch= 13002 ac_prev= 13003 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do 13004 if test -n "$ac_prev"; then 13005 case $ac_word in 13006 i?86 | x86_64 | ppc | ppc64) 13007 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then 13008 ac_arch=$ac_word 13009 else 13010 ac_cv_c_bigendian=universal 13011 break 13012 fi 13013 ;; 13014 esac 13015 ac_prev= 13016 elif test "x$ac_word" = "x-arch"; then 13017 ac_prev=arch 13018 fi 13019 done 13020fi 13021rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13022 if test $ac_cv_c_bigendian = unknown; then 13023 # See if sys/param.h defines the BYTE_ORDER macro. 13024 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13025/* end confdefs.h. */ 13026#include <sys/types.h> 13027 #include <sys/param.h> 13028 13029int 13030main () 13031{ 13032#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ 13033 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ 13034 && LITTLE_ENDIAN) 13035 bogus endian macros 13036 #endif 13037 13038 ; 13039 return 0; 13040} 13041_ACEOF 13042if ac_fn_c_try_compile "$LINENO"; then : 13043 # It does; now see whether it defined to BIG_ENDIAN or not. 13044 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13045/* end confdefs.h. */ 13046#include <sys/types.h> 13047 #include <sys/param.h> 13048 13049int 13050main () 13051{ 13052#if BYTE_ORDER != BIG_ENDIAN 13053 not big endian 13054 #endif 13055 13056 ; 13057 return 0; 13058} 13059_ACEOF 13060if ac_fn_c_try_compile "$LINENO"; then : 13061 ac_cv_c_bigendian=yes 13062else 13063 ac_cv_c_bigendian=no 13064fi 13065rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13066fi 13067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13068 fi 13069 if test $ac_cv_c_bigendian = unknown; then 13070 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). 13071 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13072/* end confdefs.h. */ 13073#include <limits.h> 13074 13075int 13076main () 13077{ 13078#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) 13079 bogus endian macros 13080 #endif 13081 13082 ; 13083 return 0; 13084} 13085_ACEOF 13086if ac_fn_c_try_compile "$LINENO"; then : 13087 # It does; now see whether it defined to _BIG_ENDIAN or not. 13088 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13089/* end confdefs.h. */ 13090#include <limits.h> 13091 13092int 13093main () 13094{ 13095#ifndef _BIG_ENDIAN 13096 not big endian 13097 #endif 13098 13099 ; 13100 return 0; 13101} 13102_ACEOF 13103if ac_fn_c_try_compile "$LINENO"; then : 13104 ac_cv_c_bigendian=yes 13105else 13106 ac_cv_c_bigendian=no 13107fi 13108rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13109fi 13110rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13111 fi 13112 if test $ac_cv_c_bigendian = unknown; then 13113 # Compile a test program. 13114 if test "$cross_compiling" = yes; then : 13115 # Try to guess by grepping values from an object file. 13116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13117/* end confdefs.h. */ 13118short int ascii_mm[] = 13119 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; 13120 short int ascii_ii[] = 13121 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; 13122 int use_ascii (int i) { 13123 return ascii_mm[i] + ascii_ii[i]; 13124 } 13125 short int ebcdic_ii[] = 13126 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; 13127 short int ebcdic_mm[] = 13128 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; 13129 int use_ebcdic (int i) { 13130 return ebcdic_mm[i] + ebcdic_ii[i]; 13131 } 13132 extern int foo; 13133 13134int 13135main () 13136{ 13137return use_ascii (foo) == use_ebcdic (foo); 13138 ; 13139 return 0; 13140} 13141_ACEOF 13142if ac_fn_c_try_compile "$LINENO"; then : 13143 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then 13144 ac_cv_c_bigendian=yes 13145 fi 13146 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then 13147 if test "$ac_cv_c_bigendian" = unknown; then 13148 ac_cv_c_bigendian=no 13149 else 13150 # finding both strings is unlikely to happen, but who knows? 13151 ac_cv_c_bigendian=unknown 13152 fi 13153 fi 13154fi 13155rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13156else 13157 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13158/* end confdefs.h. */ 13159$ac_includes_default 13160int 13161main () 13162{ 13163 13164 /* Are we little or big endian? From Harbison&Steele. */ 13165 union 13166 { 13167 long int l; 13168 char c[sizeof (long int)]; 13169 } u; 13170 u.l = 1; 13171 return u.c[sizeof (long int) - 1] == 1; 13172 13173 ; 13174 return 0; 13175} 13176_ACEOF 13177if ac_fn_c_try_run "$LINENO"; then : 13178 ac_cv_c_bigendian=no 13179else 13180 ac_cv_c_bigendian=yes 13181fi 13182rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 13183 conftest.$ac_objext conftest.beam conftest.$ac_ext 13184fi 13185 13186 fi 13187fi 13188: 13189 case $ac_cv_c_bigendian in #( 13190 yes) 13191 gl_cv_cc_double_expbit0="word 0 bit 20";; #( 13192 no) 13193 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #( 13194 universal) 13195 13196$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h 13197 13198 ;; #( 13199 *) 13200 gl_cv_cc_double_expbit0="unknown" ;; 13201 esac 13202 13203 13204fi 13205rm -f conftest* 13206 13207 13208else 13209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13210/* end confdefs.h. */ 13211 13212#include <float.h> 13213#include <stddef.h> 13214#include <stdio.h> 13215#include <string.h> 13216#define NWORDS \ 13217 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 13218typedef union { double value; unsigned int word[NWORDS]; } memory_double; 13219static unsigned int ored_words[NWORDS]; 13220static unsigned int anded_words[NWORDS]; 13221static void add_to_ored_words (double x) 13222{ 13223 memory_double m; 13224 size_t i; 13225 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */ 13226 memset (&m, 0, sizeof (memory_double)); 13227 m.value = x; 13228 for (i = 0; i < NWORDS; i++) 13229 { 13230 ored_words[i] |= m.word[i]; 13231 anded_words[i] &= m.word[i]; 13232 } 13233} 13234int main () 13235{ 13236 size_t j; 13237 FILE *fp = fopen ("conftest.out", "w"); 13238 if (fp == NULL) 13239 return 1; 13240 for (j = 0; j < NWORDS; j++) 13241 anded_words[j] = ~ (unsigned int) 0; 13242 add_to_ored_words (0.25); 13243 add_to_ored_words (0.5); 13244 add_to_ored_words (1.0); 13245 add_to_ored_words (2.0); 13246 add_to_ored_words (4.0); 13247 /* Remove bits that are common (e.g. if representation of the first mantissa 13248 bit is explicit). */ 13249 for (j = 0; j < NWORDS; j++) 13250 ored_words[j] &= ~anded_words[j]; 13251 /* Now find the nonzero word. */ 13252 for (j = 0; j < NWORDS; j++) 13253 if (ored_words[j] != 0) 13254 break; 13255 if (j < NWORDS) 13256 { 13257 size_t i; 13258 for (i = j + 1; i < NWORDS; i++) 13259 if (ored_words[i] != 0) 13260 { 13261 fprintf (fp, "unknown"); 13262 return (fclose (fp) != 0); 13263 } 13264 for (i = 0; ; i++) 13265 if ((ored_words[j] >> i) & 1) 13266 { 13267 fprintf (fp, "word %d bit %d", (int) j, (int) i); 13268 return (fclose (fp) != 0); 13269 } 13270 } 13271 fprintf (fp, "unknown"); 13272 return (fclose (fp) != 0); 13273} 13274 13275_ACEOF 13276if ac_fn_c_try_run "$LINENO"; then : 13277 gl_cv_cc_double_expbit0=`cat conftest.out` 13278else 13279 gl_cv_cc_double_expbit0="unknown" 13280fi 13281rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 13282 conftest.$ac_objext conftest.beam conftest.$ac_ext 13283fi 13284 13285 rm -f conftest.out 13286 13287fi 13288{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5 13289$as_echo "$gl_cv_cc_double_expbit0" >&6; } 13290 case "$gl_cv_cc_double_expbit0" in 13291 word*bit*) 13292 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` 13293 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'` 13294 13295cat >>confdefs.h <<_ACEOF 13296#define DBL_EXPBIT0_WORD $word 13297_ACEOF 13298 13299 13300cat >>confdefs.h <<_ACEOF 13301#define DBL_EXPBIT0_BIT $bit 13302_ACEOF 13303 13304 ;; 13305 esac 13306 13307 13308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 13309$as_echo_n "checking whether byte ordering is bigendian... " >&6; } 13310if ${ac_cv_c_bigendian+:} false; then : 13311 $as_echo_n "(cached) " >&6 13312else 13313 ac_cv_c_bigendian=unknown 13314 # See if we're dealing with a universal compiler. 13315 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13316/* end confdefs.h. */ 13317#ifndef __APPLE_CC__ 13318 not a universal capable compiler 13319 #endif 13320 typedef int dummy; 13321 13322_ACEOF 13323if ac_fn_c_try_compile "$LINENO"; then : 13324 13325 # Check for potential -arch flags. It is not universal unless 13326 # there are at least two -arch flags with different values. 13327 ac_arch= 13328 ac_prev= 13329 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do 13330 if test -n "$ac_prev"; then 13331 case $ac_word in 13332 i?86 | x86_64 | ppc | ppc64) 13333 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then 13334 ac_arch=$ac_word 13335 else 13336 ac_cv_c_bigendian=universal 13337 break 13338 fi 13339 ;; 13340 esac 13341 ac_prev= 13342 elif test "x$ac_word" = "x-arch"; then 13343 ac_prev=arch 13344 fi 13345 done 13346fi 13347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13348 if test $ac_cv_c_bigendian = unknown; then 13349 # See if sys/param.h defines the BYTE_ORDER macro. 13350 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13351/* end confdefs.h. */ 13352#include <sys/types.h> 13353 #include <sys/param.h> 13354 13355int 13356main () 13357{ 13358#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ 13359 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ 13360 && LITTLE_ENDIAN) 13361 bogus endian macros 13362 #endif 13363 13364 ; 13365 return 0; 13366} 13367_ACEOF 13368if ac_fn_c_try_compile "$LINENO"; then : 13369 # It does; now see whether it defined to BIG_ENDIAN or not. 13370 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13371/* end confdefs.h. */ 13372#include <sys/types.h> 13373 #include <sys/param.h> 13374 13375int 13376main () 13377{ 13378#if BYTE_ORDER != BIG_ENDIAN 13379 not big endian 13380 #endif 13381 13382 ; 13383 return 0; 13384} 13385_ACEOF 13386if ac_fn_c_try_compile "$LINENO"; then : 13387 ac_cv_c_bigendian=yes 13388else 13389 ac_cv_c_bigendian=no 13390fi 13391rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13392fi 13393rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13394 fi 13395 if test $ac_cv_c_bigendian = unknown; then 13396 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). 13397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13398/* end confdefs.h. */ 13399#include <limits.h> 13400 13401int 13402main () 13403{ 13404#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) 13405 bogus endian macros 13406 #endif 13407 13408 ; 13409 return 0; 13410} 13411_ACEOF 13412if ac_fn_c_try_compile "$LINENO"; then : 13413 # It does; now see whether it defined to _BIG_ENDIAN or not. 13414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13415/* end confdefs.h. */ 13416#include <limits.h> 13417 13418int 13419main () 13420{ 13421#ifndef _BIG_ENDIAN 13422 not big endian 13423 #endif 13424 13425 ; 13426 return 0; 13427} 13428_ACEOF 13429if ac_fn_c_try_compile "$LINENO"; then : 13430 ac_cv_c_bigendian=yes 13431else 13432 ac_cv_c_bigendian=no 13433fi 13434rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13435fi 13436rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13437 fi 13438 if test $ac_cv_c_bigendian = unknown; then 13439 # Compile a test program. 13440 if test "$cross_compiling" = yes; then : 13441 # Try to guess by grepping values from an object file. 13442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13443/* end confdefs.h. */ 13444short int ascii_mm[] = 13445 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; 13446 short int ascii_ii[] = 13447 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; 13448 int use_ascii (int i) { 13449 return ascii_mm[i] + ascii_ii[i]; 13450 } 13451 short int ebcdic_ii[] = 13452 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; 13453 short int ebcdic_mm[] = 13454 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; 13455 int use_ebcdic (int i) { 13456 return ebcdic_mm[i] + ebcdic_ii[i]; 13457 } 13458 extern int foo; 13459 13460int 13461main () 13462{ 13463return use_ascii (foo) == use_ebcdic (foo); 13464 ; 13465 return 0; 13466} 13467_ACEOF 13468if ac_fn_c_try_compile "$LINENO"; then : 13469 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then 13470 ac_cv_c_bigendian=yes 13471 fi 13472 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then 13473 if test "$ac_cv_c_bigendian" = unknown; then 13474 ac_cv_c_bigendian=no 13475 else 13476 # finding both strings is unlikely to happen, but who knows? 13477 ac_cv_c_bigendian=unknown 13478 fi 13479 fi 13480fi 13481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13482else 13483 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13484/* end confdefs.h. */ 13485$ac_includes_default 13486int 13487main () 13488{ 13489 13490 /* Are we little or big endian? From Harbison&Steele. */ 13491 union 13492 { 13493 long int l; 13494 char c[sizeof (long int)]; 13495 } u; 13496 u.l = 1; 13497 return u.c[sizeof (long int) - 1] == 1; 13498 13499 ; 13500 return 0; 13501} 13502_ACEOF 13503if ac_fn_c_try_run "$LINENO"; then : 13504 ac_cv_c_bigendian=no 13505else 13506 ac_cv_c_bigendian=yes 13507fi 13508rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 13509 conftest.$ac_objext conftest.beam conftest.$ac_ext 13510fi 13511 13512 fi 13513fi 13514{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 13515$as_echo "$ac_cv_c_bigendian" >&6; } 13516 case $ac_cv_c_bigendian in #( 13517 yes) 13518 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h 13519;; #( 13520 no) 13521 ;; #( 13522 universal) 13523 13524$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h 13525 13526 ;; #( 13527 *) 13528 as_fn_error $? "unknown endianness 13529 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; 13530 esac 13531 13532 13533 13534 GNULIB_LOCALECONV=0; 13535 GNULIB_SETLOCALE=0; 13536 GNULIB_SETLOCALE_NULL=0; 13537 GNULIB_DUPLOCALE=0; 13538 GNULIB_LOCALENAME=0; 13539 HAVE_NEWLOCALE=1; 13540 HAVE_DUPLOCALE=1; 13541 HAVE_FREELOCALE=1; 13542 REPLACE_LOCALECONV=0; 13543 REPLACE_SETLOCALE=0; 13544 REPLACE_NEWLOCALE=0; 13545 REPLACE_DUPLOCALE=0; 13546 REPLACE_FREELOCALE=0; 13547 REPLACE_STRUCT_LCONV=0; 13548 13549 13550 REPLACE_NULL=0; 13551 HAVE_MAX_ALIGN_T=1; 13552 HAVE_WCHAR_T=1; 13553 13554 13555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 13556$as_echo_n "checking for wchar_t... " >&6; } 13557if ${gt_cv_c_wchar_t+:} false; then : 13558 $as_echo_n "(cached) " >&6 13559else 13560 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13561/* end confdefs.h. */ 13562#include <stddef.h> 13563 wchar_t foo = (wchar_t)'\0'; 13564int 13565main () 13566{ 13567 13568 ; 13569 return 0; 13570} 13571_ACEOF 13572if ac_fn_c_try_compile "$LINENO"; then : 13573 gt_cv_c_wchar_t=yes 13574else 13575 gt_cv_c_wchar_t=no 13576fi 13577rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13578fi 13579{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 13580$as_echo "$gt_cv_c_wchar_t" >&6; } 13581 if test $gt_cv_c_wchar_t = yes; then 13582 13583$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h 13584 13585 fi 13586 13587 13588 13589 13590 STDDEF_H= 13591 13592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5 13593$as_echo_n "checking for good max_align_t... " >&6; } 13594if ${gl_cv_type_max_align_t+:} false; then : 13595 $as_echo_n "(cached) " >&6 13596else 13597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13598/* end confdefs.h. */ 13599#include <stddef.h> 13600 unsigned int s = sizeof (max_align_t); 13601 #if defined __GNUC__ || defined __IBM__ALIGNOF__ 13602 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1]; 13603 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1]; 13604 #endif 13605 13606int 13607main () 13608{ 13609 13610 ; 13611 return 0; 13612} 13613_ACEOF 13614if ac_fn_c_try_compile "$LINENO"; then : 13615 gl_cv_type_max_align_t=yes 13616else 13617 gl_cv_type_max_align_t=no 13618fi 13619rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13620 13621fi 13622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5 13623$as_echo "$gl_cv_type_max_align_t" >&6; } 13624 if test $gl_cv_type_max_align_t = no; then 13625 HAVE_MAX_ALIGN_T=0 13626 STDDEF_H=stddef.h 13627 fi 13628 13629 if test $gt_cv_c_wchar_t = no; then 13630 HAVE_WCHAR_T=0 13631 STDDEF_H=stddef.h 13632 fi 13633 13634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 13635$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } 13636if ${gl_cv_decl_null_works+:} false; then : 13637 $as_echo_n "(cached) " >&6 13638else 13639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13640/* end confdefs.h. */ 13641#include <stddef.h> 13642 int test[2 * (sizeof NULL == sizeof (void *)) -1]; 13643 13644int 13645main () 13646{ 13647 13648 ; 13649 return 0; 13650} 13651_ACEOF 13652if ac_fn_c_try_compile "$LINENO"; then : 13653 gl_cv_decl_null_works=yes 13654else 13655 gl_cv_decl_null_works=no 13656fi 13657rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13658fi 13659{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 13660$as_echo "$gl_cv_decl_null_works" >&6; } 13661 if test $gl_cv_decl_null_works = no; then 13662 REPLACE_NULL=1 13663 STDDEF_H=stddef.h 13664 fi 13665 13666 13667 if test -n "$STDDEF_H"; then 13668 GL_GENERATE_STDDEF_H_TRUE= 13669 GL_GENERATE_STDDEF_H_FALSE='#' 13670else 13671 GL_GENERATE_STDDEF_H_TRUE='#' 13672 GL_GENERATE_STDDEF_H_FALSE= 13673fi 13674 13675 if test -n "$STDDEF_H"; then 13676 13677 13678 13679 13680 13681 13682 13683 13684 if test $gl_cv_have_include_next = yes; then 13685 gl_cv_next_stddef_h='<'stddef.h'>' 13686 else 13687 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 13688$as_echo_n "checking absolute name of <stddef.h>... " >&6; } 13689if ${gl_cv_next_stddef_h+:} false; then : 13690 $as_echo_n "(cached) " >&6 13691else 13692 13693 13694 13695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13696/* end confdefs.h. */ 13697#include <stddef.h> 13698_ACEOF 13699 case "$host_os" in 13700 aix*) gl_absname_cpp="$ac_cpp -C" ;; 13701 *) gl_absname_cpp="$ac_cpp" ;; 13702 esac 13703 13704 case "$host_os" in 13705 mingw*) 13706 gl_dirsep_regex='[/\\]' 13707 ;; 13708 *) 13709 gl_dirsep_regex='\/' 13710 ;; 13711 esac 13712 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 13713 gl_header_literal_regex=`echo 'stddef.h' \ 13714 | sed -e "$gl_make_literal_regex_sed"` 13715 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 13716 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 13717 s|^/[^/]|//&| 13718 p 13719 q 13720 }' 13721 13722 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 13723 sed -n "$gl_absolute_header_sed"` 13724 13725 gl_header=$gl_cv_absolute_stddef_h 13726 gl_cv_next_stddef_h='"'$gl_header'"' 13727 13728 13729fi 13730{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 13731$as_echo "$gl_cv_next_stddef_h" >&6; } 13732 fi 13733 NEXT_STDDEF_H=$gl_cv_next_stddef_h 13734 13735 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 13736 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 13737 gl_next_as_first_directive='<'stddef.h'>' 13738 else 13739 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 13740 gl_next_as_first_directive=$gl_cv_next_stddef_h 13741 fi 13742 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive 13743 13744 13745 13746 13747 fi 13748 13749 13750 13751 13752 13753 13754 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h defines locale_t" >&5 13755$as_echo_n "checking whether locale.h defines locale_t... " >&6; } 13756if ${gl_cv_header_locale_has_locale_t+:} false; then : 13757 $as_echo_n "(cached) " >&6 13758else 13759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13760/* end confdefs.h. */ 13761#include <locale.h> 13762 locale_t x; 13763int 13764main () 13765{ 13766 13767 ; 13768 return 0; 13769} 13770_ACEOF 13771if ac_fn_c_try_compile "$LINENO"; then : 13772 gl_cv_header_locale_has_locale_t=yes 13773else 13774 gl_cv_header_locale_has_locale_t=no 13775fi 13776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13777 13778fi 13779{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_has_locale_t" >&5 13780$as_echo "$gl_cv_header_locale_has_locale_t" >&6; } 13781 13782 13783 if test $ac_cv_header_xlocale_h = yes; then 13784 HAVE_XLOCALE_H=1 13785 if test $gl_cv_header_locale_has_locale_t = yes; then 13786 gl_cv_header_locale_h_needs_xlocale_h=no 13787 else 13788 gl_cv_header_locale_h_needs_xlocale_h=yes 13789 fi 13790 HAVE_LOCALE_T=1 13791 else 13792 HAVE_XLOCALE_H=0 13793 gl_cv_header_locale_h_needs_xlocale_h=no 13794 if test $gl_cv_header_locale_has_locale_t = yes; then 13795 HAVE_LOCALE_T=1 13796 else 13797 HAVE_LOCALE_T=0 13798 fi 13799 fi 13800 13801 13802 13803 13804 gl_threads_api=none 13805 LIBTHREAD= 13806 LTLIBTHREAD= 13807 LIBMULTITHREAD= 13808 LTLIBMULTITHREAD= 13809 if test "$gl_use_threads" != no; then 13810 13811 13812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 13813$as_echo_n "checking whether imported symbols can be declared weak... " >&6; } 13814if ${gl_cv_have_weak+:} false; then : 13815 $as_echo_n "(cached) " >&6 13816else 13817 gl_cv_have_weak=no 13818 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13819/* end confdefs.h. */ 13820extern void xyzzy (); 13821#pragma weak xyzzy 13822int 13823main () 13824{ 13825xyzzy(); 13826 ; 13827 return 0; 13828} 13829_ACEOF 13830if ac_fn_c_try_link "$LINENO"; then : 13831 gl_cv_have_weak=maybe 13832fi 13833rm -f core conftest.err conftest.$ac_objext \ 13834 conftest$ac_exeext conftest.$ac_ext 13835 if test $gl_cv_have_weak = maybe; then 13836 if test "$cross_compiling" = yes; then : 13837 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13838/* end confdefs.h. */ 13839#ifdef __ELF__ 13840 Extensible Linking Format 13841 #endif 13842 13843_ACEOF 13844if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 13845 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : 13846 gl_cv_have_weak="guessing yes" 13847else 13848 gl_cv_have_weak="guessing no" 13849fi 13850rm -f conftest* 13851 13852 13853else 13854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13855/* end confdefs.h. */ 13856 13857#include <stdio.h> 13858#pragma weak fputs 13859int main () 13860{ 13861 return (fputs == NULL); 13862} 13863_ACEOF 13864if ac_fn_c_try_run "$LINENO"; then : 13865 gl_cv_have_weak=yes 13866else 13867 gl_cv_have_weak=no 13868fi 13869rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 13870 conftest.$ac_objext conftest.beam conftest.$ac_ext 13871fi 13872 13873 fi 13874 case " $LDFLAGS " in 13875 *" -static "*) gl_cv_have_weak=no ;; 13876 esac 13877 case "$gl_cv_have_weak" in 13878 *yes) 13879 case "$host_os" in 13880 freebsd* | dragonfly*) 13881 : > conftest1.c 13882 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1 13883 cat <<EOF > conftest2.c 13884#include <pthread.h> 13885#pragma weak pthread_mutexattr_gettype 13886int main () 13887{ 13888 return (pthread_mutexattr_gettype != NULL); 13889} 13890EOF 13891 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \ 13892 || gl_cv_have_weak=no 13893 rm -f conftest1.c libempty.so conftest2.c conftest 13894 ;; 13895 esac 13896 ;; 13897 esac 13898 13899fi 13900{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 13901$as_echo "$gl_cv_have_weak" >&6; } 13902 case "$gl_cv_have_weak" in 13903 *yes) 13904 13905$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h 13906 13907 ;; 13908 esac 13909 13910 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then 13911 13912 : 13913 fi 13914 if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then 13915 13916 gl_have_isoc_threads="$ac_cv_header_threads_h" 13917 fi 13918 if test "$gl_use_threads" = yes \ 13919 || test "$gl_use_threads" = posix \ 13920 || test "$gl_use_threads" = isoc+posix; then 13921 13922 13923 if test -z "$gl_pthreadlib_body_done"; then 13924 gl_pthread_api=no 13925 LIBPTHREAD= 13926 LIBPMULTITHREAD= 13927 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that 13928 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY. 13929 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" 13930if test "x$ac_cv_header_pthread_h" = xyes; then : 13931 gl_have_pthread_h=yes 13932else 13933 gl_have_pthread_h=no 13934fi 13935 13936 13937 if test "$gl_have_pthread_h" = yes; then 13938 # Other possible tests: 13939 # -lpthreads (FSU threads, PCthreads) 13940 # -lgthreads 13941 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist 13942 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but 13943 # the second one only in libpthread, and lock.c needs it. 13944 # 13945 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 13946 # needs -pthread for some reason. See: 13947 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html 13948 save_LIBS=$LIBS 13949 for gl_pthread in '' '-pthread'; do 13950 LIBS="$LIBS $gl_pthread" 13951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13952/* end confdefs.h. */ 13953#include <pthread.h> 13954 pthread_mutex_t m; 13955 pthread_mutexattr_t ma; 13956 13957int 13958main () 13959{ 13960pthread_mutex_lock (&m); 13961 pthread_mutexattr_init (&ma); 13962 ; 13963 return 0; 13964} 13965_ACEOF 13966if ac_fn_c_try_link "$LINENO"; then : 13967 gl_pthread_api=yes 13968 LIBPTHREAD=$gl_pthread 13969 LIBPMULTITHREAD=$gl_pthread 13970fi 13971rm -f core conftest.err conftest.$ac_objext \ 13972 conftest$ac_exeext conftest.$ac_ext 13973 LIBS=$save_LIBS 13974 test $gl_pthread_api = yes && break 13975 done 13976 13977 # Test for libpthread by looking for pthread_kill. (Not pthread_self, 13978 # since it is defined as a macro on OSF/1.) 13979 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then 13980 # The program links fine without libpthread. But it may actually 13981 # need to link with libpthread in order to create multiple threads. 13982 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 13983$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } 13984if ${ac_cv_lib_pthread_pthread_kill+:} false; then : 13985 $as_echo_n "(cached) " >&6 13986else 13987 ac_check_lib_save_LIBS=$LIBS 13988LIBS="-lpthread $LIBS" 13989cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13990/* end confdefs.h. */ 13991 13992/* Override any GCC internal prototype to avoid an error. 13993 Use char because int might match the return type of a GCC 13994 builtin and then its argument prototype would still apply. */ 13995#ifdef __cplusplus 13996extern "C" 13997#endif 13998char pthread_kill (); 13999int 14000main () 14001{ 14002return pthread_kill (); 14003 ; 14004 return 0; 14005} 14006_ACEOF 14007if ac_fn_c_try_link "$LINENO"; then : 14008 ac_cv_lib_pthread_pthread_kill=yes 14009else 14010 ac_cv_lib_pthread_pthread_kill=no 14011fi 14012rm -f core conftest.err conftest.$ac_objext \ 14013 conftest$ac_exeext conftest.$ac_ext 14014LIBS=$ac_check_lib_save_LIBS 14015fi 14016{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 14017$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } 14018if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : 14019 LIBPMULTITHREAD=-lpthread 14020 # On Solaris and HP-UX, most pthread functions exist also in libc. 14021 # Therefore pthread_in_use() needs to actually try to create a 14022 # thread: pthread_create from libc will fail, whereas 14023 # pthread_create will actually create a thread. 14024 # On Solaris 10 or newer, this test is no longer needed, because 14025 # libc contains the fully functional pthread functions. 14026 case "$host_os" in 14027 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*) 14028 14029$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h 14030 14031 esac 14032 14033fi 14034 14035 elif test $gl_pthread_api != yes; then 14036 # Some library is needed. Try libpthread and libc_r. 14037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 14038$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } 14039if ${ac_cv_lib_pthread_pthread_kill+:} false; then : 14040 $as_echo_n "(cached) " >&6 14041else 14042 ac_check_lib_save_LIBS=$LIBS 14043LIBS="-lpthread $LIBS" 14044cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14045/* end confdefs.h. */ 14046 14047/* Override any GCC internal prototype to avoid an error. 14048 Use char because int might match the return type of a GCC 14049 builtin and then its argument prototype would still apply. */ 14050#ifdef __cplusplus 14051extern "C" 14052#endif 14053char pthread_kill (); 14054int 14055main () 14056{ 14057return pthread_kill (); 14058 ; 14059 return 0; 14060} 14061_ACEOF 14062if ac_fn_c_try_link "$LINENO"; then : 14063 ac_cv_lib_pthread_pthread_kill=yes 14064else 14065 ac_cv_lib_pthread_pthread_kill=no 14066fi 14067rm -f core conftest.err conftest.$ac_objext \ 14068 conftest$ac_exeext conftest.$ac_ext 14069LIBS=$ac_check_lib_save_LIBS 14070fi 14071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 14072$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } 14073if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : 14074 gl_pthread_api=yes 14075 LIBPTHREAD=-lpthread 14076 LIBPMULTITHREAD=-lpthread 14077fi 14078 14079 if test $gl_pthread_api != yes; then 14080 # For FreeBSD 4. 14081 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 14082$as_echo_n "checking for pthread_kill in -lc_r... " >&6; } 14083if ${ac_cv_lib_c_r_pthread_kill+:} false; then : 14084 $as_echo_n "(cached) " >&6 14085else 14086 ac_check_lib_save_LIBS=$LIBS 14087LIBS="-lc_r $LIBS" 14088cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14089/* end confdefs.h. */ 14090 14091/* Override any GCC internal prototype to avoid an error. 14092 Use char because int might match the return type of a GCC 14093 builtin and then its argument prototype would still apply. */ 14094#ifdef __cplusplus 14095extern "C" 14096#endif 14097char pthread_kill (); 14098int 14099main () 14100{ 14101return pthread_kill (); 14102 ; 14103 return 0; 14104} 14105_ACEOF 14106if ac_fn_c_try_link "$LINENO"; then : 14107 ac_cv_lib_c_r_pthread_kill=yes 14108else 14109 ac_cv_lib_c_r_pthread_kill=no 14110fi 14111rm -f core conftest.err conftest.$ac_objext \ 14112 conftest$ac_exeext conftest.$ac_ext 14113LIBS=$ac_check_lib_save_LIBS 14114fi 14115{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 14116$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } 14117if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then : 14118 gl_pthread_api=yes 14119 LIBPTHREAD=-lc_r 14120 LIBPMULTITHREAD=-lc_r 14121fi 14122 14123 fi 14124 fi 14125 fi 14126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5 14127$as_echo_n "checking whether POSIX threads API is available... " >&6; } 14128 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5 14129$as_echo "$gl_pthread_api" >&6; } 14130 14131 14132 if test $gl_pthread_api = yes; then 14133 14134$as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h 14135 14136 fi 14137 14138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14139/* end confdefs.h. */ 14140#include <sched.h> 14141int 14142main () 14143{ 14144sched_yield (); 14145 ; 14146 return 0; 14147} 14148_ACEOF 14149if ac_fn_c_try_link "$LINENO"; then : 14150 LIB_SCHED_YIELD= 14151 14152else 14153 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5 14154$as_echo_n "checking for sched_yield in -lrt... " >&6; } 14155if ${ac_cv_lib_rt_sched_yield+:} false; then : 14156 $as_echo_n "(cached) " >&6 14157else 14158 ac_check_lib_save_LIBS=$LIBS 14159LIBS="-lrt $LIBS" 14160cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14161/* end confdefs.h. */ 14162 14163/* Override any GCC internal prototype to avoid an error. 14164 Use char because int might match the return type of a GCC 14165 builtin and then its argument prototype would still apply. */ 14166#ifdef __cplusplus 14167extern "C" 14168#endif 14169char sched_yield (); 14170int 14171main () 14172{ 14173return sched_yield (); 14174 ; 14175 return 0; 14176} 14177_ACEOF 14178if ac_fn_c_try_link "$LINENO"; then : 14179 ac_cv_lib_rt_sched_yield=yes 14180else 14181 ac_cv_lib_rt_sched_yield=no 14182fi 14183rm -f core conftest.err conftest.$ac_objext \ 14184 conftest$ac_exeext conftest.$ac_ext 14185LIBS=$ac_check_lib_save_LIBS 14186fi 14187{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5 14188$as_echo "$ac_cv_lib_rt_sched_yield" >&6; } 14189if test "x$ac_cv_lib_rt_sched_yield" = xyes; then : 14190 LIB_SCHED_YIELD=-lrt 14191else 14192 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5 14193$as_echo_n "checking for sched_yield in -lposix4... " >&6; } 14194if ${ac_cv_lib_posix4_sched_yield+:} false; then : 14195 $as_echo_n "(cached) " >&6 14196else 14197 ac_check_lib_save_LIBS=$LIBS 14198LIBS="-lposix4 $LIBS" 14199cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14200/* end confdefs.h. */ 14201 14202/* Override any GCC internal prototype to avoid an error. 14203 Use char because int might match the return type of a GCC 14204 builtin and then its argument prototype would still apply. */ 14205#ifdef __cplusplus 14206extern "C" 14207#endif 14208char sched_yield (); 14209int 14210main () 14211{ 14212return sched_yield (); 14213 ; 14214 return 0; 14215} 14216_ACEOF 14217if ac_fn_c_try_link "$LINENO"; then : 14218 ac_cv_lib_posix4_sched_yield=yes 14219else 14220 ac_cv_lib_posix4_sched_yield=no 14221fi 14222rm -f core conftest.err conftest.$ac_objext \ 14223 conftest$ac_exeext conftest.$ac_ext 14224LIBS=$ac_check_lib_save_LIBS 14225fi 14226{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5 14227$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; } 14228if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then : 14229 LIB_SCHED_YIELD=-lposix4 14230fi 14231 14232fi 14233 14234 14235fi 14236rm -f core conftest.err conftest.$ac_objext \ 14237 conftest$ac_exeext conftest.$ac_ext 14238 14239 14240 gl_pthreadlib_body_done=done 14241 fi 14242 14243 LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD 14244 LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD 14245 if test $gl_pthread_api = yes; then 14246 if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then 14247 gl_threads_api='isoc+posix' 14248 14249$as_echo "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h 14250 14251 LIBTHREAD= LTLIBTHREAD= 14252 else 14253 gl_threads_api=posix 14254 14255$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h 14256 14257 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then 14258 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then 14259 14260$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h 14261 14262 LIBTHREAD= LTLIBTHREAD= 14263 fi 14264 fi 14265 fi 14266 fi 14267 fi 14268 if test $gl_threads_api = none; then 14269 if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then 14270 14271 14272 14273 if test -z "$gl_stdthreadlib_body_done"; then 14274 14275 14276 case "$host_os" in 14277 mingw*) 14278 LIBSTDTHREAD= 14279 ;; 14280 *) 14281 14282 14283 if test -z "$gl_pthreadlib_body_done"; then 14284 gl_pthread_api=no 14285 LIBPTHREAD= 14286 LIBPMULTITHREAD= 14287 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that 14288 # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY. 14289 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" 14290if test "x$ac_cv_header_pthread_h" = xyes; then : 14291 gl_have_pthread_h=yes 14292else 14293 gl_have_pthread_h=no 14294fi 14295 14296 14297 if test "$gl_have_pthread_h" = yes; then 14298 # Other possible tests: 14299 # -lpthreads (FSU threads, PCthreads) 14300 # -lgthreads 14301 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist 14302 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but 14303 # the second one only in libpthread, and lock.c needs it. 14304 # 14305 # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 14306 # needs -pthread for some reason. See: 14307 # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html 14308 save_LIBS=$LIBS 14309 for gl_pthread in '' '-pthread'; do 14310 LIBS="$LIBS $gl_pthread" 14311 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14312/* end confdefs.h. */ 14313#include <pthread.h> 14314 pthread_mutex_t m; 14315 pthread_mutexattr_t ma; 14316 14317int 14318main () 14319{ 14320pthread_mutex_lock (&m); 14321 pthread_mutexattr_init (&ma); 14322 ; 14323 return 0; 14324} 14325_ACEOF 14326if ac_fn_c_try_link "$LINENO"; then : 14327 gl_pthread_api=yes 14328 LIBPTHREAD=$gl_pthread 14329 LIBPMULTITHREAD=$gl_pthread 14330fi 14331rm -f core conftest.err conftest.$ac_objext \ 14332 conftest$ac_exeext conftest.$ac_ext 14333 LIBS=$save_LIBS 14334 test $gl_pthread_api = yes && break 14335 done 14336 14337 # Test for libpthread by looking for pthread_kill. (Not pthread_self, 14338 # since it is defined as a macro on OSF/1.) 14339 if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then 14340 # The program links fine without libpthread. But it may actually 14341 # need to link with libpthread in order to create multiple threads. 14342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 14343$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } 14344if ${ac_cv_lib_pthread_pthread_kill+:} false; then : 14345 $as_echo_n "(cached) " >&6 14346else 14347 ac_check_lib_save_LIBS=$LIBS 14348LIBS="-lpthread $LIBS" 14349cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14350/* end confdefs.h. */ 14351 14352/* Override any GCC internal prototype to avoid an error. 14353 Use char because int might match the return type of a GCC 14354 builtin and then its argument prototype would still apply. */ 14355#ifdef __cplusplus 14356extern "C" 14357#endif 14358char pthread_kill (); 14359int 14360main () 14361{ 14362return pthread_kill (); 14363 ; 14364 return 0; 14365} 14366_ACEOF 14367if ac_fn_c_try_link "$LINENO"; then : 14368 ac_cv_lib_pthread_pthread_kill=yes 14369else 14370 ac_cv_lib_pthread_pthread_kill=no 14371fi 14372rm -f core conftest.err conftest.$ac_objext \ 14373 conftest$ac_exeext conftest.$ac_ext 14374LIBS=$ac_check_lib_save_LIBS 14375fi 14376{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 14377$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } 14378if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : 14379 LIBPMULTITHREAD=-lpthread 14380 # On Solaris and HP-UX, most pthread functions exist also in libc. 14381 # Therefore pthread_in_use() needs to actually try to create a 14382 # thread: pthread_create from libc will fail, whereas 14383 # pthread_create will actually create a thread. 14384 # On Solaris 10 or newer, this test is no longer needed, because 14385 # libc contains the fully functional pthread functions. 14386 case "$host_os" in 14387 solaris | solaris2.1-9 | solaris2.1-9.* | hpux*) 14388 14389$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h 14390 14391 esac 14392 14393fi 14394 14395 elif test $gl_pthread_api != yes; then 14396 # Some library is needed. Try libpthread and libc_r. 14397 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 14398$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } 14399if ${ac_cv_lib_pthread_pthread_kill+:} false; then : 14400 $as_echo_n "(cached) " >&6 14401else 14402 ac_check_lib_save_LIBS=$LIBS 14403LIBS="-lpthread $LIBS" 14404cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14405/* end confdefs.h. */ 14406 14407/* Override any GCC internal prototype to avoid an error. 14408 Use char because int might match the return type of a GCC 14409 builtin and then its argument prototype would still apply. */ 14410#ifdef __cplusplus 14411extern "C" 14412#endif 14413char pthread_kill (); 14414int 14415main () 14416{ 14417return pthread_kill (); 14418 ; 14419 return 0; 14420} 14421_ACEOF 14422if ac_fn_c_try_link "$LINENO"; then : 14423 ac_cv_lib_pthread_pthread_kill=yes 14424else 14425 ac_cv_lib_pthread_pthread_kill=no 14426fi 14427rm -f core conftest.err conftest.$ac_objext \ 14428 conftest$ac_exeext conftest.$ac_ext 14429LIBS=$ac_check_lib_save_LIBS 14430fi 14431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 14432$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } 14433if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : 14434 gl_pthread_api=yes 14435 LIBPTHREAD=-lpthread 14436 LIBPMULTITHREAD=-lpthread 14437fi 14438 14439 if test $gl_pthread_api != yes; then 14440 # For FreeBSD 4. 14441 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 14442$as_echo_n "checking for pthread_kill in -lc_r... " >&6; } 14443if ${ac_cv_lib_c_r_pthread_kill+:} false; then : 14444 $as_echo_n "(cached) " >&6 14445else 14446 ac_check_lib_save_LIBS=$LIBS 14447LIBS="-lc_r $LIBS" 14448cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14449/* end confdefs.h. */ 14450 14451/* Override any GCC internal prototype to avoid an error. 14452 Use char because int might match the return type of a GCC 14453 builtin and then its argument prototype would still apply. */ 14454#ifdef __cplusplus 14455extern "C" 14456#endif 14457char pthread_kill (); 14458int 14459main () 14460{ 14461return pthread_kill (); 14462 ; 14463 return 0; 14464} 14465_ACEOF 14466if ac_fn_c_try_link "$LINENO"; then : 14467 ac_cv_lib_c_r_pthread_kill=yes 14468else 14469 ac_cv_lib_c_r_pthread_kill=no 14470fi 14471rm -f core conftest.err conftest.$ac_objext \ 14472 conftest$ac_exeext conftest.$ac_ext 14473LIBS=$ac_check_lib_save_LIBS 14474fi 14475{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 14476$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } 14477if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then : 14478 gl_pthread_api=yes 14479 LIBPTHREAD=-lc_r 14480 LIBPMULTITHREAD=-lc_r 14481fi 14482 14483 fi 14484 fi 14485 fi 14486 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5 14487$as_echo_n "checking whether POSIX threads API is available... " >&6; } 14488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5 14489$as_echo "$gl_pthread_api" >&6; } 14490 14491 14492 if test $gl_pthread_api = yes; then 14493 14494$as_echo "#define HAVE_PTHREAD_API 1" >>confdefs.h 14495 14496 fi 14497 14498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14499/* end confdefs.h. */ 14500#include <sched.h> 14501int 14502main () 14503{ 14504sched_yield (); 14505 ; 14506 return 0; 14507} 14508_ACEOF 14509if ac_fn_c_try_link "$LINENO"; then : 14510 LIB_SCHED_YIELD= 14511 14512else 14513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5 14514$as_echo_n "checking for sched_yield in -lrt... " >&6; } 14515if ${ac_cv_lib_rt_sched_yield+:} false; then : 14516 $as_echo_n "(cached) " >&6 14517else 14518 ac_check_lib_save_LIBS=$LIBS 14519LIBS="-lrt $LIBS" 14520cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14521/* end confdefs.h. */ 14522 14523/* Override any GCC internal prototype to avoid an error. 14524 Use char because int might match the return type of a GCC 14525 builtin and then its argument prototype would still apply. */ 14526#ifdef __cplusplus 14527extern "C" 14528#endif 14529char sched_yield (); 14530int 14531main () 14532{ 14533return sched_yield (); 14534 ; 14535 return 0; 14536} 14537_ACEOF 14538if ac_fn_c_try_link "$LINENO"; then : 14539 ac_cv_lib_rt_sched_yield=yes 14540else 14541 ac_cv_lib_rt_sched_yield=no 14542fi 14543rm -f core conftest.err conftest.$ac_objext \ 14544 conftest$ac_exeext conftest.$ac_ext 14545LIBS=$ac_check_lib_save_LIBS 14546fi 14547{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5 14548$as_echo "$ac_cv_lib_rt_sched_yield" >&6; } 14549if test "x$ac_cv_lib_rt_sched_yield" = xyes; then : 14550 LIB_SCHED_YIELD=-lrt 14551else 14552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5 14553$as_echo_n "checking for sched_yield in -lposix4... " >&6; } 14554if ${ac_cv_lib_posix4_sched_yield+:} false; then : 14555 $as_echo_n "(cached) " >&6 14556else 14557 ac_check_lib_save_LIBS=$LIBS 14558LIBS="-lposix4 $LIBS" 14559cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14560/* end confdefs.h. */ 14561 14562/* Override any GCC internal prototype to avoid an error. 14563 Use char because int might match the return type of a GCC 14564 builtin and then its argument prototype would still apply. */ 14565#ifdef __cplusplus 14566extern "C" 14567#endif 14568char sched_yield (); 14569int 14570main () 14571{ 14572return sched_yield (); 14573 ; 14574 return 0; 14575} 14576_ACEOF 14577if ac_fn_c_try_link "$LINENO"; then : 14578 ac_cv_lib_posix4_sched_yield=yes 14579else 14580 ac_cv_lib_posix4_sched_yield=no 14581fi 14582rm -f core conftest.err conftest.$ac_objext \ 14583 conftest$ac_exeext conftest.$ac_ext 14584LIBS=$ac_check_lib_save_LIBS 14585fi 14586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5 14587$as_echo "$ac_cv_lib_posix4_sched_yield" >&6; } 14588if test "x$ac_cv_lib_posix4_sched_yield" = xyes; then : 14589 LIB_SCHED_YIELD=-lposix4 14590fi 14591 14592fi 14593 14594 14595fi 14596rm -f core conftest.err conftest.$ac_objext \ 14597 conftest$ac_exeext conftest.$ac_ext 14598 14599 14600 gl_pthreadlib_body_done=done 14601 fi 14602 14603 if test $ac_cv_header_threads_h = yes; then 14604 for ac_func in thrd_create 14605do : 14606 ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create" 14607if test "x$ac_cv_func_thrd_create" = xyes; then : 14608 cat >>confdefs.h <<_ACEOF 14609#define HAVE_THRD_CREATE 1 14610_ACEOF 14611 14612fi 14613done 14614 14615 if test $ac_cv_func_thrd_create = yes; then 14616 LIBSTDTHREAD= 14617 else 14618 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5 14619$as_echo_n "checking for thrd_create in -lstdthreads... " >&6; } 14620if ${ac_cv_lib_stdthreads_thrd_create+:} false; then : 14621 $as_echo_n "(cached) " >&6 14622else 14623 ac_check_lib_save_LIBS=$LIBS 14624LIBS="-lstdthreads $LIBS" 14625cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14626/* end confdefs.h. */ 14627 14628/* Override any GCC internal prototype to avoid an error. 14629 Use char because int might match the return type of a GCC 14630 builtin and then its argument prototype would still apply. */ 14631#ifdef __cplusplus 14632extern "C" 14633#endif 14634char thrd_create (); 14635int 14636main () 14637{ 14638return thrd_create (); 14639 ; 14640 return 0; 14641} 14642_ACEOF 14643if ac_fn_c_try_link "$LINENO"; then : 14644 ac_cv_lib_stdthreads_thrd_create=yes 14645else 14646 ac_cv_lib_stdthreads_thrd_create=no 14647fi 14648rm -f core conftest.err conftest.$ac_objext \ 14649 conftest$ac_exeext conftest.$ac_ext 14650LIBS=$ac_check_lib_save_LIBS 14651fi 14652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5 14653$as_echo "$ac_cv_lib_stdthreads_thrd_create" >&6; } 14654if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes; then : 14655 14656 LIBSTDTHREAD='-lstdthreads -lpthread' 14657 14658else 14659 14660 LIBSTDTHREAD="$LIBPMULTITHREAD" 14661 14662fi 14663 14664 fi 14665 else 14666 LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD" 14667 fi 14668 ;; 14669 esac 14670 14671 14672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5 14673$as_echo_n "checking whether ISO C threads API is available... " >&6; } 14674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5 14675$as_echo "$ac_cv_header_threads_h" >&6; } 14676 gl_stdthreadlib_body_done=done 14677 fi 14678 14679 LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD 14680 LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD 14681 gl_threads_api=isoc 14682 14683$as_echo "#define USE_ISOC_THREADS 1" >>confdefs.h 14684 14685 fi 14686 fi 14687 if test $gl_threads_api = none; then 14688 case "$gl_use_threads" in 14689 yes | windows | win32) # The 'win32' is for backward compatibility. 14690 if { case "$host_os" in 14691 mingw*) true;; 14692 *) false;; 14693 esac 14694 }; then 14695 gl_threads_api=windows 14696 14697$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h 14698 14699 fi 14700 ;; 14701 esac 14702 fi 14703 fi 14704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5 14705$as_echo_n "checking for multithread API to use... " >&6; } 14706 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5 14707$as_echo "$gl_threads_api" >&6; } 14708 14709 14710 14711 14712 14713 14714 14715 14716 14717 14718 14719 14720 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5 14721$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; } 14722if ${gl_cv_func_malloc_posix+:} false; then : 14723 $as_echo_n "(cached) " >&6 14724else 14725 14726 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14727/* end confdefs.h. */ 14728 14729int 14730main () 14731{ 14732#if defined _WIN32 && ! defined __CYGWIN__ 14733 choke me 14734 #endif 14735 14736 ; 14737 return 0; 14738} 14739_ACEOF 14740if ac_fn_c_try_compile "$LINENO"; then : 14741 gl_cv_func_malloc_posix=yes 14742else 14743 gl_cv_func_malloc_posix=no 14744fi 14745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14746 14747fi 14748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5 14749$as_echo "$gl_cv_func_malloc_posix" >&6; } 14750 14751 14752 14753 for ac_header in stdlib.h 14754do : 14755 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" 14756if test "x$ac_cv_header_stdlib_h" = xyes; then : 14757 cat >>confdefs.h <<_ACEOF 14758#define HAVE_STDLIB_H 1 14759_ACEOF 14760 14761fi 14762 14763done 14764 14765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 14766$as_echo_n "checking for GNU libc compatible malloc... " >&6; } 14767if ${ac_cv_func_malloc_0_nonnull+:} false; then : 14768 $as_echo_n "(cached) " >&6 14769else 14770 if test "$cross_compiling" = yes; then : 14771 case "$host_os" in 14772 # Guess yes on platforms where we know the result. 14773 *-gnu* | gnu* | *-musl* | freebsd* | netbsd* | openbsd* \ 14774 | hpux* | solaris* | cygwin* | mingw*) 14775 ac_cv_func_malloc_0_nonnull="guessing yes" ;; 14776 # If we don't know, obey --enable-cross-guesses. 14777 *) ac_cv_func_malloc_0_nonnull="$gl_cross_guess_normal" ;; 14778 esac 14779 14780else 14781 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14782/* end confdefs.h. */ 14783#if defined STDC_HEADERS || defined HAVE_STDLIB_H 14784 # include <stdlib.h> 14785 #else 14786 char *malloc (); 14787 #endif 14788 14789int 14790main () 14791{ 14792char *p = malloc (0); 14793 int result = !p; 14794 free (p); 14795 return result; 14796 ; 14797 return 0; 14798} 14799 14800_ACEOF 14801if ac_fn_c_try_run "$LINENO"; then : 14802 ac_cv_func_malloc_0_nonnull=yes 14803else 14804 ac_cv_func_malloc_0_nonnull=no 14805fi 14806rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 14807 conftest.$ac_objext conftest.beam conftest.$ac_ext 14808fi 14809 14810 14811fi 14812{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 14813$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } 14814 case "$ac_cv_func_malloc_0_nonnull" in 14815 *yes) 14816 gl_cv_func_malloc_0_nonnull=1 14817 ;; 14818 *) 14819 gl_cv_func_malloc_0_nonnull=0 14820 ;; 14821 esac 14822 14823 14824cat >>confdefs.h <<_ACEOF 14825#define MALLOC_0_IS_NONNULL $gl_cv_func_malloc_0_nonnull 14826_ACEOF 14827 14828 14829 14830 14831 14832 14833 14834 14835 14836 14837 14838 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 14839$as_echo_n "checking for a traditional japanese locale... " >&6; } 14840if ${gt_cv_locale_ja+:} false; then : 14841 $as_echo_n "(cached) " >&6 14842else 14843 14844 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14845/* end confdefs.h. */ 14846 14847#include <locale.h> 14848#include <time.h> 14849#if HAVE_LANGINFO_CODESET 14850# include <langinfo.h> 14851#endif 14852#include <stdlib.h> 14853#include <string.h> 14854struct tm t; 14855char buf[16]; 14856int main () 14857{ 14858 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl 14859 imitates locale dependent behaviour by looking at the environment 14860 variables, and all locales use the UTF-8 encoding. */ 14861#if defined __BEOS__ || defined __HAIKU__ 14862 return 1; 14863#else 14864 /* Check whether the given locale name is recognized by the system. */ 14865# if defined _WIN32 && !defined __CYGWIN__ 14866 /* On native Windows, setlocale(category, "") looks at the system settings, 14867 not at the environment variables. Also, when an encoding suffix such 14868 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE 14869 category of the locale to "C". */ 14870 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL 14871 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) 14872 return 1; 14873# else 14874 if (setlocale (LC_ALL, "") == NULL) return 1; 14875# endif 14876 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". 14877 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) 14878 is empty, and the behaviour of Tcl 8.4 in this locale is not useful. 14879 On OpenBSD 4.0, when an unsupported locale is specified, setlocale() 14880 succeeds but then nl_langinfo(CODESET) is "646". In this situation, 14881 some unit tests fail. 14882 On MirBSD 10, when an unsupported locale is specified, setlocale() 14883 succeeds but then nl_langinfo(CODESET) is "UTF-8". */ 14884# if HAVE_LANGINFO_CODESET 14885 { 14886 const char *cs = nl_langinfo (CODESET); 14887 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 14888 || strcmp (cs, "UTF-8") == 0) 14889 return 1; 14890 } 14891# endif 14892# ifdef __CYGWIN__ 14893 /* On Cygwin, avoid locale names without encoding suffix, because the 14894 locale_charset() function relies on the encoding suffix. Note that 14895 LC_ALL is set on the command line. */ 14896 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; 14897# endif 14898 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales 14899 on Cygwin 1.5.x. */ 14900 if (MB_CUR_MAX == 1) 14901 return 1; 14902 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. 14903 This excludes the UTF-8 encoding (except on MirBSD). */ 14904 { 14905 const char *p; 14906 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; 14907 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; 14908 for (p = buf; *p != '\0'; p++) 14909 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) 14910 return 1; 14911 } 14912 return 0; 14913#endif 14914} 14915 14916_ACEOF 14917 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 14918 (eval $ac_link) 2>&5 14919 ac_status=$? 14920 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 14921 test $ac_status = 0; } && test -s conftest$ac_exeext; then 14922 case "$host_os" in 14923 # Handle native Windows specially, because there setlocale() interprets 14924 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", 14925 # "fr" or "fra" as "French" or "French_France.1252", 14926 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", 14927 # "ja" as "Japanese" or "Japanese_Japan.932", 14928 # and similar. 14929 mingw*) 14930 # Note that on native Windows, the Japanese locale is 14931 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we 14932 # cannot use it here. 14933 gt_cv_locale_ja=none 14934 ;; 14935 *) 14936 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because 14937 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the 14938 # configure script would override the LC_ALL setting. Likewise for 14939 # LC_CTYPE, which is also set at the beginning of the configure script. 14940 # Test for the AIX locale name. 14941 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 14942 gt_cv_locale_ja=ja_JP 14943 else 14944 # Test for the locale name with explicit encoding suffix. 14945 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 14946 gt_cv_locale_ja=ja_JP.EUC-JP 14947 else 14948 # Test for the HP-UX, OSF/1, NetBSD locale name. 14949 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 14950 gt_cv_locale_ja=ja_JP.eucJP 14951 else 14952 # Test for the IRIX, FreeBSD locale name. 14953 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 14954 gt_cv_locale_ja=ja_JP.EUC 14955 else 14956 # Test for the Solaris 7 locale name. 14957 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 14958 gt_cv_locale_ja=ja 14959 else 14960 # Special test for NetBSD 1.6. 14961 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then 14962 gt_cv_locale_ja=ja_JP.eucJP 14963 else 14964 # None found. 14965 gt_cv_locale_ja=none 14966 fi 14967 fi 14968 fi 14969 fi 14970 fi 14971 fi 14972 ;; 14973 esac 14974 fi 14975 rm -fr conftest* 14976 14977fi 14978{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 14979$as_echo "$gt_cv_locale_ja" >&6; } 14980 LOCALE_JA=$gt_cv_locale_ja 14981 14982 14983 14984 14985 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 14986$as_echo_n "checking for a french Unicode locale... " >&6; } 14987if ${gt_cv_locale_fr_utf8+:} false; then : 14988 $as_echo_n "(cached) " >&6 14989else 14990 14991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14992/* end confdefs.h. */ 14993 14994#include <locale.h> 14995#include <time.h> 14996#if HAVE_LANGINFO_CODESET 14997# include <langinfo.h> 14998#endif 14999#include <stdlib.h> 15000#include <string.h> 15001struct tm t; 15002char buf[16]; 15003int main () { 15004 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl 15005 imitates locale dependent behaviour by looking at the environment 15006 variables, and all locales use the UTF-8 encoding. */ 15007#if !(defined __BEOS__ || defined __HAIKU__) 15008 /* Check whether the given locale name is recognized by the system. */ 15009# if defined _WIN32 && !defined __CYGWIN__ 15010 /* On native Windows, setlocale(category, "") looks at the system settings, 15011 not at the environment variables. Also, when an encoding suffix such 15012 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE 15013 category of the locale to "C". */ 15014 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL 15015 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) 15016 return 1; 15017# else 15018 if (setlocale (LC_ALL, "") == NULL) return 1; 15019# endif 15020 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". 15021 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) 15022 is empty, and the behaviour of Tcl 8.4 in this locale is not useful. 15023 On OpenBSD 4.0, when an unsupported locale is specified, setlocale() 15024 succeeds but then nl_langinfo(CODESET) is "646". In this situation, 15025 some unit tests fail. */ 15026# if HAVE_LANGINFO_CODESET 15027 { 15028 const char *cs = nl_langinfo (CODESET); 15029 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) 15030 return 1; 15031 } 15032# endif 15033# ifdef __CYGWIN__ 15034 /* On Cygwin, avoid locale names without encoding suffix, because the 15035 locale_charset() function relies on the encoding suffix. Note that 15036 LC_ALL is set on the command line. */ 15037 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; 15038# endif 15039 /* Check whether in the abbreviation of the second month, the second 15040 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is 15041 two bytes long, with UTF-8 encoding. */ 15042 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; 15043 if (strftime (buf, sizeof (buf), "%b", &t) < 4 15044 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') 15045 return 1; 15046#endif 15047#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ 15048 /* Check whether the decimal separator is a comma. 15049 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point 15050 are nl_langinfo(RADIXCHAR) are both ".". */ 15051 if (localeconv () ->decimal_point[0] != ',') return 1; 15052#endif 15053 return 0; 15054} 15055 15056_ACEOF 15057 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 15058 (eval $ac_link) 2>&5 15059 ac_status=$? 15060 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 15061 test $ac_status = 0; } && test -s conftest$ac_exeext; then 15062 case "$host_os" in 15063 # Handle native Windows specially, because there setlocale() interprets 15064 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", 15065 # "fr" or "fra" as "French" or "French_France.1252", 15066 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", 15067 # "ja" as "Japanese" or "Japanese_Japan.932", 15068 # and similar. 15069 mingw*) 15070 # Test for the hypothetical native Windows locale name. 15071 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 15072 gt_cv_locale_fr_utf8=French_France.65001 15073 else 15074 # None found. 15075 gt_cv_locale_fr_utf8=none 15076 fi 15077 ;; 15078 *) 15079 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because 15080 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the 15081 # configure script would override the LC_ALL setting. Likewise for 15082 # LC_CTYPE, which is also set at the beginning of the configure script. 15083 # Test for the usual locale name. 15084 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 15085 gt_cv_locale_fr_utf8=fr_FR 15086 else 15087 # Test for the locale name with explicit encoding suffix. 15088 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 15089 gt_cv_locale_fr_utf8=fr_FR.UTF-8 15090 else 15091 # Test for the Solaris 7 locale name. 15092 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 15093 gt_cv_locale_fr_utf8=fr.UTF-8 15094 else 15095 # None found. 15096 gt_cv_locale_fr_utf8=none 15097 fi 15098 fi 15099 fi 15100 ;; 15101 esac 15102 fi 15103 rm -fr conftest* 15104 15105fi 15106{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 15107$as_echo "$gt_cv_locale_fr_utf8" >&6; } 15108 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 15109 15110 15111 15112 15113 15114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 15115$as_echo_n "checking for a transitional chinese locale... " >&6; } 15116if ${gt_cv_locale_zh_CN+:} false; then : 15117 $as_echo_n "(cached) " >&6 15118else 15119 15120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15121/* end confdefs.h. */ 15122 15123#include <locale.h> 15124#include <stdlib.h> 15125#include <time.h> 15126#if HAVE_LANGINFO_CODESET 15127# include <langinfo.h> 15128#endif 15129#include <stdlib.h> 15130#include <string.h> 15131struct tm t; 15132char buf[16]; 15133int main () 15134{ 15135 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl 15136 imitates locale dependent behaviour by looking at the environment 15137 variables, and all locales use the UTF-8 encoding. */ 15138#if defined __BEOS__ || defined __HAIKU__ 15139 return 1; 15140#else 15141 /* Check whether the given locale name is recognized by the system. */ 15142# if defined _WIN32 && !defined __CYGWIN__ 15143 /* On native Windows, setlocale(category, "") looks at the system settings, 15144 not at the environment variables. Also, when an encoding suffix such 15145 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE 15146 category of the locale to "C". */ 15147 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL 15148 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) 15149 return 1; 15150# else 15151 if (setlocale (LC_ALL, "") == NULL) return 1; 15152# endif 15153 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". 15154 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) 15155 is empty, and the behaviour of Tcl 8.4 in this locale is not useful. 15156 On OpenBSD 4.0, when an unsupported locale is specified, setlocale() 15157 succeeds but then nl_langinfo(CODESET) is "646". In this situation, 15158 some unit tests fail. 15159 On MirBSD 10, when an unsupported locale is specified, setlocale() 15160 succeeds but then nl_langinfo(CODESET) is "UTF-8". */ 15161# if HAVE_LANGINFO_CODESET 15162 { 15163 const char *cs = nl_langinfo (CODESET); 15164 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 15165 || strcmp (cs, "UTF-8") == 0) 15166 return 1; 15167 } 15168# endif 15169# ifdef __CYGWIN__ 15170 /* On Cygwin, avoid locale names without encoding suffix, because the 15171 locale_charset() function relies on the encoding suffix. Note that 15172 LC_ALL is set on the command line. */ 15173 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; 15174# endif 15175 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. 15176 This excludes the UTF-8 encoding (except on MirBSD). */ 15177 { 15178 const char *p; 15179 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; 15180 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; 15181 for (p = buf; *p != '\0'; p++) 15182 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) 15183 return 1; 15184 } 15185 /* Check whether a typical GB18030 multibyte sequence is recognized as a 15186 single wide character. This excludes the GB2312 and GBK encodings. */ 15187 if (mblen ("\203\062\332\066", 5) != 4) 15188 return 1; 15189 return 0; 15190#endif 15191} 15192 15193_ACEOF 15194 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 15195 (eval $ac_link) 2>&5 15196 ac_status=$? 15197 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 15198 test $ac_status = 0; } && test -s conftest$ac_exeext; then 15199 case "$host_os" in 15200 # Handle native Windows specially, because there setlocale() interprets 15201 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", 15202 # "fr" or "fra" as "French" or "French_France.1252", 15203 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", 15204 # "ja" as "Japanese" or "Japanese_Japan.932", 15205 # and similar. 15206 mingw*) 15207 # Test for the hypothetical native Windows locale name. 15208 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 15209 gt_cv_locale_zh_CN=Chinese_China.54936 15210 else 15211 # None found. 15212 gt_cv_locale_zh_CN=none 15213 fi 15214 ;; 15215 solaris2.8) 15216 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are 15217 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. 15218 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. 15219 gt_cv_locale_zh_CN=none 15220 ;; 15221 *) 15222 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because 15223 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the 15224 # configure script would override the LC_ALL setting. Likewise for 15225 # LC_CTYPE, which is also set at the beginning of the configure script. 15226 # Test for the locale name without encoding suffix. 15227 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 15228 gt_cv_locale_zh_CN=zh_CN 15229 else 15230 # Test for the locale name with explicit encoding suffix. 15231 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 15232 gt_cv_locale_zh_CN=zh_CN.GB18030 15233 else 15234 # None found. 15235 gt_cv_locale_zh_CN=none 15236 fi 15237 fi 15238 ;; 15239 esac 15240 else 15241 # If there was a link error, due to mblen(), the system is so old that 15242 # it certainly doesn't have a chinese locale. 15243 gt_cv_locale_zh_CN=none 15244 fi 15245 rm -fr conftest* 15246 15247fi 15248{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 15249$as_echo "$gt_cv_locale_zh_CN" >&6; } 15250 LOCALE_ZH_CN=$gt_cv_locale_zh_CN 15251 15252 15253{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 15254$as_echo_n "checking for inline... " >&6; } 15255if ${ac_cv_c_inline+:} false; then : 15256 $as_echo_n "(cached) " >&6 15257else 15258 ac_cv_c_inline=no 15259for ac_kw in inline __inline__ __inline; do 15260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15261/* end confdefs.h. */ 15262#ifndef __cplusplus 15263typedef int foo_t; 15264static $ac_kw foo_t static_foo () {return 0; } 15265$ac_kw foo_t foo () {return 0; } 15266#endif 15267 15268_ACEOF 15269if ac_fn_c_try_compile "$LINENO"; then : 15270 ac_cv_c_inline=$ac_kw 15271fi 15272rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 15273 test "$ac_cv_c_inline" != no && break 15274done 15275 15276fi 15277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 15278$as_echo "$ac_cv_c_inline" >&6; } 15279 15280case $ac_cv_c_inline in 15281 inline | yes) ;; 15282 *) 15283 case $ac_cv_c_inline in 15284 no) ac_val=;; 15285 *) ac_val=$ac_cv_c_inline;; 15286 esac 15287 cat >>confdefs.h <<_ACEOF 15288#ifndef __cplusplus 15289#define inline $ac_val 15290#endif 15291_ACEOF 15292 ;; 15293esac 15294 15295 15296 15297 15298 15299 15300 GNULIB_EXPLICIT_BZERO=0; 15301 GNULIB_FFSL=0; 15302 GNULIB_FFSLL=0; 15303 GNULIB_MEMCHR=0; 15304 GNULIB_MEMMEM=0; 15305 GNULIB_MEMPCPY=0; 15306 GNULIB_MEMRCHR=0; 15307 GNULIB_RAWMEMCHR=0; 15308 GNULIB_STPCPY=0; 15309 GNULIB_STPNCPY=0; 15310 GNULIB_STRCHRNUL=0; 15311 GNULIB_STRDUP=0; 15312 GNULIB_STRNCAT=0; 15313 GNULIB_STRNDUP=0; 15314 GNULIB_STRNLEN=0; 15315 GNULIB_STRPBRK=0; 15316 GNULIB_STRSEP=0; 15317 GNULIB_STRSTR=0; 15318 GNULIB_STRCASESTR=0; 15319 GNULIB_STRTOK_R=0; 15320 GNULIB_MBSLEN=0; 15321 GNULIB_MBSNLEN=0; 15322 GNULIB_MBSCHR=0; 15323 GNULIB_MBSRCHR=0; 15324 GNULIB_MBSSTR=0; 15325 GNULIB_MBSCASECMP=0; 15326 GNULIB_MBSNCASECMP=0; 15327 GNULIB_MBSPCASECMP=0; 15328 GNULIB_MBSCASESTR=0; 15329 GNULIB_MBSCSPN=0; 15330 GNULIB_MBSPBRK=0; 15331 GNULIB_MBSSPN=0; 15332 GNULIB_MBSSEP=0; 15333 GNULIB_MBSTOK_R=0; 15334 GNULIB_STRERROR=0; 15335 GNULIB_STRERROR_R=0; 15336 GNULIB_STRSIGNAL=0; 15337 GNULIB_STRVERSCMP=0; 15338 HAVE_MBSLEN=0; 15339 HAVE_EXPLICIT_BZERO=1; 15340 HAVE_FFSL=1; 15341 HAVE_FFSLL=1; 15342 HAVE_MEMCHR=1; 15343 HAVE_DECL_MEMMEM=1; 15344 HAVE_MEMPCPY=1; 15345 HAVE_DECL_MEMRCHR=1; 15346 HAVE_RAWMEMCHR=1; 15347 HAVE_STPCPY=1; 15348 HAVE_STPNCPY=1; 15349 HAVE_STRCHRNUL=1; 15350 HAVE_DECL_STRDUP=1; 15351 HAVE_DECL_STRNDUP=1; 15352 HAVE_DECL_STRNLEN=1; 15353 HAVE_STRPBRK=1; 15354 HAVE_STRSEP=1; 15355 HAVE_STRCASESTR=1; 15356 HAVE_DECL_STRTOK_R=1; 15357 HAVE_DECL_STRERROR_R=1; 15358 HAVE_DECL_STRSIGNAL=1; 15359 HAVE_STRVERSCMP=1; 15360 REPLACE_MEMCHR=0; 15361 REPLACE_MEMMEM=0; 15362 REPLACE_STPNCPY=0; 15363 REPLACE_STRCHRNUL=0; 15364 REPLACE_STRDUP=0; 15365 REPLACE_STRNCAT=0; 15366 REPLACE_STRNDUP=0; 15367 REPLACE_STRNLEN=0; 15368 REPLACE_STRSTR=0; 15369 REPLACE_STRCASESTR=0; 15370 REPLACE_STRTOK_R=0; 15371 REPLACE_STRERROR=0; 15372 REPLACE_STRERROR_R=0; 15373 REPLACE_STRSIGNAL=0; 15374 UNDEFINE_STRTOK_R=0; 15375 15376 15377 15378 15379 15380 15381 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it 15382 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is 15383 # irrelevant for anonymous mappings. 15384 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" 15385if test "x$ac_cv_func_mmap" = xyes; then : 15386 gl_have_mmap=yes 15387else 15388 gl_have_mmap=no 15389fi 15390 15391 15392 # Try to allow MAP_ANONYMOUS. 15393 gl_have_mmap_anonymous=no 15394 if test $gl_have_mmap = yes; then 15395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 15396$as_echo_n "checking for MAP_ANONYMOUS... " >&6; } 15397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15398/* end confdefs.h. */ 15399 15400#include <sys/mman.h> 15401#ifdef MAP_ANONYMOUS 15402 I cannot identify this map 15403#endif 15404 15405_ACEOF 15406if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 15407 $EGREP "I cannot identify this map" >/dev/null 2>&1; then : 15408 gl_have_mmap_anonymous=yes 15409fi 15410rm -f conftest* 15411 15412 if test $gl_have_mmap_anonymous != yes; then 15413 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15414/* end confdefs.h. */ 15415 15416#include <sys/mman.h> 15417#ifdef MAP_ANON 15418 I cannot identify this map 15419#endif 15420 15421_ACEOF 15422if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 15423 $EGREP "I cannot identify this map" >/dev/null 2>&1; then : 15424 15425$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h 15426 15427 gl_have_mmap_anonymous=yes 15428fi 15429rm -f conftest* 15430 15431 fi 15432 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 15433$as_echo "$gl_have_mmap_anonymous" >&6; } 15434 if test $gl_have_mmap_anonymous = yes; then 15435 15436$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h 15437 15438 fi 15439 fi 15440 15441 15442 15443 15444 15445 15446 if test $HAVE_MEMCHR = 1; then 15447 # Detect platform-specific bugs in some versions of glibc: 15448 # memchr should not dereference anything with length 0 15449 # https://bugzilla.redhat.com/show_bug.cgi?id=499689 15450 # memchr should not dereference overestimated length after a match 15451 # https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 15452 # https://sourceware.org/bugzilla/show_bug.cgi?id=10162 15453 # memchr should cast the second argument to 'unsigned char'. 15454 # This bug exists in Android 4.3. 15455 # Assume that memchr works on platforms that lack mprotect. 15456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 15457$as_echo_n "checking whether memchr works... " >&6; } 15458if ${gl_cv_func_memchr_works+:} false; then : 15459 $as_echo_n "(cached) " >&6 15460else 15461 if test "$cross_compiling" = yes; then : 15462 case "$host_os" in 15463 # Guess no on Android. 15464 linux*-android*) gl_cv_func_memchr_works="guessing no" ;; 15465 # Guess yes on bsd. 15466 *bsd*) gl_cv_func_memchr_works="guessing yes" ;; 15467 # Guess yes on native Windows. 15468 mingw*) gl_cv_func_memchr_works="guessing yes" ;; 15469 # If we don't know, obey --enable-cross-guesses. 15470 *) gl_cv_func_memchr_works="$gl_cross_guess_normal" ;; 15471 esac 15472 15473else 15474 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15475/* end confdefs.h. */ 15476 15477#include <string.h> 15478#if HAVE_SYS_MMAN_H 15479# include <fcntl.h> 15480# include <unistd.h> 15481# include <sys/types.h> 15482# include <sys/mman.h> 15483# ifndef MAP_FILE 15484# define MAP_FILE 0 15485# endif 15486#endif 15487 15488int 15489main () 15490{ 15491 15492 int result = 0; 15493 char *fence = NULL; 15494#if HAVE_SYS_MMAN_H && HAVE_MPROTECT 15495# if HAVE_MAP_ANONYMOUS 15496 const int flags = MAP_ANONYMOUS | MAP_PRIVATE; 15497 const int fd = -1; 15498# else /* !HAVE_MAP_ANONYMOUS */ 15499 const int flags = MAP_FILE | MAP_PRIVATE; 15500 int fd = open ("/dev/zero", O_RDONLY, 0666); 15501 if (fd >= 0) 15502# endif 15503 { 15504 int pagesize = getpagesize (); 15505 char *two_pages = 15506 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, 15507 flags, fd, 0); 15508 if (two_pages != (char *)(-1) 15509 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) 15510 fence = two_pages + pagesize; 15511 } 15512#endif 15513 if (fence) 15514 { 15515 if (memchr (fence, 0, 0)) 15516 result |= 1; 15517 strcpy (fence - 9, "12345678"); 15518 if (memchr (fence - 9, 0, 79) != fence - 1) 15519 result |= 2; 15520 if (memchr (fence - 1, 0, 3) != fence - 1) 15521 result |= 4; 15522 } 15523 /* Test against bug on Android 4.3. */ 15524 { 15525 char input[3]; 15526 input[0] = 'a'; 15527 input[1] = 'b'; 15528 input[2] = 'c'; 15529 if (memchr (input, 0x789abc00 | 'b', 3) != input + 1) 15530 result |= 8; 15531 } 15532 return result; 15533 15534 ; 15535 return 0; 15536} 15537_ACEOF 15538if ac_fn_c_try_run "$LINENO"; then : 15539 gl_cv_func_memchr_works=yes 15540else 15541 gl_cv_func_memchr_works=no 15542fi 15543rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 15544 conftest.$ac_objext conftest.beam conftest.$ac_ext 15545fi 15546 15547 15548fi 15549{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5 15550$as_echo "$gl_cv_func_memchr_works" >&6; } 15551 case "$gl_cv_func_memchr_works" in 15552 *yes) ;; 15553 *) REPLACE_MEMCHR=1 ;; 15554 esac 15555 fi 15556 15557ac_fn_c_check_decl "$LINENO" "memmem" "ac_cv_have_decl_memmem" "$ac_includes_default" 15558if test "x$ac_cv_have_decl_memmem" = xyes; then : 15559 ac_have_decl=1 15560else 15561 ac_have_decl=0 15562fi 15563 15564cat >>confdefs.h <<_ACEOF 15565#define HAVE_DECL_MEMMEM $ac_have_decl 15566_ACEOF 15567 15568 15569 15570 15571 15572 for ac_func in memmem 15573do : 15574 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" 15575if test "x$ac_cv_func_memmem" = xyes; then : 15576 cat >>confdefs.h <<_ACEOF 15577#define HAVE_MEMMEM 1 15578_ACEOF 15579 15580fi 15581done 15582 15583 if test $ac_cv_func_memmem = yes; then 15584 HAVE_MEMMEM=1 15585 else 15586 HAVE_MEMMEM=0 15587 fi 15588 15589 if test $ac_cv_have_decl_memmem = no; then 15590 HAVE_DECL_MEMMEM=0 15591 else 15592 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5 15593$as_echo_n "checking whether memmem works... " >&6; } 15594if ${gl_cv_func_memmem_works_always+:} false; then : 15595 $as_echo_n "(cached) " >&6 15596else 15597 if test "$cross_compiling" = yes; then : 15598 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15599/* end confdefs.h. */ 15600 15601#ifdef __GNU_LIBRARY__ 15602 #include <features.h> 15603 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \ 15604 || __GLIBC_MINOR__ > 12)) \ 15605 || (__GLIBC__ > 2)) \ 15606 || defined __UCLIBC__ 15607 Lucky user 15608 #endif 15609#elif defined __CYGWIN__ 15610 #include <cygwin/version.h> 15611 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) 15612 Lucky user 15613 #endif 15614#else 15615 Lucky user 15616#endif 15617 15618_ACEOF 15619if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 15620 $EGREP "Lucky user" >/dev/null 2>&1; then : 15621 gl_cv_func_memmem_works_always="guessing yes" 15622else 15623 gl_cv_func_memmem_works_always="$gl_cross_guess_normal" 15624fi 15625rm -f conftest* 15626 15627 15628else 15629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15630/* end confdefs.h. */ 15631 15632#include <string.h> /* for memmem */ 15633#define P "_EF_BF_BD" 15634#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P 15635#define NEEDLE P P P P P 15636 15637int 15638main () 15639{ 15640 15641 int result = 0; 15642 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE))) 15643 result |= 1; 15644 /* Check for empty needle behavior. */ 15645 { 15646 const char *haystack = "AAA"; 15647 if (memmem (haystack, 3, (const char *) 1, 0) != haystack) 15648 result |= 2; 15649 } 15650 return result; 15651 15652 ; 15653 return 0; 15654} 15655_ACEOF 15656if ac_fn_c_try_run "$LINENO"; then : 15657 gl_cv_func_memmem_works_always=yes 15658else 15659 gl_cv_func_memmem_works_always=no 15660fi 15661rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 15662 conftest.$ac_objext conftest.beam conftest.$ac_ext 15663fi 15664 15665 15666fi 15667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5 15668$as_echo "$gl_cv_func_memmem_works_always" >&6; } 15669 case "$gl_cv_func_memmem_works_always" in 15670 *yes) ;; 15671 *) 15672 REPLACE_MEMMEM=1 15673 ;; 15674 esac 15675 fi 15676 : 15677 15678ac_fn_c_check_decl "$LINENO" "memrchr" "ac_cv_have_decl_memrchr" "$ac_includes_default" 15679if test "x$ac_cv_have_decl_memrchr" = xyes; then : 15680 ac_have_decl=1 15681else 15682 ac_have_decl=0 15683fi 15684 15685cat >>confdefs.h <<_ACEOF 15686#define HAVE_DECL_MEMRCHR $ac_have_decl 15687_ACEOF 15688 15689 15690 15691 15692 15693 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <limits.h> defines MIN and MAX" >&5 15694$as_echo_n "checking whether <limits.h> defines MIN and MAX... " >&6; } 15695if ${gl_cv_minmax_in_limits_h+:} false; then : 15696 $as_echo_n "(cached) " >&6 15697else 15698 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15699/* end confdefs.h. */ 15700#include <limits.h> 15701 int x = MIN (42, 17); 15702int 15703main () 15704{ 15705 15706 ; 15707 return 0; 15708} 15709_ACEOF 15710if ac_fn_c_try_compile "$LINENO"; then : 15711 gl_cv_minmax_in_limits_h=yes 15712else 15713 gl_cv_minmax_in_limits_h=no 15714fi 15715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 15716fi 15717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_limits_h" >&5 15718$as_echo "$gl_cv_minmax_in_limits_h" >&6; } 15719 if test $gl_cv_minmax_in_limits_h = yes; then 15720 15721$as_echo "#define HAVE_MINMAX_IN_LIMITS_H 1" >>confdefs.h 15722 15723 fi 15724 15725 15726 15727 15728 15729 15730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <sys/param.h> defines MIN and MAX" >&5 15731$as_echo_n "checking whether <sys/param.h> defines MIN and MAX... " >&6; } 15732if ${gl_cv_minmax_in_sys_param_h+:} false; then : 15733 $as_echo_n "(cached) " >&6 15734else 15735 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15736/* end confdefs.h. */ 15737#include <sys/param.h> 15738 int x = MIN (42, 17); 15739int 15740main () 15741{ 15742 15743 ; 15744 return 0; 15745} 15746_ACEOF 15747if ac_fn_c_try_compile "$LINENO"; then : 15748 gl_cv_minmax_in_sys_param_h=yes 15749else 15750 gl_cv_minmax_in_sys_param_h=no 15751fi 15752rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 15753fi 15754{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_minmax_in_sys_param_h" >&5 15755$as_echo "$gl_cv_minmax_in_sys_param_h" >&6; } 15756 if test $gl_cv_minmax_in_sys_param_h = yes; then 15757 15758$as_echo "#define HAVE_MINMAX_IN_SYS_PARAM_H 1" >>confdefs.h 15759 15760 fi 15761 15762 15763 15764 15765 15766 15767 15768 15769 15770 15771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for O_CLOEXEC" >&5 15772$as_echo_n "checking for O_CLOEXEC... " >&6; } 15773if ${gl_cv_macro_O_CLOEXEC+:} false; then : 15774 $as_echo_n "(cached) " >&6 15775else 15776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15777/* end confdefs.h. */ 15778#include <fcntl.h> 15779 #ifndef O_CLOEXEC 15780 choke me; 15781 #endif 15782 15783int 15784main () 15785{ 15786return O_CLOEXEC; 15787 ; 15788 return 0; 15789} 15790_ACEOF 15791if ac_fn_c_try_compile "$LINENO"; then : 15792 gl_cv_macro_O_CLOEXEC=yes 15793else 15794 gl_cv_macro_O_CLOEXEC=no 15795fi 15796rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 15797fi 15798{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_macro_O_CLOEXEC" >&5 15799$as_echo "$gl_cv_macro_O_CLOEXEC" >&6; } 15800 15801 15802 15803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5 15804$as_echo_n "checking for promoted mode_t type... " >&6; } 15805if ${gl_cv_promoted_mode_t+:} false; then : 15806 $as_echo_n "(cached) " >&6 15807else 15808 15809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15810/* end confdefs.h. */ 15811#include <sys/types.h> 15812int 15813main () 15814{ 15815typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1]; 15816 ; 15817 return 0; 15818} 15819_ACEOF 15820if ac_fn_c_try_compile "$LINENO"; then : 15821 gl_cv_promoted_mode_t='int' 15822else 15823 gl_cv_promoted_mode_t='mode_t' 15824fi 15825rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 15826 15827fi 15828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5 15829$as_echo "$gl_cv_promoted_mode_t" >&6; } 15830 15831cat >>confdefs.h <<_ACEOF 15832#define PROMOTED_MODE_T $gl_cv_promoted_mode_t 15833_ACEOF 15834 15835 15836 15837 15838 15839 GNULIB_DPRINTF=0; 15840 GNULIB_FCLOSE=0; 15841 GNULIB_FDOPEN=0; 15842 GNULIB_FFLUSH=0; 15843 GNULIB_FGETC=0; 15844 GNULIB_FGETS=0; 15845 GNULIB_FOPEN=0; 15846 GNULIB_FPRINTF=0; 15847 GNULIB_FPRINTF_POSIX=0; 15848 GNULIB_FPURGE=0; 15849 GNULIB_FPUTC=0; 15850 GNULIB_FPUTS=0; 15851 GNULIB_FREAD=0; 15852 GNULIB_FREOPEN=0; 15853 GNULIB_FSCANF=0; 15854 GNULIB_FSEEK=0; 15855 GNULIB_FSEEKO=0; 15856 GNULIB_FTELL=0; 15857 GNULIB_FTELLO=0; 15858 GNULIB_FWRITE=0; 15859 GNULIB_GETC=0; 15860 GNULIB_GETCHAR=0; 15861 GNULIB_GETDELIM=0; 15862 GNULIB_GETLINE=0; 15863 GNULIB_OBSTACK_PRINTF=0; 15864 GNULIB_OBSTACK_PRINTF_POSIX=0; 15865 GNULIB_PCLOSE=0; 15866 GNULIB_PERROR=0; 15867 GNULIB_POPEN=0; 15868 GNULIB_PRINTF=0; 15869 GNULIB_PRINTF_POSIX=0; 15870 GNULIB_PUTC=0; 15871 GNULIB_PUTCHAR=0; 15872 GNULIB_PUTS=0; 15873 GNULIB_REMOVE=0; 15874 GNULIB_RENAME=0; 15875 GNULIB_RENAMEAT=0; 15876 GNULIB_SCANF=0; 15877 GNULIB_SNPRINTF=0; 15878 GNULIB_SPRINTF_POSIX=0; 15879 GNULIB_STDIO_H_NONBLOCKING=0; 15880 GNULIB_STDIO_H_SIGPIPE=0; 15881 GNULIB_TMPFILE=0; 15882 GNULIB_VASPRINTF=0; 15883 GNULIB_VFSCANF=0; 15884 GNULIB_VSCANF=0; 15885 GNULIB_VDPRINTF=0; 15886 GNULIB_VFPRINTF=0; 15887 GNULIB_VFPRINTF_POSIX=0; 15888 GNULIB_VPRINTF=0; 15889 GNULIB_VPRINTF_POSIX=0; 15890 GNULIB_VSNPRINTF=0; 15891 GNULIB_VSPRINTF_POSIX=0; 15892 HAVE_DECL_FPURGE=1; 15893 HAVE_DECL_FSEEKO=1; 15894 HAVE_DECL_FTELLO=1; 15895 HAVE_DECL_GETDELIM=1; 15896 HAVE_DECL_GETLINE=1; 15897 HAVE_DECL_OBSTACK_PRINTF=1; 15898 HAVE_DECL_SNPRINTF=1; 15899 HAVE_DECL_VSNPRINTF=1; 15900 HAVE_DPRINTF=1; 15901 HAVE_FSEEKO=1; 15902 HAVE_FTELLO=1; 15903 HAVE_PCLOSE=1; 15904 HAVE_POPEN=1; 15905 HAVE_RENAMEAT=1; 15906 HAVE_VASPRINTF=1; 15907 HAVE_VDPRINTF=1; 15908 REPLACE_DPRINTF=0; 15909 REPLACE_FCLOSE=0; 15910 REPLACE_FDOPEN=0; 15911 REPLACE_FFLUSH=0; 15912 REPLACE_FOPEN=0; 15913 REPLACE_FPRINTF=0; 15914 REPLACE_FPURGE=0; 15915 REPLACE_FREOPEN=0; 15916 REPLACE_FSEEK=0; 15917 REPLACE_FSEEKO=0; 15918 REPLACE_FTELL=0; 15919 REPLACE_FTELLO=0; 15920 REPLACE_GETDELIM=0; 15921 REPLACE_GETLINE=0; 15922 REPLACE_OBSTACK_PRINTF=0; 15923 REPLACE_PERROR=0; 15924 REPLACE_POPEN=0; 15925 REPLACE_PRINTF=0; 15926 REPLACE_REMOVE=0; 15927 REPLACE_RENAME=0; 15928 REPLACE_RENAMEAT=0; 15929 REPLACE_SNPRINTF=0; 15930 REPLACE_SPRINTF=0; 15931 REPLACE_STDIO_READ_FUNCS=0; 15932 REPLACE_STDIO_WRITE_FUNCS=0; 15933 REPLACE_TMPFILE=0; 15934 REPLACE_VASPRINTF=0; 15935 REPLACE_VDPRINTF=0; 15936 REPLACE_VFPRINTF=0; 15937 REPLACE_VPRINTF=0; 15938 REPLACE_VSNPRINTF=0; 15939 REPLACE_VSPRINTF=0; 15940 15941 15942 15943ac_fn_c_check_decl "$LINENO" "setenv" "ac_cv_have_decl_setenv" "$ac_includes_default" 15944if test "x$ac_cv_have_decl_setenv" = xyes; then : 15945 ac_have_decl=1 15946else 15947 ac_have_decl=0 15948fi 15949 15950cat >>confdefs.h <<_ACEOF 15951#define HAVE_DECL_SETENV $ac_have_decl 15952_ACEOF 15953 15954 15955 15956 15957 15958 15959 if test $ac_cv_have_decl_setenv = no; then 15960 HAVE_DECL_SETENV=0 15961 fi 15962 15963 15964 15965 15966 15967 for ac_header in search.h 15968do : 15969 ac_fn_c_check_header_mongrel "$LINENO" "search.h" "ac_cv_header_search_h" "$ac_includes_default" 15970if test "x$ac_cv_header_search_h" = xyes; then : 15971 cat >>confdefs.h <<_ACEOF 15972#define HAVE_SEARCH_H 1 15973_ACEOF 15974 15975fi 15976 15977done 15978 15979 for ac_func in tsearch 15980do : 15981 ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch" 15982if test "x$ac_cv_func_tsearch" = xyes; then : 15983 cat >>confdefs.h <<_ACEOF 15984#define HAVE_TSEARCH 1 15985_ACEOF 15986 15987fi 15988done 15989 15990 15991 15992 15993 GNULIB_PTHREAD_SIGMASK=0; 15994 GNULIB_RAISE=0; 15995 GNULIB_SIGNAL_H_SIGPIPE=0; 15996 GNULIB_SIGPROCMASK=0; 15997 GNULIB_SIGACTION=0; 15998 HAVE_POSIX_SIGNALBLOCKING=1; 15999 HAVE_PTHREAD_SIGMASK=1; 16000 HAVE_RAISE=1; 16001 HAVE_SIGSET_T=1; 16002 HAVE_SIGINFO_T=1; 16003 HAVE_SIGACTION=1; 16004 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; 16005 16006 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; 16007 16008 HAVE_SIGHANDLER_T=1; 16009 REPLACE_PTHREAD_SIGMASK=0; 16010 REPLACE_RAISE=0; 16011 16012 16013 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" " 16014 #include <signal.h> 16015 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */ 16016 #include <sys/types.h> 16017 16018" 16019if test "x$ac_cv_type_sigset_t" = xyes; then : 16020 16021cat >>confdefs.h <<_ACEOF 16022#define HAVE_SIGSET_T 1 16023_ACEOF 16024 16025gl_cv_type_sigset_t=yes 16026else 16027 gl_cv_type_sigset_t=no 16028fi 16029 16030 if test $gl_cv_type_sigset_t != yes; then 16031 HAVE_SIGSET_T=0 16032 fi 16033 16034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 16035$as_echo_n "checking for uid_t in sys/types.h... " >&6; } 16036if ${ac_cv_type_uid_t+:} false; then : 16037 $as_echo_n "(cached) " >&6 16038else 16039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16040/* end confdefs.h. */ 16041#include <sys/types.h> 16042 16043_ACEOF 16044if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 16045 $EGREP "uid_t" >/dev/null 2>&1; then : 16046 ac_cv_type_uid_t=yes 16047else 16048 ac_cv_type_uid_t=no 16049fi 16050rm -f conftest* 16051 16052fi 16053{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 16054$as_echo "$ac_cv_type_uid_t" >&6; } 16055if test $ac_cv_type_uid_t = no; then 16056 16057$as_echo "#define uid_t int" >>confdefs.h 16058 16059 16060$as_echo "#define gid_t int" >>confdefs.h 16061 16062fi 16063 16064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 16065$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } 16066if ${ac_cv_header_stdbool_h+:} false; then : 16067 $as_echo_n "(cached) " >&6 16068else 16069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16070/* end confdefs.h. */ 16071 16072 #include <stdbool.h> 16073 16074 #ifdef __cplusplus 16075 typedef bool Bool; 16076 #else 16077 typedef _Bool Bool; 16078 #ifndef bool 16079 "error: bool is not defined" 16080 #endif 16081 #ifndef false 16082 "error: false is not defined" 16083 #endif 16084 #if false 16085 "error: false is not 0" 16086 #endif 16087 #ifndef true 16088 "error: true is not defined" 16089 #endif 16090 #if true != 1 16091 "error: true is not 1" 16092 #endif 16093 #endif 16094 16095 #ifndef __bool_true_false_are_defined 16096 "error: __bool_true_false_are_defined is not defined" 16097 #endif 16098 16099 struct s { Bool s: 1; Bool t; bool u: 1; bool v; } s; 16100 16101 char a[true == 1 ? 1 : -1]; 16102 char b[false == 0 ? 1 : -1]; 16103 char c[__bool_true_false_are_defined == 1 ? 1 : -1]; 16104 char d[(bool) 0.5 == true ? 1 : -1]; 16105 /* See body of main program for 'e'. */ 16106 char f[(Bool) 0.0 == false ? 1 : -1]; 16107 char g[true]; 16108 char h[sizeof (Bool)]; 16109 char i[sizeof s.t]; 16110 enum { j = false, k = true, l = false * true, m = true * 256 }; 16111 /* The following fails for 16112 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ 16113 Bool n[m]; 16114 char o[sizeof n == m * sizeof n[0] ? 1 : -1]; 16115 char p[-1 - (Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; 16116 /* Catch a bug in an HP-UX C compiler. See 16117 https://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html 16118 https://lists.gnu.org/r/bug-coreutils/2005-11/msg00161.html 16119 */ 16120 Bool q = true; 16121 Bool *pq = &q; 16122 bool *qq = &q; 16123 16124int 16125main () 16126{ 16127 16128 bool e = &s; 16129 *pq |= q; *pq |= ! q; 16130 *qq |= q; *qq |= ! q; 16131 /* Refer to every declared value, to avoid compiler optimizations. */ 16132 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l 16133 + !m + !n + !o + !p + !q + !pq + !qq); 16134 16135 ; 16136 return 0; 16137} 16138_ACEOF 16139if ac_fn_c_try_compile "$LINENO"; then : 16140 ac_cv_header_stdbool_h=yes 16141else 16142 ac_cv_header_stdbool_h=no 16143fi 16144rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16145fi 16146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 16147$as_echo "$ac_cv_header_stdbool_h" >&6; } 16148 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" 16149if test "x$ac_cv_type__Bool" = xyes; then : 16150 16151cat >>confdefs.h <<_ACEOF 16152#define HAVE__BOOL 1 16153_ACEOF 16154 16155 16156fi 16157 16158 16159 16160 16161ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default" 16162if test "x$ac_cv_have_decl_strdup" = xyes; then : 16163 ac_have_decl=1 16164else 16165 ac_have_decl=0 16166fi 16167 16168cat >>confdefs.h <<_ACEOF 16169#define HAVE_DECL_STRDUP $ac_have_decl 16170_ACEOF 16171 16172 16173 REPLACE_STRERROR_0=0 16174 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5 16175$as_echo_n "checking whether strerror(0) succeeds... " >&6; } 16176if ${gl_cv_func_strerror_0_works+:} false; then : 16177 $as_echo_n "(cached) " >&6 16178else 16179 if test "$cross_compiling" = yes; then : 16180 case "$host_os" in 16181 # Guess yes on glibc systems. 16182 *-gnu* | gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; 16183 # Guess yes on musl systems. 16184 *-musl*) gl_cv_func_strerror_0_works="guessing yes" ;; 16185 # Guess yes on native Windows. 16186 mingw*) gl_cv_func_strerror_0_works="guessing yes" ;; 16187 # If we don't know, obey --enable-cross-guesses. 16188 *) gl_cv_func_strerror_0_works="$gl_cross_guess_normal" ;; 16189 esac 16190 16191else 16192 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16193/* end confdefs.h. */ 16194#include <string.h> 16195 #include <errno.h> 16196 16197int 16198main () 16199{ 16200int result = 0; 16201 char *str; 16202 errno = 0; 16203 str = strerror (0); 16204 if (!*str) result |= 1; 16205 if (errno) result |= 2; 16206 if (strstr (str, "nknown") || strstr (str, "ndefined")) 16207 result |= 4; 16208 return result; 16209 ; 16210 return 0; 16211} 16212_ACEOF 16213if ac_fn_c_try_run "$LINENO"; then : 16214 gl_cv_func_strerror_0_works=yes 16215else 16216 gl_cv_func_strerror_0_works=no 16217fi 16218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 16219 conftest.$ac_objext conftest.beam conftest.$ac_ext 16220fi 16221 16222 16223fi 16224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5 16225$as_echo "$gl_cv_func_strerror_0_works" >&6; } 16226 case "$gl_cv_func_strerror_0_works" in 16227 *yes) ;; 16228 *) 16229 REPLACE_STRERROR_0=1 16230 16231$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h 16232 16233 ;; 16234 esac 16235 16236 16237 16238 16239 16240 16241 16242 16243 16244 16245 if test $ac_cv_func_strerror_r = yes; then 16246 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then 16247 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5 16248$as_echo_n "checking for strerror_r with POSIX signature... " >&6; } 16249if ${gl_cv_func_strerror_r_posix_signature+:} false; then : 16250 $as_echo_n "(cached) " >&6 16251else 16252 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16253/* end confdefs.h. */ 16254#include <string.h> 16255 int strerror_r (int, char *, size_t); 16256 16257int 16258main () 16259{ 16260 16261 ; 16262 return 0; 16263} 16264_ACEOF 16265if ac_fn_c_try_compile "$LINENO"; then : 16266 gl_cv_func_strerror_r_posix_signature=yes 16267else 16268 gl_cv_func_strerror_r_posix_signature=no 16269fi 16270rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16271 16272fi 16273{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5 16274$as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; } 16275 if test $gl_cv_func_strerror_r_posix_signature = yes; then 16276 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5 16277$as_echo_n "checking whether strerror_r works... " >&6; } 16278if ${gl_cv_func_strerror_r_works+:} false; then : 16279 $as_echo_n "(cached) " >&6 16280else 16281 if test "$cross_compiling" = yes; then : 16282 16283 case "$host_os" in 16284 # Guess no on AIX. 16285 aix*) gl_cv_func_strerror_r_works="guessing no";; 16286 # Guess no on HP-UX. 16287 hpux*) gl_cv_func_strerror_r_works="guessing no";; 16288 # Guess no on BSD variants. 16289 *bsd*) gl_cv_func_strerror_r_works="guessing no";; 16290 # Guess yes otherwise. 16291 *) gl_cv_func_strerror_r_works="guessing yes";; 16292 esac 16293 16294else 16295 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16296/* end confdefs.h. */ 16297#include <errno.h> 16298 #include <string.h> 16299 16300int 16301main () 16302{ 16303int result = 0; 16304 char buf[79]; 16305 if (strerror_r (EACCES, buf, 0) < 0) 16306 result |= 1; 16307 errno = 0; 16308 if (strerror_r (EACCES, buf, sizeof buf) != 0) 16309 result |= 2; 16310 strcpy (buf, "Unknown"); 16311 if (strerror_r (0, buf, sizeof buf) != 0) 16312 result |= 4; 16313 if (errno) 16314 result |= 8; 16315 if (strstr (buf, "nknown") || strstr (buf, "ndefined")) 16316 result |= 0x10; 16317 errno = 0; 16318 *buf = 0; 16319 if (strerror_r (-3, buf, sizeof buf) < 0) 16320 result |= 0x20; 16321 if (errno) 16322 result |= 0x40; 16323 if (!*buf) 16324 result |= 0x80; 16325 return result; 16326 16327 ; 16328 return 0; 16329} 16330_ACEOF 16331if ac_fn_c_try_run "$LINENO"; then : 16332 gl_cv_func_strerror_r_works=yes 16333else 16334 gl_cv_func_strerror_r_works=no 16335fi 16336rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 16337 conftest.$ac_objext conftest.beam conftest.$ac_ext 16338fi 16339 16340 16341fi 16342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5 16343$as_echo "$gl_cv_func_strerror_r_works" >&6; } 16344 else 16345 16346 if test $ac_cv_func___xpg_strerror_r = yes; then 16347 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5 16348$as_echo_n "checking whether __xpg_strerror_r works... " >&6; } 16349if ${gl_cv_func_strerror_r_works+:} false; then : 16350 $as_echo_n "(cached) " >&6 16351else 16352 if test "$cross_compiling" = yes; then : 16353 gl_cv_func_strerror_r_works="$gl_cross_guess_normal" 16354 16355else 16356 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16357/* end confdefs.h. */ 16358#include <errno.h> 16359 #include <string.h> 16360 extern 16361 #ifdef __cplusplus 16362 "C" 16363 #endif 16364 int __xpg_strerror_r(int, char *, size_t); 16365 16366int 16367main () 16368{ 16369int result = 0; 16370 char buf[256] = "^"; 16371 char copy[256]; 16372 char *str = strerror (-1); 16373 strcpy (copy, str); 16374 if (__xpg_strerror_r (-2, buf, 1) == 0) 16375 result |= 1; 16376 if (*buf) 16377 result |= 2; 16378 __xpg_strerror_r (-2, buf, 256); 16379 if (strcmp (str, copy)) 16380 result |= 4; 16381 return result; 16382 16383 ; 16384 return 0; 16385} 16386_ACEOF 16387if ac_fn_c_try_run "$LINENO"; then : 16388 gl_cv_func_strerror_r_works=yes 16389else 16390 gl_cv_func_strerror_r_works=no 16391fi 16392rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 16393 conftest.$ac_objext conftest.beam conftest.$ac_ext 16394fi 16395 16396 16397fi 16398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5 16399$as_echo "$gl_cv_func_strerror_r_works" >&6; } 16400 fi 16401 fi 16402 fi 16403 fi 16404 16405ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" 16406if test "x$ac_cv_have_decl_strerror_r" = xyes; then : 16407 ac_have_decl=1 16408else 16409 ac_have_decl=0 16410fi 16411 16412cat >>confdefs.h <<_ACEOF 16413#define HAVE_DECL_STRERROR_R $ac_have_decl 16414_ACEOF 16415 16416 16417 16418 16419 16420 16421 16422 16423 16424 16425 16426 16427 16428 16429 16430 if test $gl_cv_have_include_next = yes; then 16431 gl_cv_next_string_h='<'string.h'>' 16432 else 16433 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5 16434$as_echo_n "checking absolute name of <string.h>... " >&6; } 16435if ${gl_cv_next_string_h+:} false; then : 16436 $as_echo_n "(cached) " >&6 16437else 16438 16439 16440 16441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16442/* end confdefs.h. */ 16443#include <string.h> 16444_ACEOF 16445 case "$host_os" in 16446 aix*) gl_absname_cpp="$ac_cpp -C" ;; 16447 *) gl_absname_cpp="$ac_cpp" ;; 16448 esac 16449 16450 case "$host_os" in 16451 mingw*) 16452 gl_dirsep_regex='[/\\]' 16453 ;; 16454 *) 16455 gl_dirsep_regex='\/' 16456 ;; 16457 esac 16458 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 16459 gl_header_literal_regex=`echo 'string.h' \ 16460 | sed -e "$gl_make_literal_regex_sed"` 16461 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 16462 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 16463 s|^/[^/]|//&| 16464 p 16465 q 16466 }' 16467 16468 gl_cv_absolute_string_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 16469 sed -n "$gl_absolute_header_sed"` 16470 16471 gl_header=$gl_cv_absolute_string_h 16472 gl_cv_next_string_h='"'$gl_header'"' 16473 16474 16475fi 16476{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 16477$as_echo "$gl_cv_next_string_h" >&6; } 16478 fi 16479 NEXT_STRING_H=$gl_cv_next_string_h 16480 16481 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 16482 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 16483 gl_next_as_first_directive='<'string.h'>' 16484 else 16485 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 16486 gl_next_as_first_directive=$gl_cv_next_string_h 16487 fi 16488 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive 16489 16490 16491 16492 16493 16494 16495 16496 16497 16498 16499 16500ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" 16501if test "x$ac_cv_have_decl_strnlen" = xyes; then : 16502 ac_have_decl=1 16503else 16504 ac_have_decl=0 16505fi 16506 16507cat >>confdefs.h <<_ACEOF 16508#define HAVE_DECL_STRNLEN $ac_have_decl 16509_ACEOF 16510 16511 16512 16513 16514 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then 16515 REPLACE_STRSTR=1 16516 else 16517 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5 16518$as_echo_n "checking whether strstr works... " >&6; } 16519if ${gl_cv_func_strstr_works_always+:} false; then : 16520 $as_echo_n "(cached) " >&6 16521else 16522 if test "$cross_compiling" = yes; then : 16523 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16524/* end confdefs.h. */ 16525 16526#ifdef __GNU_LIBRARY__ 16527 #include <features.h> 16528 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ 16529 || defined __UCLIBC__ 16530 Lucky user 16531 #endif 16532#elif defined __CYGWIN__ 16533 #include <cygwin/version.h> 16534 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) 16535 Lucky user 16536 #endif 16537#else 16538 Lucky user 16539#endif 16540 16541_ACEOF 16542if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 16543 $EGREP "Lucky user" >/dev/null 2>&1; then : 16544 gl_cv_func_strstr_works_always="guessing yes" 16545else 16546 gl_cv_func_strstr_works_always="$gl_cross_guess_normal" 16547fi 16548rm -f conftest* 16549 16550 16551else 16552 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16553/* end confdefs.h. */ 16554 16555#include <string.h> /* for strstr */ 16556#ifdef __GNU_LIBRARY__ 16557 #include <features.h> 16558 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28 16559 Unlucky user 16560 #endif 16561#endif 16562#define P "_EF_BF_BD" 16563#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P 16564#define NEEDLE P P P P P 16565 16566int 16567main () 16568{ 16569return !!strstr (HAYSTACK, NEEDLE); 16570 16571 ; 16572 return 0; 16573} 16574_ACEOF 16575if ac_fn_c_try_run "$LINENO"; then : 16576 gl_cv_func_strstr_works_always=yes 16577else 16578 gl_cv_func_strstr_works_always=no 16579fi 16580rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 16581 conftest.$ac_objext conftest.beam conftest.$ac_ext 16582fi 16583 16584 16585fi 16586{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5 16587$as_echo "$gl_cv_func_strstr_works_always" >&6; } 16588 case "$gl_cv_func_strstr_works_always" in 16589 *yes) ;; 16590 *) 16591 REPLACE_STRSTR=1 16592 ;; 16593 esac 16594 fi 16595 16596ac_fn_c_check_decl "$LINENO" "strtok_r" "ac_cv_have_decl_strtok_r" "$ac_includes_default" 16597if test "x$ac_cv_have_decl_strtok_r" = xyes; then : 16598 ac_have_decl=1 16599else 16600 ac_have_decl=0 16601fi 16602 16603cat >>confdefs.h <<_ACEOF 16604#define HAVE_DECL_STRTOK_R $ac_have_decl 16605_ACEOF 16606 16607 16608 16609 16610 16611 16612 16613 16614 16615 16616 16617 16618 16619$as_echo "#define _USE_STD_STAT 1" >>confdefs.h 16620 16621 16622 16623 16624 16625 16626 16627 16628 16629 16630 16631 if test $gl_cv_have_include_next = yes; then 16632 gl_cv_next_sys_types_h='<'sys/types.h'>' 16633 else 16634 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5 16635$as_echo_n "checking absolute name of <sys/types.h>... " >&6; } 16636if ${gl_cv_next_sys_types_h+:} false; then : 16637 $as_echo_n "(cached) " >&6 16638else 16639 16640 16641 16642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16643/* end confdefs.h. */ 16644#include <sys/types.h> 16645_ACEOF 16646 case "$host_os" in 16647 aix*) gl_absname_cpp="$ac_cpp -C" ;; 16648 *) gl_absname_cpp="$ac_cpp" ;; 16649 esac 16650 16651 case "$host_os" in 16652 mingw*) 16653 gl_dirsep_regex='[/\\]' 16654 ;; 16655 *) 16656 gl_dirsep_regex='\/' 16657 ;; 16658 esac 16659 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 16660 gl_header_literal_regex=`echo 'sys/types.h' \ 16661 | sed -e "$gl_make_literal_regex_sed"` 16662 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 16663 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 16664 s|^/[^/]|//&| 16665 p 16666 q 16667 }' 16668 16669 gl_cv_absolute_sys_types_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 16670 sed -n "$gl_absolute_header_sed"` 16671 16672 gl_header=$gl_cv_absolute_sys_types_h 16673 gl_cv_next_sys_types_h='"'$gl_header'"' 16674 16675 16676fi 16677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5 16678$as_echo "$gl_cv_next_sys_types_h" >&6; } 16679 fi 16680 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h 16681 16682 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 16683 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 16684 gl_next_as_first_directive='<'sys/types.h'>' 16685 else 16686 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 16687 gl_next_as_first_directive=$gl_cv_next_sys_types_h 16688 fi 16689 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive 16690 16691 16692 16693 16694 16695 16696 16697 16698 16699 16700 16701 16702 WINDOWS_STAT_INODES=0 16703 16704 16705 16706 16707 16708 16709 16710 16711 16712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5 16713$as_echo_n "checking for struct timespec in <time.h>... " >&6; } 16714if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then : 16715 $as_echo_n "(cached) " >&6 16716else 16717 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16718/* end confdefs.h. */ 16719#include <time.h> 16720 16721int 16722main () 16723{ 16724static struct timespec x; x.tv_sec = x.tv_nsec; 16725 ; 16726 return 0; 16727} 16728_ACEOF 16729if ac_fn_c_try_compile "$LINENO"; then : 16730 gl_cv_sys_struct_timespec_in_time_h=yes 16731else 16732 gl_cv_sys_struct_timespec_in_time_h=no 16733fi 16734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16735fi 16736{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 16737$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } 16738 16739 TIME_H_DEFINES_STRUCT_TIMESPEC=0 16740 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 16741 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 16742 UNISTD_H_DEFINES_STRUCT_TIMESPEC=0 16743 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then 16744 TIME_H_DEFINES_STRUCT_TIMESPEC=1 16745 else 16746 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5 16747$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; } 16748if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then : 16749 $as_echo_n "(cached) " >&6 16750else 16751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16752/* end confdefs.h. */ 16753#include <sys/time.h> 16754 16755int 16756main () 16757{ 16758static struct timespec x; x.tv_sec = x.tv_nsec; 16759 ; 16760 return 0; 16761} 16762_ACEOF 16763if ac_fn_c_try_compile "$LINENO"; then : 16764 gl_cv_sys_struct_timespec_in_sys_time_h=yes 16765else 16766 gl_cv_sys_struct_timespec_in_sys_time_h=no 16767fi 16768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16769fi 16770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 16771$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } 16772 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then 16773 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 16774 else 16775 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5 16776$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; } 16777if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then : 16778 $as_echo_n "(cached) " >&6 16779else 16780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16781/* end confdefs.h. */ 16782#include <pthread.h> 16783 16784int 16785main () 16786{ 16787static struct timespec x; x.tv_sec = x.tv_nsec; 16788 ; 16789 return 0; 16790} 16791_ACEOF 16792if ac_fn_c_try_compile "$LINENO"; then : 16793 gl_cv_sys_struct_timespec_in_pthread_h=yes 16794else 16795 gl_cv_sys_struct_timespec_in_pthread_h=no 16796fi 16797rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16798fi 16799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 16800$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } 16801 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then 16802 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 16803 else 16804 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <unistd.h>" >&5 16805$as_echo_n "checking for struct timespec in <unistd.h>... " >&6; } 16806if ${gl_cv_sys_struct_timespec_in_unistd_h+:} false; then : 16807 $as_echo_n "(cached) " >&6 16808else 16809 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16810/* end confdefs.h. */ 16811#include <unistd.h> 16812 16813int 16814main () 16815{ 16816static struct timespec x; x.tv_sec = x.tv_nsec; 16817 ; 16818 return 0; 16819} 16820_ACEOF 16821if ac_fn_c_try_compile "$LINENO"; then : 16822 gl_cv_sys_struct_timespec_in_unistd_h=yes 16823else 16824 gl_cv_sys_struct_timespec_in_unistd_h=no 16825fi 16826rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 16827fi 16828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_unistd_h" >&5 16829$as_echo "$gl_cv_sys_struct_timespec_in_unistd_h" >&6; } 16830 if test $gl_cv_sys_struct_timespec_in_unistd_h = yes; then 16831 UNISTD_H_DEFINES_STRUCT_TIMESPEC=1 16832 fi 16833 fi 16834 fi 16835 fi 16836 16837 16838 16839 16840 16841 16842 16843 16844 16845 16846 16847 16848 16849 16850 16851 16852 if test $gl_cv_have_include_next = yes; then 16853 gl_cv_next_time_h='<'time.h'>' 16854 else 16855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5 16856$as_echo_n "checking absolute name of <time.h>... " >&6; } 16857if ${gl_cv_next_time_h+:} false; then : 16858 $as_echo_n "(cached) " >&6 16859else 16860 16861 16862 16863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16864/* end confdefs.h. */ 16865#include <time.h> 16866_ACEOF 16867 case "$host_os" in 16868 aix*) gl_absname_cpp="$ac_cpp -C" ;; 16869 *) gl_absname_cpp="$ac_cpp" ;; 16870 esac 16871 16872 case "$host_os" in 16873 mingw*) 16874 gl_dirsep_regex='[/\\]' 16875 ;; 16876 *) 16877 gl_dirsep_regex='\/' 16878 ;; 16879 esac 16880 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 16881 gl_header_literal_regex=`echo 'time.h' \ 16882 | sed -e "$gl_make_literal_regex_sed"` 16883 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 16884 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 16885 s|^/[^/]|//&| 16886 p 16887 q 16888 }' 16889 16890 gl_cv_absolute_time_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 16891 sed -n "$gl_absolute_header_sed"` 16892 16893 gl_header=$gl_cv_absolute_time_h 16894 gl_cv_next_time_h='"'$gl_header'"' 16895 16896 16897fi 16898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 16899$as_echo "$gl_cv_next_time_h" >&6; } 16900 fi 16901 NEXT_TIME_H=$gl_cv_next_time_h 16902 16903 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 16904 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 16905 gl_next_as_first_directive='<'time.h'>' 16906 else 16907 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 16908 gl_next_as_first_directive=$gl_cv_next_time_h 16909 fi 16910 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive 16911 16912 16913 16914 16915 16916 16917 16918 16919 16920 16921 16922 16923ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" 16924if test "x$ac_cv_have_decl_unsetenv" = xyes; then : 16925 ac_have_decl=1 16926else 16927 ac_have_decl=0 16928fi 16929 16930cat >>confdefs.h <<_ACEOF 16931#define HAVE_DECL_UNSETENV $ac_have_decl 16932_ACEOF 16933 16934 16935 16936 16937 16938 if test $ac_cv_header_crtdefs_h = yes; then 16939 HAVE_CRTDEFS_H=1 16940 else 16941 HAVE_CRTDEFS_H=0 16942 fi 16943 16944 16945 16946 GNULIB_ISWBLANK=0; 16947 GNULIB_ISWDIGIT=0; 16948 GNULIB_ISWXDIGIT=0; 16949 GNULIB_WCTYPE=0; 16950 GNULIB_ISWCTYPE=0; 16951 GNULIB_WCTRANS=0; 16952 GNULIB_TOWCTRANS=0; 16953 HAVE_ISWBLANK=1; 16954 HAVE_WCTYPE_T=1; 16955 HAVE_WCTRANS_T=1; 16956 REPLACE_ISWBLANK=0; 16957 REPLACE_ISWDIGIT=0; 16958 REPLACE_ISWXDIGIT=0; 16959 16960 16961 16962 16963 16964 16965 16966 16967 if false; then 16968 GL_COND_LIBTOOL_TRUE= 16969 GL_COND_LIBTOOL_FALSE='#' 16970else 16971 GL_COND_LIBTOOL_TRUE='#' 16972 GL_COND_LIBTOOL_FALSE= 16973fi 16974 16975 gl_cond_libtool=false 16976 gl_libdeps= 16977 gl_ltlibdeps= 16978 gl_m4_base='import/m4' 16979 16980 16981 16982 16983 16984 16985 16986 16987 16988 16989 gl_source_base='import' 16990 16991 16992 if test $ac_cv_func_alloca_works = no; then 16993 : 16994 fi 16995 16996 # Define an additional variable used in the Makefile substitution. 16997 if test $ac_cv_working_alloca_h = yes; then 16998 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 16999$as_echo_n "checking for alloca as a compiler built-in... " >&6; } 17000if ${gl_cv_rpl_alloca+:} false; then : 17001 $as_echo_n "(cached) " >&6 17002else 17003 17004 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17005/* end confdefs.h. */ 17006 17007#if defined __GNUC__ || defined _AIX || defined _MSC_VER 17008 Need own alloca 17009#endif 17010 17011_ACEOF 17012if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 17013 $EGREP "Need own alloca" >/dev/null 2>&1; then : 17014 gl_cv_rpl_alloca=yes 17015else 17016 gl_cv_rpl_alloca=no 17017fi 17018rm -f conftest* 17019 17020 17021fi 17022{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5 17023$as_echo "$gl_cv_rpl_alloca" >&6; } 17024 if test $gl_cv_rpl_alloca = yes; then 17025 17026$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h 17027 17028 ALLOCA_H=alloca.h 17029 else 17030 ALLOCA_H= 17031 fi 17032 else 17033 ALLOCA_H=alloca.h 17034 fi 17035 17036 if test -n "$ALLOCA_H"; then 17037 GL_GENERATE_ALLOCA_H_TRUE= 17038 GL_GENERATE_ALLOCA_H_FALSE='#' 17039else 17040 GL_GENERATE_ALLOCA_H_TRUE='#' 17041 GL_GENERATE_ALLOCA_H_FALSE= 17042fi 17043 17044 17045 if test $ac_cv_working_alloca_h = yes; then 17046 HAVE_ALLOCA_H=1 17047 else 17048 HAVE_ALLOCA_H=0 17049 fi 17050 17051 17052 17053 17054 17055 17056 if test $ac_cv_header_arpa_inet_h = yes; then 17057 HAVE_ARPA_INET_H=1 17058 else 17059 HAVE_ARPA_INET_H=0 17060 fi 17061 17062 17063 17064 17065 17066 17067 17068 17069 17070 17071 if test $gl_cv_have_include_next = yes; then 17072 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>' 17073 else 17074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <arpa/inet.h>" >&5 17075$as_echo_n "checking absolute name of <arpa/inet.h>... " >&6; } 17076if ${gl_cv_next_arpa_inet_h+:} false; then : 17077 $as_echo_n "(cached) " >&6 17078else 17079 17080 if test $ac_cv_header_arpa_inet_h = yes; then 17081 17082 17083 17084 17085 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17086/* end confdefs.h. */ 17087#include <arpa/inet.h> 17088_ACEOF 17089 case "$host_os" in 17090 aix*) gl_absname_cpp="$ac_cpp -C" ;; 17091 *) gl_absname_cpp="$ac_cpp" ;; 17092 esac 17093 17094 case "$host_os" in 17095 mingw*) 17096 gl_dirsep_regex='[/\\]' 17097 ;; 17098 *) 17099 gl_dirsep_regex='\/' 17100 ;; 17101 esac 17102 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 17103 gl_header_literal_regex=`echo 'arpa/inet.h' \ 17104 | sed -e "$gl_make_literal_regex_sed"` 17105 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 17106 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 17107 s|^/[^/]|//&| 17108 p 17109 q 17110 }' 17111 17112 gl_cv_absolute_arpa_inet_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 17113 sed -n "$gl_absolute_header_sed"` 17114 17115 gl_header=$gl_cv_absolute_arpa_inet_h 17116 gl_cv_next_arpa_inet_h='"'$gl_header'"' 17117 else 17118 gl_cv_next_arpa_inet_h='<'arpa/inet.h'>' 17119 fi 17120 17121 17122fi 17123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_arpa_inet_h" >&5 17124$as_echo "$gl_cv_next_arpa_inet_h" >&6; } 17125 fi 17126 NEXT_ARPA_INET_H=$gl_cv_next_arpa_inet_h 17127 17128 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 17129 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 17130 gl_next_as_first_directive='<'arpa/inet.h'>' 17131 else 17132 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 17133 gl_next_as_first_directive=$gl_cv_next_arpa_inet_h 17134 fi 17135 NEXT_AS_FIRST_DIRECTIVE_ARPA_INET_H=$gl_next_as_first_directive 17136 17137 17138 17139 17140 17141 17142 17143 17144 17145 if test $ac_cv_header_sys_socket_h = yes; then 17146 HAVE_WS2TCPIP_H=0 17147 else 17148 if test $ac_cv_header_ws2tcpip_h = yes; then 17149 HAVE_WS2TCPIP_H=1 17150 else 17151 HAVE_WS2TCPIP_H=0 17152 fi 17153 fi 17154 17155 17156 17157 17158 17159 17160 17161 17162 17163 17164 17165 17166 17167 17168 17169 if test $ac_cv_func_btowc = no; then 17170 HAVE_BTOWC=0 17171 else 17172 17173 17174 17175 17176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(0) is correct" >&5 17177$as_echo_n "checking whether btowc(0) is correct... " >&6; } 17178if ${gl_cv_func_btowc_nul+:} false; then : 17179 $as_echo_n "(cached) " >&6 17180else 17181 17182 if test "$cross_compiling" = yes; then : 17183 17184 case "$host_os" in 17185 # Guess no on Cygwin. 17186 cygwin*) gl_cv_func_btowc_nul="guessing no" ;; 17187 # Guess yes on native Windows. 17188 mingw*) gl_cv_func_btowc_nul="guessing yes" ;; 17189 # Guess yes otherwise. 17190 *) gl_cv_func_btowc_nul="guessing yes" ;; 17191 esac 17192 17193else 17194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17195/* end confdefs.h. */ 17196 17197#include <string.h> 17198/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 17199 <wchar.h>. 17200 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 17201 included before <wchar.h>. */ 17202#include <stddef.h> 17203#include <stdio.h> 17204#include <time.h> 17205#include <wchar.h> 17206int main () 17207{ 17208 if (btowc ('\0') != 0) 17209 return 1; 17210 return 0; 17211} 17212_ACEOF 17213if ac_fn_c_try_run "$LINENO"; then : 17214 gl_cv_func_btowc_nul=yes 17215else 17216 gl_cv_func_btowc_nul=no 17217fi 17218rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 17219 conftest.$ac_objext conftest.beam conftest.$ac_ext 17220fi 17221 17222 17223fi 17224{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_nul" >&5 17225$as_echo "$gl_cv_func_btowc_nul" >&6; } 17226 17227 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether btowc(EOF) is correct" >&5 17228$as_echo_n "checking whether btowc(EOF) is correct... " >&6; } 17229if ${gl_cv_func_btowc_eof+:} false; then : 17230 $as_echo_n "(cached) " >&6 17231else 17232 17233 case "$host_os" in 17234 # Guess no on IRIX. 17235 irix*) gl_cv_func_btowc_eof="guessing no" ;; 17236 # Guess yes on native Windows. 17237 mingw*) gl_cv_func_btowc_eof="guessing yes" ;; 17238 # Guess yes otherwise. 17239 *) gl_cv_func_btowc_eof="guessing yes" ;; 17240 esac 17241 if test $LOCALE_FR != none; then 17242 if test "$cross_compiling" = yes; then : 17243 : 17244else 17245 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17246/* end confdefs.h. */ 17247 17248#include <locale.h> 17249#include <string.h> 17250/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 17251 <wchar.h>. 17252 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 17253 included before <wchar.h>. */ 17254#include <stddef.h> 17255#include <stdio.h> 17256#include <time.h> 17257#include <wchar.h> 17258int main () 17259{ 17260 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) 17261 { 17262 if (btowc (EOF) != WEOF) 17263 return 1; 17264 } 17265 return 0; 17266} 17267_ACEOF 17268if ac_fn_c_try_run "$LINENO"; then : 17269 gl_cv_func_btowc_eof=yes 17270else 17271 gl_cv_func_btowc_eof=no 17272fi 17273rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 17274 conftest.$ac_objext conftest.beam conftest.$ac_ext 17275fi 17276 17277 fi 17278 17279fi 17280{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_btowc_eof" >&5 17281$as_echo "$gl_cv_func_btowc_eof" >&6; } 17282 17283 case "$gl_cv_func_btowc_nul" in 17284 *yes) ;; 17285 *) REPLACE_BTOWC=1 ;; 17286 esac 17287 case "$gl_cv_func_btowc_eof" in 17288 *yes) ;; 17289 *) REPLACE_BTOWC=1 ;; 17290 esac 17291 fi 17292 17293 if test $HAVE_BTOWC = 0 || test $REPLACE_BTOWC = 1; then 17294 17295 17296 17297 17298 17299 17300 17301 17302 gl_LIBOBJS="$gl_LIBOBJS btowc.$ac_objext" 17303 17304 17305 : 17306 17307 fi 17308 17309 17310 17311 17312 17313 GNULIB_BTOWC=1 17314 17315 17316 17317 17318 17319$as_echo "#define GNULIB_TEST_BTOWC 1" >>confdefs.h 17320 17321 17322 17323 17324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __builtin_expect" >&5 17325$as_echo_n "checking for __builtin_expect... " >&6; } 17326if ${gl_cv___builtin_expect+:} false; then : 17327 $as_echo_n "(cached) " >&6 17328else 17329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17330/* end confdefs.h. */ 17331 17332 int 17333 main (int argc, char **argv) 17334 { 17335 argc = __builtin_expect (argc, 100); 17336 return argv[argc != 100][0]; 17337 } 17338_ACEOF 17339if ac_fn_c_try_link "$LINENO"; then : 17340 gl_cv___builtin_expect=yes 17341else 17342 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17343/* end confdefs.h. */ 17344 17345 #include <builtins.h> 17346 int 17347 main (int argc, char **argv) 17348 { 17349 argc = __builtin_expect (argc, 100); 17350 return argv[argc != 100][0]; 17351 } 17352_ACEOF 17353if ac_fn_c_try_link "$LINENO"; then : 17354 gl_cv___builtin_expect="in <builtins.h>" 17355else 17356 gl_cv___builtin_expect=no 17357fi 17358rm -f core conftest.err conftest.$ac_objext \ 17359 conftest$ac_exeext conftest.$ac_ext 17360fi 17361rm -f core conftest.err conftest.$ac_objext \ 17362 conftest$ac_exeext conftest.$ac_ext 17363fi 17364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv___builtin_expect" >&5 17365$as_echo "$gl_cv___builtin_expect" >&6; } 17366 if test "$gl_cv___builtin_expect" = yes; then 17367 $as_echo "#define HAVE___BUILTIN_EXPECT 1" >>confdefs.h 17368 17369 elif test "$gl_cv___builtin_expect" = "in <builtins.h>"; then 17370 $as_echo "#define HAVE___BUILTIN_EXPECT 2" >>confdefs.h 17371 17372 fi 17373 17374 17375 17376 17377 17378 if test $ac_cv_func_canonicalize_file_name = no; then 17379 HAVE_CANONICALIZE_FILE_NAME=0 17380 if test $ac_cv_func_realpath = no; then 17381 HAVE_REALPATH=0 17382 else 17383 case "$gl_cv_func_realpath_works" in 17384 *yes) ;; 17385 *) REPLACE_REALPATH=1 ;; 17386 esac 17387 fi 17388 else 17389 case "$gl_cv_func_realpath_works" in 17390 *yes) 17391 ;; 17392 *) 17393 REPLACE_CANONICALIZE_FILE_NAME=1 17394 REPLACE_REALPATH=1 17395 ;; 17396 esac 17397 fi 17398 17399 if test $HAVE_CANONICALIZE_FILE_NAME = 0 || test $REPLACE_CANONICALIZE_FILE_NAME = 1; then 17400 17401 17402 17403 17404 17405 17406 17407 17408 gl_LIBOBJS="$gl_LIBOBJS canonicalize-lgpl.$ac_objext" 17409 17410 fi 17411 17412 17413cat >>confdefs.h <<_ACEOF 17414#define GNULIB_CANONICALIZE_LGPL 1 17415_ACEOF 17416 17417 17418 17419 17420 17421 17422 17423 GNULIB_CANONICALIZE_FILE_NAME=1 17424 17425 17426 17427 17428 17429$as_echo "#define GNULIB_TEST_CANONICALIZE_FILE_NAME 1" >>confdefs.h 17430 17431 17432 17433 17434 17435 17436 17437 17438 GNULIB_REALPATH=1 17439 17440 17441 17442 17443 17444$as_echo "#define GNULIB_TEST_REALPATH 1" >>confdefs.h 17445 17446 17447 17448 17449 17450 17451 17452 17453 GNULIB_CHDIR=1 17454 17455 17456 17457 17458 17459$as_echo "#define GNULIB_TEST_CHDIR 1" >>confdefs.h 17460 17461 17462 17463 17464 17465 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether this system has an arbitrary file name length limit" >&5 17466$as_echo_n "checking whether this system has an arbitrary file name length limit... " >&6; } 17467if ${gl_cv_have_arbitrary_file_name_length_limit+:} false; then : 17468 $as_echo_n "(cached) " >&6 17469else 17470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17471/* end confdefs.h. */ 17472 17473/* Arrange to define PATH_MAX, like "pathmax.h" does. */ 17474#if HAVE_UNISTD_H 17475# include <unistd.h> 17476#endif 17477#include <limits.h> 17478#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN 17479# include <sys/param.h> 17480#endif 17481#if !defined PATH_MAX && defined MAXPATHLEN 17482# define PATH_MAX MAXPATHLEN 17483#endif 17484#ifdef __hpux 17485# undef PATH_MAX 17486# define PATH_MAX 1024 17487#endif 17488#if defined _WIN32 && ! defined __CYGWIN__ 17489# undef PATH_MAX 17490# define PATH_MAX 260 17491#endif 17492 17493#ifdef PATH_MAX 17494have_arbitrary_file_name_length_limit 17495#endif 17496_ACEOF 17497if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 17498 $EGREP "have_arbitrary_file_name_length_limit" >/dev/null 2>&1; then : 17499 gl_cv_have_arbitrary_file_name_length_limit=yes 17500else 17501 gl_cv_have_arbitrary_file_name_length_limit=no 17502fi 17503rm -f conftest* 17504 17505fi 17506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_arbitrary_file_name_length_limit" >&5 17507$as_echo "$gl_cv_have_arbitrary_file_name_length_limit" >&6; } 17508 17509 if test $gl_cv_have_arbitrary_file_name_length_limit = yes; then 17510 17511 17512 17513 17514 17515 17516 17517 17518 gl_LIBOBJS="$gl_LIBOBJS chdir-long.$ac_objext" 17519 17520 : 17521 fi 17522 17523 17524$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h 17525 17526 17527 17528 17529 17530 17531 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then 17532 REPLACE_CLOSE=1 17533 fi 17534 17535 17536 17537 17538 17539 17540 if test $ac_cv_header_sys_socket_h != yes; then 17541 for ac_header in winsock2.h 17542do : 17543 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" 17544if test "x$ac_cv_header_winsock2_h" = xyes; then : 17545 cat >>confdefs.h <<_ACEOF 17546#define HAVE_WINSOCK2_H 1 17547_ACEOF 17548 17549fi 17550 17551done 17552 17553 fi 17554 if test "$ac_cv_header_winsock2_h" = yes; then 17555 HAVE_WINSOCK2_H=1 17556 UNISTD_H_HAVE_WINSOCK2_H=1 17557 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 17558 else 17559 HAVE_WINSOCK2_H=0 17560 fi 17561 17562 17563 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then 17564 REPLACE_CLOSE=1 17565 fi 17566 17567 17568 if test $REPLACE_CLOSE = 0; then 17569 17570 17571 17572 if test $ac_cv_func_fchdir = no; then 17573 HAVE_FCHDIR=0 17574 fi 17575 17576 if test $HAVE_FCHDIR = 0; then 17577 REPLACE_CLOSE=1 17578 fi 17579 fi 17580 17581 17582 if test $REPLACE_CLOSE = 1; then 17583 17584 17585 17586 17587 17588 17589 17590 17591 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext" 17592 17593 fi 17594 17595 17596 17597 17598 17599 GNULIB_CLOSE=1 17600 17601 17602 17603 17604 17605$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h 17606 17607 17608 17609 17610 17611 17612 for ac_func in closedir 17613do : 17614 ac_fn_c_check_func "$LINENO" "closedir" "ac_cv_func_closedir" 17615if test "x$ac_cv_func_closedir" = xyes; then : 17616 cat >>confdefs.h <<_ACEOF 17617#define HAVE_CLOSEDIR 1 17618_ACEOF 17619 17620fi 17621done 17622 17623 if test $ac_cv_func_closedir = no; then 17624 HAVE_CLOSEDIR=0 17625 fi 17626 17627 17628 17629 17630 if test $ac_cv_func_fchdir = no; then 17631 HAVE_FCHDIR=0 17632 fi 17633 17634 if test $HAVE_FCHDIR = 0; then 17635 if test $HAVE_CLOSEDIR = 1; then 17636 REPLACE_CLOSEDIR=1 17637 fi 17638 fi 17639 17640 case $host_os,$HAVE_CLOSEDIR in 17641 os2*,1) 17642 REPLACE_CLOSEDIR=1;; 17643 esac 17644 17645 if test $HAVE_CLOSEDIR = 0 || test $REPLACE_CLOSEDIR = 1; then 17646 17647 17648 17649 17650 17651 17652 17653 17654 gl_LIBOBJS="$gl_LIBOBJS closedir.$ac_objext" 17655 17656 fi 17657 17658 17659 17660 17661 17662 GNULIB_CLOSEDIR=1 17663 17664 17665 17666 17667 17668$as_echo "#define GNULIB_TEST_CLOSEDIR 1" >>confdefs.h 17669 17670 17671 17672 17673 17674 17675 17676 17677 17678 17679 17680 17681 17682 17683 if test $gl_cv_have_include_next = yes; then 17684 gl_cv_next_ctype_h='<'ctype.h'>' 17685 else 17686 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <ctype.h>" >&5 17687$as_echo_n "checking absolute name of <ctype.h>... " >&6; } 17688if ${gl_cv_next_ctype_h+:} false; then : 17689 $as_echo_n "(cached) " >&6 17690else 17691 17692 17693 17694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17695/* end confdefs.h. */ 17696#include <ctype.h> 17697_ACEOF 17698 case "$host_os" in 17699 aix*) gl_absname_cpp="$ac_cpp -C" ;; 17700 *) gl_absname_cpp="$ac_cpp" ;; 17701 esac 17702 17703 case "$host_os" in 17704 mingw*) 17705 gl_dirsep_regex='[/\\]' 17706 ;; 17707 *) 17708 gl_dirsep_regex='\/' 17709 ;; 17710 esac 17711 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 17712 gl_header_literal_regex=`echo 'ctype.h' \ 17713 | sed -e "$gl_make_literal_regex_sed"` 17714 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 17715 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 17716 s|^/[^/]|//&| 17717 p 17718 q 17719 }' 17720 17721 gl_cv_absolute_ctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 17722 sed -n "$gl_absolute_header_sed"` 17723 17724 gl_header=$gl_cv_absolute_ctype_h 17725 gl_cv_next_ctype_h='"'$gl_header'"' 17726 17727 17728fi 17729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_ctype_h" >&5 17730$as_echo "$gl_cv_next_ctype_h" >&6; } 17731 fi 17732 NEXT_CTYPE_H=$gl_cv_next_ctype_h 17733 17734 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 17735 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 17736 gl_next_as_first_directive='<'ctype.h'>' 17737 else 17738 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 17739 gl_next_as_first_directive=$gl_cv_next_ctype_h 17740 fi 17741 NEXT_AS_FIRST_DIRECTIVE_CTYPE_H=$gl_next_as_first_directive 17742 17743 17744 17745 17746 17747 17748 17749 17750 17751 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_ino member in directory struct" >&5 17752$as_echo_n "checking for d_ino member in directory struct... " >&6; } 17753if ${gl_cv_struct_dirent_d_ino+:} false; then : 17754 $as_echo_n "(cached) " >&6 17755else 17756 if test "$cross_compiling" = yes; then : 17757 case "$host_os" in 17758 # Guess yes on glibc systems with Linux kernel. 17759 linux*-gnu*) gl_cv_struct_dirent_d_ino="guessing yes" ;; 17760 # Guess yes on musl systems with Linux kernel. 17761 linux*-musl*) gl_cv_struct_dirent_d_ino="guessing yes" ;; 17762 # Guess no on native Windows. 17763 mingw*) gl_cv_struct_dirent_d_ino="guessing no" ;; 17764 # If we don't know, obey --enable-cross-guesses. 17765 *) gl_cv_struct_dirent_d_ino="$gl_cross_guess_normal" ;; 17766 esac 17767 17768else 17769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17770/* end confdefs.h. */ 17771#include <sys/types.h> 17772 #include <sys/stat.h> 17773 #include <dirent.h> 17774 17775int 17776main () 17777{ 17778DIR *dp = opendir ("."); 17779 struct dirent *e; 17780 struct stat st; 17781 if (! dp) 17782 return 1; 17783 e = readdir (dp); 17784 if (! e) 17785 { closedir (dp); return 2; } 17786 if (lstat (e->d_name, &st) != 0) 17787 { closedir (dp); return 3; } 17788 if (e->d_ino != st.st_ino) 17789 { closedir (dp); return 4; } 17790 closedir (dp); 17791 return 0; 17792 17793 ; 17794 return 0; 17795} 17796_ACEOF 17797if ac_fn_c_try_run "$LINENO"; then : 17798 gl_cv_struct_dirent_d_ino=yes 17799else 17800 gl_cv_struct_dirent_d_ino=no 17801fi 17802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 17803 conftest.$ac_objext conftest.beam conftest.$ac_ext 17804fi 17805 17806fi 17807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_ino" >&5 17808$as_echo "$gl_cv_struct_dirent_d_ino" >&6; } 17809 case "$gl_cv_struct_dirent_d_ino" in 17810 *yes) 17811 17812$as_echo "#define D_INO_IN_DIRENT 1" >>confdefs.h 17813 17814 ;; 17815 esac 17816 17817 17818 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5 17819$as_echo_n "checking for d_type member in directory struct... " >&6; } 17820if ${gl_cv_struct_dirent_d_type+:} false; then : 17821 $as_echo_n "(cached) " >&6 17822else 17823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17824/* end confdefs.h. */ 17825 17826#include <sys/types.h> 17827#include <dirent.h> 17828 17829int 17830main () 17831{ 17832struct dirent dp; dp.d_type = 0; 17833 ; 17834 return 0; 17835} 17836_ACEOF 17837if ac_fn_c_try_link "$LINENO"; then : 17838 gl_cv_struct_dirent_d_type=yes 17839else 17840 gl_cv_struct_dirent_d_type=no 17841fi 17842rm -f core conftest.err conftest.$ac_objext \ 17843 conftest$ac_exeext conftest.$ac_ext 17844 17845 17846fi 17847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5 17848$as_echo "$gl_cv_struct_dirent_d_type" >&6; } 17849 if test $gl_cv_struct_dirent_d_type = yes; then 17850 17851$as_echo "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h 17852 17853 fi 17854 17855 17856 17857 17858 17859 17860 17861 17862 17863 17864 17865 17866 17867 17868 if test $gl_cv_have_include_next = yes; then 17869 gl_cv_next_dirent_h='<'dirent.h'>' 17870 else 17871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <dirent.h>" >&5 17872$as_echo_n "checking absolute name of <dirent.h>... " >&6; } 17873if ${gl_cv_next_dirent_h+:} false; then : 17874 $as_echo_n "(cached) " >&6 17875else 17876 17877 if test $ac_cv_header_dirent_h = yes; then 17878 17879 17880 17881 17882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17883/* end confdefs.h. */ 17884#include <dirent.h> 17885_ACEOF 17886 case "$host_os" in 17887 aix*) gl_absname_cpp="$ac_cpp -C" ;; 17888 *) gl_absname_cpp="$ac_cpp" ;; 17889 esac 17890 17891 case "$host_os" in 17892 mingw*) 17893 gl_dirsep_regex='[/\\]' 17894 ;; 17895 *) 17896 gl_dirsep_regex='\/' 17897 ;; 17898 esac 17899 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 17900 gl_header_literal_regex=`echo 'dirent.h' \ 17901 | sed -e "$gl_make_literal_regex_sed"` 17902 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 17903 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 17904 s|^/[^/]|//&| 17905 p 17906 q 17907 }' 17908 17909 gl_cv_absolute_dirent_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 17910 sed -n "$gl_absolute_header_sed"` 17911 17912 gl_header=$gl_cv_absolute_dirent_h 17913 gl_cv_next_dirent_h='"'$gl_header'"' 17914 else 17915 gl_cv_next_dirent_h='<'dirent.h'>' 17916 fi 17917 17918 17919fi 17920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_dirent_h" >&5 17921$as_echo "$gl_cv_next_dirent_h" >&6; } 17922 fi 17923 NEXT_DIRENT_H=$gl_cv_next_dirent_h 17924 17925 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 17926 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 17927 gl_next_as_first_directive='<'dirent.h'>' 17928 else 17929 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 17930 gl_next_as_first_directive=$gl_cv_next_dirent_h 17931 fi 17932 NEXT_AS_FIRST_DIRECTIVE_DIRENT_H=$gl_next_as_first_directive 17933 17934 17935 17936 17937 if test $ac_cv_header_dirent_h = yes; then 17938 HAVE_DIRENT_H=1 17939 else 17940 HAVE_DIRENT_H=0 17941 fi 17942 17943 17944 17945 17946 17947 17948 17949 17950 17951 17952 17953 for ac_func in dirfd 17954do : 17955 ac_fn_c_check_func "$LINENO" "dirfd" "ac_cv_func_dirfd" 17956if test "x$ac_cv_func_dirfd" = xyes; then : 17957 cat >>confdefs.h <<_ACEOF 17958#define HAVE_DIRFD 1 17959_ACEOF 17960 17961fi 17962done 17963 17964 ac_fn_c_check_decl "$LINENO" "dirfd" "ac_cv_have_decl_dirfd" "#include <sys/types.h> 17965 #include <dirent.h> 17966" 17967if test "x$ac_cv_have_decl_dirfd" = xyes; then : 17968 ac_have_decl=1 17969else 17970 ac_have_decl=0 17971fi 17972 17973cat >>confdefs.h <<_ACEOF 17974#define HAVE_DECL_DIRFD $ac_have_decl 17975_ACEOF 17976 17977 if test $ac_cv_have_decl_dirfd = no; then 17978 HAVE_DECL_DIRFD=0 17979 fi 17980 17981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dirfd is a macro" >&5 17982$as_echo_n "checking whether dirfd is a macro... " >&6; } 17983if ${gl_cv_func_dirfd_macro+:} false; then : 17984 $as_echo_n "(cached) " >&6 17985else 17986 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17987/* end confdefs.h. */ 17988 17989#include <sys/types.h> 17990#include <dirent.h> 17991#ifdef dirfd 17992 dirent_header_defines_dirfd 17993#endif 17994_ACEOF 17995if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 17996 $EGREP "dirent_header_defines_dirfd" >/dev/null 2>&1; then : 17997 gl_cv_func_dirfd_macro=yes 17998else 17999 gl_cv_func_dirfd_macro=no 18000fi 18001rm -f conftest* 18002 18003fi 18004{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dirfd_macro" >&5 18005$as_echo "$gl_cv_func_dirfd_macro" >&6; } 18006 18007 # Use the replacement if we have no function or macro with that name, 18008 # or if OS/2 kLIBC whose dirfd() does not work. 18009 # Replace only if the system declares dirfd already. 18010 case $ac_cv_func_dirfd,$gl_cv_func_dirfd_macro,$host_os,$ac_cv_have_decl_dirfd in 18011 no,no,*,yes | *,*,os2*,yes) 18012 REPLACE_DIRFD=1 18013 18014$as_echo "#define REPLACE_DIRFD 1" >>confdefs.h 18015;; 18016 esac 18017 18018 if test $ac_cv_func_dirfd = no && test $gl_cv_func_dirfd_macro = no \ 18019 || test $REPLACE_DIRFD = 1; then 18020 18021 18022 18023 18024 18025 18026 18027 18028 gl_LIBOBJS="$gl_LIBOBJS dirfd.$ac_objext" 18029 18030 18031 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to get the file descriptor associated with an open DIR*" >&5 18032$as_echo_n "checking how to get the file descriptor associated with an open DIR*... " >&6; } 18033if ${gl_cv_sys_dir_fd_member_name+:} false; then : 18034 $as_echo_n "(cached) " >&6 18035else 18036 18037 dirfd_save_CFLAGS=$CFLAGS 18038 for ac_expr in d_fd dd_fd; do 18039 18040 CFLAGS="$CFLAGS -DDIR_FD_MEMBER_NAME=$ac_expr" 18041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18042/* end confdefs.h. */ 18043 18044 #include <sys/types.h> 18045 #include <dirent.h> 18046int 18047main () 18048{ 18049DIR *dir_p = opendir("."); (void) dir_p->DIR_FD_MEMBER_NAME; 18050 ; 18051 return 0; 18052} 18053_ACEOF 18054if ac_fn_c_try_compile "$LINENO"; then : 18055 dir_fd_found=yes 18056 18057fi 18058rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 18059 CFLAGS=$dirfd_save_CFLAGS 18060 test "$dir_fd_found" = yes && break 18061 done 18062 test "$dir_fd_found" = yes || ac_expr=no_such_member 18063 18064 gl_cv_sys_dir_fd_member_name=$ac_expr 18065 18066 18067fi 18068{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_dir_fd_member_name" >&5 18069$as_echo "$gl_cv_sys_dir_fd_member_name" >&6; } 18070 if test $gl_cv_sys_dir_fd_member_name != no_such_member; then 18071 18072cat >>confdefs.h <<_ACEOF 18073#define DIR_FD_MEMBER_NAME $gl_cv_sys_dir_fd_member_name 18074_ACEOF 18075 18076 fi 18077 18078 18079 fi 18080 18081 18082 18083 18084 18085 GNULIB_DIRFD=1 18086 18087 18088 18089 18090 18091$as_echo "#define GNULIB_TEST_DIRFD 1" >>confdefs.h 18092 18093 18094 18095 18096 18097 18098 18099 18100 18101 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 18102$as_echo_n "checking whether // is distinct from /... " >&6; } 18103if ${gl_cv_double_slash_root+:} false; then : 18104 $as_echo_n "(cached) " >&6 18105else 18106 if test x"$cross_compiling" = xyes ; then 18107 # When cross-compiling, there is no way to tell whether // is special 18108 # short of a list of hosts. However, the only known hosts to date 18109 # that have a distinct // are Apollo DomainOS (too old to port to), 18110 # Cygwin, and z/OS. If anyone knows of another system for which // has 18111 # special semantics and is distinct from /, please report it to 18112 # <bug-gnulib@gnu.org>. 18113 case $host in 18114 *-cygwin | i370-ibm-openedition) 18115 gl_cv_double_slash_root=yes ;; 18116 *) 18117 # Be optimistic and assume that / and // are the same when we 18118 # don't know. 18119 gl_cv_double_slash_root='unknown, assuming no' ;; 18120 esac 18121 else 18122 set x `ls -di / // 2>/dev/null` 18123 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then 18124 gl_cv_double_slash_root=no 18125 else 18126 gl_cv_double_slash_root=yes 18127 fi 18128 fi 18129fi 18130{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 18131$as_echo "$gl_cv_double_slash_root" >&6; } 18132 if test "$gl_cv_double_slash_root" = yes; then 18133 18134$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h 18135 18136 fi 18137 18138 18139 18140 18141 18142 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then 18143 REPLACE_DUP=1 18144 fi 18145 18146 18147 18148 18149 18150 if test $ac_cv_func_fchdir = no; then 18151 HAVE_FCHDIR=0 18152 fi 18153 18154 if test $HAVE_FCHDIR = 0; then 18155 REPLACE_DUP=1 18156 fi 18157 18158 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup works" >&5 18159$as_echo_n "checking whether dup works... " >&6; } 18160if ${gl_cv_func_dup_works+:} false; then : 18161 $as_echo_n "(cached) " >&6 18162else 18163 if test "$cross_compiling" = yes; then : 18164 case "$host_os" in 18165 # Guess no on native Windows. 18166 mingw*) gl_cv_func_dup_works="guessing no" ;; 18167 *) gl_cv_func_dup_works="guessing yes" ;; 18168 esac 18169 18170else 18171 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18172/* end confdefs.h. */ 18173#include <unistd.h> 18174 #include <fcntl.h> 18175 #include <errno.h> 18176int 18177main () 18178{ 18179/* On OS/2 kLIBC, dup does not work on a directory fd. */ 18180 int fd = open (".", O_RDONLY); 18181 return fd < 0 ? 1 : dup (fd) < 0 ? 2 : 0; 18182 18183 ; 18184 return 0; 18185} 18186 18187_ACEOF 18188if ac_fn_c_try_run "$LINENO"; then : 18189 gl_cv_func_dup_works=yes 18190else 18191 gl_cv_func_dup_works=no 18192fi 18193rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 18194 conftest.$ac_objext conftest.beam conftest.$ac_ext 18195fi 18196 18197 18198fi 18199{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup_works" >&5 18200$as_echo "$gl_cv_func_dup_works" >&6; } 18201 case "$gl_cv_func_dup_works" in 18202 *yes) ;; 18203 *) 18204 REPLACE_DUP=1 18205 ;; 18206 esac 18207 18208 if test $REPLACE_DUP = 1; then 18209 18210 18211 18212 18213 18214 18215 18216 18217 gl_LIBOBJS="$gl_LIBOBJS dup.$ac_objext" 18218 18219 : 18220 fi 18221 18222 18223 18224 18225 18226 GNULIB_DUP=1 18227 18228 18229 18230 18231 18232$as_echo "#define GNULIB_TEST_DUP 1" >>confdefs.h 18233 18234 18235 18236 18237 18238 18239 18240 18241$as_echo "#define HAVE_DUP2 1" >>confdefs.h 18242 18243 18244 if test $HAVE_DUP2 = 1; then 18245 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5 18246$as_echo_n "checking whether dup2 works... " >&6; } 18247if ${gl_cv_func_dup2_works+:} false; then : 18248 $as_echo_n "(cached) " >&6 18249else 18250 if test "$cross_compiling" = yes; then : 18251 case "$host_os" in 18252 mingw*) # on this platform, dup2 always returns 0 for success 18253 gl_cv_func_dup2_works="guessing no" ;; 18254 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 18255 gl_cv_func_dup2_works="guessing no" ;; 18256 aix* | freebsd*) 18257 # on AIX 7.1 and FreeBSD 6.1, dup2 (1,toobig) gives EMFILE, 18258 # not EBADF. 18259 gl_cv_func_dup2_works="guessing no" ;; 18260 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. 18261 gl_cv_func_dup2_works="guessing no" ;; 18262 *-android*) # implemented using dup3(), which fails if oldfd == newfd 18263 gl_cv_func_dup2_works="guessing no" ;; 18264 os2*) # on OS/2 kLIBC, dup2() does not work on a directory fd. 18265 gl_cv_func_dup2_works="guessing no" ;; 18266 *) gl_cv_func_dup2_works="guessing yes" ;; 18267 esac 18268else 18269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18270/* end confdefs.h. */ 18271 18272 #include <errno.h> 18273 #include <fcntl.h> 18274 #include <limits.h> 18275 #include <sys/resource.h> 18276 #include <unistd.h> 18277 #ifndef RLIM_SAVED_CUR 18278 # define RLIM_SAVED_CUR RLIM_INFINITY 18279 #endif 18280 #ifndef RLIM_SAVED_MAX 18281 # define RLIM_SAVED_MAX RLIM_INFINITY 18282 #endif 18283 18284int 18285main () 18286{ 18287int result = 0; 18288 int bad_fd = INT_MAX; 18289 struct rlimit rlim; 18290 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0 18291 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX 18292 && rlim.rlim_cur != RLIM_INFINITY 18293 && rlim.rlim_cur != RLIM_SAVED_MAX 18294 && rlim.rlim_cur != RLIM_SAVED_CUR) 18295 bad_fd = rlim.rlim_cur; 18296 #ifdef FD_CLOEXEC 18297 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) 18298 result |= 1; 18299 #endif 18300 if (dup2 (1, 1) != 1) 18301 result |= 2; 18302 #ifdef FD_CLOEXEC 18303 if (fcntl (1, F_GETFD) != FD_CLOEXEC) 18304 result |= 4; 18305 #endif 18306 close (0); 18307 if (dup2 (0, 0) != -1) 18308 result |= 8; 18309 /* Many gnulib modules require POSIX conformance of EBADF. */ 18310 if (dup2 (2, bad_fd) == -1 && errno != EBADF) 18311 result |= 16; 18312 /* Flush out some cygwin core dumps. */ 18313 if (dup2 (2, -1) != -1 || errno != EBADF) 18314 result |= 32; 18315 dup2 (2, 255); 18316 dup2 (2, 256); 18317 /* On OS/2 kLIBC, dup2() does not work on a directory fd. */ 18318 { 18319 int fd = open (".", O_RDONLY); 18320 if (fd == -1) 18321 result |= 64; 18322 else if (dup2 (fd, fd + 1) == -1) 18323 result |= 128; 18324 18325 close (fd); 18326 } 18327 return result; 18328 ; 18329 return 0; 18330} 18331 18332_ACEOF 18333if ac_fn_c_try_run "$LINENO"; then : 18334 gl_cv_func_dup2_works=yes 18335else 18336 gl_cv_func_dup2_works=no 18337fi 18338rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 18339 conftest.$ac_objext conftest.beam conftest.$ac_ext 18340fi 18341 18342 18343fi 18344{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 18345$as_echo "$gl_cv_func_dup2_works" >&6; } 18346 case "$gl_cv_func_dup2_works" in 18347 *yes) ;; 18348 *) 18349 REPLACE_DUP2=1 18350 for ac_func in setdtablesize 18351do : 18352 ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize" 18353if test "x$ac_cv_func_setdtablesize" = xyes; then : 18354 cat >>confdefs.h <<_ACEOF 18355#define HAVE_SETDTABLESIZE 1 18356_ACEOF 18357 18358fi 18359done 18360 18361 ;; 18362 esac 18363 fi 18364 18365 18366 18367 18368 if test $ac_cv_func_fchdir = no; then 18369 HAVE_FCHDIR=0 18370 fi 18371 18372 if test $HAVE_FCHDIR = 0; then 18373 if test $HAVE_DUP2 = 1; then 18374 REPLACE_DUP2=1 18375 fi 18376 fi 18377 18378 18379 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then 18380 18381 18382 18383 18384 18385 18386 18387 18388 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" 18389 18390 18391 fi 18392 18393 18394 18395 18396 18397 GNULIB_DUP2=1 18398 18399 18400 18401 18402 18403$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h 18404 18405 18406 18407 18408 18409 18410 18411 18412 18413 GNULIB_ENVIRON=1 18414 18415 18416 18417 18418 18419$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h 18420 18421 18422 18423 18424 18425 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 18426$as_echo_n "checking for error_at_line... " >&6; } 18427if ${ac_cv_lib_error_at_line+:} false; then : 18428 $as_echo_n "(cached) " >&6 18429else 18430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18431/* end confdefs.h. */ 18432#include <error.h> 18433int 18434main () 18435{ 18436error_at_line (0, 0, "", 0, "an error occurred"); 18437 ; 18438 return 0; 18439} 18440_ACEOF 18441if ac_fn_c_try_link "$LINENO"; then : 18442 ac_cv_lib_error_at_line=yes 18443else 18444 ac_cv_lib_error_at_line=no 18445fi 18446rm -f core conftest.err conftest.$ac_objext \ 18447 conftest$ac_exeext conftest.$ac_ext 18448fi 18449{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 18450$as_echo "$ac_cv_lib_error_at_line" >&6; } 18451 18452 if test $ac_cv_lib_error_at_line = no; then 18453 18454 18455 18456 18457 18458 18459 18460 18461 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext" 18462 18463 18464 18465 : 18466 18467 fi 18468 18469 18470 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format" 18471 18472 18473 18474 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format" 18475 18476 18477 18478 18479 18480 18481 18482 if test $ac_cv_have_decl_fchdir = no; then 18483 HAVE_DECL_FCHDIR=0 18484 fi 18485 18486 18487 if test $HAVE_FCHDIR = 0; then 18488 18489 18490 18491 18492 18493 18494 18495 18496 gl_LIBOBJS="$gl_LIBOBJS fchdir.$ac_objext" 18497 18498 : 18499 18500$as_echo "#define REPLACE_FCHDIR 1" >>confdefs.h 18501 18502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open can visit directories" >&5 18503$as_echo_n "checking whether open can visit directories... " >&6; } 18504if ${gl_cv_func_open_directory_works+:} false; then : 18505 $as_echo_n "(cached) " >&6 18506else 18507 if test "$cross_compiling" = yes; then : 18508 case "$host_os" in 18509 # Guess yes on Linux systems. 18510 linux-* | linux) gl_cv_func_open_directory_works="guessing yes" ;; 18511 # Guess yes on glibc systems. 18512 *-gnu* | gnu*) gl_cv_func_open_directory_works="guessing yes" ;; 18513 # Guess no on native Windows. 18514 mingw*) gl_cv_func_open_directory_works="guessing no" ;; 18515 # If we don't know, obey --enable-cross-guesses. 18516 *) gl_cv_func_open_directory_works="$gl_cross_guess_normal" ;; 18517 esac 18518 18519else 18520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18521/* end confdefs.h. */ 18522#include <fcntl.h> 18523 18524int 18525main () 18526{ 18527return open(".", O_RDONLY) < 0; 18528 ; 18529 return 0; 18530} 18531_ACEOF 18532if ac_fn_c_try_run "$LINENO"; then : 18533 gl_cv_func_open_directory_works=yes 18534else 18535 gl_cv_func_open_directory_works=no 18536fi 18537rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 18538 conftest.$ac_objext conftest.beam conftest.$ac_ext 18539fi 18540 18541fi 18542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_directory_works" >&5 18543$as_echo "$gl_cv_func_open_directory_works" >&6; } 18544 case "$gl_cv_func_open_directory_works" in 18545 *yes) ;; 18546 *) 18547 18548$as_echo "#define REPLACE_OPEN_DIRECTORY 1" >>confdefs.h 18549 18550 ;; 18551 esac 18552 fi 18553 18554 18555 18556 18557 18558 18559 GNULIB_FCHDIR=1 18560 18561 18562 18563 18564 18565$as_echo "#define GNULIB_TEST_FCHDIR 1" >>confdefs.h 18566 18567 18568 18569 18570 18571 18572 18573 18574 if test $ac_cv_func_fcntl = no; then 18575 18576 18577 18578 if test $ac_cv_func_fcntl = no; then 18579 HAVE_FCNTL=0 18580 else 18581 REPLACE_FCNTL=1 18582 fi 18583 18584 else 18585 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5 18586$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; } 18587if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then : 18588 $as_echo_n "(cached) " >&6 18589else 18590 if test "$cross_compiling" = yes; then : 18591 case $host_os in 18592 aix* | cygwin* | haiku*) 18593 gl_cv_func_fcntl_f_dupfd_works="guessing no" ;; 18594 *) gl_cv_func_fcntl_f_dupfd_works="guessing yes" ;; 18595 esac 18596else 18597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18598/* end confdefs.h. */ 18599#include <errno.h> 18600 #include <fcntl.h> 18601 #include <limits.h> 18602 #include <sys/resource.h> 18603 #include <unistd.h> 18604 #ifndef RLIM_SAVED_CUR 18605 # define RLIM_SAVED_CUR RLIM_INFINITY 18606 #endif 18607 #ifndef RLIM_SAVED_MAX 18608 # define RLIM_SAVED_MAX RLIM_INFINITY 18609 #endif 18610 18611int 18612main () 18613{ 18614int result = 0; 18615 int bad_fd = INT_MAX; 18616 struct rlimit rlim; 18617 if (getrlimit (RLIMIT_NOFILE, &rlim) == 0 18618 && 0 <= rlim.rlim_cur && rlim.rlim_cur <= INT_MAX 18619 && rlim.rlim_cur != RLIM_INFINITY 18620 && rlim.rlim_cur != RLIM_SAVED_MAX 18621 && rlim.rlim_cur != RLIM_SAVED_CUR) 18622 bad_fd = rlim.rlim_cur; 18623 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; 18624 if (errno != EINVAL) result |= 2; 18625 if (fcntl (0, F_DUPFD, bad_fd) != -1) result |= 4; 18626 if (errno != EINVAL) result |= 8; 18627 /* On OS/2 kLIBC, F_DUPFD does not work on a directory fd */ 18628 { 18629 int fd; 18630 fd = open (".", O_RDONLY); 18631 if (fd == -1) 18632 result |= 16; 18633 else if (fcntl (fd, F_DUPFD, STDERR_FILENO + 1) == -1) 18634 result |= 32; 18635 18636 close (fd); 18637 } 18638 return result; 18639 ; 18640 return 0; 18641} 18642_ACEOF 18643if ac_fn_c_try_run "$LINENO"; then : 18644 gl_cv_func_fcntl_f_dupfd_works=yes 18645else 18646 gl_cv_func_fcntl_f_dupfd_works=no 18647fi 18648rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 18649 conftest.$ac_objext conftest.beam conftest.$ac_ext 18650fi 18651 18652fi 18653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5 18654$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; } 18655 case $gl_cv_func_fcntl_f_dupfd_works in 18656 *yes) ;; 18657 *) 18658 18659 18660 if test $ac_cv_func_fcntl = no; then 18661 HAVE_FCNTL=0 18662 else 18663 REPLACE_FCNTL=1 18664 fi 18665 18666 18667$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h 18668 ;; 18669 esac 18670 18671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5 18672$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; } 18673if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then : 18674 $as_echo_n "(cached) " >&6 18675else 18676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18677/* end confdefs.h. */ 18678 18679#include <fcntl.h> 18680#ifndef F_DUPFD_CLOEXEC 18681choke me 18682#endif 18683 18684int 18685main () 18686{ 18687 18688 ; 18689 return 0; 18690} 18691_ACEOF 18692if ac_fn_c_try_compile "$LINENO"; then : 18693 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18694/* end confdefs.h. */ 18695 18696#ifdef __linux__ 18697/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace 18698 it to support the semantics on older kernels that failed with EINVAL. */ 18699choke me 18700#endif 18701 18702int 18703main () 18704{ 18705 18706 ; 18707 return 0; 18708} 18709_ACEOF 18710if ac_fn_c_try_compile "$LINENO"; then : 18711 gl_cv_func_fcntl_f_dupfd_cloexec=yes 18712else 18713 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check" 18714fi 18715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 18716else 18717 gl_cv_func_fcntl_f_dupfd_cloexec=no 18718fi 18719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 18720fi 18721{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5 18722$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; } 18723 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then 18724 18725 18726 18727 if test $ac_cv_func_fcntl = no; then 18728 HAVE_FCNTL=0 18729 else 18730 REPLACE_FCNTL=1 18731 fi 18732 18733 fi 18734 fi 18735 18736 18737 18738 18739 if test $ac_cv_func_fchdir = no; then 18740 HAVE_FCHDIR=0 18741 fi 18742 18743 if test $HAVE_FCHDIR = 0; then 18744 18745 18746 18747 if test $ac_cv_func_fcntl = no; then 18748 HAVE_FCNTL=0 18749 else 18750 REPLACE_FCNTL=1 18751 fi 18752 18753 fi 18754 18755 18756 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then 18757 18758 18759 18760 18761 18762 18763 18764 18765 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" 18766 18767 fi 18768 18769 18770 18771 18772 18773 GNULIB_FCNTL=1 18774 18775 18776 18777 18778 18779$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h 18780 18781 18782 18783 18784 18785 18786 18787 18788 18789 18790 18791 18792 18793 18794 if test $gl_cv_have_include_next = yes; then 18795 gl_cv_next_fcntl_h='<'fcntl.h'>' 18796 else 18797 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5 18798$as_echo_n "checking absolute name of <fcntl.h>... " >&6; } 18799if ${gl_cv_next_fcntl_h+:} false; then : 18800 $as_echo_n "(cached) " >&6 18801else 18802 18803 18804 18805 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18806/* end confdefs.h. */ 18807#include <fcntl.h> 18808_ACEOF 18809 case "$host_os" in 18810 aix*) gl_absname_cpp="$ac_cpp -C" ;; 18811 *) gl_absname_cpp="$ac_cpp" ;; 18812 esac 18813 18814 case "$host_os" in 18815 mingw*) 18816 gl_dirsep_regex='[/\\]' 18817 ;; 18818 *) 18819 gl_dirsep_regex='\/' 18820 ;; 18821 esac 18822 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 18823 gl_header_literal_regex=`echo 'fcntl.h' \ 18824 | sed -e "$gl_make_literal_regex_sed"` 18825 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 18826 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 18827 s|^/[^/]|//&| 18828 p 18829 q 18830 }' 18831 18832 gl_cv_absolute_fcntl_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 18833 sed -n "$gl_absolute_header_sed"` 18834 18835 gl_header=$gl_cv_absolute_fcntl_h 18836 gl_cv_next_fcntl_h='"'$gl_header'"' 18837 18838 18839fi 18840{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5 18841$as_echo "$gl_cv_next_fcntl_h" >&6; } 18842 fi 18843 NEXT_FCNTL_H=$gl_cv_next_fcntl_h 18844 18845 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 18846 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 18847 gl_next_as_first_directive='<'fcntl.h'>' 18848 else 18849 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 18850 gl_next_as_first_directive=$gl_cv_next_fcntl_h 18851 fi 18852 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive 18853 18854 18855 18856 18857 18858 18859 18860 18861 18862 18863 18864 18865 18866 18867 18868cat >>confdefs.h <<_ACEOF 18869#define GNULIB_FD_SAFER_FLAG 1 18870_ACEOF 18871 18872 18873 18874 18875 18876 18877 18878 ac_fn_c_check_decl "$LINENO" "fdopendir" "ac_cv_have_decl_fdopendir" " 18879#include <dirent.h> 18880 18881" 18882if test "x$ac_cv_have_decl_fdopendir" = xyes; then : 18883 ac_have_decl=1 18884else 18885 ac_have_decl=0 18886fi 18887 18888cat >>confdefs.h <<_ACEOF 18889#define HAVE_DECL_FDOPENDIR $ac_have_decl 18890_ACEOF 18891if test $ac_have_decl = 1; then : 18892 18893else 18894 HAVE_DECL_FDOPENDIR=0 18895fi 18896 18897 18898 if test $ac_cv_func_fdopendir = no; then 18899 HAVE_FDOPENDIR=0 18900 else 18901 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fdopendir works" >&5 18902$as_echo_n "checking whether fdopendir works... " >&6; } 18903if ${gl_cv_func_fdopendir_works+:} false; then : 18904 $as_echo_n "(cached) " >&6 18905else 18906 if test "$cross_compiling" = yes; then : 18907 case "$host_os" in 18908 # Guess yes on glibc systems. 18909 *-gnu*) gl_cv_func_fdopendir_works="guessing yes" ;; 18910 # Guess yes on musl systems. 18911 *-musl*) gl_cv_func_fdopendir_works="guessing yes" ;; 18912 # Guess yes on bsd. 18913 *bsd*) gl_cv_func_fdopendir_works="guessing yes" ;; 18914 # If we don't know, obey --enable-cross-guesses. 18915 *) gl_cv_func_fdopendir_works="$gl_cross_guess_normal" ;; 18916 esac 18917 18918else 18919 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18920/* end confdefs.h. */ 18921 18922#include <dirent.h> 18923#include <fcntl.h> 18924#include <unistd.h> 18925#if !HAVE_DECL_FDOPENDIR 18926extern 18927# ifdef __cplusplus 18928"C" 18929# endif 18930DIR *fdopendir (int); 18931#endif 18932 18933int 18934main () 18935{ 18936int result = 0; 18937 int fd = open ("conftest.c", O_RDONLY); 18938 if (fd < 0) result |= 1; 18939 if (fdopendir (fd)) result |= 2; 18940 if (close (fd)) result |= 4; 18941 return result; 18942 ; 18943 return 0; 18944} 18945_ACEOF 18946if ac_fn_c_try_run "$LINENO"; then : 18947 gl_cv_func_fdopendir_works=yes 18948else 18949 gl_cv_func_fdopendir_works=no 18950fi 18951rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 18952 conftest.$ac_objext conftest.beam conftest.$ac_ext 18953fi 18954 18955fi 18956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fdopendir_works" >&5 18957$as_echo "$gl_cv_func_fdopendir_works" >&6; } 18958 case "$gl_cv_func_fdopendir_works" in 18959 *yes) ;; 18960 *) 18961 REPLACE_FDOPENDIR=1 18962 ;; 18963 esac 18964 fi 18965 18966 if test $HAVE_FDOPENDIR = 0 || test $REPLACE_FDOPENDIR = 1; then 18967 18968 18969 18970 18971 18972 18973 18974 18975 gl_LIBOBJS="$gl_LIBOBJS fdopendir.$ac_objext" 18976 18977 fi 18978 18979 18980 18981 18982 18983 GNULIB_FDOPENDIR=1 18984 18985 18986 18987 18988 18989$as_echo "#define GNULIB_TEST_FDOPENDIR 1" >>confdefs.h 18990 18991 18992 18993 18994 18995cat >>confdefs.h <<_ACEOF 18996#define GNULIB_FDOPENDIR 1 18997_ACEOF 18998 18999 19000 19001 19002 19003 19004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5 19005$as_echo_n "checking for flexible array member... " >&6; } 19006if ${ac_cv_c_flexmember+:} false; then : 19007 $as_echo_n "(cached) " >&6 19008else 19009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19010/* end confdefs.h. */ 19011#include <stdlib.h> 19012 #include <stdio.h> 19013 #include <stddef.h> 19014 struct m { struct m *next, **list; char name[]; }; 19015 struct s { struct s *p; struct m *m; int n; double d[]; }; 19016int 19017main () 19018{ 19019int m = getchar (); 19020 size_t nbytes = offsetof (struct s, d) + m * sizeof (double); 19021 nbytes += sizeof (struct s) - 1; 19022 nbytes -= nbytes % sizeof (struct s); 19023 struct s *p = malloc (nbytes); 19024 p->p = p; 19025 p->m = NULL; 19026 p->d[0] = 0.0; 19027 return p->d != (double *) NULL; 19028 ; 19029 return 0; 19030} 19031_ACEOF 19032if ac_fn_c_try_compile "$LINENO"; then : 19033 ac_cv_c_flexmember=yes 19034else 19035 ac_cv_c_flexmember=no 19036fi 19037rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19038fi 19039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5 19040$as_echo "$ac_cv_c_flexmember" >&6; } 19041 if test $ac_cv_c_flexmember = yes; then 19042 19043$as_echo "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h 19044 19045 else 19046 $as_echo "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h 19047 19048 fi 19049 19050 19051 19052 19053 FLOAT_H= 19054 REPLACE_FLOAT_LDBL=0 19055 case "$host_os" in 19056 aix* | beos* | openbsd* | mirbsd* | irix*) 19057 FLOAT_H=float.h 19058 ;; 19059 freebsd* | dragonfly*) 19060 case "$host_cpu" in 19061 i[34567]86 ) 19062 FLOAT_H=float.h 19063 ;; 19064 x86_64 ) 19065 # On x86_64 systems, the C compiler may still be generating 19066 # 32-bit code. 19067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19068/* end confdefs.h. */ 19069#if defined __LP64__ || defined __x86_64__ || defined __amd64__ 19070 int ok; 19071 #else 19072 error fail 19073 #endif 19074 19075_ACEOF 19076if ac_fn_c_try_compile "$LINENO"; then : 19077 19078else 19079 FLOAT_H=float.h 19080fi 19081rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19082 ;; 19083 esac 19084 ;; 19085 linux*) 19086 case "$host_cpu" in 19087 powerpc*) 19088 FLOAT_H=float.h 19089 ;; 19090 esac 19091 ;; 19092 esac 19093 case "$host_os" in 19094 aix* | freebsd* | dragonfly* | linux*) 19095 if test -n "$FLOAT_H"; then 19096 REPLACE_FLOAT_LDBL=1 19097 fi 19098 ;; 19099 esac 19100 19101 REPLACE_ITOLD=0 19102 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5 19103$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; } 19104if ${gl_cv_func_itold_works+:} false; then : 19105 $as_echo_n "(cached) " >&6 19106else 19107 19108 if test "$cross_compiling" = yes; then : 19109 case "$host" in 19110 sparc*-*-linux*) 19111 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19112/* end confdefs.h. */ 19113#if defined __LP64__ || defined __arch64__ 19114 int ok; 19115 #else 19116 error fail 19117 #endif 19118 19119_ACEOF 19120if ac_fn_c_try_compile "$LINENO"; then : 19121 gl_cv_func_itold_works="guessing no" 19122else 19123 gl_cv_func_itold_works="guessing yes" 19124fi 19125rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19126 ;; 19127 # Guess yes on native Windows. 19128 mingw*) gl_cv_func_itold_works="guessing yes" ;; 19129 *) gl_cv_func_itold_works="guessing yes" ;; 19130 esac 19131 19132else 19133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19134/* end confdefs.h. */ 19135 19136int i = -1; 19137volatile long double ld; 19138int main () 19139{ 19140 ld += i * 1.0L; 19141 if (ld > 0) 19142 return 1; 19143 return 0; 19144} 19145_ACEOF 19146if ac_fn_c_try_run "$LINENO"; then : 19147 gl_cv_func_itold_works=yes 19148else 19149 gl_cv_func_itold_works=no 19150fi 19151rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 19152 conftest.$ac_objext conftest.beam conftest.$ac_ext 19153fi 19154 19155 19156fi 19157{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5 19158$as_echo "$gl_cv_func_itold_works" >&6; } 19159 case "$gl_cv_func_itold_works" in 19160 *no) 19161 REPLACE_ITOLD=1 19162 FLOAT_H=float.h 19163 ;; 19164 esac 19165 19166 if test -n "$FLOAT_H"; then 19167 19168 19169 19170 19171 19172 19173 19174 19175 if test $gl_cv_have_include_next = yes; then 19176 gl_cv_next_float_h='<'float.h'>' 19177 else 19178 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5 19179$as_echo_n "checking absolute name of <float.h>... " >&6; } 19180if ${gl_cv_next_float_h+:} false; then : 19181 $as_echo_n "(cached) " >&6 19182else 19183 19184 19185 19186 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19187/* end confdefs.h. */ 19188#include <float.h> 19189_ACEOF 19190 case "$host_os" in 19191 aix*) gl_absname_cpp="$ac_cpp -C" ;; 19192 *) gl_absname_cpp="$ac_cpp" ;; 19193 esac 19194 19195 case "$host_os" in 19196 mingw*) 19197 gl_dirsep_regex='[/\\]' 19198 ;; 19199 *) 19200 gl_dirsep_regex='\/' 19201 ;; 19202 esac 19203 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 19204 gl_header_literal_regex=`echo 'float.h' \ 19205 | sed -e "$gl_make_literal_regex_sed"` 19206 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 19207 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 19208 s|^/[^/]|//&| 19209 p 19210 q 19211 }' 19212 19213 gl_cv_absolute_float_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 19214 sed -n "$gl_absolute_header_sed"` 19215 19216 gl_header=$gl_cv_absolute_float_h 19217 gl_cv_next_float_h='"'$gl_header'"' 19218 19219 19220fi 19221{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5 19222$as_echo "$gl_cv_next_float_h" >&6; } 19223 fi 19224 NEXT_FLOAT_H=$gl_cv_next_float_h 19225 19226 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 19227 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 19228 gl_next_as_first_directive='<'float.h'>' 19229 else 19230 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 19231 gl_next_as_first_directive=$gl_cv_next_float_h 19232 fi 19233 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive 19234 19235 19236 19237 19238 fi 19239 19240 if test -n "$FLOAT_H"; then 19241 GL_GENERATE_FLOAT_H_TRUE= 19242 GL_GENERATE_FLOAT_H_FALSE='#' 19243else 19244 GL_GENERATE_FLOAT_H_TRUE='#' 19245 GL_GENERATE_FLOAT_H_FALSE= 19246fi 19247 19248 19249 19250 if test $REPLACE_FLOAT_LDBL = 1; then 19251 19252 19253 19254 19255 19256 19257 19258 19259 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext" 19260 19261 fi 19262 if test $REPLACE_ITOLD = 1; then 19263 19264 19265 19266 19267 19268 19269 19270 19271 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext" 19272 19273 fi 19274 19275 19276 19277 19278 gl_fnmatch_required_lowercase=` 19279 echo $gl_fnmatch_required | LC_ALL=C tr '[A-Z]' '[a-z]' 19280 ` 19281 19282 if test $ac_cv_func_fnmatch = no; then 19283 HAVE_FNMATCH=0 19284 else 19285 gl_fnmatch_cache_var="gl_cv_func_fnmatch_${gl_fnmatch_required_lowercase}" 19286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working $gl_fnmatch_required fnmatch" >&5 19287$as_echo_n "checking for working $gl_fnmatch_required fnmatch... " >&6; } 19288if eval \${$gl_fnmatch_cache_var+:} false; then : 19289 $as_echo_n "(cached) " >&6 19290else 19291 if test $gl_fnmatch_required = GNU; then 19292 gl_fnmatch_gnu_start= 19293 gl_fnmatch_gnu_end= 19294 else 19295 gl_fnmatch_gnu_start='#if 0' 19296 gl_fnmatch_gnu_end='#endif' 19297 fi 19298 if test "$cross_compiling" = yes; then : 19299 case "$host_os" in 19300 # Guess yes on musl systems. 19301 *-musl*) eval "$gl_fnmatch_cache_var=\"guessing yes\"" ;; 19302 # Guess no otherwise, even on glibc systems. 19303 *) eval "$gl_fnmatch_cache_var=\"guessing no\"" ;; 19304 esac 19305 19306else 19307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19308/* end confdefs.h. */ 19309#include <fnmatch.h> 19310 static int 19311 y (char const *pattern, char const *string, int flags) 19312 { 19313 return fnmatch (pattern, string, flags) == 0; 19314 } 19315 static int 19316 n (char const *pattern, char const *string, int flags) 19317 { 19318 return fnmatch (pattern, string, flags) == FNM_NOMATCH; 19319 } 19320 19321int 19322main () 19323{ 19324char const *Apat = 'A' < '\\\\' ? "[A-\\\\\\\\]" : "[\\\\\\\\-A]"; 19325 char const *apat = 'a' < '\\\\' ? "[a-\\\\\\\\]" : "[\\\\\\\\-a]"; 19326 static char const A_1[] = { 'A' - 1, 0 }; 19327 static char const A01[] = { 'A' + 1, 0 }; 19328 static char const a_1[] = { 'a' - 1, 0 }; 19329 static char const a01[] = { 'a' + 1, 0 }; 19330 static char const bs_1[] = { '\\\\' - 1, 0 }; 19331 static char const bs01[] = { '\\\\' + 1, 0 }; 19332 int result = 0; 19333 if (!n ("a*", "", 0)) 19334 return 1; 19335 if (!y ("a*", "abc", 0)) 19336 return 1; 19337 if (!y ("[/b", "[/b", 0)) /*"]]"*/ /* glibc Bugzilla bug 12378 */ 19338 return 1; 19339 if (!n ("d*/*1", "d/s/1", FNM_PATHNAME)) 19340 return 2; 19341 if (!y ("a\\\\bc", "abc", 0)) 19342 return 3; 19343 if (!n ("a\\\\bc", "abc", FNM_NOESCAPE)) 19344 return 3; 19345 if (!y ("*x", ".x", 0)) 19346 return 4; 19347 if (!n ("*x", ".x", FNM_PERIOD)) 19348 return 4; 19349 if (!y (Apat, "\\\\", 0)) 19350 return 5; 19351 if (!y (Apat, "A", 0)) 19352 return 5; 19353 if (!y (apat, "\\\\", 0)) 19354 return 5; 19355 if (!y (apat, "a", 0)) 19356 return 5; 19357 if (!(n (Apat, A_1, 0) == ('A' < '\\\\'))) 19358 return 5; 19359 if (!(n (apat, a_1, 0) == ('a' < '\\\\'))) 19360 return 5; 19361 if (!(y (Apat, A01, 0) == ('A' < '\\\\'))) 19362 return 5; 19363 if (!(y (apat, a01, 0) == ('a' < '\\\\'))) 19364 return 5; 19365 if (!(y (Apat, bs_1, 0) == ('A' < '\\\\'))) 19366 return 5; 19367 if (!(y (apat, bs_1, 0) == ('a' < '\\\\'))) 19368 return 5; 19369 if (!(n (Apat, bs01, 0) == ('A' < '\\\\'))) 19370 return 5; 19371 if (!(n (apat, bs01, 0) == ('a' < '\\\\'))) 19372 return 5; 19373 $gl_fnmatch_gnu_start 19374 if (!y ("xxXX", "xXxX", FNM_CASEFOLD)) 19375 result |= 8; 19376 if (!y ("a++(x|yy)b", "a+xyyyyxb", FNM_EXTMATCH)) 19377 result |= 16; 19378 if (!n ("d*/*1", "d/s/1", FNM_FILE_NAME)) 19379 result |= 32; 19380 if (!y ("*", "x", FNM_FILE_NAME | FNM_LEADING_DIR)) 19381 result |= 64; 19382 if (!y ("x*", "x/y/z", FNM_FILE_NAME | FNM_LEADING_DIR)) 19383 result |= 64; 19384 if (!y ("*c*", "c/x", FNM_FILE_NAME | FNM_LEADING_DIR)) 19385 result |= 64; 19386 $gl_fnmatch_gnu_end 19387 return result; 19388 19389 ; 19390 return 0; 19391} 19392_ACEOF 19393if ac_fn_c_try_run "$LINENO"; then : 19394 eval "$gl_fnmatch_cache_var=yes" 19395else 19396 eval "$gl_fnmatch_cache_var=no" 19397fi 19398rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 19399 conftest.$ac_objext conftest.beam conftest.$ac_ext 19400fi 19401 19402 19403fi 19404eval ac_res=\$$gl_fnmatch_cache_var 19405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 19406$as_echo "$ac_res" >&6; } 19407 eval "gl_fnmatch_result=\"\$$gl_fnmatch_cache_var\"" 19408 case "$gl_fnmatch_result" in 19409 *yes) ;; 19410 *) REPLACE_FNMATCH=1 ;; 19411 esac 19412 fi 19413 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then 19414 19415 19416 FNMATCH_H='fnmatch.h' 19417 if test -n "$FNMATCH_H"; then 19418 GL_GENERATE_FNMATCH_H_TRUE= 19419 GL_GENERATE_FNMATCH_H_FALSE='#' 19420else 19421 GL_GENERATE_FNMATCH_H_TRUE='#' 19422 GL_GENERATE_FNMATCH_H_FALSE= 19423fi 19424 19425 19426 fi 19427 19428 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then 19429 19430 19431 19432 19433 19434 19435 19436 19437 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext" 19438 19439 19440 19441 19442 19443 fi 19444 19445 19446 19447 19448 19449 GNULIB_FNMATCH=1 19450 19451 19452 19453 19454 19455$as_echo "#define GNULIB_TEST_FNMATCH 1" >>confdefs.h 19456 19457 19458 19459 19460 19461 19462 19463 19464 if test $HAVE_FNMATCH = 0 || test $REPLACE_FNMATCH = 1; then 19465 19466 19467 19468 19469 19470 19471 19472 19473 gl_LIBOBJS="$gl_LIBOBJS fnmatch.$ac_objext" 19474 19475 19476 19477 19478 19479 fi 19480 19481 19482cat >>confdefs.h <<_ACEOF 19483#define GNULIB_FNMATCH_GNU 1 19484_ACEOF 19485 19486 19487 19488 19489 if test $gl_func_frexp != yes; then 19490 19491 19492 19493 19494 19495 19496 19497 19498 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext" 19499 19500 fi 19501 19502 19503 19504 19505 19506 GNULIB_FREXP=1 19507 19508 19509 19510 19511 19512$as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h 19513 19514 19515 19516 19517 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl = no; then 19518 19519 19520 19521 19522 19523 19524 19525 19526 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext" 19527 19528 fi 19529 19530 19531 19532 19533 19534 GNULIB_FREXPL=1 19535 19536 19537 19538 19539 19540$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h 19541 19542 19543 19544 19545 19546 19547 19548 case "$host_os" in 19549 mingw* | solaris*) 19550 REPLACE_FSTAT=1 19551 ;; 19552 esac 19553 19554 19555 19556 19557 19558 if test $ac_cv_func_fchdir = no; then 19559 HAVE_FCHDIR=0 19560 fi 19561 19562 if test $HAVE_FCHDIR = 0; then 19563 case "$gl_cv_func_open_directory_works" in 19564 *yes) ;; 19565 *) 19566 REPLACE_FSTAT=1 19567 ;; 19568 esac 19569 fi 19570 19571 19572 if test $REPLACE_FSTAT = 1; then 19573 19574 19575 19576 19577 19578 19579 19580 19581 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext" 19582 19583 case "$host_os" in 19584 mingw*) 19585 19586 19587 19588 19589 19590 19591 19592 19593 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext" 19594 19595 ;; 19596 esac 19597 19598 19599 : 19600 19601 fi 19602 19603 19604 19605 19606 19607 GNULIB_FSTAT=1 19608 19609 19610 19611 19612 19613$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h 19614 19615 19616 19617 19618 19619 19620 19621 19622 19623 19624 if test $ac_cv_func_fstatat = no; then 19625 HAVE_FSTATAT=0 19626 else 19627 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fstatat (..., 0) works" >&5 19628$as_echo_n "checking whether fstatat (..., 0) works... " >&6; } 19629if ${gl_cv_func_fstatat_zero_flag+:} false; then : 19630 $as_echo_n "(cached) " >&6 19631else 19632 if test "$cross_compiling" = yes; then : 19633 case "$host_os" in 19634 aix*) gl_cv_func_fstatat_zero_flag="guessing no";; 19635 *) gl_cv_func_fstatat_zero_flag="guessing yes";; 19636 esac 19637 19638else 19639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19640/* end confdefs.h. */ 19641 19642 #include <fcntl.h> 19643 #include <sys/stat.h> 19644 int 19645 main (void) 19646 { 19647 struct stat a; 19648 return fstatat (AT_FDCWD, ".", &a, 0) != 0; 19649 } 19650 19651_ACEOF 19652if ac_fn_c_try_run "$LINENO"; then : 19653 gl_cv_func_fstatat_zero_flag=yes 19654else 19655 gl_cv_func_fstatat_zero_flag=no 19656fi 19657rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 19658 conftest.$ac_objext conftest.beam conftest.$ac_ext 19659fi 19660 19661 19662fi 19663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fstatat_zero_flag" >&5 19664$as_echo "$gl_cv_func_fstatat_zero_flag" >&6; } 19665 19666 case $gl_cv_func_fstatat_zero_flag+$gl_cv_func_lstat_dereferences_slashed_symlink in 19667 *yes+*yes) ;; 19668 *) REPLACE_FSTATAT=1 ;; 19669 esac 19670 19671 case $host_os in 19672 solaris*) 19673 REPLACE_FSTATAT=1 ;; 19674 esac 19675 19676 case $REPLACE_FSTATAT,$gl_cv_func_fstatat_zero_flag in 19677 1,*yes) 19678 19679$as_echo "#define HAVE_WORKING_FSTATAT_ZERO_FLAG 1" >>confdefs.h 19680 19681 ;; 19682 esac 19683 fi 19684 19685 if test $HAVE_FSTATAT = 0 || test $REPLACE_FSTATAT = 1; then 19686 19687 19688 19689 19690 19691 19692 19693 19694 gl_LIBOBJS="$gl_LIBOBJS fstatat.$ac_objext" 19695 19696 fi 19697 19698 19699 19700 19701 19702 GNULIB_FSTATAT=1 19703 19704 19705 19706 19707 19708$as_echo "#define GNULIB_TEST_FSTATAT 1" >>confdefs.h 19709 19710 19711 19712 19713 19714 19715 19716 19717 gl_abort_bug=no 19718 case "$host_os" in 19719 mingw*) 19720 gl_cv_func_getcwd_path_max=yes 19721 ;; 19722 *) 19723 19724 19725 19726 19727 19728 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd handles long file names properly" >&5 19729$as_echo_n "checking whether getcwd handles long file names properly... " >&6; } 19730if ${gl_cv_func_getcwd_path_max+:} false; then : 19731 $as_echo_n "(cached) " >&6 19732else 19733 # Arrange for deletion of the temporary directory this test creates. 19734 ac_clean_files="$ac_clean_files confdir3" 19735 if test "$cross_compiling" = yes; then : 19736 # Cross-compilation guesses: 19737 case "$host_os" in 19738 aix*) # On AIX, it has the AIX bug. 19739 gl_cv_func_getcwd_path_max='guessing no, it has the AIX bug' ;; 19740 gnu*) # On Hurd, it is 'yes'. 19741 gl_cv_func_getcwd_path_max='guessing yes' ;; 19742 linux* | kfreebsd*) 19743 # On older Linux+glibc it's 'no, but it is partly working', 19744 # on newer Linux+glibc it's 'yes'. 19745 # On Linux+musl libc, it's 'no, but it is partly working'. 19746 # On kFreeBSD+glibc, it's 'no, but it is partly working'. 19747 gl_cv_func_getcwd_path_max='guessing no, but it is partly working' ;; 19748 *) # If we don't know, obey --enable-cross-guesses. 19749 gl_cv_func_getcwd_path_max="$gl_cross_guess_normal" ;; 19750 esac 19751 19752else 19753 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19754/* end confdefs.h. */ 19755 19756#include <errno.h> 19757#include <stdlib.h> 19758#if HAVE_UNISTD_H 19759# include <unistd.h> 19760#else 19761# include <direct.h> 19762#endif 19763#include <string.h> 19764#include <limits.h> 19765#include <sys/stat.h> 19766#include <sys/types.h> 19767#include <fcntl.h> 19768 19769 19770/* Arrange to define PATH_MAX, like "pathmax.h" does. */ 19771#if HAVE_UNISTD_H 19772# include <unistd.h> 19773#endif 19774#include <limits.h> 19775#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN 19776# include <sys/param.h> 19777#endif 19778#if !defined PATH_MAX && defined MAXPATHLEN 19779# define PATH_MAX MAXPATHLEN 19780#endif 19781#ifdef __hpux 19782# undef PATH_MAX 19783# define PATH_MAX 1024 19784#endif 19785#if defined _WIN32 && ! defined __CYGWIN__ 19786# undef PATH_MAX 19787# define PATH_MAX 260 19788#endif 19789 19790 19791#ifndef AT_FDCWD 19792# define AT_FDCWD 0 19793#endif 19794#ifdef ENAMETOOLONG 19795# define is_ENAMETOOLONG(x) ((x) == ENAMETOOLONG) 19796#else 19797# define is_ENAMETOOLONG(x) 0 19798#endif 19799 19800/* Use the getcwd function, not any macro. */ 19801#undef getcwd 19802 19803/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ 19804#undef mkdir 19805 19806#ifndef S_IRWXU 19807# define S_IRWXU 0700 19808#endif 19809 19810/* The length of this name must be 8. */ 19811#define DIR_NAME "confdir3" 19812#define DIR_NAME_LEN 8 19813#define DIR_NAME_SIZE (DIR_NAME_LEN + 1) 19814 19815/* The length of "../". */ 19816#define DOTDOTSLASH_LEN 3 19817 19818/* Leftover bytes in the buffer, to work around library or OS bugs. */ 19819#define BUF_SLOP 20 19820 19821int 19822main () 19823{ 19824#ifndef PATH_MAX 19825 /* The Hurd doesn't define this, so getcwd can't exhibit the bug -- 19826 at least not on a local file system. And if we were to start worrying 19827 about remote file systems, we'd have to enable the wrapper function 19828 all of the time, just to be safe. That's not worth the cost. */ 19829 exit (0); 19830#elif ((INT_MAX / (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) \ 19831 - DIR_NAME_SIZE - BUF_SLOP) \ 19832 <= PATH_MAX) 19833 /* FIXME: Assuming there's a system for which this is true, 19834 this should be done in a compile test. */ 19835 exit (0); 19836#else 19837 char buf[PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN + 1) 19838 + DIR_NAME_SIZE + BUF_SLOP]; 19839 char *cwd = getcwd (buf, PATH_MAX); 19840 size_t initial_cwd_len; 19841 size_t cwd_len; 19842 int fail = 0; 19843 size_t n_chdirs = 0; 19844 19845 if (cwd == NULL) 19846 exit (10); 19847 19848 cwd_len = initial_cwd_len = strlen (cwd); 19849 19850 while (1) 19851 { 19852 size_t dotdot_max = PATH_MAX * (DIR_NAME_SIZE / DOTDOTSLASH_LEN); 19853 char *c = NULL; 19854 19855 cwd_len += DIR_NAME_SIZE; 19856 /* If mkdir or chdir fails, it could be that this system cannot create 19857 any file with an absolute name longer than PATH_MAX, such as cygwin. 19858 If so, leave fail as 0, because the current working directory can't 19859 be too long for getcwd if it can't even be created. On Linux with 19860 the 9p file system, mkdir fails with error EINVAL when cwd_len gets 19861 too long; ignore this failure because the getcwd() system call 19862 produces good results whereas the gnulib substitute calls getdents64 19863 which fails with error EPROTO. 19864 For other errors, be pessimistic and consider that as a failure, 19865 too. */ 19866 if (mkdir (DIR_NAME, S_IRWXU) < 0 || chdir (DIR_NAME) < 0) 19867 { 19868 if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) 19869 #ifdef __linux__ 19870 if (! (errno == EINVAL)) 19871 #endif 19872 fail = 20; 19873 break; 19874 } 19875 19876 if (PATH_MAX <= cwd_len && cwd_len < PATH_MAX + DIR_NAME_SIZE) 19877 { 19878 struct stat sb; 19879 19880 c = getcwd (buf, PATH_MAX); 19881 if (!c && errno == ENOENT) 19882 { 19883 fail = 11; 19884 break; 19885 } 19886 if (c) 19887 { 19888 fail = 31; 19889 break; 19890 } 19891 if (! (errno == ERANGE || is_ENAMETOOLONG (errno))) 19892 { 19893 fail = 21; 19894 break; 19895 } 19896 19897 /* Our replacement needs to be able to stat() long ../../paths, 19898 so generate a path larger than PATH_MAX to check, 19899 avoiding the replacement if we can't stat(). */ 19900 c = getcwd (buf, cwd_len + 1); 19901 if (c && !AT_FDCWD && stat (c, &sb) != 0 && is_ENAMETOOLONG (errno)) 19902 { 19903 fail = 32; 19904 break; 19905 } 19906 } 19907 19908 if (dotdot_max <= cwd_len - initial_cwd_len) 19909 { 19910 if (dotdot_max + DIR_NAME_SIZE < cwd_len - initial_cwd_len) 19911 break; 19912 c = getcwd (buf, cwd_len + 1); 19913 if (!c) 19914 { 19915 if (! (errno == ERANGE || errno == ENOENT 19916 || is_ENAMETOOLONG (errno))) 19917 { 19918 fail = 22; 19919 break; 19920 } 19921 if (AT_FDCWD || errno == ERANGE || errno == ENOENT) 19922 { 19923 fail = 12; 19924 break; 19925 } 19926 } 19927 } 19928 19929 if (c && strlen (c) != cwd_len) 19930 { 19931 fail = 23; 19932 break; 19933 } 19934 ++n_chdirs; 19935 } 19936 19937 /* Leaving behind such a deep directory is not polite. 19938 So clean up here, right away, even though the driving 19939 shell script would also clean up. */ 19940 { 19941 size_t i; 19942 19943 /* Try rmdir first, in case the chdir failed. */ 19944 rmdir (DIR_NAME); 19945 for (i = 0; i <= n_chdirs; i++) 19946 { 19947 if (chdir ("..") < 0) 19948 break; 19949 if (rmdir (DIR_NAME) != 0) 19950 break; 19951 } 19952 } 19953 19954 exit (fail); 19955#endif 19956} 19957 19958_ACEOF 19959if ac_fn_c_try_run "$LINENO"; then : 19960 gl_cv_func_getcwd_path_max=yes 19961else 19962 case $? in 19963 10|11|12) gl_cv_func_getcwd_path_max='no, but it is partly working';; 19964 31) gl_cv_func_getcwd_path_max='no, it has the AIX bug';; 19965 32) gl_cv_func_getcwd_path_max='yes, but with shorter paths';; 19966 *) gl_cv_func_getcwd_path_max=no;; 19967 esac 19968fi 19969rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 19970 conftest.$ac_objext conftest.beam conftest.$ac_ext 19971fi 19972 19973 19974fi 19975{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_path_max" >&5 19976$as_echo "$gl_cv_func_getcwd_path_max" >&6; } 19977 19978 case "$gl_cv_func_getcwd_null" in 19979 *yes) 19980 19981 19982 19983 19984 19985 19986 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getpagesize" >&5 19987$as_echo_n "checking for getpagesize... " >&6; } 19988if ${gl_cv_func_getpagesize+:} false; then : 19989 $as_echo_n "(cached) " >&6 19990else 19991 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19992/* end confdefs.h. */ 19993#include <unistd.h> 19994int 19995main () 19996{ 19997return getpagesize(); 19998 ; 19999 return 0; 20000} 20001 20002_ACEOF 20003if ac_fn_c_try_link "$LINENO"; then : 20004 gl_cv_func_getpagesize=yes 20005else 20006 gl_cv_func_getpagesize=no 20007fi 20008rm -f core conftest.err conftest.$ac_objext \ 20009 conftest$ac_exeext conftest.$ac_ext 20010 20011fi 20012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getpagesize" >&5 20013$as_echo "$gl_cv_func_getpagesize" >&6; } 20014 20015 if test $gl_cv_func_getpagesize = yes; then 20016 20017cat >>confdefs.h <<_ACEOF 20018#define HAVE_GETPAGESIZE 1 20019_ACEOF 20020 20021 fi 20022 20023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getcwd aborts when 4k < cwd_length < 16k" >&5 20024$as_echo_n "checking whether getcwd aborts when 4k < cwd_length < 16k... " >&6; } 20025if ${gl_cv_func_getcwd_abort_bug+:} false; then : 20026 $as_echo_n "(cached) " >&6 20027else 20028 # Remove any remnants of a previous test. 20029 rm -rf confdir-14B--- 20030 # Arrange for deletion of the temporary directory this test creates. 20031 ac_clean_files="$ac_clean_files confdir-14B---" 20032 if test "$cross_compiling" = yes; then : 20033 case "$host_os" in 20034 # Guess no on musl systems. 20035 *-musl*) gl_cv_func_getcwd_abort_bug="guessing no" ;; 20036 # Guess yes otherwise, even on glibc systems. 20037 *) gl_cv_func_getcwd_abort_bug="guessing yes" 20038 esac 20039 20040else 20041 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20042/* end confdefs.h. */ 20043 20044#include <errno.h> 20045#include <stdlib.h> 20046#if HAVE_UNISTD_H 20047# include <unistd.h> 20048#else /* on Windows with MSVC */ 20049# include <direct.h> 20050#endif 20051#include <string.h> 20052#include <sys/stat.h> 20053 20054 20055/* Arrange to define PATH_MAX, like "pathmax.h" does. */ 20056#if HAVE_UNISTD_H 20057# include <unistd.h> 20058#endif 20059#include <limits.h> 20060#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN 20061# include <sys/param.h> 20062#endif 20063#if !defined PATH_MAX && defined MAXPATHLEN 20064# define PATH_MAX MAXPATHLEN 20065#endif 20066#ifdef __hpux 20067# undef PATH_MAX 20068# define PATH_MAX 1024 20069#endif 20070#if defined _WIN32 && ! defined __CYGWIN__ 20071# undef PATH_MAX 20072# define PATH_MAX 260 20073#endif 20074 20075 20076/* Don't get link errors because mkdir is redefined to rpl_mkdir. */ 20077#undef mkdir 20078 20079#ifndef S_IRWXU 20080# define S_IRWXU 0700 20081#endif 20082 20083/* FIXME: skip the run-test altogether on systems without getpagesize. */ 20084#if ! HAVE_GETPAGESIZE 20085# define getpagesize() 0 20086#endif 20087 20088/* This size is chosen to be larger than PATH_MAX (4k), yet smaller than 20089 the 16kB pagesize on ia64 linux. Those conditions make the code below 20090 trigger a bug in glibc's getcwd implementation before 2.4.90-10. */ 20091#define TARGET_LEN (5 * 1024) 20092 20093int 20094main () 20095{ 20096 char *cwd; 20097 size_t initial_cwd_len; 20098 int fail = 0; 20099 20100 /* The bug is triggered when PATH_MAX < getpagesize (), so skip 20101 this relatively expensive and invasive test if that's not true. */ 20102#ifdef PATH_MAX 20103 int bug_possible = PATH_MAX < getpagesize (); 20104#else 20105 int bug_possible = 0; 20106#endif 20107 if (! bug_possible) 20108 return 0; 20109 20110 cwd = getcwd (NULL, 0); 20111 if (cwd == NULL) 20112 return 2; 20113 20114 initial_cwd_len = strlen (cwd); 20115 free (cwd); 20116 20117 if (1) 20118 { 20119 static char const dir_name[] = "confdir-14B---"; 20120 size_t desired_depth = ((TARGET_LEN - 1 - initial_cwd_len) 20121 / sizeof dir_name); 20122 size_t d; 20123 for (d = 0; d < desired_depth; d++) 20124 { 20125 if (mkdir (dir_name, S_IRWXU) < 0 || chdir (dir_name) < 0) 20126 { 20127 if (! (errno == ERANGE || errno == ENAMETOOLONG 20128 || errno == ENOENT)) 20129 fail = 3; /* Unable to construct deep hierarchy. */ 20130 break; 20131 } 20132 } 20133 20134 /* If libc has the bug in question, this invocation of getcwd 20135 results in a failed assertion. */ 20136 cwd = getcwd (NULL, 0); 20137 if (cwd == NULL) 20138 fail = 4; /* getcwd didn't assert, but it failed for a long name 20139 where the answer could have been learned. */ 20140 free (cwd); 20141 20142 /* Call rmdir first, in case the above chdir failed. */ 20143 rmdir (dir_name); 20144 while (0 < d--) 20145 { 20146 if (chdir ("..") < 0) 20147 { 20148 fail = 5; 20149 break; 20150 } 20151 rmdir (dir_name); 20152 } 20153 } 20154 20155 return fail; 20156} 20157 20158_ACEOF 20159if ac_fn_c_try_run "$LINENO"; then : 20160 gl_cv_func_getcwd_abort_bug=no 20161else 20162 ret=$? 20163 if test $ret -ge 128 || test $ret = 4; then 20164 gl_cv_func_getcwd_abort_bug=yes 20165 else 20166 gl_cv_func_getcwd_abort_bug=no 20167 fi 20168 20169fi 20170rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 20171 conftest.$ac_objext conftest.beam conftest.$ac_ext 20172fi 20173 20174 20175fi 20176{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getcwd_abort_bug" >&5 20177$as_echo "$gl_cv_func_getcwd_abort_bug" >&6; } 20178 case "$gl_cv_func_getcwd_abort_bug" in 20179 *yes) 20180 gl_abort_bug=yes 20181 ;; 20182 *) 20183 20184 ;; 20185 esac 20186 20187 ;; 20188 esac 20189 ;; 20190 esac 20191 case "$gl_cv_func_getcwd_path_max" in 20192 *"no" | *"no, it has the AIX bug") ;; 20193 *) 20194 20195$as_echo "#define HAVE_MINIMALLY_WORKING_GETCWD 1" >>confdefs.h 20196 20197 ;; 20198 esac 20199 case "$gl_cv_func_getcwd_path_max" in 20200 *"no, but it is partly working") 20201 20202$as_echo "#define HAVE_PARTLY_WORKING_GETCWD 1" >>confdefs.h 20203 20204 ;; 20205 *"yes, but with shorter paths") 20206 20207$as_echo "#define HAVE_GETCWD_SHORTER 1" >>confdefs.h 20208 20209 ;; 20210 esac 20211 20212 if { case "$gl_cv_func_getcwd_null" in *yes) false;; *) true;; esac; } \ 20213 || test $gl_cv_func_getcwd_posix_signature != yes \ 20214 || { case "$gl_cv_func_getcwd_path_max" in *yes*) false;; *) true;; esac; } \ 20215 || test $gl_abort_bug = yes; then 20216 REPLACE_GETCWD=1 20217 fi 20218 20219 if test $REPLACE_GETCWD = 1; then 20220 20221 20222 20223 20224 20225 20226 20227 20228 gl_LIBOBJS="$gl_LIBOBJS getcwd.$ac_objext" 20229 20230 20231 20232 20233 : 20234 20235 fi 20236 20237 20238cat >>confdefs.h <<_ACEOF 20239#define GNULIB_GETCWD 1 20240_ACEOF 20241 20242 20243 20244 20245 20246 20247 20248 GNULIB_GETCWD=1 20249 20250 20251 20252 20253 20254$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h 20255 20256 20257 20258 20259 20260 20261 20262 20263 case $gl_cv_func_getcwd_null,$gl_cv_func_getcwd_posix_signature in 20264 *yes,yes) ;; 20265 *) 20266 REPLACE_GETCWD=1 20267 ;; 20268 esac 20269 20270 if test $REPLACE_GETCWD = 1; then 20271 20272 20273 20274 20275 20276 20277 20278 20279 gl_LIBOBJS="$gl_LIBOBJS getcwd-lgpl.$ac_objext" 20280 20281 fi 20282 20283 20284 20285 20286 20287 GNULIB_GETCWD=1 20288 20289 20290 20291 20292 20293$as_echo "#define GNULIB_TEST_GETCWD 1" >>confdefs.h 20294 20295 20296 20297 20298 20299 20300 20301 20302 if test $ac_cv_func_getdtablesize = yes && 20303 test $ac_cv_have_decl_getdtablesize = yes; then 20304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getdtablesize works" >&5 20305$as_echo_n "checking whether getdtablesize works... " >&6; } 20306if ${gl_cv_func_getdtablesize_works+:} false; then : 20307 $as_echo_n "(cached) " >&6 20308else 20309 case "$host_os" in 20310 vms*) gl_cv_func_getdtablesize_works="no (limitation)" ;; 20311 *) 20312 if test "$cross_compiling" = yes; then : 20313 case "$host_os" in 20314 cygwin*) # on cygwin 1.5.25, getdtablesize() automatically grows 20315 gl_cv_func_getdtablesize_works="guessing no" ;; 20316 *) gl_cv_func_getdtablesize_works="guessing yes" ;; 20317 esac 20318 20319else 20320 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20321/* end confdefs.h. */ 20322 20323 #include <unistd.h> 20324int 20325main () 20326{ 20327int size = getdtablesize(); 20328 if (dup2 (0, getdtablesize()) != -1) 20329 return 1; 20330 if (size != getdtablesize()) 20331 return 2; 20332 20333 ; 20334 return 0; 20335} 20336_ACEOF 20337if ac_fn_c_try_run "$LINENO"; then : 20338 gl_cv_func_getdtablesize_works=yes 20339else 20340 gl_cv_func_getdtablesize_works=no 20341fi 20342rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 20343 conftest.$ac_objext conftest.beam conftest.$ac_ext 20344fi 20345 20346 ;; 20347 esac 20348 20349fi 20350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getdtablesize_works" >&5 20351$as_echo "$gl_cv_func_getdtablesize_works" >&6; } 20352 case "$gl_cv_func_getdtablesize_works" in 20353 *yes | "no (limitation)") ;; 20354 *) REPLACE_GETDTABLESIZE=1 ;; 20355 esac 20356 else 20357 HAVE_GETDTABLESIZE=0 20358 fi 20359 20360 if test $HAVE_GETDTABLESIZE = 0 || test $REPLACE_GETDTABLESIZE = 1; then 20361 20362 20363 20364 20365 20366 20367 20368 20369 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext" 20370 20371 : 20372 fi 20373 20374 20375 20376 20377 20378 GNULIB_GETDTABLESIZE=1 20379 20380 20381 20382 20383 20384$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h 20385 20386 20387 20388 20389 20390 20391 20392 20393 20394 if test $ac_cv_have_decl_getlogin_r = no; then 20395 HAVE_DECL_GETLOGIN_R=0 20396 fi 20397 20398 20399 if test $ac_cv_func_getlogin_r = no; then 20400 HAVE_GETLOGIN_R=0 20401 else 20402 HAVE_GETLOGIN_R=1 20403 20404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getlogin_r works with small buffers" >&5 20405$as_echo_n "checking whether getlogin_r works with small buffers... " >&6; } 20406if ${gl_cv_func_getlogin_r_works+:} false; then : 20407 $as_echo_n "(cached) " >&6 20408else 20409 20410 case "$host_os" in 20411 # Guess no on Mac OS X, OSF/1. 20412 darwin* | osf*) gl_cv_func_getlogin_r_works="guessing no" ;; 20413 # Guess yes otherwise. 20414 *) gl_cv_func_getlogin_r_works="guessing yes" ;; 20415 esac 20416 if test "$cross_compiling" = yes; then : 20417 : 20418else 20419 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20420/* end confdefs.h. */ 20421 20422#include <stddef.h> 20423#include <string.h> 20424#include <unistd.h> 20425#if !HAVE_DECL_GETLOGIN_R 20426extern 20427# ifdef __cplusplus 20428"C" 20429# endif 20430int getlogin_r (char *, size_t); 20431#endif 20432int 20433main (void) 20434{ 20435 int result = 0; 20436 char buf[100]; 20437 20438 if (getlogin_r (buf, 0) == 0) 20439 result |= 1; 20440 if (getlogin_r (buf, 1) == 0) 20441 result |= 2; 20442 if (getlogin_r (buf, 100) == 0) 20443 { 20444 size_t n = strlen (buf); 20445 if (getlogin_r (buf, n) == 0) 20446 result |= 4; 20447 } 20448 return result; 20449} 20450_ACEOF 20451if ac_fn_c_try_run "$LINENO"; then : 20452 gl_cv_func_getlogin_r_works=yes 20453else 20454 gl_cv_func_getlogin_r_works=no 20455fi 20456rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 20457 conftest.$ac_objext conftest.beam conftest.$ac_ext 20458fi 20459 20460 20461fi 20462{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getlogin_r_works" >&5 20463$as_echo "$gl_cv_func_getlogin_r_works" >&6; } 20464 case "$gl_cv_func_getlogin_r_works" in 20465 *yes) ;; 20466 *) REPLACE_GETLOGIN_R=1 ;; 20467 esac 20468 fi 20469 20470 if test $HAVE_GETLOGIN_R = 0 || test $REPLACE_GETLOGIN_R = 1; then 20471 20472 20473 20474 20475 20476 20477 20478 20479 gl_LIBOBJS="$gl_LIBOBJS getlogin_r.$ac_objext" 20480 20481 20482 20483 20484 fi 20485 20486 20487 20488 20489 20490 GNULIB_GETLOGIN_R=1 20491 20492 20493 20494 20495 20496$as_echo "#define GNULIB_TEST_GETLOGIN_R 1" >>confdefs.h 20497 20498 20499 20500 20501 20502 20503 20504 ac_found=0 20505 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h> 20506" 20507if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then : 20508 ac_have_decl=1 20509else 20510 ac_have_decl=0 20511fi 20512 20513cat >>confdefs.h <<_ACEOF 20514#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl 20515_ACEOF 20516if test $ac_have_decl = 1; then : 20517 ac_found=1 20518fi 20519 20520 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h> 20521" 20522if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then : 20523 ac_have_decl=1 20524else 20525 ac_have_decl=0 20526fi 20527 20528cat >>confdefs.h <<_ACEOF 20529#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl 20530_ACEOF 20531if test $ac_have_decl = 1; then : 20532 ac_found=1 20533fi 20534 20535 ac_fn_c_check_decl "$LINENO" "__argv" "ac_cv_have_decl___argv" "#include <stdlib.h> 20536" 20537if test "x$ac_cv_have_decl___argv" = xyes; then : 20538 ac_have_decl=1 20539else 20540 ac_have_decl=0 20541fi 20542 20543cat >>confdefs.h <<_ACEOF 20544#define HAVE_DECL___ARGV $ac_have_decl 20545_ACEOF 20546if test $ac_have_decl = 1; then : 20547 ac_found=1 20548fi 20549 20550 20551 # Incur the cost of this test only if none of the above worked. 20552 if test $ac_found = 0; then 20553 # On OpenBSD 5.1, using the global __progname variable appears to be 20554 # the only way to implement getprogname. 20555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __progname is defined in default libraries" >&5 20556$as_echo_n "checking whether __progname is defined in default libraries... " >&6; } 20557if ${gl_cv_var___progname+:} false; then : 20558 $as_echo_n "(cached) " >&6 20559else 20560 20561 gl_cv_var___progname= 20562 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20563/* end confdefs.h. */ 20564extern char *__progname; 20565int 20566main () 20567{ 20568return *__progname; 20569 20570 ; 20571 return 0; 20572} 20573_ACEOF 20574if ac_fn_c_try_link "$LINENO"; then : 20575 gl_cv_var___progname=yes 20576 20577fi 20578rm -f core conftest.err conftest.$ac_objext \ 20579 conftest$ac_exeext conftest.$ac_ext 20580 20581 20582fi 20583{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_var___progname" >&5 20584$as_echo "$gl_cv_var___progname" >&6; } 20585 if test "$gl_cv_var___progname" = yes; then 20586 20587$as_echo "#define HAVE_VAR___PROGNAME 1" >>confdefs.h 20588 20589 fi 20590 fi 20591 20592 20593 20594 20595 20596 if test "$ac_cv_func_getrandom" != yes; then 20597 HAVE_GETRANDOM=0 20598 else 20599 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getrandom is compatible with its GNU+BSD signature" >&5 20600$as_echo_n "checking whether getrandom is compatible with its GNU+BSD signature... " >&6; } 20601if ${gl_cv_func_getrandom_ok+:} false; then : 20602 $as_echo_n "(cached) " >&6 20603else 20604 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20605/* end confdefs.h. */ 20606/* Additional includes are needed before <sys/random.h> on Mac OS X. */ 20607 #include <sys/types.h> 20608 #include <stdlib.h> 20609 #include <sys/random.h> 20610 ssize_t getrandom (void *, size_t, unsigned int); 20611 20612int 20613main () 20614{ 20615 20616 ; 20617 return 0; 20618} 20619 20620_ACEOF 20621if ac_fn_c_try_compile "$LINENO"; then : 20622 gl_cv_func_getrandom_ok=yes 20623else 20624 gl_cv_func_getrandom_ok=no 20625fi 20626rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20627 20628fi 20629{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getrandom_ok" >&5 20630$as_echo "$gl_cv_func_getrandom_ok" >&6; } 20631 if test $gl_cv_func_getrandom_ok = no; then 20632 REPLACE_GETRANDOM=1 20633 fi 20634 fi 20635 20636 case "$host_os" in 20637 mingw*) 20638 for ac_header in bcrypt.h 20639do : 20640 ac_fn_c_check_header_mongrel "$LINENO" "bcrypt.h" "ac_cv_header_bcrypt_h" "$ac_includes_default" 20641if test "x$ac_cv_header_bcrypt_h" = xyes; then : 20642 cat >>confdefs.h <<_ACEOF 20643#define HAVE_BCRYPT_H 1 20644_ACEOF 20645 20646fi 20647 20648done 20649 20650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the bcrypt library is guaranteed to be present" >&5 20651$as_echo_n "checking whether the bcrypt library is guaranteed to be present... " >&6; } 20652if ${gl_cv_lib_assume_bcrypt+:} false; then : 20653 $as_echo_n "(cached) " >&6 20654else 20655 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20656/* end confdefs.h. */ 20657#include <windows.h> 20658int 20659main () 20660{ 20661#if !(_WIN32_WINNT >= _WIN32_WINNT_WIN7) 20662 cannot assume it 20663 #endif 20664 20665 ; 20666 return 0; 20667} 20668 20669_ACEOF 20670if ac_fn_c_try_compile "$LINENO"; then : 20671 gl_cv_lib_assume_bcrypt=yes 20672else 20673 gl_cv_lib_assume_bcrypt=no 20674fi 20675rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20676 20677fi 20678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_lib_assume_bcrypt" >&5 20679$as_echo "$gl_cv_lib_assume_bcrypt" >&6; } 20680 if test $gl_cv_lib_assume_bcrypt = yes; then 20681 20682$as_echo "#define HAVE_LIB_BCRYPT 1" >>confdefs.h 20683 20684 LIB_GETRANDOM='-lbcrypt' 20685 else 20686 LIB_GETRANDOM='-ladvapi32' 20687 fi 20688 ;; 20689 *) 20690 LIB_GETRANDOM= ;; 20691 esac 20692 20693 20694 if test $HAVE_GETRANDOM = 0 || test $REPLACE_GETRANDOM = 1; then 20695 20696 20697 20698 20699 20700 20701 20702 20703 gl_LIBOBJS="$gl_LIBOBJS getrandom.$ac_objext" 20704 20705 fi 20706 20707 20708 20709 20710 20711 GNULIB_GETRANDOM=1 20712 20713 20714 20715 20716 20717$as_echo "#define GNULIB_TEST_GETRANDOM 1" >>confdefs.h 20718 20719 20720 20721 20722 20723 20724 20725 20726 20727 20728 20729 20730 gl_gettimeofday_timezone=void 20731 if test $ac_cv_func_gettimeofday != yes; then 20732 HAVE_GETTIMEOFDAY=0 20733 else 20734 20735 20736 20737 20738 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether gettimeofday clobbers localtime buffer" >&5 20739$as_echo_n "checking whether gettimeofday clobbers localtime buffer... " >&6; } 20740if ${gl_cv_func_gettimeofday_clobber+:} false; then : 20741 $as_echo_n "(cached) " >&6 20742else 20743 if test "$cross_compiling" = yes; then : 20744 # When cross-compiling: 20745 case "$host_os" in 20746 # Guess all is fine on glibc systems. 20747 *-gnu* | gnu*) gl_cv_func_gettimeofday_clobber="guessing no" ;; 20748 # Guess all is fine on musl systems. 20749 *-musl*) gl_cv_func_gettimeofday_clobber="guessing no" ;; 20750 # Guess no on native Windows. 20751 mingw*) gl_cv_func_gettimeofday_clobber="guessing no" ;; 20752 # Guess no on bsd. 20753 *bsd*) gl_cv_func_gettimeofday_clobber="guessing no" ;; 20754 # If we don't know, obey --enable-cross-guesses. 20755 *) gl_cv_func_gettimeofday_clobber="$gl_cross_guess_inverted" ;; 20756 esac 20757 20758else 20759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20760/* end confdefs.h. */ 20761#include <string.h> 20762 #include <sys/time.h> 20763 #include <time.h> 20764 #include <stdlib.h> 20765 20766int 20767main () 20768{ 20769 20770 time_t t = 0; 20771 struct tm *lt; 20772 struct tm saved_lt; 20773 struct timeval tv; 20774 lt = localtime (&t); 20775 saved_lt = *lt; 20776 gettimeofday (&tv, NULL); 20777 return memcmp (lt, &saved_lt, sizeof (struct tm)) != 0; 20778 20779 ; 20780 return 0; 20781} 20782_ACEOF 20783if ac_fn_c_try_run "$LINENO"; then : 20784 gl_cv_func_gettimeofday_clobber=no 20785else 20786 gl_cv_func_gettimeofday_clobber=yes 20787fi 20788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 20789 conftest.$ac_objext conftest.beam conftest.$ac_ext 20790fi 20791 20792fi 20793{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_clobber" >&5 20794$as_echo "$gl_cv_func_gettimeofday_clobber" >&6; } 20795 20796 case "$gl_cv_func_gettimeofday_clobber" in 20797 *yes) 20798 REPLACE_GETTIMEOFDAY=1 20799 20800$as_echo "#define GETTIMEOFDAY_CLOBBERS_LOCALTIME 1" >>confdefs.h 20801 20802 20803 20804 20805 NEED_LOCALTIME_BUFFER=1 20806 REPLACE_GMTIME=1 20807 REPLACE_LOCALTIME=1 20808 20809 ;; 20810 esac 20811 20812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gettimeofday with POSIX signature" >&5 20813$as_echo_n "checking for gettimeofday with POSIX signature... " >&6; } 20814if ${gl_cv_func_gettimeofday_posix_signature+:} false; then : 20815 $as_echo_n "(cached) " >&6 20816else 20817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20818/* end confdefs.h. */ 20819#include <sys/time.h> 20820 struct timeval c; 20821 int gettimeofday (struct timeval *restrict, void *restrict); 20822 20823int 20824main () 20825{ 20826/* glibc uses struct timezone * rather than the POSIX void * 20827 if _GNU_SOURCE is defined. However, since the only portable 20828 use of gettimeofday uses NULL as the second parameter, and 20829 since the glibc definition is actually more typesafe, it is 20830 not worth wrapping this to get a compliant signature. */ 20831 int (*f) (struct timeval *restrict, void *restrict) 20832 = gettimeofday; 20833 int x = f (&c, 0); 20834 return !(x | c.tv_sec | c.tv_usec); 20835 20836 ; 20837 return 0; 20838} 20839_ACEOF 20840if ac_fn_c_try_compile "$LINENO"; then : 20841 gl_cv_func_gettimeofday_posix_signature=yes 20842else 20843 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20844/* end confdefs.h. */ 20845#include <sys/time.h> 20846int gettimeofday (struct timeval *restrict, struct timezone *restrict); 20847 20848int 20849main () 20850{ 20851 20852 ; 20853 return 0; 20854} 20855_ACEOF 20856if ac_fn_c_try_compile "$LINENO"; then : 20857 gl_cv_func_gettimeofday_posix_signature=almost 20858else 20859 gl_cv_func_gettimeofday_posix_signature=no 20860fi 20861rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20862fi 20863rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20864fi 20865{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_gettimeofday_posix_signature" >&5 20866$as_echo "$gl_cv_func_gettimeofday_posix_signature" >&6; } 20867 if test $gl_cv_func_gettimeofday_posix_signature = almost; then 20868 gl_gettimeofday_timezone='struct timezone' 20869 elif test $gl_cv_func_gettimeofday_posix_signature != yes; then 20870 REPLACE_GETTIMEOFDAY=1 20871 fi 20872 if test $REPLACE_STRUCT_TIMEVAL = 1; then 20873 REPLACE_GETTIMEOFDAY=1 20874 fi 20875 case "$host_os" in 20876 mingw*) REPLACE_GETTIMEOFDAY=1 ;; 20877 esac 20878 fi 20879 20880cat >>confdefs.h <<_ACEOF 20881#define GETTIMEOFDAY_TIMEZONE $gl_gettimeofday_timezone 20882_ACEOF 20883 20884 20885 if test $HAVE_GETTIMEOFDAY = 0 || test $REPLACE_GETTIMEOFDAY = 1; then 20886 20887 20888 20889 20890 20891 20892 20893 20894 gl_LIBOBJS="$gl_LIBOBJS gettimeofday.$ac_objext" 20895 20896 : 20897 fi 20898 20899 20900 20901 20902 20903 GNULIB_GETTIMEOFDAY=1 20904 20905 20906 20907 20908 20909$as_echo "#define GNULIB_TEST_GETTIMEOFDAY 1" >>confdefs.h 20910 20911 20912 20913 20914 20915 20916 20917 if test $ac_cv_func_glob = no; then 20918 HAVE_GLOB=0 20919 else 20920 20921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU glob interface version 1 or 2" >&5 20922$as_echo_n "checking for GNU glob interface version 1 or 2... " >&6; } 20923if ${gl_cv_gnu_glob_interface_version_1_2+:} false; then : 20924 $as_echo_n "(cached) " >&6 20925else 20926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20927/* end confdefs.h. */ 20928#include <gnu-versions.h> 20929char a[_GNU_GLOB_INTERFACE_VERSION == 1 || _GNU_GLOB_INTERFACE_VERSION == 2 ? 1 : -1]; 20930_ACEOF 20931if ac_fn_c_try_compile "$LINENO"; then : 20932 gl_cv_gnu_glob_interface_version_1_2=yes 20933else 20934 gl_cv_gnu_glob_interface_version_1_2=no 20935fi 20936rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20937fi 20938{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_gnu_glob_interface_version_1_2" >&5 20939$as_echo "$gl_cv_gnu_glob_interface_version_1_2" >&6; } 20940 if test "$gl_cv_gnu_glob_interface_version_1_2" = "no"; then 20941 REPLACE_GLOB=1 20942 fi 20943 20944 if test $REPLACE_GLOB = 0; then 20945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether glob lists broken symlinks" >&5 20946$as_echo_n "checking whether glob lists broken symlinks... " >&6; } 20947if ${gl_cv_glob_lists_symlinks+:} false; then : 20948 $as_echo_n "(cached) " >&6 20949else 20950 if test $cross_compiling != yes; then 20951 if ln -s conf-doesntexist conf$$-globtest 2>/dev/null; then 20952 gl_cv_glob_lists_symlinks=maybe 20953 else 20954 # If we can't make a symlink, then we cannot test this issue. Be 20955 # pessimistic about this. 20956 gl_cv_glob_lists_symlinks=no 20957 fi 20958 if test $gl_cv_glob_lists_symlinks = maybe; then 20959 if test "$cross_compiling" = yes; then : 20960 : 20961 20962else 20963 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20964/* end confdefs.h. */ 20965#include <stddef.h> 20966 #include <glob.h> 20967int 20968main () 20969{ 20970glob_t found; 20971 if (glob ("conf*-globtest", 0, NULL, &found) == GLOB_NOMATCH) 20972 return 1; 20973 globfree (&found); 20974 20975 ; 20976 return 0; 20977} 20978_ACEOF 20979if ac_fn_c_try_run "$LINENO"; then : 20980 gl_cv_glob_lists_symlinks=yes 20981else 20982 gl_cv_glob_lists_symlinks=no 20983fi 20984rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 20985 conftest.$ac_objext conftest.beam conftest.$ac_ext 20986fi 20987 20988 fi 20989 rm -f conf$$-globtest 20990 else 20991 gl_cv_glob_lists_symlinks="$gl_cross_guess_normal" 20992 fi 20993 20994fi 20995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_glob_lists_symlinks" >&5 20996$as_echo "$gl_cv_glob_lists_symlinks" >&6; } 20997 case "$gl_cv_glob_lists_symlinks" in 20998 *yes) ;; 20999 *) REPLACE_GLOB=1 ;; 21000 esac 21001 fi 21002 21003 fi 21004 21005 if test $ac_cv_func_glob_pattern_p = no; then 21006 HAVE_GLOB_PATTERN_P=0 21007 else 21008 if test $REPLACE_GLOB = 1; then 21009 REPLACE_GLOB_PATTERN_P=1 21010 fi 21011 fi 21012 21013 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then 21014 21015 21016 GLOB_H='glob.h' 21017 if test -n "$GLOB_H"; then 21018 GL_GENERATE_GLOB_H_TRUE= 21019 GL_GENERATE_GLOB_H_FALSE='#' 21020else 21021 GL_GENERATE_GLOB_H_TRUE='#' 21022 GL_GENERATE_GLOB_H_FALSE= 21023fi 21024 21025 21026 fi 21027 21028 if test $HAVE_GLOB = 0 || test $REPLACE_GLOB = 1; then 21029 21030 21031 21032 21033 21034 21035 21036 21037 gl_LIBOBJS="$gl_LIBOBJS glob.$ac_objext" 21038 21039 21040 21041 21042 21043 21044 21045 21046 21047 gl_LIBOBJS="$gl_LIBOBJS globfree.$ac_objext" 21048 21049 21050 21051 21052 21053 21054 fi 21055 if test $HAVE_GLOB_PATTERN_P = 0 || test $REPLACE_GLOB_PATTERN_P = 1; then 21056 21057 21058 21059 21060 21061 21062 21063 21064 gl_LIBOBJS="$gl_LIBOBJS glob_pattern_p.$ac_objext" 21065 21066 fi 21067 21068 21069 21070 21071 21072 GNULIB_GLOB=1 21073 21074 21075 21076 21077 21078$as_echo "#define GNULIB_TEST_GLOB 1" >>confdefs.h 21079 21080 21081 21082 21083 21084 LIB_HARD_LOCALE="$LIB_SETLOCALE_NULL" 21085 21086 21087 21088 21089 21090 21091 21092 21093 HAVE_INET_NTOP=1 21094 INET_NTOP_LIB= 21095 21096 21097 21098 21099 if test $ac_cv_header_sys_socket_h != yes; then 21100 for ac_header in winsock2.h 21101do : 21102 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" 21103if test "x$ac_cv_header_winsock2_h" = xyes; then : 21104 cat >>confdefs.h <<_ACEOF 21105#define HAVE_WINSOCK2_H 1 21106_ACEOF 21107 21108fi 21109 21110done 21111 21112 fi 21113 if test "$ac_cv_header_winsock2_h" = yes; then 21114 HAVE_WINSOCK2_H=1 21115 UNISTD_H_HAVE_WINSOCK2_H=1 21116 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 21117 else 21118 HAVE_WINSOCK2_H=0 21119 fi 21120 21121 21122 if test $HAVE_WINSOCK2_H = 1; then 21123 REPLACE_INET_NTOP=1 21124 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <ws2tcpip.h> 21125" 21126if test "x$ac_cv_have_decl_inet_ntop" = xyes; then : 21127 ac_have_decl=1 21128else 21129 ac_have_decl=0 21130fi 21131 21132cat >>confdefs.h <<_ACEOF 21133#define HAVE_DECL_INET_NTOP $ac_have_decl 21134_ACEOF 21135 21136 if test $ac_cv_have_decl_inet_ntop = yes; then 21137 INET_NTOP_LIB="-lws2_32" 21138 else 21139 HAVE_DECL_INET_NTOP=0 21140 fi 21141 else 21142 gl_save_LIBS=$LIBS 21143 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing inet_ntop" >&5 21144$as_echo_n "checking for library containing inet_ntop... " >&6; } 21145if ${ac_cv_search_inet_ntop+:} false; then : 21146 $as_echo_n "(cached) " >&6 21147else 21148 ac_func_search_save_LIBS=$LIBS 21149cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21150/* end confdefs.h. */ 21151 21152/* Override any GCC internal prototype to avoid an error. 21153 Use char because int might match the return type of a GCC 21154 builtin and then its argument prototype would still apply. */ 21155#ifdef __cplusplus 21156extern "C" 21157#endif 21158char inet_ntop (); 21159int 21160main () 21161{ 21162return inet_ntop (); 21163 ; 21164 return 0; 21165} 21166_ACEOF 21167for ac_lib in '' nsl resolv network; do 21168 if test -z "$ac_lib"; then 21169 ac_res="none required" 21170 else 21171 ac_res=-l$ac_lib 21172 LIBS="-l$ac_lib $ac_func_search_save_LIBS" 21173 fi 21174 if ac_fn_c_try_link "$LINENO"; then : 21175 ac_cv_search_inet_ntop=$ac_res 21176fi 21177rm -f core conftest.err conftest.$ac_objext \ 21178 conftest$ac_exeext 21179 if ${ac_cv_search_inet_ntop+:} false; then : 21180 break 21181fi 21182done 21183if ${ac_cv_search_inet_ntop+:} false; then : 21184 21185else 21186 ac_cv_search_inet_ntop=no 21187fi 21188rm conftest.$ac_ext 21189LIBS=$ac_func_search_save_LIBS 21190fi 21191{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_inet_ntop" >&5 21192$as_echo "$ac_cv_search_inet_ntop" >&6; } 21193ac_res=$ac_cv_search_inet_ntop 21194if test "$ac_res" != no; then : 21195 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" 21196 21197else 21198 for ac_func in inet_ntop 21199do : 21200 ac_fn_c_check_func "$LINENO" "inet_ntop" "ac_cv_func_inet_ntop" 21201if test "x$ac_cv_func_inet_ntop" = xyes; then : 21202 cat >>confdefs.h <<_ACEOF 21203#define HAVE_INET_NTOP 1 21204_ACEOF 21205 21206fi 21207done 21208 21209 if test $ac_cv_func_inet_ntop = no; then 21210 HAVE_INET_NTOP=0 21211 fi 21212 21213fi 21214 21215 LIBS=$gl_save_LIBS 21216 21217 if test "$ac_cv_search_inet_ntop" != "no" \ 21218 && test "$ac_cv_search_inet_ntop" != "none required"; then 21219 INET_NTOP_LIB="$ac_cv_search_inet_ntop" 21220 fi 21221 21222 21223 ac_fn_c_check_decl "$LINENO" "inet_ntop" "ac_cv_have_decl_inet_ntop" "#include <arpa/inet.h> 21224 #if HAVE_NETDB_H 21225 # include <netdb.h> 21226 #endif 21227 21228" 21229if test "x$ac_cv_have_decl_inet_ntop" = xyes; then : 21230 ac_have_decl=1 21231else 21232 ac_have_decl=0 21233fi 21234 21235cat >>confdefs.h <<_ACEOF 21236#define HAVE_DECL_INET_NTOP $ac_have_decl 21237_ACEOF 21238 21239 if test $ac_cv_have_decl_inet_ntop = no; then 21240 HAVE_DECL_INET_NTOP=0 21241 fi 21242 fi 21243 21244 21245 if test $HAVE_INET_NTOP = 0 || test $REPLACE_INET_NTOP = 1; then 21246 21247 21248 21249 21250 21251 21252 21253 21254 gl_LIBOBJS="$gl_LIBOBJS inet_ntop.$ac_objext" 21255 21256 21257 21258 21259 fi 21260 21261 21262 21263 21264 21265 GNULIB_INET_NTOP=1 21266 21267 21268 21269 21270 21271 21272 21273 21274 21275 PRIPTR_PREFIX= 21276 if test -n "$STDINT_H"; then 21277 PRIPTR_PREFIX='"l"' 21278 else 21279 for glpfx in '' l ll I64; do 21280 case $glpfx in 21281 '') gltype1='int';; 21282 l) gltype1='long int';; 21283 ll) gltype1='long long int';; 21284 I64) gltype1='__int64';; 21285 esac 21286 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21287/* end confdefs.h. */ 21288#include <stdint.h> 21289 extern intptr_t foo; 21290 extern $gltype1 foo; 21291int 21292main () 21293{ 21294 21295 ; 21296 return 0; 21297} 21298_ACEOF 21299if ac_fn_c_try_compile "$LINENO"; then : 21300 PRIPTR_PREFIX='"'$glpfx'"' 21301fi 21302rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21303 test -n "$PRIPTR_PREFIX" && break 21304 done 21305 fi 21306 21307 21308 21309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5 21310$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; } 21311if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then : 21312 $as_echo_n "(cached) " >&6 21313else 21314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21315/* end confdefs.h. */ 21316/* Work also in C++ mode. */ 21317 #define __STDC_LIMIT_MACROS 1 21318 21319 /* Work if build is not clean. */ 21320 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 21321 21322 #include <limits.h> 21323 #if HAVE_STDINT_H 21324 #include <stdint.h> 21325 #endif 21326 21327 #if defined INT32_MAX && defined INTMAX_MAX 21328 #define CONDITION (INT32_MAX < INTMAX_MAX) 21329 #else 21330 #define CONDITION (sizeof (int) < sizeof (long long int)) 21331 #endif 21332 int test[CONDITION ? 1 : -1]; 21333int 21334main () 21335{ 21336 21337 ; 21338 return 0; 21339} 21340_ACEOF 21341if ac_fn_c_try_compile "$LINENO"; then : 21342 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes 21343else 21344 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no 21345fi 21346rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21347fi 21348{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5 21349$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; } 21350 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then 21351 INT32_MAX_LT_INTMAX_MAX=1; 21352 else 21353 INT32_MAX_LT_INTMAX_MAX=0; 21354 fi 21355 21356 21357 if test $APPLE_UNIVERSAL_BUILD = 0; then 21358 21359 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5 21360$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; } 21361if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then : 21362 $as_echo_n "(cached) " >&6 21363else 21364 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21365/* end confdefs.h. */ 21366/* Work also in C++ mode. */ 21367 #define __STDC_LIMIT_MACROS 1 21368 21369 /* Work if build is not clean. */ 21370 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 21371 21372 #include <limits.h> 21373 #if HAVE_STDINT_H 21374 #include <stdint.h> 21375 #endif 21376 21377 #if defined INT64_MAX 21378 #define CONDITION (INT64_MAX == LONG_MAX) 21379 #else 21380 #define CONDITION (sizeof (long long int) == sizeof (long int)) 21381 #endif 21382 int test[CONDITION ? 1 : -1]; 21383int 21384main () 21385{ 21386 21387 ; 21388 return 0; 21389} 21390_ACEOF 21391if ac_fn_c_try_compile "$LINENO"; then : 21392 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes 21393else 21394 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no 21395fi 21396rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21397fi 21398{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5 21399$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; } 21400 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then 21401 INT64_MAX_EQ_LONG_MAX=1; 21402 else 21403 INT64_MAX_EQ_LONG_MAX=0; 21404 fi 21405 21406 21407 else 21408 INT64_MAX_EQ_LONG_MAX=-1 21409 fi 21410 21411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5 21412$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; } 21413if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then : 21414 $as_echo_n "(cached) " >&6 21415else 21416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21417/* end confdefs.h. */ 21418/* Work also in C++ mode. */ 21419 #define __STDC_LIMIT_MACROS 1 21420 21421 /* Work if build is not clean. */ 21422 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 21423 21424 #include <limits.h> 21425 #if HAVE_STDINT_H 21426 #include <stdint.h> 21427 #endif 21428 21429 #if defined UINT32_MAX && defined UINTMAX_MAX 21430 #define CONDITION (UINT32_MAX < UINTMAX_MAX) 21431 #else 21432 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int)) 21433 #endif 21434 int test[CONDITION ? 1 : -1]; 21435int 21436main () 21437{ 21438 21439 ; 21440 return 0; 21441} 21442_ACEOF 21443if ac_fn_c_try_compile "$LINENO"; then : 21444 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes 21445else 21446 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no 21447fi 21448rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21449fi 21450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5 21451$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; } 21452 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then 21453 UINT32_MAX_LT_UINTMAX_MAX=1; 21454 else 21455 UINT32_MAX_LT_UINTMAX_MAX=0; 21456 fi 21457 21458 21459 if test $APPLE_UNIVERSAL_BUILD = 0; then 21460 21461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5 21462$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; } 21463if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then : 21464 $as_echo_n "(cached) " >&6 21465else 21466 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21467/* end confdefs.h. */ 21468/* Work also in C++ mode. */ 21469 #define __STDC_LIMIT_MACROS 1 21470 21471 /* Work if build is not clean. */ 21472 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 21473 21474 #include <limits.h> 21475 #if HAVE_STDINT_H 21476 #include <stdint.h> 21477 #endif 21478 21479 #if defined UINT64_MAX 21480 #define CONDITION (UINT64_MAX == ULONG_MAX) 21481 #else 21482 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int)) 21483 #endif 21484 int test[CONDITION ? 1 : -1]; 21485int 21486main () 21487{ 21488 21489 ; 21490 return 0; 21491} 21492_ACEOF 21493if ac_fn_c_try_compile "$LINENO"; then : 21494 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes 21495else 21496 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no 21497fi 21498rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21499fi 21500{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5 21501$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; } 21502 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then 21503 UINT64_MAX_EQ_ULONG_MAX=1; 21504 else 21505 UINT64_MAX_EQ_ULONG_MAX=0; 21506 fi 21507 21508 21509 else 21510 UINT64_MAX_EQ_ULONG_MAX=-1 21511 fi 21512 21513 21514 21515 21516 21517 21518 21519 21520 if test $ac_cv_func_isblank = no; then 21521 HAVE_ISBLANK=0 21522 fi 21523 21524 if test $HAVE_ISBLANK = 0; then 21525 21526 21527 21528 21529 21530 21531 21532 21533 gl_LIBOBJS="$gl_LIBOBJS isblank.$ac_objext" 21534 21535 fi 21536 21537 21538cat >>confdefs.h <<_ACEOF 21539#define GNULIB_ISBLANK 1 21540_ACEOF 21541 21542 21543 21544 21545 21546 21547 21548 GNULIB_ISBLANK=1 21549 21550 21551 21552 21553 21554 21555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5 21556$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; } 21557if ${gl_cv_func_isnand_no_libm+:} false; then : 21558 $as_echo_n "(cached) " >&6 21559else 21560 21561 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21562/* end confdefs.h. */ 21563#include <math.h> 21564 #if __GNUC__ >= 4 21565 # undef isnand 21566 # define isnand(x) __builtin_isnan ((double)(x)) 21567 #else 21568 # undef isnand 21569 # define isnand(x) isnan ((double)(x)) 21570 #endif 21571 double x; 21572int 21573main () 21574{ 21575return isnand (x); 21576 ; 21577 return 0; 21578} 21579_ACEOF 21580if ac_fn_c_try_link "$LINENO"; then : 21581 gl_cv_func_isnand_no_libm=yes 21582else 21583 gl_cv_func_isnand_no_libm=no 21584fi 21585rm -f core conftest.err conftest.$ac_objext \ 21586 conftest$ac_exeext conftest.$ac_ext 21587 21588fi 21589{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5 21590$as_echo "$gl_cv_func_isnand_no_libm" >&6; } 21591 21592 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm 21593 if test $gl_cv_func_isnand_no_libm = yes; then 21594 21595$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h 21596 21597 fi 21598 21599 if test $gl_func_isnand_no_libm != yes; then 21600 21601 21602 21603 21604 21605 21606 21607 21608 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext" 21609 21610 21611 21612 21613 fi 21614 21615 21616 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5 21617$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; } 21618if ${gl_cv_func_isnanl_no_libm+:} false; then : 21619 $as_echo_n "(cached) " >&6 21620else 21621 21622 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21623/* end confdefs.h. */ 21624#include <math.h> 21625 #ifndef __has_builtin 21626 # define __has_builtin(name) 0 21627 #endif 21628 #if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) 21629 # undef isnanl 21630 # define isnanl(x) __builtin_isnanl ((long double)(x)) 21631 #elif defined isnan 21632 # undef isnanl 21633 # define isnanl(x) isnan ((long double)(x)) 21634 #endif 21635 long double x; 21636int 21637main () 21638{ 21639return isnanl (x); 21640 ; 21641 return 0; 21642} 21643_ACEOF 21644if ac_fn_c_try_link "$LINENO"; then : 21645 gl_cv_func_isnanl_no_libm=yes 21646else 21647 gl_cv_func_isnanl_no_libm=no 21648fi 21649rm -f core conftest.err conftest.$ac_objext \ 21650 conftest$ac_exeext conftest.$ac_ext 21651 21652fi 21653{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5 21654$as_echo "$gl_cv_func_isnanl_no_libm" >&6; } 21655 21656 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm 21657 if test $gl_func_isnanl_no_libm = yes; then 21658 21659 21660 21661 21662 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5 21663$as_echo_n "checking whether isnanl works... " >&6; } 21664if ${gl_cv_func_isnanl_works+:} false; then : 21665 $as_echo_n "(cached) " >&6 21666else 21667 21668 if test "$cross_compiling" = yes; then : 21669 case "$host_os" in 21670 mingw*) # Guess yes on mingw, no on MSVC. 21671 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21672/* end confdefs.h. */ 21673 21674#ifdef __MINGW32__ 21675 Known 21676#endif 21677 21678_ACEOF 21679if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 21680 $EGREP "Known" >/dev/null 2>&1; then : 21681 gl_cv_func_isnanl_works="guessing yes" 21682else 21683 gl_cv_func_isnanl_works="guessing no" 21684fi 21685rm -f conftest* 21686 21687 ;; 21688 *) gl_cv_func_isnanl_works="guessing yes" ;; 21689 esac 21690 21691else 21692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21693/* end confdefs.h. */ 21694 21695#include <float.h> 21696#include <limits.h> 21697#include <math.h> 21698#ifndef __has_builtin 21699# define __has_builtin(name) 0 21700#endif 21701#if __GNUC__ >= 4 && (!defined __clang__ || __has_builtin (__builtin_isnanl)) 21702# undef isnanl 21703# define isnanl(x) __builtin_isnanl ((long double)(x)) 21704#elif defined isnan 21705# undef isnanl 21706# define isnanl(x) isnan ((long double)(x)) 21707#endif 21708#define NWORDS \ 21709 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 21710typedef union { unsigned int word[NWORDS]; long double value; } 21711 memory_long_double; 21712/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the 21713 runtime type conversion. */ 21714#ifdef __sgi 21715static long double NaNl () 21716{ 21717 double zero = 0.0; 21718 return zero / zero; 21719} 21720#else 21721# define NaNl() (0.0L / 0.0L) 21722#endif 21723int main () 21724{ 21725 int result = 0; 21726 21727 if (!isnanl (NaNl ())) 21728 result |= 1; 21729 21730 { 21731 memory_long_double m; 21732 unsigned int i; 21733 21734 /* The isnanl function should be immune against changes in the sign bit and 21735 in the mantissa bits. The xor operation twiddles a bit that can only be 21736 a sign bit or a mantissa bit (since the exponent never extends to 21737 bit 31). */ 21738 m.value = NaNl (); 21739 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); 21740 for (i = 0; i < NWORDS; i++) 21741 m.word[i] |= 1; 21742 if (!isnanl (m.value)) 21743 result |= 1; 21744 } 21745 21746#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 21747/* Representation of an 80-bit 'long double' as an initializer for a sequence 21748 of 'unsigned int' words. */ 21749# ifdef WORDS_BIGENDIAN 21750# define LDBL80_WORDS(exponent,manthi,mantlo) \ 21751 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ 21752 ((unsigned int) (manthi) << 16) | ((unsigned int) (mantlo) >> 16), \ 21753 (unsigned int) (mantlo) << 16 \ 21754 } 21755# else 21756# define LDBL80_WORDS(exponent,manthi,mantlo) \ 21757 { mantlo, manthi, exponent } 21758# endif 21759 { /* Quiet NaN. */ 21760 static memory_long_double x = 21761 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; 21762 if (!isnanl (x.value)) 21763 result |= 2; 21764 } 21765 { 21766 /* Signalling NaN. */ 21767 static memory_long_double x = 21768 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; 21769 if (!isnanl (x.value)) 21770 result |= 2; 21771 } 21772 /* isnanl should return something even for noncanonical values. */ 21773 { /* Pseudo-NaN. */ 21774 static memory_long_double x = 21775 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; 21776 if (isnanl (x.value) && !isnanl (x.value)) 21777 result |= 4; 21778 } 21779 { /* Pseudo-Infinity. */ 21780 static memory_long_double x = 21781 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; 21782 if (isnanl (x.value) && !isnanl (x.value)) 21783 result |= 8; 21784 } 21785 { /* Pseudo-Zero. */ 21786 static memory_long_double x = 21787 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; 21788 if (isnanl (x.value) && !isnanl (x.value)) 21789 result |= 16; 21790 } 21791 { /* Unnormalized number. */ 21792 static memory_long_double x = 21793 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; 21794 if (isnanl (x.value) && !isnanl (x.value)) 21795 result |= 32; 21796 } 21797 { /* Pseudo-Denormal. */ 21798 static memory_long_double x = 21799 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; 21800 if (isnanl (x.value) && !isnanl (x.value)) 21801 result |= 64; 21802 } 21803#endif 21804 21805 return result; 21806} 21807_ACEOF 21808if ac_fn_c_try_run "$LINENO"; then : 21809 gl_cv_func_isnanl_works=yes 21810else 21811 gl_cv_func_isnanl_works=no 21812fi 21813rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 21814 conftest.$ac_objext conftest.beam conftest.$ac_ext 21815fi 21816 21817 21818fi 21819{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5 21820$as_echo "$gl_cv_func_isnanl_works" >&6; } 21821 21822 case "$gl_cv_func_isnanl_works" in 21823 *yes) ;; 21824 *) gl_func_isnanl_no_libm=no ;; 21825 esac 21826 fi 21827 if test $gl_func_isnanl_no_libm = yes; then 21828 21829$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h 21830 21831 fi 21832 21833 if test $gl_func_isnanl_no_libm != yes; then 21834 21835 21836 21837 21838 21839 21840 21841 21842 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext" 21843 21844 21845 21846 21847 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5 21848$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; } 21849if ${gl_cv_cc_long_double_expbit0+:} false; then : 21850 $as_echo_n "(cached) " >&6 21851else 21852 21853 if test "$cross_compiling" = yes; then : 21854 21855 gl_cv_cc_long_double_expbit0="unknown" 21856 case "$host_os" in 21857 mingw*) # On native Windows (little-endian), we know the result 21858 # in two cases: mingw, MSVC. 21859 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21860/* end confdefs.h. */ 21861 21862#ifdef __MINGW32__ 21863 Known 21864#endif 21865 21866_ACEOF 21867if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 21868 $EGREP "Known" >/dev/null 2>&1; then : 21869 gl_cv_cc_long_double_expbit0="word 2 bit 0" 21870fi 21871rm -f conftest* 21872 21873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21874/* end confdefs.h. */ 21875 21876#ifdef _MSC_VER 21877 Known 21878#endif 21879 21880_ACEOF 21881if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 21882 $EGREP "Known" >/dev/null 2>&1; then : 21883 gl_cv_cc_long_double_expbit0="word 1 bit 20" 21884fi 21885rm -f conftest* 21886 21887 ;; 21888 esac 21889 21890else 21891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21892/* end confdefs.h. */ 21893 21894#include <float.h> 21895#include <stddef.h> 21896#include <stdio.h> 21897#include <string.h> 21898#define NWORDS \ 21899 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 21900typedef union { long double value; unsigned int word[NWORDS]; } 21901 memory_long_double; 21902static unsigned int ored_words[NWORDS]; 21903static unsigned int anded_words[NWORDS]; 21904static void add_to_ored_words (long double *x) 21905{ 21906 memory_long_double m; 21907 size_t i; 21908 /* Clear it first, in case 21909 sizeof (long double) < sizeof (memory_long_double). */ 21910 memset (&m, 0, sizeof (memory_long_double)); 21911 m.value = *x; 21912 for (i = 0; i < NWORDS; i++) 21913 { 21914 ored_words[i] |= m.word[i]; 21915 anded_words[i] &= m.word[i]; 21916 } 21917} 21918int main () 21919{ 21920 static long double samples[5] = { 0.25L, 0.5L, 1.0L, 2.0L, 4.0L }; 21921 size_t j; 21922 FILE *fp = fopen ("conftest.out", "w"); 21923 if (fp == NULL) 21924 return 1; 21925 for (j = 0; j < NWORDS; j++) 21926 anded_words[j] = ~ (unsigned int) 0; 21927 for (j = 0; j < 5; j++) 21928 add_to_ored_words (&samples[j]); 21929 /* Remove bits that are common (e.g. if representation of the first mantissa 21930 bit is explicit). */ 21931 for (j = 0; j < NWORDS; j++) 21932 ored_words[j] &= ~anded_words[j]; 21933 /* Now find the nonzero word. */ 21934 for (j = 0; j < NWORDS; j++) 21935 if (ored_words[j] != 0) 21936 break; 21937 if (j < NWORDS) 21938 { 21939 size_t i; 21940 for (i = j + 1; i < NWORDS; i++) 21941 if (ored_words[i] != 0) 21942 { 21943 fprintf (fp, "unknown"); 21944 return (fclose (fp) != 0); 21945 } 21946 for (i = 0; ; i++) 21947 if ((ored_words[j] >> i) & 1) 21948 { 21949 fprintf (fp, "word %d bit %d", (int) j, (int) i); 21950 return (fclose (fp) != 0); 21951 } 21952 } 21953 fprintf (fp, "unknown"); 21954 return (fclose (fp) != 0); 21955} 21956 21957_ACEOF 21958if ac_fn_c_try_run "$LINENO"; then : 21959 gl_cv_cc_long_double_expbit0=`cat conftest.out` 21960else 21961 gl_cv_cc_long_double_expbit0="unknown" 21962fi 21963rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 21964 conftest.$ac_objext conftest.beam conftest.$ac_ext 21965fi 21966 21967 rm -f conftest.out 21968 21969fi 21970{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5 21971$as_echo "$gl_cv_cc_long_double_expbit0" >&6; } 21972 case "$gl_cv_cc_long_double_expbit0" in 21973 word*bit*) 21974 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` 21975 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'` 21976 21977cat >>confdefs.h <<_ACEOF 21978#define LDBL_EXPBIT0_WORD $word 21979_ACEOF 21980 21981 21982cat >>confdefs.h <<_ACEOF 21983#define LDBL_EXPBIT0_BIT $bit 21984_ACEOF 21985 21986 ;; 21987 esac 21988 21989 21990 21991 fi 21992 21993 21994 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports the __inline keyword" >&5 21995$as_echo_n "checking whether the compiler supports the __inline keyword... " >&6; } 21996if ${gl_cv_c___inline+:} false; then : 21997 $as_echo_n "(cached) " >&6 21998else 21999 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22000/* end confdefs.h. */ 22001typedef int foo_t; 22002 static __inline foo_t foo (void) { return 0; } 22003int 22004main () 22005{ 22006return foo (); 22007 ; 22008 return 0; 22009} 22010_ACEOF 22011if ac_fn_c_try_compile "$LINENO"; then : 22012 gl_cv_c___inline=yes 22013else 22014 gl_cv_c___inline=no 22015fi 22016rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22017fi 22018{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c___inline" >&5 22019$as_echo "$gl_cv_c___inline" >&6; } 22020 if test $gl_cv_c___inline = yes; then 22021 22022$as_echo "#define HAVE___INLINE 1" >>confdefs.h 22023 22024 fi 22025 22026 22027 22028 22029 22030 LOCALCHARSET_TESTS_ENVIRONMENT= 22031 22032 22033 22034 22035 22036 22037 22038 22039 22040 22041 22042 case "$host_os" in 22043 solaris*) 22044 22045$as_echo "#define _LCONV_C99 1" >>confdefs.h 22046 22047 ;; 22048 esac 22049 22050 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether locale.h conforms to POSIX:2001" >&5 22051$as_echo_n "checking whether locale.h conforms to POSIX:2001... " >&6; } 22052if ${gl_cv_header_locale_h_posix2001+:} false; then : 22053 $as_echo_n "(cached) " >&6 22054else 22055 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22056/* end confdefs.h. */ 22057#include <locale.h> 22058 int x = LC_MESSAGES; 22059 int y = sizeof (((struct lconv *) 0)->decimal_point); 22060int 22061main () 22062{ 22063 22064 ; 22065 return 0; 22066} 22067_ACEOF 22068if ac_fn_c_try_compile "$LINENO"; then : 22069 gl_cv_header_locale_h_posix2001=yes 22070else 22071 gl_cv_header_locale_h_posix2001=no 22072fi 22073rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22074fi 22075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_locale_h_posix2001" >&5 22076$as_echo "$gl_cv_header_locale_h_posix2001" >&6; } 22077 22078 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct lconv is properly defined" >&5 22079$as_echo_n "checking whether struct lconv is properly defined... " >&6; } 22080if ${gl_cv_sys_struct_lconv_ok+:} false; then : 22081 $as_echo_n "(cached) " >&6 22082else 22083 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22084/* end confdefs.h. */ 22085#include <locale.h> 22086 struct lconv l; 22087 int x = sizeof (l.decimal_point); 22088 int y = sizeof (l.int_p_cs_precedes); 22089int 22090main () 22091{ 22092 22093 ; 22094 return 0; 22095} 22096_ACEOF 22097if ac_fn_c_try_compile "$LINENO"; then : 22098 gl_cv_sys_struct_lconv_ok=yes 22099else 22100 gl_cv_sys_struct_lconv_ok=no 22101fi 22102rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22103 22104fi 22105{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_lconv_ok" >&5 22106$as_echo "$gl_cv_sys_struct_lconv_ok" >&6; } 22107 if test $gl_cv_sys_struct_lconv_ok = no; then 22108 case "$host_os" in 22109 mingw*) 22110 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22111/* end confdefs.h. */ 22112 22113#ifdef _MSC_VER 22114 Special 22115#endif 22116 22117_ACEOF 22118if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 22119 $EGREP "Special" >/dev/null 2>&1; then : 22120 22121else 22122 REPLACE_STRUCT_LCONV=1 22123fi 22124rm -f conftest* 22125 22126 ;; 22127 *) REPLACE_STRUCT_LCONV=1 ;; 22128 esac 22129 fi 22130 22131 22132 22133 22134 22135 22136 22137 22138 22139 if test $gl_cv_have_include_next = yes; then 22140 gl_cv_next_locale_h='<'locale.h'>' 22141 else 22142 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <locale.h>" >&5 22143$as_echo_n "checking absolute name of <locale.h>... " >&6; } 22144if ${gl_cv_next_locale_h+:} false; then : 22145 $as_echo_n "(cached) " >&6 22146else 22147 22148 22149 22150 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22151/* end confdefs.h. */ 22152#include <locale.h> 22153_ACEOF 22154 case "$host_os" in 22155 aix*) gl_absname_cpp="$ac_cpp -C" ;; 22156 *) gl_absname_cpp="$ac_cpp" ;; 22157 esac 22158 22159 case "$host_os" in 22160 mingw*) 22161 gl_dirsep_regex='[/\\]' 22162 ;; 22163 *) 22164 gl_dirsep_regex='\/' 22165 ;; 22166 esac 22167 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 22168 gl_header_literal_regex=`echo 'locale.h' \ 22169 | sed -e "$gl_make_literal_regex_sed"` 22170 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 22171 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 22172 s|^/[^/]|//&| 22173 p 22174 q 22175 }' 22176 22177 gl_cv_absolute_locale_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 22178 sed -n "$gl_absolute_header_sed"` 22179 22180 gl_header=$gl_cv_absolute_locale_h 22181 gl_cv_next_locale_h='"'$gl_header'"' 22182 22183 22184fi 22185{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_locale_h" >&5 22186$as_echo "$gl_cv_next_locale_h" >&6; } 22187 fi 22188 NEXT_LOCALE_H=$gl_cv_next_locale_h 22189 22190 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 22191 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 22192 gl_next_as_first_directive='<'locale.h'>' 22193 else 22194 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 22195 gl_next_as_first_directive=$gl_cv_next_locale_h 22196 fi 22197 NEXT_AS_FIRST_DIRECTIVE_LOCALE_H=$gl_next_as_first_directive 22198 22199 22200 22201 22202 22203 22204 22205 22206 22207 22208 22209 22210 22211 22212 22213 22214 22215 22216 gl_LIBOBJS="$gl_LIBOBJS localtime-buffer.$ac_objext" 22217 22218 22219 22220 if test "$gl_threads_api" = posix; then 22221 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the 22222 # pthread_rwlock_* functions. 22223 has_rwlock=false 22224 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h> 22225" 22226if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then : 22227 has_rwlock=true 22228 22229$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h 22230 22231fi 22232 22233 if $has_rwlock; then 22234 22235 22236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5 22237$as_echo_n "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; } 22238if ${gl_cv_pthread_rwlock_rdlock_prefer_writer+:} false; then : 22239 $as_echo_n "(cached) " >&6 22240else 22241 save_LIBS="$LIBS" 22242 LIBS="$LIBS $LIBMULTITHREAD" 22243 if test "$cross_compiling" = yes; then : 22244 case "$host_os" in 22245 # Guess no on glibc systems. 22246 *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; 22247 # Guess no on musl systems. 22248 *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; 22249 # Guess no on bionic systems. 22250 *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; 22251 # Guess yes on native Windows with the mingw-w64 winpthreads library. 22252 # Guess no on native Windows with the gnulib windows-rwlock module. 22253 mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then 22254 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes" 22255 else 22256 gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" 22257 fi 22258 ;; 22259 # If we don't know, obey --enable-cross-guesses. 22260 *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;; 22261 esac 22262 22263else 22264 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22265/* end confdefs.h. */ 22266 22267#include <errno.h> 22268#include <pthread.h> 22269#include <stdlib.h> 22270#include <unistd.h> 22271 22272#define SUCCEED() exit (0) 22273#define FAILURE() exit (1) 22274#define UNEXPECTED(n) (exit (10 + (n))) 22275 22276/* The main thread creates the waiting writer and the requesting reader threads 22277 in the default way; this guarantees that they have the same priority. 22278 We can reuse the main thread as first reader thread. */ 22279 22280static pthread_rwlock_t lock; 22281static pthread_t reader1; 22282static pthread_t writer; 22283static pthread_t reader2; 22284static pthread_t timer; 22285/* Used to pass control from writer to reader2 and from reader2 to timer, 22286 as in a relay race. 22287 Passing control from one running thread to another running thread 22288 is most likely faster than to create the second thread. */ 22289static pthread_mutex_t baton; 22290 22291static void * 22292timer_func (void *ignored) 22293{ 22294 /* Step 13 (can be before or after step 12): 22295 The timer thread takes the baton, then waits a moment to make sure 22296 it can tell whether the second reader thread is blocked at step 12. */ 22297 if (pthread_mutex_lock (&baton)) 22298 UNEXPECTED (13); 22299 usleep (100000); 22300 /* By the time we get here, it's clear that the second reader thread is 22301 blocked at step 12. This is the desired behaviour. */ 22302 SUCCEED (); 22303} 22304 22305static void * 22306reader2_func (void *ignored) 22307{ 22308 int err; 22309 22310 /* Step 8 (can be before or after step 7): 22311 The second reader thread takes the baton, then waits a moment to make sure 22312 the writer thread has reached step 7. */ 22313 if (pthread_mutex_lock (&baton)) 22314 UNEXPECTED (8); 22315 usleep (100000); 22316 /* Step 9: The second reader thread requests the lock. */ 22317 err = pthread_rwlock_tryrdlock (&lock); 22318 if (err == 0) 22319 FAILURE (); 22320 else if (err != EBUSY) 22321 UNEXPECTED (9); 22322 /* Step 10: Launch a timer, to test whether the next call blocks. */ 22323 if (pthread_create (&timer, NULL, timer_func, NULL)) 22324 UNEXPECTED (10); 22325 /* Step 11: Release the baton. */ 22326 if (pthread_mutex_unlock (&baton)) 22327 UNEXPECTED (11); 22328 /* Step 12: The second reader thread requests the lock. */ 22329 err = pthread_rwlock_rdlock (&lock); 22330 if (err == 0) 22331 FAILURE (); 22332 else 22333 UNEXPECTED (12); 22334} 22335 22336static void * 22337writer_func (void *ignored) 22338{ 22339 /* Step 4: Take the baton, so that the second reader thread does not go ahead 22340 too early. */ 22341 if (pthread_mutex_lock (&baton)) 22342 UNEXPECTED (4); 22343 /* Step 5: Create the second reader thread. */ 22344 if (pthread_create (&reader2, NULL, reader2_func, NULL)) 22345 UNEXPECTED (5); 22346 /* Step 6: Release the baton. */ 22347 if (pthread_mutex_unlock (&baton)) 22348 UNEXPECTED (6); 22349 /* Step 7: The writer thread requests the lock. */ 22350 if (pthread_rwlock_wrlock (&lock)) 22351 UNEXPECTED (7); 22352 return NULL; 22353} 22354 22355int 22356main () 22357{ 22358 reader1 = pthread_self (); 22359 22360 /* Step 1: The main thread initializes the lock and the baton. */ 22361 if (pthread_rwlock_init (&lock, NULL)) 22362 UNEXPECTED (1); 22363 if (pthread_mutex_init (&baton, NULL)) 22364 UNEXPECTED (1); 22365 /* Step 2: The main thread acquires the lock as a reader. */ 22366 if (pthread_rwlock_rdlock (&lock)) 22367 UNEXPECTED (2); 22368 /* Step 3: Create the writer thread. */ 22369 if (pthread_create (&writer, NULL, writer_func, NULL)) 22370 UNEXPECTED (3); 22371 /* Job done. Go to sleep. */ 22372 for (;;) 22373 { 22374 sleep (1); 22375 } 22376} 22377 22378_ACEOF 22379if ac_fn_c_try_run "$LINENO"; then : 22380 gl_cv_pthread_rwlock_rdlock_prefer_writer=yes 22381else 22382 gl_cv_pthread_rwlock_rdlock_prefer_writer=no 22383fi 22384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 22385 conftest.$ac_objext conftest.beam conftest.$ac_ext 22386fi 22387 22388 LIBS="$save_LIBS" 22389 22390fi 22391{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5 22392$as_echo "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; } 22393 case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in 22394 *yes) 22395 22396$as_echo "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h 22397 22398 ;; 22399 esac 22400 22401 fi 22402 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. 22403 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22404/* end confdefs.h. */ 22405 22406 #include <pthread.h> 22407int 22408main () 22409{ 22410 22411#if __FreeBSD__ == 4 22412error "No, in FreeBSD 4.0 recursive mutexes actually don't work." 22413#elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \ 22414 && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) 22415error "No, in Mac OS X < 10.7 recursive mutexes actually don't work." 22416#else 22417int x = (int)PTHREAD_MUTEX_RECURSIVE; 22418return !x; 22419#endif 22420 22421 ; 22422 return 0; 22423} 22424_ACEOF 22425if ac_fn_c_try_compile "$LINENO"; then : 22426 22427$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h 22428 22429fi 22430rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22431 fi 22432 : 22433 22434 22435 22436cat >>confdefs.h <<_ACEOF 22437#define GNULIB_LOCK 1 22438_ACEOF 22439 22440 22441 22442 22443 22444 22445 if test $ac_cv_func_lstat = yes; then 22446 22447 case $host_os,$gl_cv_func_lstat_dereferences_slashed_symlink in 22448 solaris* | *no) 22449 REPLACE_LSTAT=1 22450 ;; 22451 esac 22452 else 22453 HAVE_LSTAT=0 22454 fi 22455 22456 if test $REPLACE_LSTAT = 1; then 22457 22458 22459 22460 22461 22462 22463 22464 22465 gl_LIBOBJS="$gl_LIBOBJS lstat.$ac_objext" 22466 22467 : 22468 fi 22469 22470 22471 22472 22473 22474 GNULIB_LSTAT=1 22475 22476 22477 22478 22479 22480$as_echo "#define GNULIB_TEST_LSTAT 1" >>confdefs.h 22481 22482 22483 22484 22485 22486 22487 if test $gl_cv_func_malloc_posix = yes; then 22488 22489$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h 22490 22491 else 22492 REPLACE_MALLOC=1 22493 fi 22494 22495 if test $REPLACE_MALLOC = 1; then 22496 22497 22498 22499 22500 22501 22502 22503 22504 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" 22505 22506 fi 22507 22508 22509 22510 22511 22512 GNULIB_MALLOC_POSIX=1 22513 22514 22515 22516 22517 22518$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h 22519 22520 22521 22522 22523 22524 22525 22526 22527 22528 22529 22530 22531 22532 22533 22534 22535 22536 if test $gl_cv_have_include_next = yes; then 22537 gl_cv_next_math_h='<'math.h'>' 22538 else 22539 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5 22540$as_echo_n "checking absolute name of <math.h>... " >&6; } 22541if ${gl_cv_next_math_h+:} false; then : 22542 $as_echo_n "(cached) " >&6 22543else 22544 22545 if test $ac_cv_header_math_h = yes; then 22546 22547 22548 22549 22550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22551/* end confdefs.h. */ 22552#include <math.h> 22553_ACEOF 22554 case "$host_os" in 22555 aix*) gl_absname_cpp="$ac_cpp -C" ;; 22556 *) gl_absname_cpp="$ac_cpp" ;; 22557 esac 22558 22559 case "$host_os" in 22560 mingw*) 22561 gl_dirsep_regex='[/\\]' 22562 ;; 22563 *) 22564 gl_dirsep_regex='\/' 22565 ;; 22566 esac 22567 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 22568 gl_header_literal_regex=`echo 'math.h' \ 22569 | sed -e "$gl_make_literal_regex_sed"` 22570 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 22571 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 22572 s|^/[^/]|//&| 22573 p 22574 q 22575 }' 22576 22577 gl_cv_absolute_math_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 22578 sed -n "$gl_absolute_header_sed"` 22579 22580 gl_header=$gl_cv_absolute_math_h 22581 gl_cv_next_math_h='"'$gl_header'"' 22582 else 22583 gl_cv_next_math_h='<'math.h'>' 22584 fi 22585 22586 22587fi 22588{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5 22589$as_echo "$gl_cv_next_math_h" >&6; } 22590 fi 22591 NEXT_MATH_H=$gl_cv_next_math_h 22592 22593 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 22594 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 22595 gl_next_as_first_directive='<'math.h'>' 22596 else 22597 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 22598 gl_next_as_first_directive=$gl_cv_next_math_h 22599 fi 22600 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive 22601 22602 22603 22604 22605 22606 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5 22607$as_echo_n "checking whether NAN macro works... " >&6; } 22608if ${gl_cv_header_math_nan_works+:} false; then : 22609 $as_echo_n "(cached) " >&6 22610else 22611 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22612/* end confdefs.h. */ 22613#include <math.h> 22614int 22615main () 22616{ 22617/* Solaris 10 has a broken definition of NAN. Other platforms 22618 fail to provide NAN, or provide it only in C99 mode; this 22619 test only needs to fail when NAN is provided but wrong. */ 22620 float f = 1.0f; 22621#ifdef NAN 22622 f = NAN; 22623#endif 22624 return f == 0; 22625 ; 22626 return 0; 22627} 22628_ACEOF 22629if ac_fn_c_try_compile "$LINENO"; then : 22630 gl_cv_header_math_nan_works=yes 22631else 22632 gl_cv_header_math_nan_works=no 22633fi 22634rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22635fi 22636{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5 22637$as_echo "$gl_cv_header_math_nan_works" >&6; } 22638 if test $gl_cv_header_math_nan_works = no; then 22639 REPLACE_NAN=1 22640 fi 22641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5 22642$as_echo_n "checking whether HUGE_VAL works... " >&6; } 22643if ${gl_cv_header_math_huge_val_works+:} false; then : 22644 $as_echo_n "(cached) " >&6 22645else 22646 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22647/* end confdefs.h. */ 22648#include <math.h> 22649int 22650main () 22651{ 22652/* Solaris 10 has a broken definition of HUGE_VAL. */ 22653 double d = HUGE_VAL; 22654 return d == 0; 22655 ; 22656 return 0; 22657} 22658_ACEOF 22659if ac_fn_c_try_compile "$LINENO"; then : 22660 gl_cv_header_math_huge_val_works=yes 22661else 22662 gl_cv_header_math_huge_val_works=no 22663fi 22664rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22665fi 22666{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5 22667$as_echo "$gl_cv_header_math_huge_val_works" >&6; } 22668 if test $gl_cv_header_math_huge_val_works = no; then 22669 REPLACE_HUGE_VAL=1 22670 fi 22671 22672 22673 22674 22675 22676 22677 22678 22679 22680 22681 22682 22683 22684 22685 22686 22687 22688 22689 if case "$host_os" in 22690 mingw*) true ;; 22691 *) test $ac_cv_func_mbsinit = yes ;; 22692 esac \ 22693 && test $ac_cv_func_mbrtowc = yes; then 22694 22695 22696 22697 22698 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 22699$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } 22700if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : 22701 $as_echo_n "(cached) " >&6 22702else 22703 22704 case "$host_os" in 22705 # Guess no on AIX and OSF/1. 22706 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; 22707 # Guess no on bsd. 22708 *bsd*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; 22709 # Guess yes otherwise. 22710 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; 22711 esac 22712 if test $LOCALE_JA != none; then 22713 if test "$cross_compiling" = yes; then : 22714 : 22715else 22716 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22717/* end confdefs.h. */ 22718 22719#include <locale.h> 22720#include <string.h> 22721/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 22722 <wchar.h>. 22723 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 22724 included before <wchar.h>. */ 22725#include <stddef.h> 22726#include <stdio.h> 22727#include <time.h> 22728#include <wchar.h> 22729int main () 22730{ 22731 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) 22732 { 22733 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ 22734 mbstate_t state; 22735 wchar_t wc; 22736 22737 memset (&state, '\0', sizeof (mbstate_t)); 22738 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) 22739 if (mbsinit (&state)) 22740 return 2; 22741 } 22742 return 0; 22743} 22744_ACEOF 22745if ac_fn_c_try_run "$LINENO"; then : 22746 gl_cv_func_mbrtowc_incomplete_state=yes 22747else 22748 gl_cv_func_mbrtowc_incomplete_state=no 22749fi 22750rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 22751 conftest.$ac_objext conftest.beam conftest.$ac_ext 22752fi 22753 22754 else 22755 if test $LOCALE_FR_UTF8 != none; then 22756 if test "$cross_compiling" = yes; then : 22757 : 22758else 22759 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22760/* end confdefs.h. */ 22761 22762#include <locale.h> 22763#include <string.h> 22764/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 22765 <wchar.h>. 22766 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 22767 included before <wchar.h>. */ 22768#include <stddef.h> 22769#include <stdio.h> 22770#include <time.h> 22771#include <wchar.h> 22772int main () 22773{ 22774 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) 22775 { 22776 const char input[] = "B\303\274\303\237er"; /* "Büßer" */ 22777 mbstate_t state; 22778 wchar_t wc; 22779 22780 memset (&state, '\0', sizeof (mbstate_t)); 22781 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) 22782 if (mbsinit (&state)) 22783 return 2; 22784 } 22785 return 0; 22786} 22787_ACEOF 22788if ac_fn_c_try_run "$LINENO"; then : 22789 gl_cv_func_mbrtowc_incomplete_state=yes 22790else 22791 gl_cv_func_mbrtowc_incomplete_state=no 22792fi 22793rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 22794 conftest.$ac_objext conftest.beam conftest.$ac_ext 22795fi 22796 22797 fi 22798 fi 22799 22800fi 22801{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 22802$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } 22803 22804 22805 22806 22807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 22808$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } 22809if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : 22810 $as_echo_n "(cached) " >&6 22811else 22812 22813 case "$host_os" in 22814 # Guess no on Solaris 8. 22815 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; 22816 # Guess yes otherwise. 22817 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; 22818 esac 22819 if test $LOCALE_ZH_CN != none; then 22820 if test "$cross_compiling" = yes; then : 22821 : 22822else 22823 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22824/* end confdefs.h. */ 22825 22826#include <locale.h> 22827#include <stdlib.h> 22828#include <string.h> 22829/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 22830 <wchar.h>. 22831 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 22832 included before <wchar.h>. */ 22833#include <stddef.h> 22834#include <stdio.h> 22835#include <time.h> 22836#include <wchar.h> 22837int main () 22838{ 22839 /* This fails on Solaris 8: 22840 mbrtowc returns 2, and sets wc to 0x00F0. 22841 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ 22842 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) 22843 { 22844 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ 22845 mbstate_t state; 22846 wchar_t wc; 22847 22848 memset (&state, '\0', sizeof (mbstate_t)); 22849 if (mbrtowc (&wc, input + 3, 6, &state) != 4 22850 && mbtowc (&wc, input + 3, 6) == 4) 22851 return 2; 22852 } 22853 return 0; 22854} 22855_ACEOF 22856if ac_fn_c_try_run "$LINENO"; then : 22857 gl_cv_func_mbrtowc_sanitycheck=yes 22858else 22859 gl_cv_func_mbrtowc_sanitycheck=no 22860fi 22861rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 22862 conftest.$ac_objext conftest.beam conftest.$ac_ext 22863fi 22864 22865 fi 22866 22867fi 22868{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 22869$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } 22870 22871 REPLACE_MBSTATE_T=0 22872 case "$gl_cv_func_mbrtowc_incomplete_state" in 22873 *yes) ;; 22874 *) REPLACE_MBSTATE_T=1 ;; 22875 esac 22876 case "$gl_cv_func_mbrtowc_sanitycheck" in 22877 *yes) ;; 22878 *) REPLACE_MBSTATE_T=1 ;; 22879 esac 22880 else 22881 REPLACE_MBSTATE_T=1 22882 fi 22883 22884 22885 22886 if test $ac_cv_func_mbrtowc = no; then 22887 HAVE_MBRTOWC=0 22888 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" " 22889/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 22890 <wchar.h>. 22891 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 22892 included before <wchar.h>. */ 22893#include <stddef.h> 22894#include <stdio.h> 22895#include <time.h> 22896#include <wchar.h> 22897 22898" 22899if test "x$ac_cv_have_decl_mbrtowc" = xyes; then : 22900 ac_have_decl=1 22901else 22902 ac_have_decl=0 22903fi 22904 22905cat >>confdefs.h <<_ACEOF 22906#define HAVE_DECL_MBRTOWC $ac_have_decl 22907_ACEOF 22908 22909 if test $ac_cv_have_decl_mbrtowc = yes; then 22910 REPLACE_MBRTOWC=1 22911 fi 22912 else 22913 if test $REPLACE_MBSTATE_T = 1; then 22914 REPLACE_MBRTOWC=1 22915 else 22916 22917 22918 22919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5 22920$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; } 22921if ${gl_cv_func_mbrtowc_null_arg1+:} false; then : 22922 $as_echo_n "(cached) " >&6 22923else 22924 22925 case "$host_os" in 22926 # Guess no on Solaris. 22927 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;; 22928 # Guess yes otherwise. 22929 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;; 22930 esac 22931 if test $LOCALE_FR_UTF8 != none; then 22932 if test "$cross_compiling" = yes; then : 22933 : 22934else 22935 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22936/* end confdefs.h. */ 22937 22938#include <locale.h> 22939#include <stdlib.h> 22940#include <string.h> 22941/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 22942 <wchar.h>. 22943 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 22944 included before <wchar.h>. */ 22945#include <stddef.h> 22946#include <stdio.h> 22947#include <time.h> 22948#include <wchar.h> 22949int main () 22950{ 22951 int result = 0; 22952 22953 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) 22954 { 22955 char input[] = "\303\237er"; 22956 mbstate_t state; 22957 wchar_t wc; 22958 size_t ret; 22959 22960 memset (&state, '\0', sizeof (mbstate_t)); 22961 wc = (wchar_t) 0xBADFACE; 22962 ret = mbrtowc (&wc, input, 5, &state); 22963 if (ret != 2) 22964 result |= 1; 22965 if (!mbsinit (&state)) 22966 result |= 2; 22967 22968 memset (&state, '\0', sizeof (mbstate_t)); 22969 ret = mbrtowc (NULL, input, 5, &state); 22970 if (ret != 2) /* Solaris 7 fails here: ret is -1. */ 22971 result |= 4; 22972 if (!mbsinit (&state)) 22973 result |= 8; 22974 } 22975 return result; 22976} 22977_ACEOF 22978if ac_fn_c_try_run "$LINENO"; then : 22979 gl_cv_func_mbrtowc_null_arg1=yes 22980else 22981 gl_cv_func_mbrtowc_null_arg1=no 22982fi 22983rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 22984 conftest.$ac_objext conftest.beam conftest.$ac_ext 22985fi 22986 22987 fi 22988 22989fi 22990{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5 22991$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; } 22992 22993 22994 22995 22996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5 22997$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; } 22998if ${gl_cv_func_mbrtowc_null_arg2+:} false; then : 22999 $as_echo_n "(cached) " >&6 23000else 23001 23002 case "$host_os" in 23003 # Guess no on OSF/1. 23004 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; 23005 # Guess yes otherwise. 23006 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; 23007 esac 23008 if test $LOCALE_FR_UTF8 != none; then 23009 if test "$cross_compiling" = yes; then : 23010 : 23011else 23012 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23013/* end confdefs.h. */ 23014 23015#include <locale.h> 23016#include <string.h> 23017/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 23018 <wchar.h>. 23019 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 23020 included before <wchar.h>. */ 23021#include <stddef.h> 23022#include <stdio.h> 23023#include <time.h> 23024#include <wchar.h> 23025int main () 23026{ 23027 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) 23028 { 23029 mbstate_t state; 23030 wchar_t wc; 23031 int ret; 23032 23033 memset (&state, '\0', sizeof (mbstate_t)); 23034 wc = (wchar_t) 0xBADFACE; 23035 mbrtowc (&wc, NULL, 5, &state); 23036 /* Check that wc was not modified. */ 23037 if (wc != (wchar_t) 0xBADFACE) 23038 return 2; 23039 } 23040 return 0; 23041} 23042_ACEOF 23043if ac_fn_c_try_run "$LINENO"; then : 23044 gl_cv_func_mbrtowc_null_arg2=yes 23045else 23046 gl_cv_func_mbrtowc_null_arg2=no 23047fi 23048rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 23049 conftest.$ac_objext conftest.beam conftest.$ac_ext 23050fi 23051 23052 fi 23053 23054fi 23055{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5 23056$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; } 23057 23058 23059 23060 23061 23062 23063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5 23064$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; } 23065if ${gl_cv_func_mbrtowc_retval+:} false; then : 23066 $as_echo_n "(cached) " >&6 23067else 23068 23069 case "$host_os" in 23070 # Guess no on HP-UX, Solaris, native Windows. 23071 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;; 23072 # Guess yes otherwise. 23073 *) gl_cv_func_mbrtowc_retval="guessing yes" ;; 23074 esac 23075 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \ 23076 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then 23077 if test "$cross_compiling" = yes; then : 23078 : 23079else 23080 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23081/* end confdefs.h. */ 23082 23083#include <locale.h> 23084#include <string.h> 23085/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 23086 <wchar.h>. 23087 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 23088 included before <wchar.h>. */ 23089#include <stddef.h> 23090#include <stdio.h> 23091#include <time.h> 23092#include <wchar.h> 23093int main () 23094{ 23095 int result = 0; 23096 int found_some_locale = 0; 23097 /* This fails on Solaris. */ 23098 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) 23099 { 23100 char input[] = "B\303\274\303\237er"; /* "Büßer" */ 23101 mbstate_t state; 23102 wchar_t wc; 23103 23104 memset (&state, '\0', sizeof (mbstate_t)); 23105 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) 23106 { 23107 input[1] = '\0'; 23108 if (mbrtowc (&wc, input + 2, 5, &state) != 1) 23109 result |= 1; 23110 } 23111 found_some_locale = 1; 23112 } 23113 /* This fails on HP-UX 11.11. */ 23114 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) 23115 { 23116 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ 23117 mbstate_t state; 23118 wchar_t wc; 23119 23120 memset (&state, '\0', sizeof (mbstate_t)); 23121 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) 23122 { 23123 input[1] = '\0'; 23124 if (mbrtowc (&wc, input + 2, 5, &state) != 2) 23125 result |= 2; 23126 } 23127 found_some_locale = 1; 23128 } 23129 /* This fails on native Windows. */ 23130 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) 23131 { 23132 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ 23133 mbstate_t state; 23134 wchar_t wc; 23135 23136 memset (&state, '\0', sizeof (mbstate_t)); 23137 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) 23138 { 23139 input[3] = '\0'; 23140 if (mbrtowc (&wc, input + 4, 4, &state) != 1) 23141 result |= 4; 23142 } 23143 found_some_locale = 1; 23144 } 23145 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) 23146 { 23147 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ 23148 mbstate_t state; 23149 wchar_t wc; 23150 23151 memset (&state, '\0', sizeof (mbstate_t)); 23152 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) 23153 { 23154 input[3] = '\0'; 23155 if (mbrtowc (&wc, input + 4, 4, &state) != 1) 23156 result |= 8; 23157 } 23158 found_some_locale = 1; 23159 } 23160 if (setlocale (LC_ALL, "Chinese_China.936") != NULL) 23161 { 23162 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ 23163 mbstate_t state; 23164 wchar_t wc; 23165 23166 memset (&state, '\0', sizeof (mbstate_t)); 23167 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) 23168 { 23169 input[3] = '\0'; 23170 if (mbrtowc (&wc, input + 4, 4, &state) != 1) 23171 result |= 16; 23172 } 23173 found_some_locale = 1; 23174 } 23175 return (found_some_locale ? result : 77); 23176} 23177_ACEOF 23178if ac_fn_c_try_run "$LINENO"; then : 23179 gl_cv_func_mbrtowc_retval=yes 23180else 23181 if test $? != 77; then 23182 gl_cv_func_mbrtowc_retval=no 23183 fi 23184 23185fi 23186rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 23187 conftest.$ac_objext conftest.beam conftest.$ac_ext 23188fi 23189 23190 fi 23191 23192fi 23193{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5 23194$as_echo "$gl_cv_func_mbrtowc_retval" >&6; } 23195 23196 23197 23198 23199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5 23200$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; } 23201if ${gl_cv_func_mbrtowc_nul_retval+:} false; then : 23202 $as_echo_n "(cached) " >&6 23203else 23204 23205 case "$host_os" in 23206 # Guess no on Solaris 8 and 9. 23207 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; 23208 # Guess yes otherwise. 23209 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; 23210 esac 23211 if test $LOCALE_ZH_CN != none; then 23212 if test "$cross_compiling" = yes; then : 23213 : 23214else 23215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23216/* end confdefs.h. */ 23217 23218#include <locale.h> 23219#include <string.h> 23220/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 23221 <wchar.h>. 23222 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 23223 included before <wchar.h>. */ 23224#include <stddef.h> 23225#include <stdio.h> 23226#include <time.h> 23227#include <wchar.h> 23228int main () 23229{ 23230 /* This fails on Solaris 8 and 9. */ 23231 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) 23232 { 23233 mbstate_t state; 23234 wchar_t wc; 23235 23236 memset (&state, '\0', sizeof (mbstate_t)); 23237 if (mbrtowc (&wc, "", 1, &state) != 0) 23238 return 2; 23239 } 23240 return 0; 23241} 23242_ACEOF 23243if ac_fn_c_try_run "$LINENO"; then : 23244 gl_cv_func_mbrtowc_nul_retval=yes 23245else 23246 gl_cv_func_mbrtowc_nul_retval=no 23247fi 23248rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 23249 conftest.$ac_objext conftest.beam conftest.$ac_ext 23250fi 23251 23252 fi 23253 23254fi 23255{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5 23256$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; } 23257 23258 23259 23260 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc stores incomplete characters" >&5 23261$as_echo_n "checking whether mbrtowc stores incomplete characters... " >&6; } 23262if ${gl_cv_func_mbrtowc_stores_incomplete+:} false; then : 23263 $as_echo_n "(cached) " >&6 23264else 23265 23266 case "$host_os" in 23267 # Guess yes on native Windows. 23268 mingw*) gl_cv_func_mbrtowc_stores_incomplete="guessing yes" ;; 23269 *) gl_cv_func_mbrtowc_stores_incomplete="guessing no" ;; 23270 esac 23271 case "$host_os" in 23272 mingw*) 23273 if test "$cross_compiling" = yes; then : 23274 : 23275else 23276 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23277/* end confdefs.h. */ 23278 23279#include <locale.h> 23280#include <string.h> 23281/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 23282 <wchar.h>. 23283 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 23284 included before <wchar.h>. */ 23285#include <stddef.h> 23286#include <stdio.h> 23287#include <time.h> 23288#include <wchar.h> 23289int main () 23290{ 23291 int result = 0; 23292 if (setlocale (LC_ALL, "French_France.65001") != NULL) 23293 { 23294 wchar_t wc = (wchar_t) 0xBADFACE; 23295 mbstate_t state; 23296 23297 memset (&state, '\0', sizeof (mbstate_t)); 23298 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2) 23299 && wc != (wchar_t) 0xBADFACE) 23300 result |= 1; 23301 } 23302 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) 23303 { 23304 wchar_t wc = (wchar_t) 0xBADFACE; 23305 mbstate_t state; 23306 23307 memset (&state, '\0', sizeof (mbstate_t)); 23308 if (mbrtowc (&wc, "\226", 1, &state) == (size_t)(-2) 23309 && wc != (wchar_t) 0xBADFACE) 23310 result |= 2; 23311 } 23312 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) 23313 { 23314 wchar_t wc = (wchar_t) 0xBADFACE; 23315 mbstate_t state; 23316 23317 memset (&state, '\0', sizeof (mbstate_t)); 23318 if (mbrtowc (&wc, "\245", 1, &state) == (size_t)(-2) 23319 && wc != (wchar_t) 0xBADFACE) 23320 result |= 4; 23321 } 23322 if (setlocale (LC_ALL, "Chinese_China.936") != NULL) 23323 { 23324 wchar_t wc = (wchar_t) 0xBADFACE; 23325 mbstate_t state; 23326 23327 memset (&state, '\0', sizeof (mbstate_t)); 23328 if (mbrtowc (&wc, "\261", 1, &state) == (size_t)(-2) 23329 && wc != (wchar_t) 0xBADFACE) 23330 result |= 8; 23331 } 23332 return result; 23333} 23334_ACEOF 23335if ac_fn_c_try_run "$LINENO"; then : 23336 gl_cv_func_mbrtowc_stores_incomplete=no 23337else 23338 gl_cv_func_mbrtowc_stores_incomplete=yes 23339fi 23340rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 23341 conftest.$ac_objext conftest.beam conftest.$ac_ext 23342fi 23343 23344 ;; 23345 *) 23346 23347 if test $LOCALE_FR_UTF8 != none; then 23348 if test "$cross_compiling" = yes; then : 23349 : 23350else 23351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23352/* end confdefs.h. */ 23353 23354#include <locale.h> 23355#include <string.h> 23356/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 23357 <wchar.h>. 23358 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 23359 included before <wchar.h>. */ 23360#include <stddef.h> 23361#include <stdio.h> 23362#include <time.h> 23363#include <wchar.h> 23364int main () 23365{ 23366 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) 23367 { 23368 wchar_t wc = (wchar_t) 0xBADFACE; 23369 mbstate_t state; 23370 23371 memset (&state, '\0', sizeof (mbstate_t)); 23372 if (mbrtowc (&wc, "\303", 1, &state) == (size_t)(-2) 23373 && wc != (wchar_t) 0xBADFACE) 23374 return 1; 23375 } 23376 return 0; 23377} 23378_ACEOF 23379if ac_fn_c_try_run "$LINENO"; then : 23380 gl_cv_func_mbrtowc_stores_incomplete=no 23381else 23382 gl_cv_func_mbrtowc_stores_incomplete=yes 23383fi 23384rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 23385 conftest.$ac_objext conftest.beam conftest.$ac_ext 23386fi 23387 23388 fi 23389 ;; 23390 esac 23391 23392fi 23393{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_stores_incomplete" >&5 23394$as_echo "$gl_cv_func_mbrtowc_stores_incomplete" >&6; } 23395 23396 23397 23398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works on empty input" >&5 23399$as_echo_n "checking whether mbrtowc works on empty input... " >&6; } 23400if ${gl_cv_func_mbrtowc_empty_input+:} false; then : 23401 $as_echo_n "(cached) " >&6 23402else 23403 23404 case "$host_os" in 23405 # Guess no on AIX and glibc systems. 23406 aix* | *-gnu* | gnu*) gl_cv_func_mbrtowc_empty_input="guessing no" ;; 23407 *bsd*) gl_cv_func_mbrtowc_empty_input="guessing no" ;; 23408 # Guess yes on native Windows. 23409 mingw*) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; 23410 *) gl_cv_func_mbrtowc_empty_input="guessing yes" ;; 23411 esac 23412 if test "$cross_compiling" = yes; then : 23413 : 23414else 23415 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23416/* end confdefs.h. */ 23417 23418 #include <wchar.h> 23419 static wchar_t wc; 23420 static mbstate_t mbs; 23421 int 23422 main (void) 23423 { 23424 return mbrtowc (&wc, "", 0, &mbs) != (size_t) -2; 23425 } 23426_ACEOF 23427if ac_fn_c_try_run "$LINENO"; then : 23428 gl_cv_func_mbrtowc_empty_input=yes 23429else 23430 gl_cv_func_mbrtowc_empty_input=no 23431fi 23432rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 23433 conftest.$ac_objext conftest.beam conftest.$ac_ext 23434fi 23435 23436 23437fi 23438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_empty_input" >&5 23439$as_echo "$gl_cv_func_mbrtowc_empty_input" >&6; } 23440 23441 23442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C locale is free of encoding errors" >&5 23443$as_echo_n "checking whether the C locale is free of encoding errors... " >&6; } 23444if ${gl_cv_func_mbrtowc_C_locale_sans_EILSEQ+:} false; then : 23445 $as_echo_n "(cached) " >&6 23446else 23447 23448 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="$gl_cross_guess_normal" 23449 23450 if test "$cross_compiling" = yes; then : 23451 case "$host_os" in 23452 # Guess yes on native Windows. 23453 mingw*) gl_cv_func_mbrtowc_C_locale_sans_EILSEQ="guessing yes" ;; 23454 esac 23455 23456else 23457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23458/* end confdefs.h. */ 23459#include <limits.h> 23460 #include <locale.h> 23461 #include <wchar.h> 23462 23463int 23464main () 23465{ 23466 23467 int i; 23468 char *locale = setlocale (LC_ALL, "C"); 23469 if (! locale) 23470 return 2; 23471 for (i = CHAR_MIN; i <= CHAR_MAX; i++) 23472 { 23473 char c = i; 23474 wchar_t wc; 23475 mbstate_t mbs = { 0, }; 23476 size_t ss = mbrtowc (&wc, &c, 1, &mbs); 23477 if (1 < ss) 23478 return 3; 23479 } 23480 return 0; 23481 23482 ; 23483 return 0; 23484} 23485_ACEOF 23486if ac_fn_c_try_run "$LINENO"; then : 23487 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=yes 23488else 23489 gl_cv_func_mbrtowc_C_locale_sans_EILSEQ=no 23490fi 23491rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 23492 conftest.$ac_objext conftest.beam conftest.$ac_ext 23493fi 23494 23495 23496fi 23497{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&5 23498$as_echo "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" >&6; } 23499 23500 case "$gl_cv_func_mbrtowc_null_arg1" in 23501 *yes) ;; 23502 *) 23503$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h 23504 23505 REPLACE_MBRTOWC=1 23506 ;; 23507 esac 23508 case "$gl_cv_func_mbrtowc_null_arg2" in 23509 *yes) ;; 23510 *) 23511$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h 23512 23513 REPLACE_MBRTOWC=1 23514 ;; 23515 esac 23516 case "$gl_cv_func_mbrtowc_retval" in 23517 *yes) ;; 23518 *) 23519$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h 23520 23521 REPLACE_MBRTOWC=1 23522 ;; 23523 esac 23524 case "$gl_cv_func_mbrtowc_nul_retval" in 23525 *yes) ;; 23526 *) 23527$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h 23528 23529 REPLACE_MBRTOWC=1 23530 ;; 23531 esac 23532 case "$gl_cv_func_mbrtowc_stores_incomplete" in 23533 *no) ;; 23534 *) 23535$as_echo "#define MBRTOWC_STORES_INCOMPLETE_BUG 1" >>confdefs.h 23536 23537 REPLACE_MBRTOWC=1 23538 ;; 23539 esac 23540 case "$gl_cv_func_mbrtowc_empty_input" in 23541 *yes) ;; 23542 *) 23543$as_echo "#define MBRTOWC_EMPTY_INPUT_BUG 1" >>confdefs.h 23544 23545 REPLACE_MBRTOWC=1 23546 ;; 23547 esac 23548 case "$gl_cv_func_mbrtowc_C_locale_sans_EILSEQ" in 23549 *yes) ;; 23550 *) 23551$as_echo "#define MBRTOWC_IN_C_LOCALE_MAYBE_EILSEQ 1" >>confdefs.h 23552 23553 REPLACE_MBRTOWC=1 23554 ;; 23555 esac 23556 fi 23557 fi 23558 if test $REPLACE_MBSTATE_T = 1; then 23559 case "$host_os" in 23560 mingw*) LIB_MBRTOWC= ;; 23561 *) 23562 23563 23564 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 23565$as_echo_n "checking whether imported symbols can be declared weak... " >&6; } 23566if ${gl_cv_have_weak+:} false; then : 23567 $as_echo_n "(cached) " >&6 23568else 23569 gl_cv_have_weak=no 23570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23571/* end confdefs.h. */ 23572extern void xyzzy (); 23573#pragma weak xyzzy 23574int 23575main () 23576{ 23577xyzzy(); 23578 ; 23579 return 0; 23580} 23581_ACEOF 23582if ac_fn_c_try_link "$LINENO"; then : 23583 gl_cv_have_weak=maybe 23584fi 23585rm -f core conftest.err conftest.$ac_objext \ 23586 conftest$ac_exeext conftest.$ac_ext 23587 if test $gl_cv_have_weak = maybe; then 23588 if test "$cross_compiling" = yes; then : 23589 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23590/* end confdefs.h. */ 23591#ifdef __ELF__ 23592 Extensible Linking Format 23593 #endif 23594 23595_ACEOF 23596if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 23597 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : 23598 gl_cv_have_weak="guessing yes" 23599else 23600 gl_cv_have_weak="guessing no" 23601fi 23602rm -f conftest* 23603 23604 23605else 23606 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23607/* end confdefs.h. */ 23608 23609#include <stdio.h> 23610#pragma weak fputs 23611int main () 23612{ 23613 return (fputs == NULL); 23614} 23615_ACEOF 23616if ac_fn_c_try_run "$LINENO"; then : 23617 gl_cv_have_weak=yes 23618else 23619 gl_cv_have_weak=no 23620fi 23621rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 23622 conftest.$ac_objext conftest.beam conftest.$ac_ext 23623fi 23624 23625 fi 23626 case " $LDFLAGS " in 23627 *" -static "*) gl_cv_have_weak=no ;; 23628 esac 23629 case "$gl_cv_have_weak" in 23630 *yes) 23631 case "$host_os" in 23632 freebsd* | dragonfly*) 23633 : > conftest1.c 23634 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1 23635 cat <<EOF > conftest2.c 23636#include <pthread.h> 23637#pragma weak pthread_mutexattr_gettype 23638int main () 23639{ 23640 return (pthread_mutexattr_gettype != NULL); 23641} 23642EOF 23643 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \ 23644 || gl_cv_have_weak=no 23645 rm -f conftest1.c libempty.so conftest2.c conftest 23646 ;; 23647 esac 23648 ;; 23649 esac 23650 23651fi 23652{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 23653$as_echo "$gl_cv_have_weak" >&6; } 23654 case "$gl_cv_have_weak" in 23655 *yes) 23656 23657$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h 23658 23659 ;; 23660 esac 23661 23662 case "$gl_cv_have_weak" in 23663 *yes) LIB_MBRTOWC= ;; 23664 *) LIB_MBRTOWC="$LIBPTHREAD" ;; 23665 esac 23666 ;; 23667 esac 23668 else 23669 LIB_MBRTOWC= 23670 fi 23671 23672 23673 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then 23674 23675 23676 23677 23678 23679 23680 23681 23682 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext" 23683 23684 if test $REPLACE_MBSTATE_T = 1; then 23685 23686 23687 23688 23689 23690 23691 23692 23693 gl_LIBOBJS="$gl_LIBOBJS lc-charset-dispatch.$ac_objext" 23694 23695 23696 23697 23698 23699 23700 23701 23702 23703 gl_LIBOBJS="$gl_LIBOBJS mbtowc-lock.$ac_objext" 23704 23705 23706 23707 23708 CFLAG_VISIBILITY= 23709 HAVE_VISIBILITY=0 23710 if test -n "$GCC"; then 23711 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5 23712$as_echo_n "checking whether the -Werror option is usable... " >&6; } 23713if ${gl_cv_cc_vis_werror+:} false; then : 23714 $as_echo_n "(cached) " >&6 23715else 23716 gl_save_CFLAGS="$CFLAGS" 23717 CFLAGS="$CFLAGS -Werror" 23718 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23719/* end confdefs.h. */ 23720 23721int 23722main () 23723{ 23724 23725 ; 23726 return 0; 23727} 23728_ACEOF 23729if ac_fn_c_try_compile "$LINENO"; then : 23730 gl_cv_cc_vis_werror=yes 23731else 23732 gl_cv_cc_vis_werror=no 23733fi 23734rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 23735 CFLAGS="$gl_save_CFLAGS" 23736 23737fi 23738{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5 23739$as_echo "$gl_cv_cc_vis_werror" >&6; } 23740 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5 23741$as_echo_n "checking for simple visibility declarations... " >&6; } 23742if ${gl_cv_cc_visibility+:} false; then : 23743 $as_echo_n "(cached) " >&6 23744else 23745 gl_save_CFLAGS="$CFLAGS" 23746 CFLAGS="$CFLAGS -fvisibility=hidden" 23747 if test $gl_cv_cc_vis_werror = yes; then 23748 CFLAGS="$CFLAGS -Werror" 23749 fi 23750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23751/* end confdefs.h. */ 23752extern __attribute__((__visibility__("hidden"))) int hiddenvar; 23753 extern __attribute__((__visibility__("default"))) int exportedvar; 23754 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); 23755 extern __attribute__((__visibility__("default"))) int exportedfunc (void); 23756 void dummyfunc (void) {} 23757 23758int 23759main () 23760{ 23761 23762 ; 23763 return 0; 23764} 23765_ACEOF 23766if ac_fn_c_try_compile "$LINENO"; then : 23767 gl_cv_cc_visibility=yes 23768else 23769 gl_cv_cc_visibility=no 23770fi 23771rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 23772 CFLAGS="$gl_save_CFLAGS" 23773 23774fi 23775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5 23776$as_echo "$gl_cv_cc_visibility" >&6; } 23777 if test $gl_cv_cc_visibility = yes; then 23778 CFLAG_VISIBILITY="-fvisibility=hidden" 23779 HAVE_VISIBILITY=1 23780 fi 23781 fi 23782 23783 23784 23785cat >>confdefs.h <<_ACEOF 23786#define HAVE_VISIBILITY $HAVE_VISIBILITY 23787_ACEOF 23788 23789 23790 23791 fi 23792 23793 23794 : 23795 23796 fi 23797 23798 23799 23800 23801 23802 GNULIB_MBRTOWC=1 23803 23804 23805 23806 23807 23808$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h 23809 23810 23811 23812 23813 23814 23815 23816 23817 23818 23819 23820 23821 23822 23823 23824 if case "$host_os" in 23825 mingw*) true ;; 23826 *) test $ac_cv_func_mbsinit = yes ;; 23827 esac \ 23828 && test $ac_cv_func_mbrtowc = yes; then 23829 23830 23831 23832 23833 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 23834$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } 23835if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : 23836 $as_echo_n "(cached) " >&6 23837else 23838 23839 case "$host_os" in 23840 # Guess no on AIX and OSF/1. 23841 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; 23842 # Guess no on bsd. 23843 *bsd*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; 23844 # Guess yes otherwise. 23845 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; 23846 esac 23847 if test $LOCALE_JA != none; then 23848 if test "$cross_compiling" = yes; then : 23849 : 23850else 23851 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23852/* end confdefs.h. */ 23853 23854#include <locale.h> 23855#include <string.h> 23856/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 23857 <wchar.h>. 23858 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 23859 included before <wchar.h>. */ 23860#include <stddef.h> 23861#include <stdio.h> 23862#include <time.h> 23863#include <wchar.h> 23864int main () 23865{ 23866 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) 23867 { 23868 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ 23869 mbstate_t state; 23870 wchar_t wc; 23871 23872 memset (&state, '\0', sizeof (mbstate_t)); 23873 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) 23874 if (mbsinit (&state)) 23875 return 2; 23876 } 23877 return 0; 23878} 23879_ACEOF 23880if ac_fn_c_try_run "$LINENO"; then : 23881 gl_cv_func_mbrtowc_incomplete_state=yes 23882else 23883 gl_cv_func_mbrtowc_incomplete_state=no 23884fi 23885rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 23886 conftest.$ac_objext conftest.beam conftest.$ac_ext 23887fi 23888 23889 else 23890 if test $LOCALE_FR_UTF8 != none; then 23891 if test "$cross_compiling" = yes; then : 23892 : 23893else 23894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23895/* end confdefs.h. */ 23896 23897#include <locale.h> 23898#include <string.h> 23899/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 23900 <wchar.h>. 23901 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 23902 included before <wchar.h>. */ 23903#include <stddef.h> 23904#include <stdio.h> 23905#include <time.h> 23906#include <wchar.h> 23907int main () 23908{ 23909 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) 23910 { 23911 const char input[] = "B\303\274\303\237er"; /* "Büßer" */ 23912 mbstate_t state; 23913 wchar_t wc; 23914 23915 memset (&state, '\0', sizeof (mbstate_t)); 23916 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) 23917 if (mbsinit (&state)) 23918 return 2; 23919 } 23920 return 0; 23921} 23922_ACEOF 23923if ac_fn_c_try_run "$LINENO"; then : 23924 gl_cv_func_mbrtowc_incomplete_state=yes 23925else 23926 gl_cv_func_mbrtowc_incomplete_state=no 23927fi 23928rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 23929 conftest.$ac_objext conftest.beam conftest.$ac_ext 23930fi 23931 23932 fi 23933 fi 23934 23935fi 23936{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 23937$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } 23938 23939 23940 23941 23942 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 23943$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } 23944if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : 23945 $as_echo_n "(cached) " >&6 23946else 23947 23948 case "$host_os" in 23949 # Guess no on Solaris 8. 23950 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; 23951 # Guess yes otherwise. 23952 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; 23953 esac 23954 if test $LOCALE_ZH_CN != none; then 23955 if test "$cross_compiling" = yes; then : 23956 : 23957else 23958 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23959/* end confdefs.h. */ 23960 23961#include <locale.h> 23962#include <stdlib.h> 23963#include <string.h> 23964/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 23965 <wchar.h>. 23966 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 23967 included before <wchar.h>. */ 23968#include <stddef.h> 23969#include <stdio.h> 23970#include <time.h> 23971#include <wchar.h> 23972int main () 23973{ 23974 /* This fails on Solaris 8: 23975 mbrtowc returns 2, and sets wc to 0x00F0. 23976 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ 23977 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) 23978 { 23979 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ 23980 mbstate_t state; 23981 wchar_t wc; 23982 23983 memset (&state, '\0', sizeof (mbstate_t)); 23984 if (mbrtowc (&wc, input + 3, 6, &state) != 4 23985 && mbtowc (&wc, input + 3, 6) == 4) 23986 return 2; 23987 } 23988 return 0; 23989} 23990_ACEOF 23991if ac_fn_c_try_run "$LINENO"; then : 23992 gl_cv_func_mbrtowc_sanitycheck=yes 23993else 23994 gl_cv_func_mbrtowc_sanitycheck=no 23995fi 23996rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 23997 conftest.$ac_objext conftest.beam conftest.$ac_ext 23998fi 23999 24000 fi 24001 24002fi 24003{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 24004$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } 24005 24006 REPLACE_MBSTATE_T=0 24007 case "$gl_cv_func_mbrtowc_incomplete_state" in 24008 *yes) ;; 24009 *) REPLACE_MBSTATE_T=1 ;; 24010 esac 24011 case "$gl_cv_func_mbrtowc_sanitycheck" in 24012 *yes) ;; 24013 *) REPLACE_MBSTATE_T=1 ;; 24014 esac 24015 else 24016 REPLACE_MBSTATE_T=1 24017 fi 24018 24019 24020 24021 if test $ac_cv_func_mbsinit = no; then 24022 HAVE_MBSINIT=0 24023 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" " 24024/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 24025 <wchar.h>. 24026 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 24027 included before <wchar.h>. */ 24028#include <stddef.h> 24029#include <stdio.h> 24030#include <time.h> 24031#include <wchar.h> 24032 24033" 24034if test "x$ac_cv_have_decl_mbsinit" = xyes; then : 24035 ac_have_decl=1 24036else 24037 ac_have_decl=0 24038fi 24039 24040cat >>confdefs.h <<_ACEOF 24041#define HAVE_DECL_MBSINIT $ac_have_decl 24042_ACEOF 24043 24044 if test $ac_cv_have_decl_mbsinit = yes; then 24045 REPLACE_MBSINIT=1 24046 fi 24047 else 24048 if test $REPLACE_MBSTATE_T = 1; then 24049 REPLACE_MBSINIT=1 24050 else 24051 case "$host_os" in 24052 mingw*) REPLACE_MBSINIT=1 ;; 24053 esac 24054 fi 24055 fi 24056 24057 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then 24058 24059 24060 24061 24062 24063 24064 24065 24066 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext" 24067 24068 24069 : 24070 24071 fi 24072 24073 24074 24075 24076 24077 GNULIB_MBSINIT=1 24078 24079 24080 24081 24082 24083$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h 24084 24085 24086 24087 24088 24089 24090 24091 24092 24093 24094 24095 24096 24097 24098 if case "$host_os" in 24099 mingw*) true ;; 24100 *) test $ac_cv_func_mbsinit = yes ;; 24101 esac \ 24102 && test $ac_cv_func_mbrtowc = yes; then 24103 24104 24105 24106 24107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 24108$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } 24109if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : 24110 $as_echo_n "(cached) " >&6 24111else 24112 24113 case "$host_os" in 24114 # Guess no on AIX and OSF/1. 24115 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; 24116 # Guess no on bsd. 24117 *bsd*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; 24118 # Guess yes otherwise. 24119 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; 24120 esac 24121 if test $LOCALE_JA != none; then 24122 if test "$cross_compiling" = yes; then : 24123 : 24124else 24125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24126/* end confdefs.h. */ 24127 24128#include <locale.h> 24129#include <string.h> 24130/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 24131 <wchar.h>. 24132 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 24133 included before <wchar.h>. */ 24134#include <stddef.h> 24135#include <stdio.h> 24136#include <time.h> 24137#include <wchar.h> 24138int main () 24139{ 24140 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) 24141 { 24142 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ 24143 mbstate_t state; 24144 wchar_t wc; 24145 24146 memset (&state, '\0', sizeof (mbstate_t)); 24147 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) 24148 if (mbsinit (&state)) 24149 return 2; 24150 } 24151 return 0; 24152} 24153_ACEOF 24154if ac_fn_c_try_run "$LINENO"; then : 24155 gl_cv_func_mbrtowc_incomplete_state=yes 24156else 24157 gl_cv_func_mbrtowc_incomplete_state=no 24158fi 24159rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 24160 conftest.$ac_objext conftest.beam conftest.$ac_ext 24161fi 24162 24163 else 24164 if test $LOCALE_FR_UTF8 != none; then 24165 if test "$cross_compiling" = yes; then : 24166 : 24167else 24168 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24169/* end confdefs.h. */ 24170 24171#include <locale.h> 24172#include <string.h> 24173/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 24174 <wchar.h>. 24175 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 24176 included before <wchar.h>. */ 24177#include <stddef.h> 24178#include <stdio.h> 24179#include <time.h> 24180#include <wchar.h> 24181int main () 24182{ 24183 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) 24184 { 24185 const char input[] = "B\303\274\303\237er"; /* "Büßer" */ 24186 mbstate_t state; 24187 wchar_t wc; 24188 24189 memset (&state, '\0', sizeof (mbstate_t)); 24190 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) 24191 if (mbsinit (&state)) 24192 return 2; 24193 } 24194 return 0; 24195} 24196_ACEOF 24197if ac_fn_c_try_run "$LINENO"; then : 24198 gl_cv_func_mbrtowc_incomplete_state=yes 24199else 24200 gl_cv_func_mbrtowc_incomplete_state=no 24201fi 24202rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 24203 conftest.$ac_objext conftest.beam conftest.$ac_ext 24204fi 24205 24206 fi 24207 fi 24208 24209fi 24210{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 24211$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } 24212 24213 24214 24215 24216 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 24217$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } 24218if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : 24219 $as_echo_n "(cached) " >&6 24220else 24221 24222 case "$host_os" in 24223 # Guess no on Solaris 8. 24224 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; 24225 # Guess yes otherwise. 24226 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; 24227 esac 24228 if test $LOCALE_ZH_CN != none; then 24229 if test "$cross_compiling" = yes; then : 24230 : 24231else 24232 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24233/* end confdefs.h. */ 24234 24235#include <locale.h> 24236#include <stdlib.h> 24237#include <string.h> 24238/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 24239 <wchar.h>. 24240 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 24241 included before <wchar.h>. */ 24242#include <stddef.h> 24243#include <stdio.h> 24244#include <time.h> 24245#include <wchar.h> 24246int main () 24247{ 24248 /* This fails on Solaris 8: 24249 mbrtowc returns 2, and sets wc to 0x00F0. 24250 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ 24251 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) 24252 { 24253 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ 24254 mbstate_t state; 24255 wchar_t wc; 24256 24257 memset (&state, '\0', sizeof (mbstate_t)); 24258 if (mbrtowc (&wc, input + 3, 6, &state) != 4 24259 && mbtowc (&wc, input + 3, 6) == 4) 24260 return 2; 24261 } 24262 return 0; 24263} 24264_ACEOF 24265if ac_fn_c_try_run "$LINENO"; then : 24266 gl_cv_func_mbrtowc_sanitycheck=yes 24267else 24268 gl_cv_func_mbrtowc_sanitycheck=no 24269fi 24270rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 24271 conftest.$ac_objext conftest.beam conftest.$ac_ext 24272fi 24273 24274 fi 24275 24276fi 24277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 24278$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } 24279 24280 REPLACE_MBSTATE_T=0 24281 case "$gl_cv_func_mbrtowc_incomplete_state" in 24282 *yes) ;; 24283 *) REPLACE_MBSTATE_T=1 ;; 24284 esac 24285 case "$gl_cv_func_mbrtowc_sanitycheck" in 24286 *yes) ;; 24287 *) REPLACE_MBSTATE_T=1 ;; 24288 esac 24289 else 24290 REPLACE_MBSTATE_T=1 24291 fi 24292 24293 24294 24295 if test $ac_cv_func_mbsrtowcs = no; then 24296 HAVE_MBSRTOWCS=0 24297 ac_fn_c_check_decl "$LINENO" "mbsrtowcs" "ac_cv_have_decl_mbsrtowcs" " 24298/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 24299 <wchar.h>. 24300 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 24301 included before <wchar.h>. */ 24302#include <stddef.h> 24303#include <stdio.h> 24304#include <time.h> 24305#include <wchar.h> 24306 24307" 24308if test "x$ac_cv_have_decl_mbsrtowcs" = xyes; then : 24309 ac_have_decl=1 24310else 24311 ac_have_decl=0 24312fi 24313 24314cat >>confdefs.h <<_ACEOF 24315#define HAVE_DECL_MBSRTOWCS $ac_have_decl 24316_ACEOF 24317 24318 if test $ac_cv_have_decl_mbsrtowcs = yes; then 24319 REPLACE_MBSRTOWCS=1 24320 fi 24321 else 24322 if test $REPLACE_MBSTATE_T = 1; then 24323 REPLACE_MBSRTOWCS=1 24324 else 24325 24326 24327 24328 24329 24330 24331 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbsrtowcs works" >&5 24332$as_echo_n "checking whether mbsrtowcs works... " >&6; } 24333if ${gl_cv_func_mbsrtowcs_works+:} false; then : 24334 $as_echo_n "(cached) " >&6 24335else 24336 24337 case "$host_os" in 24338 # Guess no on HP-UX, Solaris, mingw. 24339 hpux* | solaris* | mingw*) gl_cv_func_mbsrtowcs_works="guessing no" ;; 24340 # Guess yes otherwise. 24341 *) gl_cv_func_mbsrtowcs_works="guessing yes" ;; 24342 esac 24343 if test $LOCALE_FR != none || test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none || test $LOCALE_ZH_CN != none; then 24344 if test "$cross_compiling" = yes; then : 24345 : 24346else 24347 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24348/* end confdefs.h. */ 24349 24350#include <locale.h> 24351#include <string.h> 24352/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 24353 <wchar.h>. 24354 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 24355 included before <wchar.h>. */ 24356#include <stddef.h> 24357#include <stdio.h> 24358#include <time.h> 24359#include <wchar.h> 24360int main () 24361{ 24362 int result = 0; 24363 /* Test whether the function supports a NULL destination argument. 24364 This fails on native Windows. */ 24365 if (setlocale (LC_ALL, "$LOCALE_FR") != NULL) 24366 { 24367 const char input[] = "\337er"; 24368 const char *src = input; 24369 mbstate_t state; 24370 24371 memset (&state, '\0', sizeof (mbstate_t)); 24372 if (mbsrtowcs (NULL, &src, 1, &state) != 3 24373 || src != input) 24374 result |= 1; 24375 } 24376 /* Test whether the function works when started with a conversion state 24377 in non-initial state. This fails on HP-UX 11.11 and Solaris 10. */ 24378 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) 24379 { 24380 const char input[] = "B\303\274\303\237er"; 24381 mbstate_t state; 24382 24383 memset (&state, '\0', sizeof (mbstate_t)); 24384 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) 24385 if (!mbsinit (&state)) 24386 { 24387 const char *src = input + 2; 24388 if (mbsrtowcs (NULL, &src, 10, &state) != 4) 24389 result |= 2; 24390 } 24391 } 24392 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) 24393 { 24394 const char input[] = "<\306\374\313\334\270\354>"; 24395 mbstate_t state; 24396 24397 memset (&state, '\0', sizeof (mbstate_t)); 24398 if (mbrtowc (NULL, input + 3, 1, &state) == (size_t)(-2)) 24399 if (!mbsinit (&state)) 24400 { 24401 const char *src = input + 4; 24402 if (mbsrtowcs (NULL, &src, 10, &state) != 3) 24403 result |= 4; 24404 } 24405 } 24406 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) 24407 { 24408 const char input[] = "B\250\271\201\060\211\070er"; 24409 mbstate_t state; 24410 24411 memset (&state, '\0', sizeof (mbstate_t)); 24412 if (mbrtowc (NULL, input + 1, 1, &state) == (size_t)(-2)) 24413 if (!mbsinit (&state)) 24414 { 24415 const char *src = input + 2; 24416 if (mbsrtowcs (NULL, &src, 10, &state) != 4) 24417 result |= 8; 24418 } 24419 } 24420 return result; 24421} 24422_ACEOF 24423if ac_fn_c_try_run "$LINENO"; then : 24424 gl_cv_func_mbsrtowcs_works=yes 24425else 24426 gl_cv_func_mbsrtowcs_works=no 24427fi 24428rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 24429 conftest.$ac_objext conftest.beam conftest.$ac_ext 24430fi 24431 24432 fi 24433 24434fi 24435{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbsrtowcs_works" >&5 24436$as_echo "$gl_cv_func_mbsrtowcs_works" >&6; } 24437 24438 case "$gl_cv_func_mbsrtowcs_works" in 24439 *yes) ;; 24440 *) REPLACE_MBSRTOWCS=1 ;; 24441 esac 24442 fi 24443 fi 24444 24445 if test $HAVE_MBSRTOWCS = 0 || test $REPLACE_MBSRTOWCS = 1; then 24446 24447 24448 24449 24450 24451 24452 24453 24454 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs.$ac_objext" 24455 24456 24457 24458 24459 24460 24461 24462 24463 24464 gl_LIBOBJS="$gl_LIBOBJS mbsrtowcs-state.$ac_objext" 24465 24466 24467 : 24468 24469 fi 24470 24471 24472 24473 24474 24475 GNULIB_MBSRTOWCS=1 24476 24477 24478 24479 24480 24481$as_echo "#define GNULIB_TEST_MBSRTOWCS 1" >>confdefs.h 24482 24483 24484 24485 24486 24487 24488 for ac_func in mbtowc 24489do : 24490 ac_fn_c_check_func "$LINENO" "mbtowc" "ac_cv_func_mbtowc" 24491if test "x$ac_cv_func_mbtowc" = xyes; then : 24492 cat >>confdefs.h <<_ACEOF 24493#define HAVE_MBTOWC 1 24494_ACEOF 24495 24496fi 24497done 24498 24499 if test $ac_cv_func_mbtowc = no; then 24500 HAVE_MBTOWC=0 24501 else 24502 if false; then 24503 REPLACE_MBTOWC=1 24504 fi 24505 fi 24506 24507 if test $HAVE_MBTOWC = 0 || test $REPLACE_MBTOWC = 1; then 24508 24509 24510 24511 24512 24513 24514 24515 24516 gl_LIBOBJS="$gl_LIBOBJS mbtowc.$ac_objext" 24517 24518 24519 : 24520 24521 fi 24522 24523 24524 24525 24526 24527 GNULIB_MBTOWC=1 24528 24529 24530 24531 24532 24533$as_echo "#define GNULIB_TEST_MBTOWC 1" >>confdefs.h 24534 24535 24536 24537 24538 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then 24539 24540 24541 24542 24543 24544 24545 24546 24547 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" 24548 24549 24550 for ac_header in bp-sym.h 24551do : 24552 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" 24553if test "x$ac_cv_header_bp_sym_h" = xyes; then : 24554 cat >>confdefs.h <<_ACEOF 24555#define HAVE_BP_SYM_H 1 24556_ACEOF 24557 24558fi 24559 24560done 24561 24562 24563 fi 24564 24565 24566 24567 24568 24569 GNULIB_MEMCHR=1 24570 24571 24572 24573 24574 24575$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h 24576 24577 24578 24579 24580 24581 if test $HAVE_DECL_MEMMEM = 1 && test $REPLACE_MEMMEM = 0; then 24582 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works in linear time" >&5 24583$as_echo_n "checking whether memmem works in linear time... " >&6; } 24584if ${gl_cv_func_memmem_works_fast+:} false; then : 24585 $as_echo_n "(cached) " >&6 24586else 24587 if test "$cross_compiling" = yes; then : 24588 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24589/* end confdefs.h. */ 24590 24591#include <features.h> 24592#ifdef __GNU_LIBRARY__ 24593 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 9) || (__GLIBC__ > 2)) \ 24594 && !defined __UCLIBC__ 24595 Lucky user 24596 #endif 24597#endif 24598#ifdef __CYGWIN__ 24599 #include <cygwin/version.h> 24600 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 0) 24601 Lucky user 24602 #endif 24603#endif 24604 24605_ACEOF 24606if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 24607 $EGREP "Lucky user" >/dev/null 2>&1; then : 24608 gl_cv_func_memmem_works_fast="guessing yes" 24609else 24610 gl_cv_func_memmem_works_fast="$gl_cross_guess_normal" 24611fi 24612rm -f conftest* 24613 24614 24615else 24616 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24617/* end confdefs.h. */ 24618 24619#include <signal.h> /* for signal */ 24620#include <string.h> /* for memmem */ 24621#include <stdlib.h> /* for malloc */ 24622#include <unistd.h> /* for alarm */ 24623static void quit (int sig) { _exit (sig + 128); } 24624 24625int 24626main () 24627{ 24628 24629 int result = 0; 24630 size_t m = 1000000; 24631 char *haystack = (char *) malloc (2 * m + 1); 24632 char *needle = (char *) malloc (m + 1); 24633 /* Failure to compile this test due to missing alarm is okay, 24634 since all such platforms (mingw) also lack memmem. */ 24635 signal (SIGALRM, quit); 24636 alarm (5); 24637 /* Check for quadratic performance. */ 24638 if (haystack && needle) 24639 { 24640 memset (haystack, 'A', 2 * m); 24641 haystack[2 * m] = 'B'; 24642 memset (needle, 'A', m); 24643 needle[m] = 'B'; 24644 if (!memmem (haystack, 2 * m + 1, needle, m + 1)) 24645 result |= 1; 24646 } 24647 /* Free allocated memory, in case some sanitizer is watching. */ 24648 free (haystack); 24649 free (needle); 24650 return result; 24651 24652 ; 24653 return 0; 24654} 24655_ACEOF 24656if ac_fn_c_try_run "$LINENO"; then : 24657 gl_cv_func_memmem_works_fast=yes 24658else 24659 gl_cv_func_memmem_works_fast=no 24660fi 24661rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 24662 conftest.$ac_objext conftest.beam conftest.$ac_ext 24663fi 24664 24665 24666fi 24667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_fast" >&5 24668$as_echo "$gl_cv_func_memmem_works_fast" >&6; } 24669 case "$gl_cv_func_memmem_works_fast" in 24670 *yes) ;; 24671 *) 24672 REPLACE_MEMMEM=1 24673 ;; 24674 esac 24675 fi 24676 24677 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then 24678 24679 24680 24681 24682 24683 24684 24685 24686 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext" 24687 24688 fi 24689 24690 24691 24692 24693 for ac_func in memmem 24694do : 24695 ac_fn_c_check_func "$LINENO" "memmem" "ac_cv_func_memmem" 24696if test "x$ac_cv_func_memmem" = xyes; then : 24697 cat >>confdefs.h <<_ACEOF 24698#define HAVE_MEMMEM 1 24699_ACEOF 24700 24701fi 24702done 24703 24704 if test $ac_cv_func_memmem = yes; then 24705 HAVE_MEMMEM=1 24706 else 24707 HAVE_MEMMEM=0 24708 fi 24709 24710 if test $ac_cv_have_decl_memmem = no; then 24711 HAVE_DECL_MEMMEM=0 24712 else 24713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memmem works" >&5 24714$as_echo_n "checking whether memmem works... " >&6; } 24715if ${gl_cv_func_memmem_works_always+:} false; then : 24716 $as_echo_n "(cached) " >&6 24717else 24718 if test "$cross_compiling" = yes; then : 24719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24720/* end confdefs.h. */ 24721 24722#ifdef __GNU_LIBRARY__ 24723 #include <features.h> 24724 #if ((__GLIBC__ == 2 && ((__GLIBC_MINOR > 0 && __GLIBC_MINOR__ < 9) \ 24725 || __GLIBC_MINOR__ > 12)) \ 24726 || (__GLIBC__ > 2)) \ 24727 || defined __UCLIBC__ 24728 Lucky user 24729 #endif 24730#elif defined __CYGWIN__ 24731 #include <cygwin/version.h> 24732 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) 24733 Lucky user 24734 #endif 24735#else 24736 Lucky user 24737#endif 24738 24739_ACEOF 24740if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 24741 $EGREP "Lucky user" >/dev/null 2>&1; then : 24742 gl_cv_func_memmem_works_always="guessing yes" 24743else 24744 gl_cv_func_memmem_works_always="$gl_cross_guess_normal" 24745fi 24746rm -f conftest* 24747 24748 24749else 24750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24751/* end confdefs.h. */ 24752 24753#include <string.h> /* for memmem */ 24754#define P "_EF_BF_BD" 24755#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P 24756#define NEEDLE P P P P P 24757 24758int 24759main () 24760{ 24761 24762 int result = 0; 24763 if (memmem (HAYSTACK, strlen (HAYSTACK), NEEDLE, strlen (NEEDLE))) 24764 result |= 1; 24765 /* Check for empty needle behavior. */ 24766 { 24767 const char *haystack = "AAA"; 24768 if (memmem (haystack, 3, (const char *) 1, 0) != haystack) 24769 result |= 2; 24770 } 24771 return result; 24772 24773 ; 24774 return 0; 24775} 24776_ACEOF 24777if ac_fn_c_try_run "$LINENO"; then : 24778 gl_cv_func_memmem_works_always=yes 24779else 24780 gl_cv_func_memmem_works_always=no 24781fi 24782rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 24783 conftest.$ac_objext conftest.beam conftest.$ac_ext 24784fi 24785 24786 24787fi 24788{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memmem_works_always" >&5 24789$as_echo "$gl_cv_func_memmem_works_always" >&6; } 24790 case "$gl_cv_func_memmem_works_always" in 24791 *yes) ;; 24792 *) 24793 REPLACE_MEMMEM=1 24794 ;; 24795 esac 24796 fi 24797 : 24798 24799 if test $HAVE_MEMMEM = 0 || test $REPLACE_MEMMEM = 1; then 24800 24801 24802 24803 24804 24805 24806 24807 24808 gl_LIBOBJS="$gl_LIBOBJS memmem.$ac_objext" 24809 24810 fi 24811 24812 24813 24814 24815 24816 GNULIB_MEMMEM=1 24817 24818 24819 24820 24821 24822$as_echo "#define GNULIB_TEST_MEMMEM 1" >>confdefs.h 24823 24824 24825 24826 24827 24828 24829 24830 24831 24832 for ac_func in mempcpy 24833do : 24834 ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy" 24835if test "x$ac_cv_func_mempcpy" = xyes; then : 24836 cat >>confdefs.h <<_ACEOF 24837#define HAVE_MEMPCPY 1 24838_ACEOF 24839 24840fi 24841done 24842 24843 if test $ac_cv_func_mempcpy = no; then 24844 HAVE_MEMPCPY=0 24845 fi 24846 24847 if test $HAVE_MEMPCPY = 0; then 24848 24849 24850 24851 24852 24853 24854 24855 24856 gl_LIBOBJS="$gl_LIBOBJS mempcpy.$ac_objext" 24857 24858 24859 : 24860 24861 fi 24862 24863 24864 24865 24866 24867 GNULIB_MEMPCPY=1 24868 24869 24870 24871 24872 24873$as_echo "#define GNULIB_TEST_MEMPCPY 1" >>confdefs.h 24874 24875 24876 24877 24878 24879 24880 24881 24882 if test $ac_cv_have_decl_memrchr = no; then 24883 HAVE_DECL_MEMRCHR=0 24884 fi 24885 24886 for ac_func in memrchr 24887do : 24888 ac_fn_c_check_func "$LINENO" "memrchr" "ac_cv_func_memrchr" 24889if test "x$ac_cv_func_memrchr" = xyes; then : 24890 cat >>confdefs.h <<_ACEOF 24891#define HAVE_MEMRCHR 1 24892_ACEOF 24893 24894fi 24895done 24896 24897 24898 if test $ac_cv_func_memrchr = no; then 24899 24900 24901 24902 24903 24904 24905 24906 24907 gl_LIBOBJS="$gl_LIBOBJS memrchr.$ac_objext" 24908 24909 : 24910 fi 24911 24912 24913 24914 24915 24916 GNULIB_MEMRCHR=1 24917 24918 24919 24920 24921 24922$as_echo "#define GNULIB_TEST_MEMRCHR 1" >>confdefs.h 24923 24924 24925 24926 24927 24928 24929 24930 24931 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing slash" >&5 24932$as_echo_n "checking whether mkdir handles trailing slash... " >&6; } 24933if ${gl_cv_func_mkdir_trailing_slash_works+:} false; then : 24934 $as_echo_n "(cached) " >&6 24935else 24936 rm -rf conftest.dir 24937 if test "$cross_compiling" = yes; then : 24938 case "$host_os" in 24939 # Guess yes on Linux systems. 24940 linux-* | linux) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;; 24941 # Guess yes on glibc systems. 24942 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;; 24943 # Guess yes on bsd systems. 24944 *bsd*) gl_cv_func_mkdir_trailing_slash_works="guessing yes" ;; 24945 # Guess yes on MSVC, no on mingw. 24946 mingw*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24947/* end confdefs.h. */ 24948 24949#ifdef _MSC_VER 24950 Known 24951#endif 24952 24953_ACEOF 24954if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 24955 $EGREP "Known" >/dev/null 2>&1; then : 24956 gl_cv_func_mkdir_trailing_slash_works="guessing yes" 24957else 24958 gl_cv_func_mkdir_trailing_slash_works="guessing no" 24959fi 24960rm -f conftest* 24961 24962 ;; 24963 # If we don't know, obey --enable-cross-guesses. 24964 *) gl_cv_func_mkdir_trailing_slash_works="$gl_cross_guess_normal" ;; 24965 esac 24966 24967else 24968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24969/* end confdefs.h. */ 24970 24971# include <sys/types.h> 24972# include <sys/stat.h> 24973 24974int 24975main () 24976{ 24977return mkdir ("conftest.dir/", 0700); 24978 ; 24979 return 0; 24980} 24981_ACEOF 24982if ac_fn_c_try_run "$LINENO"; then : 24983 gl_cv_func_mkdir_trailing_slash_works=yes 24984else 24985 gl_cv_func_mkdir_trailing_slash_works=no 24986fi 24987rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 24988 conftest.$ac_objext conftest.beam conftest.$ac_ext 24989fi 24990 24991 rm -rf conftest.dir 24992 24993 24994fi 24995{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_slash_works" >&5 24996$as_echo "$gl_cv_func_mkdir_trailing_slash_works" >&6; } 24997 case "$gl_cv_func_mkdir_trailing_slash_works" in 24998 *yes) ;; 24999 *) 25000 REPLACE_MKDIR=1 25001 ;; 25002 esac 25003 25004 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mkdir handles trailing dot" >&5 25005$as_echo_n "checking whether mkdir handles trailing dot... " >&6; } 25006if ${gl_cv_func_mkdir_trailing_dot_works+:} false; then : 25007 $as_echo_n "(cached) " >&6 25008else 25009 rm -rf conftest.dir 25010 if test "$cross_compiling" = yes; then : 25011 case "$host_os" in 25012 # Guess yes on glibc systems. 25013 *-gnu* | gnu*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;; 25014 # Guess yes on musl systems. 25015 *-musl*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;; 25016 # Guess no on bsd Windows. 25017 *bsd*) gl_cv_func_mkdir_trailing_dot_works="guessing yes" ;; 25018 # Guess no on native Windows. 25019 mingw*) gl_cv_func_mkdir_trailing_dot_works="guessing no" ;; 25020 # If we don't know, obey --enable-cross-guesses. 25021 *) gl_cv_func_mkdir_trailing_dot_works="$gl_cross_guess_normal" ;; 25022 esac 25023 25024else 25025 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25026/* end confdefs.h. */ 25027 25028# include <sys/types.h> 25029# include <sys/stat.h> 25030 25031int 25032main () 25033{ 25034return !mkdir ("conftest.dir/./", 0700); 25035 ; 25036 return 0; 25037} 25038_ACEOF 25039if ac_fn_c_try_run "$LINENO"; then : 25040 gl_cv_func_mkdir_trailing_dot_works=yes 25041else 25042 gl_cv_func_mkdir_trailing_dot_works=no 25043fi 25044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 25045 conftest.$ac_objext conftest.beam conftest.$ac_ext 25046fi 25047 25048 rm -rf conftest.dir 25049 25050 25051fi 25052{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mkdir_trailing_dot_works" >&5 25053$as_echo "$gl_cv_func_mkdir_trailing_dot_works" >&6; } 25054 case "$gl_cv_func_mkdir_trailing_dot_works" in 25055 *yes) ;; 25056 *) 25057 REPLACE_MKDIR=1 25058 25059$as_echo "#define FUNC_MKDIR_DOT_BUG 1" >>confdefs.h 25060 25061 ;; 25062 esac 25063 25064 if test $REPLACE_MKDIR = 1; then 25065 25066 25067 25068 25069 25070 25071 25072 25073 gl_LIBOBJS="$gl_LIBOBJS mkdir.$ac_objext" 25074 25075 fi 25076 25077 25078 for ac_func in mkdtemp 25079do : 25080 ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp" 25081if test "x$ac_cv_func_mkdtemp" = xyes; then : 25082 cat >>confdefs.h <<_ACEOF 25083#define HAVE_MKDTEMP 1 25084_ACEOF 25085 25086fi 25087done 25088 25089 if test $ac_cv_func_mkdtemp = no; then 25090 HAVE_MKDTEMP=0 25091 fi 25092 25093 if test $HAVE_MKDTEMP = 0; then 25094 25095 25096 25097 25098 25099 25100 25101 25102 gl_LIBOBJS="$gl_LIBOBJS mkdtemp.$ac_objext" 25103 25104 : 25105 25106 fi 25107 25108 25109 25110 25111 25112 GNULIB_MKDTEMP=1 25113 25114 25115 25116 25117 25118$as_echo "#define GNULIB_TEST_MKDTEMP 1" >>confdefs.h 25119 25120 25121 25122 25123 25124 25125 25126 25127 25128 if test $ac_cv_func_mkostemp != yes; then 25129 HAVE_MKOSTEMP=0 25130 fi 25131 25132 if test $HAVE_MKOSTEMP = 0; then 25133 25134 25135 25136 25137 25138 25139 25140 25141 gl_LIBOBJS="$gl_LIBOBJS mkostemp.$ac_objext" 25142 25143 25144 25145 fi 25146 25147 25148cat >>confdefs.h <<_ACEOF 25149#define GNULIB_MKOSTEMP 1 25150_ACEOF 25151 25152 25153 25154 25155 25156 25157 25158 GNULIB_MKOSTEMP=1 25159 25160 25161 25162 25163 25164$as_echo "#define GNULIB_TEST_MKOSTEMP 1" >>confdefs.h 25165 25166 25167 25168 25169 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then 25170 25171 25172 25173 25174 25175 25176 25177 25178 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext" 25179 25180 fi 25181 25182 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then 25183 25184 25185 25186 25187 25188 25189 25190 25191 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext" 25192 25193 fi 25194 25195 25196cat >>confdefs.h <<_ACEOF 25197#define GNULIB_MSVC_NOTHROW 1 25198_ACEOF 25199 25200 25201 25202 25203 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <netinet/in.h> is self-contained" >&5 25204$as_echo_n "checking whether <netinet/in.h> is self-contained... " >&6; } 25205if ${gl_cv_header_netinet_in_h_selfcontained+:} false; then : 25206 $as_echo_n "(cached) " >&6 25207else 25208 25209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25210/* end confdefs.h. */ 25211#include <netinet/in.h> 25212int 25213main () 25214{ 25215 25216 ; 25217 return 0; 25218} 25219_ACEOF 25220if ac_fn_c_try_compile "$LINENO"; then : 25221 gl_cv_header_netinet_in_h_selfcontained=yes 25222else 25223 gl_cv_header_netinet_in_h_selfcontained=no 25224fi 25225rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 25226 25227fi 25228{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_netinet_in_h_selfcontained" >&5 25229$as_echo "$gl_cv_header_netinet_in_h_selfcontained" >&6; } 25230 if test $gl_cv_header_netinet_in_h_selfcontained = yes; then 25231 NETINET_IN_H='' 25232 else 25233 NETINET_IN_H='netinet/in.h' 25234 for ac_header in netinet/in.h 25235do : 25236 ac_fn_c_check_header_mongrel "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" 25237if test "x$ac_cv_header_netinet_in_h" = xyes; then : 25238 cat >>confdefs.h <<_ACEOF 25239#define HAVE_NETINET_IN_H 1 25240_ACEOF 25241 25242fi 25243 25244done 25245 25246 25247 25248 25249 25250 25251 25252 25253 25254 25255 if test $gl_cv_have_include_next = yes; then 25256 gl_cv_next_netinet_in_h='<'netinet/in.h'>' 25257 else 25258 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <netinet/in.h>" >&5 25259$as_echo_n "checking absolute name of <netinet/in.h>... " >&6; } 25260if ${gl_cv_next_netinet_in_h+:} false; then : 25261 $as_echo_n "(cached) " >&6 25262else 25263 25264 if test $ac_cv_header_netinet_in_h = yes; then 25265 25266 25267 25268 25269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25270/* end confdefs.h. */ 25271#include <netinet/in.h> 25272_ACEOF 25273 case "$host_os" in 25274 aix*) gl_absname_cpp="$ac_cpp -C" ;; 25275 *) gl_absname_cpp="$ac_cpp" ;; 25276 esac 25277 25278 case "$host_os" in 25279 mingw*) 25280 gl_dirsep_regex='[/\\]' 25281 ;; 25282 *) 25283 gl_dirsep_regex='\/' 25284 ;; 25285 esac 25286 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 25287 gl_header_literal_regex=`echo 'netinet/in.h' \ 25288 | sed -e "$gl_make_literal_regex_sed"` 25289 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 25290 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 25291 s|^/[^/]|//&| 25292 p 25293 q 25294 }' 25295 25296 gl_cv_absolute_netinet_in_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 25297 sed -n "$gl_absolute_header_sed"` 25298 25299 gl_header=$gl_cv_absolute_netinet_in_h 25300 gl_cv_next_netinet_in_h='"'$gl_header'"' 25301 else 25302 gl_cv_next_netinet_in_h='<'netinet/in.h'>' 25303 fi 25304 25305 25306fi 25307{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_netinet_in_h" >&5 25308$as_echo "$gl_cv_next_netinet_in_h" >&6; } 25309 fi 25310 NEXT_NETINET_IN_H=$gl_cv_next_netinet_in_h 25311 25312 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 25313 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 25314 gl_next_as_first_directive='<'netinet/in.h'>' 25315 else 25316 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 25317 gl_next_as_first_directive=$gl_cv_next_netinet_in_h 25318 fi 25319 NEXT_AS_FIRST_DIRECTIVE_NETINET_IN_H=$gl_next_as_first_directive 25320 25321 25322 25323 25324 if test $ac_cv_header_netinet_in_h = yes; then 25325 HAVE_NETINET_IN_H=1 25326 else 25327 HAVE_NETINET_IN_H=0 25328 fi 25329 25330 fi 25331 25332 if test -n "$NETINET_IN_H"; then 25333 GL_GENERATE_NETINET_IN_H_TRUE= 25334 GL_GENERATE_NETINET_IN_H_FALSE='#' 25335else 25336 GL_GENERATE_NETINET_IN_H_TRUE='#' 25337 GL_GENERATE_NETINET_IN_H_FALSE= 25338fi 25339 25340 25341 25342 25343 25344 25345 case "$host_os" in 25346 mingw* | pw*) 25347 REPLACE_OPEN=1 25348 ;; 25349 *) 25350 25351 if test "$gl_cv_macro_O_CLOEXEC" != yes; then 25352 REPLACE_OPEN=1 25353 fi 25354 25355 25356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5 25357$as_echo_n "checking whether open recognizes a trailing slash... " >&6; } 25358if ${gl_cv_func_open_slash+:} false; then : 25359 $as_echo_n "(cached) " >&6 25360else 25361 # Assume that if we have lstat, we can also check symlinks. 25362 if test $ac_cv_func_lstat = yes; then 25363 touch conftest.tmp 25364 ln -s conftest.tmp conftest.lnk 25365 fi 25366 if test "$cross_compiling" = yes; then : 25367 25368 case "$host_os" in 25369 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) 25370 gl_cv_func_open_slash="guessing no" ;; 25371 *) 25372 gl_cv_func_open_slash="guessing yes" ;; 25373 esac 25374 25375else 25376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25377/* end confdefs.h. */ 25378 25379#include <fcntl.h> 25380#if HAVE_UNISTD_H 25381# include <unistd.h> 25382#endif 25383int main () 25384{ 25385 int result = 0; 25386#if HAVE_LSTAT 25387 if (open ("conftest.lnk/", O_RDONLY) != -1) 25388 result |= 1; 25389#endif 25390 if (open ("conftest.sl/", O_CREAT, 0600) >= 0) 25391 result |= 2; 25392 return result; 25393} 25394_ACEOF 25395if ac_fn_c_try_run "$LINENO"; then : 25396 gl_cv_func_open_slash=yes 25397else 25398 gl_cv_func_open_slash=no 25399fi 25400rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 25401 conftest.$ac_objext conftest.beam conftest.$ac_ext 25402fi 25403 25404 rm -f conftest.sl conftest.tmp conftest.lnk 25405 25406fi 25407{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5 25408$as_echo "$gl_cv_func_open_slash" >&6; } 25409 case "$gl_cv_func_open_slash" in 25410 *no) 25411 25412$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h 25413 25414 ;; 25415 esac 25416 25417 case "$gl_cv_func_open_slash" in 25418 *no) 25419 REPLACE_OPEN=1 25420 ;; 25421 esac 25422 ;; 25423 esac 25424 25425 if test $REPLACE_OPEN = 0; then 25426 25427 25428 25429 if test $ac_cv_func_fchdir = no; then 25430 HAVE_FCHDIR=0 25431 fi 25432 25433 if test $HAVE_FCHDIR = 0; then 25434 REPLACE_OPEN=1 25435 fi 25436 fi 25437 25438 25439 25440 if test $REPLACE_OPEN = 1; then 25441 25442 25443 25444 25445 25446 25447 25448 25449 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" 25450 25451 25452 25453 : 25454 25455 fi 25456 25457 25458 25459 25460 25461 GNULIB_OPEN=1 25462 25463 25464 25465 25466 25467$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h 25468 25469 25470 25471 25472 25473 25474 25475 25476 25477 case $ac_cv_func_openat+$gl_cv_func_lstat_dereferences_slashed_symlink+$gl_cv_macro_O_CLOEXEC in 25478 yes+*yes+yes) 25479 ;; 25480 yes+*) 25481 # Solaris 10 lacks O_CLOEXEC. 25482 # Solaris 9 has *at functions, but uniformly mishandles trailing 25483 # slash in all of them. 25484 REPLACE_OPENAT=1 25485 ;; 25486 *) 25487 HAVE_OPENAT=0 25488 ;; 25489 esac 25490 25491 if test $HAVE_OPENAT = 0 || test $REPLACE_OPENAT = 1; then 25492 25493 25494 25495 25496 25497 25498 25499 25500 gl_LIBOBJS="$gl_LIBOBJS openat.$ac_objext" 25501 25502 25503 25504 : 25505 25506 fi 25507 25508 25509cat >>confdefs.h <<_ACEOF 25510#define GNULIB_OPENAT 1 25511_ACEOF 25512 25513 25514 25515 25516 25517 25518 GNULIB_OPENAT=1 25519 25520 25521 25522 25523 25524$as_echo "#define GNULIB_TEST_OPENAT 1" >>confdefs.h 25525 25526 25527 25528 25529 25530 25531 for ac_func in opendir 25532do : 25533 ac_fn_c_check_func "$LINENO" "opendir" "ac_cv_func_opendir" 25534if test "x$ac_cv_func_opendir" = xyes; then : 25535 cat >>confdefs.h <<_ACEOF 25536#define HAVE_OPENDIR 1 25537_ACEOF 25538 25539fi 25540done 25541 25542 if test $ac_cv_func_opendir = no; then 25543 HAVE_OPENDIR=0 25544 fi 25545 25546 25547 25548 25549 if test $ac_cv_func_fchdir = no; then 25550 HAVE_FCHDIR=0 25551 fi 25552 25553 if test $HAVE_FCHDIR = 0; then 25554 if test $HAVE_OPENDIR = 1; then 25555 REPLACE_OPENDIR=1 25556 fi 25557 fi 25558 25559 case $host_os,$HAVE_OPENDIR in 25560 os2*,1) 25561 REPLACE_OPENDIR=1;; 25562 esac 25563 25564 if test $HAVE_OPENDIR = 0 || test $REPLACE_OPENDIR = 1; then 25565 25566 25567 25568 25569 25570 25571 25572 25573 gl_LIBOBJS="$gl_LIBOBJS opendir.$ac_objext" 25574 25575 fi 25576 25577 25578 25579 25580 25581 GNULIB_OPENDIR=1 25582 25583 25584 25585 25586 25587$as_echo "#define GNULIB_TEST_OPENDIR 1" >>confdefs.h 25588 25589 25590 25591 25592 25593 25594 25595 25596 25597 25598 for ac_func in rawmemchr 25599do : 25600 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr" 25601if test "x$ac_cv_func_rawmemchr" = xyes; then : 25602 cat >>confdefs.h <<_ACEOF 25603#define HAVE_RAWMEMCHR 1 25604_ACEOF 25605 25606fi 25607done 25608 25609 if test $ac_cv_func_rawmemchr = no; then 25610 HAVE_RAWMEMCHR=0 25611 fi 25612 25613 if test $HAVE_RAWMEMCHR = 0; then 25614 25615 25616 25617 25618 25619 25620 25621 25622 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext" 25623 25624 : 25625 fi 25626 25627 25628 25629 25630 25631 GNULIB_RAWMEMCHR=1 25632 25633 25634 25635 25636 25637$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h 25638 25639 25640 25641 25642 25643 25644 for ac_func in readdir 25645do : 25646 ac_fn_c_check_func "$LINENO" "readdir" "ac_cv_func_readdir" 25647if test "x$ac_cv_func_readdir" = xyes; then : 25648 cat >>confdefs.h <<_ACEOF 25649#define HAVE_READDIR 1 25650_ACEOF 25651 25652fi 25653done 25654 25655 if test $ac_cv_func_readdir = no; then 25656 HAVE_READDIR=0 25657 fi 25658 25659 if test $HAVE_READDIR = 0; then 25660 25661 25662 25663 25664 25665 25666 25667 25668 gl_LIBOBJS="$gl_LIBOBJS readdir.$ac_objext" 25669 25670 fi 25671 25672 25673 25674 25675 25676 GNULIB_READDIR=1 25677 25678 25679 25680 25681 25682$as_echo "#define GNULIB_TEST_READDIR 1" >>confdefs.h 25683 25684 25685 25686 25687 25688 25689 if test $ac_cv_func_readlink = no; then 25690 HAVE_READLINK=0 25691 else 25692 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink signature is correct" >&5 25693$as_echo_n "checking whether readlink signature is correct... " >&6; } 25694if ${gl_cv_decl_readlink_works+:} false; then : 25695 $as_echo_n "(cached) " >&6 25696else 25697 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25698/* end confdefs.h. */ 25699#include <unistd.h> 25700 /* Cause compilation failure if original declaration has wrong type. */ 25701 ssize_t readlink (const char *, char *, size_t); 25702int 25703main () 25704{ 25705 25706 ; 25707 return 0; 25708} 25709_ACEOF 25710if ac_fn_c_try_compile "$LINENO"; then : 25711 gl_cv_decl_readlink_works=yes 25712else 25713 gl_cv_decl_readlink_works=no 25714fi 25715rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 25716fi 25717{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_readlink_works" >&5 25718$as_echo "$gl_cv_decl_readlink_works" >&6; } 25719 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether readlink handles trailing slash correctly" >&5 25720$as_echo_n "checking whether readlink handles trailing slash correctly... " >&6; } 25721if ${gl_cv_func_readlink_works+:} false; then : 25722 $as_echo_n "(cached) " >&6 25723else 25724 # We have readlink, so assume ln -s works. 25725 ln -s conftest.no-such conftest.link 25726 ln -s conftest.link conftest.lnk2 25727 if test "$cross_compiling" = yes; then : 25728 case "$host_os" in 25729 # Guess yes on Linux systems. 25730 linux-* | linux) gl_cv_func_readlink_works="guessing yes" ;; 25731 # Guess yes on glibc systems. 25732 *-gnu* | gnu*) gl_cv_func_readlink_works="guessing yes" ;; 25733 # Guess yes on bsd systems. 25734 *bsd*) gl_cv_func_readlink_works="guessing yes" ;; 25735 # If we don't know, obey --enable-cross-guesses. 25736 *) gl_cv_func_readlink_works="$gl_cross_guess_normal" ;; 25737 esac 25738 25739else 25740 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25741/* end confdefs.h. */ 25742#include <unistd.h> 25743 25744int 25745main () 25746{ 25747char buf[20]; 25748 return readlink ("conftest.lnk2/", buf, sizeof buf) != -1; 25749 ; 25750 return 0; 25751} 25752_ACEOF 25753if ac_fn_c_try_run "$LINENO"; then : 25754 gl_cv_func_readlink_works=yes 25755else 25756 gl_cv_func_readlink_works=no 25757fi 25758rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 25759 conftest.$ac_objext conftest.beam conftest.$ac_ext 25760fi 25761 25762 rm -f conftest.link conftest.lnk2 25763fi 25764{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_readlink_works" >&5 25765$as_echo "$gl_cv_func_readlink_works" >&6; } 25766 case "$gl_cv_func_readlink_works" in 25767 *yes) 25768 if test "$gl_cv_decl_readlink_works" != yes; then 25769 REPLACE_READLINK=1 25770 fi 25771 ;; 25772 *) 25773 25774$as_echo "#define READLINK_TRAILING_SLASH_BUG 1" >>confdefs.h 25775 25776 REPLACE_READLINK=1 25777 ;; 25778 esac 25779 fi 25780 25781 if test $HAVE_READLINK = 0 || test $REPLACE_READLINK = 1; then 25782 25783 25784 25785 25786 25787 25788 25789 25790 gl_LIBOBJS="$gl_LIBOBJS readlink.$ac_objext" 25791 25792 25793 : 25794 25795 fi 25796 25797 25798 25799 25800 25801 GNULIB_READLINK=1 25802 25803 25804 25805 25806 25807$as_echo "#define GNULIB_TEST_READLINK 1" >>confdefs.h 25808 25809 25810 25811 25812 25813 25814 if test $gl_cv_func_malloc_posix = yes; then 25815 25816$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h 25817 25818 else 25819 REPLACE_REALLOC=1 25820 fi 25821 25822 if test $REPLACE_REALLOC = 1; then 25823 25824 25825 25826 25827 25828 25829 25830 25831 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" 25832 25833 fi 25834 25835 25836 25837 25838 25839 GNULIB_REALLOC_POSIX=1 25840 25841 25842 25843 25844 25845$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h 25846 25847 25848 25849 25850 25851 25852 25853 25854 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on destination" >&5 25855$as_echo_n "checking whether rename honors trailing slash on destination... " >&6; } 25856if ${gl_cv_func_rename_slash_dst_works+:} false; then : 25857 $as_echo_n "(cached) " >&6 25858else 25859 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk 25860 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 || 25861 as_fn_error $? "cannot create temporary files" "$LINENO" 5 25862 # Assume that if we have lstat, we can also check symlinks. 25863 if test $ac_cv_func_lstat = yes; then 25864 ln -s conftest.f conftest.lnk 25865 fi 25866 if test "$cross_compiling" = yes; then : 25867 case "$host_os" in 25868 # Guess yes on Linux systems. 25869 linux-* | linux) gl_cv_func_rename_slash_dst_works="guessing yes" ;; 25870 # Guess yes on glibc systems. 25871 *-gnu*) gl_cv_func_rename_slash_dst_works="guessing yes" ;; 25872 # Guess yes on bsd systems. 25873 *bsd*) gl_cv_func_rename_slash_dst_works="guessing yes" ;; 25874 # Guess no on native Windows. 25875 mingw*) gl_cv_func_rename_slash_dst_works="guessing no" ;; 25876 # If we don't know, obey --enable-cross-guesses. 25877 *) gl_cv_func_rename_slash_dst_works="$gl_cross_guess_normal" ;; 25878 esac 25879 25880else 25881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25882/* end confdefs.h. */ 25883 25884# include <stdio.h> 25885# include <stdlib.h> 25886 25887int 25888main () 25889{ 25890int result = 0; 25891 if (rename ("conftest.f1", "conftest.f2/") == 0) 25892 result |= 1; 25893 if (rename ("conftest.d1", "conftest.d2/") != 0) 25894 result |= 2; 25895#if HAVE_LSTAT 25896 if (rename ("conftest.f", "conftest.lnk/") == 0) 25897 result |= 4; 25898#endif 25899 return result; 25900 25901 ; 25902 return 0; 25903} 25904_ACEOF 25905if ac_fn_c_try_run "$LINENO"; then : 25906 gl_cv_func_rename_slash_dst_works=yes 25907else 25908 gl_cv_func_rename_slash_dst_works=no 25909fi 25910rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 25911 conftest.$ac_objext conftest.beam conftest.$ac_ext 25912fi 25913 25914 rm -rf conftest.f conftest.f1 conftest.f2 conftest.d1 conftest.d2 conftest.lnk 25915 25916fi 25917{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_dst_works" >&5 25918$as_echo "$gl_cv_func_rename_slash_dst_works" >&6; } 25919 case "$gl_cv_func_rename_slash_dst_works" in 25920 *yes) ;; 25921 *) 25922 REPLACE_RENAME=1 25923 25924$as_echo "#define RENAME_TRAILING_SLASH_DEST_BUG 1" >>confdefs.h 25925 25926 ;; 25927 esac 25928 25929 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename honors trailing slash on source" >&5 25930$as_echo_n "checking whether rename honors trailing slash on source... " >&6; } 25931if ${gl_cv_func_rename_slash_src_works+:} false; then : 25932 $as_echo_n "(cached) " >&6 25933else 25934 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk 25935 touch conftest.f && touch conftest.f1 && mkdir conftest.d1 || 25936 as_fn_error $? "cannot create temporary files" "$LINENO" 5 25937 # Assume that if we have lstat, we can also check symlinks. 25938 if test $ac_cv_func_lstat = yes; then 25939 ln -s conftest.f conftest.lnk 25940 fi 25941 if test "$cross_compiling" = yes; then : 25942 case "$host_os" in 25943 # Guess yes on Linux systems. 25944 linux-* | linux) gl_cv_func_rename_slash_src_works="guessing yes" ;; 25945 # Guess yes on glibc systems. 25946 *-gnu*) gl_cv_func_rename_slash_src_works="guessing yes" ;; 25947 # Guess yes on bsd systems. 25948 *bsd*) gl_cv_func_rename_slash_src_works="guessing yes" ;; 25949 # Guess yes on native Windows. 25950 mingw*) gl_cv_func_rename_slash_src_works="guessing yes" ;; 25951 # If we don't know, obey --enable-cross-guesses. 25952 *) gl_cv_func_rename_slash_src_works="$gl_cross_guess_normal" ;; 25953 esac 25954 25955else 25956 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25957/* end confdefs.h. */ 25958 25959# include <stdio.h> 25960# include <stdlib.h> 25961 25962int 25963main () 25964{ 25965int result = 0; 25966 if (rename ("conftest.f1/", "conftest.d3") == 0) 25967 result |= 1; 25968 if (rename ("conftest.d1/", "conftest.d2") != 0) 25969 result |= 2; 25970#if HAVE_LSTAT 25971 if (rename ("conftest.lnk/", "conftest.f") == 0) 25972 result |= 4; 25973#endif 25974 return result; 25975 25976 ; 25977 return 0; 25978} 25979_ACEOF 25980if ac_fn_c_try_run "$LINENO"; then : 25981 gl_cv_func_rename_slash_src_works=yes 25982else 25983 gl_cv_func_rename_slash_src_works=no 25984fi 25985rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 25986 conftest.$ac_objext conftest.beam conftest.$ac_ext 25987fi 25988 25989 rm -rf conftest.f conftest.f1 conftest.d1 conftest.d2 conftest.d3 conftest.lnk 25990 25991fi 25992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_slash_src_works" >&5 25993$as_echo "$gl_cv_func_rename_slash_src_works" >&6; } 25994 case "$gl_cv_func_rename_slash_src_works" in 25995 *yes) ;; 25996 *) 25997 REPLACE_RENAME=1 25998 25999$as_echo "#define RENAME_TRAILING_SLASH_SOURCE_BUG 1" >>confdefs.h 26000 26001 ;; 26002 esac 26003 26004 26005 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages hard links correctly" >&5 26006$as_echo_n "checking whether rename manages hard links correctly... " >&6; } 26007if ${gl_cv_func_rename_link_works+:} false; then : 26008 $as_echo_n "(cached) " >&6 26009else 26010 if test $ac_cv_func_link = yes; then 26011 if test $cross_compiling != yes; then 26012 rm -rf conftest.f conftest.f1 conftest.f2 26013 if touch conftest.f conftest.f2 && ln conftest.f conftest.f1 && 26014 set x `ls -i conftest.f conftest.f1` && test "" = ""; then 26015 if test "$cross_compiling" = yes; then : 26016 : 26017 26018else 26019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26020/* end confdefs.h. */ 26021 26022# include <errno.h> 26023# include <stdio.h> 26024# include <stdlib.h> 26025# include <unistd.h> 26026 26027int 26028main () 26029{ 26030int result = 0; 26031 if (rename ("conftest.f", "conftest.f1")) 26032 result |= 1; 26033 if (unlink ("conftest.f1")) 26034 result |= 2; 26035 26036 /* Allow either the POSIX-required behavior, where the 26037 previous rename kept conftest.f, or the (better) NetBSD 26038 behavior, where it removed conftest.f. */ 26039 if (rename ("conftest.f", "conftest.f") != 0 26040 && errno != ENOENT) 26041 result |= 4; 26042 26043 if (rename ("conftest.f1", "conftest.f1") == 0) 26044 result |= 8; 26045 if (rename ("conftest.f2", "conftest.f2") != 0) 26046 result |= 16; 26047 return result; 26048 26049 ; 26050 return 0; 26051} 26052_ACEOF 26053if ac_fn_c_try_run "$LINENO"; then : 26054 gl_cv_func_rename_link_works=yes 26055else 26056 gl_cv_func_rename_link_works=no 26057fi 26058rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 26059 conftest.$ac_objext conftest.beam conftest.$ac_ext 26060fi 26061 26062 else 26063 gl_cv_func_rename_link_works="guessing no" 26064 fi 26065 rm -rf conftest.f conftest.f1 conftest.f2 26066 else 26067 case "$host_os" in 26068 # Guess yes on Linux systems. 26069 linux-* | linux) gl_cv_func_rename_link_works="guessing yes" ;; 26070 # Guess yes on glibc systems. 26071 *-gnu*) gl_cv_func_rename_link_works="guessing yes" ;; 26072 # Guess yes on native Windows. 26073 mingw*) gl_cv_func_rename_link_works="guessing yes" ;; 26074 # Guess yes on bsd systems. 26075 *bsd*) gl_cv_func_rename_link_works="guessing yes" ;; 26076 # If we don't know, obey --enable-cross-guesses. 26077 *) gl_cv_func_rename_link_works="$gl_cross_guess_normal" ;; 26078 esac 26079 fi 26080 else 26081 gl_cv_func_rename_link_works=yes 26082 fi 26083 26084fi 26085{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_link_works" >&5 26086$as_echo "$gl_cv_func_rename_link_works" >&6; } 26087 case "$gl_cv_func_rename_link_works" in 26088 *yes) ;; 26089 *) 26090 REPLACE_RENAME=1 26091 26092$as_echo "#define RENAME_HARD_LINK_BUG 1" >>confdefs.h 26093 26094 ;; 26095 esac 26096 26097 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rename manages existing destinations correctly" >&5 26098$as_echo_n "checking whether rename manages existing destinations correctly... " >&6; } 26099if ${gl_cv_func_rename_dest_works+:} false; then : 26100 $as_echo_n "(cached) " >&6 26101else 26102 rm -rf conftest.f conftest.d1 conftest.d2 26103 touch conftest.f && mkdir conftest.d1 conftest.d2 || 26104 as_fn_error $? "cannot create temporary files" "$LINENO" 5 26105 if test "$cross_compiling" = yes; then : 26106 case "$host_os" in 26107 # Guess yes on Linux systems. 26108 linux-* | linux) gl_cv_func_rename_dest_works="guessing yes" ;; 26109 # Guess yes on glibc systems. 26110 *-gnu*) gl_cv_func_rename_dest_works="guessing yes" ;; 26111 # Guess yes on bsd systems. 26112 *bsd*) gl_cv_func_rename_dest_works="guessing yes" ;; 26113 # Guess no on native Windows. 26114 mingw*) gl_cv_func_rename_dest_works="guessing no" ;; 26115 # If we don't know, obey --enable-cross-guesses. 26116 *) gl_cv_func_rename_dest_works="$gl_cross_guess_normal" ;; 26117 esac 26118 26119else 26120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26121/* end confdefs.h. */ 26122 26123# include <stdio.h> 26124# include <stdlib.h> 26125 26126int 26127main () 26128{ 26129int result = 0; 26130 if (rename ("conftest.d1", "conftest.d2") != 0) 26131 result |= 1; 26132 if (rename ("conftest.d2", "conftest.f") == 0) 26133 result |= 2; 26134 return result; 26135 26136 ; 26137 return 0; 26138} 26139_ACEOF 26140if ac_fn_c_try_run "$LINENO"; then : 26141 gl_cv_func_rename_dest_works=yes 26142else 26143 gl_cv_func_rename_dest_works=no 26144fi 26145rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 26146 conftest.$ac_objext conftest.beam conftest.$ac_ext 26147fi 26148 26149 rm -rf conftest.f conftest.d1 conftest.d2 26150 26151fi 26152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rename_dest_works" >&5 26153$as_echo "$gl_cv_func_rename_dest_works" >&6; } 26154 case "$gl_cv_func_rename_dest_works" in 26155 *yes) ;; 26156 *) 26157 REPLACE_RENAME=1 26158 26159$as_echo "#define RENAME_DEST_EXISTS_BUG 1" >>confdefs.h 26160 26161 ;; 26162 esac 26163 26164 if test $REPLACE_RENAME = 1; then 26165 26166 26167 26168 26169 26170 26171 26172 26173 gl_LIBOBJS="$gl_LIBOBJS rename.$ac_objext" 26174 26175 fi 26176 26177 26178 26179 26180 26181 GNULIB_RENAME=1 26182 26183 26184 26185 26186 26187$as_echo "#define GNULIB_TEST_RENAME 1" >>confdefs.h 26188 26189 26190 26191 26192 26193 26194 for ac_func in rewinddir 26195do : 26196 ac_fn_c_check_func "$LINENO" "rewinddir" "ac_cv_func_rewinddir" 26197if test "x$ac_cv_func_rewinddir" = xyes; then : 26198 cat >>confdefs.h <<_ACEOF 26199#define HAVE_REWINDDIR 1 26200_ACEOF 26201 26202fi 26203done 26204 26205 if test $ac_cv_func_rewinddir = no; then 26206 HAVE_REWINDDIR=0 26207 fi 26208 26209 if test $HAVE_REWINDDIR = 0; then 26210 26211 26212 26213 26214 26215 26216 26217 26218 gl_LIBOBJS="$gl_LIBOBJS rewinddir.$ac_objext" 26219 26220 fi 26221 26222 26223 26224 26225 26226 GNULIB_REWINDDIR=1 26227 26228 26229 26230 26231 26232$as_echo "#define GNULIB_TEST_REWINDDIR 1" >>confdefs.h 26233 26234 26235 26236 26237 26238 26239 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether rmdir works" >&5 26240$as_echo_n "checking whether rmdir works... " >&6; } 26241if ${gl_cv_func_rmdir_works+:} false; then : 26242 $as_echo_n "(cached) " >&6 26243else 26244 mkdir conftest.dir 26245 touch conftest.file 26246 if test "$cross_compiling" = yes; then : 26247 case "$host_os" in 26248 # Guess yes on Linux systems. 26249 linux-* | linux) gl_cv_func_rmdir_works="guessing yes" ;; 26250 # Guess yes on glibc systems. 26251 *-gnu* | gnu*) gl_cv_func_rmdir_works="guessing yes" ;; 26252 # Guess yes on bsd systems. 26253 *bsd*) gl_cv_func_rmdir_works="guessing yes" ;; 26254 # Guess no on native Windows. 26255 mingw*) gl_cv_func_rmdir_works="guessing no" ;; 26256 # If we don't know, obey --enable-cross-guesses. 26257 *) gl_cv_func_rmdir_works="$gl_cross_guess_normal" ;; 26258 esac 26259 26260else 26261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26262/* end confdefs.h. */ 26263#include <stdio.h> 26264 #include <errno.h> 26265 #if HAVE_UNISTD_H 26266 # include <unistd.h> 26267 #else /* on Windows with MSVC */ 26268 # include <direct.h> 26269 #endif 26270 26271int 26272main () 26273{ 26274int result = 0; 26275 if (!rmdir ("conftest.file/")) 26276 result |= 1; 26277 else if (errno != ENOTDIR) 26278 result |= 2; 26279 if (!rmdir ("conftest.dir/./")) 26280 result |= 4; 26281 return result; 26282 26283 ; 26284 return 0; 26285} 26286_ACEOF 26287if ac_fn_c_try_run "$LINENO"; then : 26288 gl_cv_func_rmdir_works=yes 26289else 26290 gl_cv_func_rmdir_works=no 26291fi 26292rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 26293 conftest.$ac_objext conftest.beam conftest.$ac_ext 26294fi 26295 26296 rm -rf conftest.dir conftest.file 26297fi 26298{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_rmdir_works" >&5 26299$as_echo "$gl_cv_func_rmdir_works" >&6; } 26300 case "$gl_cv_func_rmdir_works" in 26301 *yes) ;; 26302 *) 26303 REPLACE_RMDIR=1 26304 ;; 26305 esac 26306 26307 if test $REPLACE_RMDIR = 1; then 26308 26309 26310 26311 26312 26313 26314 26315 26316 gl_LIBOBJS="$gl_LIBOBJS rmdir.$ac_objext" 26317 26318 fi 26319 26320 26321 26322 26323 26324 GNULIB_RMDIR=1 26325 26326 26327 26328 26329 26330$as_echo "#define GNULIB_TEST_RMDIR 1" >>confdefs.h 26331 26332 26333 26334 26335 26336 26337 26338 26339 if test $ac_cv_func_setenv = no; then 26340 HAVE_SETENV=0 26341 else 26342 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setenv validates arguments" >&5 26343$as_echo_n "checking whether setenv validates arguments... " >&6; } 26344if ${gl_cv_func_setenv_works+:} false; then : 26345 $as_echo_n "(cached) " >&6 26346else 26347 if test "$cross_compiling" = yes; then : 26348 case "$host_os" in 26349 # Guess yes on glibc systems. 26350 *-gnu* | gnu*) gl_cv_func_setenv_works="guessing yes" ;; 26351 # Guess yes on musl systems. 26352 *-musl*) gl_cv_func_setenv_works="guessing yes" ;; 26353 # Guess yes on bsd systems. 26354 *bsd*) gl_cv_func_setenv_works="guessing yes" ;; 26355 # If we don't know, obey --enable-cross-guesses. 26356 *) gl_cv_func_setenv_works="$gl_cross_guess_normal" ;; 26357 esac 26358 26359else 26360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26361/* end confdefs.h. */ 26362 26363 #include <stdlib.h> 26364 #include <errno.h> 26365 #include <string.h> 26366 26367int 26368main () 26369{ 26370 26371 int result = 0; 26372 { 26373 if (setenv ("", "", 0) != -1) 26374 result |= 1; 26375 else if (errno != EINVAL) 26376 result |= 2; 26377 } 26378 { 26379 if (setenv ("a", "=", 1) != 0) 26380 result |= 4; 26381 else if (strcmp (getenv ("a"), "=") != 0) 26382 result |= 8; 26383 } 26384 return result; 26385 26386 ; 26387 return 0; 26388} 26389_ACEOF 26390if ac_fn_c_try_run "$LINENO"; then : 26391 gl_cv_func_setenv_works=yes 26392else 26393 gl_cv_func_setenv_works=no 26394fi 26395rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 26396 conftest.$ac_objext conftest.beam conftest.$ac_ext 26397fi 26398 26399fi 26400{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setenv_works" >&5 26401$as_echo "$gl_cv_func_setenv_works" >&6; } 26402 case "$gl_cv_func_setenv_works" in 26403 *yes) ;; 26404 *) 26405 REPLACE_SETENV=1 26406 ;; 26407 esac 26408 fi 26409 26410 if test $HAVE_SETENV = 0 || test $REPLACE_SETENV = 1; then 26411 26412 26413 26414 26415 26416 26417 26418 26419 gl_LIBOBJS="$gl_LIBOBJS setenv.$ac_objext" 26420 26421 fi 26422 26423 26424 26425 26426 26427 GNULIB_SETENV=1 26428 26429 26430 26431 26432 26433$as_echo "#define GNULIB_TEST_SETENV 1" >>confdefs.h 26434 26435 26436 26437 26438 26439 26440 26441 26442 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (LC_ALL, NULL) is multithread-safe" >&5 26443$as_echo_n "checking whether setlocale (LC_ALL, NULL) is multithread-safe... " >&6; } 26444if ${gl_cv_func_setlocale_null_all_mtsafe+:} false; then : 26445 $as_echo_n "(cached) " >&6 26446else 26447 case "$host_os" in 26448 # Guess no on musl libc, macOS, FreeBSD, NetBSD, OpenBSD, AIX, Haiku, Cygwin. 26449 *-musl* | darwin* | freebsd* | netbsd* | openbsd* | aix* | haiku* | cygwin*) 26450 gl_cv_func_setlocale_null_all_mtsafe=no ;; 26451 # Guess yes on glibc, HP-UX, IRIX, Solaris, native Windows. 26452 *-gnu* | gnu* | hpux* | irix* | solaris* | mingw*) 26453 gl_cv_func_setlocale_null_all_mtsafe=yes ;; 26454 # If we don't know, obey --enable-cross-guesses. 26455 *) 26456 gl_cv_func_setlocale_null_all_mtsafe="$gl_cross_guess_normal" ;; 26457 esac 26458 26459fi 26460{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_all_mtsafe" >&5 26461$as_echo "$gl_cv_func_setlocale_null_all_mtsafe" >&6; } 26462 case "$host_os" in 26463 mingw*) ;; 26464 *) 26465 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then 26466 gl_cv_func_setlocale_null_all_mtsafe="trivially yes" 26467 fi 26468 ;; 26469 esac 26470 case "$gl_cv_func_setlocale_null_all_mtsafe" in 26471 *yes) SETLOCALE_NULL_ALL_MTSAFE=1 ;; 26472 *) SETLOCALE_NULL_ALL_MTSAFE=0 ;; 26473 esac 26474 26475cat >>confdefs.h <<_ACEOF 26476#define SETLOCALE_NULL_ALL_MTSAFE $SETLOCALE_NULL_ALL_MTSAFE 26477_ACEOF 26478 26479 26480 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setlocale (category, NULL) is multithread-safe" >&5 26481$as_echo_n "checking whether setlocale (category, NULL) is multithread-safe... " >&6; } 26482if ${gl_cv_func_setlocale_null_one_mtsafe+:} false; then : 26483 $as_echo_n "(cached) " >&6 26484else 26485 case "$host_os" in 26486 # Guess no on OpenBSD, AIX. 26487 openbsd* | aix*) 26488 gl_cv_func_setlocale_null_one_mtsafe=no ;; 26489 # Guess yes on glibc, musl libc, macOS, FreeBSD, NetBSD, HP-UX, IRIX, Solaris, Haiku, Cygwin, native Windows. 26490 *-gnu* | gnu* | *-musl* | darwin* | freebsd* | netbsd* | hpux* | irix* | solaris* | haiku* | cygwin* | mingw*) 26491 gl_cv_func_setlocale_null_one_mtsafe=yes ;; 26492 # If we don't know, obey --enable-cross-guesses. 26493 *) 26494 gl_cv_func_setlocale_null_one_mtsafe="$gl_cross_guess_normal" ;; 26495 esac 26496 26497fi 26498{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_setlocale_null_one_mtsafe" >&5 26499$as_echo "$gl_cv_func_setlocale_null_one_mtsafe" >&6; } 26500 case "$host_os" in 26501 mingw*) ;; 26502 *) 26503 if test $gl_pthread_api = no && test $ac_cv_header_threads_h = no; then 26504 gl_cv_func_setlocale_null_one_mtsafe="trivially yes" 26505 fi 26506 ;; 26507 esac 26508 case "$gl_cv_func_setlocale_null_one_mtsafe" in 26509 *yes) SETLOCALE_NULL_ONE_MTSAFE=1 ;; 26510 *) SETLOCALE_NULL_ONE_MTSAFE=0 ;; 26511 esac 26512 26513cat >>confdefs.h <<_ACEOF 26514#define SETLOCALE_NULL_ONE_MTSAFE $SETLOCALE_NULL_ONE_MTSAFE 26515_ACEOF 26516 26517 26518 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then 26519 case "$host_os" in 26520 mingw*) LIB_SETLOCALE_NULL= ;; 26521 *) 26522 26523 26524 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 26525$as_echo_n "checking whether imported symbols can be declared weak... " >&6; } 26526if ${gl_cv_have_weak+:} false; then : 26527 $as_echo_n "(cached) " >&6 26528else 26529 gl_cv_have_weak=no 26530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26531/* end confdefs.h. */ 26532extern void xyzzy (); 26533#pragma weak xyzzy 26534int 26535main () 26536{ 26537xyzzy(); 26538 ; 26539 return 0; 26540} 26541_ACEOF 26542if ac_fn_c_try_link "$LINENO"; then : 26543 gl_cv_have_weak=maybe 26544fi 26545rm -f core conftest.err conftest.$ac_objext \ 26546 conftest$ac_exeext conftest.$ac_ext 26547 if test $gl_cv_have_weak = maybe; then 26548 if test "$cross_compiling" = yes; then : 26549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26550/* end confdefs.h. */ 26551#ifdef __ELF__ 26552 Extensible Linking Format 26553 #endif 26554 26555_ACEOF 26556if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 26557 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : 26558 gl_cv_have_weak="guessing yes" 26559else 26560 gl_cv_have_weak="guessing no" 26561fi 26562rm -f conftest* 26563 26564 26565else 26566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26567/* end confdefs.h. */ 26568 26569#include <stdio.h> 26570#pragma weak fputs 26571int main () 26572{ 26573 return (fputs == NULL); 26574} 26575_ACEOF 26576if ac_fn_c_try_run "$LINENO"; then : 26577 gl_cv_have_weak=yes 26578else 26579 gl_cv_have_weak=no 26580fi 26581rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 26582 conftest.$ac_objext conftest.beam conftest.$ac_ext 26583fi 26584 26585 fi 26586 case " $LDFLAGS " in 26587 *" -static "*) gl_cv_have_weak=no ;; 26588 esac 26589 case "$gl_cv_have_weak" in 26590 *yes) 26591 case "$host_os" in 26592 freebsd* | dragonfly*) 26593 : > conftest1.c 26594 $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1 26595 cat <<EOF > conftest2.c 26596#include <pthread.h> 26597#pragma weak pthread_mutexattr_gettype 26598int main () 26599{ 26600 return (pthread_mutexattr_gettype != NULL); 26601} 26602EOF 26603 $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \ 26604 || gl_cv_have_weak=no 26605 rm -f conftest1.c libempty.so conftest2.c conftest 26606 ;; 26607 esac 26608 ;; 26609 esac 26610 26611fi 26612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 26613$as_echo "$gl_cv_have_weak" >&6; } 26614 case "$gl_cv_have_weak" in 26615 *yes) 26616 26617$as_echo "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h 26618 26619 ;; 26620 esac 26621 26622 case "$gl_cv_have_weak" in 26623 *yes) LIB_SETLOCALE_NULL= ;; 26624 *) LIB_SETLOCALE_NULL="$LIBPTHREAD" ;; 26625 esac 26626 ;; 26627 esac 26628 else 26629 LIB_SETLOCALE_NULL= 26630 fi 26631 26632 26633 if test $SETLOCALE_NULL_ALL_MTSAFE = 0 || test $SETLOCALE_NULL_ONE_MTSAFE = 0; then 26634 26635 26636 26637 26638 26639 26640 26641 26642 gl_LIBOBJS="$gl_LIBOBJS setlocale-lock.$ac_objext" 26643 26644 26645 26646 26647 CFLAG_VISIBILITY= 26648 HAVE_VISIBILITY=0 26649 if test -n "$GCC"; then 26650 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5 26651$as_echo_n "checking whether the -Werror option is usable... " >&6; } 26652if ${gl_cv_cc_vis_werror+:} false; then : 26653 $as_echo_n "(cached) " >&6 26654else 26655 gl_save_CFLAGS="$CFLAGS" 26656 CFLAGS="$CFLAGS -Werror" 26657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26658/* end confdefs.h. */ 26659 26660int 26661main () 26662{ 26663 26664 ; 26665 return 0; 26666} 26667_ACEOF 26668if ac_fn_c_try_compile "$LINENO"; then : 26669 gl_cv_cc_vis_werror=yes 26670else 26671 gl_cv_cc_vis_werror=no 26672fi 26673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 26674 CFLAGS="$gl_save_CFLAGS" 26675 26676fi 26677{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5 26678$as_echo "$gl_cv_cc_vis_werror" >&6; } 26679 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5 26680$as_echo_n "checking for simple visibility declarations... " >&6; } 26681if ${gl_cv_cc_visibility+:} false; then : 26682 $as_echo_n "(cached) " >&6 26683else 26684 gl_save_CFLAGS="$CFLAGS" 26685 CFLAGS="$CFLAGS -fvisibility=hidden" 26686 if test $gl_cv_cc_vis_werror = yes; then 26687 CFLAGS="$CFLAGS -Werror" 26688 fi 26689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26690/* end confdefs.h. */ 26691extern __attribute__((__visibility__("hidden"))) int hiddenvar; 26692 extern __attribute__((__visibility__("default"))) int exportedvar; 26693 extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); 26694 extern __attribute__((__visibility__("default"))) int exportedfunc (void); 26695 void dummyfunc (void) {} 26696 26697int 26698main () 26699{ 26700 26701 ; 26702 return 0; 26703} 26704_ACEOF 26705if ac_fn_c_try_compile "$LINENO"; then : 26706 gl_cv_cc_visibility=yes 26707else 26708 gl_cv_cc_visibility=no 26709fi 26710rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 26711 CFLAGS="$gl_save_CFLAGS" 26712 26713fi 26714{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5 26715$as_echo "$gl_cv_cc_visibility" >&6; } 26716 if test $gl_cv_cc_visibility = yes; then 26717 CFLAG_VISIBILITY="-fvisibility=hidden" 26718 HAVE_VISIBILITY=1 26719 fi 26720 fi 26721 26722 26723 26724cat >>confdefs.h <<_ACEOF 26725#define HAVE_VISIBILITY $HAVE_VISIBILITY 26726_ACEOF 26727 26728 26729 26730 fi 26731 26732 26733 26734 26735 26736 GNULIB_SETLOCALE_NULL=1 26737 26738 26739 26740 26741 26742$as_echo "#define GNULIB_TEST_SETLOCALE_NULL 1" >>confdefs.h 26743 26744 26745 26746 26747 26748 26749 26750 26751 26752 26753 26754 26755 26756 26757 if test $gl_cv_have_include_next = yes; then 26758 gl_cv_next_signal_h='<'signal.h'>' 26759 else 26760 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5 26761$as_echo_n "checking absolute name of <signal.h>... " >&6; } 26762if ${gl_cv_next_signal_h+:} false; then : 26763 $as_echo_n "(cached) " >&6 26764else 26765 26766 26767 26768 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26769/* end confdefs.h. */ 26770#include <signal.h> 26771_ACEOF 26772 case "$host_os" in 26773 aix*) gl_absname_cpp="$ac_cpp -C" ;; 26774 *) gl_absname_cpp="$ac_cpp" ;; 26775 esac 26776 26777 case "$host_os" in 26778 mingw*) 26779 gl_dirsep_regex='[/\\]' 26780 ;; 26781 *) 26782 gl_dirsep_regex='\/' 26783 ;; 26784 esac 26785 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 26786 gl_header_literal_regex=`echo 'signal.h' \ 26787 | sed -e "$gl_make_literal_regex_sed"` 26788 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 26789 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 26790 s|^/[^/]|//&| 26791 p 26792 q 26793 }' 26794 26795 gl_cv_absolute_signal_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 26796 sed -n "$gl_absolute_header_sed"` 26797 26798 gl_header=$gl_cv_absolute_signal_h 26799 gl_cv_next_signal_h='"'$gl_header'"' 26800 26801 26802fi 26803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5 26804$as_echo "$gl_cv_next_signal_h" >&6; } 26805 fi 26806 NEXT_SIGNAL_H=$gl_cv_next_signal_h 26807 26808 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 26809 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 26810 gl_next_as_first_directive='<'signal.h'>' 26811 else 26812 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 26813 gl_next_as_first_directive=$gl_cv_next_signal_h 26814 fi 26815 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive 26816 26817 26818 26819 26820 26821# AIX declares sig_atomic_t to already include volatile, and C89 compilers 26822# then choke on 'volatile sig_atomic_t'. C99 requires that it compile. 26823 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" " 26824#include <signal.h> 26825 26826" 26827if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then : 26828 26829else 26830 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0 26831fi 26832 26833 26834 26835 26836 26837 26838 26839 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" " 26840#include <signal.h> 26841 26842" 26843if test "x$ac_cv_type_sighandler_t" = xyes; then : 26844 26845else 26846 HAVE_SIGHANDLER_T=0 26847fi 26848 26849 26850 26851 26852 26853 26854 26855 26856 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" " 26857/* <sys/types.h> is not needed according to POSIX, but the 26858 <sys/socket.h> in i386-unknown-freebsd4.10 and 26859 powerpc-apple-darwin5.5 required it. */ 26860#include <sys/types.h> 26861#if HAVE_SYS_SOCKET_H 26862# include <sys/socket.h> 26863#elif HAVE_WS2TCPIP_H 26864# include <ws2tcpip.h> 26865#endif 26866 26867" 26868if test "x$ac_cv_type_socklen_t" = xyes; then : 26869 26870else 26871 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socklen_t equivalent" >&5 26872$as_echo_n "checking for socklen_t equivalent... " >&6; } 26873if ${gl_cv_socklen_t_equiv+:} false; then : 26874 $as_echo_n "(cached) " >&6 26875else 26876 # Systems have either "struct sockaddr *" or 26877 # "void *" as the second argument to getpeername 26878 gl_cv_socklen_t_equiv= 26879 for arg2 in "struct sockaddr" void; do 26880 for t in int size_t "unsigned int" "long int" "unsigned long int"; do 26881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26882/* end confdefs.h. */ 26883#include <sys/types.h> 26884 #include <sys/socket.h> 26885 26886 int getpeername (int, $arg2 *, $t *); 26887int 26888main () 26889{ 26890$t len; 26891 getpeername (0, 0, &len); 26892 ; 26893 return 0; 26894} 26895_ACEOF 26896if ac_fn_c_try_compile "$LINENO"; then : 26897 gl_cv_socklen_t_equiv="$t" 26898fi 26899rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 26900 test "$gl_cv_socklen_t_equiv" != "" && break 26901 done 26902 test "$gl_cv_socklen_t_equiv" != "" && break 26903 done 26904 if test "$gl_cv_socklen_t_equiv" = ""; then 26905 as_fn_error $? "Cannot find a type to use in place of socklen_t" "$LINENO" 5 26906 fi 26907 26908fi 26909{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_socklen_t_equiv" >&5 26910$as_echo "$gl_cv_socklen_t_equiv" >&6; } 26911 26912cat >>confdefs.h <<_ACEOF 26913#define socklen_t $gl_cv_socklen_t_equiv 26914_ACEOF 26915 26916fi 26917 26918 26919 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 26920$as_echo_n "checking for ssize_t... " >&6; } 26921if ${gt_cv_ssize_t+:} false; then : 26922 $as_echo_n "(cached) " >&6 26923else 26924 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26925/* end confdefs.h. */ 26926#include <sys/types.h> 26927int 26928main () 26929{ 26930int x = sizeof (ssize_t *) + sizeof (ssize_t); 26931 return !x; 26932 ; 26933 return 0; 26934} 26935_ACEOF 26936if ac_fn_c_try_compile "$LINENO"; then : 26937 gt_cv_ssize_t=yes 26938else 26939 gt_cv_ssize_t=no 26940fi 26941rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 26942fi 26943{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5 26944$as_echo "$gt_cv_ssize_t" >&6; } 26945 if test $gt_cv_ssize_t = no; then 26946 26947$as_echo "#define ssize_t int" >>confdefs.h 26948 26949 fi 26950 26951 26952 26953 26954 26955 case "$host_os" in 26956 mingw*) 26957 ;; 26958 *) 26959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 26960$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } 26961if ${gl_cv_func_stat_file_slash+:} false; then : 26962 $as_echo_n "(cached) " >&6 26963else 26964 touch conftest.tmp 26965 # Assume that if we have lstat, we can also check symlinks. 26966 if test $ac_cv_func_lstat = yes; then 26967 ln -s conftest.tmp conftest.lnk 26968 fi 26969 if test "$cross_compiling" = yes; then : 26970 case "$host_os" in 26971 # Guess yes on Linux systems. 26972 linux-* | linux) gl_cv_func_stat_file_slash="guessing yes" ;; 26973 # Guess yes on glibc systems. 26974 *-gnu* | gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; 26975 # Guess yes on bsd systems. 26976 *bsd*) gl_cv_func_stat_file_slash="guessing yes" ;; 26977 # If we don't know, obey --enable-cross-guesses. 26978 *) gl_cv_func_stat_file_slash="$gl_cross_guess_normal" ;; 26979 esac 26980 26981else 26982 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26983/* end confdefs.h. */ 26984#include <sys/stat.h> 26985 26986int 26987main () 26988{ 26989int result = 0; 26990 struct stat st; 26991 if (!stat ("conftest.tmp/", &st)) 26992 result |= 1; 26993#if HAVE_LSTAT 26994 if (!stat ("conftest.lnk/", &st)) 26995 result |= 2; 26996#endif 26997 return result; 26998 26999 ; 27000 return 0; 27001} 27002_ACEOF 27003if ac_fn_c_try_run "$LINENO"; then : 27004 gl_cv_func_stat_file_slash=yes 27005else 27006 gl_cv_func_stat_file_slash=no 27007fi 27008rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 27009 conftest.$ac_objext conftest.beam conftest.$ac_ext 27010fi 27011 27012 rm -f conftest.tmp conftest.lnk 27013fi 27014{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 27015$as_echo "$gl_cv_func_stat_file_slash" >&6; } 27016 case $gl_cv_func_stat_file_slash in 27017 *no) 27018 REPLACE_STAT=1 27019 27020$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h 27021;; 27022 esac 27023 case $host_os in 27024 solaris*) 27025 REPLACE_FSTAT=1 ;; 27026 esac 27027 ;; 27028 esac 27029 27030 if test $REPLACE_STAT = 1; then 27031 27032 27033 27034 27035 27036 27037 27038 27039 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" 27040 27041 case "$host_os" in 27042 mingw*) 27043 27044 27045 27046 27047 27048 27049 27050 27051 gl_LIBOBJS="$gl_LIBOBJS stat-w32.$ac_objext" 27052 27053 ;; 27054 esac 27055 27056 27057 : 27058 27059 fi 27060 27061 27062 27063 27064 27065 GNULIB_STAT=1 27066 27067 27068 27069 27070 27071$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h 27072 27073 27074 27075 27076 27077 27078 27079 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> 27080 #include <sys/stat.h> 27081" 27082if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes; then : 27083 27084cat >>confdefs.h <<_ACEOF 27085#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1 27086_ACEOF 27087 27088{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5 27089$as_echo_n "checking whether struct stat.st_atim is of type struct timespec... " >&6; } 27090if ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+:} false; then : 27091 $as_echo_n "(cached) " >&6 27092else 27093 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 27094/* end confdefs.h. */ 27095 27096 #include <sys/types.h> 27097 #include <sys/stat.h> 27098 #if HAVE_SYS_TIME_H 27099 # include <sys/time.h> 27100 #endif 27101 #include <time.h> 27102 struct timespec ts; 27103 struct stat st; 27104 27105int 27106main () 27107{ 27108 27109 st.st_atim = ts; 27110 27111 ; 27112 return 0; 27113} 27114_ACEOF 27115if ac_fn_c_try_compile "$LINENO"; then : 27116 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes 27117else 27118 ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no 27119fi 27120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 27121fi 27122{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5 27123$as_echo "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; } 27124 if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then 27125 27126$as_echo "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h 27127 27128 fi 27129else 27130 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> 27131 #include <sys/stat.h> 27132" 27133if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes; then : 27134 27135cat >>confdefs.h <<_ACEOF 27136#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1 27137_ACEOF 27138 27139 27140else 27141 ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h> 27142 #include <sys/stat.h> 27143" 27144if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes; then : 27145 27146cat >>confdefs.h <<_ACEOF 27147#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1 27148_ACEOF 27149 27150 27151else 27152 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> 27153 #include <sys/stat.h> 27154" 27155if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes; then : 27156 27157cat >>confdefs.h <<_ACEOF 27158#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1 27159_ACEOF 27160 27161 27162fi 27163 27164fi 27165 27166fi 27167 27168fi 27169 27170 27171 27172 27173 27174 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> 27175 #include <sys/stat.h> 27176" 27177if test "x$ac_cv_member_struct_stat_st_birthtimespec_tv_nsec" = xyes; then : 27178 27179cat >>confdefs.h <<_ACEOF 27180#define HAVE_STRUCT_STAT_ST_BIRTHTIMESPEC_TV_NSEC 1 27181_ACEOF 27182 27183 27184else 27185 ac_fn_c_check_member "$LINENO" "struct stat" "st_birthtimensec" "ac_cv_member_struct_stat_st_birthtimensec" "#include <sys/types.h> 27186 #include <sys/stat.h> 27187" 27188if test "x$ac_cv_member_struct_stat_st_birthtimensec" = xyes; then : 27189 27190cat >>confdefs.h <<_ACEOF 27191#define HAVE_STRUCT_STAT_ST_BIRTHTIMENSEC 1 27192_ACEOF 27193 27194 27195else 27196 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> 27197 #include <sys/stat.h> 27198" 27199if test "x$ac_cv_member_struct_stat_st_birthtim_tv_nsec" = xyes; then : 27200 27201cat >>confdefs.h <<_ACEOF 27202#define HAVE_STRUCT_STAT_ST_BIRTHTIM_TV_NSEC 1 27203_ACEOF 27204 27205 27206fi 27207 27208fi 27209 27210fi 27211 27212 27213 27214 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working stdalign.h" >&5 27215$as_echo_n "checking for working stdalign.h... " >&6; } 27216if ${gl_cv_header_working_stdalign_h+:} false; then : 27217 $as_echo_n "(cached) " >&6 27218else 27219 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 27220/* end confdefs.h. */ 27221#include <stdalign.h> 27222 #include <stddef.h> 27223 27224 /* Test that alignof yields a result consistent with offsetof. 27225 This catches GCC bug 52023 27226 <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>. */ 27227 #ifdef __cplusplus 27228 template <class t> struct alignof_helper { char a; t b; }; 27229 # define ao(type) offsetof (alignof_helper<type>, b) 27230 #else 27231 # define ao(type) offsetof (struct { char a; type b; }, b) 27232 #endif 27233 char test_double[ao (double) % _Alignof (double) == 0 ? 1 : -1]; 27234 char test_long[ao (long int) % _Alignof (long int) == 0 ? 1 : -1]; 27235 char test_alignof[alignof (double) == _Alignof (double) ? 1 : -1]; 27236 27237 /* Test _Alignas only on platforms where gnulib can help. */ 27238 #if \ 27239 ((defined __cplusplus && 201103 <= __cplusplus) \ 27240 || (defined __APPLE__ && defined __MACH__ \ 27241 ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \ 27242 : __GNUC__) \ 27243 || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \ 27244 || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__ \ 27245 || 1300 <= _MSC_VER) 27246 struct alignas_test { char c; char alignas (8) alignas_8; }; 27247 char test_alignas[offsetof (struct alignas_test, alignas_8) == 8 27248 ? 1 : -1]; 27249 #endif 27250 27251int 27252main () 27253{ 27254 27255 ; 27256 return 0; 27257} 27258_ACEOF 27259if ac_fn_c_try_compile "$LINENO"; then : 27260 gl_cv_header_working_stdalign_h=yes 27261else 27262 gl_cv_header_working_stdalign_h=no 27263fi 27264rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 27265fi 27266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdalign_h" >&5 27267$as_echo "$gl_cv_header_working_stdalign_h" >&6; } 27268 27269 if test $gl_cv_header_working_stdalign_h = yes; then 27270 STDALIGN_H='' 27271 else 27272 STDALIGN_H='stdalign.h' 27273 fi 27274 27275 27276 if test -n "$STDALIGN_H"; then 27277 GL_GENERATE_STDALIGN_H_TRUE= 27278 GL_GENERATE_STDALIGN_H_FALSE='#' 27279else 27280 GL_GENERATE_STDALIGN_H_TRUE='#' 27281 GL_GENERATE_STDALIGN_H_FALSE= 27282fi 27283 27284 27285 27286 27287 27288 27289 if test "$ac_cv_header_stdbool_h" = yes; then 27290 case "$host_os" in 27291 solaris*) 27292 if test -z "$GCC"; then 27293 STDBOOL_H='stdbool.h' 27294 else 27295 STDBOOL_H='' 27296 fi 27297 ;; 27298 *) 27299 STDBOOL_H='' 27300 ;; 27301 esac 27302 else 27303 STDBOOL_H='stdbool.h' 27304 fi 27305 27306 if test -n "$STDBOOL_H"; then 27307 GL_GENERATE_STDBOOL_H_TRUE= 27308 GL_GENERATE_STDBOOL_H_FALSE='#' 27309else 27310 GL_GENERATE_STDBOOL_H_TRUE='#' 27311 GL_GENERATE_STDBOOL_H_FALSE= 27312fi 27313 27314 27315 if test "$ac_cv_type__Bool" = yes; then 27316 HAVE__BOOL=1 27317 else 27318 HAVE__BOOL=0 27319 fi 27320 27321 27322 27323 27324 27325 STDDEF_H= 27326 27327 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for good max_align_t" >&5 27328$as_echo_n "checking for good max_align_t... " >&6; } 27329if ${gl_cv_type_max_align_t+:} false; then : 27330 $as_echo_n "(cached) " >&6 27331else 27332 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 27333/* end confdefs.h. */ 27334#include <stddef.h> 27335 unsigned int s = sizeof (max_align_t); 27336 #if defined __GNUC__ || defined __IBM__ALIGNOF__ 27337 int check1[2 * (__alignof__ (double) <= __alignof__ (max_align_t)) - 1]; 27338 int check2[2 * (__alignof__ (long double) <= __alignof__ (max_align_t)) - 1]; 27339 #endif 27340 27341int 27342main () 27343{ 27344 27345 ; 27346 return 0; 27347} 27348_ACEOF 27349if ac_fn_c_try_compile "$LINENO"; then : 27350 gl_cv_type_max_align_t=yes 27351else 27352 gl_cv_type_max_align_t=no 27353fi 27354rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 27355 27356fi 27357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_max_align_t" >&5 27358$as_echo "$gl_cv_type_max_align_t" >&6; } 27359 if test $gl_cv_type_max_align_t = no; then 27360 HAVE_MAX_ALIGN_T=0 27361 STDDEF_H=stddef.h 27362 fi 27363 27364 if test $gt_cv_c_wchar_t = no; then 27365 HAVE_WCHAR_T=0 27366 STDDEF_H=stddef.h 27367 fi 27368 27369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 27370$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } 27371if ${gl_cv_decl_null_works+:} false; then : 27372 $as_echo_n "(cached) " >&6 27373else 27374 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 27375/* end confdefs.h. */ 27376#include <stddef.h> 27377 int test[2 * (sizeof NULL == sizeof (void *)) -1]; 27378 27379int 27380main () 27381{ 27382 27383 ; 27384 return 0; 27385} 27386_ACEOF 27387if ac_fn_c_try_compile "$LINENO"; then : 27388 gl_cv_decl_null_works=yes 27389else 27390 gl_cv_decl_null_works=no 27391fi 27392rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 27393fi 27394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 27395$as_echo "$gl_cv_decl_null_works" >&6; } 27396 if test $gl_cv_decl_null_works = no; then 27397 REPLACE_NULL=1 27398 STDDEF_H=stddef.h 27399 fi 27400 27401 27402 if test -n "$STDDEF_H"; then 27403 GL_GENERATE_STDDEF_H_TRUE= 27404 GL_GENERATE_STDDEF_H_FALSE='#' 27405else 27406 GL_GENERATE_STDDEF_H_TRUE='#' 27407 GL_GENERATE_STDDEF_H_FALSE= 27408fi 27409 27410 if test -n "$STDDEF_H"; then 27411 27412 27413 27414 27415 27416 27417 27418 27419 if test $gl_cv_have_include_next = yes; then 27420 gl_cv_next_stddef_h='<'stddef.h'>' 27421 else 27422 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 27423$as_echo_n "checking absolute name of <stddef.h>... " >&6; } 27424if ${gl_cv_next_stddef_h+:} false; then : 27425 $as_echo_n "(cached) " >&6 27426else 27427 27428 27429 27430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 27431/* end confdefs.h. */ 27432#include <stddef.h> 27433_ACEOF 27434 case "$host_os" in 27435 aix*) gl_absname_cpp="$ac_cpp -C" ;; 27436 *) gl_absname_cpp="$ac_cpp" ;; 27437 esac 27438 27439 case "$host_os" in 27440 mingw*) 27441 gl_dirsep_regex='[/\\]' 27442 ;; 27443 *) 27444 gl_dirsep_regex='\/' 27445 ;; 27446 esac 27447 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 27448 gl_header_literal_regex=`echo 'stddef.h' \ 27449 | sed -e "$gl_make_literal_regex_sed"` 27450 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 27451 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 27452 s|^/[^/]|//&| 27453 p 27454 q 27455 }' 27456 27457 gl_cv_absolute_stddef_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 27458 sed -n "$gl_absolute_header_sed"` 27459 27460 gl_header=$gl_cv_absolute_stddef_h 27461 gl_cv_next_stddef_h='"'$gl_header'"' 27462 27463 27464fi 27465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 27466$as_echo "$gl_cv_next_stddef_h" >&6; } 27467 fi 27468 NEXT_STDDEF_H=$gl_cv_next_stddef_h 27469 27470 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 27471 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 27472 gl_next_as_first_directive='<'stddef.h'>' 27473 else 27474 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 27475 gl_next_as_first_directive=$gl_cv_next_stddef_h 27476 fi 27477 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive 27478 27479 27480 27481 27482 fi 27483 27484 27485 27486 27487 $as_echo "#define __USE_MINGW_ANSI_STDIO 1" >>confdefs.h 27488 27489 27490 27491 27492 27493 27494 27495 27496 27497 27498 if test $gl_cv_have_include_next = yes; then 27499 gl_cv_next_stdio_h='<'stdio.h'>' 27500 else 27501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5 27502$as_echo_n "checking absolute name of <stdio.h>... " >&6; } 27503if ${gl_cv_next_stdio_h+:} false; then : 27504 $as_echo_n "(cached) " >&6 27505else 27506 27507 27508 27509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 27510/* end confdefs.h. */ 27511#include <stdio.h> 27512_ACEOF 27513 case "$host_os" in 27514 aix*) gl_absname_cpp="$ac_cpp -C" ;; 27515 *) gl_absname_cpp="$ac_cpp" ;; 27516 esac 27517 27518 case "$host_os" in 27519 mingw*) 27520 gl_dirsep_regex='[/\\]' 27521 ;; 27522 *) 27523 gl_dirsep_regex='\/' 27524 ;; 27525 esac 27526 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 27527 gl_header_literal_regex=`echo 'stdio.h' \ 27528 | sed -e "$gl_make_literal_regex_sed"` 27529 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 27530 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 27531 s|^/[^/]|//&| 27532 p 27533 q 27534 }' 27535 27536 gl_cv_absolute_stdio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 27537 sed -n "$gl_absolute_header_sed"` 27538 27539 gl_header=$gl_cv_absolute_stdio_h 27540 gl_cv_next_stdio_h='"'$gl_header'"' 27541 27542 27543fi 27544{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 27545$as_echo "$gl_cv_next_stdio_h" >&6; } 27546 fi 27547 NEXT_STDIO_H=$gl_cv_next_stdio_h 27548 27549 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 27550 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 27551 gl_next_as_first_directive='<'stdio.h'>' 27552 else 27553 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 27554 gl_next_as_first_directive=$gl_cv_next_stdio_h 27555 fi 27556 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive 27557 27558 27559 27560 27561 27562 { $as_echo "$as_me:${as_lineno-$LINENO}: checking which flavor of printf attribute matches inttypes macros" >&5 27563$as_echo_n "checking which flavor of printf attribute matches inttypes macros... " >&6; } 27564if ${gl_cv_func_printf_attribute_flavor+:} false; then : 27565 $as_echo_n "(cached) " >&6 27566else 27567 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 27568/* end confdefs.h. */ 27569 27570 #define __STDC_FORMAT_MACROS 1 27571 #include <stdio.h> 27572 #include <inttypes.h> 27573 /* For non-mingw systems, compilation will trivially succeed. 27574 For mingw, compilation will succeed for older mingw (system 27575 printf, "I64d") and fail for newer mingw (gnu printf, "lld"). */ 27576 #if (defined _WIN32 && ! defined __CYGWIN__) && \ 27577 (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4)) 27578 extern char PRIdMAX_probe[sizeof PRIdMAX == sizeof "I64d" ? 1 : -1]; 27579 #endif 27580 27581int 27582main () 27583{ 27584 27585 ; 27586 return 0; 27587} 27588_ACEOF 27589if ac_fn_c_try_compile "$LINENO"; then : 27590 gl_cv_func_printf_attribute_flavor=system 27591else 27592 gl_cv_func_printf_attribute_flavor=gnu 27593fi 27594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 27595fi 27596{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_attribute_flavor" >&5 27597$as_echo "$gl_cv_func_printf_attribute_flavor" >&6; } 27598 if test "$gl_cv_func_printf_attribute_flavor" = gnu; then 27599 27600$as_echo "#define GNULIB_PRINTF_ATTRIBUTE_FLAVOR_GNU 1" >>confdefs.h 27601 27602 fi 27603 27604 GNULIB_FSCANF=1 27605 27606 27607cat >>confdefs.h <<_ACEOF 27608#define GNULIB_FSCANF 1 27609_ACEOF 27610 27611 27612 GNULIB_SCANF=1 27613 27614 27615cat >>confdefs.h <<_ACEOF 27616#define GNULIB_SCANF 1 27617_ACEOF 27618 27619 27620 GNULIB_FGETC=1 27621 GNULIB_GETC=1 27622 GNULIB_GETCHAR=1 27623 GNULIB_FGETS=1 27624 GNULIB_FREAD=1 27625 27626 27627 GNULIB_FPRINTF=1 27628 GNULIB_PRINTF=1 27629 GNULIB_VFPRINTF=1 27630 GNULIB_VPRINTF=1 27631 GNULIB_FPUTC=1 27632 GNULIB_PUTC=1 27633 GNULIB_PUTCHAR=1 27634 GNULIB_FPUTS=1 27635 GNULIB_PUTS=1 27636 GNULIB_FWRITE=1 27637 27638 27639 27640 27641 27642 27643 27644 27645 27646 27647 27648 27649 27650 27651 27652 27653 27654 27655 27656 if test $gl_cv_have_include_next = yes; then 27657 gl_cv_next_stdlib_h='<'stdlib.h'>' 27658 else 27659 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5 27660$as_echo_n "checking absolute name of <stdlib.h>... " >&6; } 27661if ${gl_cv_next_stdlib_h+:} false; then : 27662 $as_echo_n "(cached) " >&6 27663else 27664 27665 27666 27667 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 27668/* end confdefs.h. */ 27669#include <stdlib.h> 27670_ACEOF 27671 case "$host_os" in 27672 aix*) gl_absname_cpp="$ac_cpp -C" ;; 27673 *) gl_absname_cpp="$ac_cpp" ;; 27674 esac 27675 27676 case "$host_os" in 27677 mingw*) 27678 gl_dirsep_regex='[/\\]' 27679 ;; 27680 *) 27681 gl_dirsep_regex='\/' 27682 ;; 27683 esac 27684 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 27685 gl_header_literal_regex=`echo 'stdlib.h' \ 27686 | sed -e "$gl_make_literal_regex_sed"` 27687 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 27688 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 27689 s|^/[^/]|//&| 27690 p 27691 q 27692 }' 27693 27694 gl_cv_absolute_stdlib_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 27695 sed -n "$gl_absolute_header_sed"` 27696 27697 gl_header=$gl_cv_absolute_stdlib_h 27698 gl_cv_next_stdlib_h='"'$gl_header'"' 27699 27700 27701fi 27702{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 27703$as_echo "$gl_cv_next_stdlib_h" >&6; } 27704 fi 27705 NEXT_STDLIB_H=$gl_cv_next_stdlib_h 27706 27707 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 27708 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 27709 gl_next_as_first_directive='<'stdlib.h'>' 27710 else 27711 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 27712 gl_next_as_first_directive=$gl_cv_next_stdlib_h 27713 fi 27714 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive 27715 27716 27717 27718 27719 27720 27721 27722 27723 27724 27725 27726 27727 27728 27729 27730 for ac_func in strchrnul 27731do : 27732 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul" 27733if test "x$ac_cv_func_strchrnul" = xyes; then : 27734 cat >>confdefs.h <<_ACEOF 27735#define HAVE_STRCHRNUL 1 27736_ACEOF 27737 27738fi 27739done 27740 27741 if test $ac_cv_func_strchrnul = no; then 27742 HAVE_STRCHRNUL=0 27743 else 27744 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5 27745$as_echo_n "checking whether strchrnul works... " >&6; } 27746if ${gl_cv_func_strchrnul_works+:} false; then : 27747 $as_echo_n "(cached) " >&6 27748else 27749 if test "$cross_compiling" = yes; then : 27750 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 27751/* end confdefs.h. */ 27752 27753#if defined __CYGWIN__ 27754 #include <cygwin/version.h> 27755 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9) 27756 Lucky user 27757 #endif 27758#else 27759 Lucky user 27760#endif 27761 27762_ACEOF 27763if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 27764 $EGREP "Lucky user" >/dev/null 2>&1; then : 27765 gl_cv_func_strchrnul_works="guessing yes" 27766else 27767 gl_cv_func_strchrnul_works="guessing no" 27768fi 27769rm -f conftest* 27770 27771 27772else 27773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 27774/* end confdefs.h. */ 27775 27776#include <string.h> /* for strchrnul */ 27777 27778int 27779main () 27780{ 27781const char *buf = "a"; 27782 return strchrnul (buf, 'b') != buf + 1; 27783 27784 ; 27785 return 0; 27786} 27787_ACEOF 27788if ac_fn_c_try_run "$LINENO"; then : 27789 gl_cv_func_strchrnul_works=yes 27790else 27791 gl_cv_func_strchrnul_works=no 27792fi 27793rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 27794 conftest.$ac_objext conftest.beam conftest.$ac_ext 27795fi 27796 27797 27798fi 27799{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5 27800$as_echo "$gl_cv_func_strchrnul_works" >&6; } 27801 case "$gl_cv_func_strchrnul_works" in 27802 *yes) ;; 27803 *) REPLACE_STRCHRNUL=1 ;; 27804 esac 27805 fi 27806 27807 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then 27808 27809 27810 27811 27812 27813 27814 27815 27816 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext" 27817 27818 : 27819 fi 27820 27821 27822 27823 27824 27825 GNULIB_STRCHRNUL=1 27826 27827 27828 27829 27830 27831$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h 27832 27833 27834 27835 27836 27837 27838 27839 if test $ac_cv_func_strdup = yes; then 27840 if test $gl_cv_func_malloc_posix != yes; then 27841 REPLACE_STRDUP=1 27842 fi 27843 fi 27844 27845 if test $ac_cv_have_decl_strdup = no; then 27846 HAVE_DECL_STRDUP=0 27847 fi 27848 27849 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then 27850 27851 27852 27853 27854 27855 27856 27857 27858 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext" 27859 27860 : 27861 fi 27862 27863 27864 27865 27866 27867 GNULIB_STRDUP=1 27868 27869 27870 27871 27872 27873$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h 27874 27875 27876 27877 27878 27879 27880 27881 27882 27883 27884 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then 27885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5 27886$as_echo_n "checking for working strerror function... " >&6; } 27887if ${gl_cv_func_working_strerror+:} false; then : 27888 $as_echo_n "(cached) " >&6 27889else 27890 if test "$cross_compiling" = yes; then : 27891 case "$host_os" in 27892 # Guess yes on glibc systems. 27893 *-gnu* | gnu*) gl_cv_func_working_strerror="guessing yes" ;; 27894 # Guess yes on musl systems. 27895 *-musl*) gl_cv_func_working_strerror="guessing yes" ;; 27896 # If we don't know, obey --enable-cross-guesses. 27897 *) gl_cv_func_working_strerror="$gl_cross_guess_normal" ;; 27898 esac 27899 27900else 27901 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 27902/* end confdefs.h. */ 27903#include <string.h> 27904 27905int 27906main () 27907{ 27908if (!*strerror (-2)) return 1; 27909 ; 27910 return 0; 27911} 27912_ACEOF 27913if ac_fn_c_try_run "$LINENO"; then : 27914 gl_cv_func_working_strerror=yes 27915else 27916 gl_cv_func_working_strerror=no 27917fi 27918rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 27919 conftest.$ac_objext conftest.beam conftest.$ac_ext 27920fi 27921 27922 27923fi 27924{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5 27925$as_echo "$gl_cv_func_working_strerror" >&6; } 27926 case "$gl_cv_func_working_strerror" in 27927 *yes) ;; 27928 *) 27929 REPLACE_STRERROR=1 27930 ;; 27931 esac 27932 27933 case "$gl_cv_func_strerror_r_works" in 27934 *no) REPLACE_STRERROR=1 ;; 27935 esac 27936 27937 else 27938 REPLACE_STRERROR=1 27939 fi 27940 27941 if test $REPLACE_STRERROR = 1; then 27942 27943 27944 27945 27946 27947 27948 27949 27950 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext" 27951 27952 fi 27953 27954 27955cat >>confdefs.h <<_ACEOF 27956#define GNULIB_STRERROR 1 27957_ACEOF 27958 27959 27960 27961 27962 27963 27964 27965 GNULIB_STRERROR=1 27966 27967 27968 27969 27970 27971$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h 27972 27973 27974 27975 27976 27977 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then 27978 27979 27980 27981 27982 27983 27984 27985 27986 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext" 27987 27988 27989 27990 27991 27992 if test $ac_cv_header_sys_socket_h != yes; then 27993 for ac_header in winsock2.h 27994do : 27995 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" 27996if test "x$ac_cv_header_winsock2_h" = xyes; then : 27997 cat >>confdefs.h <<_ACEOF 27998#define HAVE_WINSOCK2_H 1 27999_ACEOF 28000 28001fi 28002 28003done 28004 28005 fi 28006 if test "$ac_cv_header_winsock2_h" = yes; then 28007 HAVE_WINSOCK2_H=1 28008 UNISTD_H_HAVE_WINSOCK2_H=1 28009 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 28010 else 28011 HAVE_WINSOCK2_H=0 28012 fi 28013 28014 28015 fi 28016 28017 28018 28019 28020 28021 28022 28023 if test $ac_cv_have_decl_strerror_r = no; then 28024 HAVE_DECL_STRERROR_R=0 28025 fi 28026 28027 if test $ac_cv_func_strerror_r = yes; then 28028 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then 28029 if test $gl_cv_func_strerror_r_posix_signature = yes; then 28030 case "$gl_cv_func_strerror_r_works" in 28031 *no) REPLACE_STRERROR_R=1 ;; 28032 esac 28033 else 28034 REPLACE_STRERROR_R=1 28035 fi 28036 else 28037 REPLACE_STRERROR_R=1 28038 fi 28039 fi 28040 28041 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then 28042 28043 28044 28045 28046 28047 28048 28049 28050 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext" 28051 28052 28053 28054 28055 28056 28057 fi 28058 28059 28060 28061 28062 28063 GNULIB_STRERROR_R=1 28064 28065 28066 28067 28068 28069$as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h 28070 28071 28072 28073 28074 28075cat >>confdefs.h <<_ACEOF 28076#define GNULIB_STRERROR_R_POSIX 1 28077_ACEOF 28078 28079 28080 28081 28082 28083 28084 28085 28086 28087 28088 28089 if test $ac_cv_have_decl_strnlen = no; then 28090 HAVE_DECL_STRNLEN=0 28091 else 28092 28093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5 28094$as_echo_n "checking for working strnlen... " >&6; } 28095if ${ac_cv_func_strnlen_working+:} false; then : 28096 $as_echo_n "(cached) " >&6 28097else 28098 if test "$cross_compiling" = yes; then : 28099 # Guess no on AIX systems, yes otherwise. 28100 case "$host_os" in 28101 aix*) ac_cv_func_strnlen_working=no;; 28102 *) ac_cv_func_strnlen_working=yes;; 28103 esac 28104else 28105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28106/* end confdefs.h. */ 28107$ac_includes_default 28108int 28109main () 28110{ 28111 28112#define S "foobar" 28113#define S_LEN (sizeof S - 1) 28114 28115 /* At least one implementation is buggy: that of AIX 4.3 would 28116 give strnlen (S, 1) == 3. */ 28117 28118 int i; 28119 for (i = 0; i < S_LEN + 1; ++i) 28120 { 28121 int expected = i <= S_LEN ? i : S_LEN; 28122 if (strnlen (S, i) != expected) 28123 return 1; 28124 } 28125 return 0; 28126 28127 ; 28128 return 0; 28129} 28130_ACEOF 28131if ac_fn_c_try_run "$LINENO"; then : 28132 ac_cv_func_strnlen_working=yes 28133else 28134 ac_cv_func_strnlen_working=no 28135fi 28136rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 28137 conftest.$ac_objext conftest.beam conftest.$ac_ext 28138fi 28139 28140fi 28141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5 28142$as_echo "$ac_cv_func_strnlen_working" >&6; } 28143test $ac_cv_func_strnlen_working = no && : 28144 28145 28146 if test $ac_cv_func_strnlen_working = no; then 28147 REPLACE_STRNLEN=1 28148 fi 28149 fi 28150 28151 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then 28152 28153 28154 28155 28156 28157 28158 28159 28160 gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext" 28161 28162 : 28163 fi 28164 28165 28166 28167 28168 28169 GNULIB_STRNLEN=1 28170 28171 28172 28173 28174 28175$as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h 28176 28177 28178 28179 28180 28181 if test $REPLACE_STRSTR = 0; then 28182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works in linear time" >&5 28183$as_echo_n "checking whether strstr works in linear time... " >&6; } 28184if ${gl_cv_func_strstr_linear+:} false; then : 28185 $as_echo_n "(cached) " >&6 28186else 28187 if test "$cross_compiling" = yes; then : 28188 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28189/* end confdefs.h. */ 28190 28191#include <features.h> 28192#ifdef __GNU_LIBRARY__ 28193 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ 28194 && !(defined __i386__ || defined __x86_64__) \ 28195 && !defined __UCLIBC__ 28196 Lucky user 28197 #endif 28198#endif 28199#ifdef __CYGWIN__ 28200 #include <cygwin/version.h> 28201 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) 28202 Lucky user 28203 #endif 28204#endif 28205 28206_ACEOF 28207if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 28208 $EGREP "Lucky user" >/dev/null 2>&1; then : 28209 gl_cv_func_strstr_linear="guessing yes" 28210else 28211 gl_cv_func_strstr_linear="$gl_cross_guess_normal" 28212fi 28213rm -f conftest* 28214 28215 28216else 28217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28218/* end confdefs.h. */ 28219 28220#ifdef __MVS__ 28221/* z/OS does not deliver signals while strstr() is running (thanks to 28222 restrictions on its LE runtime), which prevents us from limiting the 28223 running time of this test. */ 28224# error "This test does not work properly on z/OS" 28225#endif 28226#include <signal.h> /* for signal */ 28227#include <string.h> /* for strstr */ 28228#include <stdlib.h> /* for malloc */ 28229#include <unistd.h> /* for alarm */ 28230static void quit (int sig) { _exit (sig + 128); } 28231 28232int 28233main () 28234{ 28235 28236 int result = 0; 28237 size_t m = 1000000; 28238 char *haystack = (char *) malloc (2 * m + 2); 28239 char *needle = (char *) malloc (m + 2); 28240 /* Failure to compile this test due to missing alarm is okay, 28241 since all such platforms (mingw) also have quadratic strstr. */ 28242 signal (SIGALRM, quit); 28243 alarm (5); 28244 /* Check for quadratic performance. */ 28245 if (haystack && needle) 28246 { 28247 memset (haystack, 'A', 2 * m); 28248 haystack[2 * m] = 'B'; 28249 haystack[2 * m + 1] = 0; 28250 memset (needle, 'A', m); 28251 needle[m] = 'B'; 28252 needle[m + 1] = 0; 28253 if (!strstr (haystack, needle)) 28254 result |= 1; 28255 } 28256 /* Free allocated memory, in case some sanitizer is watching. */ 28257 free (haystack); 28258 free (needle); 28259 return result; 28260 28261 ; 28262 return 0; 28263} 28264_ACEOF 28265if ac_fn_c_try_run "$LINENO"; then : 28266 gl_cv_func_strstr_linear=yes 28267else 28268 gl_cv_func_strstr_linear=no 28269fi 28270rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 28271 conftest.$ac_objext conftest.beam conftest.$ac_ext 28272fi 28273 28274 28275fi 28276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_linear" >&5 28277$as_echo "$gl_cv_func_strstr_linear" >&6; } 28278 case "$gl_cv_func_strstr_linear" in 28279 *yes) ;; 28280 *) 28281 REPLACE_STRSTR=1 28282 ;; 28283 esac 28284 fi 28285 28286 if test $REPLACE_STRSTR = 1; then 28287 28288 28289 28290 28291 28292 28293 28294 28295 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" 28296 28297 fi 28298 28299 28300 28301 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then 28302 REPLACE_STRSTR=1 28303 else 28304 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strstr works" >&5 28305$as_echo_n "checking whether strstr works... " >&6; } 28306if ${gl_cv_func_strstr_works_always+:} false; then : 28307 $as_echo_n "(cached) " >&6 28308else 28309 if test "$cross_compiling" = yes; then : 28310 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28311/* end confdefs.h. */ 28312 28313#ifdef __GNU_LIBRARY__ 28314 #include <features.h> 28315 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ > 12) || (__GLIBC__ > 2)) \ 28316 || defined __UCLIBC__ 28317 Lucky user 28318 #endif 28319#elif defined __CYGWIN__ 28320 #include <cygwin/version.h> 28321 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 7) 28322 Lucky user 28323 #endif 28324#else 28325 Lucky user 28326#endif 28327 28328_ACEOF 28329if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 28330 $EGREP "Lucky user" >/dev/null 2>&1; then : 28331 gl_cv_func_strstr_works_always="guessing yes" 28332else 28333 gl_cv_func_strstr_works_always="$gl_cross_guess_normal" 28334fi 28335rm -f conftest* 28336 28337 28338else 28339 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28340/* end confdefs.h. */ 28341 28342#include <string.h> /* for strstr */ 28343#ifdef __GNU_LIBRARY__ 28344 #include <features.h> 28345 #if __GLIBC__ == 2 && __GLIBC_MINOR__ == 28 28346 Unlucky user 28347 #endif 28348#endif 28349#define P "_EF_BF_BD" 28350#define HAYSTACK "F_BD_CE_BD" P P P P "_C3_88_20" P P P "_C3_A7_20" P 28351#define NEEDLE P P P P P 28352 28353int 28354main () 28355{ 28356return !!strstr (HAYSTACK, NEEDLE); 28357 28358 ; 28359 return 0; 28360} 28361_ACEOF 28362if ac_fn_c_try_run "$LINENO"; then : 28363 gl_cv_func_strstr_works_always=yes 28364else 28365 gl_cv_func_strstr_works_always=no 28366fi 28367rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 28368 conftest.$ac_objext conftest.beam conftest.$ac_ext 28369fi 28370 28371 28372fi 28373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strstr_works_always" >&5 28374$as_echo "$gl_cv_func_strstr_works_always" >&6; } 28375 case "$gl_cv_func_strstr_works_always" in 28376 *yes) ;; 28377 *) 28378 REPLACE_STRSTR=1 28379 ;; 28380 esac 28381 fi 28382 28383 if test $REPLACE_STRSTR = 1; then 28384 28385 28386 28387 28388 28389 28390 28391 28392 gl_LIBOBJS="$gl_LIBOBJS strstr.$ac_objext" 28393 28394 fi 28395 28396 28397 28398 28399 28400 GNULIB_STRSTR=1 28401 28402 28403 28404 28405 28406$as_echo "#define GNULIB_TEST_STRSTR 1" >>confdefs.h 28407 28408 28409 28410 28411 28412 28413 28414 for ac_func in strtok_r 28415do : 28416 ac_fn_c_check_func "$LINENO" "strtok_r" "ac_cv_func_strtok_r" 28417if test "x$ac_cv_func_strtok_r" = xyes; then : 28418 cat >>confdefs.h <<_ACEOF 28419#define HAVE_STRTOK_R 1 28420_ACEOF 28421 28422fi 28423done 28424 28425 if test $ac_cv_func_strtok_r = yes; then 28426 HAVE_STRTOK_R=1 28427 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strtok_r works" >&5 28428$as_echo_n "checking whether strtok_r works... " >&6; } 28429if ${gl_cv_func_strtok_r_works+:} false; then : 28430 $as_echo_n "(cached) " >&6 28431else 28432 if test "$cross_compiling" = yes; then : 28433 case "$host_os" in 28434 # Guess no on glibc systems. 28435 *-gnu* | gnu*) gl_cv_func_strtok_r_works="guessing no" ;; 28436 # Guess yes on native Windows. 28437 mingw*) gl_cv_func_strtok_r_works="guessing yes" ;; 28438 *) gl_cv_func_strtok_r_works="guessing yes" ;; 28439 esac 28440 28441else 28442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28443/* end confdefs.h. */ 28444 28445 #ifndef __OPTIMIZE__ 28446 # define __OPTIMIZE__ 1 28447 #endif 28448 #undef __OPTIMIZE_SIZE__ 28449 #undef __NO_INLINE__ 28450 #include <stdlib.h> 28451 #include <string.h> 28452 28453int 28454main () 28455{ 28456static const char dummy[] = "\177\01a"; 28457 char delimiters[] = "xxxxxxxx"; 28458 char *save_ptr = (char *) dummy; 28459 strtok_r (delimiters, "x", &save_ptr); 28460 strtok_r (NULL, "x", &save_ptr); 28461 return 0; 28462 28463 ; 28464 return 0; 28465} 28466 28467_ACEOF 28468if ac_fn_c_try_run "$LINENO"; then : 28469 gl_cv_func_strtok_r_works=yes 28470else 28471 gl_cv_func_strtok_r_works=no 28472fi 28473rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 28474 conftest.$ac_objext conftest.beam conftest.$ac_ext 28475fi 28476 28477 28478fi 28479{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strtok_r_works" >&5 28480$as_echo "$gl_cv_func_strtok_r_works" >&6; } 28481 case "$gl_cv_func_strtok_r_works" in 28482 *no) 28483 UNDEFINE_STRTOK_R=1 28484 ;; 28485 esac 28486 else 28487 HAVE_STRTOK_R=0 28488 fi 28489 28490 if test $ac_cv_have_decl_strtok_r = no; then 28491 HAVE_DECL_STRTOK_R=0 28492 fi 28493 28494 if test $HAVE_STRTOK_R = 0 || test $REPLACE_STRTOK_R = 1; then 28495 28496 28497 28498 28499 28500 28501 28502 28503 gl_LIBOBJS="$gl_LIBOBJS strtok_r.$ac_objext" 28504 28505 28506 : 28507 28508 fi 28509 28510 28511 28512 28513 28514 GNULIB_STRTOK_R=1 28515 28516 28517 28518 28519 28520$as_echo "#define GNULIB_TEST_STRTOK_R 1" >>confdefs.h 28521 28522 28523 28524 28525 28526 28527 28528 28529 28530 28531 28532 28533 28534 28535 if test $gl_cv_have_include_next = yes; then 28536 gl_cv_next_sys_random_h='<'sys/random.h'>' 28537 else 28538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/random.h>" >&5 28539$as_echo_n "checking absolute name of <sys/random.h>... " >&6; } 28540if ${gl_cv_next_sys_random_h+:} false; then : 28541 $as_echo_n "(cached) " >&6 28542else 28543 28544 if test $ac_cv_header_sys_random_h = yes; then 28545 28546 28547 28548 28549 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28550/* end confdefs.h. */ 28551#include <sys/random.h> 28552_ACEOF 28553 case "$host_os" in 28554 aix*) gl_absname_cpp="$ac_cpp -C" ;; 28555 *) gl_absname_cpp="$ac_cpp" ;; 28556 esac 28557 28558 case "$host_os" in 28559 mingw*) 28560 gl_dirsep_regex='[/\\]' 28561 ;; 28562 *) 28563 gl_dirsep_regex='\/' 28564 ;; 28565 esac 28566 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 28567 gl_header_literal_regex=`echo 'sys/random.h' \ 28568 | sed -e "$gl_make_literal_regex_sed"` 28569 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 28570 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 28571 s|^/[^/]|//&| 28572 p 28573 q 28574 }' 28575 28576 gl_cv_absolute_sys_random_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 28577 sed -n "$gl_absolute_header_sed"` 28578 28579 gl_header=$gl_cv_absolute_sys_random_h 28580 gl_cv_next_sys_random_h='"'$gl_header'"' 28581 else 28582 gl_cv_next_sys_random_h='<'sys/random.h'>' 28583 fi 28584 28585 28586fi 28587{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_random_h" >&5 28588$as_echo "$gl_cv_next_sys_random_h" >&6; } 28589 fi 28590 NEXT_SYS_RANDOM_H=$gl_cv_next_sys_random_h 28591 28592 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 28593 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 28594 gl_next_as_first_directive='<'sys/random.h'>' 28595 else 28596 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 28597 gl_next_as_first_directive=$gl_cv_next_sys_random_h 28598 fi 28599 NEXT_AS_FIRST_DIRECTIVE_SYS_RANDOM_H=$gl_next_as_first_directive 28600 28601 28602 28603 28604 if test $ac_cv_header_sys_random_h = yes; then 28605 HAVE_SYS_RANDOM_H=1 28606 else 28607 HAVE_SYS_RANDOM_H=0 28608 fi 28609 28610 28611 28612 if test $ac_cv_header_sys_random_h = yes; then 28613 UNISTD_H_HAVE_SYS_RANDOM_H=1 28614 fi 28615 28616 28617 28618 28619 28620 28621 28622 28623 28624 28625 28626 28627 28628 28629 28630 28631 28632 28633 28634 28635 28636 28637 if test $gl_cv_have_include_next = yes; then 28638 gl_cv_next_sys_stat_h='<'sys/stat.h'>' 28639 else 28640 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5 28641$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; } 28642if ${gl_cv_next_sys_stat_h+:} false; then : 28643 $as_echo_n "(cached) " >&6 28644else 28645 28646 if test $ac_cv_header_sys_stat_h = yes; then 28647 28648 28649 28650 28651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28652/* end confdefs.h. */ 28653#include <sys/stat.h> 28654_ACEOF 28655 case "$host_os" in 28656 aix*) gl_absname_cpp="$ac_cpp -C" ;; 28657 *) gl_absname_cpp="$ac_cpp" ;; 28658 esac 28659 28660 case "$host_os" in 28661 mingw*) 28662 gl_dirsep_regex='[/\\]' 28663 ;; 28664 *) 28665 gl_dirsep_regex='\/' 28666 ;; 28667 esac 28668 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 28669 gl_header_literal_regex=`echo 'sys/stat.h' \ 28670 | sed -e "$gl_make_literal_regex_sed"` 28671 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 28672 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 28673 s|^/[^/]|//&| 28674 p 28675 q 28676 }' 28677 28678 gl_cv_absolute_sys_stat_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 28679 sed -n "$gl_absolute_header_sed"` 28680 28681 gl_header=$gl_cv_absolute_sys_stat_h 28682 gl_cv_next_sys_stat_h='"'$gl_header'"' 28683 else 28684 gl_cv_next_sys_stat_h='<'sys/stat.h'>' 28685 fi 28686 28687 28688fi 28689{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 28690$as_echo "$gl_cv_next_sys_stat_h" >&6; } 28691 fi 28692 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h 28693 28694 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 28695 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 28696 gl_next_as_first_directive='<'sys/stat.h'>' 28697 else 28698 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 28699 gl_next_as_first_directive=$gl_cv_next_sys_stat_h 28700 fi 28701 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive 28702 28703 28704 28705 28706 28707 28708 28709 28710 WINDOWS_STAT_TIMESPEC=0 28711 28712 28713 28714 28715 28716 28717 28718 28719 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h> 28720 #include <sys/stat.h> 28721" 28722if test "x$ac_cv_type_nlink_t" = xyes; then : 28723 28724else 28725 28726$as_echo "#define nlink_t int" >>confdefs.h 28727 28728fi 28729 28730 28731 28732 28733 28734 28735 28736 28737 28738 28739 28740 28741 28742 28743 28744 28745 28746 28747 28748 28749 28750 28751 28752 28753 28754 28755 if test $gl_cv_have_include_next = yes; then 28756 gl_cv_next_sys_uio_h='<'sys/uio.h'>' 28757 else 28758 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/uio.h>" >&5 28759$as_echo_n "checking absolute name of <sys/uio.h>... " >&6; } 28760if ${gl_cv_next_sys_uio_h+:} false; then : 28761 $as_echo_n "(cached) " >&6 28762else 28763 28764 if test $ac_cv_header_sys_uio_h = yes; then 28765 28766 28767 28768 28769 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28770/* end confdefs.h. */ 28771#include <sys/uio.h> 28772_ACEOF 28773 case "$host_os" in 28774 aix*) gl_absname_cpp="$ac_cpp -C" ;; 28775 *) gl_absname_cpp="$ac_cpp" ;; 28776 esac 28777 28778 case "$host_os" in 28779 mingw*) 28780 gl_dirsep_regex='[/\\]' 28781 ;; 28782 *) 28783 gl_dirsep_regex='\/' 28784 ;; 28785 esac 28786 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 28787 gl_header_literal_regex=`echo 'sys/uio.h' \ 28788 | sed -e "$gl_make_literal_regex_sed"` 28789 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 28790 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 28791 s|^/[^/]|//&| 28792 p 28793 q 28794 }' 28795 28796 gl_cv_absolute_sys_uio_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 28797 sed -n "$gl_absolute_header_sed"` 28798 28799 gl_header=$gl_cv_absolute_sys_uio_h 28800 gl_cv_next_sys_uio_h='"'$gl_header'"' 28801 else 28802 gl_cv_next_sys_uio_h='<'sys/uio.h'>' 28803 fi 28804 28805 28806fi 28807{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_uio_h" >&5 28808$as_echo "$gl_cv_next_sys_uio_h" >&6; } 28809 fi 28810 NEXT_SYS_UIO_H=$gl_cv_next_sys_uio_h 28811 28812 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 28813 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 28814 gl_next_as_first_directive='<'sys/uio.h'>' 28815 else 28816 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 28817 gl_next_as_first_directive=$gl_cv_next_sys_uio_h 28818 fi 28819 NEXT_AS_FIRST_DIRECTIVE_SYS_UIO_H=$gl_next_as_first_directive 28820 28821 28822 28823 28824 if test $ac_cv_header_sys_uio_h = yes; then 28825 HAVE_SYS_UIO_H=1 28826 else 28827 HAVE_SYS_UIO_H=0 28828 fi 28829 28830 28831 28832 28833 28834 : 28835 28836 28837 28838 28839 28840 28841 28842 28843 28844 28845 28846 28847 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, 28848 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has 28849 been included before. */ 28850 #if defined __MINGW32__ 28851 # include <unistd.h> 28852 #endif 28853 #include <time.h> 28854 28855" 28856if test "x$ac_cv_have_decl_localtime_r" = xyes; then : 28857 ac_have_decl=1 28858else 28859 ac_have_decl=0 28860fi 28861 28862cat >>confdefs.h <<_ACEOF 28863#define HAVE_DECL_LOCALTIME_R $ac_have_decl 28864_ACEOF 28865 28866 if test $ac_cv_have_decl_localtime_r = no; then 28867 HAVE_DECL_LOCALTIME_R=0 28868 fi 28869 28870 28871 if test $ac_cv_func_localtime_r = yes; then 28872 HAVE_LOCALTIME_R=1 28873 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r is compatible with its POSIX signature" >&5 28874$as_echo_n "checking whether localtime_r is compatible with its POSIX signature... " >&6; } 28875if ${gl_cv_time_r_posix+:} false; then : 28876 $as_echo_n "(cached) " >&6 28877else 28878 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28879/* end confdefs.h. */ 28880/* mingw's <time.h> provides the functions asctime_r, ctime_r, 28881 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has 28882 been included before. */ 28883 #if defined __MINGW32__ 28884 # include <unistd.h> 28885 #endif 28886 #include <time.h> 28887 28888int 28889main () 28890{ 28891/* We don't need to append 'restrict's to the argument types, 28892 even though the POSIX signature has the 'restrict's, 28893 since C99 says they can't affect type compatibility. */ 28894 struct tm * (*ptr) (time_t const *, struct tm *) = localtime_r; 28895 if (ptr) return 0; 28896 /* Check the return type is a pointer. 28897 On HP-UX 10 it is 'int'. */ 28898 *localtime_r (0, 0); 28899 ; 28900 return 0; 28901} 28902 28903_ACEOF 28904if ac_fn_c_try_compile "$LINENO"; then : 28905 gl_cv_time_r_posix=yes 28906else 28907 gl_cv_time_r_posix=no 28908fi 28909rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28910 28911fi 28912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_time_r_posix" >&5 28913$as_echo "$gl_cv_time_r_posix" >&6; } 28914 if test $gl_cv_time_r_posix = yes; then 28915 REPLACE_LOCALTIME_R=0 28916 else 28917 REPLACE_LOCALTIME_R=1 28918 fi 28919 else 28920 HAVE_LOCALTIME_R=0 28921 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether localtime_r exists as an inline function" >&5 28922$as_echo_n "checking whether localtime_r exists as an inline function... " >&6; } 28923if ${gl_cv_func_localtime_r_inline+:} false; then : 28924 $as_echo_n "(cached) " >&6 28925else 28926 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28927/* end confdefs.h. */ 28928/* mingw's <time.h> provides the functions asctime_r, ctime_r, 28929 gmtime_r, localtime_r only if <unistd.h> or <pthread.h> has 28930 been included before. */ 28931 #if defined __MINGW32__ 28932 # include <unistd.h> 28933 #endif 28934 #include <time.h> 28935 28936int 28937main () 28938{ 28939time_t a; 28940 struct tm r; 28941 localtime_r (&a, &r); 28942 28943 ; 28944 return 0; 28945} 28946 28947_ACEOF 28948if ac_fn_c_try_link "$LINENO"; then : 28949 gl_cv_func_localtime_r_inline=yes 28950else 28951 gl_cv_func_localtime_r_inline=no 28952fi 28953rm -f core conftest.err conftest.$ac_objext \ 28954 conftest$ac_exeext conftest.$ac_ext 28955 28956fi 28957{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_localtime_r_inline" >&5 28958$as_echo "$gl_cv_func_localtime_r_inline" >&6; } 28959 if test $gl_cv_func_localtime_r_inline = yes; then 28960 REPLACE_LOCALTIME_R=1 28961 fi 28962 fi 28963 28964 if test $HAVE_LOCALTIME_R = 0 || test $REPLACE_LOCALTIME_R = 1; then 28965 28966 28967 28968 28969 28970 28971 28972 28973 gl_LIBOBJS="$gl_LIBOBJS time_r.$ac_objext" 28974 28975 28976 : 28977 28978 fi 28979 28980 28981 28982 28983 28984 GNULIB_TIME_R=1 28985 28986 28987 28988 28989 28990$as_echo "#define GNULIB_TEST_TIME_R 1" >>confdefs.h 28991 28992 28993 28994 28995 28996 28997 28998 28999 29000 29001 29002 29003 29004 29005 29006 if test $gl_cv_have_include_next = yes; then 29007 gl_cv_next_unistd_h='<'unistd.h'>' 29008 else 29009 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5 29010$as_echo_n "checking absolute name of <unistd.h>... " >&6; } 29011if ${gl_cv_next_unistd_h+:} false; then : 29012 $as_echo_n "(cached) " >&6 29013else 29014 29015 if test $ac_cv_header_unistd_h = yes; then 29016 29017 29018 29019 29020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29021/* end confdefs.h. */ 29022#include <unistd.h> 29023_ACEOF 29024 case "$host_os" in 29025 aix*) gl_absname_cpp="$ac_cpp -C" ;; 29026 *) gl_absname_cpp="$ac_cpp" ;; 29027 esac 29028 29029 case "$host_os" in 29030 mingw*) 29031 gl_dirsep_regex='[/\\]' 29032 ;; 29033 *) 29034 gl_dirsep_regex='\/' 29035 ;; 29036 esac 29037 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 29038 gl_header_literal_regex=`echo 'unistd.h' \ 29039 | sed -e "$gl_make_literal_regex_sed"` 29040 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 29041 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 29042 s|^/[^/]|//&| 29043 p 29044 q 29045 }' 29046 29047 gl_cv_absolute_unistd_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 29048 sed -n "$gl_absolute_header_sed"` 29049 29050 gl_header=$gl_cv_absolute_unistd_h 29051 gl_cv_next_unistd_h='"'$gl_header'"' 29052 else 29053 gl_cv_next_unistd_h='<'unistd.h'>' 29054 fi 29055 29056 29057fi 29058{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 29059$as_echo "$gl_cv_next_unistd_h" >&6; } 29060 fi 29061 NEXT_UNISTD_H=$gl_cv_next_unistd_h 29062 29063 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 29064 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 29065 gl_next_as_first_directive='<'unistd.h'>' 29066 else 29067 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 29068 gl_next_as_first_directive=$gl_cv_next_unistd_h 29069 fi 29070 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive 29071 29072 29073 29074 29075 if test $ac_cv_header_unistd_h = yes; then 29076 HAVE_UNISTD_H=1 29077 else 29078 HAVE_UNISTD_H=0 29079 fi 29080 29081 29082 29083 29084 29085 29086 29087 29088 29089 29090 29091 29092 29093 29094 29095 29096 29097 29098 if test $ac_cv_have_decl_unsetenv = no; then 29099 HAVE_DECL_UNSETENV=0 29100 fi 29101 for ac_func in unsetenv 29102do : 29103 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv" 29104if test "x$ac_cv_func_unsetenv" = xyes; then : 29105 cat >>confdefs.h <<_ACEOF 29106#define HAVE_UNSETENV 1 29107_ACEOF 29108 29109fi 29110done 29111 29112 if test $ac_cv_func_unsetenv = no; then 29113 HAVE_UNSETENV=0 29114 else 29115 HAVE_UNSETENV=1 29116 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5 29117$as_echo_n "checking for unsetenv() return type... " >&6; } 29118if ${gt_cv_func_unsetenv_ret+:} false; then : 29119 $as_echo_n "(cached) " >&6 29120else 29121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29122/* end confdefs.h. */ 29123 29124#undef _BSD 29125#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */ 29126#include <stdlib.h> 29127extern 29128#ifdef __cplusplus 29129"C" 29130#endif 29131int unsetenv (const char *name); 29132 29133int 29134main () 29135{ 29136 29137 ; 29138 return 0; 29139} 29140_ACEOF 29141if ac_fn_c_try_compile "$LINENO"; then : 29142 gt_cv_func_unsetenv_ret='int' 29143else 29144 gt_cv_func_unsetenv_ret='void' 29145fi 29146rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29147fi 29148{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5 29149$as_echo "$gt_cv_func_unsetenv_ret" >&6; } 29150 if test $gt_cv_func_unsetenv_ret = 'void'; then 29151 29152$as_echo "#define VOID_UNSETENV 1" >>confdefs.h 29153 29154 REPLACE_UNSETENV=1 29155 fi 29156 29157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5 29158$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; } 29159if ${gl_cv_func_unsetenv_works+:} false; then : 29160 $as_echo_n "(cached) " >&6 29161else 29162 if test "$cross_compiling" = yes; then : 29163 case "$host_os" in 29164 # Guess yes on glibc systems. 29165 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;; 29166 # Guess yes on bsd systems. 29167 *bsd*) gl_cv_func_unsetenv_works="guessing yes" ;; 29168 # If we don't know, obey --enable-cross-guesses. 29169 *) gl_cv_func_unsetenv_works="$gl_cross_guess_normal" ;; 29170 esac 29171 29172else 29173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29174/* end confdefs.h. */ 29175 29176 #include <stdlib.h> 29177 #include <errno.h> 29178 extern char **environ; 29179 29180int 29181main () 29182{ 29183 29184 char entry1[] = "a=1"; 29185 char entry2[] = "b=2"; 29186 char *env[] = { entry1, entry2, NULL }; 29187 if (putenv ((char *) "a=1")) return 1; 29188 if (putenv (entry2)) return 2; 29189 entry2[0] = 'a'; 29190 unsetenv ("a"); 29191 if (getenv ("a")) return 3; 29192 if (!unsetenv ("") || errno != EINVAL) return 4; 29193 entry2[0] = 'b'; 29194 environ = env; 29195 if (!getenv ("a")) return 5; 29196 entry2[0] = 'a'; 29197 unsetenv ("a"); 29198 if (getenv ("a")) return 6; 29199 29200 ; 29201 return 0; 29202} 29203_ACEOF 29204if ac_fn_c_try_run "$LINENO"; then : 29205 gl_cv_func_unsetenv_works=yes 29206else 29207 gl_cv_func_unsetenv_works=no 29208fi 29209rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 29210 conftest.$ac_objext conftest.beam conftest.$ac_ext 29211fi 29212 29213fi 29214{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5 29215$as_echo "$gl_cv_func_unsetenv_works" >&6; } 29216 case "$gl_cv_func_unsetenv_works" in 29217 *yes) ;; 29218 *) 29219 REPLACE_UNSETENV=1 29220 ;; 29221 esac 29222 fi 29223 29224 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then 29225 29226 29227 29228 29229 29230 29231 29232 29233 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext" 29234 29235 29236 29237 29238 29239 fi 29240 29241 29242 29243 29244 29245 GNULIB_UNSETENV=1 29246 29247 29248 29249 29250 29251$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h 29252 29253 29254 29255 29256 29257 29258 29259 29260 29261 29262 29263 29264 29265 29266 29267 if test $gl_cv_have_include_next = yes; then 29268 gl_cv_next_wchar_h='<'wchar.h'>' 29269 else 29270 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5 29271$as_echo_n "checking absolute name of <wchar.h>... " >&6; } 29272if ${gl_cv_next_wchar_h+:} false; then : 29273 $as_echo_n "(cached) " >&6 29274else 29275 29276 if test $ac_cv_header_wchar_h = yes; then 29277 29278 29279 29280 29281 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29282/* end confdefs.h. */ 29283#include <wchar.h> 29284_ACEOF 29285 case "$host_os" in 29286 aix*) gl_absname_cpp="$ac_cpp -C" ;; 29287 *) gl_absname_cpp="$ac_cpp" ;; 29288 esac 29289 29290 case "$host_os" in 29291 mingw*) 29292 gl_dirsep_regex='[/\\]' 29293 ;; 29294 *) 29295 gl_dirsep_regex='\/' 29296 ;; 29297 esac 29298 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 29299 gl_header_literal_regex=`echo 'wchar.h' \ 29300 | sed -e "$gl_make_literal_regex_sed"` 29301 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 29302 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 29303 s|^/[^/]|//&| 29304 p 29305 q 29306 }' 29307 29308 gl_cv_absolute_wchar_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 29309 sed -n "$gl_absolute_header_sed"` 29310 29311 gl_header=$gl_cv_absolute_wchar_h 29312 gl_cv_next_wchar_h='"'$gl_header'"' 29313 else 29314 gl_cv_next_wchar_h='<'wchar.h'>' 29315 fi 29316 29317 29318fi 29319{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5 29320$as_echo "$gl_cv_next_wchar_h" >&6; } 29321 fi 29322 NEXT_WCHAR_H=$gl_cv_next_wchar_h 29323 29324 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 29325 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 29326 gl_next_as_first_directive='<'wchar.h'>' 29327 else 29328 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 29329 gl_next_as_first_directive=$gl_cv_next_wchar_h 29330 fi 29331 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive 29332 29333 29334 29335 29336 if test $ac_cv_header_wchar_h = yes; then 29337 HAVE_WCHAR_H=1 29338 else 29339 HAVE_WCHAR_H=0 29340 fi 29341 29342 29343 29344 29345 29346 if test $gt_cv_c_wint_t = yes; then 29347 HAVE_WINT_T=1 29348 else 29349 HAVE_WINT_T=0 29350 fi 29351 29352 29353 29354 29355 29356 29357 29358 29359 29360 29361 29362 29363 29364 29365 29366 if test $ac_cv_func_iswcntrl = yes; then 29367 HAVE_ISWCNTRL=1 29368 else 29369 HAVE_ISWCNTRL=0 29370 fi 29371 29372 29373 29374 if test $gt_cv_c_wint_t = yes; then 29375 HAVE_WINT_T=1 29376 else 29377 HAVE_WINT_T=0 29378 fi 29379 29380 29381 29382 29383 29384 29385 29386 29387 29388 29389 29390 29391 29392 if test $gl_cv_have_include_next = yes; then 29393 gl_cv_next_wctype_h='<'wctype.h'>' 29394 else 29395 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5 29396$as_echo_n "checking absolute name of <wctype.h>... " >&6; } 29397if ${gl_cv_next_wctype_h+:} false; then : 29398 $as_echo_n "(cached) " >&6 29399else 29400 29401 if test $ac_cv_header_wctype_h = yes; then 29402 29403 29404 29405 29406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29407/* end confdefs.h. */ 29408#include <wctype.h> 29409_ACEOF 29410 case "$host_os" in 29411 aix*) gl_absname_cpp="$ac_cpp -C" ;; 29412 *) gl_absname_cpp="$ac_cpp" ;; 29413 esac 29414 29415 case "$host_os" in 29416 mingw*) 29417 gl_dirsep_regex='[/\\]' 29418 ;; 29419 *) 29420 gl_dirsep_regex='\/' 29421 ;; 29422 esac 29423 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 29424 gl_header_literal_regex=`echo 'wctype.h' \ 29425 | sed -e "$gl_make_literal_regex_sed"` 29426 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 29427 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 29428 s|^/[^/]|//&| 29429 p 29430 q 29431 }' 29432 29433 gl_cv_absolute_wctype_h=`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 29434 sed -n "$gl_absolute_header_sed"` 29435 29436 gl_header=$gl_cv_absolute_wctype_h 29437 gl_cv_next_wctype_h='"'$gl_header'"' 29438 else 29439 gl_cv_next_wctype_h='<'wctype.h'>' 29440 fi 29441 29442 29443fi 29444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5 29445$as_echo "$gl_cv_next_wctype_h" >&6; } 29446 fi 29447 NEXT_WCTYPE_H=$gl_cv_next_wctype_h 29448 29449 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 29450 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 29451 gl_next_as_first_directive='<'wctype.h'>' 29452 else 29453 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 29454 gl_next_as_first_directive=$gl_cv_next_wctype_h 29455 fi 29456 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive 29457 29458 29459 29460 29461 if test $ac_cv_header_wctype_h = yes; then 29462 if test $ac_cv_func_iswcntrl = yes; then 29463 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5 29464$as_echo_n "checking whether iswcntrl works... " >&6; } 29465if ${gl_cv_func_iswcntrl_works+:} false; then : 29466 $as_echo_n "(cached) " >&6 29467else 29468 29469 if test "$cross_compiling" = yes; then : 29470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29471/* end confdefs.h. */ 29472#include <stdlib.h> 29473 #if __GNU_LIBRARY__ == 1 29474 Linux libc5 i18n is broken. 29475 #endif 29476int 29477main () 29478{ 29479 29480 ; 29481 return 0; 29482} 29483_ACEOF 29484if ac_fn_c_try_compile "$LINENO"; then : 29485 gl_cv_func_iswcntrl_works="guessing yes" 29486else 29487 gl_cv_func_iswcntrl_works="guessing no" 29488fi 29489rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29490 29491else 29492 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29493/* end confdefs.h. */ 29494 29495 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be 29496 included before <wchar.h>. 29497 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> 29498 must be included before <wchar.h>. */ 29499 #include <stddef.h> 29500 #include <stdio.h> 29501 #include <time.h> 29502 #include <wchar.h> 29503 #include <wctype.h> 29504 int main () { return iswprint ('x') == 0; } 29505 29506_ACEOF 29507if ac_fn_c_try_run "$LINENO"; then : 29508 gl_cv_func_iswcntrl_works=yes 29509else 29510 gl_cv_func_iswcntrl_works=no 29511fi 29512rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 29513 conftest.$ac_objext conftest.beam conftest.$ac_ext 29514fi 29515 29516 29517fi 29518{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5 29519$as_echo "$gl_cv_func_iswcntrl_works" >&6; } 29520 fi 29521 HAVE_WCTYPE_H=1 29522 else 29523 HAVE_WCTYPE_H=0 29524 fi 29525 29526 29527 if test $GNULIB_OVERRIDES_WINT_T = 1; then 29528 REPLACE_ISWCNTRL=1 29529 else 29530 case "$gl_cv_func_iswcntrl_works" in 29531 *yes) REPLACE_ISWCNTRL=0 ;; 29532 *) REPLACE_ISWCNTRL=1 ;; 29533 esac 29534 fi 29535 29536 29537 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then 29538 : 29539 fi 29540 29541 if test $REPLACE_ISWCNTRL = 1; then 29542 REPLACE_TOWLOWER=1 29543 else 29544 for ac_func in towlower 29545do : 29546 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower" 29547if test "x$ac_cv_func_towlower" = xyes; then : 29548 cat >>confdefs.h <<_ACEOF 29549#define HAVE_TOWLOWER 1 29550_ACEOF 29551 29552fi 29553done 29554 29555 if test $ac_cv_func_towlower = yes; then 29556 REPLACE_TOWLOWER=0 29557 else 29558 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be 29559 included before <wchar.h>. 29560 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> 29561 must be included before <wchar.h>. */ 29562 #include <stddef.h> 29563 #include <stdio.h> 29564 #include <time.h> 29565 #include <wchar.h> 29566 #if HAVE_WCTYPE_H 29567 # include <wctype.h> 29568 #endif 29569 29570" 29571if test "x$ac_cv_have_decl_towlower" = xyes; then : 29572 ac_have_decl=1 29573else 29574 ac_have_decl=0 29575fi 29576 29577cat >>confdefs.h <<_ACEOF 29578#define HAVE_DECL_TOWLOWER $ac_have_decl 29579_ACEOF 29580 29581 if test $ac_cv_have_decl_towlower = yes; then 29582 REPLACE_TOWLOWER=1 29583 else 29584 REPLACE_TOWLOWER=0 29585 fi 29586 fi 29587 fi 29588 29589 29590 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then 29591 : 29592 fi 29593 29594 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5 29595$as_echo_n "checking for wctype_t... " >&6; } 29596if ${gl_cv_type_wctype_t+:} false; then : 29597 $as_echo_n "(cached) " >&6 29598else 29599 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29600/* end confdefs.h. */ 29601/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be 29602 included before <wchar.h>. 29603 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> 29604 must be included before <wchar.h>. */ 29605 #include <stddef.h> 29606 #include <stdio.h> 29607 #include <time.h> 29608 #include <wchar.h> 29609 #if HAVE_WCTYPE_H 29610 # include <wctype.h> 29611 #endif 29612 wctype_t a; 29613 29614int 29615main () 29616{ 29617 29618 ; 29619 return 0; 29620} 29621_ACEOF 29622if ac_fn_c_try_compile "$LINENO"; then : 29623 gl_cv_type_wctype_t=yes 29624else 29625 gl_cv_type_wctype_t=no 29626fi 29627rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29628 29629fi 29630{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5 29631$as_echo "$gl_cv_type_wctype_t" >&6; } 29632 if test $gl_cv_type_wctype_t = no; then 29633 HAVE_WCTYPE_T=0 29634 fi 29635 29636 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5 29637$as_echo_n "checking for wctrans_t... " >&6; } 29638if ${gl_cv_type_wctrans_t+:} false; then : 29639 $as_echo_n "(cached) " >&6 29640else 29641 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29642/* end confdefs.h. */ 29643/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be 29644 included before <wchar.h>. 29645 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> 29646 must be included before <wchar.h>. */ 29647 #include <stddef.h> 29648 #include <stdio.h> 29649 #include <time.h> 29650 #include <wchar.h> 29651 #include <wctype.h> 29652 wctrans_t a; 29653 29654int 29655main () 29656{ 29657 29658 ; 29659 return 0; 29660} 29661_ACEOF 29662if ac_fn_c_try_compile "$LINENO"; then : 29663 gl_cv_type_wctrans_t=yes 29664else 29665 gl_cv_type_wctrans_t=no 29666fi 29667rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29668 29669fi 29670{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5 29671$as_echo "$gl_cv_type_wctrans_t" >&6; } 29672 if test $gl_cv_type_wctrans_t = no; then 29673 HAVE_WCTRANS_T=0 29674 fi 29675 29676 29677 29678 29679 29680 29681 case "$host_os" in 29682 mingw*) 29683 29684 29685 29686 29687 29688 29689 29690 29691 gl_LIBOBJS="$gl_LIBOBJS windows-mutex.$ac_objext" 29692 29693 ;; 29694 esac 29695 29696 case "$host_os" in 29697 mingw*) 29698 29699 29700 29701 29702 29703 29704 29705 29706 gl_LIBOBJS="$gl_LIBOBJS windows-once.$ac_objext" 29707 29708 ;; 29709 esac 29710 29711 case "$host_os" in 29712 mingw*) 29713 29714 29715 29716 29717 29718 29719 29720 29721 gl_LIBOBJS="$gl_LIBOBJS windows-recmutex.$ac_objext" 29722 29723 ;; 29724 esac 29725 29726 case "$host_os" in 29727 mingw*) 29728 29729 29730 29731 29732 29733 29734 29735 29736 gl_LIBOBJS="$gl_LIBOBJS windows-rwlock.$ac_objext" 29737 29738 ;; 29739 esac 29740 29741 29742 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wmemchr" >&5 29743$as_echo_n "checking for wmemchr... " >&6; } 29744if ${gl_cv_func_wmemchr+:} false; then : 29745 $as_echo_n "(cached) " >&6 29746else 29747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29748/* end confdefs.h. */ 29749 29750/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 29751 <wchar.h>. 29752 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included 29753 before <wchar.h>. */ 29754#include <stddef.h> 29755#include <stdio.h> 29756#include <time.h> 29757#include <wchar.h> 29758 29759int 29760main () 29761{ 29762return ! wmemchr ((const wchar_t *) 0, (wchar_t) ' ', 0); 29763 ; 29764 return 0; 29765} 29766 29767_ACEOF 29768if ac_fn_c_try_link "$LINENO"; then : 29769 gl_cv_func_wmemchr=yes 29770else 29771 gl_cv_func_wmemchr=no 29772fi 29773rm -f core conftest.err conftest.$ac_objext \ 29774 conftest$ac_exeext conftest.$ac_ext 29775 29776fi 29777{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wmemchr" >&5 29778$as_echo "$gl_cv_func_wmemchr" >&6; } 29779 if test $gl_cv_func_wmemchr = no; then 29780 HAVE_WMEMCHR=0 29781 fi 29782 29783 if test $HAVE_WMEMCHR = 0; then 29784 29785 29786 29787 29788 29789 29790 29791 29792 gl_LIBOBJS="$gl_LIBOBJS wmemchr.$ac_objext" 29793 29794 fi 29795 29796 29797 29798 29799 29800 GNULIB_WMEMCHR=1 29801 29802 29803 29804 29805 29806$as_echo "#define GNULIB_TEST_WMEMCHR 1" >>confdefs.h 29807 29808 29809 29810 29811 29812 29813 29814 29815 29816 29817 29818 if test $ac_cv_func_wmempcpy = no; then 29819 HAVE_WMEMPCPY=0 29820 fi 29821 29822 if test $HAVE_WMEMPCPY = 0; then 29823 29824 29825 29826 29827 29828 29829 29830 29831 gl_LIBOBJS="$gl_LIBOBJS wmempcpy.$ac_objext" 29832 29833 fi 29834 29835 29836 29837 29838 29839 GNULIB_WMEMPCPY=1 29840 29841 29842 29843 29844 29845$as_echo "#define GNULIB_TEST_WMEMPCPY 1" >>confdefs.h 29846 29847 29848 29849 # End of code from modules 29850 29851 29852 29853 29854 29855 29856 29857 29858 29859 gltests_libdeps= 29860 gltests_ltlibdeps= 29861 29862 29863 29864 29865 29866 29867 29868 29869 29870 29871 gl_source_base='tests' 29872 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 29873 29874 gl_module_indicator_condition=$gltests_WITNESS 29875 29876 29877 29878 29879 29880 29881 29882 29883 29884 LIBGNU_LIBDEPS="$gl_libdeps" 29885 29886 LIBGNU_LTLIBDEPS="$gl_ltlibdeps" 29887 29888 29889 29890am__api_version='1.16' 29891 29892# Find a good install program. We prefer a C program (faster), 29893# so one script is as good as another. But avoid the broken or 29894# incompatible versions: 29895# SysV /etc/install, /usr/sbin/install 29896# SunOS /usr/etc/install 29897# IRIX /sbin/install 29898# AIX /bin/install 29899# AmigaOS /C/install, which installs bootblocks on floppy discs 29900# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag 29901# AFS /usr/afsws/bin/install, which mishandles nonexistent args 29902# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" 29903# OS/2's system install, which has a completely different semantic 29904# ./install, which can be erroneously created by make from ./install.sh. 29905# Reject install programs that cannot install multiple files. 29906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 29907$as_echo_n "checking for a BSD-compatible install... " >&6; } 29908if test -z "$INSTALL"; then 29909if ${ac_cv_path_install+:} false; then : 29910 $as_echo_n "(cached) " >&6 29911else 29912 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 29913for as_dir in $PATH 29914do 29915 IFS=$as_save_IFS 29916 test -z "$as_dir" && as_dir=. 29917 # Account for people who put trailing slashes in PATH elements. 29918case $as_dir/ in #(( 29919 ./ | .// | /[cC]/* | \ 29920 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ 29921 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ 29922 /usr/ucb/* ) ;; 29923 *) 29924 # OSF1 and SCO ODT 3.0 have their own names for install. 29925 # Don't use installbsd from OSF since it installs stuff as root 29926 # by default. 29927 for ac_prog in ginstall scoinst install; do 29928 for ac_exec_ext in '' $ac_executable_extensions; do 29929 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then 29930 if test $ac_prog = install && 29931 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then 29932 # AIX install. It has an incompatible calling convention. 29933 : 29934 elif test $ac_prog = install && 29935 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then 29936 # program-specific install script used by HP pwplus--don't use. 29937 : 29938 else 29939 rm -rf conftest.one conftest.two conftest.dir 29940 echo one > conftest.one 29941 echo two > conftest.two 29942 mkdir conftest.dir 29943 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && 29944 test -s conftest.one && test -s conftest.two && 29945 test -s conftest.dir/conftest.one && 29946 test -s conftest.dir/conftest.two 29947 then 29948 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" 29949 break 3 29950 fi 29951 fi 29952 fi 29953 done 29954 done 29955 ;; 29956esac 29957 29958 done 29959IFS=$as_save_IFS 29960 29961rm -rf conftest.one conftest.two conftest.dir 29962 29963fi 29964 if test "${ac_cv_path_install+set}" = set; then 29965 INSTALL=$ac_cv_path_install 29966 else 29967 # As a last resort, use the slow shell script. Don't cache a 29968 # value for INSTALL within a source directory, because that will 29969 # break other packages using the cache if that directory is 29970 # removed, or if the value is a relative name. 29971 INSTALL=$ac_install_sh 29972 fi 29973fi 29974{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 29975$as_echo "$INSTALL" >&6; } 29976 29977# Use test -z because SunOS4 sh mishandles braces in ${var-val}. 29978# It thinks the first close brace ends the variable substitution. 29979test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' 29980 29981test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' 29982 29983test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' 29984 29985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 29986$as_echo_n "checking whether build environment is sane... " >&6; } 29987# Reject unsafe characters in $srcdir or the absolute working directory 29988# name. Accept space and tab only in the latter. 29989am_lf=' 29990' 29991case `pwd` in 29992 *[\\\"\#\$\&\'\`$am_lf]*) 29993 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; 29994esac 29995case $srcdir in 29996 *[\\\"\#\$\&\'\`$am_lf\ \ ]*) 29997 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; 29998esac 29999 30000# Do 'set' in a subshell so we don't clobber the current shell's 30001# arguments. Must try -L first in case configure is actually a 30002# symlink; some systems play weird games with the mod time of symlinks 30003# (eg FreeBSD returns the mod time of the symlink's containing 30004# directory). 30005if ( 30006 am_has_slept=no 30007 for am_try in 1 2; do 30008 echo "timestamp, slept: $am_has_slept" > conftest.file 30009 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 30010 if test "$*" = "X"; then 30011 # -L didn't work. 30012 set X `ls -t "$srcdir/configure" conftest.file` 30013 fi 30014 if test "$*" != "X $srcdir/configure conftest.file" \ 30015 && test "$*" != "X conftest.file $srcdir/configure"; then 30016 30017 # If neither matched, then we have a broken ls. This can happen 30018 # if, for instance, CONFIG_SHELL is bash and it inherits a 30019 # broken ls alias from the environment. This has actually 30020 # happened. Such a system could not be considered "sane". 30021 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken 30022 alias in your environment" "$LINENO" 5 30023 fi 30024 if test "$2" = conftest.file || test $am_try -eq 2; then 30025 break 30026 fi 30027 # Just in case. 30028 sleep 1 30029 am_has_slept=yes 30030 done 30031 test "$2" = conftest.file 30032 ) 30033then 30034 # Ok. 30035 : 30036else 30037 as_fn_error $? "newly created file is older than distributed files! 30038Check your system clock" "$LINENO" 5 30039fi 30040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 30041$as_echo "yes" >&6; } 30042# If we didn't sleep, we still need to ensure time stamps of config.status and 30043# generated files are strictly newer. 30044am_sleep_pid= 30045if grep 'slept: no' conftest.file >/dev/null 2>&1; then 30046 ( sleep 1 ) & 30047 am_sleep_pid=$! 30048fi 30049 30050rm -f conftest.file 30051 30052test "$program_prefix" != NONE && 30053 program_transform_name="s&^&$program_prefix&;$program_transform_name" 30054# Use a double $ so make ignores it. 30055test "$program_suffix" != NONE && 30056 program_transform_name="s&\$&$program_suffix&;$program_transform_name" 30057# Double any \ or $. 30058# By default was `s,x,x', remove it if useless. 30059ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' 30060program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` 30061 30062# Expand $ac_aux_dir to an absolute path. 30063am_aux_dir=`cd "$ac_aux_dir" && pwd` 30064 30065if test x"${MISSING+set}" != xset; then 30066 case $am_aux_dir in 30067 *\ * | *\ *) 30068 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 30069 *) 30070 MISSING="\${SHELL} $am_aux_dir/missing" ;; 30071 esac 30072fi 30073# Use eval to expand $SHELL 30074if eval "$MISSING --is-lightweight"; then 30075 am_missing_run="$MISSING " 30076else 30077 am_missing_run= 30078 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 30079$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} 30080fi 30081 30082if test x"${install_sh+set}" != xset; then 30083 case $am_aux_dir in 30084 *\ * | *\ *) 30085 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 30086 *) 30087 install_sh="\${SHELL} $am_aux_dir/install-sh" 30088 esac 30089fi 30090 30091# Installed binaries are usually stripped using 'strip' when the user 30092# run "make install-strip". However 'strip' might not be the right 30093# tool to use in cross-compilation environments, therefore Automake 30094# will honor the 'STRIP' environment variable to overrule this program. 30095if test "$cross_compiling" != no; then 30096 if test -n "$ac_tool_prefix"; then 30097 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. 30098set dummy ${ac_tool_prefix}strip; ac_word=$2 30099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 30100$as_echo_n "checking for $ac_word... " >&6; } 30101if ${ac_cv_prog_STRIP+:} false; then : 30102 $as_echo_n "(cached) " >&6 30103else 30104 if test -n "$STRIP"; then 30105 ac_cv_prog_STRIP="$STRIP" # Let the user override the test. 30106else 30107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 30108for as_dir in $PATH 30109do 30110 IFS=$as_save_IFS 30111 test -z "$as_dir" && as_dir=. 30112 for ac_exec_ext in '' $ac_executable_extensions; do 30113 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 30114 ac_cv_prog_STRIP="${ac_tool_prefix}strip" 30115 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 30116 break 2 30117 fi 30118done 30119 done 30120IFS=$as_save_IFS 30121 30122fi 30123fi 30124STRIP=$ac_cv_prog_STRIP 30125if test -n "$STRIP"; then 30126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 30127$as_echo "$STRIP" >&6; } 30128else 30129 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 30130$as_echo "no" >&6; } 30131fi 30132 30133 30134fi 30135if test -z "$ac_cv_prog_STRIP"; then 30136 ac_ct_STRIP=$STRIP 30137 # Extract the first word of "strip", so it can be a program name with args. 30138set dummy strip; ac_word=$2 30139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 30140$as_echo_n "checking for $ac_word... " >&6; } 30141if ${ac_cv_prog_ac_ct_STRIP+:} false; then : 30142 $as_echo_n "(cached) " >&6 30143else 30144 if test -n "$ac_ct_STRIP"; then 30145 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. 30146else 30147as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 30148for as_dir in $PATH 30149do 30150 IFS=$as_save_IFS 30151 test -z "$as_dir" && as_dir=. 30152 for ac_exec_ext in '' $ac_executable_extensions; do 30153 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 30154 ac_cv_prog_ac_ct_STRIP="strip" 30155 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 30156 break 2 30157 fi 30158done 30159 done 30160IFS=$as_save_IFS 30161 30162fi 30163fi 30164ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP 30165if test -n "$ac_ct_STRIP"; then 30166 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 30167$as_echo "$ac_ct_STRIP" >&6; } 30168else 30169 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 30170$as_echo "no" >&6; } 30171fi 30172 30173 if test "x$ac_ct_STRIP" = x; then 30174 STRIP=":" 30175 else 30176 case $cross_compiling:$ac_tool_warned in 30177yes:) 30178{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 30179$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 30180ac_tool_warned=yes ;; 30181esac 30182 STRIP=$ac_ct_STRIP 30183 fi 30184else 30185 STRIP="$ac_cv_prog_STRIP" 30186fi 30187 30188fi 30189INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 30190 30191for ac_prog in gawk mawk nawk awk 30192do 30193 # Extract the first word of "$ac_prog", so it can be a program name with args. 30194set dummy $ac_prog; ac_word=$2 30195{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 30196$as_echo_n "checking for $ac_word... " >&6; } 30197if ${ac_cv_prog_AWK+:} false; then : 30198 $as_echo_n "(cached) " >&6 30199else 30200 if test -n "$AWK"; then 30201 ac_cv_prog_AWK="$AWK" # Let the user override the test. 30202else 30203as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 30204for as_dir in $PATH 30205do 30206 IFS=$as_save_IFS 30207 test -z "$as_dir" && as_dir=. 30208 for ac_exec_ext in '' $ac_executable_extensions; do 30209 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 30210 ac_cv_prog_AWK="$ac_prog" 30211 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 30212 break 2 30213 fi 30214done 30215 done 30216IFS=$as_save_IFS 30217 30218fi 30219fi 30220AWK=$ac_cv_prog_AWK 30221if test -n "$AWK"; then 30222 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 30223$as_echo "$AWK" >&6; } 30224else 30225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 30226$as_echo "no" >&6; } 30227fi 30228 30229 30230 test -n "$AWK" && break 30231done 30232 30233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 30234$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } 30235set x ${MAKE-make} 30236ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` 30237if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : 30238 $as_echo_n "(cached) " >&6 30239else 30240 cat >conftest.make <<\_ACEOF 30241SHELL = /bin/sh 30242all: 30243 @echo '@@@%%%=$(MAKE)=@@@%%%' 30244_ACEOF 30245# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. 30246case `${MAKE-make} -f conftest.make 2>/dev/null` in 30247 *@@@%%%=?*=@@@%%%*) 30248 eval ac_cv_prog_make_${ac_make}_set=yes;; 30249 *) 30250 eval ac_cv_prog_make_${ac_make}_set=no;; 30251esac 30252rm -f conftest.make 30253fi 30254if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then 30255 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 30256$as_echo "yes" >&6; } 30257 SET_MAKE= 30258else 30259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 30260$as_echo "no" >&6; } 30261 SET_MAKE="MAKE=${MAKE-make}" 30262fi 30263 30264rm -rf .tst 2>/dev/null 30265mkdir .tst 2>/dev/null 30266if test -d .tst; then 30267 am__leading_dot=. 30268else 30269 am__leading_dot=_ 30270fi 30271rmdir .tst 2>/dev/null 30272 30273DEPDIR="${am__leading_dot}deps" 30274 30275ac_config_commands="$ac_config_commands depfiles" 30276 30277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} supports the include directive" >&5 30278$as_echo_n "checking whether ${MAKE-make} supports the include directive... " >&6; } 30279cat > confinc.mk << 'END' 30280am__doit: 30281 @echo this is the am__doit target >confinc.out 30282.PHONY: am__doit 30283END 30284am__include="#" 30285am__quote= 30286# BSD make does it like this. 30287echo '.include "confinc.mk" # ignored' > confmf.BSD 30288# Other make implementations (GNU, Solaris 10, AIX) do it like this. 30289echo 'include confinc.mk # ignored' > confmf.GNU 30290_am_result=no 30291for s in GNU BSD; do 30292 { echo "$as_me:$LINENO: ${MAKE-make} -f confmf.$s && cat confinc.out" >&5 30293 (${MAKE-make} -f confmf.$s && cat confinc.out) >&5 2>&5 30294 ac_status=$? 30295 echo "$as_me:$LINENO: \$? = $ac_status" >&5 30296 (exit $ac_status); } 30297 case $?:`cat confinc.out 2>/dev/null` in #( 30298 '0:this is the am__doit target') : 30299 case $s in #( 30300 BSD) : 30301 am__include='.include' am__quote='"' ;; #( 30302 *) : 30303 am__include='include' am__quote='' ;; 30304esac ;; #( 30305 *) : 30306 ;; 30307esac 30308 if test "$am__include" != "#"; then 30309 _am_result="yes ($s style)" 30310 break 30311 fi 30312done 30313rm -f confinc.* confmf.* 30314{ $as_echo "$as_me:${as_lineno-$LINENO}: result: ${_am_result}" >&5 30315$as_echo "${_am_result}" >&6; } 30316 30317# Check whether --enable-dependency-tracking was given. 30318if test "${enable_dependency_tracking+set}" = set; then : 30319 enableval=$enable_dependency_tracking; 30320fi 30321 30322if test "x$enable_dependency_tracking" != xno; then 30323 am_depcomp="$ac_aux_dir/depcomp" 30324 AMDEPBACKSLASH='\' 30325 am__nodep='_no' 30326fi 30327 if test "x$enable_dependency_tracking" != xno; then 30328 AMDEP_TRUE= 30329 AMDEP_FALSE='#' 30330else 30331 AMDEP_TRUE='#' 30332 AMDEP_FALSE= 30333fi 30334 30335 30336# Check whether --enable-silent-rules was given. 30337if test "${enable_silent_rules+set}" = set; then : 30338 enableval=$enable_silent_rules; 30339fi 30340 30341case $enable_silent_rules in # ((( 30342 yes) AM_DEFAULT_VERBOSITY=0;; 30343 no) AM_DEFAULT_VERBOSITY=1;; 30344 *) AM_DEFAULT_VERBOSITY=1;; 30345esac 30346am_make=${MAKE-make} 30347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 30348$as_echo_n "checking whether $am_make supports nested variables... " >&6; } 30349if ${am_cv_make_support_nested_variables+:} false; then : 30350 $as_echo_n "(cached) " >&6 30351else 30352 if $as_echo 'TRUE=$(BAR$(V)) 30353BAR0=false 30354BAR1=true 30355V=1 30356am__doit: 30357 @$(TRUE) 30358.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then 30359 am_cv_make_support_nested_variables=yes 30360else 30361 am_cv_make_support_nested_variables=no 30362fi 30363fi 30364{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 30365$as_echo "$am_cv_make_support_nested_variables" >&6; } 30366if test $am_cv_make_support_nested_variables = yes; then 30367 AM_V='$(V)' 30368 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 30369else 30370 AM_V=$AM_DEFAULT_VERBOSITY 30371 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 30372fi 30373AM_BACKSLASH='\' 30374 30375if test "`cd $srcdir && pwd`" != "`pwd`"; then 30376 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 30377 # is not polluted with repeated "-I." 30378 am__isrc=' -I$(srcdir)' 30379 # test to see if srcdir already configured 30380 if test -f $srcdir/config.status; then 30381 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 30382 fi 30383fi 30384 30385# test whether we have cygpath 30386if test -z "$CYGPATH_W"; then 30387 if (cygpath --version) >/dev/null 2>/dev/null; then 30388 CYGPATH_W='cygpath -w' 30389 else 30390 CYGPATH_W=echo 30391 fi 30392fi 30393 30394 30395# Define the identity of the package. 30396 PACKAGE='libgnu' 30397 VERSION='UNUSED-VERSION' 30398 30399 30400# Some tools Automake needs. 30401 30402ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} 30403 30404 30405AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} 30406 30407 30408AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} 30409 30410 30411AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} 30412 30413 30414MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} 30415 30416# For better backward compatibility. To be removed once Automake 1.9.x 30417# dies out for good. For more background, see: 30418# <https://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 30419# <https://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 30420mkdir_p='$(MKDIR_P)' 30421 30422# We need awk for the "check" target (and possibly the TAP driver). The 30423# system "awk" is bad on some platforms. 30424# Always define AMTAR for backward compatibility. Yes, it's still used 30425# in the wild :-( We should find a proper way to deprecate it ... 30426AMTAR='$${TAR-tar}' 30427 30428 30429# We'll loop over all known methods to create a tar archive until one works. 30430_am_tools='gnutar pax cpio none' 30431 30432am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' 30433 30434 30435 30436 30437 30438depcc="$CC" am_compiler_list= 30439 30440{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 30441$as_echo_n "checking dependency style of $depcc... " >&6; } 30442if ${am_cv_CC_dependencies_compiler_type+:} false; then : 30443 $as_echo_n "(cached) " >&6 30444else 30445 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 30446 # We make a subdir and do the tests there. Otherwise we can end up 30447 # making bogus files that we don't know about and never remove. For 30448 # instance it was reported that on HP-UX the gcc test will end up 30449 # making a dummy file named 'D' -- because '-MD' means "put the output 30450 # in D". 30451 rm -rf conftest.dir 30452 mkdir conftest.dir 30453 # Copy depcomp to subdir because otherwise we won't find it if we're 30454 # using a relative directory. 30455 cp "$am_depcomp" conftest.dir 30456 cd conftest.dir 30457 # We will build objects and dependencies in a subdirectory because 30458 # it helps to detect inapplicable dependency modes. For instance 30459 # both Tru64's cc and ICC support -MD to output dependencies as a 30460 # side effect of compilation, but ICC will put the dependencies in 30461 # the current directory while Tru64 will put them in the object 30462 # directory. 30463 mkdir sub 30464 30465 am_cv_CC_dependencies_compiler_type=none 30466 if test "$am_compiler_list" = ""; then 30467 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` 30468 fi 30469 am__universal=false 30470 case " $depcc " in #( 30471 *\ -arch\ *\ -arch\ *) am__universal=true ;; 30472 esac 30473 30474 for depmode in $am_compiler_list; do 30475 # Setup a source with many dependencies, because some compilers 30476 # like to wrap large dependency lists on column 80 (with \), and 30477 # we should not choose a depcomp mode which is confused by this. 30478 # 30479 # We need to recreate these files for each test, as the compiler may 30480 # overwrite some of them when testing with obscure command lines. 30481 # This happens at least with the AIX C compiler. 30482 : > sub/conftest.c 30483 for i in 1 2 3 4 5 6; do 30484 echo '#include "conftst'$i'.h"' >> sub/conftest.c 30485 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 30486 # Solaris 10 /bin/sh. 30487 echo '/* dummy */' > sub/conftst$i.h 30488 done 30489 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 30490 30491 # We check with '-c' and '-o' for the sake of the "dashmstdout" 30492 # mode. It turns out that the SunPro C++ compiler does not properly 30493 # handle '-M -o', and we need to detect this. Also, some Intel 30494 # versions had trouble with output in subdirs. 30495 am__obj=sub/conftest.${OBJEXT-o} 30496 am__minus_obj="-o $am__obj" 30497 case $depmode in 30498 gcc) 30499 # This depmode causes a compiler race in universal mode. 30500 test "$am__universal" = false || continue 30501 ;; 30502 nosideeffect) 30503 # After this tag, mechanisms are not by side-effect, so they'll 30504 # only be used when explicitly requested. 30505 if test "x$enable_dependency_tracking" = xyes; then 30506 continue 30507 else 30508 break 30509 fi 30510 ;; 30511 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 30512 # This compiler won't grok '-c -o', but also, the minuso test has 30513 # not run yet. These depmodes are late enough in the game, and 30514 # so weak that their functioning should not be impacted. 30515 am__obj=conftest.${OBJEXT-o} 30516 am__minus_obj= 30517 ;; 30518 none) break ;; 30519 esac 30520 if depmode=$depmode \ 30521 source=sub/conftest.c object=$am__obj \ 30522 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 30523 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 30524 >/dev/null 2>conftest.err && 30525 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 30526 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 30527 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 30528 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 30529 # icc doesn't choke on unknown options, it will just issue warnings 30530 # or remarks (even with -Werror). So we grep stderr for any message 30531 # that says an option was ignored or not supported. 30532 # When given -MP, icc 7.0 and 7.1 complain thusly: 30533 # icc: Command line warning: ignoring option '-M'; no argument required 30534 # The diagnosis changed in icc 8.0: 30535 # icc: Command line remark: option '-MP' not supported 30536 if (grep 'ignoring option' conftest.err || 30537 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 30538 am_cv_CC_dependencies_compiler_type=$depmode 30539 break 30540 fi 30541 fi 30542 done 30543 30544 cd .. 30545 rm -rf conftest.dir 30546else 30547 am_cv_CC_dependencies_compiler_type=none 30548fi 30549 30550fi 30551{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 30552$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } 30553CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type 30554 30555 if 30556 test "x$enable_dependency_tracking" != xno \ 30557 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then 30558 am__fastdepCC_TRUE= 30559 am__fastdepCC_FALSE='#' 30560else 30561 am__fastdepCC_TRUE='#' 30562 am__fastdepCC_FALSE= 30563fi 30564 30565 30566 30567# POSIX will say in a future version that running "rm -f" with no argument 30568# is OK; and we want to be able to make that assumption in our Makefile 30569# recipes. So use an aggressive probe to check that the usage we want is 30570# actually supported "in the wild" to an acceptable degree. 30571# See automake bug#10828. 30572# To make any issue more visible, cause the running configure to be aborted 30573# by default if the 'rm' program in use doesn't match our expectations; the 30574# user can still override this though. 30575if rm -f && rm -fr && rm -rf; then : OK; else 30576 cat >&2 <<'END' 30577Oops! 30578 30579Your 'rm' program seems unable to run without file operands specified 30580on the command line, even when the '-f' option is present. This is contrary 30581to the behaviour of most rm programs out there, and not conforming with 30582the upcoming POSIX standard: <http://austingroupbugs.net/view.php?id=542> 30583 30584Please tell bug-automake@gnu.org about your system, including the value 30585of your $PATH and any error possibly output before this message. This 30586can help us improve future automake versions. 30587 30588END 30589 if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then 30590 echo 'Configuration will proceed anyway, since you have set the' >&2 30591 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 30592 echo >&2 30593 else 30594 cat >&2 <<'END' 30595Aborting the configuration process, to ensure you take notice of the issue. 30596 30597You can download and install GNU coreutils to get an 'rm' implementation 30598that behaves properly: <https://www.gnu.org/software/coreutils/>. 30599 30600If you want to complete the configuration process using your problematic 30601'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM 30602to "yes", and re-run configure. 30603 30604END 30605 as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 30606 fi 30607fi 30608 30609 30610# Check whether --enable-silent-rules was given. 30611if test "${enable_silent_rules+set}" = set; then : 30612 enableval=$enable_silent_rules; 30613fi 30614 30615case $enable_silent_rules in # ((( 30616 yes) AM_DEFAULT_VERBOSITY=0;; 30617 no) AM_DEFAULT_VERBOSITY=1;; 30618 *) AM_DEFAULT_VERBOSITY=0;; 30619esac 30620am_make=${MAKE-make} 30621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 30622$as_echo_n "checking whether $am_make supports nested variables... " >&6; } 30623if ${am_cv_make_support_nested_variables+:} false; then : 30624 $as_echo_n "(cached) " >&6 30625else 30626 if $as_echo 'TRUE=$(BAR$(V)) 30627BAR0=false 30628BAR1=true 30629V=1 30630am__doit: 30631 @$(TRUE) 30632.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then 30633 am_cv_make_support_nested_variables=yes 30634else 30635 am_cv_make_support_nested_variables=no 30636fi 30637fi 30638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 30639$as_echo "$am_cv_make_support_nested_variables" >&6; } 30640if test $am_cv_make_support_nested_variables = yes; then 30641 AM_V='$(V)' 30642 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 30643else 30644 AM_V=$AM_DEFAULT_VERBOSITY 30645 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 30646fi 30647AM_BACKSLASH='\' 30648 30649 30650# --------------------- # 30651# Checks for programs. # 30652# --------------------- # 30653 30654 30655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 30656$as_echo_n "checking whether ln -s works... " >&6; } 30657LN_S=$as_ln_s 30658if test "$LN_S" = "ln -s"; then 30659 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 30660$as_echo "yes" >&6; } 30661else 30662 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 30663$as_echo "no, using $LN_S" >&6; } 30664fi 30665 30666if test -n "$ac_tool_prefix"; then 30667 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. 30668set dummy ${ac_tool_prefix}ranlib; ac_word=$2 30669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 30670$as_echo_n "checking for $ac_word... " >&6; } 30671if ${ac_cv_prog_RANLIB+:} false; then : 30672 $as_echo_n "(cached) " >&6 30673else 30674 if test -n "$RANLIB"; then 30675 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 30676else 30677as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 30678for as_dir in $PATH 30679do 30680 IFS=$as_save_IFS 30681 test -z "$as_dir" && as_dir=. 30682 for ac_exec_ext in '' $ac_executable_extensions; do 30683 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 30684 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" 30685 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 30686 break 2 30687 fi 30688done 30689 done 30690IFS=$as_save_IFS 30691 30692fi 30693fi 30694RANLIB=$ac_cv_prog_RANLIB 30695if test -n "$RANLIB"; then 30696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 30697$as_echo "$RANLIB" >&6; } 30698else 30699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 30700$as_echo "no" >&6; } 30701fi 30702 30703 30704fi 30705if test -z "$ac_cv_prog_RANLIB"; then 30706 ac_ct_RANLIB=$RANLIB 30707 # Extract the first word of "ranlib", so it can be a program name with args. 30708set dummy ranlib; ac_word=$2 30709{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 30710$as_echo_n "checking for $ac_word... " >&6; } 30711if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : 30712 $as_echo_n "(cached) " >&6 30713else 30714 if test -n "$ac_ct_RANLIB"; then 30715 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. 30716else 30717as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 30718for as_dir in $PATH 30719do 30720 IFS=$as_save_IFS 30721 test -z "$as_dir" && as_dir=. 30722 for ac_exec_ext in '' $ac_executable_extensions; do 30723 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 30724 ac_cv_prog_ac_ct_RANLIB="ranlib" 30725 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 30726 break 2 30727 fi 30728done 30729 done 30730IFS=$as_save_IFS 30731 30732fi 30733fi 30734ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB 30735if test -n "$ac_ct_RANLIB"; then 30736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 30737$as_echo "$ac_ct_RANLIB" >&6; } 30738else 30739 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 30740$as_echo "no" >&6; } 30741fi 30742 30743 if test "x$ac_ct_RANLIB" = x; then 30744 RANLIB=":" 30745 else 30746 case $cross_compiling:$ac_tool_warned in 30747yes:) 30748{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 30749$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 30750ac_tool_warned=yes ;; 30751esac 30752 RANLIB=$ac_ct_RANLIB 30753 fi 30754else 30755 RANLIB="$ac_cv_prog_RANLIB" 30756fi 30757 30758 30759if test -n "$ac_tool_prefix"; then 30760 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. 30761set dummy ${ac_tool_prefix}ar; ac_word=$2 30762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 30763$as_echo_n "checking for $ac_word... " >&6; } 30764if ${ac_cv_prog_AR+:} false; then : 30765 $as_echo_n "(cached) " >&6 30766else 30767 if test -n "$AR"; then 30768 ac_cv_prog_AR="$AR" # Let the user override the test. 30769else 30770as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 30771for as_dir in $PATH 30772do 30773 IFS=$as_save_IFS 30774 test -z "$as_dir" && as_dir=. 30775 for ac_exec_ext in '' $ac_executable_extensions; do 30776 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 30777 ac_cv_prog_AR="${ac_tool_prefix}ar" 30778 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 30779 break 2 30780 fi 30781done 30782 done 30783IFS=$as_save_IFS 30784 30785fi 30786fi 30787AR=$ac_cv_prog_AR 30788if test -n "$AR"; then 30789 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 30790$as_echo "$AR" >&6; } 30791else 30792 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 30793$as_echo "no" >&6; } 30794fi 30795 30796 30797fi 30798if test -z "$ac_cv_prog_AR"; then 30799 ac_ct_AR=$AR 30800 # Extract the first word of "ar", so it can be a program name with args. 30801set dummy ar; ac_word=$2 30802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 30803$as_echo_n "checking for $ac_word... " >&6; } 30804if ${ac_cv_prog_ac_ct_AR+:} false; then : 30805 $as_echo_n "(cached) " >&6 30806else 30807 if test -n "$ac_ct_AR"; then 30808 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. 30809else 30810as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 30811for as_dir in $PATH 30812do 30813 IFS=$as_save_IFS 30814 test -z "$as_dir" && as_dir=. 30815 for ac_exec_ext in '' $ac_executable_extensions; do 30816 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 30817 ac_cv_prog_ac_ct_AR="ar" 30818 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 30819 break 2 30820 fi 30821done 30822 done 30823IFS=$as_save_IFS 30824 30825fi 30826fi 30827ac_ct_AR=$ac_cv_prog_ac_ct_AR 30828if test -n "$ac_ct_AR"; then 30829 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 30830$as_echo "$ac_ct_AR" >&6; } 30831else 30832 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 30833$as_echo "no" >&6; } 30834fi 30835 30836 if test "x$ac_ct_AR" = x; then 30837 AR="" 30838 else 30839 case $cross_compiling:$ac_tool_warned in 30840yes:) 30841{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 30842$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 30843ac_tool_warned=yes ;; 30844esac 30845 AR=$ac_ct_AR 30846 fi 30847else 30848 AR="$ac_cv_prog_AR" 30849fi 30850 30851 30852# ---------------------- # 30853# Checks for libraries. # 30854# ---------------------- # 30855 30856ac_config_files="$ac_config_files Makefile import/Makefile" 30857 30858ac_config_commands="$ac_config_commands default" 30859 30860cat >confcache <<\_ACEOF 30861# This file is a shell script that caches the results of configure 30862# tests run on this system so they can be shared between configure 30863# scripts and configure runs, see configure's option --config-cache. 30864# It is not useful on other systems. If it contains results you don't 30865# want to keep, you may remove or edit it. 30866# 30867# config.status only pays attention to the cache file if you give it 30868# the --recheck option to rerun configure. 30869# 30870# `ac_cv_env_foo' variables (set or unset) will be overridden when 30871# loading this file, other *unset* `ac_cv_foo' will be assigned the 30872# following values. 30873 30874_ACEOF 30875 30876# The following way of writing the cache mishandles newlines in values, 30877# but we know of no workaround that is simple, portable, and efficient. 30878# So, we kill variables containing newlines. 30879# Ultrix sh set writes to stderr and can't be redirected directly, 30880# and sets the high bit in the cache file unless we assign to the vars. 30881( 30882 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do 30883 eval ac_val=\$$ac_var 30884 case $ac_val in #( 30885 *${as_nl}*) 30886 case $ac_var in #( 30887 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 30888$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 30889 esac 30890 case $ac_var in #( 30891 _ | IFS | as_nl) ;; #( 30892 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 30893 *) { eval $ac_var=; unset $ac_var;} ;; 30894 esac ;; 30895 esac 30896 done 30897 30898 (set) 2>&1 | 30899 case $as_nl`(ac_space=' '; set) 2>&1` in #( 30900 *${as_nl}ac_space=\ *) 30901 # `set' does not quote correctly, so add quotes: double-quote 30902 # substitution turns \\\\ into \\, and sed turns \\ into \. 30903 sed -n \ 30904 "s/'/'\\\\''/g; 30905 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" 30906 ;; #( 30907 *) 30908 # `set' quotes correctly as required by POSIX, so do not add quotes. 30909 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 30910 ;; 30911 esac | 30912 sort 30913) | 30914 sed ' 30915 /^ac_cv_env_/b end 30916 t clear 30917 :clear 30918 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ 30919 t end 30920 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ 30921 :end' >>confcache 30922if diff "$cache_file" confcache >/dev/null 2>&1; then :; else 30923 if test -w "$cache_file"; then 30924 if test "x$cache_file" != "x/dev/null"; then 30925 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 30926$as_echo "$as_me: updating cache $cache_file" >&6;} 30927 if test ! -f "$cache_file" || test -h "$cache_file"; then 30928 cat confcache >"$cache_file" 30929 else 30930 case $cache_file in #( 30931 */* | ?:*) 30932 mv -f confcache "$cache_file"$$ && 30933 mv -f "$cache_file"$$ "$cache_file" ;; #( 30934 *) 30935 mv -f confcache "$cache_file" ;; 30936 esac 30937 fi 30938 fi 30939 else 30940 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 30941$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 30942 fi 30943fi 30944rm -f confcache 30945 30946test "x$prefix" = xNONE && prefix=$ac_default_prefix 30947# Let make expand exec_prefix. 30948test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 30949 30950DEFS=-DHAVE_CONFIG_H 30951 30952ac_libobjs= 30953ac_ltlibobjs= 30954for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 30955 # 1. Remove the extension, and $U if already installed. 30956 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 30957 ac_i=`$as_echo "$ac_i" | sed "$ac_script"` 30958 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR 30959 # will be set to the directory where LIBOBJS objects are built. 30960 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" 30961 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' 30962done 30963LIBOBJS=$ac_libobjs 30964 30965LTLIBOBJS=$ac_ltlibobjs 30966 30967 30968if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then 30969 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. 30970Usually this means the macro was only invoked conditionally." "$LINENO" 5 30971fi 30972if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then 30973 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined. 30974Usually this means the macro was only invoked conditionally." "$LINENO" 5 30975fi 30976if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then 30977 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined. 30978Usually this means the macro was only invoked conditionally." "$LINENO" 5 30979fi 30980if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then 30981 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined. 30982Usually this means the macro was only invoked conditionally." "$LINENO" 5 30983fi 30984if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then 30985 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined. 30986Usually this means the macro was only invoked conditionally." "$LINENO" 5 30987fi 30988if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then 30989 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined. 30990Usually this means the macro was only invoked conditionally." "$LINENO" 5 30991fi 30992if test -z "${GL_GENERATE_FNMATCH_H_TRUE}" && test -z "${GL_GENERATE_FNMATCH_H_FALSE}"; then 30993 as_fn_error $? "conditional \"GL_GENERATE_FNMATCH_H\" was never defined. 30994Usually this means the macro was only invoked conditionally." "$LINENO" 5 30995fi 30996if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then 30997 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined. 30998Usually this means the macro was only invoked conditionally." "$LINENO" 5 30999fi 31000if test -z "${GL_GENERATE_GLOB_H_TRUE}" && test -z "${GL_GENERATE_GLOB_H_FALSE}"; then 31001 as_fn_error $? "conditional \"GL_GENERATE_GLOB_H\" was never defined. 31002Usually this means the macro was only invoked conditionally." "$LINENO" 5 31003fi 31004if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then 31005 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined. 31006Usually this means the macro was only invoked conditionally." "$LINENO" 5 31007fi 31008if test -z "${GL_GENERATE_LIMITS_H_TRUE}" && test -z "${GL_GENERATE_LIMITS_H_FALSE}"; then 31009 as_fn_error $? "conditional \"GL_GENERATE_LIMITS_H\" was never defined. 31010Usually this means the macro was only invoked conditionally." "$LINENO" 5 31011fi 31012if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then 31013 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined. 31014Usually this means the macro was only invoked conditionally." "$LINENO" 5 31015fi 31016 31017 31018if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then 31019 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined. 31020Usually this means the macro was only invoked conditionally." "$LINENO" 5 31021fi 31022if test -z "${GL_GENERATE_NETINET_IN_H_TRUE}" && test -z "${GL_GENERATE_NETINET_IN_H_FALSE}"; then 31023 as_fn_error $? "conditional \"GL_GENERATE_NETINET_IN_H\" was never defined. 31024Usually this means the macro was only invoked conditionally." "$LINENO" 5 31025fi 31026if test -z "${GL_GENERATE_STDALIGN_H_TRUE}" && test -z "${GL_GENERATE_STDALIGN_H_FALSE}"; then 31027 as_fn_error $? "conditional \"GL_GENERATE_STDALIGN_H\" was never defined. 31028Usually this means the macro was only invoked conditionally." "$LINENO" 5 31029fi 31030if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then 31031 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined. 31032Usually this means the macro was only invoked conditionally." "$LINENO" 5 31033fi 31034if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then 31035 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined. 31036Usually this means the macro was only invoked conditionally." "$LINENO" 5 31037fi 31038 31039 gl_libobjs= 31040 gl_ltlibobjs= 31041 if test -n "$gl_LIBOBJS"; then 31042 # Remove the extension. 31043 sed_drop_objext='s/\.o$//;s/\.obj$//' 31044 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do 31045 gl_libobjs="$gl_libobjs $i.$ac_objext" 31046 gl_ltlibobjs="$gl_ltlibobjs $i.lo" 31047 done 31048 fi 31049 gl_LIBOBJS=$gl_libobjs 31050 31051 gl_LTLIBOBJS=$gl_ltlibobjs 31052 31053 31054 31055 gltests_libobjs= 31056 gltests_ltlibobjs= 31057 if test -n "$gltests_LIBOBJS"; then 31058 # Remove the extension. 31059 sed_drop_objext='s/\.o$//;s/\.obj$//' 31060 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do 31061 gltests_libobjs="$gltests_libobjs $i.$ac_objext" 31062 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" 31063 done 31064 fi 31065 gltests_LIBOBJS=$gltests_libobjs 31066 31067 gltests_LTLIBOBJS=$gltests_ltlibobjs 31068 31069 31070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 31071$as_echo_n "checking that generated files are newer than configure... " >&6; } 31072 if test -n "$am_sleep_pid"; then 31073 # Hide warnings about reused PIDs. 31074 wait $am_sleep_pid 2>/dev/null 31075 fi 31076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 31077$as_echo "done" >&6; } 31078if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then 31079 as_fn_error $? "conditional \"AMDEP\" was never defined. 31080Usually this means the macro was only invoked conditionally." "$LINENO" 5 31081fi 31082if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then 31083 as_fn_error $? "conditional \"am__fastdepCC\" was never defined. 31084Usually this means the macro was only invoked conditionally." "$LINENO" 5 31085fi 31086 if test -n "$EXEEXT"; then 31087 am__EXEEXT_TRUE= 31088 am__EXEEXT_FALSE='#' 31089else 31090 am__EXEEXT_TRUE='#' 31091 am__EXEEXT_FALSE= 31092fi 31093 31094 31095: "${CONFIG_STATUS=./config.status}" 31096ac_write_fail=0 31097ac_clean_files_save=$ac_clean_files 31098ac_clean_files="$ac_clean_files $CONFIG_STATUS" 31099{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 31100$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} 31101as_write_fail=0 31102cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 31103#! $SHELL 31104# Generated by $as_me. 31105# Run this file to recreate the current configuration. 31106# Compiler output produced by configure, useful for debugging 31107# configure, is in config.log if it exists. 31108 31109debug=false 31110ac_cs_recheck=false 31111ac_cs_silent=false 31112 31113SHELL=\${CONFIG_SHELL-$SHELL} 31114export SHELL 31115_ASEOF 31116cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 31117## -------------------- ## 31118## M4sh Initialization. ## 31119## -------------------- ## 31120 31121# Be more Bourne compatible 31122DUALCASE=1; export DUALCASE # for MKS sh 31123if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 31124 emulate sh 31125 NULLCMD=: 31126 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 31127 # is contrary to our usage. Disable this feature. 31128 alias -g '${1+"$@"}'='"$@"' 31129 setopt NO_GLOB_SUBST 31130else 31131 case `(set -o) 2>/dev/null` in #( 31132 *posix*) : 31133 set -o posix ;; #( 31134 *) : 31135 ;; 31136esac 31137fi 31138 31139 31140as_nl=' 31141' 31142export as_nl 31143# Printing a long string crashes Solaris 7 /usr/bin/printf. 31144as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 31145as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 31146as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 31147# Prefer a ksh shell builtin over an external printf program on Solaris, 31148# but without wasting forks for bash or zsh. 31149if test -z "$BASH_VERSION$ZSH_VERSION" \ 31150 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 31151 as_echo='print -r --' 31152 as_echo_n='print -rn --' 31153elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 31154 as_echo='printf %s\n' 31155 as_echo_n='printf %s' 31156else 31157 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 31158 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 31159 as_echo_n='/usr/ucb/echo -n' 31160 else 31161 as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 31162 as_echo_n_body='eval 31163 arg=$1; 31164 case $arg in #( 31165 *"$as_nl"*) 31166 expr "X$arg" : "X\\(.*\\)$as_nl"; 31167 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 31168 esac; 31169 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 31170 ' 31171 export as_echo_n_body 31172 as_echo_n='sh -c $as_echo_n_body as_echo' 31173 fi 31174 export as_echo_body 31175 as_echo='sh -c $as_echo_body as_echo' 31176fi 31177 31178# The user is always right. 31179if test "${PATH_SEPARATOR+set}" != set; then 31180 PATH_SEPARATOR=: 31181 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 31182 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 31183 PATH_SEPARATOR=';' 31184 } 31185fi 31186 31187 31188# IFS 31189# We need space, tab and new line, in precisely that order. Quoting is 31190# there to prevent editors from complaining about space-tab. 31191# (If _AS_PATH_WALK were called with IFS unset, it would disable word 31192# splitting by setting IFS to empty value.) 31193IFS=" "" $as_nl" 31194 31195# Find who we are. Look in the path if we contain no directory separator. 31196as_myself= 31197case $0 in #(( 31198 *[\\/]* ) as_myself=$0 ;; 31199 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 31200for as_dir in $PATH 31201do 31202 IFS=$as_save_IFS 31203 test -z "$as_dir" && as_dir=. 31204 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 31205 done 31206IFS=$as_save_IFS 31207 31208 ;; 31209esac 31210# We did not find ourselves, most probably we were run as `sh COMMAND' 31211# in which case we are not to be found in the path. 31212if test "x$as_myself" = x; then 31213 as_myself=$0 31214fi 31215if test ! -f "$as_myself"; then 31216 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 31217 exit 1 31218fi 31219 31220# Unset variables that we do not need and which cause bugs (e.g. in 31221# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 31222# suppresses any "Segmentation fault" message there. '((' could 31223# trigger a bug in pdksh 5.2.14. 31224for as_var in BASH_ENV ENV MAIL MAILPATH 31225do eval test x\${$as_var+set} = xset \ 31226 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 31227done 31228PS1='$ ' 31229PS2='> ' 31230PS4='+ ' 31231 31232# NLS nuisances. 31233LC_ALL=C 31234export LC_ALL 31235LANGUAGE=C 31236export LANGUAGE 31237 31238# CDPATH. 31239(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 31240 31241 31242# as_fn_error STATUS ERROR [LINENO LOG_FD] 31243# ---------------------------------------- 31244# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 31245# provided, also output the error to LOG_FD, referencing LINENO. Then exit the 31246# script with STATUS, using 1 if that was 0. 31247as_fn_error () 31248{ 31249 as_status=$1; test $as_status -eq 0 && as_status=1 31250 if test "$4"; then 31251 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 31252 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 31253 fi 31254 $as_echo "$as_me: error: $2" >&2 31255 as_fn_exit $as_status 31256} # as_fn_error 31257 31258 31259# as_fn_set_status STATUS 31260# ----------------------- 31261# Set $? to STATUS, without forking. 31262as_fn_set_status () 31263{ 31264 return $1 31265} # as_fn_set_status 31266 31267# as_fn_exit STATUS 31268# ----------------- 31269# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 31270as_fn_exit () 31271{ 31272 set +e 31273 as_fn_set_status $1 31274 exit $1 31275} # as_fn_exit 31276 31277# as_fn_unset VAR 31278# --------------- 31279# Portably unset VAR. 31280as_fn_unset () 31281{ 31282 { eval $1=; unset $1;} 31283} 31284as_unset=as_fn_unset 31285# as_fn_append VAR VALUE 31286# ---------------------- 31287# Append the text in VALUE to the end of the definition contained in VAR. Take 31288# advantage of any shell optimizations that allow amortized linear growth over 31289# repeated appends, instead of the typical quadratic growth present in naive 31290# implementations. 31291if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 31292 eval 'as_fn_append () 31293 { 31294 eval $1+=\$2 31295 }' 31296else 31297 as_fn_append () 31298 { 31299 eval $1=\$$1\$2 31300 } 31301fi # as_fn_append 31302 31303# as_fn_arith ARG... 31304# ------------------ 31305# Perform arithmetic evaluation on the ARGs, and store the result in the 31306# global $as_val. Take advantage of shells that can avoid forks. The arguments 31307# must be portable across $(()) and expr. 31308if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 31309 eval 'as_fn_arith () 31310 { 31311 as_val=$(( $* )) 31312 }' 31313else 31314 as_fn_arith () 31315 { 31316 as_val=`expr "$@" || test $? -eq 1` 31317 } 31318fi # as_fn_arith 31319 31320 31321if expr a : '\(a\)' >/dev/null 2>&1 && 31322 test "X`expr 00001 : '.*\(...\)'`" = X001; then 31323 as_expr=expr 31324else 31325 as_expr=false 31326fi 31327 31328if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 31329 as_basename=basename 31330else 31331 as_basename=false 31332fi 31333 31334if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 31335 as_dirname=dirname 31336else 31337 as_dirname=false 31338fi 31339 31340as_me=`$as_basename -- "$0" || 31341$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 31342 X"$0" : 'X\(//\)$' \| \ 31343 X"$0" : 'X\(/\)' \| . 2>/dev/null || 31344$as_echo X/"$0" | 31345 sed '/^.*\/\([^/][^/]*\)\/*$/{ 31346 s//\1/ 31347 q 31348 } 31349 /^X\/\(\/\/\)$/{ 31350 s//\1/ 31351 q 31352 } 31353 /^X\/\(\/\).*/{ 31354 s//\1/ 31355 q 31356 } 31357 s/.*/./; q'` 31358 31359# Avoid depending upon Character Ranges. 31360as_cr_letters='abcdefghijklmnopqrstuvwxyz' 31361as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 31362as_cr_Letters=$as_cr_letters$as_cr_LETTERS 31363as_cr_digits='0123456789' 31364as_cr_alnum=$as_cr_Letters$as_cr_digits 31365 31366ECHO_C= ECHO_N= ECHO_T= 31367case `echo -n x` in #((((( 31368-n*) 31369 case `echo 'xy\c'` in 31370 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 31371 xy) ECHO_C='\c';; 31372 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 31373 ECHO_T=' ';; 31374 esac;; 31375*) 31376 ECHO_N='-n';; 31377esac 31378 31379rm -f conf$$ conf$$.exe conf$$.file 31380if test -d conf$$.dir; then 31381 rm -f conf$$.dir/conf$$.file 31382else 31383 rm -f conf$$.dir 31384 mkdir conf$$.dir 2>/dev/null 31385fi 31386if (echo >conf$$.file) 2>/dev/null; then 31387 if ln -s conf$$.file conf$$ 2>/dev/null; then 31388 as_ln_s='ln -s' 31389 # ... but there are two gotchas: 31390 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 31391 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 31392 # In both cases, we have to default to `cp -pR'. 31393 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 31394 as_ln_s='cp -pR' 31395 elif ln conf$$.file conf$$ 2>/dev/null; then 31396 as_ln_s=ln 31397 else 31398 as_ln_s='cp -pR' 31399 fi 31400else 31401 as_ln_s='cp -pR' 31402fi 31403rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 31404rmdir conf$$.dir 2>/dev/null 31405 31406 31407# as_fn_mkdir_p 31408# ------------- 31409# Create "$as_dir" as a directory, including parents if necessary. 31410as_fn_mkdir_p () 31411{ 31412 31413 case $as_dir in #( 31414 -*) as_dir=./$as_dir;; 31415 esac 31416 test -d "$as_dir" || eval $as_mkdir_p || { 31417 as_dirs= 31418 while :; do 31419 case $as_dir in #( 31420 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 31421 *) as_qdir=$as_dir;; 31422 esac 31423 as_dirs="'$as_qdir' $as_dirs" 31424 as_dir=`$as_dirname -- "$as_dir" || 31425$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 31426 X"$as_dir" : 'X\(//\)[^/]' \| \ 31427 X"$as_dir" : 'X\(//\)$' \| \ 31428 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 31429$as_echo X"$as_dir" | 31430 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 31431 s//\1/ 31432 q 31433 } 31434 /^X\(\/\/\)[^/].*/{ 31435 s//\1/ 31436 q 31437 } 31438 /^X\(\/\/\)$/{ 31439 s//\1/ 31440 q 31441 } 31442 /^X\(\/\).*/{ 31443 s//\1/ 31444 q 31445 } 31446 s/.*/./; q'` 31447 test -d "$as_dir" && break 31448 done 31449 test -z "$as_dirs" || eval "mkdir $as_dirs" 31450 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 31451 31452 31453} # as_fn_mkdir_p 31454if mkdir -p . 2>/dev/null; then 31455 as_mkdir_p='mkdir -p "$as_dir"' 31456else 31457 test -d ./-p && rmdir ./-p 31458 as_mkdir_p=false 31459fi 31460 31461 31462# as_fn_executable_p FILE 31463# ----------------------- 31464# Test if FILE is an executable regular file. 31465as_fn_executable_p () 31466{ 31467 test -f "$1" && test -x "$1" 31468} # as_fn_executable_p 31469as_test_x='test -x' 31470as_executable_p=as_fn_executable_p 31471 31472# Sed expression to map a string onto a valid CPP name. 31473as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 31474 31475# Sed expression to map a string onto a valid variable name. 31476as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 31477 31478 31479exec 6>&1 31480## ----------------------------------- ## 31481## Main body of $CONFIG_STATUS script. ## 31482## ----------------------------------- ## 31483_ASEOF 31484test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 31485 31486cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 31487# Save the log message, to keep $0 and so on meaningful, and to 31488# report actual input values of CONFIG_FILES etc. instead of their 31489# values after options handling. 31490ac_log=" 31491This file was extended by libgnu $as_me UNUSED-VERSION, which was 31492generated by GNU Autoconf 2.69. Invocation command line was 31493 31494 CONFIG_FILES = $CONFIG_FILES 31495 CONFIG_HEADERS = $CONFIG_HEADERS 31496 CONFIG_LINKS = $CONFIG_LINKS 31497 CONFIG_COMMANDS = $CONFIG_COMMANDS 31498 $ $0 $@ 31499 31500on `(hostname || uname -n) 2>/dev/null | sed 1q` 31501" 31502 31503_ACEOF 31504 31505case $ac_config_files in *" 31506"*) set x $ac_config_files; shift; ac_config_files=$*;; 31507esac 31508 31509case $ac_config_headers in *" 31510"*) set x $ac_config_headers; shift; ac_config_headers=$*;; 31511esac 31512 31513 31514cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 31515# Files that config.status was made for. 31516config_files="$ac_config_files" 31517config_headers="$ac_config_headers" 31518config_commands="$ac_config_commands" 31519 31520_ACEOF 31521 31522cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 31523ac_cs_usage="\ 31524\`$as_me' instantiates files and other configuration actions 31525from templates according to the current configuration. Unless the files 31526and actions are specified as TAGs, all are instantiated by default. 31527 31528Usage: $0 [OPTION]... [TAG]... 31529 31530 -h, --help print this help, then exit 31531 -V, --version print version number and configuration settings, then exit 31532 --config print configuration, then exit 31533 -q, --quiet, --silent 31534 do not print progress messages 31535 -d, --debug don't remove temporary files 31536 --recheck update $as_me by reconfiguring in the same conditions 31537 --file=FILE[:TEMPLATE] 31538 instantiate the configuration file FILE 31539 --header=FILE[:TEMPLATE] 31540 instantiate the configuration header FILE 31541 31542Configuration files: 31543$config_files 31544 31545Configuration headers: 31546$config_headers 31547 31548Configuration commands: 31549$config_commands 31550 31551Report bugs to the package provider." 31552 31553_ACEOF 31554cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 31555ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 31556ac_cs_version="\\ 31557libgnu config.status UNUSED-VERSION 31558configured by $0, generated by GNU Autoconf 2.69, 31559 with options \\"\$ac_cs_config\\" 31560 31561Copyright (C) 2012 Free Software Foundation, Inc. 31562This config.status script is free software; the Free Software Foundation 31563gives unlimited permission to copy, distribute and modify it." 31564 31565ac_pwd='$ac_pwd' 31566srcdir='$srcdir' 31567INSTALL='$INSTALL' 31568MKDIR_P='$MKDIR_P' 31569AWK='$AWK' 31570test -n "\$AWK" || AWK=awk 31571_ACEOF 31572 31573cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 31574# The default lists apply if the user does not specify any file. 31575ac_need_defaults=: 31576while test $# != 0 31577do 31578 case $1 in 31579 --*=?*) 31580 ac_option=`expr "X$1" : 'X\([^=]*\)='` 31581 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` 31582 ac_shift=: 31583 ;; 31584 --*=) 31585 ac_option=`expr "X$1" : 'X\([^=]*\)='` 31586 ac_optarg= 31587 ac_shift=: 31588 ;; 31589 *) 31590 ac_option=$1 31591 ac_optarg=$2 31592 ac_shift=shift 31593 ;; 31594 esac 31595 31596 case $ac_option in 31597 # Handling of the options. 31598 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 31599 ac_cs_recheck=: ;; 31600 --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) 31601 $as_echo "$ac_cs_version"; exit ;; 31602 --config | --confi | --conf | --con | --co | --c ) 31603 $as_echo "$ac_cs_config"; exit ;; 31604 --debug | --debu | --deb | --de | --d | -d ) 31605 debug=: ;; 31606 --file | --fil | --fi | --f ) 31607 $ac_shift 31608 case $ac_optarg in 31609 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 31610 '') as_fn_error $? "missing file argument" ;; 31611 esac 31612 as_fn_append CONFIG_FILES " '$ac_optarg'" 31613 ac_need_defaults=false;; 31614 --header | --heade | --head | --hea ) 31615 $ac_shift 31616 case $ac_optarg in 31617 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 31618 esac 31619 as_fn_append CONFIG_HEADERS " '$ac_optarg'" 31620 ac_need_defaults=false;; 31621 --he | --h) 31622 # Conflict between --help and --header 31623 as_fn_error $? "ambiguous option: \`$1' 31624Try \`$0 --help' for more information.";; 31625 --help | --hel | -h ) 31626 $as_echo "$ac_cs_usage"; exit ;; 31627 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 31628 | -silent | --silent | --silen | --sile | --sil | --si | --s) 31629 ac_cs_silent=: ;; 31630 31631 # This is an error. 31632 -*) as_fn_error $? "unrecognized option: \`$1' 31633Try \`$0 --help' for more information." ;; 31634 31635 *) as_fn_append ac_config_targets " $1" 31636 ac_need_defaults=false ;; 31637 31638 esac 31639 shift 31640done 31641 31642ac_configure_extra_args= 31643 31644if $ac_cs_silent; then 31645 exec 6>/dev/null 31646 ac_configure_extra_args="$ac_configure_extra_args --silent" 31647fi 31648 31649_ACEOF 31650cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 31651if \$ac_cs_recheck; then 31652 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 31653 shift 31654 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 31655 CONFIG_SHELL='$SHELL' 31656 export CONFIG_SHELL 31657 exec "\$@" 31658fi 31659 31660_ACEOF 31661cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 31662exec 5>>config.log 31663{ 31664 echo 31665 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 31666## Running $as_me. ## 31667_ASBOX 31668 $as_echo "$ac_log" 31669} >&5 31670 31671_ACEOF 31672cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 31673# 31674# INIT-COMMANDS 31675# 31676AMDEP_TRUE="$AMDEP_TRUE" MAKE="${MAKE-make}" 31677 31678_ACEOF 31679 31680cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 31681 31682# Handling of arguments. 31683for ac_config_target in $ac_config_targets 31684do 31685 case $ac_config_target in 31686 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; 31687 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; 31688 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; 31689 "import/Makefile") CONFIG_FILES="$CONFIG_FILES import/Makefile" ;; 31690 "default") CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;; 31691 31692 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 31693 esac 31694done 31695 31696 31697# If the user did not use the arguments to specify the items to instantiate, 31698# then the envvar interface is used. Set only those that are not. 31699# We use the long form for the default assignment because of an extremely 31700# bizarre bug on SunOS 4.1.3. 31701if $ac_need_defaults; then 31702 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files 31703 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers 31704 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands 31705fi 31706 31707# Have a temporary directory for convenience. Make it in the build tree 31708# simply because there is no reason against having it here, and in addition, 31709# creating and moving files from /tmp can sometimes cause problems. 31710# Hook for its removal unless debugging. 31711# Note that there is a small window in which the directory will not be cleaned: 31712# after its creation but before its name has been assigned to `$tmp'. 31713$debug || 31714{ 31715 tmp= ac_tmp= 31716 trap 'exit_status=$? 31717 : "${ac_tmp:=$tmp}" 31718 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status 31719' 0 31720 trap 'as_fn_exit 1' 1 2 13 15 31721} 31722# Create a (secure) tmp directory for tmp files. 31723 31724{ 31725 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && 31726 test -d "$tmp" 31727} || 31728{ 31729 tmp=./conf$$-$RANDOM 31730 (umask 077 && mkdir "$tmp") 31731} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 31732ac_tmp=$tmp 31733 31734# Set up the scripts for CONFIG_FILES section. 31735# No need to generate them if there are no CONFIG_FILES. 31736# This happens for instance with `./config.status config.h'. 31737if test -n "$CONFIG_FILES"; then 31738 31739 31740ac_cr=`echo X | tr X '\015'` 31741# On cygwin, bash can eat \r inside `` if the user requested igncr. 31742# But we know of no other shell where ac_cr would be empty at this 31743# point, so we can use a bashism as a fallback. 31744if test "x$ac_cr" = x; then 31745 eval ac_cr=\$\'\\r\' 31746fi 31747ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` 31748if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 31749 ac_cs_awk_cr='\\r' 31750else 31751 ac_cs_awk_cr=$ac_cr 31752fi 31753 31754echo 'BEGIN {' >"$ac_tmp/subs1.awk" && 31755_ACEOF 31756 31757 31758{ 31759 echo "cat >conf$$subs.awk <<_ACEOF" && 31760 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && 31761 echo "_ACEOF" 31762} >conf$$subs.sh || 31763 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 31764ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` 31765ac_delim='%!_!# ' 31766for ac_last_try in false false false false false :; do 31767 . ./conf$$subs.sh || 31768 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 31769 31770 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` 31771 if test $ac_delim_n = $ac_delim_num; then 31772 break 31773 elif $ac_last_try; then 31774 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 31775 else 31776 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 31777 fi 31778done 31779rm -f conf$$subs.sh 31780 31781cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 31782cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && 31783_ACEOF 31784sed -n ' 31785h 31786s/^/S["/; s/!.*/"]=/ 31787p 31788g 31789s/^[^!]*!// 31790:repl 31791t repl 31792s/'"$ac_delim"'$// 31793t delim 31794:nl 31795h 31796s/\(.\{148\}\)..*/\1/ 31797t more1 31798s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ 31799p 31800n 31801b repl 31802:more1 31803s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 31804p 31805g 31806s/.\{148\}// 31807t nl 31808:delim 31809h 31810s/\(.\{148\}\)..*/\1/ 31811t more2 31812s/["\\]/\\&/g; s/^/"/; s/$/"/ 31813p 31814b 31815:more2 31816s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 31817p 31818g 31819s/.\{148\}// 31820t delim 31821' <conf$$subs.awk | sed ' 31822/^[^""]/{ 31823 N 31824 s/\n// 31825} 31826' >>$CONFIG_STATUS || ac_write_fail=1 31827rm -f conf$$subs.awk 31828cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 31829_ACAWK 31830cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && 31831 for (key in S) S_is_set[key] = 1 31832 FS = "" 31833 31834} 31835{ 31836 line = $ 0 31837 nfields = split(line, field, "@") 31838 substed = 0 31839 len = length(field[1]) 31840 for (i = 2; i < nfields; i++) { 31841 key = field[i] 31842 keylen = length(key) 31843 if (S_is_set[key]) { 31844 value = S[key] 31845 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) 31846 len += length(value) + length(field[++i]) 31847 substed = 1 31848 } else 31849 len += 1 + keylen 31850 } 31851 31852 print line 31853} 31854 31855_ACAWK 31856_ACEOF 31857cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 31858if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then 31859 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" 31860else 31861 cat 31862fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ 31863 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 31864_ACEOF 31865 31866# VPATH may cause trouble with some makes, so we remove sole $(srcdir), 31867# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and 31868# trailing colons and then remove the whole line if VPATH becomes empty 31869# (actually we leave an empty line to preserve line numbers). 31870if test "x$srcdir" = x.; then 31871 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ 31872h 31873s/// 31874s/^/:/ 31875s/[ ]*$/:/ 31876s/:\$(srcdir):/:/g 31877s/:\${srcdir}:/:/g 31878s/:@srcdir@:/:/g 31879s/^:*// 31880s/:*$// 31881x 31882s/\(=[ ]*\).*/\1/ 31883G 31884s/\n// 31885s/^[^=]*=[ ]*$// 31886}' 31887fi 31888 31889cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 31890fi # test -n "$CONFIG_FILES" 31891 31892# Set up the scripts for CONFIG_HEADERS section. 31893# No need to generate them if there are no CONFIG_HEADERS. 31894# This happens for instance with `./config.status Makefile'. 31895if test -n "$CONFIG_HEADERS"; then 31896cat >"$ac_tmp/defines.awk" <<\_ACAWK || 31897BEGIN { 31898_ACEOF 31899 31900# Transform confdefs.h into an awk script `defines.awk', embedded as 31901# here-document in config.status, that substitutes the proper values into 31902# config.h.in to produce config.h. 31903 31904# Create a delimiter string that does not exist in confdefs.h, to ease 31905# handling of long lines. 31906ac_delim='%!_!# ' 31907for ac_last_try in false false :; do 31908 ac_tt=`sed -n "/$ac_delim/p" confdefs.h` 31909 if test -z "$ac_tt"; then 31910 break 31911 elif $ac_last_try; then 31912 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 31913 else 31914 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 31915 fi 31916done 31917 31918# For the awk script, D is an array of macro values keyed by name, 31919# likewise P contains macro parameters if any. Preserve backslash 31920# newline sequences. 31921 31922ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* 31923sed -n ' 31924s/.\{148\}/&'"$ac_delim"'/g 31925t rset 31926:rset 31927s/^[ ]*#[ ]*define[ ][ ]*/ / 31928t def 31929d 31930:def 31931s/\\$// 31932t bsnl 31933s/["\\]/\\&/g 31934s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 31935D["\1"]=" \3"/p 31936s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p 31937d 31938:bsnl 31939s/["\\]/\\&/g 31940s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 31941D["\1"]=" \3\\\\\\n"\\/p 31942t cont 31943s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p 31944t cont 31945d 31946:cont 31947n 31948s/.\{148\}/&'"$ac_delim"'/g 31949t clear 31950:clear 31951s/\\$// 31952t bsnlc 31953s/["\\]/\\&/g; s/^/"/; s/$/"/p 31954d 31955:bsnlc 31956s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p 31957b cont 31958' <confdefs.h | sed ' 31959s/'"$ac_delim"'/"\\\ 31960"/g' >>$CONFIG_STATUS || ac_write_fail=1 31961 31962cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 31963 for (key in D) D_is_set[key] = 1 31964 FS = "" 31965} 31966/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { 31967 line = \$ 0 31968 split(line, arg, " ") 31969 if (arg[1] == "#") { 31970 defundef = arg[2] 31971 mac1 = arg[3] 31972 } else { 31973 defundef = substr(arg[1], 2) 31974 mac1 = arg[2] 31975 } 31976 split(mac1, mac2, "(") #) 31977 macro = mac2[1] 31978 prefix = substr(line, 1, index(line, defundef) - 1) 31979 if (D_is_set[macro]) { 31980 # Preserve the white space surrounding the "#". 31981 print prefix "define", macro P[macro] D[macro] 31982 next 31983 } else { 31984 # Replace #undef with comments. This is necessary, for example, 31985 # in the case of _POSIX_SOURCE, which is predefined and required 31986 # on some systems where configure will not decide to define it. 31987 if (defundef == "undef") { 31988 print "/*", prefix defundef, macro, "*/" 31989 next 31990 } 31991 } 31992} 31993{ print } 31994_ACAWK 31995_ACEOF 31996cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 31997 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 31998fi # test -n "$CONFIG_HEADERS" 31999 32000 32001eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" 32002shift 32003for ac_tag 32004do 32005 case $ac_tag in 32006 :[FHLC]) ac_mode=$ac_tag; continue;; 32007 esac 32008 case $ac_mode$ac_tag in 32009 :[FHL]*:*);; 32010 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; 32011 :[FH]-) ac_tag=-:-;; 32012 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 32013 esac 32014 ac_save_IFS=$IFS 32015 IFS=: 32016 set x $ac_tag 32017 IFS=$ac_save_IFS 32018 shift 32019 ac_file=$1 32020 shift 32021 32022 case $ac_mode in 32023 :L) ac_source=$1;; 32024 :[FH]) 32025 ac_file_inputs= 32026 for ac_f 32027 do 32028 case $ac_f in 32029 -) ac_f="$ac_tmp/stdin";; 32030 *) # Look for the file first in the build tree, then in the source tree 32031 # (if the path is not absolute). The absolute path cannot be DOS-style, 32032 # because $ac_f cannot contain `:'. 32033 test -f "$ac_f" || 32034 case $ac_f in 32035 [\\/$]*) false;; 32036 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 32037 esac || 32038 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; 32039 esac 32040 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 32041 as_fn_append ac_file_inputs " '$ac_f'" 32042 done 32043 32044 # Let's still pretend it is `configure' which instantiates (i.e., don't 32045 # use $as_me), people would be surprised to read: 32046 # /* config.h. Generated by config.status. */ 32047 configure_input='Generated from '` 32048 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' 32049 `' by configure.' 32050 if test x"$ac_file" != x-; then 32051 configure_input="$ac_file. $configure_input" 32052 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 32053$as_echo "$as_me: creating $ac_file" >&6;} 32054 fi 32055 # Neutralize special characters interpreted by sed in replacement strings. 32056 case $configure_input in #( 32057 *\&* | *\|* | *\\* ) 32058 ac_sed_conf_input=`$as_echo "$configure_input" | 32059 sed 's/[\\\\&|]/\\\\&/g'`;; #( 32060 *) ac_sed_conf_input=$configure_input;; 32061 esac 32062 32063 case $ac_tag in 32064 *:-:* | *:-) cat >"$ac_tmp/stdin" \ 32065 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; 32066 esac 32067 ;; 32068 esac 32069 32070 ac_dir=`$as_dirname -- "$ac_file" || 32071$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 32072 X"$ac_file" : 'X\(//\)[^/]' \| \ 32073 X"$ac_file" : 'X\(//\)$' \| \ 32074 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || 32075$as_echo X"$ac_file" | 32076 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 32077 s//\1/ 32078 q 32079 } 32080 /^X\(\/\/\)[^/].*/{ 32081 s//\1/ 32082 q 32083 } 32084 /^X\(\/\/\)$/{ 32085 s//\1/ 32086 q 32087 } 32088 /^X\(\/\).*/{ 32089 s//\1/ 32090 q 32091 } 32092 s/.*/./; q'` 32093 as_dir="$ac_dir"; as_fn_mkdir_p 32094 ac_builddir=. 32095 32096case "$ac_dir" in 32097.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 32098*) 32099 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 32100 # A ".." for each directory in $ac_dir_suffix. 32101 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 32102 case $ac_top_builddir_sub in 32103 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 32104 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 32105 esac ;; 32106esac 32107ac_abs_top_builddir=$ac_pwd 32108ac_abs_builddir=$ac_pwd$ac_dir_suffix 32109# for backward compatibility: 32110ac_top_builddir=$ac_top_build_prefix 32111 32112case $srcdir in 32113 .) # We are building in place. 32114 ac_srcdir=. 32115 ac_top_srcdir=$ac_top_builddir_sub 32116 ac_abs_top_srcdir=$ac_pwd ;; 32117 [\\/]* | ?:[\\/]* ) # Absolute name. 32118 ac_srcdir=$srcdir$ac_dir_suffix; 32119 ac_top_srcdir=$srcdir 32120 ac_abs_top_srcdir=$srcdir ;; 32121 *) # Relative name. 32122 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 32123 ac_top_srcdir=$ac_top_build_prefix$srcdir 32124 ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 32125esac 32126ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 32127 32128 32129 case $ac_mode in 32130 :F) 32131 # 32132 # CONFIG_FILE 32133 # 32134 32135 case $INSTALL in 32136 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; 32137 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; 32138 esac 32139 ac_MKDIR_P=$MKDIR_P 32140 case $MKDIR_P in 32141 [\\/$]* | ?:[\\/]* ) ;; 32142 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; 32143 esac 32144_ACEOF 32145 32146cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 32147# If the template does not know about datarootdir, expand it. 32148# FIXME: This hack should be removed a few years after 2.60. 32149ac_datarootdir_hack=; ac_datarootdir_seen= 32150ac_sed_dataroot=' 32151/datarootdir/ { 32152 p 32153 q 32154} 32155/@datadir@/p 32156/@docdir@/p 32157/@infodir@/p 32158/@localedir@/p 32159/@mandir@/p' 32160case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in 32161*datarootdir*) ac_datarootdir_seen=yes;; 32162*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) 32163 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 32164$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} 32165_ACEOF 32166cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 32167 ac_datarootdir_hack=' 32168 s&@datadir@&$datadir&g 32169 s&@docdir@&$docdir&g 32170 s&@infodir@&$infodir&g 32171 s&@localedir@&$localedir&g 32172 s&@mandir@&$mandir&g 32173 s&\\\${datarootdir}&$datarootdir&g' ;; 32174esac 32175_ACEOF 32176 32177# Neutralize VPATH when `$srcdir' = `.'. 32178# Shell code in configure.ac might set extrasub. 32179# FIXME: do we really want to maintain this feature? 32180cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 32181ac_sed_extra="$ac_vpsub 32182$extrasub 32183_ACEOF 32184cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 32185:t 32186/@[a-zA-Z_][a-zA-Z_0-9]*@/!b 32187s|@configure_input@|$ac_sed_conf_input|;t t 32188s&@top_builddir@&$ac_top_builddir_sub&;t t 32189s&@top_build_prefix@&$ac_top_build_prefix&;t t 32190s&@srcdir@&$ac_srcdir&;t t 32191s&@abs_srcdir@&$ac_abs_srcdir&;t t 32192s&@top_srcdir@&$ac_top_srcdir&;t t 32193s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t 32194s&@builddir@&$ac_builddir&;t t 32195s&@abs_builddir@&$ac_abs_builddir&;t t 32196s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 32197s&@INSTALL@&$ac_INSTALL&;t t 32198s&@MKDIR_P@&$ac_MKDIR_P&;t t 32199$ac_datarootdir_hack 32200" 32201eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ 32202 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 32203 32204test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 32205 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && 32206 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ 32207 "$ac_tmp/out"`; test -z "$ac_out"; } && 32208 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' 32209which seems to be undefined. Please make sure it is defined" >&5 32210$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 32211which seems to be undefined. Please make sure it is defined" >&2;} 32212 32213 rm -f "$ac_tmp/stdin" 32214 case $ac_file in 32215 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; 32216 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; 32217 esac \ 32218 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 32219 ;; 32220 :H) 32221 # 32222 # CONFIG_HEADER 32223 # 32224 if test x"$ac_file" != x-; then 32225 { 32226 $as_echo "/* $configure_input */" \ 32227 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" 32228 } >"$ac_tmp/config.h" \ 32229 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 32230 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then 32231 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 32232$as_echo "$as_me: $ac_file is unchanged" >&6;} 32233 else 32234 rm -f "$ac_file" 32235 mv "$ac_tmp/config.h" "$ac_file" \ 32236 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 32237 fi 32238 else 32239 $as_echo "/* $configure_input */" \ 32240 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ 32241 || as_fn_error $? "could not create -" "$LINENO" 5 32242 fi 32243# Compute "$ac_file"'s index in $config_headers. 32244_am_arg="$ac_file" 32245_am_stamp_count=1 32246for _am_header in $config_headers :; do 32247 case $_am_header in 32248 $_am_arg | $_am_arg:* ) 32249 break ;; 32250 * ) 32251 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 32252 esac 32253done 32254echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || 32255$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 32256 X"$_am_arg" : 'X\(//\)[^/]' \| \ 32257 X"$_am_arg" : 'X\(//\)$' \| \ 32258 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || 32259$as_echo X"$_am_arg" | 32260 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 32261 s//\1/ 32262 q 32263 } 32264 /^X\(\/\/\)[^/].*/{ 32265 s//\1/ 32266 q 32267 } 32268 /^X\(\/\/\)$/{ 32269 s//\1/ 32270 q 32271 } 32272 /^X\(\/\).*/{ 32273 s//\1/ 32274 q 32275 } 32276 s/.*/./; q'`/stamp-h$_am_stamp_count 32277 ;; 32278 32279 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 32280$as_echo "$as_me: executing $ac_file commands" >&6;} 32281 ;; 32282 esac 32283 32284 32285 case $ac_file$ac_mode in 32286 "depfiles":C) test x"$AMDEP_TRUE" != x"" || { 32287 # Older Autoconf quotes --file arguments for eval, but not when files 32288 # are listed without --file. Let's play safe and only enable the eval 32289 # if we detect the quoting. 32290 # TODO: see whether this extra hack can be removed once we start 32291 # requiring Autoconf 2.70 or later. 32292 case $CONFIG_FILES in #( 32293 *\'*) : 32294 eval set x "$CONFIG_FILES" ;; #( 32295 *) : 32296 set x $CONFIG_FILES ;; #( 32297 *) : 32298 ;; 32299esac 32300 shift 32301 # Used to flag and report bootstrapping failures. 32302 am_rc=0 32303 for am_mf 32304 do 32305 # Strip MF so we end up with the name of the file. 32306 am_mf=`$as_echo "$am_mf" | sed -e 's/:.*$//'` 32307 # Check whether this is an Automake generated Makefile which includes 32308 # dependency-tracking related rules and includes. 32309 # Grep'ing the whole file directly is not great: AIX grep has a line 32310 # limit of 2048, but all sed's we know have understand at least 4000. 32311 sed -n 's,^am--depfiles:.*,X,p' "$am_mf" | grep X >/dev/null 2>&1 \ 32312 || continue 32313 am_dirpart=`$as_dirname -- "$am_mf" || 32314$as_expr X"$am_mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 32315 X"$am_mf" : 'X\(//\)[^/]' \| \ 32316 X"$am_mf" : 'X\(//\)$' \| \ 32317 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || 32318$as_echo X"$am_mf" | 32319 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 32320 s//\1/ 32321 q 32322 } 32323 /^X\(\/\/\)[^/].*/{ 32324 s//\1/ 32325 q 32326 } 32327 /^X\(\/\/\)$/{ 32328 s//\1/ 32329 q 32330 } 32331 /^X\(\/\).*/{ 32332 s//\1/ 32333 q 32334 } 32335 s/.*/./; q'` 32336 am_filepart=`$as_basename -- "$am_mf" || 32337$as_expr X/"$am_mf" : '.*/\([^/][^/]*\)/*$' \| \ 32338 X"$am_mf" : 'X\(//\)$' \| \ 32339 X"$am_mf" : 'X\(/\)' \| . 2>/dev/null || 32340$as_echo X/"$am_mf" | 32341 sed '/^.*\/\([^/][^/]*\)\/*$/{ 32342 s//\1/ 32343 q 32344 } 32345 /^X\/\(\/\/\)$/{ 32346 s//\1/ 32347 q 32348 } 32349 /^X\/\(\/\).*/{ 32350 s//\1/ 32351 q 32352 } 32353 s/.*/./; q'` 32354 { echo "$as_me:$LINENO: cd "$am_dirpart" \ 32355 && sed -e '/# am--include-marker/d' "$am_filepart" \ 32356 | $MAKE -f - am--depfiles" >&5 32357 (cd "$am_dirpart" \ 32358 && sed -e '/# am--include-marker/d' "$am_filepart" \ 32359 | $MAKE -f - am--depfiles) >&5 2>&5 32360 ac_status=$? 32361 echo "$as_me:$LINENO: \$? = $ac_status" >&5 32362 (exit $ac_status); } || am_rc=$? 32363 done 32364 if test $am_rc -ne 0; then 32365 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 32366$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 32367as_fn_error $? "Something went wrong bootstrapping makefile fragments 32368 for automatic dependency tracking. Try re-running configure with the 32369 '--disable-dependency-tracking' option to at least be able to build 32370 the package (albeit without support for automatic dependency tracking). 32371See \`config.log' for more details" "$LINENO" 5; } 32372 fi 32373 { am_dirpart=; unset am_dirpart;} 32374 { am_filepart=; unset am_filepart;} 32375 { am_mf=; unset am_mf;} 32376 { am_rc=; unset am_rc;} 32377 rm -f conftest-deps.mk 32378} 32379 ;; 32380 "default":C) 32381case x$CONFIG_HEADERS in 32382xconfig.h:config.in) 32383echo > stamp-h ;; 32384esac 32385 ;; 32386 32387 esac 32388done # for ac_tag 32389 32390 32391as_fn_exit 0 32392_ACEOF 32393ac_clean_files=$ac_clean_files_save 32394 32395test $ac_write_fail = 0 || 32396 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 32397 32398 32399# configure is writing to config.log, and then calls config.status. 32400# config.status does its own redirection, appending to config.log. 32401# Unfortunately, on DOS this fails, as config.log is still kept open 32402# by configure, so config.status won't be able to write to it; its 32403# output is simply discarded. So we exec the FD to /dev/null, 32404# effectively closing config.log, so it can be properly (re)opened and 32405# appended to by config.status. When coming back to configure, we 32406# need to make the FD available again. 32407if test "$no_create" != yes; then 32408 ac_cs_success=: 32409 ac_config_status_args= 32410 test "$silent" = yes && 32411 ac_config_status_args="$ac_config_status_args --quiet" 32412 exec 5>/dev/null 32413 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 32414 exec 5>>config.log 32415 # Use ||, not &&, to avoid exiting from the if with $? = 1, which 32416 # would make configure fail if this is the last instruction. 32417 $ac_cs_success || as_fn_exit 1 32418fi 32419if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then 32420 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 32421$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} 32422fi 32423 32424 32425exit 0 32426