1#! /bin/sh 2# Guess values for system-dependent variables and create Makefiles. 3# Generated by GNU Autoconf 2.69 for GNU Bison 2.7. 4# 5# Report bugs to <bug-bison@gnu.org>. 6# 7# 8# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. 9# 10# 11# This configure script is free software; the Free Software Foundation 12# gives unlimited permission to copy, distribute and modify it. 13## -------------------- ## 14## M4sh Initialization. ## 15## -------------------- ## 16 17# Be more Bourne compatible 18DUALCASE=1; export DUALCASE # for MKS sh 19if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 20 emulate sh 21 NULLCMD=: 22 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 23 # is contrary to our usage. Disable this feature. 24 alias -g '${1+"$@"}'='"$@"' 25 setopt NO_GLOB_SUBST 26else 27 case `(set -o) 2>/dev/null` in #( 28 *posix*) : 29 set -o posix ;; #( 30 *) : 31 ;; 32esac 33fi 34 35 36as_nl=' 37' 38export as_nl 39# Printing a long string crashes Solaris 7 /usr/bin/printf. 40as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 41as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 42as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 43# Prefer a ksh shell builtin over an external printf program on Solaris, 44# but without wasting forks for bash or zsh. 45if test -z "$BASH_VERSION$ZSH_VERSION" \ 46 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 47 as_echo='print -r --' 48 as_echo_n='print -rn --' 49elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 50 as_echo='printf %s\n' 51 as_echo_n='printf %s' 52else 53 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 54 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 55 as_echo_n='/usr/ucb/echo -n' 56 else 57 as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 58 as_echo_n_body='eval 59 arg=$1; 60 case $arg in #( 61 *"$as_nl"*) 62 expr "X$arg" : "X\\(.*\\)$as_nl"; 63 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 64 esac; 65 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 66 ' 67 export as_echo_n_body 68 as_echo_n='sh -c $as_echo_n_body as_echo' 69 fi 70 export as_echo_body 71 as_echo='sh -c $as_echo_body as_echo' 72fi 73 74# The user is always right. 75if test "${PATH_SEPARATOR+set}" != set; then 76 PATH_SEPARATOR=: 77 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 78 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 79 PATH_SEPARATOR=';' 80 } 81fi 82 83 84# IFS 85# We need space, tab and new line, in precisely that order. Quoting is 86# there to prevent editors from complaining about space-tab. 87# (If _AS_PATH_WALK were called with IFS unset, it would disable word 88# splitting by setting IFS to empty value.) 89IFS=" "" $as_nl" 90 91# Find who we are. Look in the path if we contain no directory separator. 92as_myself= 93case $0 in #(( 94 *[\\/]* ) as_myself=$0 ;; 95 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 96for as_dir in $PATH 97do 98 IFS=$as_save_IFS 99 test -z "$as_dir" && as_dir=. 100 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 101 done 102IFS=$as_save_IFS 103 104 ;; 105esac 106# We did not find ourselves, most probably we were run as `sh COMMAND' 107# in which case we are not to be found in the path. 108if test "x$as_myself" = x; then 109 as_myself=$0 110fi 111if test ! -f "$as_myself"; then 112 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 113 exit 1 114fi 115 116# Unset variables that we do not need and which cause bugs (e.g. in 117# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 118# suppresses any "Segmentation fault" message there. '((' could 119# trigger a bug in pdksh 5.2.14. 120for as_var in BASH_ENV ENV MAIL MAILPATH 121do eval test x\${$as_var+set} = xset \ 122 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 123done 124PS1='$ ' 125PS2='> ' 126PS4='+ ' 127 128# NLS nuisances. 129LC_ALL=C 130export LC_ALL 131LANGUAGE=C 132export LANGUAGE 133 134# CDPATH. 135(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 136 137# Use a proper internal environment variable to ensure we don't fall 138 # into an infinite loop, continuously re-executing ourselves. 139 if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then 140 _as_can_reexec=no; export _as_can_reexec; 141 # We cannot yet assume a decent shell, so we have to provide a 142# neutralization value for shells without unset; and this also 143# works around shells that cannot unset nonexistent variables. 144# Preserve -v and -x to the replacement shell. 145BASH_ENV=/dev/null 146ENV=/dev/null 147(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 148case $- in # (((( 149 *v*x* | *x*v* ) as_opts=-vx ;; 150 *v* ) as_opts=-v ;; 151 *x* ) as_opts=-x ;; 152 * ) as_opts= ;; 153esac 154exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 155# Admittedly, this is quite paranoid, since all the known shells bail 156# out after a failed `exec'. 157$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 158as_fn_exit 255 159 fi 160 # We don't want this to propagate to other subprocesses. 161 { _as_can_reexec=; unset _as_can_reexec;} 162if test "x$CONFIG_SHELL" = x; then 163 as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : 164 emulate sh 165 NULLCMD=: 166 # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which 167 # is contrary to our usage. Disable this feature. 168 alias -g '\${1+\"\$@\"}'='\"\$@\"' 169 setopt NO_GLOB_SUBST 170else 171 case \`(set -o) 2>/dev/null\` in #( 172 *posix*) : 173 set -o posix ;; #( 174 *) : 175 ;; 176esac 177fi 178" 179 as_required="as_fn_return () { (exit \$1); } 180as_fn_success () { as_fn_return 0; } 181as_fn_failure () { as_fn_return 1; } 182as_fn_ret_success () { return 0; } 183as_fn_ret_failure () { return 1; } 184 185exitcode=0 186as_fn_success || { exitcode=1; echo as_fn_success failed.; } 187as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } 188as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } 189as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } 190if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : 191 192else 193 exitcode=1; echo positional parameters were not saved. 194fi 195test x\$exitcode = x0 || exit 1 196test -x / || exit 1" 197 as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO 198 as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO 199 eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && 200 test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 201test \$(( 1 + 1 )) = 2 || exit 1" 202 if (eval "$as_required") 2>/dev/null; then : 203 as_have_required=yes 204else 205 as_have_required=no 206fi 207 if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : 208 209else 210 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 211as_found=false 212for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH 213do 214 IFS=$as_save_IFS 215 test -z "$as_dir" && as_dir=. 216 as_found=: 217 case $as_dir in #( 218 /*) 219 for as_base in sh bash ksh sh5; do 220 # Try only shells that exist, to save several forks. 221 as_shell=$as_dir/$as_base 222 if { test -f "$as_shell" || test -f "$as_shell.exe"; } && 223 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : 224 CONFIG_SHELL=$as_shell as_have_required=yes 225 if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : 226 break 2 227fi 228fi 229 done;; 230 esac 231 as_found=false 232done 233$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && 234 { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : 235 CONFIG_SHELL=$SHELL as_have_required=yes 236fi; } 237IFS=$as_save_IFS 238 239 240 if test "x$CONFIG_SHELL" != x; then : 241 export CONFIG_SHELL 242 # We cannot yet assume a decent shell, so we have to provide a 243# neutralization value for shells without unset; and this also 244# works around shells that cannot unset nonexistent variables. 245# Preserve -v and -x to the replacement shell. 246BASH_ENV=/dev/null 247ENV=/dev/null 248(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV 249case $- in # (((( 250 *v*x* | *x*v* ) as_opts=-vx ;; 251 *v* ) as_opts=-v ;; 252 *x* ) as_opts=-x ;; 253 * ) as_opts= ;; 254esac 255exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} 256# Admittedly, this is quite paranoid, since all the known shells bail 257# out after a failed `exec'. 258$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 259exit 255 260fi 261 262 if test x$as_have_required = xno; then : 263 $as_echo "$0: This script requires a shell more modern than all" 264 $as_echo "$0: the shells that I found on your system." 265 if test x${ZSH_VERSION+set} = xset ; then 266 $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" 267 $as_echo "$0: be upgraded to zsh 4.3.4 or later." 268 else 269 $as_echo "$0: Please tell bug-autoconf@gnu.org and bug-bison@gnu.org 270$0: about your system, including any error possibly output 271$0: before this message. Then install a modern shell, or 272$0: manually run the script under such a shell if you do 273$0: have one." 274 fi 275 exit 1 276fi 277fi 278fi 279SHELL=${CONFIG_SHELL-/bin/sh} 280export SHELL 281# Unset more variables known to interfere with behavior of common tools. 282CLICOLOR_FORCE= GREP_OPTIONS= 283unset CLICOLOR_FORCE GREP_OPTIONS 284 285## --------------------- ## 286## M4sh Shell Functions. ## 287## --------------------- ## 288# as_fn_unset VAR 289# --------------- 290# Portably unset VAR. 291as_fn_unset () 292{ 293 { eval $1=; unset $1;} 294} 295as_unset=as_fn_unset 296 297# as_fn_set_status STATUS 298# ----------------------- 299# Set $? to STATUS, without forking. 300as_fn_set_status () 301{ 302 return $1 303} # as_fn_set_status 304 305# as_fn_exit STATUS 306# ----------------- 307# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 308as_fn_exit () 309{ 310 set +e 311 as_fn_set_status $1 312 exit $1 313} # as_fn_exit 314 315# as_fn_mkdir_p 316# ------------- 317# Create "$as_dir" as a directory, including parents if necessary. 318as_fn_mkdir_p () 319{ 320 321 case $as_dir in #( 322 -*) as_dir=./$as_dir;; 323 esac 324 test -d "$as_dir" || eval $as_mkdir_p || { 325 as_dirs= 326 while :; do 327 case $as_dir in #( 328 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 329 *) as_qdir=$as_dir;; 330 esac 331 as_dirs="'$as_qdir' $as_dirs" 332 as_dir=`$as_dirname -- "$as_dir" || 333$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 334 X"$as_dir" : 'X\(//\)[^/]' \| \ 335 X"$as_dir" : 'X\(//\)$' \| \ 336 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 337$as_echo X"$as_dir" | 338 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 339 s//\1/ 340 q 341 } 342 /^X\(\/\/\)[^/].*/{ 343 s//\1/ 344 q 345 } 346 /^X\(\/\/\)$/{ 347 s//\1/ 348 q 349 } 350 /^X\(\/\).*/{ 351 s//\1/ 352 q 353 } 354 s/.*/./; q'` 355 test -d "$as_dir" && break 356 done 357 test -z "$as_dirs" || eval "mkdir $as_dirs" 358 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 359 360 361} # as_fn_mkdir_p 362 363# as_fn_executable_p FILE 364# ----------------------- 365# Test if FILE is an executable regular file. 366as_fn_executable_p () 367{ 368 test -f "$1" && test -x "$1" 369} # as_fn_executable_p 370# as_fn_append VAR VALUE 371# ---------------------- 372# Append the text in VALUE to the end of the definition contained in VAR. Take 373# advantage of any shell optimizations that allow amortized linear growth over 374# repeated appends, instead of the typical quadratic growth present in naive 375# implementations. 376if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 377 eval 'as_fn_append () 378 { 379 eval $1+=\$2 380 }' 381else 382 as_fn_append () 383 { 384 eval $1=\$$1\$2 385 } 386fi # as_fn_append 387 388# as_fn_arith ARG... 389# ------------------ 390# Perform arithmetic evaluation on the ARGs, and store the result in the 391# global $as_val. Take advantage of shells that can avoid forks. The arguments 392# must be portable across $(()) and expr. 393if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 394 eval 'as_fn_arith () 395 { 396 as_val=$(( $* )) 397 }' 398else 399 as_fn_arith () 400 { 401 as_val=`expr "$@" || test $? -eq 1` 402 } 403fi # as_fn_arith 404 405 406# as_fn_error STATUS ERROR [LINENO LOG_FD] 407# ---------------------------------------- 408# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 409# provided, also output the error to LOG_FD, referencing LINENO. Then exit the 410# script with STATUS, using 1 if that was 0. 411as_fn_error () 412{ 413 as_status=$1; test $as_status -eq 0 && as_status=1 414 if test "$4"; then 415 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 416 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 417 fi 418 $as_echo "$as_me: error: $2" >&2 419 as_fn_exit $as_status 420} # as_fn_error 421 422if expr a : '\(a\)' >/dev/null 2>&1 && 423 test "X`expr 00001 : '.*\(...\)'`" = X001; then 424 as_expr=expr 425else 426 as_expr=false 427fi 428 429if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 430 as_basename=basename 431else 432 as_basename=false 433fi 434 435if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 436 as_dirname=dirname 437else 438 as_dirname=false 439fi 440 441as_me=`$as_basename -- "$0" || 442$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 443 X"$0" : 'X\(//\)$' \| \ 444 X"$0" : 'X\(/\)' \| . 2>/dev/null || 445$as_echo X/"$0" | 446 sed '/^.*\/\([^/][^/]*\)\/*$/{ 447 s//\1/ 448 q 449 } 450 /^X\/\(\/\/\)$/{ 451 s//\1/ 452 q 453 } 454 /^X\/\(\/\).*/{ 455 s//\1/ 456 q 457 } 458 s/.*/./; q'` 459 460# Avoid depending upon Character Ranges. 461as_cr_letters='abcdefghijklmnopqrstuvwxyz' 462as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 463as_cr_Letters=$as_cr_letters$as_cr_LETTERS 464as_cr_digits='0123456789' 465as_cr_alnum=$as_cr_Letters$as_cr_digits 466 467 468 as_lineno_1=$LINENO as_lineno_1a=$LINENO 469 as_lineno_2=$LINENO as_lineno_2a=$LINENO 470 eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && 471 test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { 472 # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) 473 sed -n ' 474 p 475 /[$]LINENO/= 476 ' <$as_myself | 477 sed ' 478 s/[$]LINENO.*/&-/ 479 t lineno 480 b 481 :lineno 482 N 483 :loop 484 s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ 485 t loop 486 s/-\n.*// 487 ' >$as_me.lineno && 488 chmod +x "$as_me.lineno" || 489 { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } 490 491 # If we had to re-execute with $CONFIG_SHELL, we're ensured to have 492 # already done that, so ensure we don't try to do so again and fall 493 # in an infinite loop. This has already happened in practice. 494 _as_can_reexec=no; export _as_can_reexec 495 # Don't try to exec as it changes $[0], causing all sort of problems 496 # (the dirname of $[0] is not the place where we might find the 497 # original and so on. Autoconf is especially sensitive to this). 498 . "./$as_me.lineno" 499 # Exit status is that of the last command. 500 exit 501} 502 503ECHO_C= ECHO_N= ECHO_T= 504case `echo -n x` in #((((( 505-n*) 506 case `echo 'xy\c'` in 507 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 508 xy) ECHO_C='\c';; 509 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 510 ECHO_T=' ';; 511 esac;; 512*) 513 ECHO_N='-n';; 514esac 515 516rm -f conf$$ conf$$.exe conf$$.file 517if test -d conf$$.dir; then 518 rm -f conf$$.dir/conf$$.file 519else 520 rm -f conf$$.dir 521 mkdir conf$$.dir 2>/dev/null 522fi 523if (echo >conf$$.file) 2>/dev/null; then 524 if ln -s conf$$.file conf$$ 2>/dev/null; then 525 as_ln_s='ln -s' 526 # ... but there are two gotchas: 527 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 528 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 529 # In both cases, we have to default to `cp -pR'. 530 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 531 as_ln_s='cp -pR' 532 elif ln conf$$.file conf$$ 2>/dev/null; then 533 as_ln_s=ln 534 else 535 as_ln_s='cp -pR' 536 fi 537else 538 as_ln_s='cp -pR' 539fi 540rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 541rmdir conf$$.dir 2>/dev/null 542 543if mkdir -p . 2>/dev/null; then 544 as_mkdir_p='mkdir -p "$as_dir"' 545else 546 test -d ./-p && rmdir ./-p 547 as_mkdir_p=false 548fi 549 550as_test_x='test -x' 551as_executable_p=as_fn_executable_p 552 553# Sed expression to map a string onto a valid CPP name. 554as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 555 556# Sed expression to map a string onto a valid variable name. 557as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 558 559 560test -n "$DJDIR" || exec 7<&0 </dev/null 561exec 6>&1 562 563# Name of the host. 564# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, 565# so uname gets run too. 566ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` 567 568# 569# Initializations. 570# 571ac_default_prefix=/usr/local 572ac_clean_files= 573ac_config_libobj_dir=. 574LIBOBJS= 575cross_compiling=no 576subdirs= 577MFLAGS= 578MAKEFLAGS= 579 580# Identity of this package. 581PACKAGE_NAME='GNU Bison' 582PACKAGE_TARNAME='bison' 583PACKAGE_VERSION='2.7' 584PACKAGE_STRING='GNU Bison 2.7' 585PACKAGE_BUGREPORT='bug-bison@gnu.org' 586PACKAGE_URL='http://www.gnu.org/software/bison/' 587 588# Factoring default headers for most tests. 589ac_includes_default="\ 590#include <stdio.h> 591#ifdef HAVE_SYS_TYPES_H 592# include <sys/types.h> 593#endif 594#ifdef HAVE_SYS_STAT_H 595# include <sys/stat.h> 596#endif 597#ifdef STDC_HEADERS 598# include <stdlib.h> 599# include <stddef.h> 600#else 601# ifdef HAVE_STDLIB_H 602# include <stdlib.h> 603# endif 604#endif 605#ifdef HAVE_STRING_H 606# if !defined STDC_HEADERS && defined HAVE_MEMORY_H 607# include <memory.h> 608# endif 609# include <string.h> 610#endif 611#ifdef HAVE_STRINGS_H 612# include <strings.h> 613#endif 614#ifdef HAVE_INTTYPES_H 615# include <inttypes.h> 616#endif 617#ifdef HAVE_STDINT_H 618# include <stdint.h> 619#endif 620#ifdef HAVE_UNISTD_H 621# include <unistd.h> 622#endif" 623 624gl_use_threads_default= 625ac_header_list= 626ac_func_list= 627gl_getopt_required=POSIX 628gl_getopt_required=POSIX 629gt_needs= 630ac_subst_vars='gltests_LTLIBOBJS 631gltests_LIBOBJS 632gl_LTLIBOBJS 633gl_LIBOBJS 634CONFIG_INCLUDE 635am__EXEEXT_FALSE 636am__EXEEXT_TRUE 637LTLIBOBJS 638LIBOBJS 639HAVE_JIKES 640HAVE_JAVAC 641HAVE_GCJ_C 642HAVE_JAVAC_ENVVAR 643CONF_JAVAC 644HAVE_JIKES_IN_PATH 645HAVE_JAVAC_IN_PATH 646HAVE_GCJ_IN_PATH 647HAVE_JVIEW 648HAVE_JRE 649HAVE_JAVA 650HAVE_GIJ 651HAVE_JAVA_ENVVAR 652CLASSPATH_SEPARATOR 653CLASSPATH 654CONF_JAVA 655HAVE_JVIEW_IN_PATH 656HAVE_JRE_IN_PATH 657HAVE_JAVA_IN_PATH 658HAVE_GIJ_IN_PATH 659GCC 660AUTOM4TE 661VALGRIND_PREBISON 662VALGRIND 663aclocaldir 664BISON_LOCALEDIR 665POSUB 666INTLLIBS 667LTLIBICONV 668LIBICONV 669INTL_MACOSX_LIBS 670XGETTEXT_EXTRA_OPTIONS 671MSGMERGE 672XGETTEXT_015 673XGETTEXT 674GMSGFMT_015 675MSGFMT_015 676GMSGFMT 677MSGFMT 678GETTEXT_MACRO_VERSION 679USE_NLS 680LIBBISON_LTLIBDEPS 681LIBBISON_LIBDEPS 682gltests_WITNESS 683NEXT_AS_FIRST_DIRECTIVE_WCHAR_H 684NEXT_WCHAR_H 685LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE 686LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE 687LIBUNISTRING_UNIWIDTH_H 688LIBUNISTRING_UNITYPES_H 689HAVE_UNISTD_H 690NEXT_AS_FIRST_DIRECTIVE_UNISTD_H 691NEXT_UNISTD_H 692PTHREAD_H_DEFINES_STRUCT_TIMESPEC 693SYS_TIME_H_DEFINES_STRUCT_TIMESPEC 694TIME_H_DEFINES_STRUCT_TIMESPEC 695NEXT_AS_FIRST_DIRECTIVE_TIME_H 696NEXT_TIME_H 697REPLACE_TIMEGM 698REPLACE_NANOSLEEP 699REPLACE_MKTIME 700REPLACE_LOCALTIME_R 701HAVE_TIMEGM 702HAVE_STRPTIME 703HAVE_NANOSLEEP 704HAVE_DECL_LOCALTIME_R 705GNULIB_TIME_R 706GNULIB_TIMEGM 707GNULIB_STRPTIME 708GNULIB_NANOSLEEP 709GNULIB_MKTIME 710NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H 711NEXT_SYS_WAIT_H 712GNULIB_WAITPID 713WINDOWS_64_BIT_OFF_T 714NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H 715NEXT_SYS_TYPES_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 722NEXT_AS_FIRST_DIRECTIVE_STDDEF_H 723NEXT_STDDEF_H 724GL_GENERATE_STDDEF_H_FALSE 725GL_GENERATE_STDDEF_H_TRUE 726STDDEF_H 727HAVE_WCHAR_T 728REPLACE_NULL 729HAVE__BOOL 730GL_GENERATE_STDBOOL_H_FALSE 731GL_GENERATE_STDBOOL_H_TRUE 732STDBOOL_H 733HAVE_SPAWN_H 734NEXT_AS_FIRST_DIRECTIVE_SPAWN_H 735NEXT_SPAWN_H 736NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H 737NEXT_SIGNAL_H 738GL_GENERATE_SCHED_H_FALSE 739GL_GENERATE_SCHED_H_TRUE 740SCHED_H 741HAVE_STRUCT_SCHED_PARAM 742HAVE_SCHED_H 743NEXT_AS_FIRST_DIRECTIVE_SCHED_H 744NEXT_SCHED_H 745REPLACE_RAISE 746REPLACE_PTHREAD_SIGMASK 747HAVE_SIGHANDLER_T 748HAVE_TYPE_VOLATILE_SIG_ATOMIC_T 749HAVE_STRUCT_SIGACTION_SA_SIGACTION 750HAVE_SIGACTION 751HAVE_SIGINFO_T 752HAVE_SIGSET_T 753HAVE_RAISE 754HAVE_PTHREAD_SIGMASK 755HAVE_POSIX_SIGNALBLOCKING 756GNULIB_SIGACTION 757GNULIB_SIGPROCMASK 758GNULIB_SIGNAL_H_SIGPIPE 759GNULIB_RAISE 760GNULIB_PTHREAD_SIGMASK 761ASM_SYMBOL_PREFIX 762REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 763REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 764REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 765REPLACE_POSIX_SPAWN 766HAVE_POSIX_SPAWN_FILE_ACTIONS_T 767HAVE_POSIX_SPAWNATTR_T 768HAVE_POSIX_SPAWN 769GNULIB_POSIX_SPAWNATTR_DESTROY 770GNULIB_POSIX_SPAWNATTR_SETSIGMASK 771GNULIB_POSIX_SPAWNATTR_GETSIGMASK 772GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT 773GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT 774GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY 775GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY 776GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM 777GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM 778GNULIB_POSIX_SPAWNATTR_SETPGROUP 779GNULIB_POSIX_SPAWNATTR_GETPGROUP 780GNULIB_POSIX_SPAWNATTR_SETFLAGS 781GNULIB_POSIX_SPAWNATTR_GETFLAGS 782GNULIB_POSIX_SPAWNATTR_INIT 783GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY 784GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 785GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 786GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 787GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT 788GNULIB_POSIX_SPAWNP 789GNULIB_POSIX_SPAWN 790UNDEFINE_STRTOK_R 791REPLACE_STRTOK_R 792REPLACE_STRSIGNAL 793REPLACE_STRNLEN 794REPLACE_STRNDUP 795REPLACE_STRNCAT 796REPLACE_STRERROR_R 797REPLACE_STRERROR 798REPLACE_STRCHRNUL 799REPLACE_STRCASESTR 800REPLACE_STRSTR 801REPLACE_STRDUP 802REPLACE_STPNCPY 803REPLACE_MEMMEM 804REPLACE_MEMCHR 805HAVE_STRVERSCMP 806HAVE_DECL_STRSIGNAL 807HAVE_DECL_STRERROR_R 808HAVE_DECL_STRTOK_R 809HAVE_STRCASESTR 810HAVE_STRSEP 811HAVE_STRPBRK 812HAVE_DECL_STRNLEN 813HAVE_DECL_STRNDUP 814HAVE_DECL_STRDUP 815HAVE_STRCHRNUL 816HAVE_STPNCPY 817HAVE_STPCPY 818HAVE_RAWMEMCHR 819HAVE_DECL_MEMRCHR 820HAVE_MEMPCPY 821HAVE_DECL_MEMMEM 822HAVE_MEMCHR 823HAVE_FFSLL 824HAVE_FFSL 825HAVE_MBSLEN 826GNULIB_STRVERSCMP 827GNULIB_STRSIGNAL 828GNULIB_STRERROR_R 829GNULIB_STRERROR 830GNULIB_MBSTOK_R 831GNULIB_MBSSEP 832GNULIB_MBSSPN 833GNULIB_MBSPBRK 834GNULIB_MBSCSPN 835GNULIB_MBSCASESTR 836GNULIB_MBSPCASECMP 837GNULIB_MBSNCASECMP 838GNULIB_MBSCASECMP 839GNULIB_MBSSTR 840GNULIB_MBSRCHR 841GNULIB_MBSCHR 842GNULIB_MBSNLEN 843GNULIB_MBSLEN 844GNULIB_STRTOK_R 845GNULIB_STRCASESTR 846GNULIB_STRSTR 847GNULIB_STRSEP 848GNULIB_STRPBRK 849GNULIB_STRNLEN 850GNULIB_STRNDUP 851GNULIB_STRNCAT 852GNULIB_STRDUP 853GNULIB_STRCHRNUL 854GNULIB_STPNCPY 855GNULIB_STPCPY 856GNULIB_RAWMEMCHR 857GNULIB_MEMRCHR 858GNULIB_MEMPCPY 859GNULIB_MEMMEM 860GNULIB_MEMCHR 861GNULIB_FFSLL 862GNULIB_FFSL 863LOCALE_FR_UTF8 864LOCALE_ZH_CN 865LOCALE_JA 866REPLACE_WCSWIDTH 867REPLACE_WCWIDTH 868REPLACE_WCSNRTOMBS 869REPLACE_WCSRTOMBS 870REPLACE_WCRTOMB 871REPLACE_MBSNRTOWCS 872REPLACE_MBSRTOWCS 873REPLACE_MBRLEN 874REPLACE_MBRTOWC 875REPLACE_MBSINIT 876REPLACE_WCTOB 877REPLACE_BTOWC 878REPLACE_MBSTATE_T 879HAVE_DECL_WCWIDTH 880HAVE_DECL_WCTOB 881HAVE_WCSWIDTH 882HAVE_WCSTOK 883HAVE_WCSSTR 884HAVE_WCSPBRK 885HAVE_WCSSPN 886HAVE_WCSCSPN 887HAVE_WCSRCHR 888HAVE_WCSCHR 889HAVE_WCSDUP 890HAVE_WCSXFRM 891HAVE_WCSCOLL 892HAVE_WCSNCASECMP 893HAVE_WCSCASECMP 894HAVE_WCSNCMP 895HAVE_WCSCMP 896HAVE_WCSNCAT 897HAVE_WCSCAT 898HAVE_WCPNCPY 899HAVE_WCSNCPY 900HAVE_WCPCPY 901HAVE_WCSCPY 902HAVE_WCSNLEN 903HAVE_WCSLEN 904HAVE_WMEMSET 905HAVE_WMEMMOVE 906HAVE_WMEMCPY 907HAVE_WMEMCMP 908HAVE_WMEMCHR 909HAVE_WCSNRTOMBS 910HAVE_WCSRTOMBS 911HAVE_WCRTOMB 912HAVE_MBSNRTOWCS 913HAVE_MBSRTOWCS 914HAVE_MBRLEN 915HAVE_MBRTOWC 916HAVE_MBSINIT 917HAVE_BTOWC 918GNULIB_WCSWIDTH 919GNULIB_WCSTOK 920GNULIB_WCSSTR 921GNULIB_WCSPBRK 922GNULIB_WCSSPN 923GNULIB_WCSCSPN 924GNULIB_WCSRCHR 925GNULIB_WCSCHR 926GNULIB_WCSDUP 927GNULIB_WCSXFRM 928GNULIB_WCSCOLL 929GNULIB_WCSNCASECMP 930GNULIB_WCSCASECMP 931GNULIB_WCSNCMP 932GNULIB_WCSCMP 933GNULIB_WCSNCAT 934GNULIB_WCSCAT 935GNULIB_WCPNCPY 936GNULIB_WCSNCPY 937GNULIB_WCPCPY 938GNULIB_WCSCPY 939GNULIB_WCSNLEN 940GNULIB_WCSLEN 941GNULIB_WMEMSET 942GNULIB_WMEMMOVE 943GNULIB_WMEMCPY 944GNULIB_WMEMCMP 945GNULIB_WMEMCHR 946GNULIB_WCWIDTH 947GNULIB_WCSNRTOMBS 948GNULIB_WCSRTOMBS 949GNULIB_WCRTOMB 950GNULIB_MBSNRTOWCS 951GNULIB_MBSRTOWCS 952GNULIB_MBRLEN 953GNULIB_MBRTOWC 954GNULIB_MBSINIT 955GNULIB_WCTOB 956GNULIB_BTOWC 957NEXT_AS_FIRST_DIRECTIVE_MATH_H 958NEXT_MATH_H 959LTLIBMULTITHREAD 960LIBMULTITHREAD 961LTLIBTHREAD 962LIBTHREAD 963LIBPTH_PREFIX 964LTLIBPTH 965LIBPTH 966LOCALCHARSET_TESTS_ENVIRONMENT 967GLIBC21 968LDEXPL_LIBM 969LDEXP_LIBM 970REPLACE_TOWLOWER 971REPLACE_ISWCNTRL 972HAVE_WCTYPE_H 973NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H 974NEXT_WCTYPE_H 975HAVE_WINT_T 976HAVE_ISWCNTRL 977REPLACE_ISWBLANK 978HAVE_WCTRANS_T 979HAVE_WCTYPE_T 980HAVE_ISWBLANK 981GNULIB_TOWCTRANS 982GNULIB_WCTRANS 983GNULIB_ISWCTYPE 984GNULIB_WCTYPE 985GNULIB_ISWBLANK 986ISNAN_LIBM 987ISNANL_LIBM 988ISNAND_LIBM 989ISNANF_LIBM 990NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H 991NEXT_INTTYPES_H 992UINT64_MAX_EQ_ULONG_MAX 993UINT32_MAX_LT_UINTMAX_MAX 994PRIPTR_PREFIX 995PRI_MACROS_BROKEN 996INT64_MAX_EQ_LONG_MAX 997INT32_MAX_LT_INTMAX_MAX 998REPLACE_STRTOIMAX 999HAVE_DECL_STRTOUMAX 1000HAVE_DECL_STRTOIMAX 1001HAVE_DECL_IMAXDIV 1002HAVE_DECL_IMAXABS 1003GNULIB_STRTOUMAX 1004GNULIB_STRTOIMAX 1005GNULIB_IMAXDIV 1006GNULIB_IMAXABS 1007GL_GENERATE_STDINT_H_FALSE 1008GL_GENERATE_STDINT_H_TRUE 1009STDINT_H 1010WINT_T_SUFFIX 1011WCHAR_T_SUFFIX 1012SIG_ATOMIC_T_SUFFIX 1013SIZE_T_SUFFIX 1014PTRDIFF_T_SUFFIX 1015HAVE_SIGNED_WINT_T 1016HAVE_SIGNED_WCHAR_T 1017HAVE_SIGNED_SIG_ATOMIC_T 1018BITSIZEOF_WINT_T 1019BITSIZEOF_WCHAR_T 1020BITSIZEOF_SIG_ATOMIC_T 1021BITSIZEOF_SIZE_T 1022BITSIZEOF_PTRDIFF_T 1023HAVE_SYS_BITYPES_H 1024HAVE_SYS_INTTYPES_H 1025HAVE_STDINT_H 1026NEXT_AS_FIRST_DIRECTIVE_STDINT_H 1027NEXT_STDINT_H 1028HAVE_SYS_TYPES_H 1029HAVE_INTTYPES_H 1030HAVE_WCHAR_H 1031HAVE_UNSIGNED_LONG_LONG_INT 1032HAVE_LONG_LONG_INT 1033LTLIBINTL 1034LIBINTL 1035GNULIB_GL_UNISTD_H_GETOPT 1036GETOPT_H 1037HAVE_GETOPT_H 1038NEXT_AS_FIRST_DIRECTIVE_GETOPT_H 1039NEXT_GETOPT_H 1040WINDOWS_64_BIT_ST_SIZE 1041NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H 1042NEXT_SYS_STAT_H 1043REPLACE_UTIMENSAT 1044REPLACE_STAT 1045REPLACE_MKNOD 1046REPLACE_MKFIFO 1047REPLACE_MKDIR 1048REPLACE_LSTAT 1049REPLACE_FUTIMENS 1050REPLACE_FSTATAT 1051REPLACE_FSTAT 1052HAVE_UTIMENSAT 1053HAVE_MKNODAT 1054HAVE_MKNOD 1055HAVE_MKFIFOAT 1056HAVE_MKFIFO 1057HAVE_MKDIRAT 1058HAVE_LSTAT 1059HAVE_LCHMOD 1060HAVE_FUTIMENS 1061HAVE_FSTATAT 1062HAVE_FCHMODAT 1063GNULIB_UTIMENSAT 1064GNULIB_STAT 1065GNULIB_MKNODAT 1066GNULIB_MKNOD 1067GNULIB_MKFIFOAT 1068GNULIB_MKFIFO 1069GNULIB_MKDIRAT 1070GNULIB_LSTAT 1071GNULIB_LCHMOD 1072GNULIB_FUTIMENS 1073GNULIB_FSTATAT 1074GNULIB_FSTAT 1075GNULIB_FCHMODAT 1076REPLACE_TRUNCL 1077REPLACE_TRUNCF 1078REPLACE_TRUNC 1079REPLACE_SQRTL 1080REPLACE_SIGNBIT_USING_GCC 1081REPLACE_SIGNBIT 1082REPLACE_ROUNDL 1083REPLACE_ROUNDF 1084REPLACE_ROUND 1085REPLACE_REMAINDERL 1086REPLACE_REMAINDERF 1087REPLACE_REMAINDER 1088REPLACE_NAN 1089REPLACE_MODFL 1090REPLACE_MODFF 1091REPLACE_MODF 1092REPLACE_LOGBL 1093REPLACE_LOGBF 1094REPLACE_LOGB 1095REPLACE_LOG2L 1096REPLACE_LOG2F 1097REPLACE_LOG2 1098REPLACE_LOG1PL 1099REPLACE_LOG1PF 1100REPLACE_LOG1P 1101REPLACE_LOG10L 1102REPLACE_LOG10F 1103REPLACE_LOG10 1104REPLACE_LOGL 1105REPLACE_LOGF 1106REPLACE_LOG 1107REPLACE_LDEXPL 1108REPLACE_ISNAN 1109REPLACE_ISINF 1110REPLACE_ISFINITE 1111REPLACE_ILOGBF 1112REPLACE_ILOGB 1113REPLACE_HYPOTL 1114REPLACE_HYPOTF 1115REPLACE_HYPOT 1116REPLACE_HUGE_VAL 1117REPLACE_FREXPL 1118REPLACE_FREXP 1119REPLACE_FREXPF 1120REPLACE_FMODL 1121REPLACE_FMODF 1122REPLACE_FMOD 1123REPLACE_FMAL 1124REPLACE_FMAF 1125REPLACE_FMA 1126REPLACE_FLOORL 1127REPLACE_FLOORF 1128REPLACE_FLOOR 1129REPLACE_FABSL 1130REPLACE_EXP2L 1131REPLACE_EXP2 1132REPLACE_EXPM1F 1133REPLACE_EXPM1 1134REPLACE_CEILL 1135REPLACE_CEILF 1136REPLACE_CEIL 1137REPLACE_CBRTL 1138REPLACE_CBRTF 1139HAVE_DECL_TRUNCL 1140HAVE_DECL_TRUNCF 1141HAVE_DECL_TRUNC 1142HAVE_DECL_TANL 1143HAVE_DECL_SQRTL 1144HAVE_DECL_SINL 1145HAVE_DECL_ROUNDL 1146HAVE_DECL_ROUNDF 1147HAVE_DECL_ROUND 1148HAVE_DECL_RINTF 1149HAVE_DECL_REMAINDERL 1150HAVE_DECL_REMAINDER 1151HAVE_DECL_LOGB 1152HAVE_DECL_LOG2L 1153HAVE_DECL_LOG2F 1154HAVE_DECL_LOG2 1155HAVE_DECL_LOG10L 1156HAVE_DECL_LOGL 1157HAVE_DECL_LDEXPL 1158HAVE_DECL_FREXPL 1159HAVE_DECL_FLOORL 1160HAVE_DECL_FLOORF 1161HAVE_DECL_EXPM1L 1162HAVE_DECL_EXP2L 1163HAVE_DECL_EXP2F 1164HAVE_DECL_EXP2 1165HAVE_DECL_EXPL 1166HAVE_DECL_COSL 1167HAVE_DECL_COPYSIGNF 1168HAVE_DECL_CEILL 1169HAVE_DECL_CEILF 1170HAVE_DECL_CBRTL 1171HAVE_DECL_CBRTF 1172HAVE_DECL_ATANL 1173HAVE_DECL_ASINL 1174HAVE_DECL_ACOSL 1175HAVE_TANHF 1176HAVE_TANL 1177HAVE_TANF 1178HAVE_SQRTL 1179HAVE_SQRTF 1180HAVE_SINHF 1181HAVE_SINL 1182HAVE_SINF 1183HAVE_RINTL 1184HAVE_RINT 1185HAVE_REMAINDERF 1186HAVE_REMAINDER 1187HAVE_POWF 1188HAVE_MODFL 1189HAVE_MODFF 1190HAVE_LOGBL 1191HAVE_LOGBF 1192HAVE_LOG1PL 1193HAVE_LOG1PF 1194HAVE_LOG1P 1195HAVE_LOG10L 1196HAVE_LOG10F 1197HAVE_LOGL 1198HAVE_LOGF 1199HAVE_LDEXPF 1200HAVE_ISNANL 1201HAVE_ISNAND 1202HAVE_ISNANF 1203HAVE_ILOGBL 1204HAVE_ILOGBF 1205HAVE_ILOGB 1206HAVE_HYPOTL 1207HAVE_HYPOTF 1208HAVE_FREXPF 1209HAVE_FMODL 1210HAVE_FMODF 1211HAVE_FMAL 1212HAVE_FMAF 1213HAVE_FMA 1214HAVE_FABSL 1215HAVE_FABSF 1216HAVE_EXPM1F 1217HAVE_EXPM1 1218HAVE_EXPL 1219HAVE_EXPF 1220HAVE_COSHF 1221HAVE_COSL 1222HAVE_COSF 1223HAVE_COPYSIGNL 1224HAVE_COPYSIGN 1225HAVE_CBRTL 1226HAVE_CBRTF 1227HAVE_CBRT 1228HAVE_ATAN2F 1229HAVE_ATANL 1230HAVE_ATANF 1231HAVE_ASINL 1232HAVE_ASINF 1233HAVE_ACOSL 1234HAVE_ACOSF 1235GNULIB_TRUNCL 1236GNULIB_TRUNCF 1237GNULIB_TRUNC 1238GNULIB_TANHF 1239GNULIB_TANL 1240GNULIB_TANF 1241GNULIB_SQRTL 1242GNULIB_SQRTF 1243GNULIB_SINHF 1244GNULIB_SINL 1245GNULIB_SINF 1246GNULIB_SIGNBIT 1247GNULIB_ROUNDL 1248GNULIB_ROUNDF 1249GNULIB_ROUND 1250GNULIB_RINTL 1251GNULIB_RINTF 1252GNULIB_RINT 1253GNULIB_REMAINDERL 1254GNULIB_REMAINDERF 1255GNULIB_REMAINDER 1256GNULIB_POWF 1257GNULIB_MODFL 1258GNULIB_MODFF 1259GNULIB_MODF 1260GNULIB_LOGBL 1261GNULIB_LOGBF 1262GNULIB_LOGB 1263GNULIB_LOG2L 1264GNULIB_LOG2F 1265GNULIB_LOG2 1266GNULIB_LOG1PL 1267GNULIB_LOG1PF 1268GNULIB_LOG1P 1269GNULIB_LOG10L 1270GNULIB_LOG10F 1271GNULIB_LOG10 1272GNULIB_LOGL 1273GNULIB_LOGF 1274GNULIB_LOG 1275GNULIB_LDEXPL 1276GNULIB_LDEXPF 1277GNULIB_ISNANL 1278GNULIB_ISNAND 1279GNULIB_ISNANF 1280GNULIB_ISNAN 1281GNULIB_ISINF 1282GNULIB_ISFINITE 1283GNULIB_ILOGBL 1284GNULIB_ILOGBF 1285GNULIB_ILOGB 1286GNULIB_HYPOTL 1287GNULIB_HYPOTF 1288GNULIB_HYPOT 1289GNULIB_FREXPL 1290GNULIB_FREXP 1291GNULIB_FREXPF 1292GNULIB_FMODL 1293GNULIB_FMODF 1294GNULIB_FMOD 1295GNULIB_FMAL 1296GNULIB_FMAF 1297GNULIB_FMA 1298GNULIB_FLOORL 1299GNULIB_FLOORF 1300GNULIB_FLOOR 1301GNULIB_FABSL 1302GNULIB_FABSF 1303GNULIB_EXPM1L 1304GNULIB_EXPM1F 1305GNULIB_EXPM1 1306GNULIB_EXP2L 1307GNULIB_EXP2F 1308GNULIB_EXP2 1309GNULIB_EXPL 1310GNULIB_EXPF 1311GNULIB_COSHF 1312GNULIB_COSL 1313GNULIB_COSF 1314GNULIB_COPYSIGNL 1315GNULIB_COPYSIGNF 1316GNULIB_COPYSIGN 1317GNULIB_CEILL 1318GNULIB_CEILF 1319GNULIB_CEIL 1320GNULIB_CBRTL 1321GNULIB_CBRTF 1322GNULIB_CBRT 1323GNULIB_ATAN2F 1324GNULIB_ATANL 1325GNULIB_ATANF 1326GNULIB_ASINL 1327GNULIB_ASINF 1328GNULIB_ACOSL 1329GNULIB_ACOSF 1330HAVE_FEATURES_H 1331APPLE_UNIVERSAL_BUILD 1332HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1333REPLACE_VSPRINTF 1334REPLACE_VSNPRINTF 1335REPLACE_VPRINTF 1336REPLACE_VFPRINTF 1337REPLACE_VDPRINTF 1338REPLACE_VASPRINTF 1339REPLACE_TMPFILE 1340REPLACE_STDIO_WRITE_FUNCS 1341REPLACE_STDIO_READ_FUNCS 1342REPLACE_SPRINTF 1343REPLACE_SNPRINTF 1344REPLACE_RENAMEAT 1345REPLACE_RENAME 1346REPLACE_REMOVE 1347REPLACE_PRINTF 1348REPLACE_POPEN 1349REPLACE_PERROR 1350REPLACE_OBSTACK_PRINTF 1351REPLACE_GETLINE 1352REPLACE_GETDELIM 1353REPLACE_FTELLO 1354REPLACE_FTELL 1355REPLACE_FSEEKO 1356REPLACE_FSEEK 1357REPLACE_FREOPEN 1358REPLACE_FPURGE 1359REPLACE_FPRINTF 1360REPLACE_FOPEN 1361REPLACE_FFLUSH 1362REPLACE_FDOPEN 1363REPLACE_FCLOSE 1364REPLACE_DPRINTF 1365HAVE_VDPRINTF 1366HAVE_VASPRINTF 1367HAVE_RENAMEAT 1368HAVE_POPEN 1369HAVE_PCLOSE 1370HAVE_FTELLO 1371HAVE_FSEEKO 1372HAVE_DPRINTF 1373HAVE_DECL_VSNPRINTF 1374HAVE_DECL_SNPRINTF 1375HAVE_DECL_OBSTACK_PRINTF 1376HAVE_DECL_GETLINE 1377HAVE_DECL_GETDELIM 1378HAVE_DECL_FTELLO 1379HAVE_DECL_FSEEKO 1380HAVE_DECL_FPURGE 1381GNULIB_VSPRINTF_POSIX 1382GNULIB_VSNPRINTF 1383GNULIB_VPRINTF_POSIX 1384GNULIB_VPRINTF 1385GNULIB_VFPRINTF_POSIX 1386GNULIB_VFPRINTF 1387GNULIB_VDPRINTF 1388GNULIB_VSCANF 1389GNULIB_VFSCANF 1390GNULIB_VASPRINTF 1391GNULIB_TMPFILE 1392GNULIB_STDIO_H_SIGPIPE 1393GNULIB_STDIO_H_NONBLOCKING 1394GNULIB_SPRINTF_POSIX 1395GNULIB_SNPRINTF 1396GNULIB_SCANF 1397GNULIB_RENAMEAT 1398GNULIB_RENAME 1399GNULIB_REMOVE 1400GNULIB_PUTS 1401GNULIB_PUTCHAR 1402GNULIB_PUTC 1403GNULIB_PRINTF_POSIX 1404GNULIB_PRINTF 1405GNULIB_POPEN 1406GNULIB_PERROR 1407GNULIB_PCLOSE 1408GNULIB_OBSTACK_PRINTF_POSIX 1409GNULIB_OBSTACK_PRINTF 1410GNULIB_GETLINE 1411GNULIB_GETDELIM 1412GNULIB_GETCHAR 1413GNULIB_GETC 1414GNULIB_FWRITE 1415GNULIB_FTELLO 1416GNULIB_FTELL 1417GNULIB_FSEEKO 1418GNULIB_FSEEK 1419GNULIB_FSCANF 1420GNULIB_FREOPEN 1421GNULIB_FREAD 1422GNULIB_FPUTS 1423GNULIB_FPUTC 1424GNULIB_FPURGE 1425GNULIB_FPRINTF_POSIX 1426GNULIB_FPRINTF 1427GNULIB_FOPEN 1428GNULIB_FGETS 1429GNULIB_FGETC 1430GNULIB_FFLUSH 1431GNULIB_FDOPEN 1432GNULIB_FCLOSE 1433GNULIB_DPRINTF 1434REPLACE_ITOLD 1435GL_GENERATE_FLOAT_H_FALSE 1436GL_GENERATE_FLOAT_H_TRUE 1437FLOAT_H 1438NEXT_AS_FIRST_DIRECTIVE_FLOAT_H 1439NEXT_FLOAT_H 1440NEXT_AS_FIRST_DIRECTIVE_FCNTL_H 1441NEXT_FCNTL_H 1442REPLACE_OPENAT 1443REPLACE_OPEN 1444REPLACE_FCNTL 1445HAVE_OPENAT 1446HAVE_FCNTL 1447GNULIB_OPENAT 1448GNULIB_OPEN 1449GNULIB_NONBLOCKING 1450GNULIB_FCNTL 1451EOVERFLOW_VALUE 1452EOVERFLOW_HIDDEN 1453ENOLINK_VALUE 1454ENOLINK_HIDDEN 1455EMULTIHOP_VALUE 1456EMULTIHOP_HIDDEN 1457GL_GENERATE_ERRNO_H_FALSE 1458GL_GENERATE_ERRNO_H_TRUE 1459ERRNO_H 1460NEXT_AS_FIRST_DIRECTIVE_ERRNO_H 1461NEXT_ERRNO_H 1462PRAGMA_COLUMNS 1463PRAGMA_SYSTEM_HEADER 1464INCLUDE_NEXT_AS_FIRST_DIRECTIVE 1465INCLUDE_NEXT 1466pkglibexecdir 1467lispdir 1468HAVE_WINSOCK2_H 1469HAVE_MSVC_INVALID_PARAMETER_HANDLER 1470UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS 1471UNISTD_H_HAVE_WINSOCK2_H 1472REPLACE_WRITE 1473REPLACE_USLEEP 1474REPLACE_UNLINKAT 1475REPLACE_UNLINK 1476REPLACE_TTYNAME_R 1477REPLACE_SYMLINK 1478REPLACE_SLEEP 1479REPLACE_RMDIR 1480REPLACE_READLINK 1481REPLACE_READ 1482REPLACE_PWRITE 1483REPLACE_PREAD 1484REPLACE_LSEEK 1485REPLACE_LINKAT 1486REPLACE_LINK 1487REPLACE_LCHOWN 1488REPLACE_ISATTY 1489REPLACE_GETPAGESIZE 1490REPLACE_GETGROUPS 1491REPLACE_GETLOGIN_R 1492REPLACE_GETDOMAINNAME 1493REPLACE_GETCWD 1494REPLACE_FTRUNCATE 1495REPLACE_FCHOWNAT 1496REPLACE_DUP2 1497REPLACE_DUP 1498REPLACE_CLOSE 1499REPLACE_CHOWN 1500HAVE_SYS_PARAM_H 1501HAVE_OS_H 1502HAVE_DECL_TTYNAME_R 1503HAVE_DECL_SETHOSTNAME 1504HAVE_DECL_GETUSERSHELL 1505HAVE_DECL_GETPAGESIZE 1506HAVE_DECL_GETLOGIN_R 1507HAVE_DECL_GETDOMAINNAME 1508HAVE_DECL_FDATASYNC 1509HAVE_DECL_FCHDIR 1510HAVE_DECL_ENVIRON 1511HAVE_USLEEP 1512HAVE_UNLINKAT 1513HAVE_SYMLINKAT 1514HAVE_SYMLINK 1515HAVE_SLEEP 1516HAVE_SETHOSTNAME 1517HAVE_READLINKAT 1518HAVE_READLINK 1519HAVE_PWRITE 1520HAVE_PREAD 1521HAVE_PIPE2 1522HAVE_PIPE 1523HAVE_LINKAT 1524HAVE_LINK 1525HAVE_LCHOWN 1526HAVE_GROUP_MEMBER 1527HAVE_GETPAGESIZE 1528HAVE_GETLOGIN 1529HAVE_GETHOSTNAME 1530HAVE_GETGROUPS 1531HAVE_GETDTABLESIZE 1532HAVE_FTRUNCATE 1533HAVE_FSYNC 1534HAVE_FDATASYNC 1535HAVE_FCHOWNAT 1536HAVE_FCHDIR 1537HAVE_FACCESSAT 1538HAVE_EUIDACCESS 1539HAVE_DUP3 1540HAVE_DUP2 1541HAVE_CHOWN 1542GNULIB_WRITE 1543GNULIB_USLEEP 1544GNULIB_UNLINKAT 1545GNULIB_UNLINK 1546GNULIB_UNISTD_H_SIGPIPE 1547GNULIB_UNISTD_H_NONBLOCKING 1548GNULIB_TTYNAME_R 1549GNULIB_SYMLINKAT 1550GNULIB_SYMLINK 1551GNULIB_SLEEP 1552GNULIB_SETHOSTNAME 1553GNULIB_RMDIR 1554GNULIB_READLINKAT 1555GNULIB_READLINK 1556GNULIB_READ 1557GNULIB_PWRITE 1558GNULIB_PREAD 1559GNULIB_PIPE2 1560GNULIB_PIPE 1561GNULIB_LSEEK 1562GNULIB_LINKAT 1563GNULIB_LINK 1564GNULIB_LCHOWN 1565GNULIB_ISATTY 1566GNULIB_GROUP_MEMBER 1567GNULIB_GETUSERSHELL 1568GNULIB_GETPAGESIZE 1569GNULIB_GETLOGIN_R 1570GNULIB_GETLOGIN 1571GNULIB_GETHOSTNAME 1572GNULIB_GETGROUPS 1573GNULIB_GETDTABLESIZE 1574GNULIB_GETDOMAINNAME 1575GNULIB_GETCWD 1576GNULIB_FTRUNCATE 1577GNULIB_FSYNC 1578GNULIB_FDATASYNC 1579GNULIB_FCHOWNAT 1580GNULIB_FCHDIR 1581GNULIB_FACCESSAT 1582GNULIB_EUIDACCESS 1583GNULIB_ENVIRON 1584GNULIB_DUP3 1585GNULIB_DUP2 1586GNULIB_DUP 1587GNULIB_CLOSE 1588GNULIB_CHOWN 1589GNULIB_CHDIR 1590REPLACE_WCTOMB 1591REPLACE_UNSETENV 1592REPLACE_STRTOD 1593REPLACE_SETENV 1594REPLACE_REALPATH 1595REPLACE_REALLOC 1596REPLACE_RANDOM_R 1597REPLACE_PUTENV 1598REPLACE_PTSNAME_R 1599REPLACE_PTSNAME 1600REPLACE_MKSTEMP 1601REPLACE_MBTOWC 1602REPLACE_MALLOC 1603REPLACE_CANONICALIZE_FILE_NAME 1604REPLACE_CALLOC 1605HAVE_DECL_UNSETENV 1606HAVE_UNLOCKPT 1607HAVE_SYS_LOADAVG_H 1608HAVE_STRUCT_RANDOM_DATA 1609HAVE_STRTOULL 1610HAVE_STRTOLL 1611HAVE_STRTOD 1612HAVE_DECL_SETENV 1613HAVE_SETENV 1614HAVE_RPMATCH 1615HAVE_REALPATH 1616HAVE_RANDOM_R 1617HAVE_RANDOM_H 1618HAVE_RANDOM 1619HAVE_PTSNAME_R 1620HAVE_PTSNAME 1621HAVE_POSIX_OPENPT 1622HAVE_MKSTEMPS 1623HAVE_MKSTEMP 1624HAVE_MKOSTEMPS 1625HAVE_MKOSTEMP 1626HAVE_MKDTEMP 1627HAVE_GRANTPT 1628HAVE_GETSUBOPT 1629HAVE_DECL_GETLOADAVG 1630HAVE_CANONICALIZE_FILE_NAME 1631HAVE_ATOLL 1632HAVE__EXIT 1633GNULIB_WCTOMB 1634GNULIB_UNSETENV 1635GNULIB_UNLOCKPT 1636GNULIB_SYSTEM_POSIX 1637GNULIB_STRTOULL 1638GNULIB_STRTOLL 1639GNULIB_STRTOD 1640GNULIB_SETENV 1641GNULIB_RPMATCH 1642GNULIB_REALPATH 1643GNULIB_REALLOC_POSIX 1644GNULIB_RANDOM_R 1645GNULIB_RANDOM 1646GNULIB_PUTENV 1647GNULIB_PTSNAME_R 1648GNULIB_PTSNAME 1649GNULIB_POSIX_OPENPT 1650GNULIB_MKSTEMPS 1651GNULIB_MKSTEMP 1652GNULIB_MKOSTEMPS 1653GNULIB_MKOSTEMP 1654GNULIB_MKDTEMP 1655GNULIB_MBTOWC 1656GNULIB_MALLOC_POSIX 1657GNULIB_GRANTPT 1658GNULIB_GETSUBOPT 1659GNULIB_GETLOADAVG 1660GNULIB_CANONICALIZE_FILE_NAME 1661GNULIB_CALLOC_POSIX 1662GNULIB_ATOLL 1663GNULIB__EXIT 1664GL_GENERATE_ALLOCA_H_FALSE 1665GL_GENERATE_ALLOCA_H_TRUE 1666ALLOCA_H 1667ALLOCA 1668GL_COND_LIBTOOL_FALSE 1669GL_COND_LIBTOOL_TRUE 1670XSLTPROC 1671HELP2MAN 1672PERL 1673M4_DEBUGFILE 1674M4_GNU 1675M4 1676YFLAGS 1677YACC 1678LEXLIB 1679LEX_OUTPUT_ROOT 1680LEX_IS_FLEX 1681LEX 1682DOT 1683YACC_LIBRARY 1684YACC_SCRIPT 1685CXX_COMPILER_POSIXLY_CORRECT 1686BISON_CXX_WORKS_FALSE 1687BISON_CXX_WORKS_TRUE 1688BISON_CXX_WORKS 1689C_COMPILER_POSIXLY_CORRECT 1690BISON_C_WORKS 1691WARN_CXXFLAGS_TEST 1692WERROR_CXXFLAGS 1693WARN_CXXFLAGS 1694WARN_CFLAGS_TEST 1695WERROR_CFLAGS 1696WARN_CFLAGS 1697host_os 1698host_vendor 1699host_cpu 1700host 1701build_os 1702build_vendor 1703build_cpu 1704build 1705RANLIB 1706ARFLAGS 1707AR 1708EGREP 1709GREP 1710CPP 1711am__fastdepCXX_FALSE 1712am__fastdepCXX_TRUE 1713CXXDEPMODE 1714ac_ct_CXX 1715CXXFLAGS 1716CXX 1717am__fastdepCC_FALSE 1718am__fastdepCC_TRUE 1719CCDEPMODE 1720am__nodep 1721AMDEPBACKSLASH 1722AMDEP_FALSE 1723AMDEP_TRUE 1724am__quote 1725am__include 1726DEPDIR 1727OBJEXT 1728EXEEXT 1729ac_ct_CC 1730CPPFLAGS 1731LDFLAGS 1732CFLAGS 1733CC 1734AM_BACKSLASH 1735AM_DEFAULT_VERBOSITY 1736AM_DEFAULT_V 1737AM_V 1738am__untar 1739am__tar 1740AMTAR 1741am__leading_dot 1742SET_MAKE 1743AWK 1744mkdir_p 1745MKDIR_P 1746INSTALL_STRIP_PROGRAM 1747STRIP 1748install_sh 1749MAKEINFO 1750AUTOHEADER 1751AUTOMAKE 1752AUTOCONF 1753ACLOCAL 1754VERSION 1755PACKAGE 1756CYGPATH_W 1757am__isrc 1758INSTALL_DATA 1759INSTALL_SCRIPT 1760INSTALL_PROGRAM 1761PACKAGE_COPYRIGHT_YEAR 1762target_alias 1763host_alias 1764build_alias 1765LIBS 1766ECHO_T 1767ECHO_N 1768ECHO_C 1769DEFS 1770mandir 1771localedir 1772libdir 1773psdir 1774pdfdir 1775dvidir 1776htmldir 1777infodir 1778docdir 1779oldincludedir 1780includedir 1781localstatedir 1782sharedstatedir 1783sysconfdir 1784datadir 1785datarootdir 1786libexecdir 1787sbindir 1788bindir 1789program_transform_name 1790prefix 1791exec_prefix 1792PACKAGE_URL 1793PACKAGE_BUGREPORT 1794PACKAGE_STRING 1795PACKAGE_VERSION 1796PACKAGE_TARNAME 1797PACKAGE_NAME 1798PATH_SEPARATOR 1799SHELL' 1800ac_subst_files='' 1801ac_user_opts=' 1802enable_option_checking 1803enable_silent_rules 1804enable_dependency_tracking 1805enable_largefile 1806enable_threads 1807enable_gcc_warnings 1808enable_yacc 1809enable_assert 1810with_gnu_ld 1811enable_rpath 1812with_libpth_prefix 1813with_dmalloc 1814enable_nls 1815with_libiconv_prefix 1816with_libintl_prefix 1817' 1818 ac_precious_vars='build_alias 1819host_alias 1820target_alias 1821CC 1822CFLAGS 1823LDFLAGS 1824LIBS 1825CPPFLAGS 1826CXX 1827CXXFLAGS 1828CCC 1829CPP 1830YACC 1831YFLAGS 1832M4' 1833 1834 1835# Initialize some variables set by options. 1836ac_init_help= 1837ac_init_version=false 1838ac_unrecognized_opts= 1839ac_unrecognized_sep= 1840# The variables have the same names as the options, with 1841# dashes changed to underlines. 1842cache_file=/dev/null 1843exec_prefix=NONE 1844no_create= 1845no_recursion= 1846prefix=NONE 1847program_prefix=NONE 1848program_suffix=NONE 1849program_transform_name=s,x,x, 1850silent= 1851site= 1852srcdir= 1853verbose= 1854x_includes=NONE 1855x_libraries=NONE 1856 1857# Installation directory options. 1858# These are left unexpanded so users can "make install exec_prefix=/foo" 1859# and all the variables that are supposed to be based on exec_prefix 1860# by default will actually change. 1861# Use braces instead of parens because sh, perl, etc. also accept them. 1862# (The list follows the same order as the GNU Coding Standards.) 1863bindir='${exec_prefix}/bin' 1864sbindir='${exec_prefix}/sbin' 1865libexecdir='${exec_prefix}/libexec' 1866datarootdir='${prefix}/share' 1867datadir='${datarootdir}' 1868sysconfdir='${prefix}/etc' 1869sharedstatedir='${prefix}/com' 1870localstatedir='${prefix}/var' 1871includedir='${prefix}/include' 1872oldincludedir='/usr/include' 1873docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' 1874infodir='${datarootdir}/info' 1875htmldir='${docdir}' 1876dvidir='${docdir}' 1877pdfdir='${docdir}' 1878psdir='${docdir}' 1879libdir='${exec_prefix}/lib' 1880localedir='${datarootdir}/locale' 1881mandir='${datarootdir}/man' 1882 1883ac_prev= 1884ac_dashdash= 1885for ac_option 1886do 1887 # If the previous option needs an argument, assign it. 1888 if test -n "$ac_prev"; then 1889 eval $ac_prev=\$ac_option 1890 ac_prev= 1891 continue 1892 fi 1893 1894 case $ac_option in 1895 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; 1896 *=) ac_optarg= ;; 1897 *) ac_optarg=yes ;; 1898 esac 1899 1900 # Accept the important Cygnus configure options, so we can diagnose typos. 1901 1902 case $ac_dashdash$ac_option in 1903 --) 1904 ac_dashdash=yes ;; 1905 1906 -bindir | --bindir | --bindi | --bind | --bin | --bi) 1907 ac_prev=bindir ;; 1908 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) 1909 bindir=$ac_optarg ;; 1910 1911 -build | --build | --buil | --bui | --bu) 1912 ac_prev=build_alias ;; 1913 -build=* | --build=* | --buil=* | --bui=* | --bu=*) 1914 build_alias=$ac_optarg ;; 1915 1916 -cache-file | --cache-file | --cache-fil | --cache-fi \ 1917 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) 1918 ac_prev=cache_file ;; 1919 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ 1920 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) 1921 cache_file=$ac_optarg ;; 1922 1923 --config-cache | -C) 1924 cache_file=config.cache ;; 1925 1926 -datadir | --datadir | --datadi | --datad) 1927 ac_prev=datadir ;; 1928 -datadir=* | --datadir=* | --datadi=* | --datad=*) 1929 datadir=$ac_optarg ;; 1930 1931 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ 1932 | --dataroo | --dataro | --datar) 1933 ac_prev=datarootdir ;; 1934 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ 1935 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) 1936 datarootdir=$ac_optarg ;; 1937 1938 -disable-* | --disable-*) 1939 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` 1940 # Reject names that are not valid shell variable names. 1941 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1942 as_fn_error $? "invalid feature name: $ac_useropt" 1943 ac_useropt_orig=$ac_useropt 1944 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1945 case $ac_user_opts in 1946 *" 1947"enable_$ac_useropt" 1948"*) ;; 1949 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" 1950 ac_unrecognized_sep=', ';; 1951 esac 1952 eval enable_$ac_useropt=no ;; 1953 1954 -docdir | --docdir | --docdi | --doc | --do) 1955 ac_prev=docdir ;; 1956 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) 1957 docdir=$ac_optarg ;; 1958 1959 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) 1960 ac_prev=dvidir ;; 1961 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) 1962 dvidir=$ac_optarg ;; 1963 1964 -enable-* | --enable-*) 1965 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` 1966 # Reject names that are not valid shell variable names. 1967 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 1968 as_fn_error $? "invalid feature name: $ac_useropt" 1969 ac_useropt_orig=$ac_useropt 1970 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 1971 case $ac_user_opts in 1972 *" 1973"enable_$ac_useropt" 1974"*) ;; 1975 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" 1976 ac_unrecognized_sep=', ';; 1977 esac 1978 eval enable_$ac_useropt=\$ac_optarg ;; 1979 1980 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ 1981 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ 1982 | --exec | --exe | --ex) 1983 ac_prev=exec_prefix ;; 1984 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ 1985 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ 1986 | --exec=* | --exe=* | --ex=*) 1987 exec_prefix=$ac_optarg ;; 1988 1989 -gas | --gas | --ga | --g) 1990 # Obsolete; use --with-gas. 1991 with_gas=yes ;; 1992 1993 -help | --help | --hel | --he | -h) 1994 ac_init_help=long ;; 1995 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) 1996 ac_init_help=recursive ;; 1997 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) 1998 ac_init_help=short ;; 1999 2000 -host | --host | --hos | --ho) 2001 ac_prev=host_alias ;; 2002 -host=* | --host=* | --hos=* | --ho=*) 2003 host_alias=$ac_optarg ;; 2004 2005 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) 2006 ac_prev=htmldir ;; 2007 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ 2008 | --ht=*) 2009 htmldir=$ac_optarg ;; 2010 2011 -includedir | --includedir | --includedi | --included | --include \ 2012 | --includ | --inclu | --incl | --inc) 2013 ac_prev=includedir ;; 2014 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ 2015 | --includ=* | --inclu=* | --incl=* | --inc=*) 2016 includedir=$ac_optarg ;; 2017 2018 -infodir | --infodir | --infodi | --infod | --info | --inf) 2019 ac_prev=infodir ;; 2020 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) 2021 infodir=$ac_optarg ;; 2022 2023 -libdir | --libdir | --libdi | --libd) 2024 ac_prev=libdir ;; 2025 -libdir=* | --libdir=* | --libdi=* | --libd=*) 2026 libdir=$ac_optarg ;; 2027 2028 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ 2029 | --libexe | --libex | --libe) 2030 ac_prev=libexecdir ;; 2031 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ 2032 | --libexe=* | --libex=* | --libe=*) 2033 libexecdir=$ac_optarg ;; 2034 2035 -localedir | --localedir | --localedi | --localed | --locale) 2036 ac_prev=localedir ;; 2037 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) 2038 localedir=$ac_optarg ;; 2039 2040 -localstatedir | --localstatedir | --localstatedi | --localstated \ 2041 | --localstate | --localstat | --localsta | --localst | --locals) 2042 ac_prev=localstatedir ;; 2043 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ 2044 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) 2045 localstatedir=$ac_optarg ;; 2046 2047 -mandir | --mandir | --mandi | --mand | --man | --ma | --m) 2048 ac_prev=mandir ;; 2049 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) 2050 mandir=$ac_optarg ;; 2051 2052 -nfp | --nfp | --nf) 2053 # Obsolete; use --without-fp. 2054 with_fp=no ;; 2055 2056 -no-create | --no-create | --no-creat | --no-crea | --no-cre \ 2057 | --no-cr | --no-c | -n) 2058 no_create=yes ;; 2059 2060 -no-recursion | --no-recursion | --no-recursio | --no-recursi \ 2061 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) 2062 no_recursion=yes ;; 2063 2064 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ 2065 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ 2066 | --oldin | --oldi | --old | --ol | --o) 2067 ac_prev=oldincludedir ;; 2068 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ 2069 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ 2070 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) 2071 oldincludedir=$ac_optarg ;; 2072 2073 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) 2074 ac_prev=prefix ;; 2075 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) 2076 prefix=$ac_optarg ;; 2077 2078 -program-prefix | --program-prefix | --program-prefi | --program-pref \ 2079 | --program-pre | --program-pr | --program-p) 2080 ac_prev=program_prefix ;; 2081 -program-prefix=* | --program-prefix=* | --program-prefi=* \ 2082 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) 2083 program_prefix=$ac_optarg ;; 2084 2085 -program-suffix | --program-suffix | --program-suffi | --program-suff \ 2086 | --program-suf | --program-su | --program-s) 2087 ac_prev=program_suffix ;; 2088 -program-suffix=* | --program-suffix=* | --program-suffi=* \ 2089 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) 2090 program_suffix=$ac_optarg ;; 2091 2092 -program-transform-name | --program-transform-name \ 2093 | --program-transform-nam | --program-transform-na \ 2094 | --program-transform-n | --program-transform- \ 2095 | --program-transform | --program-transfor \ 2096 | --program-transfo | --program-transf \ 2097 | --program-trans | --program-tran \ 2098 | --progr-tra | --program-tr | --program-t) 2099 ac_prev=program_transform_name ;; 2100 -program-transform-name=* | --program-transform-name=* \ 2101 | --program-transform-nam=* | --program-transform-na=* \ 2102 | --program-transform-n=* | --program-transform-=* \ 2103 | --program-transform=* | --program-transfor=* \ 2104 | --program-transfo=* | --program-transf=* \ 2105 | --program-trans=* | --program-tran=* \ 2106 | --progr-tra=* | --program-tr=* | --program-t=*) 2107 program_transform_name=$ac_optarg ;; 2108 2109 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) 2110 ac_prev=pdfdir ;; 2111 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) 2112 pdfdir=$ac_optarg ;; 2113 2114 -psdir | --psdir | --psdi | --psd | --ps) 2115 ac_prev=psdir ;; 2116 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) 2117 psdir=$ac_optarg ;; 2118 2119 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 2120 | -silent | --silent | --silen | --sile | --sil) 2121 silent=yes ;; 2122 2123 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) 2124 ac_prev=sbindir ;; 2125 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ 2126 | --sbi=* | --sb=*) 2127 sbindir=$ac_optarg ;; 2128 2129 -sharedstatedir | --sharedstatedir | --sharedstatedi \ 2130 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ 2131 | --sharedst | --shareds | --shared | --share | --shar \ 2132 | --sha | --sh) 2133 ac_prev=sharedstatedir ;; 2134 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ 2135 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ 2136 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ 2137 | --sha=* | --sh=*) 2138 sharedstatedir=$ac_optarg ;; 2139 2140 -site | --site | --sit) 2141 ac_prev=site ;; 2142 -site=* | --site=* | --sit=*) 2143 site=$ac_optarg ;; 2144 2145 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) 2146 ac_prev=srcdir ;; 2147 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) 2148 srcdir=$ac_optarg ;; 2149 2150 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ 2151 | --syscon | --sysco | --sysc | --sys | --sy) 2152 ac_prev=sysconfdir ;; 2153 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ 2154 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) 2155 sysconfdir=$ac_optarg ;; 2156 2157 -target | --target | --targe | --targ | --tar | --ta | --t) 2158 ac_prev=target_alias ;; 2159 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) 2160 target_alias=$ac_optarg ;; 2161 2162 -v | -verbose | --verbose | --verbos | --verbo | --verb) 2163 verbose=yes ;; 2164 2165 -version | --version | --versio | --versi | --vers | -V) 2166 ac_init_version=: ;; 2167 2168 -with-* | --with-*) 2169 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` 2170 # Reject names that are not valid shell variable names. 2171 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 2172 as_fn_error $? "invalid package name: $ac_useropt" 2173 ac_useropt_orig=$ac_useropt 2174 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 2175 case $ac_user_opts in 2176 *" 2177"with_$ac_useropt" 2178"*) ;; 2179 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" 2180 ac_unrecognized_sep=', ';; 2181 esac 2182 eval with_$ac_useropt=\$ac_optarg ;; 2183 2184 -without-* | --without-*) 2185 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` 2186 # Reject names that are not valid shell variable names. 2187 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && 2188 as_fn_error $? "invalid package name: $ac_useropt" 2189 ac_useropt_orig=$ac_useropt 2190 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` 2191 case $ac_user_opts in 2192 *" 2193"with_$ac_useropt" 2194"*) ;; 2195 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" 2196 ac_unrecognized_sep=', ';; 2197 esac 2198 eval with_$ac_useropt=no ;; 2199 2200 --x) 2201 # Obsolete; use --with-x. 2202 with_x=yes ;; 2203 2204 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ 2205 | --x-incl | --x-inc | --x-in | --x-i) 2206 ac_prev=x_includes ;; 2207 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ 2208 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) 2209 x_includes=$ac_optarg ;; 2210 2211 -x-libraries | --x-libraries | --x-librarie | --x-librari \ 2212 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) 2213 ac_prev=x_libraries ;; 2214 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ 2215 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) 2216 x_libraries=$ac_optarg ;; 2217 2218 -*) as_fn_error $? "unrecognized option: \`$ac_option' 2219Try \`$0 --help' for more information" 2220 ;; 2221 2222 *=*) 2223 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` 2224 # Reject names that are not valid shell variable names. 2225 case $ac_envvar in #( 2226 '' | [0-9]* | *[!_$as_cr_alnum]* ) 2227 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; 2228 esac 2229 eval $ac_envvar=\$ac_optarg 2230 export $ac_envvar ;; 2231 2232 *) 2233 # FIXME: should be removed in autoconf 3.0. 2234 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 2235 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && 2236 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 2237 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" 2238 ;; 2239 2240 esac 2241done 2242 2243if test -n "$ac_prev"; then 2244 ac_option=--`echo $ac_prev | sed 's/_/-/g'` 2245 as_fn_error $? "missing argument to $ac_option" 2246fi 2247 2248if test -n "$ac_unrecognized_opts"; then 2249 case $enable_option_checking in 2250 no) ;; 2251 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; 2252 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; 2253 esac 2254fi 2255 2256# Check all directory arguments for consistency. 2257for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ 2258 datadir sysconfdir sharedstatedir localstatedir includedir \ 2259 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ 2260 libdir localedir mandir 2261do 2262 eval ac_val=\$$ac_var 2263 # Remove trailing slashes. 2264 case $ac_val in 2265 */ ) 2266 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` 2267 eval $ac_var=\$ac_val;; 2268 esac 2269 # Be sure to have absolute directory names. 2270 case $ac_val in 2271 [\\/$]* | ?:[\\/]* ) continue;; 2272 NONE | '' ) case $ac_var in *prefix ) continue;; esac;; 2273 esac 2274 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" 2275done 2276 2277# There might be people who depend on the old broken behavior: `$host' 2278# used to hold the argument of --host etc. 2279# FIXME: To remove some day. 2280build=$build_alias 2281host=$host_alias 2282target=$target_alias 2283 2284# FIXME: To remove some day. 2285if test "x$host_alias" != x; then 2286 if test "x$build_alias" = x; then 2287 cross_compiling=maybe 2288 elif test "x$build_alias" != "x$host_alias"; then 2289 cross_compiling=yes 2290 fi 2291fi 2292 2293ac_tool_prefix= 2294test -n "$host_alias" && ac_tool_prefix=$host_alias- 2295 2296test "$silent" = yes && exec 6>/dev/null 2297 2298 2299ac_pwd=`pwd` && test -n "$ac_pwd" && 2300ac_ls_di=`ls -di .` && 2301ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || 2302 as_fn_error $? "working directory cannot be determined" 2303test "X$ac_ls_di" = "X$ac_pwd_ls_di" || 2304 as_fn_error $? "pwd does not report name of working directory" 2305 2306 2307# Find the source files, if location was not specified. 2308if test -z "$srcdir"; then 2309 ac_srcdir_defaulted=yes 2310 # Try the directory containing this script, then the parent directory. 2311 ac_confdir=`$as_dirname -- "$as_myself" || 2312$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 2313 X"$as_myself" : 'X\(//\)[^/]' \| \ 2314 X"$as_myself" : 'X\(//\)$' \| \ 2315 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || 2316$as_echo X"$as_myself" | 2317 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 2318 s//\1/ 2319 q 2320 } 2321 /^X\(\/\/\)[^/].*/{ 2322 s//\1/ 2323 q 2324 } 2325 /^X\(\/\/\)$/{ 2326 s//\1/ 2327 q 2328 } 2329 /^X\(\/\).*/{ 2330 s//\1/ 2331 q 2332 } 2333 s/.*/./; q'` 2334 srcdir=$ac_confdir 2335 if test ! -r "$srcdir/$ac_unique_file"; then 2336 srcdir=.. 2337 fi 2338else 2339 ac_srcdir_defaulted=no 2340fi 2341if test ! -r "$srcdir/$ac_unique_file"; then 2342 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." 2343 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" 2344fi 2345ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" 2346ac_abs_confdir=`( 2347 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" 2348 pwd)` 2349# When building in place, set srcdir=. 2350if test "$ac_abs_confdir" = "$ac_pwd"; then 2351 srcdir=. 2352fi 2353# Remove unnecessary trailing slashes from srcdir. 2354# Double slashes in file names in object file debugging info 2355# mess up M-x gdb in Emacs. 2356case $srcdir in 2357*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; 2358esac 2359for ac_var in $ac_precious_vars; do 2360 eval ac_env_${ac_var}_set=\${${ac_var}+set} 2361 eval ac_env_${ac_var}_value=\$${ac_var} 2362 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} 2363 eval ac_cv_env_${ac_var}_value=\$${ac_var} 2364done 2365 2366# 2367# Report the --help message. 2368# 2369if test "$ac_init_help" = "long"; then 2370 # Omit some internal or obsolete options to make the list less imposing. 2371 # This message is too long to be a string in the A/UX 3.1 sh. 2372 cat <<_ACEOF 2373\`configure' configures GNU Bison 2.7 to adapt to many kinds of systems. 2374 2375Usage: $0 [OPTION]... [VAR=VALUE]... 2376 2377To assign environment variables (e.g., CC, CFLAGS...), specify them as 2378VAR=VALUE. See below for descriptions of some of the useful variables. 2379 2380Defaults for the options are specified in brackets. 2381 2382Configuration: 2383 -h, --help display this help and exit 2384 --help=short display options specific to this package 2385 --help=recursive display the short help of all the included packages 2386 -V, --version display version information and exit 2387 -q, --quiet, --silent do not print \`checking ...' messages 2388 --cache-file=FILE cache test results in FILE [disabled] 2389 -C, --config-cache alias for \`--cache-file=config.cache' 2390 -n, --no-create do not create output files 2391 --srcdir=DIR find the sources in DIR [configure dir or \`..'] 2392 2393Installation directories: 2394 --prefix=PREFIX install architecture-independent files in PREFIX 2395 [$ac_default_prefix] 2396 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX 2397 [PREFIX] 2398 2399By default, \`make install' will install all the files in 2400\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify 2401an installation prefix other than \`$ac_default_prefix' using \`--prefix', 2402for instance \`--prefix=\$HOME'. 2403 2404For better control, use the options below. 2405 2406Fine tuning of the installation directories: 2407 --bindir=DIR user executables [EPREFIX/bin] 2408 --sbindir=DIR system admin executables [EPREFIX/sbin] 2409 --libexecdir=DIR program executables [EPREFIX/libexec] 2410 --sysconfdir=DIR read-only single-machine data [PREFIX/etc] 2411 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] 2412 --localstatedir=DIR modifiable single-machine data [PREFIX/var] 2413 --libdir=DIR object code libraries [EPREFIX/lib] 2414 --includedir=DIR C header files [PREFIX/include] 2415 --oldincludedir=DIR C header files for non-gcc [/usr/include] 2416 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] 2417 --datadir=DIR read-only architecture-independent data [DATAROOTDIR] 2418 --infodir=DIR info documentation [DATAROOTDIR/info] 2419 --localedir=DIR locale-dependent data [DATAROOTDIR/locale] 2420 --mandir=DIR man documentation [DATAROOTDIR/man] 2421 --docdir=DIR documentation root [DATAROOTDIR/doc/bison] 2422 --htmldir=DIR html documentation [DOCDIR] 2423 --dvidir=DIR dvi documentation [DOCDIR] 2424 --pdfdir=DIR pdf documentation [DOCDIR] 2425 --psdir=DIR ps documentation [DOCDIR] 2426_ACEOF 2427 2428 cat <<\_ACEOF 2429 2430Program names: 2431 --program-prefix=PREFIX prepend PREFIX to installed program names 2432 --program-suffix=SUFFIX append SUFFIX to installed program names 2433 --program-transform-name=PROGRAM run sed PROGRAM on installed program names 2434 2435System types: 2436 --build=BUILD configure for building on BUILD [guessed] 2437 --host=HOST cross-compile to build programs to run on HOST [BUILD] 2438_ACEOF 2439fi 2440 2441if test -n "$ac_init_help"; then 2442 case $ac_init_help in 2443 short | recursive ) echo "Configuration of GNU Bison 2.7:";; 2444 esac 2445 cat <<\_ACEOF 2446 2447Optional Features: 2448 --disable-option-checking ignore unrecognized --enable/--with options 2449 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) 2450 --enable-FEATURE[=ARG] include FEATURE [ARG=yes] 2451 --enable-silent-rules less verbose build output (undo: "make V=1") 2452 --disable-silent-rules verbose build output (undo: "make V=0") 2453 --enable-dependency-tracking 2454 do not reject slow dependency extractors 2455 --disable-dependency-tracking 2456 speeds up one-time build 2457 --disable-largefile omit support for large files 2458 --enable-threads={posix|solaris|pth|windows} 2459 specify multithreading API 2460 --disable-threads build without multithread safety 2461 --enable-gcc-warnings turn on lots of GCC warnings (not recommended) 2462 --disable-yacc do not build a yacc command or an -ly library 2463 --disable-assert turn off assertions 2464 --disable-rpath do not hardcode runtime library paths 2465 --disable-nls do not use Native Language Support 2466 2467Optional Packages: 2468 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] 2469 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) 2470 --with-gnu-ld assume the C compiler uses GNU ld [default=no] 2471 --with-libpth-prefix[=DIR] search for libpth in DIR/include and DIR/lib 2472 --without-libpth-prefix don't search for libpth in includedir and libdir 2473 --with-dmalloc use dmalloc, as in 2474 http://www.dmalloc.com/dmalloc.tar.gz 2475 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib 2476 --without-libiconv-prefix don't search for libiconv in includedir and libdir 2477 --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib 2478 --without-libintl-prefix don't search for libintl in includedir and libdir 2479 2480Some influential environment variables: 2481 CC C compiler command 2482 CFLAGS C compiler flags 2483 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a 2484 nonstandard directory <lib dir> 2485 LIBS libraries to pass to the linker, e.g. -l<library> 2486 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if 2487 you have headers in a nonstandard directory <include dir> 2488 CXX C++ compiler command 2489 CXXFLAGS C++ compiler flags 2490 CPP C preprocessor 2491 YACC The `Yet Another Compiler Compiler' implementation to use. 2492 Defaults to the first program found out of: `bison -y', `byacc', 2493 `yacc'. 2494 YFLAGS The list of arguments that will be passed by default to $YACC. 2495 This script will default YFLAGS to the empty string to avoid a 2496 default value of `-d' given by some make applications. 2497 M4 Location of GNU M4 1.4.6 or later. Defaults to the first program 2498 of 'm4', 'gm4', or 'gnum4' on PATH that meets Autoconf needs. 2499 2500Use these variables to override the choices made by `configure' or to help 2501it to find libraries and programs with nonstandard names/locations. 2502 2503Report bugs to <bug-bison@gnu.org>. 2504GNU Bison home page: <http://www.gnu.org/software/bison/>. 2505General help using GNU software: <http://www.gnu.org/gethelp/>. 2506_ACEOF 2507ac_status=$? 2508fi 2509 2510if test "$ac_init_help" = "recursive"; then 2511 # If there are subdirs, report their specific --help. 2512 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue 2513 test -d "$ac_dir" || 2514 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || 2515 continue 2516 ac_builddir=. 2517 2518case "$ac_dir" in 2519.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 2520*) 2521 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 2522 # A ".." for each directory in $ac_dir_suffix. 2523 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 2524 case $ac_top_builddir_sub in 2525 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 2526 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 2527 esac ;; 2528esac 2529ac_abs_top_builddir=$ac_pwd 2530ac_abs_builddir=$ac_pwd$ac_dir_suffix 2531# for backward compatibility: 2532ac_top_builddir=$ac_top_build_prefix 2533 2534case $srcdir in 2535 .) # We are building in place. 2536 ac_srcdir=. 2537 ac_top_srcdir=$ac_top_builddir_sub 2538 ac_abs_top_srcdir=$ac_pwd ;; 2539 [\\/]* | ?:[\\/]* ) # Absolute name. 2540 ac_srcdir=$srcdir$ac_dir_suffix; 2541 ac_top_srcdir=$srcdir 2542 ac_abs_top_srcdir=$srcdir ;; 2543 *) # Relative name. 2544 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 2545 ac_top_srcdir=$ac_top_build_prefix$srcdir 2546 ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 2547esac 2548ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 2549 2550 cd "$ac_dir" || { ac_status=$?; continue; } 2551 # Check for guested configure. 2552 if test -f "$ac_srcdir/configure.gnu"; then 2553 echo && 2554 $SHELL "$ac_srcdir/configure.gnu" --help=recursive 2555 elif test -f "$ac_srcdir/configure"; then 2556 echo && 2557 $SHELL "$ac_srcdir/configure" --help=recursive 2558 else 2559 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 2560 fi || ac_status=$? 2561 cd "$ac_pwd" || { ac_status=$?; break; } 2562 done 2563fi 2564 2565test -n "$ac_init_help" && exit $ac_status 2566if $ac_init_version; then 2567 cat <<\_ACEOF 2568GNU Bison configure 2.7 2569generated by GNU Autoconf 2.69 2570 2571Copyright (C) 2012 Free Software Foundation, Inc. 2572This configure script is free software; the Free Software Foundation 2573gives unlimited permission to copy, distribute and modify it. 2574_ACEOF 2575 exit 2576fi 2577 2578## ------------------------ ## 2579## Autoconf initialization. ## 2580## ------------------------ ## 2581 2582# ac_fn_c_try_compile LINENO 2583# -------------------------- 2584# Try to compile conftest.$ac_ext, and return whether this succeeded. 2585ac_fn_c_try_compile () 2586{ 2587 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2588 rm -f conftest.$ac_objext 2589 if { { ac_try="$ac_compile" 2590case "(($ac_try" in 2591 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2592 *) ac_try_echo=$ac_try;; 2593esac 2594eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2595$as_echo "$ac_try_echo"; } >&5 2596 (eval "$ac_compile") 2>conftest.err 2597 ac_status=$? 2598 if test -s conftest.err; then 2599 grep -v '^ *+' conftest.err >conftest.er1 2600 cat conftest.er1 >&5 2601 mv -f conftest.er1 conftest.err 2602 fi 2603 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2604 test $ac_status = 0; } && { 2605 test -z "$ac_c_werror_flag" || 2606 test ! -s conftest.err 2607 } && test -s conftest.$ac_objext; then : 2608 ac_retval=0 2609else 2610 $as_echo "$as_me: failed program was:" >&5 2611sed 's/^/| /' conftest.$ac_ext >&5 2612 2613 ac_retval=1 2614fi 2615 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2616 as_fn_set_status $ac_retval 2617 2618} # ac_fn_c_try_compile 2619 2620# ac_fn_cxx_try_compile LINENO 2621# ---------------------------- 2622# Try to compile conftest.$ac_ext, and return whether this succeeded. 2623ac_fn_cxx_try_compile () 2624{ 2625 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2626 rm -f conftest.$ac_objext 2627 if { { ac_try="$ac_compile" 2628case "(($ac_try" in 2629 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2630 *) ac_try_echo=$ac_try;; 2631esac 2632eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2633$as_echo "$ac_try_echo"; } >&5 2634 (eval "$ac_compile") 2>conftest.err 2635 ac_status=$? 2636 if test -s conftest.err; then 2637 grep -v '^ *+' conftest.err >conftest.er1 2638 cat conftest.er1 >&5 2639 mv -f conftest.er1 conftest.err 2640 fi 2641 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2642 test $ac_status = 0; } && { 2643 test -z "$ac_cxx_werror_flag" || 2644 test ! -s conftest.err 2645 } && test -s conftest.$ac_objext; then : 2646 ac_retval=0 2647else 2648 $as_echo "$as_me: failed program was:" >&5 2649sed 's/^/| /' conftest.$ac_ext >&5 2650 2651 ac_retval=1 2652fi 2653 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2654 as_fn_set_status $ac_retval 2655 2656} # ac_fn_cxx_try_compile 2657 2658# ac_fn_c_try_cpp LINENO 2659# ---------------------- 2660# Try to preprocess conftest.$ac_ext, and return whether this succeeded. 2661ac_fn_c_try_cpp () 2662{ 2663 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2664 if { { ac_try="$ac_cpp conftest.$ac_ext" 2665case "(($ac_try" in 2666 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2667 *) ac_try_echo=$ac_try;; 2668esac 2669eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2670$as_echo "$ac_try_echo"; } >&5 2671 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err 2672 ac_status=$? 2673 if test -s conftest.err; then 2674 grep -v '^ *+' conftest.err >conftest.er1 2675 cat conftest.er1 >&5 2676 mv -f conftest.er1 conftest.err 2677 fi 2678 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2679 test $ac_status = 0; } > conftest.i && { 2680 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || 2681 test ! -s conftest.err 2682 }; then : 2683 ac_retval=0 2684else 2685 $as_echo "$as_me: failed program was:" >&5 2686sed 's/^/| /' conftest.$ac_ext >&5 2687 2688 ac_retval=1 2689fi 2690 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2691 as_fn_set_status $ac_retval 2692 2693} # ac_fn_c_try_cpp 2694 2695# ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES 2696# ------------------------------------------------------- 2697# Tests whether HEADER exists, giving a warning if it cannot be compiled using 2698# the include files in INCLUDES and setting the cache variable VAR 2699# accordingly. 2700ac_fn_c_check_header_mongrel () 2701{ 2702 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2703 if eval \${$3+:} false; then : 2704 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2705$as_echo_n "checking for $2... " >&6; } 2706if eval \${$3+:} false; then : 2707 $as_echo_n "(cached) " >&6 2708fi 2709eval ac_res=\$$3 2710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2711$as_echo "$ac_res" >&6; } 2712else 2713 # Is the header compilable? 2714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 2715$as_echo_n "checking $2 usability... " >&6; } 2716cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2717/* end confdefs.h. */ 2718$4 2719#include <$2> 2720_ACEOF 2721if ac_fn_c_try_compile "$LINENO"; then : 2722 ac_header_compiler=yes 2723else 2724 ac_header_compiler=no 2725fi 2726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2727{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 2728$as_echo "$ac_header_compiler" >&6; } 2729 2730# Is the header present? 2731{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 2732$as_echo_n "checking $2 presence... " >&6; } 2733cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2734/* end confdefs.h. */ 2735#include <$2> 2736_ACEOF 2737if ac_fn_c_try_cpp "$LINENO"; then : 2738 ac_header_preproc=yes 2739else 2740 ac_header_preproc=no 2741fi 2742rm -f conftest.err conftest.i conftest.$ac_ext 2743{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 2744$as_echo "$ac_header_preproc" >&6; } 2745 2746# So? What about this header? 2747case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( 2748 yes:no: ) 2749 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 2750$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} 2751 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 2752$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} 2753 ;; 2754 no:yes:* ) 2755 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 2756$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} 2757 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 2758$as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} 2759 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 2760$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} 2761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 2762$as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} 2763 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 2764$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} 2765( $as_echo "## -------------------------------- ## 2766## Report this to bug-bison@gnu.org ## 2767## -------------------------------- ##" 2768 ) | sed "s/^/$as_me: WARNING: /" >&2 2769 ;; 2770esac 2771 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2772$as_echo_n "checking for $2... " >&6; } 2773if eval \${$3+:} false; then : 2774 $as_echo_n "(cached) " >&6 2775else 2776 eval "$3=\$ac_header_compiler" 2777fi 2778eval ac_res=\$$3 2779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2780$as_echo "$ac_res" >&6; } 2781fi 2782 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2783 2784} # ac_fn_c_check_header_mongrel 2785 2786# ac_fn_c_try_run LINENO 2787# ---------------------- 2788# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes 2789# that executables *can* be run. 2790ac_fn_c_try_run () 2791{ 2792 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2793 if { { ac_try="$ac_link" 2794case "(($ac_try" in 2795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2796 *) ac_try_echo=$ac_try;; 2797esac 2798eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2799$as_echo "$ac_try_echo"; } >&5 2800 (eval "$ac_link") 2>&5 2801 ac_status=$? 2802 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2803 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' 2804 { { case "(($ac_try" in 2805 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2806 *) ac_try_echo=$ac_try;; 2807esac 2808eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2809$as_echo "$ac_try_echo"; } >&5 2810 (eval "$ac_try") 2>&5 2811 ac_status=$? 2812 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2813 test $ac_status = 0; }; }; then : 2814 ac_retval=0 2815else 2816 $as_echo "$as_me: program exited with status $ac_status" >&5 2817 $as_echo "$as_me: failed program was:" >&5 2818sed 's/^/| /' conftest.$ac_ext >&5 2819 2820 ac_retval=$ac_status 2821fi 2822 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 2823 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2824 as_fn_set_status $ac_retval 2825 2826} # ac_fn_c_try_run 2827 2828# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES 2829# ------------------------------------------------------- 2830# Tests whether HEADER exists and can be compiled using the include files in 2831# INCLUDES, setting the cache variable VAR accordingly. 2832ac_fn_c_check_header_compile () 2833{ 2834 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2835 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2836$as_echo_n "checking for $2... " >&6; } 2837if eval \${$3+:} false; then : 2838 $as_echo_n "(cached) " >&6 2839else 2840 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2841/* end confdefs.h. */ 2842$4 2843#include <$2> 2844_ACEOF 2845if ac_fn_c_try_compile "$LINENO"; then : 2846 eval "$3=yes" 2847else 2848 eval "$3=no" 2849fi 2850rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2851fi 2852eval ac_res=\$$3 2853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 2854$as_echo "$ac_res" >&6; } 2855 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2856 2857} # ac_fn_c_check_header_compile 2858 2859# ac_fn_c_try_link LINENO 2860# ----------------------- 2861# Try to link conftest.$ac_ext, and return whether this succeeded. 2862ac_fn_c_try_link () 2863{ 2864 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2865 rm -f conftest.$ac_objext conftest$ac_exeext 2866 if { { ac_try="$ac_link" 2867case "(($ac_try" in 2868 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2869 *) ac_try_echo=$ac_try;; 2870esac 2871eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2872$as_echo "$ac_try_echo"; } >&5 2873 (eval "$ac_link") 2>conftest.err 2874 ac_status=$? 2875 if test -s conftest.err; then 2876 grep -v '^ *+' conftest.err >conftest.er1 2877 cat conftest.er1 >&5 2878 mv -f conftest.er1 conftest.err 2879 fi 2880 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2881 test $ac_status = 0; } && { 2882 test -z "$ac_c_werror_flag" || 2883 test ! -s conftest.err 2884 } && test -s conftest$ac_exeext && { 2885 test "$cross_compiling" = yes || 2886 test -x conftest$ac_exeext 2887 }; then : 2888 ac_retval=0 2889else 2890 $as_echo "$as_me: failed program was:" >&5 2891sed 's/^/| /' conftest.$ac_ext >&5 2892 2893 ac_retval=1 2894fi 2895 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information 2896 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would 2897 # interfere with the next link command; also delete a directory that is 2898 # left behind by Apple's compiler. We do this before executing the actions. 2899 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 2900 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2901 as_fn_set_status $ac_retval 2902 2903} # ac_fn_c_try_link 2904 2905# ac_fn_cxx_try_link LINENO 2906# ------------------------- 2907# Try to link conftest.$ac_ext, and return whether this succeeded. 2908ac_fn_cxx_try_link () 2909{ 2910 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2911 rm -f conftest.$ac_objext conftest$ac_exeext 2912 if { { ac_try="$ac_link" 2913case "(($ac_try" in 2914 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 2915 *) ac_try_echo=$ac_try;; 2916esac 2917eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 2918$as_echo "$ac_try_echo"; } >&5 2919 (eval "$ac_link") 2>conftest.err 2920 ac_status=$? 2921 if test -s conftest.err; then 2922 grep -v '^ *+' conftest.err >conftest.er1 2923 cat conftest.er1 >&5 2924 mv -f conftest.er1 conftest.err 2925 fi 2926 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 2927 test $ac_status = 0; } && { 2928 test -z "$ac_cxx_werror_flag" || 2929 test ! -s conftest.err 2930 } && test -s conftest$ac_exeext && { 2931 test "$cross_compiling" = yes || 2932 test -x conftest$ac_exeext 2933 }; then : 2934 ac_retval=0 2935else 2936 $as_echo "$as_me: failed program was:" >&5 2937sed 's/^/| /' conftest.$ac_ext >&5 2938 2939 ac_retval=1 2940fi 2941 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information 2942 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would 2943 # interfere with the next link command; also delete a directory that is 2944 # left behind by Apple's compiler. We do this before executing the actions. 2945 rm -rf conftest.dSYM conftest_ipa8_conftest.oo 2946 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 2947 as_fn_set_status $ac_retval 2948 2949} # ac_fn_cxx_try_link 2950 2951# ac_fn_c_check_type LINENO TYPE VAR INCLUDES 2952# ------------------------------------------- 2953# Tests whether TYPE exists after having included INCLUDES, setting cache 2954# variable VAR accordingly. 2955ac_fn_c_check_type () 2956{ 2957 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 2958 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 2959$as_echo_n "checking for $2... " >&6; } 2960if eval \${$3+:} false; then : 2961 $as_echo_n "(cached) " >&6 2962else 2963 eval "$3=no" 2964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2965/* end confdefs.h. */ 2966$4 2967int 2968main () 2969{ 2970if (sizeof ($2)) 2971 return 0; 2972 ; 2973 return 0; 2974} 2975_ACEOF 2976if ac_fn_c_try_compile "$LINENO"; then : 2977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 2978/* end confdefs.h. */ 2979$4 2980int 2981main () 2982{ 2983if (sizeof (($2))) 2984 return 0; 2985 ; 2986 return 0; 2987} 2988_ACEOF 2989if ac_fn_c_try_compile "$LINENO"; then : 2990 2991else 2992 eval "$3=yes" 2993fi 2994rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2995fi 2996rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 2997fi 2998eval ac_res=\$$3 2999 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 3000$as_echo "$ac_res" >&6; } 3001 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 3002 3003} # ac_fn_c_check_type 3004 3005# ac_fn_c_check_func LINENO FUNC VAR 3006# ---------------------------------- 3007# Tests whether FUNC exists, setting the cache variable VAR accordingly 3008ac_fn_c_check_func () 3009{ 3010 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 3011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 3012$as_echo_n "checking for $2... " >&6; } 3013if eval \${$3+:} false; then : 3014 $as_echo_n "(cached) " >&6 3015else 3016 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3017/* end confdefs.h. */ 3018/* Define $2 to an innocuous variant, in case <limits.h> declares $2. 3019 For example, HP-UX 11i <limits.h> declares gettimeofday. */ 3020#define $2 innocuous_$2 3021 3022/* System header to define __stub macros and hopefully few prototypes, 3023 which can conflict with char $2 (); below. 3024 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 3025 <limits.h> exists even on freestanding compilers. */ 3026 3027#ifdef __STDC__ 3028# include <limits.h> 3029#else 3030# include <assert.h> 3031#endif 3032 3033#undef $2 3034 3035/* Override any GCC internal prototype to avoid an error. 3036 Use char because int might match the return type of a GCC 3037 builtin and then its argument prototype would still apply. */ 3038#ifdef __cplusplus 3039extern "C" 3040#endif 3041char $2 (); 3042/* The GNU C library defines this for functions which it implements 3043 to always fail with ENOSYS. Some functions are actually named 3044 something starting with __ and the normal name is an alias. */ 3045#if defined __stub_$2 || defined __stub___$2 3046choke me 3047#endif 3048 3049int 3050main () 3051{ 3052return $2 (); 3053 ; 3054 return 0; 3055} 3056_ACEOF 3057if ac_fn_c_try_link "$LINENO"; then : 3058 eval "$3=yes" 3059else 3060 eval "$3=no" 3061fi 3062rm -f core conftest.err conftest.$ac_objext \ 3063 conftest$ac_exeext conftest.$ac_ext 3064fi 3065eval ac_res=\$$3 3066 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 3067$as_echo "$ac_res" >&6; } 3068 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 3069 3070} # ac_fn_c_check_func 3071 3072# ac_fn_c_compute_int LINENO EXPR VAR INCLUDES 3073# -------------------------------------------- 3074# Tries to find the compile-time value of EXPR in a program that includes 3075# INCLUDES, setting VAR accordingly. Returns whether the value could be 3076# computed 3077ac_fn_c_compute_int () 3078{ 3079 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 3080 if test "$cross_compiling" = yes; then 3081 # Depending upon the size, compute the lo and hi bounds. 3082cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3083/* end confdefs.h. */ 3084$4 3085int 3086main () 3087{ 3088static int test_array [1 - 2 * !(($2) >= 0)]; 3089test_array [0] = 0; 3090return test_array [0]; 3091 3092 ; 3093 return 0; 3094} 3095_ACEOF 3096if ac_fn_c_try_compile "$LINENO"; then : 3097 ac_lo=0 ac_mid=0 3098 while :; do 3099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3100/* end confdefs.h. */ 3101$4 3102int 3103main () 3104{ 3105static int test_array [1 - 2 * !(($2) <= $ac_mid)]; 3106test_array [0] = 0; 3107return test_array [0]; 3108 3109 ; 3110 return 0; 3111} 3112_ACEOF 3113if ac_fn_c_try_compile "$LINENO"; then : 3114 ac_hi=$ac_mid; break 3115else 3116 as_fn_arith $ac_mid + 1 && ac_lo=$as_val 3117 if test $ac_lo -le $ac_mid; then 3118 ac_lo= ac_hi= 3119 break 3120 fi 3121 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val 3122fi 3123rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3124 done 3125else 3126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3127/* end confdefs.h. */ 3128$4 3129int 3130main () 3131{ 3132static int test_array [1 - 2 * !(($2) < 0)]; 3133test_array [0] = 0; 3134return test_array [0]; 3135 3136 ; 3137 return 0; 3138} 3139_ACEOF 3140if ac_fn_c_try_compile "$LINENO"; then : 3141 ac_hi=-1 ac_mid=-1 3142 while :; do 3143 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3144/* end confdefs.h. */ 3145$4 3146int 3147main () 3148{ 3149static int test_array [1 - 2 * !(($2) >= $ac_mid)]; 3150test_array [0] = 0; 3151return test_array [0]; 3152 3153 ; 3154 return 0; 3155} 3156_ACEOF 3157if ac_fn_c_try_compile "$LINENO"; then : 3158 ac_lo=$ac_mid; break 3159else 3160 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val 3161 if test $ac_mid -le $ac_hi; then 3162 ac_lo= ac_hi= 3163 break 3164 fi 3165 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val 3166fi 3167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3168 done 3169else 3170 ac_lo= ac_hi= 3171fi 3172rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3173fi 3174rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3175# Binary search between lo and hi bounds. 3176while test "x$ac_lo" != "x$ac_hi"; do 3177 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val 3178 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3179/* end confdefs.h. */ 3180$4 3181int 3182main () 3183{ 3184static int test_array [1 - 2 * !(($2) <= $ac_mid)]; 3185test_array [0] = 0; 3186return test_array [0]; 3187 3188 ; 3189 return 0; 3190} 3191_ACEOF 3192if ac_fn_c_try_compile "$LINENO"; then : 3193 ac_hi=$ac_mid 3194else 3195 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val 3196fi 3197rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3198done 3199case $ac_lo in #(( 3200?*) eval "$3=\$ac_lo"; ac_retval=0 ;; 3201'') ac_retval=1 ;; 3202esac 3203 else 3204 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3205/* end confdefs.h. */ 3206$4 3207static long int longval () { return $2; } 3208static unsigned long int ulongval () { return $2; } 3209#include <stdio.h> 3210#include <stdlib.h> 3211int 3212main () 3213{ 3214 3215 FILE *f = fopen ("conftest.val", "w"); 3216 if (! f) 3217 return 1; 3218 if (($2) < 0) 3219 { 3220 long int i = longval (); 3221 if (i != ($2)) 3222 return 1; 3223 fprintf (f, "%ld", i); 3224 } 3225 else 3226 { 3227 unsigned long int i = ulongval (); 3228 if (i != ($2)) 3229 return 1; 3230 fprintf (f, "%lu", i); 3231 } 3232 /* Do not output a trailing newline, as this causes \r\n confusion 3233 on some platforms. */ 3234 return ferror (f) || fclose (f) != 0; 3235 3236 ; 3237 return 0; 3238} 3239_ACEOF 3240if ac_fn_c_try_run "$LINENO"; then : 3241 echo >>conftest.val; read $3 <conftest.val; ac_retval=0 3242else 3243 ac_retval=1 3244fi 3245rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 3246 conftest.$ac_objext conftest.beam conftest.$ac_ext 3247rm -f conftest.val 3248 3249 fi 3250 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 3251 as_fn_set_status $ac_retval 3252 3253} # ac_fn_c_compute_int 3254 3255# ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES 3256# --------------------------------------------- 3257# Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR 3258# accordingly. 3259ac_fn_c_check_decl () 3260{ 3261 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 3262 as_decl_name=`echo $2|sed 's/ *(.*//'` 3263 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` 3264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 3265$as_echo_n "checking whether $as_decl_name is declared... " >&6; } 3266if eval \${$3+:} false; then : 3267 $as_echo_n "(cached) " >&6 3268else 3269 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3270/* end confdefs.h. */ 3271$4 3272int 3273main () 3274{ 3275#ifndef $as_decl_name 3276#ifdef __cplusplus 3277 (void) $as_decl_use; 3278#else 3279 (void) $as_decl_name; 3280#endif 3281#endif 3282 3283 ; 3284 return 0; 3285} 3286_ACEOF 3287if ac_fn_c_try_compile "$LINENO"; then : 3288 eval "$3=yes" 3289else 3290 eval "$3=no" 3291fi 3292rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3293fi 3294eval ac_res=\$$3 3295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 3296$as_echo "$ac_res" >&6; } 3297 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 3298 3299} # ac_fn_c_check_decl 3300 3301# ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES 3302# ---------------------------------------------------- 3303# Tries to find if the field MEMBER exists in type AGGR, after including 3304# INCLUDES, setting cache variable VAR accordingly. 3305ac_fn_c_check_member () 3306{ 3307 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 3308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 3309$as_echo_n "checking for $2.$3... " >&6; } 3310if eval \${$4+:} false; then : 3311 $as_echo_n "(cached) " >&6 3312else 3313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3314/* end confdefs.h. */ 3315$5 3316int 3317main () 3318{ 3319static $2 ac_aggr; 3320if (ac_aggr.$3) 3321return 0; 3322 ; 3323 return 0; 3324} 3325_ACEOF 3326if ac_fn_c_try_compile "$LINENO"; then : 3327 eval "$4=yes" 3328else 3329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 3330/* end confdefs.h. */ 3331$5 3332int 3333main () 3334{ 3335static $2 ac_aggr; 3336if (sizeof ac_aggr.$3) 3337return 0; 3338 ; 3339 return 0; 3340} 3341_ACEOF 3342if ac_fn_c_try_compile "$LINENO"; then : 3343 eval "$4=yes" 3344else 3345 eval "$4=no" 3346fi 3347rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3348fi 3349rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 3350fi 3351eval ac_res=\$$4 3352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 3353$as_echo "$ac_res" >&6; } 3354 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno 3355 3356} # ac_fn_c_check_member 3357cat >config.log <<_ACEOF 3358This file contains any messages produced by compilers while 3359running configure, to aid debugging if configure makes a mistake. 3360 3361It was created by GNU Bison $as_me 2.7, which was 3362generated by GNU Autoconf 2.69. Invocation command line was 3363 3364 $ $0 $@ 3365 3366_ACEOF 3367exec 5>>config.log 3368{ 3369cat <<_ASUNAME 3370## --------- ## 3371## Platform. ## 3372## --------- ## 3373 3374hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` 3375uname -m = `(uname -m) 2>/dev/null || echo unknown` 3376uname -r = `(uname -r) 2>/dev/null || echo unknown` 3377uname -s = `(uname -s) 2>/dev/null || echo unknown` 3378uname -v = `(uname -v) 2>/dev/null || echo unknown` 3379 3380/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` 3381/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` 3382 3383/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` 3384/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` 3385/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` 3386/usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` 3387/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` 3388/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` 3389/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` 3390 3391_ASUNAME 3392 3393as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3394for as_dir in $PATH 3395do 3396 IFS=$as_save_IFS 3397 test -z "$as_dir" && as_dir=. 3398 $as_echo "PATH: $as_dir" 3399 done 3400IFS=$as_save_IFS 3401 3402} >&5 3403 3404cat >&5 <<_ACEOF 3405 3406 3407## ----------- ## 3408## Core tests. ## 3409## ----------- ## 3410 3411_ACEOF 3412 3413 3414# Keep a trace of the command line. 3415# Strip out --no-create and --no-recursion so they do not pile up. 3416# Strip out --silent because we don't want to record it for future runs. 3417# Also quote any args containing shell meta-characters. 3418# Make two passes to allow for proper duplicate-argument suppression. 3419ac_configure_args= 3420ac_configure_args0= 3421ac_configure_args1= 3422ac_must_keep_next=false 3423for ac_pass in 1 2 3424do 3425 for ac_arg 3426 do 3427 case $ac_arg in 3428 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; 3429 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 3430 | -silent | --silent | --silen | --sile | --sil) 3431 continue ;; 3432 *\'*) 3433 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; 3434 esac 3435 case $ac_pass in 3436 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 3437 2) 3438 as_fn_append ac_configure_args1 " '$ac_arg'" 3439 if test $ac_must_keep_next = true; then 3440 ac_must_keep_next=false # Got value, back to normal. 3441 else 3442 case $ac_arg in 3443 *=* | --config-cache | -C | -disable-* | --disable-* \ 3444 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ 3445 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ 3446 | -with-* | --with-* | -without-* | --without-* | --x) 3447 case "$ac_configure_args0 " in 3448 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; 3449 esac 3450 ;; 3451 -* ) ac_must_keep_next=true ;; 3452 esac 3453 fi 3454 as_fn_append ac_configure_args " '$ac_arg'" 3455 ;; 3456 esac 3457 done 3458done 3459{ ac_configure_args0=; unset ac_configure_args0;} 3460{ ac_configure_args1=; unset ac_configure_args1;} 3461 3462# When interrupted or exit'd, cleanup temporary files, and complete 3463# config.log. We remove comments because anyway the quotes in there 3464# would cause problems or look ugly. 3465# WARNING: Use '\'' to represent an apostrophe within the trap. 3466# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. 3467trap 'exit_status=$? 3468 # Save into config.log some information that might help in debugging. 3469 { 3470 echo 3471 3472 $as_echo "## ---------------- ## 3473## Cache variables. ## 3474## ---------------- ##" 3475 echo 3476 # The following way of writing the cache mishandles newlines in values, 3477( 3478 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do 3479 eval ac_val=\$$ac_var 3480 case $ac_val in #( 3481 *${as_nl}*) 3482 case $ac_var in #( 3483 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 3484$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 3485 esac 3486 case $ac_var in #( 3487 _ | IFS | as_nl) ;; #( 3488 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 3489 *) { eval $ac_var=; unset $ac_var;} ;; 3490 esac ;; 3491 esac 3492 done 3493 (set) 2>&1 | 3494 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( 3495 *${as_nl}ac_space=\ *) 3496 sed -n \ 3497 "s/'\''/'\''\\\\'\'''\''/g; 3498 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" 3499 ;; #( 3500 *) 3501 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 3502 ;; 3503 esac | 3504 sort 3505) 3506 echo 3507 3508 $as_echo "## ----------------- ## 3509## Output variables. ## 3510## ----------------- ##" 3511 echo 3512 for ac_var in $ac_subst_vars 3513 do 3514 eval ac_val=\$$ac_var 3515 case $ac_val in 3516 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 3517 esac 3518 $as_echo "$ac_var='\''$ac_val'\''" 3519 done | sort 3520 echo 3521 3522 if test -n "$ac_subst_files"; then 3523 $as_echo "## ------------------- ## 3524## File substitutions. ## 3525## ------------------- ##" 3526 echo 3527 for ac_var in $ac_subst_files 3528 do 3529 eval ac_val=\$$ac_var 3530 case $ac_val in 3531 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; 3532 esac 3533 $as_echo "$ac_var='\''$ac_val'\''" 3534 done | sort 3535 echo 3536 fi 3537 3538 if test -s confdefs.h; then 3539 $as_echo "## ----------- ## 3540## confdefs.h. ## 3541## ----------- ##" 3542 echo 3543 cat confdefs.h 3544 echo 3545 fi 3546 test "$ac_signal" != 0 && 3547 $as_echo "$as_me: caught signal $ac_signal" 3548 $as_echo "$as_me: exit $exit_status" 3549 } >&5 3550 rm -f core *.core core.conftest.* && 3551 rm -f -r conftest* confdefs* conf$$* $ac_clean_files && 3552 exit $exit_status 3553' 0 3554for ac_signal in 1 2 13 15; do 3555 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal 3556done 3557ac_signal=0 3558 3559# confdefs.h avoids OS command line length limits that DEFS can exceed. 3560rm -f -r conftest* confdefs.h 3561 3562$as_echo "/* confdefs.h */" > confdefs.h 3563 3564# Predefined preprocessor variables. 3565 3566cat >>confdefs.h <<_ACEOF 3567#define PACKAGE_NAME "$PACKAGE_NAME" 3568_ACEOF 3569 3570cat >>confdefs.h <<_ACEOF 3571#define PACKAGE_TARNAME "$PACKAGE_TARNAME" 3572_ACEOF 3573 3574cat >>confdefs.h <<_ACEOF 3575#define PACKAGE_VERSION "$PACKAGE_VERSION" 3576_ACEOF 3577 3578cat >>confdefs.h <<_ACEOF 3579#define PACKAGE_STRING "$PACKAGE_STRING" 3580_ACEOF 3581 3582cat >>confdefs.h <<_ACEOF 3583#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" 3584_ACEOF 3585 3586cat >>confdefs.h <<_ACEOF 3587#define PACKAGE_URL "$PACKAGE_URL" 3588_ACEOF 3589 3590 3591# Let the site file select an alternate cache file if it wants to. 3592# Prefer an explicitly selected file to automatically selected ones. 3593ac_site_file1=NONE 3594ac_site_file2=NONE 3595if test -n "$CONFIG_SITE"; then 3596 # We do not want a PATH search for config.site. 3597 case $CONFIG_SITE in #(( 3598 -*) ac_site_file1=./$CONFIG_SITE;; 3599 */*) ac_site_file1=$CONFIG_SITE;; 3600 *) ac_site_file1=./$CONFIG_SITE;; 3601 esac 3602elif test "x$prefix" != xNONE; then 3603 ac_site_file1=$prefix/share/config.site 3604 ac_site_file2=$prefix/etc/config.site 3605else 3606 ac_site_file1=$ac_default_prefix/share/config.site 3607 ac_site_file2=$ac_default_prefix/etc/config.site 3608fi 3609for ac_site_file in "$ac_site_file1" "$ac_site_file2" 3610do 3611 test "x$ac_site_file" = xNONE && continue 3612 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then 3613 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 3614$as_echo "$as_me: loading site script $ac_site_file" >&6;} 3615 sed 's/^/| /' "$ac_site_file" >&5 3616 . "$ac_site_file" \ 3617 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3618$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 3619as_fn_error $? "failed to load site script $ac_site_file 3620See \`config.log' for more details" "$LINENO" 5; } 3621 fi 3622done 3623 3624if test -r "$cache_file"; then 3625 # Some versions of bash will fail to source /dev/null (special files 3626 # actually), so we avoid doing that. DJGPP emulates it as a regular file. 3627 if test /dev/null != "$cache_file" && test -f "$cache_file"; then 3628 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 3629$as_echo "$as_me: loading cache $cache_file" >&6;} 3630 case $cache_file in 3631 [\\/]* | ?:[\\/]* ) . "$cache_file";; 3632 *) . "./$cache_file";; 3633 esac 3634 fi 3635else 3636 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 3637$as_echo "$as_me: creating cache $cache_file" >&6;} 3638 >$cache_file 3639fi 3640 3641as_fn_append ac_header_list " locale.h" 3642as_fn_append ac_func_list " _set_invalid_parameter_handler" 3643as_fn_append ac_header_list " sys/socket.h" 3644as_fn_append ac_header_list " unistd.h" 3645as_fn_append ac_func_list " fcntl" 3646as_fn_append ac_func_list " symlink" 3647as_fn_append ac_header_list " stdio_ext.h" 3648as_fn_append ac_func_list " __fpending" 3649as_fn_append ac_func_list " vasnprintf" 3650as_fn_append ac_header_list " features.h" 3651as_fn_append ac_func_list " snprintf" 3652as_fn_append ac_func_list " alarm" 3653as_fn_append ac_func_list " __fseterr" 3654as_fn_append ac_header_list " sys/stat.h" 3655as_fn_append ac_func_list " getdelim" 3656as_fn_append ac_func_list " getdtablesize" 3657gl_getopt_required=GNU 3658as_fn_append ac_header_list " getopt.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 " iswcntrl" 3663as_fn_append ac_header_list " wctype.h" 3664as_fn_append ac_func_list " iswblank" 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_func_list " isascii" 3669as_fn_append ac_header_list " sys/mman.h" 3670as_fn_append ac_func_list " mprotect" 3671as_fn_append ac_func_list " obstack_printf" 3672as_fn_append ac_func_list " lstat" 3673as_fn_append ac_header_list " sys/param.h" 3674as_fn_append ac_func_list " strerror_r" 3675as_fn_append ac_func_list " __xpg_strerror_r" 3676as_fn_append ac_func_list " pipe2" 3677as_fn_append ac_func_list " posix_spawn" 3678gl_printf_safe=yes 3679as_fn_append ac_header_list " sched.h" 3680as_fn_append ac_func_list " sigaction" 3681as_fn_append ac_func_list " sigaltstack" 3682as_fn_append ac_func_list " siginterrupt" 3683as_fn_append ac_header_list " spawn.h" 3684as_fn_append ac_func_list " strdup" 3685as_fn_append ac_func_list " catgets" 3686as_fn_append ac_func_list " strndup" 3687as_fn_append ac_header_list " sys/wait.h" 3688as_fn_append ac_header_list " sys/time.h" 3689as_fn_append ac_func_list " pipe" 3690as_fn_append ac_func_list " wcwidth" 3691as_fn_append ac_func_list " setlocale" 3692gt_needs="$gt_needs need-ngettext" 3693# Check that the precious variables saved in the cache have kept the same 3694# value. 3695ac_cache_corrupted=false 3696for ac_var in $ac_precious_vars; do 3697 eval ac_old_set=\$ac_cv_env_${ac_var}_set 3698 eval ac_new_set=\$ac_env_${ac_var}_set 3699 eval ac_old_val=\$ac_cv_env_${ac_var}_value 3700 eval ac_new_val=\$ac_env_${ac_var}_value 3701 case $ac_old_set,$ac_new_set in 3702 set,) 3703 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 3704$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} 3705 ac_cache_corrupted=: ;; 3706 ,set) 3707 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 3708$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} 3709 ac_cache_corrupted=: ;; 3710 ,);; 3711 *) 3712 if test "x$ac_old_val" != "x$ac_new_val"; then 3713 # differences in whitespace do not lead to failure. 3714 ac_old_val_w=`echo x $ac_old_val` 3715 ac_new_val_w=`echo x $ac_new_val` 3716 if test "$ac_old_val_w" != "$ac_new_val_w"; then 3717 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 3718$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} 3719 ac_cache_corrupted=: 3720 else 3721 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 3722$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} 3723 eval $ac_var=\$ac_old_val 3724 fi 3725 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 3726$as_echo "$as_me: former value: \`$ac_old_val'" >&2;} 3727 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 3728$as_echo "$as_me: current value: \`$ac_new_val'" >&2;} 3729 fi;; 3730 esac 3731 # Pass precious variables to config.status. 3732 if test "$ac_new_set" = set; then 3733 case $ac_new_val in 3734 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; 3735 *) ac_arg=$ac_var=$ac_new_val ;; 3736 esac 3737 case " $ac_configure_args " in 3738 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. 3739 *) as_fn_append ac_configure_args " '$ac_arg'" ;; 3740 esac 3741 fi 3742done 3743if $ac_cache_corrupted; then 3744 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 3745$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 3746 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 3747$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} 3748 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 3749fi 3750## -------------------- ## 3751## Main body of script. ## 3752## -------------------- ## 3753 3754ac_ext=c 3755ac_cpp='$CPP $CPPFLAGS' 3756ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 3757ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 3758ac_compiler_gnu=$ac_cv_c_compiler_gnu 3759 3760 3761PACKAGE_COPYRIGHT_YEAR=2012 3762 3763 3764cat >>confdefs.h <<_ACEOF 3765#define PACKAGE_COPYRIGHT_YEAR $PACKAGE_COPYRIGHT_YEAR 3766_ACEOF 3767 3768 3769ac_aux_dir= 3770for ac_dir in build-aux "$srcdir"/build-aux; do 3771 if test -f "$ac_dir/install-sh"; then 3772 ac_aux_dir=$ac_dir 3773 ac_install_sh="$ac_aux_dir/install-sh -c" 3774 break 3775 elif test -f "$ac_dir/install.sh"; then 3776 ac_aux_dir=$ac_dir 3777 ac_install_sh="$ac_aux_dir/install.sh -c" 3778 break 3779 elif test -f "$ac_dir/shtool"; then 3780 ac_aux_dir=$ac_dir 3781 ac_install_sh="$ac_aux_dir/shtool install -c" 3782 break 3783 fi 3784done 3785if test -z "$ac_aux_dir"; then 3786 as_fn_error $? "cannot find install-sh, install.sh, or shtool in build-aux \"$srcdir\"/build-aux" "$LINENO" 5 3787fi 3788 3789# These three variables are undocumented and unsupported, 3790# and are intended to be withdrawn in a future Autoconf release. 3791# They can cause serious problems if a builder's source tree is in a directory 3792# whose full name contains unusual characters. 3793ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. 3794ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. 3795ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. 3796 3797 3798 3799 3800# Automake 1.10.3 and 1.11.1 fix a security flaw discussed here: 3801# 3802# http://thread.gmane.org/gmane.comp.sysutils.autotools.announce/131 3803# 3804# To avoid 1.11, we make 1.11.1 the minimum version. 3805# 3806# We want gnits strictness only when rolling a stable release. For 3807# release candidates, we use version strings like 2.4.3_rc1, but gnits 3808# doesn't like that, so we let the underscore disable gnits. Between 3809# releases, we want to be able run make dist without being required to 3810# add a bogus NEWS entry. In that case, the version string 3811# automatically contains a dash, which we also let disable gnits. 3812am__api_version='1.12' 3813 3814# Find a good install program. We prefer a C program (faster), 3815# so one script is as good as another. But avoid the broken or 3816# incompatible versions: 3817# SysV /etc/install, /usr/sbin/install 3818# SunOS /usr/etc/install 3819# IRIX /sbin/install 3820# AIX /bin/install 3821# AmigaOS /C/install, which installs bootblocks on floppy discs 3822# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag 3823# AFS /usr/afsws/bin/install, which mishandles nonexistent args 3824# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" 3825# OS/2's system install, which has a completely different semantic 3826# ./install, which can be erroneously created by make from ./install.sh. 3827# Reject install programs that cannot install multiple files. 3828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 3829$as_echo_n "checking for a BSD-compatible install... " >&6; } 3830if test -z "$INSTALL"; then 3831if ${ac_cv_path_install+:} false; then : 3832 $as_echo_n "(cached) " >&6 3833else 3834 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 3835for as_dir in $PATH 3836do 3837 IFS=$as_save_IFS 3838 test -z "$as_dir" && as_dir=. 3839 # Account for people who put trailing slashes in PATH elements. 3840case $as_dir/ in #(( 3841 ./ | .// | /[cC]/* | \ 3842 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ 3843 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ 3844 /usr/ucb/* ) ;; 3845 *) 3846 # OSF1 and SCO ODT 3.0 have their own names for install. 3847 # Don't use installbsd from OSF since it installs stuff as root 3848 # by default. 3849 for ac_prog in ginstall scoinst install; do 3850 for ac_exec_ext in '' $ac_executable_extensions; do 3851 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then 3852 if test $ac_prog = install && 3853 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then 3854 # AIX install. It has an incompatible calling convention. 3855 : 3856 elif test $ac_prog = install && 3857 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then 3858 # program-specific install script used by HP pwplus--don't use. 3859 : 3860 else 3861 rm -rf conftest.one conftest.two conftest.dir 3862 echo one > conftest.one 3863 echo two > conftest.two 3864 mkdir conftest.dir 3865 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && 3866 test -s conftest.one && test -s conftest.two && 3867 test -s conftest.dir/conftest.one && 3868 test -s conftest.dir/conftest.two 3869 then 3870 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" 3871 break 3 3872 fi 3873 fi 3874 fi 3875 done 3876 done 3877 ;; 3878esac 3879 3880 done 3881IFS=$as_save_IFS 3882 3883rm -rf conftest.one conftest.two conftest.dir 3884 3885fi 3886 if test "${ac_cv_path_install+set}" = set; then 3887 INSTALL=$ac_cv_path_install 3888 else 3889 # As a last resort, use the slow shell script. Don't cache a 3890 # value for INSTALL within a source directory, because that will 3891 # break other packages using the cache if that directory is 3892 # removed, or if the value is a relative name. 3893 INSTALL=$ac_install_sh 3894 fi 3895fi 3896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 3897$as_echo "$INSTALL" >&6; } 3898 3899# Use test -z because SunOS4 sh mishandles braces in ${var-val}. 3900# It thinks the first close brace ends the variable substitution. 3901test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' 3902 3903test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' 3904 3905test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' 3906 3907{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 3908$as_echo_n "checking whether build environment is sane... " >&6; } 3909# Reject unsafe characters in $srcdir or the absolute working directory 3910# name. Accept space and tab only in the latter. 3911am_lf=' 3912' 3913case `pwd` in 3914 *[\\\"\#\$\&\'\`$am_lf]*) 3915 as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; 3916esac 3917case $srcdir in 3918 *[\\\"\#\$\&\'\`$am_lf\ \ ]*) 3919 as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; 3920esac 3921 3922# Do 'set' in a subshell so we don't clobber the current shell's 3923# arguments. Must try -L first in case configure is actually a 3924# symlink; some systems play weird games with the mod time of symlinks 3925# (eg FreeBSD returns the mod time of the symlink's containing 3926# directory). 3927if ( 3928 am_has_slept=no 3929 for am_try in 1 2; do 3930 echo "timestamp, slept: $am_has_slept" > conftest.file 3931 set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` 3932 if test "$*" = "X"; then 3933 # -L didn't work. 3934 set X `ls -t "$srcdir/configure" conftest.file` 3935 fi 3936 if test "$*" != "X $srcdir/configure conftest.file" \ 3937 && test "$*" != "X conftest.file $srcdir/configure"; then 3938 3939 # If neither matched, then we have a broken ls. This can happen 3940 # if, for instance, CONFIG_SHELL is bash and it inherits a 3941 # broken ls alias from the environment. This has actually 3942 # happened. Such a system could not be considered "sane". 3943 as_fn_error $? "ls -t appears to fail. Make sure there is not a broken 3944 alias in your environment" "$LINENO" 5 3945 fi 3946 if test "$2" = conftest.file || test $am_try -eq 2; then 3947 break 3948 fi 3949 # Just in case. 3950 sleep 1 3951 am_has_slept=yes 3952 done 3953 test "$2" = conftest.file 3954 ) 3955then 3956 # Ok. 3957 : 3958else 3959 as_fn_error $? "newly created file is older than distributed files! 3960Check your system clock" "$LINENO" 5 3961fi 3962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 3963$as_echo "yes" >&6; } 3964# If we didn't sleep, we still need to ensure time stamps of config.status and 3965# generated files are strictly newer. 3966am_sleep_pid= 3967if grep 'slept: no' conftest.file >/dev/null 2>&1; then 3968 ( sleep 1 ) & 3969 am_sleep_pid=$! 3970fi 3971 3972rm -f conftest.file 3973 3974test "$program_prefix" != NONE && 3975 program_transform_name="s&^&$program_prefix&;$program_transform_name" 3976# Use a double $ so make ignores it. 3977test "$program_suffix" != NONE && 3978 program_transform_name="s&\$&$program_suffix&;$program_transform_name" 3979# Double any \ or $. 3980# By default was `s,x,x', remove it if useless. 3981ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' 3982program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` 3983 3984# expand $ac_aux_dir to an absolute path 3985am_aux_dir=`cd $ac_aux_dir && pwd` 3986 3987if test x"${MISSING+set}" != xset; then 3988 case $am_aux_dir in 3989 *\ * | *\ *) 3990 MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; 3991 *) 3992 MISSING="\${SHELL} $am_aux_dir/missing" ;; 3993 esac 3994fi 3995# Use eval to expand $SHELL 3996if eval "$MISSING --run true"; then 3997 am_missing_run="$MISSING --run " 3998else 3999 am_missing_run= 4000 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 4001$as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} 4002fi 4003 4004if test x"${install_sh}" != xset; then 4005 case $am_aux_dir in 4006 *\ * | *\ *) 4007 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; 4008 *) 4009 install_sh="\${SHELL} $am_aux_dir/install-sh" 4010 esac 4011fi 4012 4013# Installed binaries are usually stripped using 'strip' when the user 4014# run "make install-strip". However 'strip' might not be the right 4015# tool to use in cross-compilation environments, therefore Automake 4016# will honor the 'STRIP' environment variable to overrule this program. 4017if test "$cross_compiling" != no; then 4018 if test -n "$ac_tool_prefix"; then 4019 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. 4020set dummy ${ac_tool_prefix}strip; ac_word=$2 4021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4022$as_echo_n "checking for $ac_word... " >&6; } 4023if ${ac_cv_prog_STRIP+:} false; then : 4024 $as_echo_n "(cached) " >&6 4025else 4026 if test -n "$STRIP"; then 4027 ac_cv_prog_STRIP="$STRIP" # Let the user override the test. 4028else 4029as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4030for as_dir in $PATH 4031do 4032 IFS=$as_save_IFS 4033 test -z "$as_dir" && as_dir=. 4034 for ac_exec_ext in '' $ac_executable_extensions; do 4035 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4036 ac_cv_prog_STRIP="${ac_tool_prefix}strip" 4037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4038 break 2 4039 fi 4040done 4041 done 4042IFS=$as_save_IFS 4043 4044fi 4045fi 4046STRIP=$ac_cv_prog_STRIP 4047if test -n "$STRIP"; then 4048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 4049$as_echo "$STRIP" >&6; } 4050else 4051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4052$as_echo "no" >&6; } 4053fi 4054 4055 4056fi 4057if test -z "$ac_cv_prog_STRIP"; then 4058 ac_ct_STRIP=$STRIP 4059 # Extract the first word of "strip", so it can be a program name with args. 4060set dummy strip; ac_word=$2 4061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4062$as_echo_n "checking for $ac_word... " >&6; } 4063if ${ac_cv_prog_ac_ct_STRIP+:} false; then : 4064 $as_echo_n "(cached) " >&6 4065else 4066 if test -n "$ac_ct_STRIP"; then 4067 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. 4068else 4069as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4070for as_dir in $PATH 4071do 4072 IFS=$as_save_IFS 4073 test -z "$as_dir" && as_dir=. 4074 for ac_exec_ext in '' $ac_executable_extensions; do 4075 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4076 ac_cv_prog_ac_ct_STRIP="strip" 4077 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4078 break 2 4079 fi 4080done 4081 done 4082IFS=$as_save_IFS 4083 4084fi 4085fi 4086ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP 4087if test -n "$ac_ct_STRIP"; then 4088 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 4089$as_echo "$ac_ct_STRIP" >&6; } 4090else 4091 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4092$as_echo "no" >&6; } 4093fi 4094 4095 if test "x$ac_ct_STRIP" = x; then 4096 STRIP=":" 4097 else 4098 case $cross_compiling:$ac_tool_warned in 4099yes:) 4100{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 4101$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 4102ac_tool_warned=yes ;; 4103esac 4104 STRIP=$ac_ct_STRIP 4105 fi 4106else 4107 STRIP="$ac_cv_prog_STRIP" 4108fi 4109 4110fi 4111INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" 4112 4113{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 4114$as_echo_n "checking for a thread-safe mkdir -p... " >&6; } 4115if test -z "$MKDIR_P"; then 4116 if ${ac_cv_path_mkdir+:} false; then : 4117 $as_echo_n "(cached) " >&6 4118else 4119 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4120for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin 4121do 4122 IFS=$as_save_IFS 4123 test -z "$as_dir" && as_dir=. 4124 for ac_prog in mkdir gmkdir; do 4125 for ac_exec_ext in '' $ac_executable_extensions; do 4126 as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue 4127 case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 4128 'mkdir (GNU coreutils) '* | \ 4129 'mkdir (coreutils) '* | \ 4130 'mkdir (fileutils) '4.1*) 4131 ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext 4132 break 3;; 4133 esac 4134 done 4135 done 4136 done 4137IFS=$as_save_IFS 4138 4139fi 4140 4141 test -d ./--version && rmdir ./--version 4142 if test "${ac_cv_path_mkdir+set}" = set; then 4143 MKDIR_P="$ac_cv_path_mkdir -p" 4144 else 4145 # As a last resort, use the slow shell script. Don't cache a 4146 # value for MKDIR_P within a source directory, because that will 4147 # break other packages using the cache if that directory is 4148 # removed, or if the value is a relative name. 4149 MKDIR_P="$ac_install_sh -d" 4150 fi 4151fi 4152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 4153$as_echo "$MKDIR_P" >&6; } 4154 4155 4156for ac_prog in gawk mawk nawk awk 4157do 4158 # Extract the first word of "$ac_prog", so it can be a program name with args. 4159set dummy $ac_prog; ac_word=$2 4160{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4161$as_echo_n "checking for $ac_word... " >&6; } 4162if ${ac_cv_prog_AWK+:} false; then : 4163 $as_echo_n "(cached) " >&6 4164else 4165 if test -n "$AWK"; then 4166 ac_cv_prog_AWK="$AWK" # Let the user override the test. 4167else 4168as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4169for as_dir in $PATH 4170do 4171 IFS=$as_save_IFS 4172 test -z "$as_dir" && as_dir=. 4173 for ac_exec_ext in '' $ac_executable_extensions; do 4174 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4175 ac_cv_prog_AWK="$ac_prog" 4176 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4177 break 2 4178 fi 4179done 4180 done 4181IFS=$as_save_IFS 4182 4183fi 4184fi 4185AWK=$ac_cv_prog_AWK 4186if test -n "$AWK"; then 4187 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 4188$as_echo "$AWK" >&6; } 4189else 4190 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4191$as_echo "no" >&6; } 4192fi 4193 4194 4195 test -n "$AWK" && break 4196done 4197 4198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 4199$as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } 4200set x ${MAKE-make} 4201ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` 4202if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : 4203 $as_echo_n "(cached) " >&6 4204else 4205 cat >conftest.make <<\_ACEOF 4206SHELL = /bin/sh 4207all: 4208 @echo '@@@%%%=$(MAKE)=@@@%%%' 4209_ACEOF 4210# GNU make sometimes prints "make[1]: Entering ...", which would confuse us. 4211case `${MAKE-make} -f conftest.make 2>/dev/null` in 4212 *@@@%%%=?*=@@@%%%*) 4213 eval ac_cv_prog_make_${ac_make}_set=yes;; 4214 *) 4215 eval ac_cv_prog_make_${ac_make}_set=no;; 4216esac 4217rm -f conftest.make 4218fi 4219if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then 4220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4221$as_echo "yes" >&6; } 4222 SET_MAKE= 4223else 4224 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4225$as_echo "no" >&6; } 4226 SET_MAKE="MAKE=${MAKE-make}" 4227fi 4228 4229rm -rf .tst 2>/dev/null 4230mkdir .tst 2>/dev/null 4231if test -d .tst; then 4232 am__leading_dot=. 4233else 4234 am__leading_dot=_ 4235fi 4236rmdir .tst 2>/dev/null 4237 4238# Check whether --enable-silent-rules was given. 4239if test "${enable_silent_rules+set}" = set; then : 4240 enableval=$enable_silent_rules; 4241fi 4242 4243case $enable_silent_rules in # ((( 4244 yes) AM_DEFAULT_VERBOSITY=0;; 4245 no) AM_DEFAULT_VERBOSITY=1;; 4246 *) AM_DEFAULT_VERBOSITY=1;; 4247esac 4248am_make=${MAKE-make} 4249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 4250$as_echo_n "checking whether $am_make supports nested variables... " >&6; } 4251if ${am_cv_make_support_nested_variables+:} false; then : 4252 $as_echo_n "(cached) " >&6 4253else 4254 if $as_echo 'TRUE=$(BAR$(V)) 4255BAR0=false 4256BAR1=true 4257V=1 4258am__doit: 4259 @$(TRUE) 4260.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then 4261 am_cv_make_support_nested_variables=yes 4262else 4263 am_cv_make_support_nested_variables=no 4264fi 4265fi 4266{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 4267$as_echo "$am_cv_make_support_nested_variables" >&6; } 4268if test $am_cv_make_support_nested_variables = yes; then 4269 AM_V='$(V)' 4270 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 4271else 4272 AM_V=$AM_DEFAULT_VERBOSITY 4273 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 4274fi 4275AM_BACKSLASH='\' 4276 4277if test "`cd $srcdir && pwd`" != "`pwd`"; then 4278 # Use -I$(srcdir) only when $(srcdir) != ., so that make's output 4279 # is not polluted with repeated "-I." 4280 am__isrc=' -I$(srcdir)' 4281 # test to see if srcdir already configured 4282 if test -f $srcdir/config.status; then 4283 as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 4284 fi 4285fi 4286 4287# test whether we have cygpath 4288if test -z "$CYGPATH_W"; then 4289 if (cygpath --version) >/dev/null 2>/dev/null; then 4290 CYGPATH_W='cygpath -w' 4291 else 4292 CYGPATH_W=echo 4293 fi 4294fi 4295 4296 4297# Define the identity of the package. 4298 PACKAGE='bison' 4299 VERSION='2.7' 4300 4301 4302cat >>confdefs.h <<_ACEOF 4303#define PACKAGE "$PACKAGE" 4304_ACEOF 4305 4306 4307cat >>confdefs.h <<_ACEOF 4308#define VERSION "$VERSION" 4309_ACEOF 4310 4311# Some tools Automake needs. 4312 4313ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} 4314 4315 4316AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} 4317 4318 4319AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} 4320 4321 4322AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} 4323 4324 4325MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} 4326 4327# For better backward compatibility. To be removed once Automake 1.9.x 4328# dies out for good. For more background, see: 4329# <http://lists.gnu.org/archive/html/automake/2012-07/msg00001.html> 4330# <http://lists.gnu.org/archive/html/automake/2012-07/msg00014.html> 4331mkdir_p='$(MKDIR_P)' 4332 4333# We need awk for the "check" target. The system "awk" is bad on 4334# some platforms. 4335# Always define AMTAR for backward compatibility. Yes, it's still used 4336# in the wild :-( We should find a proper way to deprecate it ... 4337AMTAR='$${TAR-tar}' 4338 4339am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' 4340 4341 4342 4343 4344 4345# Check whether --enable-silent-rules was given. 4346if test "${enable_silent_rules+set}" = set; then : 4347 enableval=$enable_silent_rules; 4348fi 4349 4350case $enable_silent_rules in # ((( 4351 yes) AM_DEFAULT_VERBOSITY=0;; 4352 no) AM_DEFAULT_VERBOSITY=1;; 4353 *) AM_DEFAULT_VERBOSITY=0;; 4354esac 4355am_make=${MAKE-make} 4356{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 4357$as_echo_n "checking whether $am_make supports nested variables... " >&6; } 4358if ${am_cv_make_support_nested_variables+:} false; then : 4359 $as_echo_n "(cached) " >&6 4360else 4361 if $as_echo 'TRUE=$(BAR$(V)) 4362BAR0=false 4363BAR1=true 4364V=1 4365am__doit: 4366 @$(TRUE) 4367.PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then 4368 am_cv_make_support_nested_variables=yes 4369else 4370 am_cv_make_support_nested_variables=no 4371fi 4372fi 4373{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 4374$as_echo "$am_cv_make_support_nested_variables" >&6; } 4375if test $am_cv_make_support_nested_variables = yes; then 4376 AM_V='$(V)' 4377 AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' 4378else 4379 AM_V=$AM_DEFAULT_VERBOSITY 4380 AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY 4381fi 4382AM_BACKSLASH='\' 4383 4384ac_config_headers="$ac_config_headers lib/config.h:lib/config.in.h" 4385 4386 4387# Checks for the compiler. 4388DEPDIR="${am__leading_dot}deps" 4389 4390ac_config_commands="$ac_config_commands depfiles" 4391 4392 4393am_make=${MAKE-make} 4394cat > confinc << 'END' 4395am__doit: 4396 @echo this is the am__doit target 4397.PHONY: am__doit 4398END 4399# If we don't find an include directive, just comment out the code. 4400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 4401$as_echo_n "checking for style of include used by $am_make... " >&6; } 4402am__include="#" 4403am__quote= 4404_am_result=none 4405# First try GNU make style include. 4406echo "include confinc" > confmf 4407# Ignore all kinds of additional output from 'make'. 4408case `$am_make -s -f confmf 2> /dev/null` in #( 4409*the\ am__doit\ target*) 4410 am__include=include 4411 am__quote= 4412 _am_result=GNU 4413 ;; 4414esac 4415# Now try BSD make style include. 4416if test "$am__include" = "#"; then 4417 echo '.include "confinc"' > confmf 4418 case `$am_make -s -f confmf 2> /dev/null` in #( 4419 *the\ am__doit\ target*) 4420 am__include=.include 4421 am__quote="\"" 4422 _am_result=BSD 4423 ;; 4424 esac 4425fi 4426 4427 4428{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 4429$as_echo "$_am_result" >&6; } 4430rm -f confinc confmf 4431 4432# Check whether --enable-dependency-tracking was given. 4433if test "${enable_dependency_tracking+set}" = set; then : 4434 enableval=$enable_dependency_tracking; 4435fi 4436 4437if test "x$enable_dependency_tracking" != xno; then 4438 am_depcomp="$ac_aux_dir/depcomp" 4439 AMDEPBACKSLASH='\' 4440 am__nodep='_no' 4441fi 4442 if test "x$enable_dependency_tracking" != xno; then 4443 AMDEP_TRUE= 4444 AMDEP_FALSE='#' 4445else 4446 AMDEP_TRUE='#' 4447 AMDEP_FALSE= 4448fi 4449 4450 4451ac_ext=c 4452ac_cpp='$CPP $CPPFLAGS' 4453ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 4454ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 4455ac_compiler_gnu=$ac_cv_c_compiler_gnu 4456if test -n "$ac_tool_prefix"; then 4457 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. 4458set dummy ${ac_tool_prefix}gcc; ac_word=$2 4459{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4460$as_echo_n "checking for $ac_word... " >&6; } 4461if ${ac_cv_prog_CC+:} false; then : 4462 $as_echo_n "(cached) " >&6 4463else 4464 if test -n "$CC"; then 4465 ac_cv_prog_CC="$CC" # Let the user override the test. 4466else 4467as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4468for as_dir in $PATH 4469do 4470 IFS=$as_save_IFS 4471 test -z "$as_dir" && as_dir=. 4472 for ac_exec_ext in '' $ac_executable_extensions; do 4473 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4474 ac_cv_prog_CC="${ac_tool_prefix}gcc" 4475 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4476 break 2 4477 fi 4478done 4479 done 4480IFS=$as_save_IFS 4481 4482fi 4483fi 4484CC=$ac_cv_prog_CC 4485if test -n "$CC"; then 4486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 4487$as_echo "$CC" >&6; } 4488else 4489 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4490$as_echo "no" >&6; } 4491fi 4492 4493 4494fi 4495if test -z "$ac_cv_prog_CC"; then 4496 ac_ct_CC=$CC 4497 # Extract the first word of "gcc", so it can be a program name with args. 4498set dummy gcc; ac_word=$2 4499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4500$as_echo_n "checking for $ac_word... " >&6; } 4501if ${ac_cv_prog_ac_ct_CC+:} false; then : 4502 $as_echo_n "(cached) " >&6 4503else 4504 if test -n "$ac_ct_CC"; then 4505 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 4506else 4507as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4508for as_dir in $PATH 4509do 4510 IFS=$as_save_IFS 4511 test -z "$as_dir" && as_dir=. 4512 for ac_exec_ext in '' $ac_executable_extensions; do 4513 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4514 ac_cv_prog_ac_ct_CC="gcc" 4515 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4516 break 2 4517 fi 4518done 4519 done 4520IFS=$as_save_IFS 4521 4522fi 4523fi 4524ac_ct_CC=$ac_cv_prog_ac_ct_CC 4525if test -n "$ac_ct_CC"; then 4526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 4527$as_echo "$ac_ct_CC" >&6; } 4528else 4529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4530$as_echo "no" >&6; } 4531fi 4532 4533 if test "x$ac_ct_CC" = x; then 4534 CC="" 4535 else 4536 case $cross_compiling:$ac_tool_warned in 4537yes:) 4538{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 4539$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 4540ac_tool_warned=yes ;; 4541esac 4542 CC=$ac_ct_CC 4543 fi 4544else 4545 CC="$ac_cv_prog_CC" 4546fi 4547 4548if test -z "$CC"; then 4549 if test -n "$ac_tool_prefix"; then 4550 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. 4551set dummy ${ac_tool_prefix}cc; ac_word=$2 4552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4553$as_echo_n "checking for $ac_word... " >&6; } 4554if ${ac_cv_prog_CC+:} false; then : 4555 $as_echo_n "(cached) " >&6 4556else 4557 if test -n "$CC"; then 4558 ac_cv_prog_CC="$CC" # Let the user override the test. 4559else 4560as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4561for as_dir in $PATH 4562do 4563 IFS=$as_save_IFS 4564 test -z "$as_dir" && as_dir=. 4565 for ac_exec_ext in '' $ac_executable_extensions; do 4566 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4567 ac_cv_prog_CC="${ac_tool_prefix}cc" 4568 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4569 break 2 4570 fi 4571done 4572 done 4573IFS=$as_save_IFS 4574 4575fi 4576fi 4577CC=$ac_cv_prog_CC 4578if test -n "$CC"; then 4579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 4580$as_echo "$CC" >&6; } 4581else 4582 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4583$as_echo "no" >&6; } 4584fi 4585 4586 4587 fi 4588fi 4589if test -z "$CC"; then 4590 # Extract the first word of "cc", so it can be a program name with args. 4591set dummy cc; ac_word=$2 4592{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4593$as_echo_n "checking for $ac_word... " >&6; } 4594if ${ac_cv_prog_CC+:} false; then : 4595 $as_echo_n "(cached) " >&6 4596else 4597 if test -n "$CC"; then 4598 ac_cv_prog_CC="$CC" # Let the user override the test. 4599else 4600 ac_prog_rejected=no 4601as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4602for as_dir in $PATH 4603do 4604 IFS=$as_save_IFS 4605 test -z "$as_dir" && as_dir=. 4606 for ac_exec_ext in '' $ac_executable_extensions; do 4607 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4608 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then 4609 ac_prog_rejected=yes 4610 continue 4611 fi 4612 ac_cv_prog_CC="cc" 4613 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4614 break 2 4615 fi 4616done 4617 done 4618IFS=$as_save_IFS 4619 4620if test $ac_prog_rejected = yes; then 4621 # We found a bogon in the path, so make sure we never use it. 4622 set dummy $ac_cv_prog_CC 4623 shift 4624 if test $# != 0; then 4625 # We chose a different compiler from the bogus one. 4626 # However, it has the same basename, so the bogon will be chosen 4627 # first if we set CC to just the basename; use the full file name. 4628 shift 4629 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" 4630 fi 4631fi 4632fi 4633fi 4634CC=$ac_cv_prog_CC 4635if test -n "$CC"; then 4636 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 4637$as_echo "$CC" >&6; } 4638else 4639 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4640$as_echo "no" >&6; } 4641fi 4642 4643 4644fi 4645if test -z "$CC"; then 4646 if test -n "$ac_tool_prefix"; then 4647 for ac_prog in cl.exe 4648 do 4649 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 4650set dummy $ac_tool_prefix$ac_prog; ac_word=$2 4651{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4652$as_echo_n "checking for $ac_word... " >&6; } 4653if ${ac_cv_prog_CC+:} false; then : 4654 $as_echo_n "(cached) " >&6 4655else 4656 if test -n "$CC"; then 4657 ac_cv_prog_CC="$CC" # Let the user override the test. 4658else 4659as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4660for as_dir in $PATH 4661do 4662 IFS=$as_save_IFS 4663 test -z "$as_dir" && as_dir=. 4664 for ac_exec_ext in '' $ac_executable_extensions; do 4665 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4666 ac_cv_prog_CC="$ac_tool_prefix$ac_prog" 4667 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4668 break 2 4669 fi 4670done 4671 done 4672IFS=$as_save_IFS 4673 4674fi 4675fi 4676CC=$ac_cv_prog_CC 4677if test -n "$CC"; then 4678 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 4679$as_echo "$CC" >&6; } 4680else 4681 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4682$as_echo "no" >&6; } 4683fi 4684 4685 4686 test -n "$CC" && break 4687 done 4688fi 4689if test -z "$CC"; then 4690 ac_ct_CC=$CC 4691 for ac_prog in cl.exe 4692do 4693 # Extract the first word of "$ac_prog", so it can be a program name with args. 4694set dummy $ac_prog; ac_word=$2 4695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 4696$as_echo_n "checking for $ac_word... " >&6; } 4697if ${ac_cv_prog_ac_ct_CC+:} false; then : 4698 $as_echo_n "(cached) " >&6 4699else 4700 if test -n "$ac_ct_CC"; then 4701 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. 4702else 4703as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 4704for as_dir in $PATH 4705do 4706 IFS=$as_save_IFS 4707 test -z "$as_dir" && as_dir=. 4708 for ac_exec_ext in '' $ac_executable_extensions; do 4709 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 4710 ac_cv_prog_ac_ct_CC="$ac_prog" 4711 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 4712 break 2 4713 fi 4714done 4715 done 4716IFS=$as_save_IFS 4717 4718fi 4719fi 4720ac_ct_CC=$ac_cv_prog_ac_ct_CC 4721if test -n "$ac_ct_CC"; then 4722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 4723$as_echo "$ac_ct_CC" >&6; } 4724else 4725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4726$as_echo "no" >&6; } 4727fi 4728 4729 4730 test -n "$ac_ct_CC" && break 4731done 4732 4733 if test "x$ac_ct_CC" = x; then 4734 CC="" 4735 else 4736 case $cross_compiling:$ac_tool_warned in 4737yes:) 4738{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 4739$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 4740ac_tool_warned=yes ;; 4741esac 4742 CC=$ac_ct_CC 4743 fi 4744fi 4745 4746fi 4747 4748 4749test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4750$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4751as_fn_error $? "no acceptable C compiler found in \$PATH 4752See \`config.log' for more details" "$LINENO" 5; } 4753 4754# Provide some information about the compiler. 4755$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 4756set X $ac_compile 4757ac_compiler=$2 4758for ac_option in --version -v -V -qversion; do 4759 { { ac_try="$ac_compiler $ac_option >&5" 4760case "(($ac_try" in 4761 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4762 *) ac_try_echo=$ac_try;; 4763esac 4764eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 4765$as_echo "$ac_try_echo"; } >&5 4766 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 4767 ac_status=$? 4768 if test -s conftest.err; then 4769 sed '10a\ 4770... rest of stderr output deleted ... 4771 10q' conftest.err >conftest.er1 4772 cat conftest.er1 >&5 4773 fi 4774 rm -f conftest.er1 conftest.err 4775 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 4776 test $ac_status = 0; } 4777done 4778 4779cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4780/* end confdefs.h. */ 4781 4782int 4783main () 4784{ 4785 4786 ; 4787 return 0; 4788} 4789_ACEOF 4790ac_clean_files_save=$ac_clean_files 4791ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" 4792# Try to create an executable without -o first, disregard a.out. 4793# It will help us diagnose broken compilers, and finding out an intuition 4794# of exeext. 4795{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 4796$as_echo_n "checking whether the C compiler works... " >&6; } 4797ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` 4798 4799# The possible output files: 4800ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" 4801 4802ac_rmfiles= 4803for ac_file in $ac_files 4804do 4805 case $ac_file in 4806 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 4807 * ) ac_rmfiles="$ac_rmfiles $ac_file";; 4808 esac 4809done 4810rm -f $ac_rmfiles 4811 4812if { { ac_try="$ac_link_default" 4813case "(($ac_try" in 4814 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4815 *) ac_try_echo=$ac_try;; 4816esac 4817eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 4818$as_echo "$ac_try_echo"; } >&5 4819 (eval "$ac_link_default") 2>&5 4820 ac_status=$? 4821 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 4822 test $ac_status = 0; }; then : 4823 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. 4824# So ignore a value of `no', otherwise this would lead to `EXEEXT = no' 4825# in a Makefile. We should not override ac_cv_exeext if it was cached, 4826# so that the user can short-circuit this test for compilers unknown to 4827# Autoconf. 4828for ac_file in $ac_files '' 4829do 4830 test -f "$ac_file" || continue 4831 case $ac_file in 4832 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) 4833 ;; 4834 [ab].out ) 4835 # We found the default executable, but exeext='' is most 4836 # certainly right. 4837 break;; 4838 *.* ) 4839 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; 4840 then :; else 4841 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 4842 fi 4843 # We set ac_cv_exeext here because the later test for it is not 4844 # safe: cross compilers may not add the suffix if given an `-o' 4845 # argument, so we may need to know it at that point already. 4846 # Even if this section looks crufty: it has the advantage of 4847 # actually working. 4848 break;; 4849 * ) 4850 break;; 4851 esac 4852done 4853test "$ac_cv_exeext" = no && ac_cv_exeext= 4854 4855else 4856 ac_file='' 4857fi 4858if test -z "$ac_file"; then : 4859 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 4860$as_echo "no" >&6; } 4861$as_echo "$as_me: failed program was:" >&5 4862sed 's/^/| /' conftest.$ac_ext >&5 4863 4864{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4865$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4866as_fn_error 77 "C compiler cannot create executables 4867See \`config.log' for more details" "$LINENO" 5; } 4868else 4869 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 4870$as_echo "yes" >&6; } 4871fi 4872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 4873$as_echo_n "checking for C compiler default output file name... " >&6; } 4874{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 4875$as_echo "$ac_file" >&6; } 4876ac_exeext=$ac_cv_exeext 4877 4878rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out 4879ac_clean_files=$ac_clean_files_save 4880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 4881$as_echo_n "checking for suffix of executables... " >&6; } 4882if { { ac_try="$ac_link" 4883case "(($ac_try" in 4884 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4885 *) ac_try_echo=$ac_try;; 4886esac 4887eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 4888$as_echo "$ac_try_echo"; } >&5 4889 (eval "$ac_link") 2>&5 4890 ac_status=$? 4891 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 4892 test $ac_status = 0; }; then : 4893 # If both `conftest.exe' and `conftest' are `present' (well, observable) 4894# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will 4895# work properly (i.e., refer to `conftest.exe'), while it won't with 4896# `rm'. 4897for ac_file in conftest.exe conftest conftest.*; do 4898 test -f "$ac_file" || continue 4899 case $ac_file in 4900 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; 4901 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` 4902 break;; 4903 * ) break;; 4904 esac 4905done 4906else 4907 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4908$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4909as_fn_error $? "cannot compute suffix of executables: cannot compile and link 4910See \`config.log' for more details" "$LINENO" 5; } 4911fi 4912rm -f conftest conftest$ac_cv_exeext 4913{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 4914$as_echo "$ac_cv_exeext" >&6; } 4915 4916rm -f conftest.$ac_ext 4917EXEEXT=$ac_cv_exeext 4918ac_exeext=$EXEEXT 4919cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4920/* end confdefs.h. */ 4921#include <stdio.h> 4922int 4923main () 4924{ 4925FILE *f = fopen ("conftest.out", "w"); 4926 return ferror (f) || fclose (f) != 0; 4927 4928 ; 4929 return 0; 4930} 4931_ACEOF 4932ac_clean_files="$ac_clean_files conftest.out" 4933# Check that the compiler produces executables we can run. If not, either 4934# the compiler is broken, or we cross compile. 4935{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 4936$as_echo_n "checking whether we are cross compiling... " >&6; } 4937if test "$cross_compiling" != yes; then 4938 { { ac_try="$ac_link" 4939case "(($ac_try" in 4940 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4941 *) ac_try_echo=$ac_try;; 4942esac 4943eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 4944$as_echo "$ac_try_echo"; } >&5 4945 (eval "$ac_link") 2>&5 4946 ac_status=$? 4947 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 4948 test $ac_status = 0; } 4949 if { ac_try='./conftest$ac_cv_exeext' 4950 { { case "(($ac_try" in 4951 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4952 *) ac_try_echo=$ac_try;; 4953esac 4954eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 4955$as_echo "$ac_try_echo"; } >&5 4956 (eval "$ac_try") 2>&5 4957 ac_status=$? 4958 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 4959 test $ac_status = 0; }; }; then 4960 cross_compiling=no 4961 else 4962 if test "$cross_compiling" = maybe; then 4963 cross_compiling=yes 4964 else 4965 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 4966$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 4967as_fn_error $? "cannot run C compiled programs. 4968If you meant to cross compile, use \`--host'. 4969See \`config.log' for more details" "$LINENO" 5; } 4970 fi 4971 fi 4972fi 4973{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 4974$as_echo "$cross_compiling" >&6; } 4975 4976rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out 4977ac_clean_files=$ac_clean_files_save 4978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 4979$as_echo_n "checking for suffix of object files... " >&6; } 4980if ${ac_cv_objext+:} false; then : 4981 $as_echo_n "(cached) " >&6 4982else 4983 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 4984/* end confdefs.h. */ 4985 4986int 4987main () 4988{ 4989 4990 ; 4991 return 0; 4992} 4993_ACEOF 4994rm -f conftest.o conftest.obj 4995if { { ac_try="$ac_compile" 4996case "(($ac_try" in 4997 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 4998 *) ac_try_echo=$ac_try;; 4999esac 5000eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 5001$as_echo "$ac_try_echo"; } >&5 5002 (eval "$ac_compile") 2>&5 5003 ac_status=$? 5004 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 5005 test $ac_status = 0; }; then : 5006 for ac_file in conftest.o conftest.obj conftest.*; do 5007 test -f "$ac_file" || continue; 5008 case $ac_file in 5009 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; 5010 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` 5011 break;; 5012 esac 5013done 5014else 5015 $as_echo "$as_me: failed program was:" >&5 5016sed 's/^/| /' conftest.$ac_ext >&5 5017 5018{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 5019$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 5020as_fn_error $? "cannot compute suffix of object files: cannot compile 5021See \`config.log' for more details" "$LINENO" 5; } 5022fi 5023rm -f conftest.$ac_cv_objext conftest.$ac_ext 5024fi 5025{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 5026$as_echo "$ac_cv_objext" >&6; } 5027OBJEXT=$ac_cv_objext 5028ac_objext=$OBJEXT 5029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 5030$as_echo_n "checking whether we are using the GNU C compiler... " >&6; } 5031if ${ac_cv_c_compiler_gnu+:} false; then : 5032 $as_echo_n "(cached) " >&6 5033else 5034 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5035/* end confdefs.h. */ 5036 5037int 5038main () 5039{ 5040#ifndef __GNUC__ 5041 choke me 5042#endif 5043 5044 ; 5045 return 0; 5046} 5047_ACEOF 5048if ac_fn_c_try_compile "$LINENO"; then : 5049 ac_compiler_gnu=yes 5050else 5051 ac_compiler_gnu=no 5052fi 5053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5054ac_cv_c_compiler_gnu=$ac_compiler_gnu 5055 5056fi 5057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 5058$as_echo "$ac_cv_c_compiler_gnu" >&6; } 5059if test $ac_compiler_gnu = yes; then 5060 GCC=yes 5061else 5062 GCC= 5063fi 5064ac_test_CFLAGS=${CFLAGS+set} 5065ac_save_CFLAGS=$CFLAGS 5066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 5067$as_echo_n "checking whether $CC accepts -g... " >&6; } 5068if ${ac_cv_prog_cc_g+:} false; then : 5069 $as_echo_n "(cached) " >&6 5070else 5071 ac_save_c_werror_flag=$ac_c_werror_flag 5072 ac_c_werror_flag=yes 5073 ac_cv_prog_cc_g=no 5074 CFLAGS="-g" 5075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5076/* end confdefs.h. */ 5077 5078int 5079main () 5080{ 5081 5082 ; 5083 return 0; 5084} 5085_ACEOF 5086if ac_fn_c_try_compile "$LINENO"; then : 5087 ac_cv_prog_cc_g=yes 5088else 5089 CFLAGS="" 5090 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5091/* end confdefs.h. */ 5092 5093int 5094main () 5095{ 5096 5097 ; 5098 return 0; 5099} 5100_ACEOF 5101if ac_fn_c_try_compile "$LINENO"; then : 5102 5103else 5104 ac_c_werror_flag=$ac_save_c_werror_flag 5105 CFLAGS="-g" 5106 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5107/* end confdefs.h. */ 5108 5109int 5110main () 5111{ 5112 5113 ; 5114 return 0; 5115} 5116_ACEOF 5117if ac_fn_c_try_compile "$LINENO"; then : 5118 ac_cv_prog_cc_g=yes 5119fi 5120rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5121fi 5122rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5123fi 5124rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5125 ac_c_werror_flag=$ac_save_c_werror_flag 5126fi 5127{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 5128$as_echo "$ac_cv_prog_cc_g" >&6; } 5129if test "$ac_test_CFLAGS" = set; then 5130 CFLAGS=$ac_save_CFLAGS 5131elif test $ac_cv_prog_cc_g = yes; then 5132 if test "$GCC" = yes; then 5133 CFLAGS="-g -O2" 5134 else 5135 CFLAGS="-g" 5136 fi 5137else 5138 if test "$GCC" = yes; then 5139 CFLAGS="-O2" 5140 else 5141 CFLAGS= 5142 fi 5143fi 5144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 5145$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } 5146if ${ac_cv_prog_cc_c89+:} false; then : 5147 $as_echo_n "(cached) " >&6 5148else 5149 ac_cv_prog_cc_c89=no 5150ac_save_CC=$CC 5151cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5152/* end confdefs.h. */ 5153#include <stdarg.h> 5154#include <stdio.h> 5155struct stat; 5156/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ 5157struct buf { int x; }; 5158FILE * (*rcsopen) (struct buf *, struct stat *, int); 5159static char *e (p, i) 5160 char **p; 5161 int i; 5162{ 5163 return p[i]; 5164} 5165static char *f (char * (*g) (char **, int), char **p, ...) 5166{ 5167 char *s; 5168 va_list v; 5169 va_start (v,p); 5170 s = g (p, va_arg (v,int)); 5171 va_end (v); 5172 return s; 5173} 5174 5175/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has 5176 function prototypes and stuff, but not '\xHH' hex character constants. 5177 These don't provoke an error unfortunately, instead are silently treated 5178 as 'x'. The following induces an error, until -std is added to get 5179 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an 5180 array size at least. It's necessary to write '\x00'==0 to get something 5181 that's true only with -std. */ 5182int osf4_cc_array ['\x00' == 0 ? 1 : -1]; 5183 5184/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters 5185 inside strings and character constants. */ 5186#define FOO(x) 'x' 5187int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; 5188 5189int test (int i, double x); 5190struct s1 {int (*f) (int a);}; 5191struct s2 {int (*f) (double a);}; 5192int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); 5193int argc; 5194char **argv; 5195int 5196main () 5197{ 5198return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; 5199 ; 5200 return 0; 5201} 5202_ACEOF 5203for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ 5204 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 5205do 5206 CC="$ac_save_CC $ac_arg" 5207 if ac_fn_c_try_compile "$LINENO"; then : 5208 ac_cv_prog_cc_c89=$ac_arg 5209fi 5210rm -f core conftest.err conftest.$ac_objext 5211 test "x$ac_cv_prog_cc_c89" != "xno" && break 5212done 5213rm -f conftest.$ac_ext 5214CC=$ac_save_CC 5215 5216fi 5217# AC_CACHE_VAL 5218case "x$ac_cv_prog_cc_c89" in 5219 x) 5220 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 5221$as_echo "none needed" >&6; } ;; 5222 xno) 5223 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 5224$as_echo "unsupported" >&6; } ;; 5225 *) 5226 CC="$CC $ac_cv_prog_cc_c89" 5227 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 5228$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; 5229esac 5230if test "x$ac_cv_prog_cc_c89" != xno; then : 5231 5232fi 5233 5234ac_ext=c 5235ac_cpp='$CPP $CPPFLAGS' 5236ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 5237ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 5238ac_compiler_gnu=$ac_cv_c_compiler_gnu 5239 5240depcc="$CC" am_compiler_list= 5241 5242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 5243$as_echo_n "checking dependency style of $depcc... " >&6; } 5244if ${am_cv_CC_dependencies_compiler_type+:} false; then : 5245 $as_echo_n "(cached) " >&6 5246else 5247 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 5248 # We make a subdir and do the tests there. Otherwise we can end up 5249 # making bogus files that we don't know about and never remove. For 5250 # instance it was reported that on HP-UX the gcc test will end up 5251 # making a dummy file named 'D' -- because '-MD' means "put the output 5252 # in D". 5253 rm -rf conftest.dir 5254 mkdir conftest.dir 5255 # Copy depcomp to subdir because otherwise we won't find it if we're 5256 # using a relative directory. 5257 cp "$am_depcomp" conftest.dir 5258 cd conftest.dir 5259 # We will build objects and dependencies in a subdirectory because 5260 # it helps to detect inapplicable dependency modes. For instance 5261 # both Tru64's cc and ICC support -MD to output dependencies as a 5262 # side effect of compilation, but ICC will put the dependencies in 5263 # the current directory while Tru64 will put them in the object 5264 # directory. 5265 mkdir sub 5266 5267 am_cv_CC_dependencies_compiler_type=none 5268 if test "$am_compiler_list" = ""; then 5269 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` 5270 fi 5271 am__universal=false 5272 case " $depcc " in #( 5273 *\ -arch\ *\ -arch\ *) am__universal=true ;; 5274 esac 5275 5276 for depmode in $am_compiler_list; do 5277 # Setup a source with many dependencies, because some compilers 5278 # like to wrap large dependency lists on column 80 (with \), and 5279 # we should not choose a depcomp mode which is confused by this. 5280 # 5281 # We need to recreate these files for each test, as the compiler may 5282 # overwrite some of them when testing with obscure command lines. 5283 # This happens at least with the AIX C compiler. 5284 : > sub/conftest.c 5285 for i in 1 2 3 4 5 6; do 5286 echo '#include "conftst'$i'.h"' >> sub/conftest.c 5287 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 5288 # Solaris 10 /bin/sh. 5289 echo '/* dummy */' > sub/conftst$i.h 5290 done 5291 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 5292 5293 # We check with '-c' and '-o' for the sake of the "dashmstdout" 5294 # mode. It turns out that the SunPro C++ compiler does not properly 5295 # handle '-M -o', and we need to detect this. Also, some Intel 5296 # versions had trouble with output in subdirs. 5297 am__obj=sub/conftest.${OBJEXT-o} 5298 am__minus_obj="-o $am__obj" 5299 case $depmode in 5300 gcc) 5301 # This depmode causes a compiler race in universal mode. 5302 test "$am__universal" = false || continue 5303 ;; 5304 nosideeffect) 5305 # After this tag, mechanisms are not by side-effect, so they'll 5306 # only be used when explicitly requested. 5307 if test "x$enable_dependency_tracking" = xyes; then 5308 continue 5309 else 5310 break 5311 fi 5312 ;; 5313 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 5314 # This compiler won't grok '-c -o', but also, the minuso test has 5315 # not run yet. These depmodes are late enough in the game, and 5316 # so weak that their functioning should not be impacted. 5317 am__obj=conftest.${OBJEXT-o} 5318 am__minus_obj= 5319 ;; 5320 none) break ;; 5321 esac 5322 if depmode=$depmode \ 5323 source=sub/conftest.c object=$am__obj \ 5324 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 5325 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 5326 >/dev/null 2>conftest.err && 5327 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 5328 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 5329 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 5330 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 5331 # icc doesn't choke on unknown options, it will just issue warnings 5332 # or remarks (even with -Werror). So we grep stderr for any message 5333 # that says an option was ignored or not supported. 5334 # When given -MP, icc 7.0 and 7.1 complain thusly: 5335 # icc: Command line warning: ignoring option '-M'; no argument required 5336 # The diagnosis changed in icc 8.0: 5337 # icc: Command line remark: option '-MP' not supported 5338 if (grep 'ignoring option' conftest.err || 5339 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 5340 am_cv_CC_dependencies_compiler_type=$depmode 5341 break 5342 fi 5343 fi 5344 done 5345 5346 cd .. 5347 rm -rf conftest.dir 5348else 5349 am_cv_CC_dependencies_compiler_type=none 5350fi 5351 5352fi 5353{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 5354$as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } 5355CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type 5356 5357 if 5358 test "x$enable_dependency_tracking" != xno \ 5359 && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then 5360 am__fastdepCC_TRUE= 5361 am__fastdepCC_FALSE='#' 5362else 5363 am__fastdepCC_TRUE='#' 5364 am__fastdepCC_FALSE= 5365fi 5366 5367 5368 case $ac_cv_prog_cc_stdc in #( 5369 no) : 5370 ac_cv_prog_cc_c99=no; ac_cv_prog_cc_c89=no ;; #( 5371 *) : 5372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C99" >&5 5373$as_echo_n "checking for $CC option to accept ISO C99... " >&6; } 5374if ${ac_cv_prog_cc_c99+:} false; then : 5375 $as_echo_n "(cached) " >&6 5376else 5377 ac_cv_prog_cc_c99=no 5378ac_save_CC=$CC 5379cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5380/* end confdefs.h. */ 5381#include <stdarg.h> 5382#include <stdbool.h> 5383#include <stdlib.h> 5384#include <wchar.h> 5385#include <stdio.h> 5386 5387// Check varargs macros. These examples are taken from C99 6.10.3.5. 5388#define debug(...) fprintf (stderr, __VA_ARGS__) 5389#define showlist(...) puts (#__VA_ARGS__) 5390#define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) 5391static void 5392test_varargs_macros (void) 5393{ 5394 int x = 1234; 5395 int y = 5678; 5396 debug ("Flag"); 5397 debug ("X = %d\n", x); 5398 showlist (The first, second, and third items.); 5399 report (x>y, "x is %d but y is %d", x, y); 5400} 5401 5402// Check long long types. 5403#define BIG64 18446744073709551615ull 5404#define BIG32 4294967295ul 5405#define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) 5406#if !BIG_OK 5407 your preprocessor is broken; 5408#endif 5409#if BIG_OK 5410#else 5411 your preprocessor is broken; 5412#endif 5413static long long int bignum = -9223372036854775807LL; 5414static unsigned long long int ubignum = BIG64; 5415 5416struct incomplete_array 5417{ 5418 int datasize; 5419 double data[]; 5420}; 5421 5422struct named_init { 5423 int number; 5424 const wchar_t *name; 5425 double average; 5426}; 5427 5428typedef const char *ccp; 5429 5430static inline int 5431test_restrict (ccp restrict text) 5432{ 5433 // See if C++-style comments work. 5434 // Iterate through items via the restricted pointer. 5435 // Also check for declarations in for loops. 5436 for (unsigned int i = 0; *(text+i) != '\0'; ++i) 5437 continue; 5438 return 0; 5439} 5440 5441// Check varargs and va_copy. 5442static void 5443test_varargs (const char *format, ...) 5444{ 5445 va_list args; 5446 va_start (args, format); 5447 va_list args_copy; 5448 va_copy (args_copy, args); 5449 5450 const char *str; 5451 int number; 5452 float fnumber; 5453 5454 while (*format) 5455 { 5456 switch (*format++) 5457 { 5458 case 's': // string 5459 str = va_arg (args_copy, const char *); 5460 break; 5461 case 'd': // int 5462 number = va_arg (args_copy, int); 5463 break; 5464 case 'f': // float 5465 fnumber = va_arg (args_copy, double); 5466 break; 5467 default: 5468 break; 5469 } 5470 } 5471 va_end (args_copy); 5472 va_end (args); 5473} 5474 5475int 5476main () 5477{ 5478 5479 // Check bool. 5480 _Bool success = false; 5481 5482 // Check restrict. 5483 if (test_restrict ("String literal") == 0) 5484 success = true; 5485 char *restrict newvar = "Another string"; 5486 5487 // Check varargs. 5488 test_varargs ("s, d' f .", "string", 65, 34.234); 5489 test_varargs_macros (); 5490 5491 // Check flexible array members. 5492 struct incomplete_array *ia = 5493 malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); 5494 ia->datasize = 10; 5495 for (int i = 0; i < ia->datasize; ++i) 5496 ia->data[i] = i * 1.234; 5497 5498 // Check named initializers. 5499 struct named_init ni = { 5500 .number = 34, 5501 .name = L"Test wide string", 5502 .average = 543.34343, 5503 }; 5504 5505 ni.number = 58; 5506 5507 int dynamic_array[ni.number]; 5508 dynamic_array[ni.number - 1] = 543; 5509 5510 // work around unused variable warnings 5511 return (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == 'x' 5512 || dynamic_array[ni.number - 1] != 543); 5513 5514 ; 5515 return 0; 5516} 5517_ACEOF 5518for ac_arg in '' -std=gnu99 -std=c99 -c99 -AC99 -D_STDC_C99= -qlanglvl=extc99 5519do 5520 CC="$ac_save_CC $ac_arg" 5521 if ac_fn_c_try_compile "$LINENO"; then : 5522 ac_cv_prog_cc_c99=$ac_arg 5523fi 5524rm -f core conftest.err conftest.$ac_objext 5525 test "x$ac_cv_prog_cc_c99" != "xno" && break 5526done 5527rm -f conftest.$ac_ext 5528CC=$ac_save_CC 5529 5530fi 5531# AC_CACHE_VAL 5532case "x$ac_cv_prog_cc_c99" in 5533 x) 5534 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 5535$as_echo "none needed" >&6; } ;; 5536 xno) 5537 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 5538$as_echo "unsupported" >&6; } ;; 5539 *) 5540 CC="$CC $ac_cv_prog_cc_c99" 5541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 5542$as_echo "$ac_cv_prog_cc_c99" >&6; } ;; 5543esac 5544if test "x$ac_cv_prog_cc_c99" != xno; then : 5545 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 5546else 5547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 5548$as_echo_n "checking for $CC option to accept ISO C89... " >&6; } 5549if ${ac_cv_prog_cc_c89+:} false; then : 5550 $as_echo_n "(cached) " >&6 5551else 5552 ac_cv_prog_cc_c89=no 5553ac_save_CC=$CC 5554cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5555/* end confdefs.h. */ 5556#include <stdarg.h> 5557#include <stdio.h> 5558struct stat; 5559/* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ 5560struct buf { int x; }; 5561FILE * (*rcsopen) (struct buf *, struct stat *, int); 5562static char *e (p, i) 5563 char **p; 5564 int i; 5565{ 5566 return p[i]; 5567} 5568static char *f (char * (*g) (char **, int), char **p, ...) 5569{ 5570 char *s; 5571 va_list v; 5572 va_start (v,p); 5573 s = g (p, va_arg (v,int)); 5574 va_end (v); 5575 return s; 5576} 5577 5578/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has 5579 function prototypes and stuff, but not '\xHH' hex character constants. 5580 These don't provoke an error unfortunately, instead are silently treated 5581 as 'x'. The following induces an error, until -std is added to get 5582 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an 5583 array size at least. It's necessary to write '\x00'==0 to get something 5584 that's true only with -std. */ 5585int osf4_cc_array ['\x00' == 0 ? 1 : -1]; 5586 5587/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters 5588 inside strings and character constants. */ 5589#define FOO(x) 'x' 5590int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; 5591 5592int test (int i, double x); 5593struct s1 {int (*f) (int a);}; 5594struct s2 {int (*f) (double a);}; 5595int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); 5596int argc; 5597char **argv; 5598int 5599main () 5600{ 5601return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; 5602 ; 5603 return 0; 5604} 5605_ACEOF 5606for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ 5607 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" 5608do 5609 CC="$ac_save_CC $ac_arg" 5610 if ac_fn_c_try_compile "$LINENO"; then : 5611 ac_cv_prog_cc_c89=$ac_arg 5612fi 5613rm -f core conftest.err conftest.$ac_objext 5614 test "x$ac_cv_prog_cc_c89" != "xno" && break 5615done 5616rm -f conftest.$ac_ext 5617CC=$ac_save_CC 5618 5619fi 5620# AC_CACHE_VAL 5621case "x$ac_cv_prog_cc_c89" in 5622 x) 5623 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 5624$as_echo "none needed" >&6; } ;; 5625 xno) 5626 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 5627$as_echo "unsupported" >&6; } ;; 5628 *) 5629 CC="$CC $ac_cv_prog_cc_c89" 5630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 5631$as_echo "$ac_cv_prog_cc_c89" >&6; } ;; 5632esac 5633if test "x$ac_cv_prog_cc_c89" != xno; then : 5634 ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 5635else 5636 ac_cv_prog_cc_stdc=no 5637fi 5638 5639fi 5640 ;; 5641esac 5642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO Standard C" >&5 5643$as_echo_n "checking for $CC option to accept ISO Standard C... " >&6; } 5644 if ${ac_cv_prog_cc_stdc+:} false; then : 5645 $as_echo_n "(cached) " >&6 5646fi 5647 5648 case $ac_cv_prog_cc_stdc in #( 5649 no) : 5650 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 5651$as_echo "unsupported" >&6; } ;; #( 5652 '') : 5653 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 5654$as_echo "none needed" >&6; } ;; #( 5655 *) : 5656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_stdc" >&5 5657$as_echo "$ac_cv_prog_cc_stdc" >&6; } ;; 5658esac 5659 5660ac_ext=cpp 5661ac_cpp='$CXXCPP $CPPFLAGS' 5662ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 5663ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 5664ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 5665if test -z "$CXX"; then 5666 if test -n "$CCC"; then 5667 CXX=$CCC 5668 else 5669 if test -n "$ac_tool_prefix"; then 5670 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 5671 do 5672 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. 5673set dummy $ac_tool_prefix$ac_prog; ac_word=$2 5674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5675$as_echo_n "checking for $ac_word... " >&6; } 5676if ${ac_cv_prog_CXX+:} false; then : 5677 $as_echo_n "(cached) " >&6 5678else 5679 if test -n "$CXX"; then 5680 ac_cv_prog_CXX="$CXX" # Let the user override the test. 5681else 5682as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5683for as_dir in $PATH 5684do 5685 IFS=$as_save_IFS 5686 test -z "$as_dir" && as_dir=. 5687 for ac_exec_ext in '' $ac_executable_extensions; do 5688 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5689 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" 5690 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5691 break 2 5692 fi 5693done 5694 done 5695IFS=$as_save_IFS 5696 5697fi 5698fi 5699CXX=$ac_cv_prog_CXX 5700if test -n "$CXX"; then 5701 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 5702$as_echo "$CXX" >&6; } 5703else 5704 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5705$as_echo "no" >&6; } 5706fi 5707 5708 5709 test -n "$CXX" && break 5710 done 5711fi 5712if test -z "$CXX"; then 5713 ac_ct_CXX=$CXX 5714 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC 5715do 5716 # Extract the first word of "$ac_prog", so it can be a program name with args. 5717set dummy $ac_prog; ac_word=$2 5718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 5719$as_echo_n "checking for $ac_word... " >&6; } 5720if ${ac_cv_prog_ac_ct_CXX+:} false; then : 5721 $as_echo_n "(cached) " >&6 5722else 5723 if test -n "$ac_ct_CXX"; then 5724 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. 5725else 5726as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 5727for as_dir in $PATH 5728do 5729 IFS=$as_save_IFS 5730 test -z "$as_dir" && as_dir=. 5731 for ac_exec_ext in '' $ac_executable_extensions; do 5732 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 5733 ac_cv_prog_ac_ct_CXX="$ac_prog" 5734 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 5735 break 2 5736 fi 5737done 5738 done 5739IFS=$as_save_IFS 5740 5741fi 5742fi 5743ac_ct_CXX=$ac_cv_prog_ac_ct_CXX 5744if test -n "$ac_ct_CXX"; then 5745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 5746$as_echo "$ac_ct_CXX" >&6; } 5747else 5748 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 5749$as_echo "no" >&6; } 5750fi 5751 5752 5753 test -n "$ac_ct_CXX" && break 5754done 5755 5756 if test "x$ac_ct_CXX" = x; then 5757 CXX="g++" 5758 else 5759 case $cross_compiling:$ac_tool_warned in 5760yes:) 5761{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 5762$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 5763ac_tool_warned=yes ;; 5764esac 5765 CXX=$ac_ct_CXX 5766 fi 5767fi 5768 5769 fi 5770fi 5771# Provide some information about the compiler. 5772$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 5773set X $ac_compile 5774ac_compiler=$2 5775for ac_option in --version -v -V -qversion; do 5776 { { ac_try="$ac_compiler $ac_option >&5" 5777case "(($ac_try" in 5778 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 5779 *) ac_try_echo=$ac_try;; 5780esac 5781eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 5782$as_echo "$ac_try_echo"; } >&5 5783 (eval "$ac_compiler $ac_option >&5") 2>conftest.err 5784 ac_status=$? 5785 if test -s conftest.err; then 5786 sed '10a\ 5787... rest of stderr output deleted ... 5788 10q' conftest.err >conftest.er1 5789 cat conftest.er1 >&5 5790 fi 5791 rm -f conftest.er1 conftest.err 5792 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 5793 test $ac_status = 0; } 5794done 5795 5796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 5797$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } 5798if ${ac_cv_cxx_compiler_gnu+:} false; then : 5799 $as_echo_n "(cached) " >&6 5800else 5801 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5802/* end confdefs.h. */ 5803 5804int 5805main () 5806{ 5807#ifndef __GNUC__ 5808 choke me 5809#endif 5810 5811 ; 5812 return 0; 5813} 5814_ACEOF 5815if ac_fn_cxx_try_compile "$LINENO"; then : 5816 ac_compiler_gnu=yes 5817else 5818 ac_compiler_gnu=no 5819fi 5820rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5821ac_cv_cxx_compiler_gnu=$ac_compiler_gnu 5822 5823fi 5824{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 5825$as_echo "$ac_cv_cxx_compiler_gnu" >&6; } 5826if test $ac_compiler_gnu = yes; then 5827 GXX=yes 5828else 5829 GXX= 5830fi 5831ac_test_CXXFLAGS=${CXXFLAGS+set} 5832ac_save_CXXFLAGS=$CXXFLAGS 5833{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 5834$as_echo_n "checking whether $CXX accepts -g... " >&6; } 5835if ${ac_cv_prog_cxx_g+:} false; then : 5836 $as_echo_n "(cached) " >&6 5837else 5838 ac_save_cxx_werror_flag=$ac_cxx_werror_flag 5839 ac_cxx_werror_flag=yes 5840 ac_cv_prog_cxx_g=no 5841 CXXFLAGS="-g" 5842 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5843/* end confdefs.h. */ 5844 5845int 5846main () 5847{ 5848 5849 ; 5850 return 0; 5851} 5852_ACEOF 5853if ac_fn_cxx_try_compile "$LINENO"; then : 5854 ac_cv_prog_cxx_g=yes 5855else 5856 CXXFLAGS="" 5857 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5858/* end confdefs.h. */ 5859 5860int 5861main () 5862{ 5863 5864 ; 5865 return 0; 5866} 5867_ACEOF 5868if ac_fn_cxx_try_compile "$LINENO"; then : 5869 5870else 5871 ac_cxx_werror_flag=$ac_save_cxx_werror_flag 5872 CXXFLAGS="-g" 5873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 5874/* end confdefs.h. */ 5875 5876int 5877main () 5878{ 5879 5880 ; 5881 return 0; 5882} 5883_ACEOF 5884if ac_fn_cxx_try_compile "$LINENO"; then : 5885 ac_cv_prog_cxx_g=yes 5886fi 5887rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5888fi 5889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5890fi 5891rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 5892 ac_cxx_werror_flag=$ac_save_cxx_werror_flag 5893fi 5894{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 5895$as_echo "$ac_cv_prog_cxx_g" >&6; } 5896if test "$ac_test_CXXFLAGS" = set; then 5897 CXXFLAGS=$ac_save_CXXFLAGS 5898elif test $ac_cv_prog_cxx_g = yes; then 5899 if test "$GXX" = yes; then 5900 CXXFLAGS="-g -O2" 5901 else 5902 CXXFLAGS="-g" 5903 fi 5904else 5905 if test "$GXX" = yes; then 5906 CXXFLAGS="-O2" 5907 else 5908 CXXFLAGS= 5909 fi 5910fi 5911ac_ext=c 5912ac_cpp='$CPP $CPPFLAGS' 5913ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 5914ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 5915ac_compiler_gnu=$ac_cv_c_compiler_gnu 5916 5917depcc="$CXX" am_compiler_list= 5918 5919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 5920$as_echo_n "checking dependency style of $depcc... " >&6; } 5921if ${am_cv_CXX_dependencies_compiler_type+:} false; then : 5922 $as_echo_n "(cached) " >&6 5923else 5924 if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then 5925 # We make a subdir and do the tests there. Otherwise we can end up 5926 # making bogus files that we don't know about and never remove. For 5927 # instance it was reported that on HP-UX the gcc test will end up 5928 # making a dummy file named 'D' -- because '-MD' means "put the output 5929 # in D". 5930 rm -rf conftest.dir 5931 mkdir conftest.dir 5932 # Copy depcomp to subdir because otherwise we won't find it if we're 5933 # using a relative directory. 5934 cp "$am_depcomp" conftest.dir 5935 cd conftest.dir 5936 # We will build objects and dependencies in a subdirectory because 5937 # it helps to detect inapplicable dependency modes. For instance 5938 # both Tru64's cc and ICC support -MD to output dependencies as a 5939 # side effect of compilation, but ICC will put the dependencies in 5940 # the current directory while Tru64 will put them in the object 5941 # directory. 5942 mkdir sub 5943 5944 am_cv_CXX_dependencies_compiler_type=none 5945 if test "$am_compiler_list" = ""; then 5946 am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` 5947 fi 5948 am__universal=false 5949 case " $depcc " in #( 5950 *\ -arch\ *\ -arch\ *) am__universal=true ;; 5951 esac 5952 5953 for depmode in $am_compiler_list; do 5954 # Setup a source with many dependencies, because some compilers 5955 # like to wrap large dependency lists on column 80 (with \), and 5956 # we should not choose a depcomp mode which is confused by this. 5957 # 5958 # We need to recreate these files for each test, as the compiler may 5959 # overwrite some of them when testing with obscure command lines. 5960 # This happens at least with the AIX C compiler. 5961 : > sub/conftest.c 5962 for i in 1 2 3 4 5 6; do 5963 echo '#include "conftst'$i'.h"' >> sub/conftest.c 5964 # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with 5965 # Solaris 10 /bin/sh. 5966 echo '/* dummy */' > sub/conftst$i.h 5967 done 5968 echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf 5969 5970 # We check with '-c' and '-o' for the sake of the "dashmstdout" 5971 # mode. It turns out that the SunPro C++ compiler does not properly 5972 # handle '-M -o', and we need to detect this. Also, some Intel 5973 # versions had trouble with output in subdirs. 5974 am__obj=sub/conftest.${OBJEXT-o} 5975 am__minus_obj="-o $am__obj" 5976 case $depmode in 5977 gcc) 5978 # This depmode causes a compiler race in universal mode. 5979 test "$am__universal" = false || continue 5980 ;; 5981 nosideeffect) 5982 # After this tag, mechanisms are not by side-effect, so they'll 5983 # only be used when explicitly requested. 5984 if test "x$enable_dependency_tracking" = xyes; then 5985 continue 5986 else 5987 break 5988 fi 5989 ;; 5990 msvc7 | msvc7msys | msvisualcpp | msvcmsys) 5991 # This compiler won't grok '-c -o', but also, the minuso test has 5992 # not run yet. These depmodes are late enough in the game, and 5993 # so weak that their functioning should not be impacted. 5994 am__obj=conftest.${OBJEXT-o} 5995 am__minus_obj= 5996 ;; 5997 none) break ;; 5998 esac 5999 if depmode=$depmode \ 6000 source=sub/conftest.c object=$am__obj \ 6001 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ 6002 $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ 6003 >/dev/null 2>conftest.err && 6004 grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && 6005 grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && 6006 grep $am__obj sub/conftest.Po > /dev/null 2>&1 && 6007 ${MAKE-make} -s -f confmf > /dev/null 2>&1; then 6008 # icc doesn't choke on unknown options, it will just issue warnings 6009 # or remarks (even with -Werror). So we grep stderr for any message 6010 # that says an option was ignored or not supported. 6011 # When given -MP, icc 7.0 and 7.1 complain thusly: 6012 # icc: Command line warning: ignoring option '-M'; no argument required 6013 # The diagnosis changed in icc 8.0: 6014 # icc: Command line remark: option '-MP' not supported 6015 if (grep 'ignoring option' conftest.err || 6016 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else 6017 am_cv_CXX_dependencies_compiler_type=$depmode 6018 break 6019 fi 6020 fi 6021 done 6022 6023 cd .. 6024 rm -rf conftest.dir 6025else 6026 am_cv_CXX_dependencies_compiler_type=none 6027fi 6028 6029fi 6030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 6031$as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } 6032CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type 6033 6034 if 6035 test "x$enable_dependency_tracking" != xno \ 6036 && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then 6037 am__fastdepCXX_TRUE= 6038 am__fastdepCXX_FALSE='#' 6039else 6040 am__fastdepCXX_TRUE='#' 6041 am__fastdepCXX_FALSE= 6042fi 6043 6044 6045 6046# Gnulib (early checks). 6047 6048ac_ext=c 6049ac_cpp='$CPP $CPPFLAGS' 6050ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 6051ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 6052ac_compiler_gnu=$ac_cv_c_compiler_gnu 6053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 6054$as_echo_n "checking how to run the C preprocessor... " >&6; } 6055# On Suns, sometimes $CPP names a directory. 6056if test -n "$CPP" && test -d "$CPP"; then 6057 CPP= 6058fi 6059if test -z "$CPP"; then 6060 if ${ac_cv_prog_CPP+:} false; then : 6061 $as_echo_n "(cached) " >&6 6062else 6063 # Double quotes because CPP needs to be expanded 6064 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" 6065 do 6066 ac_preproc_ok=false 6067for ac_c_preproc_warn_flag in '' yes 6068do 6069 # Use a header file that comes with gcc, so configuring glibc 6070 # with a fresh cross-compiler works. 6071 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 6072 # <limits.h> exists even on freestanding compilers. 6073 # On the NeXT, cc -E runs the code through the compiler's parser, 6074 # not just through cpp. "Syntax error" is here to catch this case. 6075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6076/* end confdefs.h. */ 6077#ifdef __STDC__ 6078# include <limits.h> 6079#else 6080# include <assert.h> 6081#endif 6082 Syntax error 6083_ACEOF 6084if ac_fn_c_try_cpp "$LINENO"; then : 6085 6086else 6087 # Broken: fails on valid input. 6088continue 6089fi 6090rm -f conftest.err conftest.i conftest.$ac_ext 6091 6092 # OK, works on sane cases. Now check whether nonexistent headers 6093 # can be detected and how. 6094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6095/* end confdefs.h. */ 6096#include <ac_nonexistent.h> 6097_ACEOF 6098if ac_fn_c_try_cpp "$LINENO"; then : 6099 # Broken: success on invalid input. 6100continue 6101else 6102 # Passes both tests. 6103ac_preproc_ok=: 6104break 6105fi 6106rm -f conftest.err conftest.i conftest.$ac_ext 6107 6108done 6109# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 6110rm -f conftest.i conftest.err conftest.$ac_ext 6111if $ac_preproc_ok; then : 6112 break 6113fi 6114 6115 done 6116 ac_cv_prog_CPP=$CPP 6117 6118fi 6119 CPP=$ac_cv_prog_CPP 6120else 6121 ac_cv_prog_CPP=$CPP 6122fi 6123{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 6124$as_echo "$CPP" >&6; } 6125ac_preproc_ok=false 6126for ac_c_preproc_warn_flag in '' yes 6127do 6128 # Use a header file that comes with gcc, so configuring glibc 6129 # with a fresh cross-compiler works. 6130 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since 6131 # <limits.h> exists even on freestanding compilers. 6132 # On the NeXT, cc -E runs the code through the compiler's parser, 6133 # not just through cpp. "Syntax error" is here to catch this case. 6134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6135/* end confdefs.h. */ 6136#ifdef __STDC__ 6137# include <limits.h> 6138#else 6139# include <assert.h> 6140#endif 6141 Syntax error 6142_ACEOF 6143if ac_fn_c_try_cpp "$LINENO"; then : 6144 6145else 6146 # Broken: fails on valid input. 6147continue 6148fi 6149rm -f conftest.err conftest.i conftest.$ac_ext 6150 6151 # OK, works on sane cases. Now check whether nonexistent headers 6152 # can be detected and how. 6153 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6154/* end confdefs.h. */ 6155#include <ac_nonexistent.h> 6156_ACEOF 6157if ac_fn_c_try_cpp "$LINENO"; then : 6158 # Broken: success on invalid input. 6159continue 6160else 6161 # Passes both tests. 6162ac_preproc_ok=: 6163break 6164fi 6165rm -f conftest.err conftest.i conftest.$ac_ext 6166 6167done 6168# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. 6169rm -f conftest.i conftest.err conftest.$ac_ext 6170if $ac_preproc_ok; then : 6171 6172else 6173 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 6174$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 6175as_fn_error $? "C preprocessor \"$CPP\" fails sanity check 6176See \`config.log' for more details" "$LINENO" 5; } 6177fi 6178 6179ac_ext=c 6180ac_cpp='$CPP $CPPFLAGS' 6181ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 6182ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 6183ac_compiler_gnu=$ac_cv_c_compiler_gnu 6184 6185 6186{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 6187$as_echo_n "checking for grep that handles long lines and -e... " >&6; } 6188if ${ac_cv_path_GREP+:} false; then : 6189 $as_echo_n "(cached) " >&6 6190else 6191 if test -z "$GREP"; then 6192 ac_path_GREP_found=false 6193 # Loop through the user's path and test for each of PROGNAME-LIST 6194 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6195for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 6196do 6197 IFS=$as_save_IFS 6198 test -z "$as_dir" && as_dir=. 6199 for ac_prog in grep ggrep; do 6200 for ac_exec_ext in '' $ac_executable_extensions; do 6201 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" 6202 as_fn_executable_p "$ac_path_GREP" || continue 6203# Check for GNU ac_path_GREP and select it if it is found. 6204 # Check for GNU $ac_path_GREP 6205case `"$ac_path_GREP" --version 2>&1` in 6206*GNU*) 6207 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; 6208*) 6209 ac_count=0 6210 $as_echo_n 0123456789 >"conftest.in" 6211 while : 6212 do 6213 cat "conftest.in" "conftest.in" >"conftest.tmp" 6214 mv "conftest.tmp" "conftest.in" 6215 cp "conftest.in" "conftest.nl" 6216 $as_echo 'GREP' >> "conftest.nl" 6217 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break 6218 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6219 as_fn_arith $ac_count + 1 && ac_count=$as_val 6220 if test $ac_count -gt ${ac_path_GREP_max-0}; then 6221 # Best one so far, save it but keep looking for a better one 6222 ac_cv_path_GREP="$ac_path_GREP" 6223 ac_path_GREP_max=$ac_count 6224 fi 6225 # 10*(2^10) chars as input seems more than enough 6226 test $ac_count -gt 10 && break 6227 done 6228 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6229esac 6230 6231 $ac_path_GREP_found && break 3 6232 done 6233 done 6234 done 6235IFS=$as_save_IFS 6236 if test -z "$ac_cv_path_GREP"; then 6237 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 6238 fi 6239else 6240 ac_cv_path_GREP=$GREP 6241fi 6242 6243fi 6244{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 6245$as_echo "$ac_cv_path_GREP" >&6; } 6246 GREP="$ac_cv_path_GREP" 6247 6248 6249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 6250$as_echo_n "checking for egrep... " >&6; } 6251if ${ac_cv_path_EGREP+:} false; then : 6252 $as_echo_n "(cached) " >&6 6253else 6254 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 6255 then ac_cv_path_EGREP="$GREP -E" 6256 else 6257 if test -z "$EGREP"; then 6258 ac_path_EGREP_found=false 6259 # Loop through the user's path and test for each of PROGNAME-LIST 6260 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6261for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin 6262do 6263 IFS=$as_save_IFS 6264 test -z "$as_dir" && as_dir=. 6265 for ac_prog in egrep; do 6266 for ac_exec_ext in '' $ac_executable_extensions; do 6267 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" 6268 as_fn_executable_p "$ac_path_EGREP" || continue 6269# Check for GNU ac_path_EGREP and select it if it is found. 6270 # Check for GNU $ac_path_EGREP 6271case `"$ac_path_EGREP" --version 2>&1` in 6272*GNU*) 6273 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; 6274*) 6275 ac_count=0 6276 $as_echo_n 0123456789 >"conftest.in" 6277 while : 6278 do 6279 cat "conftest.in" "conftest.in" >"conftest.tmp" 6280 mv "conftest.tmp" "conftest.in" 6281 cp "conftest.in" "conftest.nl" 6282 $as_echo 'EGREP' >> "conftest.nl" 6283 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break 6284 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break 6285 as_fn_arith $ac_count + 1 && ac_count=$as_val 6286 if test $ac_count -gt ${ac_path_EGREP_max-0}; then 6287 # Best one so far, save it but keep looking for a better one 6288 ac_cv_path_EGREP="$ac_path_EGREP" 6289 ac_path_EGREP_max=$ac_count 6290 fi 6291 # 10*(2^10) chars as input seems more than enough 6292 test $ac_count -gt 10 && break 6293 done 6294 rm -f conftest.in conftest.tmp conftest.nl conftest.out;; 6295esac 6296 6297 $ac_path_EGREP_found && break 3 6298 done 6299 done 6300 done 6301IFS=$as_save_IFS 6302 if test -z "$ac_cv_path_EGREP"; then 6303 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 6304 fi 6305else 6306 ac_cv_path_EGREP=$EGREP 6307fi 6308 6309 fi 6310fi 6311{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 6312$as_echo "$ac_cv_path_EGREP" >&6; } 6313 EGREP="$ac_cv_path_EGREP" 6314 6315 6316 6317 6318 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Minix Amsterdam compiler" >&5 6319$as_echo_n "checking for Minix Amsterdam compiler... " >&6; } 6320if ${gl_cv_c_amsterdam_compiler+:} false; then : 6321 $as_echo_n "(cached) " >&6 6322else 6323 6324 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6325/* end confdefs.h. */ 6326 6327#ifdef __ACK__ 6328Amsterdam 6329#endif 6330 6331_ACEOF 6332if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 6333 $EGREP "Amsterdam" >/dev/null 2>&1; then : 6334 gl_cv_c_amsterdam_compiler=yes 6335else 6336 gl_cv_c_amsterdam_compiler=no 6337fi 6338rm -f conftest* 6339 6340 6341fi 6342{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_amsterdam_compiler" >&5 6343$as_echo "$gl_cv_c_amsterdam_compiler" >&6; } 6344 if test -z "$AR"; then 6345 if test $gl_cv_c_amsterdam_compiler = yes; then 6346 AR='cc -c.a' 6347 if test -z "$ARFLAGS"; then 6348 ARFLAGS='-o' 6349 fi 6350 else 6351 if test -n "$ac_tool_prefix"; then 6352 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. 6353set dummy ${ac_tool_prefix}ar; ac_word=$2 6354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6355$as_echo_n "checking for $ac_word... " >&6; } 6356if ${ac_cv_prog_AR+:} false; then : 6357 $as_echo_n "(cached) " >&6 6358else 6359 if test -n "$AR"; then 6360 ac_cv_prog_AR="$AR" # Let the user override the test. 6361else 6362as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6363for as_dir in $PATH 6364do 6365 IFS=$as_save_IFS 6366 test -z "$as_dir" && as_dir=. 6367 for ac_exec_ext in '' $ac_executable_extensions; do 6368 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6369 ac_cv_prog_AR="${ac_tool_prefix}ar" 6370 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6371 break 2 6372 fi 6373done 6374 done 6375IFS=$as_save_IFS 6376 6377fi 6378fi 6379AR=$ac_cv_prog_AR 6380if test -n "$AR"; then 6381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 6382$as_echo "$AR" >&6; } 6383else 6384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6385$as_echo "no" >&6; } 6386fi 6387 6388 6389fi 6390if test -z "$ac_cv_prog_AR"; then 6391 ac_ct_AR=$AR 6392 # Extract the first word of "ar", so it can be a program name with args. 6393set dummy ar; ac_word=$2 6394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6395$as_echo_n "checking for $ac_word... " >&6; } 6396if ${ac_cv_prog_ac_ct_AR+:} false; then : 6397 $as_echo_n "(cached) " >&6 6398else 6399 if test -n "$ac_ct_AR"; then 6400 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. 6401else 6402as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6403for as_dir in $PATH 6404do 6405 IFS=$as_save_IFS 6406 test -z "$as_dir" && as_dir=. 6407 for ac_exec_ext in '' $ac_executable_extensions; do 6408 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6409 ac_cv_prog_ac_ct_AR="ar" 6410 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6411 break 2 6412 fi 6413done 6414 done 6415IFS=$as_save_IFS 6416 6417fi 6418fi 6419ac_ct_AR=$ac_cv_prog_ac_ct_AR 6420if test -n "$ac_ct_AR"; then 6421 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 6422$as_echo "$ac_ct_AR" >&6; } 6423else 6424 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6425$as_echo "no" >&6; } 6426fi 6427 6428 if test "x$ac_ct_AR" = x; then 6429 AR="ar" 6430 else 6431 case $cross_compiling:$ac_tool_warned in 6432yes:) 6433{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 6434$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 6435ac_tool_warned=yes ;; 6436esac 6437 AR=$ac_ct_AR 6438 fi 6439else 6440 AR="$ac_cv_prog_AR" 6441fi 6442 6443 if test -z "$ARFLAGS"; then 6444 ARFLAGS='cru' 6445 fi 6446 fi 6447 else 6448 if test -z "$ARFLAGS"; then 6449 ARFLAGS='cru' 6450 fi 6451 fi 6452 6453 6454 if test -z "$RANLIB"; then 6455 if test $gl_cv_c_amsterdam_compiler = yes; then 6456 RANLIB=':' 6457 else 6458 if test -n "$ac_tool_prefix"; then 6459 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. 6460set dummy ${ac_tool_prefix}ranlib; ac_word=$2 6461{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6462$as_echo_n "checking for $ac_word... " >&6; } 6463if ${ac_cv_prog_RANLIB+:} false; then : 6464 $as_echo_n "(cached) " >&6 6465else 6466 if test -n "$RANLIB"; then 6467 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 6468else 6469as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6470for as_dir in $PATH 6471do 6472 IFS=$as_save_IFS 6473 test -z "$as_dir" && as_dir=. 6474 for ac_exec_ext in '' $ac_executable_extensions; do 6475 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6476 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" 6477 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6478 break 2 6479 fi 6480done 6481 done 6482IFS=$as_save_IFS 6483 6484fi 6485fi 6486RANLIB=$ac_cv_prog_RANLIB 6487if test -n "$RANLIB"; then 6488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 6489$as_echo "$RANLIB" >&6; } 6490else 6491 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6492$as_echo "no" >&6; } 6493fi 6494 6495 6496fi 6497if test -z "$ac_cv_prog_RANLIB"; then 6498 ac_ct_RANLIB=$RANLIB 6499 # Extract the first word of "ranlib", so it can be a program name with args. 6500set dummy ranlib; ac_word=$2 6501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 6502$as_echo_n "checking for $ac_word... " >&6; } 6503if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : 6504 $as_echo_n "(cached) " >&6 6505else 6506 if test -n "$ac_ct_RANLIB"; then 6507 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. 6508else 6509as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 6510for as_dir in $PATH 6511do 6512 IFS=$as_save_IFS 6513 test -z "$as_dir" && as_dir=. 6514 for ac_exec_ext in '' $ac_executable_extensions; do 6515 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 6516 ac_cv_prog_ac_ct_RANLIB="ranlib" 6517 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 6518 break 2 6519 fi 6520done 6521 done 6522IFS=$as_save_IFS 6523 6524fi 6525fi 6526ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB 6527if test -n "$ac_ct_RANLIB"; then 6528 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 6529$as_echo "$ac_ct_RANLIB" >&6; } 6530else 6531 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6532$as_echo "no" >&6; } 6533fi 6534 6535 if test "x$ac_ct_RANLIB" = x; then 6536 RANLIB=":" 6537 else 6538 case $cross_compiling:$ac_tool_warned in 6539yes:) 6540{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 6541$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 6542ac_tool_warned=yes ;; 6543esac 6544 RANLIB=$ac_ct_RANLIB 6545 fi 6546else 6547 RANLIB="$ac_cv_prog_RANLIB" 6548fi 6549 6550 fi 6551 fi 6552 6553 6554if test "x$CC" != xcc; then 6555 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 6556$as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } 6557else 6558 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 6559$as_echo_n "checking whether cc understands -c and -o together... " >&6; } 6560fi 6561set dummy $CC; ac_cc=`$as_echo "$2" | 6562 sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` 6563if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : 6564 $as_echo_n "(cached) " >&6 6565else 6566 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6567/* end confdefs.h. */ 6568 6569int 6570main () 6571{ 6572 6573 ; 6574 return 0; 6575} 6576_ACEOF 6577# Make sure it works both with $CC and with simple cc. 6578# We do the test twice because some compilers refuse to overwrite an 6579# existing .o file with -o, though they will create one. 6580ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' 6581rm -f conftest2.* 6582if { { case "(($ac_try" in 6583 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6584 *) ac_try_echo=$ac_try;; 6585esac 6586eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 6587$as_echo "$ac_try_echo"; } >&5 6588 (eval "$ac_try") 2>&5 6589 ac_status=$? 6590 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 6591 test $ac_status = 0; } && 6592 test -f conftest2.$ac_objext && { { case "(($ac_try" in 6593 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6594 *) ac_try_echo=$ac_try;; 6595esac 6596eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 6597$as_echo "$ac_try_echo"; } >&5 6598 (eval "$ac_try") 2>&5 6599 ac_status=$? 6600 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 6601 test $ac_status = 0; }; 6602then 6603 eval ac_cv_prog_cc_${ac_cc}_c_o=yes 6604 if test "x$CC" != xcc; then 6605 # Test first that cc exists at all. 6606 if { ac_try='cc -c conftest.$ac_ext >&5' 6607 { { case "(($ac_try" in 6608 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6609 *) ac_try_echo=$ac_try;; 6610esac 6611eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 6612$as_echo "$ac_try_echo"; } >&5 6613 (eval "$ac_try") 2>&5 6614 ac_status=$? 6615 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 6616 test $ac_status = 0; }; }; then 6617 ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' 6618 rm -f conftest2.* 6619 if { { case "(($ac_try" in 6620 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6621 *) ac_try_echo=$ac_try;; 6622esac 6623eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 6624$as_echo "$ac_try_echo"; } >&5 6625 (eval "$ac_try") 2>&5 6626 ac_status=$? 6627 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 6628 test $ac_status = 0; } && 6629 test -f conftest2.$ac_objext && { { case "(($ac_try" in 6630 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 6631 *) ac_try_echo=$ac_try;; 6632esac 6633eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 6634$as_echo "$ac_try_echo"; } >&5 6635 (eval "$ac_try") 2>&5 6636 ac_status=$? 6637 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 6638 test $ac_status = 0; }; 6639 then 6640 # cc works too. 6641 : 6642 else 6643 # cc exists but doesn't like -o. 6644 eval ac_cv_prog_cc_${ac_cc}_c_o=no 6645 fi 6646 fi 6647 fi 6648else 6649 eval ac_cv_prog_cc_${ac_cc}_c_o=no 6650fi 6651rm -f core conftest* 6652 6653fi 6654if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then 6655 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 6656$as_echo "yes" >&6; } 6657else 6658 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 6659$as_echo "no" >&6; } 6660 6661$as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h 6662 6663fi 6664 6665# FIXME: we rely on the cache variable name because 6666# there is no other way. 6667set dummy $CC 6668am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` 6669eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o 6670if test "$am_t" != yes; then 6671 # Losing compiler, so override with the script. 6672 # FIXME: It is wrong to rewrite CC. 6673 # But if we don't then we get into trouble of one sort or another. 6674 # A longer-term fix would be to have automake use am__CC in this case, 6675 # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" 6676 CC="$am_aux_dir/compile $CC" 6677fi 6678 6679 6680# Make sure we can run config.sub. 6681$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || 6682 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 6683 6684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 6685$as_echo_n "checking build system type... " >&6; } 6686if ${ac_cv_build+:} false; then : 6687 $as_echo_n "(cached) " >&6 6688else 6689 ac_build_alias=$build_alias 6690test "x$ac_build_alias" = x && 6691 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` 6692test "x$ac_build_alias" = x && 6693 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 6694ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || 6695 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 6696 6697fi 6698{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 6699$as_echo "$ac_cv_build" >&6; } 6700case $ac_cv_build in 6701*-*-*) ;; 6702*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; 6703esac 6704build=$ac_cv_build 6705ac_save_IFS=$IFS; IFS='-' 6706set x $ac_cv_build 6707shift 6708build_cpu=$1 6709build_vendor=$2 6710shift; shift 6711# Remember, the first character of IFS is used to create $*, 6712# except with old shells: 6713build_os=$* 6714IFS=$ac_save_IFS 6715case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac 6716 6717 6718{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 6719$as_echo_n "checking host system type... " >&6; } 6720if ${ac_cv_host+:} false; then : 6721 $as_echo_n "(cached) " >&6 6722else 6723 if test "x$host_alias" = x; then 6724 ac_cv_host=$ac_cv_build 6725else 6726 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || 6727 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 6728fi 6729 6730fi 6731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 6732$as_echo "$ac_cv_host" >&6; } 6733case $ac_cv_host in 6734*-*-*) ;; 6735*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; 6736esac 6737host=$ac_cv_host 6738ac_save_IFS=$IFS; IFS='-' 6739set x $ac_cv_host 6740shift 6741host_cpu=$1 6742host_vendor=$2 6743shift; shift 6744# Remember, the first character of IFS is used to create $*, 6745# except with old shells: 6746host_os=$* 6747IFS=$ac_save_IFS 6748case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac 6749 6750 6751{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 6752$as_echo_n "checking for ANSI C header files... " >&6; } 6753if ${ac_cv_header_stdc+:} false; then : 6754 $as_echo_n "(cached) " >&6 6755else 6756 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6757/* end confdefs.h. */ 6758#include <stdlib.h> 6759#include <stdarg.h> 6760#include <string.h> 6761#include <float.h> 6762 6763int 6764main () 6765{ 6766 6767 ; 6768 return 0; 6769} 6770_ACEOF 6771if ac_fn_c_try_compile "$LINENO"; then : 6772 ac_cv_header_stdc=yes 6773else 6774 ac_cv_header_stdc=no 6775fi 6776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6777 6778if test $ac_cv_header_stdc = yes; then 6779 # SunOS 4.x string.h does not declare mem*, contrary to ANSI. 6780 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6781/* end confdefs.h. */ 6782#include <string.h> 6783 6784_ACEOF 6785if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 6786 $EGREP "memchr" >/dev/null 2>&1; then : 6787 6788else 6789 ac_cv_header_stdc=no 6790fi 6791rm -f conftest* 6792 6793fi 6794 6795if test $ac_cv_header_stdc = yes; then 6796 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. 6797 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6798/* end confdefs.h. */ 6799#include <stdlib.h> 6800 6801_ACEOF 6802if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 6803 $EGREP "free" >/dev/null 2>&1; then : 6804 6805else 6806 ac_cv_header_stdc=no 6807fi 6808rm -f conftest* 6809 6810fi 6811 6812if test $ac_cv_header_stdc = yes; then 6813 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. 6814 if test "$cross_compiling" = yes; then : 6815 : 6816else 6817 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6818/* end confdefs.h. */ 6819#include <ctype.h> 6820#include <stdlib.h> 6821#if ((' ' & 0x0FF) == 0x020) 6822# define ISLOWER(c) ('a' <= (c) && (c) <= 'z') 6823# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) 6824#else 6825# define ISLOWER(c) \ 6826 (('a' <= (c) && (c) <= 'i') \ 6827 || ('j' <= (c) && (c) <= 'r') \ 6828 || ('s' <= (c) && (c) <= 'z')) 6829# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) 6830#endif 6831 6832#define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) 6833int 6834main () 6835{ 6836 int i; 6837 for (i = 0; i < 256; i++) 6838 if (XOR (islower (i), ISLOWER (i)) 6839 || toupper (i) != TOUPPER (i)) 6840 return 2; 6841 return 0; 6842} 6843_ACEOF 6844if ac_fn_c_try_run "$LINENO"; then : 6845 6846else 6847 ac_cv_header_stdc=no 6848fi 6849rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 6850 conftest.$ac_objext conftest.beam conftest.$ac_ext 6851fi 6852 6853fi 6854fi 6855{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 6856$as_echo "$ac_cv_header_stdc" >&6; } 6857if test $ac_cv_header_stdc = yes; then 6858 6859$as_echo "#define STDC_HEADERS 1" >>confdefs.h 6860 6861fi 6862 6863# On IRIX 5.3, sys/types and inttypes.h are conflicting. 6864for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ 6865 inttypes.h stdint.h unistd.h 6866do : 6867 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 6868ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default 6869" 6870if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 6871 cat >>confdefs.h <<_ACEOF 6872#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 6873_ACEOF 6874 6875fi 6876 6877done 6878 6879 6880 6881 6882 6883 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" 6884if test "x$ac_cv_header_minix_config_h" = xyes; then : 6885 MINIX=yes 6886else 6887 MINIX= 6888fi 6889 6890 6891 if test "$MINIX" = yes; then 6892 6893$as_echo "#define _POSIX_SOURCE 1" >>confdefs.h 6894 6895 6896$as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h 6897 6898 6899$as_echo "#define _MINIX 1" >>confdefs.h 6900 6901 fi 6902 6903 case "$host_os" in 6904 hpux*) 6905 6906$as_echo "#define _XOPEN_SOURCE 500" >>confdefs.h 6907 6908 ;; 6909 esac 6910 6911 6912 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 6913$as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } 6914if ${ac_cv_safe_to_define___extensions__+:} false; then : 6915 $as_echo_n "(cached) " >&6 6916else 6917 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 6918/* end confdefs.h. */ 6919 6920# define __EXTENSIONS__ 1 6921 $ac_includes_default 6922int 6923main () 6924{ 6925 6926 ; 6927 return 0; 6928} 6929_ACEOF 6930if ac_fn_c_try_compile "$LINENO"; then : 6931 ac_cv_safe_to_define___extensions__=yes 6932else 6933 ac_cv_safe_to_define___extensions__=no 6934fi 6935rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 6936fi 6937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 6938$as_echo "$ac_cv_safe_to_define___extensions__" >&6; } 6939 test $ac_cv_safe_to_define___extensions__ = yes && 6940 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h 6941 6942 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h 6943 6944 $as_echo "#define _DARWIN_C_SOURCE 1" >>confdefs.h 6945 6946 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h 6947 6948 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h 6949 6950 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h 6951 6952 6953 6954 6955 6956 6957 6958 6959 6960 6961 6962 # IEEE behaviour is the default on all CPUs except Alpha and SH 6963 # (according to the test results of Bruno Haible's ieeefp/fenv_default.m4 6964 # and the GCC 4.1.2 manual). 6965 case "$host_cpu" in 6966 alpha*) 6967 # On Alpha systems, a compiler option provides the behaviour. 6968 # See the ieee(3) manual page, also available at 6969 # <http://h30097.www3.hp.com/docs/base_doc/DOCUMENTATION/V51B_HTML/MAN/MAN3/0600____.HTM> 6970 if test -n "$GCC"; then 6971 # GCC has the option -mieee. 6972 # For full IEEE compliance (rarely needed), use option -mieee-with-inexact. 6973 CPPFLAGS="$CPPFLAGS -mieee" 6974 else 6975 # Compaq (ex-DEC) C has the option -ieee, equivalent to -ieee_with_no_inexact. 6976 # For full IEEE compliance (rarely needed), use option -ieee_with_inexact. 6977 CPPFLAGS="$CPPFLAGS -ieee" 6978 fi 6979 ;; 6980 sh*) 6981 if test -n "$GCC"; then 6982 # GCC has the option -mieee. 6983 CPPFLAGS="$CPPFLAGS -mieee" 6984 fi 6985 ;; 6986 esac 6987 6988# Check whether --enable-largefile was given. 6989if test "${enable_largefile+set}" = set; then : 6990 enableval=$enable_largefile; 6991fi 6992 6993if test "$enable_largefile" != no; then 6994 6995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 6996$as_echo_n "checking for special C compiler options needed for large files... " >&6; } 6997if ${ac_cv_sys_largefile_CC+:} false; then : 6998 $as_echo_n "(cached) " >&6 6999else 7000 ac_cv_sys_largefile_CC=no 7001 if test "$GCC" != yes; then 7002 ac_save_CC=$CC 7003 while :; do 7004 # IRIX 6.2 and later do not support large files by default, 7005 # so use the C compiler's -n32 option if that helps. 7006 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7007/* end confdefs.h. */ 7008#include <sys/types.h> 7009 /* Check that off_t can represent 2**63 - 1 correctly. 7010 We can't simply define LARGE_OFF_T to be 9223372036854775807, 7011 since some C++ compilers masquerading as C compilers 7012 incorrectly reject 9223372036854775807. */ 7013#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) 7014 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 7015 && LARGE_OFF_T % 2147483647 == 1) 7016 ? 1 : -1]; 7017int 7018main () 7019{ 7020 7021 ; 7022 return 0; 7023} 7024_ACEOF 7025 if ac_fn_c_try_compile "$LINENO"; then : 7026 break 7027fi 7028rm -f core conftest.err conftest.$ac_objext 7029 CC="$CC -n32" 7030 if ac_fn_c_try_compile "$LINENO"; then : 7031 ac_cv_sys_largefile_CC=' -n32'; break 7032fi 7033rm -f core conftest.err conftest.$ac_objext 7034 break 7035 done 7036 CC=$ac_save_CC 7037 rm -f conftest.$ac_ext 7038 fi 7039fi 7040{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 7041$as_echo "$ac_cv_sys_largefile_CC" >&6; } 7042 if test "$ac_cv_sys_largefile_CC" != no; then 7043 CC=$CC$ac_cv_sys_largefile_CC 7044 fi 7045 7046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 7047$as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } 7048if ${ac_cv_sys_file_offset_bits+:} false; then : 7049 $as_echo_n "(cached) " >&6 7050else 7051 while :; do 7052 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7053/* end confdefs.h. */ 7054#include <sys/types.h> 7055 /* Check that off_t can represent 2**63 - 1 correctly. 7056 We can't simply define LARGE_OFF_T to be 9223372036854775807, 7057 since some C++ compilers masquerading as C compilers 7058 incorrectly reject 9223372036854775807. */ 7059#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) 7060 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 7061 && LARGE_OFF_T % 2147483647 == 1) 7062 ? 1 : -1]; 7063int 7064main () 7065{ 7066 7067 ; 7068 return 0; 7069} 7070_ACEOF 7071if ac_fn_c_try_compile "$LINENO"; then : 7072 ac_cv_sys_file_offset_bits=no; break 7073fi 7074rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7075 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7076/* end confdefs.h. */ 7077#define _FILE_OFFSET_BITS 64 7078#include <sys/types.h> 7079 /* Check that off_t can represent 2**63 - 1 correctly. 7080 We can't simply define LARGE_OFF_T to be 9223372036854775807, 7081 since some C++ compilers masquerading as C compilers 7082 incorrectly reject 9223372036854775807. */ 7083#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) 7084 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 7085 && LARGE_OFF_T % 2147483647 == 1) 7086 ? 1 : -1]; 7087int 7088main () 7089{ 7090 7091 ; 7092 return 0; 7093} 7094_ACEOF 7095if ac_fn_c_try_compile "$LINENO"; then : 7096 ac_cv_sys_file_offset_bits=64; break 7097fi 7098rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7099 ac_cv_sys_file_offset_bits=unknown 7100 break 7101done 7102fi 7103{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 7104$as_echo "$ac_cv_sys_file_offset_bits" >&6; } 7105case $ac_cv_sys_file_offset_bits in #( 7106 no | unknown) ;; 7107 *) 7108cat >>confdefs.h <<_ACEOF 7109#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits 7110_ACEOF 7111;; 7112esac 7113rm -rf conftest* 7114 if test $ac_cv_sys_file_offset_bits = unknown; then 7115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 7116$as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } 7117if ${ac_cv_sys_large_files+:} false; then : 7118 $as_echo_n "(cached) " >&6 7119else 7120 while :; do 7121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7122/* end confdefs.h. */ 7123#include <sys/types.h> 7124 /* Check that off_t can represent 2**63 - 1 correctly. 7125 We can't simply define LARGE_OFF_T to be 9223372036854775807, 7126 since some C++ compilers masquerading as C compilers 7127 incorrectly reject 9223372036854775807. */ 7128#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) 7129 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 7130 && LARGE_OFF_T % 2147483647 == 1) 7131 ? 1 : -1]; 7132int 7133main () 7134{ 7135 7136 ; 7137 return 0; 7138} 7139_ACEOF 7140if ac_fn_c_try_compile "$LINENO"; then : 7141 ac_cv_sys_large_files=no; break 7142fi 7143rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7145/* end confdefs.h. */ 7146#define _LARGE_FILES 1 7147#include <sys/types.h> 7148 /* Check that off_t can represent 2**63 - 1 correctly. 7149 We can't simply define LARGE_OFF_T to be 9223372036854775807, 7150 since some C++ compilers masquerading as C compilers 7151 incorrectly reject 9223372036854775807. */ 7152#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) 7153 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 7154 && LARGE_OFF_T % 2147483647 == 1) 7155 ? 1 : -1]; 7156int 7157main () 7158{ 7159 7160 ; 7161 return 0; 7162} 7163_ACEOF 7164if ac_fn_c_try_compile "$LINENO"; then : 7165 ac_cv_sys_large_files=1; break 7166fi 7167rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7168 ac_cv_sys_large_files=unknown 7169 break 7170done 7171fi 7172{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 7173$as_echo "$ac_cv_sys_large_files" >&6; } 7174case $ac_cv_sys_large_files in #( 7175 no | unknown) ;; 7176 *) 7177cat >>confdefs.h <<_ACEOF 7178#define _LARGE_FILES $ac_cv_sys_large_files 7179_ACEOF 7180;; 7181esac 7182rm -rf conftest* 7183 fi 7184 7185 7186fi 7187 7188 7189 7190 7191 7192 7193 # Check whether --enable-threads was given. 7194if test "${enable_threads+set}" = set; then : 7195 enableval=$enable_threads; gl_use_threads=$enableval 7196else 7197 if test -n "$gl_use_threads_default"; then 7198 gl_use_threads="$gl_use_threads_default" 7199 else 7200 case "$host_os" in 7201 osf*) gl_use_threads=no ;; 7202 cygwin*) 7203 case `uname -r` in 7204 1.[0-5].*) gl_use_threads=no ;; 7205 *) gl_use_threads=yes ;; 7206 esac 7207 ;; 7208 *) gl_use_threads=yes ;; 7209 esac 7210 fi 7211 7212fi 7213 7214 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then 7215 # For using <pthread.h>: 7216 case "$host_os" in 7217 osf*) 7218 # On OSF/1, the compiler needs the flag -D_REENTRANT so that it 7219 # groks <pthread.h>. cc also understands the flag -pthread, but 7220 # we don't use it because 1. gcc-2.95 doesn't understand -pthread, 7221 # 2. putting a flag into CPPFLAGS that has an effect on the linker 7222 # causes the AC_LINK_IFELSE test below to succeed unexpectedly, 7223 # leading to wrong values of LIBTHREAD and LTLIBTHREAD. 7224 CPPFLAGS="$CPPFLAGS -D_REENTRANT" 7225 ;; 7226 esac 7227 # Some systems optimize for single-threaded programs by default, and 7228 # need special flags to disable these optimizations. For example, the 7229 # definition of 'errno' in <errno.h>. 7230 case "$host_os" in 7231 aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; 7232 solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; 7233 esac 7234 fi 7235 7236 7237 7238 7239 # Code from module alloca-opt: 7240 # Code from module announce-gen: 7241 # Code from module argmatch: 7242 # Code from module assert: 7243 # Code from module binary-io: 7244 # Code from module bitrotate: 7245 # Code from module c-ctype: 7246 # Code from module c-strcase: 7247 # Code from module c-strcaseeq: 7248 # Code from module calloc-posix: 7249 # Code from module cloexec: 7250 # Code from module close: 7251 # Code from module close-stream: 7252 # Code from module closeout: 7253 # Code from module config-h: 7254 # Code from module configmake: 7255 # Code from module dirname: 7256 # Code from module dirname-lgpl: 7257 # Code from module do-release-commit-and-tag: 7258 # Code from module dosname: 7259 # Code from module double-slash-root: 7260 # Code from module dup2: 7261 # Code from module environ: 7262 # Code from module errno: 7263 # Code from module error: 7264 # Code from module exitfail: 7265 # Code from module extensions: 7266 7267 # Code from module extern-inline: 7268 # Code from module fatal-signal: 7269 # Code from module fcntl: 7270 # Code from module fcntl-h: 7271 # Code from module fd-hook: 7272 # Code from module fd-safer-flag: 7273 # Code from module fdl: 7274 # Code from module float: 7275 # Code from module fopen: 7276 # Code from module fopen-safer: 7277 # Code from module fpending: 7278 # Code from module fpieee: 7279 7280 # Code from module fprintf-posix: 7281 # Code from module fpucw: 7282 # Code from module frexp-nolibm: 7283 # Code from module frexpl-nolibm: 7284 # Code from module fseterr: 7285 # Code from module fstat: 7286 # Code from module gendocs: 7287 # Code from module getdelim: 7288 # Code from module getdtablesize: 7289 # Code from module getline: 7290 # Code from module getopt-gnu: 7291 # Code from module getopt-posix: 7292 # Code from module gettext: 7293 # Code from module gettext-h: 7294 # Code from module git-version-gen: 7295 # Code from module gitlog-to-changelog: 7296 # Code from module gnu-web-doc-update: 7297 # Code from module gnumakefile: 7298 # Code from module gnupload: 7299 # Code from module gpl-3.0: 7300 # Code from module hash: 7301 # Code from module havelib: 7302 # Code from module include_next: 7303 # Code from module intprops: 7304 # Code from module inttypes: 7305 # Code from module inttypes-incomplete: 7306 # Code from module isnan: 7307 # Code from module isnand: 7308 # Code from module isnand-nolibm: 7309 # Code from module isnanf: 7310 # Code from module isnanf-nolibm: 7311 # Code from module isnanl: 7312 # Code from module isnanl-nolibm: 7313 # Code from module iswblank: 7314 # Code from module javacomp-script: 7315 # Code from module javaexec-script: 7316 # Code from module largefile: 7317 7318 # Code from module ldexp: 7319 # Code from module ldexpl: 7320 # Code from module localcharset: 7321 # Code from module lock: 7322 # Code from module maintainer-makefile: 7323 # Code from module malloc-gnu: 7324 # Code from module malloc-posix: 7325 # Code from module math: 7326 # Code from module mbchar: 7327 # Code from module mbrtowc: 7328 # Code from module mbschr: 7329 # Code from module mbsinit: 7330 # Code from module mbsrchr: 7331 # Code from module mbswidth: 7332 # Code from module mbuiter: 7333 # Code from module memchr: 7334 # Code from module msvc-inval: 7335 # Code from module msvc-nothrow: 7336 # Code from module multiarch: 7337 # Code from module nocrash: 7338 # Code from module obstack: 7339 # Code from module obstack-printf: 7340 # Code from module open: 7341 # Code from module pathmax: 7342 # Code from module perror: 7343 # Code from module pipe2: 7344 # Code from module pipe2-safer: 7345 # Code from module posix_spawn-internal: 7346 # Code from module posix_spawn_file_actions_addclose: 7347 # Code from module posix_spawn_file_actions_adddup2: 7348 # Code from module posix_spawn_file_actions_addopen: 7349 # Code from module posix_spawn_file_actions_destroy: 7350 # Code from module posix_spawn_file_actions_init: 7351 # Code from module posix_spawnattr_destroy: 7352 # Code from module posix_spawnattr_init: 7353 # Code from module posix_spawnattr_setflags: 7354 # Code from module posix_spawnattr_setsigmask: 7355 # Code from module posix_spawnp: 7356 # Code from module printf-frexp: 7357 # Code from module printf-frexpl: 7358 # Code from module printf-posix: 7359 # Code from module printf-safe: 7360 # Code from module progname: 7361 # Code from module quote: 7362 # Code from module quotearg: 7363 # Code from module quotearg-simple: 7364 # Code from module raise: 7365 # Code from module rawmemchr: 7366 # Code from module readme-release: 7367 # Code from module realloc-posix: 7368 # Code from module sched: 7369 # Code from module sigaction: 7370 # Code from module signal-h: 7371 # Code from module signbit: 7372 # Code from module sigprocmask: 7373 # Code from module size_max: 7374 # Code from module snippet/_Noreturn: 7375 # Code from module snippet/arg-nonnull: 7376 # Code from module snippet/c++defs: 7377 # Code from module snippet/warn-on-use: 7378 # Code from module snprintf: 7379 # Code from module snprintf-posix: 7380 # Code from module spawn: 7381 # Code from module spawn-pipe: 7382 # Code from module sprintf-posix: 7383 # Code from module ssize_t: 7384 # Code from module stat: 7385 # Code from module stdbool: 7386 # Code from module stddef: 7387 # Code from module stdint: 7388 # Code from module stdio: 7389 # Code from module stdlib: 7390 # Code from module stpcpy: 7391 # Code from module strchrnul: 7392 # Code from module strdup-posix: 7393 # Code from module streq: 7394 # Code from module strerror: 7395 # Code from module strerror-override: 7396 # Code from module strerror_r-posix: 7397 # Code from module string: 7398 # Code from module strndup: 7399 # Code from module strnlen: 7400 # Code from module strnlen1: 7401 # Code from module strtoul: 7402 # Code from module strverscmp: 7403 # Code from module sys_stat: 7404 # Code from module sys_types: 7405 # Code from module sys_wait: 7406 # Code from module threadlib: 7407 7408 7409 7410 # Code from module time: 7411 # Code from module unistd: 7412 # Code from module unistd-safer: 7413 # Code from module unitypes: 7414 # Code from module uniwidth/base: 7415 # Code from module uniwidth/width: 7416 # Code from module unlocked-io: 7417 # Code from module unsetenv: 7418 # Code from module update-copyright: 7419 # Code from module useless-if-before-free: 7420 # Code from module vasnprintf: 7421 # Code from module vc-list-files: 7422 # Code from module verify: 7423 # Code from module vfprintf-posix: 7424 # Code from module vsnprintf: 7425 # Code from module vsnprintf-posix: 7426 # Code from module vsprintf-posix: 7427 # Code from module wait-process: 7428 # Code from module waitpid: 7429 # Code from module warnings: 7430 # Code from module wchar: 7431 # Code from module wctype-h: 7432 # Code from module wcwidth: 7433 # Code from module xalloc: 7434 # Code from module xalloc-die: 7435 # Code from module xalloc-oversized: 7436 # Code from module xmemdup0: 7437 # Code from module xsize: 7438 # Code from module xstrndup: 7439 7440 7441# Gnulib uses '#pragma GCC diagnostic push' to silence some 7442# warnings, but older gcc doesn't support this. 7443{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pragma GCC diagnostic push works" >&5 7444$as_echo_n "checking whether pragma GCC diagnostic push works... " >&6; } 7445if ${lv_cv_gcc_pragma_push_works+:} false; then : 7446 $as_echo_n "(cached) " >&6 7447else 7448 7449 save_CFLAGS=$CFLAGS 7450 CFLAGS='-Wunknown-pragmas -Werror' 7451 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7452/* end confdefs.h. */ 7453 7454 #pragma GCC diagnostic push 7455 #pragma GCC diagnostic pop 7456 7457int 7458main () 7459{ 7460 7461 ; 7462 return 0; 7463} 7464_ACEOF 7465if ac_fn_c_try_compile "$LINENO"; then : 7466 lv_cv_gcc_pragma_push_works=yes 7467else 7468 lv_cv_gcc_pragma_push_works=no 7469fi 7470rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7471 CFLAGS=$save_CFLAGS 7472fi 7473{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $lv_cv_gcc_pragma_push_works" >&5 7474$as_echo "$lv_cv_gcc_pragma_push_works" >&6; } 7475 7476# Check whether --enable-gcc-warnings was given. 7477if test "${enable_gcc_warnings+set}" = set; then : 7478 enableval=$enable_gcc_warnings; case $enable_gcc_warnings in 7479 yes|no) ;; 7480 *) as_fn_error $? "invalid value for --gcc-warnings: $enable_gcc_warnings" "$LINENO" 5;; 7481 esac 7482else 7483 enable_gcc_warnings=no 7484fi 7485 7486if test "$enable_gcc_warnings" = yes; then 7487 warn_common='-Wall -Wextra -Wno-sign-compare -Wcast-align 7488 -Wformat -Wpointer-arith -Wwrite-strings' 7489 warn_c='-Wbad-function-cast -Wshadow -Wstrict-prototypes' 7490 warn_cxx='-Wnoexcept' 7491 ac_ext=c 7492ac_cpp='$CPP $CPPFLAGS' 7493ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 7494ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 7495ac_compiler_gnu=$ac_cv_c_compiler_gnu 7496 7497 # Clang supports many of GCC's -W options, but only issues warnings 7498 # on the ones it does not recognize. In that case, gl_WARN_ADD 7499 # thinks the option is supported, and unknown options are then added 7500 # to CFLAGS. But then, when -Werror is added in the test suite for 7501 # instance, the warning about the unknown option turns into an 7502 # error. 7503 # 7504 # This should be addressed by gnulib's gl_WARN_ADD, but in the 7505 # meanwhile, turn warnings about unknown options into errors in 7506 # CFLAGS, and restore CFLAGS after the tests. 7507 save_CFLAGS=$CFLAGS 7508 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror=unknown-warning-option" >&5 7509$as_echo_n "checking whether C compiler handles -Werror=unknown-warning-option... " >&6; } 7510if ${gl_cv_warn_c__Werror_unknown_warning_option+:} false; then : 7511 $as_echo_n "(cached) " >&6 7512else 7513 7514 gl_save_compiler_FLAGS="$CFLAGS" 7515 as_fn_append CFLAGS " -Werror=unknown-warning-option" 7516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7517/* end confdefs.h. */ 7518 7519int 7520main () 7521{ 7522 7523 ; 7524 return 0; 7525} 7526_ACEOF 7527if ac_fn_c_try_compile "$LINENO"; then : 7528 gl_cv_warn_c__Werror_unknown_warning_option=yes 7529else 7530 gl_cv_warn_c__Werror_unknown_warning_option=no 7531fi 7532rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7533 CFLAGS="$gl_save_compiler_FLAGS" 7534 7535fi 7536{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror_unknown_warning_option" >&5 7537$as_echo "$gl_cv_warn_c__Werror_unknown_warning_option" >&6; } 7538if test "x$gl_cv_warn_c__Werror_unknown_warning_option" = xyes; then : 7539 as_fn_append CFLAGS " -Werror=unknown-warning-option" 7540fi 7541 7542 7543 for i in $warn_common $warn_c; 7544 do 7545 as_gl_Warn=`$as_echo "gl_cv_warn_c_$i" | $as_tr_sh` 7546{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles $i" >&5 7547$as_echo_n "checking whether C compiler handles $i... " >&6; } 7548if eval \${$as_gl_Warn+:} false; then : 7549 $as_echo_n "(cached) " >&6 7550else 7551 7552 gl_save_compiler_FLAGS="$CFLAGS" 7553 as_fn_append CFLAGS " $i" 7554 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7555/* end confdefs.h. */ 7556 7557int 7558main () 7559{ 7560 7561 ; 7562 return 0; 7563} 7564_ACEOF 7565if ac_fn_c_try_compile "$LINENO"; then : 7566 eval "$as_gl_Warn=yes" 7567else 7568 eval "$as_gl_Warn=no" 7569fi 7570rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7571 CFLAGS="$gl_save_compiler_FLAGS" 7572 7573fi 7574eval ac_res=\$$as_gl_Warn 7575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 7576$as_echo "$ac_res" >&6; } 7577if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then : 7578 as_fn_append WARN_CFLAGS " $i" 7579fi 7580 7581 7582 done 7583 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Werror" >&5 7584$as_echo_n "checking whether C compiler handles -Werror... " >&6; } 7585if ${gl_cv_warn_c__Werror+:} false; then : 7586 $as_echo_n "(cached) " >&6 7587else 7588 7589 gl_save_compiler_FLAGS="$CFLAGS" 7590 as_fn_append CFLAGS " -Werror" 7591 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7592/* end confdefs.h. */ 7593 7594int 7595main () 7596{ 7597 7598 ; 7599 return 0; 7600} 7601_ACEOF 7602if ac_fn_c_try_compile "$LINENO"; then : 7603 gl_cv_warn_c__Werror=yes 7604else 7605 gl_cv_warn_c__Werror=no 7606fi 7607rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7608 CFLAGS="$gl_save_compiler_FLAGS" 7609 7610fi 7611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Werror" >&5 7612$as_echo "$gl_cv_warn_c__Werror" >&6; } 7613if test "x$gl_cv_warn_c__Werror" = xyes; then : 7614 as_fn_append WERROR_CFLAGS " -Werror" 7615fi 7616 7617 7618 7619 # Warnings for the test suite, and maybe for bison if GCC is modern 7620 # enough. 7621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wmissing-declarations" >&5 7622$as_echo_n "checking whether C compiler handles -Wmissing-declarations... " >&6; } 7623if ${gl_cv_warn_c__Wmissing_declarations+:} false; then : 7624 $as_echo_n "(cached) " >&6 7625else 7626 7627 gl_save_compiler_FLAGS="$CFLAGS" 7628 as_fn_append CFLAGS " -Wmissing-declarations" 7629 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7630/* end confdefs.h. */ 7631 7632int 7633main () 7634{ 7635 7636 ; 7637 return 0; 7638} 7639_ACEOF 7640if ac_fn_c_try_compile "$LINENO"; then : 7641 gl_cv_warn_c__Wmissing_declarations=yes 7642else 7643 gl_cv_warn_c__Wmissing_declarations=no 7644fi 7645rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7646 CFLAGS="$gl_save_compiler_FLAGS" 7647 7648fi 7649{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wmissing_declarations" >&5 7650$as_echo "$gl_cv_warn_c__Wmissing_declarations" >&6; } 7651if test "x$gl_cv_warn_c__Wmissing_declarations" = xyes; then : 7652 as_fn_append WARN_CFLAGS_TEST " -Wmissing-declarations" 7653fi 7654 7655 7656 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wmissing-prototypes" >&5 7657$as_echo_n "checking whether C compiler handles -Wmissing-prototypes... " >&6; } 7658if ${gl_cv_warn_c__Wmissing_prototypes+:} false; then : 7659 $as_echo_n "(cached) " >&6 7660else 7661 7662 gl_save_compiler_FLAGS="$CFLAGS" 7663 as_fn_append CFLAGS " -Wmissing-prototypes" 7664 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7665/* end confdefs.h. */ 7666 7667int 7668main () 7669{ 7670 7671 ; 7672 return 0; 7673} 7674_ACEOF 7675if ac_fn_c_try_compile "$LINENO"; then : 7676 gl_cv_warn_c__Wmissing_prototypes=yes 7677else 7678 gl_cv_warn_c__Wmissing_prototypes=no 7679fi 7680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7681 CFLAGS="$gl_save_compiler_FLAGS" 7682 7683fi 7684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wmissing_prototypes" >&5 7685$as_echo "$gl_cv_warn_c__Wmissing_prototypes" >&6; } 7686if test "x$gl_cv_warn_c__Wmissing_prototypes" = xyes; then : 7687 as_fn_append WARN_CFLAGS_TEST " -Wmissing-prototypes" 7688fi 7689 7690 7691 test $lv_cv_gcc_pragma_push_works = yes && 7692 as_fn_append WARN_CFLAGS " $WARN_CFLAGS_TEST" 7693 7694 # Warnings for the test suite only. 7695 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -Wundef" >&5 7696$as_echo_n "checking whether C compiler handles -Wundef... " >&6; } 7697if ${gl_cv_warn_c__Wundef+:} false; then : 7698 $as_echo_n "(cached) " >&6 7699else 7700 7701 gl_save_compiler_FLAGS="$CFLAGS" 7702 as_fn_append CFLAGS " -Wundef" 7703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7704/* end confdefs.h. */ 7705 7706int 7707main () 7708{ 7709 7710 ; 7711 return 0; 7712} 7713_ACEOF 7714if ac_fn_c_try_compile "$LINENO"; then : 7715 gl_cv_warn_c__Wundef=yes 7716else 7717 gl_cv_warn_c__Wundef=no 7718fi 7719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7720 CFLAGS="$gl_save_compiler_FLAGS" 7721 7722fi 7723{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__Wundef" >&5 7724$as_echo "$gl_cv_warn_c__Wundef" >&6; } 7725if test "x$gl_cv_warn_c__Wundef" = xyes; then : 7726 as_fn_append WARN_CFLAGS_TEST " -Wundef" 7727fi 7728 7729 7730 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C compiler handles -pedantic" >&5 7731$as_echo_n "checking whether C compiler handles -pedantic... " >&6; } 7732if ${gl_cv_warn_c__pedantic+:} false; then : 7733 $as_echo_n "(cached) " >&6 7734else 7735 7736 gl_save_compiler_FLAGS="$CFLAGS" 7737 as_fn_append CFLAGS " -pedantic" 7738 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7739/* end confdefs.h. */ 7740 7741int 7742main () 7743{ 7744 7745 ; 7746 return 0; 7747} 7748_ACEOF 7749if ac_fn_c_try_compile "$LINENO"; then : 7750 gl_cv_warn_c__pedantic=yes 7751else 7752 gl_cv_warn_c__pedantic=no 7753fi 7754rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7755 CFLAGS="$gl_save_compiler_FLAGS" 7756 7757fi 7758{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_c__pedantic" >&5 7759$as_echo "$gl_cv_warn_c__pedantic" >&6; } 7760if test "x$gl_cv_warn_c__pedantic" = xyes; then : 7761 as_fn_append WARN_CFLAGS_TEST " -pedantic" 7762fi 7763 7764 7765 CFLAGS=$save_CFLAGS 7766 ac_ext=c 7767ac_cpp='$CPP $CPPFLAGS' 7768ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 7769ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 7770ac_compiler_gnu=$ac_cv_c_compiler_gnu 7771 7772 7773 7774 ac_ext=cpp 7775ac_cpp='$CXXCPP $CPPFLAGS' 7776ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 7777ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 7778ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 7779 7780 save_CXXFLAGS=$CXXFLAGS 7781 7782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -Werror=unknown-warning-option" >&5 7783$as_echo_n "checking whether C++ compiler handles -Werror=unknown-warning-option... " >&6; } 7784if ${gl_cv_warn_cxx__Werror_unknown_warning_option+:} false; then : 7785 $as_echo_n "(cached) " >&6 7786else 7787 7788 gl_save_compiler_FLAGS="$CXXFLAGS" 7789 as_fn_append CXXFLAGS " -Werror=unknown-warning-option" 7790 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7791/* end confdefs.h. */ 7792 7793int 7794main () 7795{ 7796 7797 ; 7798 return 0; 7799} 7800_ACEOF 7801if ac_fn_cxx_try_compile "$LINENO"; then : 7802 gl_cv_warn_cxx__Werror_unknown_warning_option=yes 7803else 7804 gl_cv_warn_cxx__Werror_unknown_warning_option=no 7805fi 7806rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7807 CXXFLAGS="$gl_save_compiler_FLAGS" 7808 7809fi 7810{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__Werror_unknown_warning_option" >&5 7811$as_echo "$gl_cv_warn_cxx__Werror_unknown_warning_option" >&6; } 7812if test "x$gl_cv_warn_cxx__Werror_unknown_warning_option" = xyes; then : 7813 as_fn_append CXXFLAGS " -Werror=unknown-warning-option" 7814fi 7815 7816 7817 for i in $warn_common $warn_cxx; 7818 do 7819 as_gl_Warn=`$as_echo "gl_cv_warn_cxx_$i" | $as_tr_sh` 7820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles $i" >&5 7821$as_echo_n "checking whether C++ compiler handles $i... " >&6; } 7822if eval \${$as_gl_Warn+:} false; then : 7823 $as_echo_n "(cached) " >&6 7824else 7825 7826 gl_save_compiler_FLAGS="$CXXFLAGS" 7827 as_fn_append CXXFLAGS " $i" 7828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7829/* end confdefs.h. */ 7830 7831int 7832main () 7833{ 7834 7835 ; 7836 return 0; 7837} 7838_ACEOF 7839if ac_fn_cxx_try_compile "$LINENO"; then : 7840 eval "$as_gl_Warn=yes" 7841else 7842 eval "$as_gl_Warn=no" 7843fi 7844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7845 CXXFLAGS="$gl_save_compiler_FLAGS" 7846 7847fi 7848eval ac_res=\$$as_gl_Warn 7849 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 7850$as_echo "$ac_res" >&6; } 7851if eval test \"x\$"$as_gl_Warn"\" = x"yes"; then : 7852 as_fn_append WARN_CXXFLAGS " $i" 7853fi 7854 7855 7856 done 7857 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -Wzero-as-null-pointer-constant" >&5 7858$as_echo_n "checking whether C++ compiler handles -Wzero-as-null-pointer-constant... " >&6; } 7859if ${gl_cv_warn_cxx__Wzero_as_null_pointer_constant+:} false; then : 7860 $as_echo_n "(cached) " >&6 7861else 7862 7863 gl_save_compiler_FLAGS="$CXXFLAGS" 7864 as_fn_append CXXFLAGS " -Wzero-as-null-pointer-constant" 7865 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7866/* end confdefs.h. */ 7867 7868int 7869main () 7870{ 7871nullptr 7872 ; 7873 return 0; 7874} 7875_ACEOF 7876if ac_fn_cxx_try_compile "$LINENO"; then : 7877 gl_cv_warn_cxx__Wzero_as_null_pointer_constant=yes 7878else 7879 gl_cv_warn_cxx__Wzero_as_null_pointer_constant=no 7880fi 7881rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7882 CXXFLAGS="$gl_save_compiler_FLAGS" 7883 7884fi 7885{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__Wzero_as_null_pointer_constant" >&5 7886$as_echo "$gl_cv_warn_cxx__Wzero_as_null_pointer_constant" >&6; } 7887if test "x$gl_cv_warn_cxx__Wzero_as_null_pointer_constant" = xyes; then : 7888 as_fn_append WARN_CXXFLAGS " -Wzero-as-null-pointer-constant" 7889fi 7890 7891 7892 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -Werror" >&5 7893$as_echo_n "checking whether C++ compiler handles -Werror... " >&6; } 7894if ${gl_cv_warn_cxx__Werror+:} false; then : 7895 $as_echo_n "(cached) " >&6 7896else 7897 7898 gl_save_compiler_FLAGS="$CXXFLAGS" 7899 as_fn_append CXXFLAGS " -Werror" 7900 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7901/* end confdefs.h. */ 7902 7903int 7904main () 7905{ 7906 7907 ; 7908 return 0; 7909} 7910_ACEOF 7911if ac_fn_cxx_try_compile "$LINENO"; then : 7912 gl_cv_warn_cxx__Werror=yes 7913else 7914 gl_cv_warn_cxx__Werror=no 7915fi 7916rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7917 CXXFLAGS="$gl_save_compiler_FLAGS" 7918 7919fi 7920{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__Werror" >&5 7921$as_echo "$gl_cv_warn_cxx__Werror" >&6; } 7922if test "x$gl_cv_warn_cxx__Werror" = xyes; then : 7923 as_fn_append WERROR_CXXFLAGS " -Werror" 7924fi 7925 7926 7927 # Warnings for the test suite only. 7928 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -Wundef" >&5 7929$as_echo_n "checking whether C++ compiler handles -Wundef... " >&6; } 7930if ${gl_cv_warn_cxx__Wundef+:} false; then : 7931 $as_echo_n "(cached) " >&6 7932else 7933 7934 gl_save_compiler_FLAGS="$CXXFLAGS" 7935 as_fn_append CXXFLAGS " -Wundef" 7936 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7937/* end confdefs.h. */ 7938 7939int 7940main () 7941{ 7942 7943 ; 7944 return 0; 7945} 7946_ACEOF 7947if ac_fn_cxx_try_compile "$LINENO"; then : 7948 gl_cv_warn_cxx__Wundef=yes 7949else 7950 gl_cv_warn_cxx__Wundef=no 7951fi 7952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7953 CXXFLAGS="$gl_save_compiler_FLAGS" 7954 7955fi 7956{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__Wundef" >&5 7957$as_echo "$gl_cv_warn_cxx__Wundef" >&6; } 7958if test "x$gl_cv_warn_cxx__Wundef" = xyes; then : 7959 as_fn_append WARN_CXXFLAGS_TEST " -Wundef" 7960fi 7961 7962 7963 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C++ compiler handles -pedantic" >&5 7964$as_echo_n "checking whether C++ compiler handles -pedantic... " >&6; } 7965if ${gl_cv_warn_cxx__pedantic+:} false; then : 7966 $as_echo_n "(cached) " >&6 7967else 7968 7969 gl_save_compiler_FLAGS="$CXXFLAGS" 7970 as_fn_append CXXFLAGS " -pedantic" 7971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 7972/* end confdefs.h. */ 7973 7974int 7975main () 7976{ 7977 7978 ; 7979 return 0; 7980} 7981_ACEOF 7982if ac_fn_cxx_try_compile "$LINENO"; then : 7983 gl_cv_warn_cxx__pedantic=yes 7984else 7985 gl_cv_warn_cxx__pedantic=no 7986fi 7987rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 7988 CXXFLAGS="$gl_save_compiler_FLAGS" 7989 7990fi 7991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_warn_cxx__pedantic" >&5 7992$as_echo "$gl_cv_warn_cxx__pedantic" >&6; } 7993if test "x$gl_cv_warn_cxx__pedantic" = xyes; then : 7994 as_fn_append WARN_CXXFLAGS_TEST " -pedantic" 7995fi 7996 7997 7998 CXXFLAGS=$save_CXXFLAGS 7999 ac_ext=c 8000ac_cpp='$CPP $CPPFLAGS' 8001ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 8002ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 8003ac_compiler_gnu=$ac_cv_c_compiler_gnu 8004 8005fi 8006 8007 8008 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8009/* end confdefs.h. */ 8010#include <limits.h> 8011 int test_array[CHAR_BIT]; 8012int 8013main () 8014{ 8015 8016 ; 8017 return 0; 8018} 8019_ACEOF 8020if ac_fn_c_try_compile "$LINENO"; then : 8021 8022else 8023 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 8024$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 8025as_fn_error $? "cannot compile a simple C program 8026See \`config.log' for more details" "$LINENO" 5; } 8027fi 8028rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8029 BISON_C_WORKS=: 8030 8031 8032ac_ext=c 8033ac_cpp='$CPP $CPPFLAGS' 8034ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 8035ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 8036ac_compiler_gnu=$ac_cv_c_compiler_gnu 8037 8038{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports POSIXLY_CORRECT=1" >&5 8039$as_echo_n "checking whether $CC supports POSIXLY_CORRECT=1... " >&6; } 8040if ${bison_cv_c_supports_posixly_correct+:} false; then : 8041 $as_echo_n "(cached) " >&6 8042else 8043 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' 8044case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in 8045 xx) gl_had_POSIXLY_CORRECT=exported ;; 8046 x) gl_had_POSIXLY_CORRECT=yes ;; 8047 *) gl_had_POSIXLY_CORRECT= ;; 8048esac 8049POSIXLY_CORRECT=1 8050export POSIXLY_CORRECT 8051cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8052/* end confdefs.h. */ 8053 8054int 8055main () 8056{ 8057 8058 ; 8059 return 0; 8060} 8061_ACEOF 8062if ac_fn_c_try_link "$LINENO"; then : 8063 bison_cv_c_supports_posixly_correct=yes 8064else 8065 bison_cv_c_supports_posixly_correct=no 8066fi 8067rm -f core conftest.err conftest.$ac_objext \ 8068 conftest$ac_exeext conftest.$ac_ext 8069case $gl_had_POSIXLY_CORRECT in 8070 exported) ;; 8071 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; 8072 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; 8073esac 8074 8075fi 8076{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bison_cv_c_supports_posixly_correct" >&5 8077$as_echo "$bison_cv_c_supports_posixly_correct" >&6; } 8078case $bison_cv_c_supports_posixly_correct in 8079 yes) C_COMPILER_POSIXLY_CORRECT=true 8080 ;; 8081 no) C_COMPILER_POSIXLY_CORRECT=false 8082;; 8083esac 8084 8085ac_ext=c 8086ac_cpp='$CPP $CPPFLAGS' 8087ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 8088ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 8089ac_compiler_gnu=$ac_cv_c_compiler_gnu 8090 8091 8092 8093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX builds executables that work" >&5 8094$as_echo_n "checking whether $CXX builds executables that work... " >&6; } 8095if ${bison_cv_cxx_works+:} false; then : 8096 $as_echo_n "(cached) " >&6 8097else 8098 ac_ext=cpp 8099ac_cpp='$CXXCPP $CPPFLAGS' 8100ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 8101ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 8102ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 8103 8104 bison_cv_cxx_works=no 8105 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8106/* end confdefs.h. */ 8107#include <cstdlib> 8108 #include <iostream> 8109 #include <map> 8110 #include <string> 8111 using namespace std; 8112int 8113main () 8114{ 8115std::cerr << ""; 8116 cout << ""; 8117 typedef std::pair<unsigned int, int> uipair; 8118 std::map<unsigned int, int> m; 8119 std::map<unsigned int, int>::iterator i; 8120 m.insert (uipair (4, -4)); 8121 for (i = m.begin (); i != m.end (); ++i) 8122 if (i->first != 4) 8123 return 1; 8124 ; 8125 return 0; 8126} 8127_ACEOF 8128if ac_fn_cxx_try_compile "$LINENO"; then : 8129 if { ac_try='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_objext $LIBS >&5' 8130 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 8131 (eval $ac_try) 2>&5 8132 ac_status=$? 8133 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 8134 test $ac_status = 0; }; }; then : 8135 if test "$cross_compiling" = yes; then : 8136 bison_cv_cxx_works=cross 8137else 8138 if { ac_try='./conftest$ac_exeext' 8139 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 8140 (eval $ac_try) 2>&5 8141 ac_status=$? 8142 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 8143 test $ac_status = 0; }; }; then : 8144 bison_cv_cxx_works=yes 8145fi 8146fi 8147fi 8148 rm -f conftest$ac_exeext 8149fi 8150rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8151 ac_ext=c 8152ac_cpp='$CPP $CPPFLAGS' 8153ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 8154ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 8155ac_compiler_gnu=$ac_cv_c_compiler_gnu 8156 8157fi 8158{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bison_cv_cxx_works" >&5 8159$as_echo "$bison_cv_cxx_works" >&6; } 8160 8161 case $bison_cv_cxx_works in 8162 yes) 8163 BISON_CXX_WORKS=':';; 8164 no | cross) 8165 BISON_CXX_WORKS='exit 77';; 8166 esac 8167 8168 8169 if test $bison_cv_cxx_works = yes; then 8170 BISON_CXX_WORKS_TRUE= 8171 BISON_CXX_WORKS_FALSE='#' 8172else 8173 BISON_CXX_WORKS_TRUE='#' 8174 BISON_CXX_WORKS_FALSE= 8175fi 8176 8177 8178ac_ext=cpp 8179ac_cpp='$CXXCPP $CPPFLAGS' 8180ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' 8181ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 8182ac_compiler_gnu=$ac_cv_cxx_compiler_gnu 8183 8184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports POSIXLY_CORRECT=1" >&5 8185$as_echo_n "checking whether $CXX supports POSIXLY_CORRECT=1... " >&6; } 8186if ${bison_cv_cxx_supports_posixly_correct+:} false; then : 8187 $as_echo_n "(cached) " >&6 8188else 8189 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' 8190case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in 8191 xx) gl_had_POSIXLY_CORRECT=exported ;; 8192 x) gl_had_POSIXLY_CORRECT=yes ;; 8193 *) gl_had_POSIXLY_CORRECT= ;; 8194esac 8195POSIXLY_CORRECT=1 8196export POSIXLY_CORRECT 8197cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8198/* end confdefs.h. */ 8199 8200int 8201main () 8202{ 8203 8204 ; 8205 return 0; 8206} 8207_ACEOF 8208if ac_fn_cxx_try_link "$LINENO"; then : 8209 bison_cv_cxx_supports_posixly_correct=yes 8210else 8211 bison_cv_cxx_supports_posixly_correct=no 8212fi 8213rm -f core conftest.err conftest.$ac_objext \ 8214 conftest$ac_exeext conftest.$ac_ext 8215case $gl_had_POSIXLY_CORRECT in 8216 exported) ;; 8217 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; 8218 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; 8219esac 8220 8221fi 8222{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $bison_cv_cxx_supports_posixly_correct" >&5 8223$as_echo "$bison_cv_cxx_supports_posixly_correct" >&6; } 8224case $bison_cv_cxx_supports_posixly_correct in 8225 yes) CXX_COMPILER_POSIXLY_CORRECT=true 8226 ;; 8227 no) CXX_COMPILER_POSIXLY_CORRECT=false 8228;; 8229esac 8230 8231ac_ext=c 8232ac_cpp='$CPP $CPPFLAGS' 8233ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' 8234ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' 8235ac_compiler_gnu=$ac_cv_c_compiler_gnu 8236 8237 8238 8239# Check whether --enable-yacc was given. 8240if test "${enable_yacc+set}" = set; then : 8241 enableval=$enable_yacc; 8242else 8243 enable_yacc=yes 8244fi 8245 8246case $enable_yacc in 8247yes) 8248 YACC_SCRIPT=yacc 8249 YACC_LIBRARY=liby.a;; 8250*) 8251 YACC_SCRIPT= 8252 YACC_LIBRARY=;; 8253esac 8254 8255 8256 8257# Checks for programs. 8258 8259DOT=${DOT-"${am_missing_run}dot"} 8260 8261for ac_prog in flex lex 8262do 8263 # Extract the first word of "$ac_prog", so it can be a program name with args. 8264set dummy $ac_prog; ac_word=$2 8265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8266$as_echo_n "checking for $ac_word... " >&6; } 8267if ${ac_cv_prog_LEX+:} false; then : 8268 $as_echo_n "(cached) " >&6 8269else 8270 if test -n "$LEX"; then 8271 ac_cv_prog_LEX="$LEX" # Let the user override the test. 8272else 8273as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8274for as_dir in $PATH 8275do 8276 IFS=$as_save_IFS 8277 test -z "$as_dir" && as_dir=. 8278 for ac_exec_ext in '' $ac_executable_extensions; do 8279 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8280 ac_cv_prog_LEX="$ac_prog" 8281 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8282 break 2 8283 fi 8284done 8285 done 8286IFS=$as_save_IFS 8287 8288fi 8289fi 8290LEX=$ac_cv_prog_LEX 8291if test -n "$LEX"; then 8292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 8293$as_echo "$LEX" >&6; } 8294else 8295 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8296$as_echo "no" >&6; } 8297fi 8298 8299 8300 test -n "$LEX" && break 8301done 8302test -n "$LEX" || LEX=":" 8303 8304if test "x$LEX" != "x:"; then 8305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lex is flex" >&5 8306$as_echo_n "checking whether lex is flex... " >&6; } 8307if ${ac_cv_prog_lex_is_flex+:} false; then : 8308 $as_echo_n "(cached) " >&6 8309else 8310 cat >conftest.l <<_ACEOF 8311%option debug nodefault noinput nounput noyywrap never-interactive 8312%x SC_CONF_TEST 8313%% 8314a { BEGIN SC_CONF_TEST; } 8315_ACEOF 8316if { { ac_try="$LEX conftest.l" 8317case "(($ac_try" in 8318 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8319 *) ac_try_echo=$ac_try;; 8320esac 8321eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 8322$as_echo "$ac_try_echo"; } >&5 8323 (eval "$LEX conftest.l") 2>&5 8324 ac_status=$? 8325 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 8326 test $ac_status = 0; }; then 8327 ac_cv_prog_lex_is_flex=yes 8328else 8329 ac_cv_prog_lex_is_flex=no 8330fi 8331 8332fi 8333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_is_flex" >&5 8334$as_echo "$ac_cv_prog_lex_is_flex" >&6; } 8335LEX_IS_FLEX=`test "$ac_cv_prog_lex_is_flex" = yes && echo true || echo false` 8336 8337cat >conftest.l <<_ACEOF 8338%% 8339a { ECHO; } 8340b { REJECT; } 8341c { yymore (); } 8342d { yyless (1); } 8343e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ 8344 yyless ((input () != 0)); } 8345f { unput (yytext[0]); } 8346. { BEGIN INITIAL; } 8347%% 8348#ifdef YYTEXT_POINTER 8349extern char *yytext; 8350#endif 8351int 8352main (void) 8353{ 8354 return ! yylex () + ! yywrap (); 8355} 8356_ACEOF 8357{ { ac_try="$LEX conftest.l" 8358case "(($ac_try" in 8359 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; 8360 *) ac_try_echo=$ac_try;; 8361esac 8362eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" 8363$as_echo "$ac_try_echo"; } >&5 8364 (eval "$LEX conftest.l") 2>&5 8365 ac_status=$? 8366 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 8367 test $ac_status = 0; } 8368{ $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 8369$as_echo_n "checking lex output file root... " >&6; } 8370if ${ac_cv_prog_lex_root+:} false; then : 8371 $as_echo_n "(cached) " >&6 8372else 8373 8374if test -f lex.yy.c; then 8375 ac_cv_prog_lex_root=lex.yy 8376elif test -f lexyy.c; then 8377 ac_cv_prog_lex_root=lexyy 8378else 8379 as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 8380fi 8381fi 8382{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 8383$as_echo "$ac_cv_prog_lex_root" >&6; } 8384LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root 8385 8386if test -z "${LEXLIB+set}"; then 8387 { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 8388$as_echo_n "checking lex library... " >&6; } 8389if ${ac_cv_lib_lex+:} false; then : 8390 $as_echo_n "(cached) " >&6 8391else 8392 8393 ac_save_LIBS=$LIBS 8394 ac_cv_lib_lex='none needed' 8395 for ac_lib in '' -lfl -ll; do 8396 LIBS="$ac_lib $ac_save_LIBS" 8397 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8398/* end confdefs.h. */ 8399`cat $LEX_OUTPUT_ROOT.c` 8400_ACEOF 8401if ac_fn_c_try_link "$LINENO"; then : 8402 ac_cv_lib_lex=$ac_lib 8403fi 8404rm -f core conftest.err conftest.$ac_objext \ 8405 conftest$ac_exeext conftest.$ac_ext 8406 test "$ac_cv_lib_lex" != 'none needed' && break 8407 done 8408 LIBS=$ac_save_LIBS 8409 8410fi 8411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 8412$as_echo "$ac_cv_lib_lex" >&6; } 8413 test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex 8414fi 8415 8416 8417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 8418$as_echo_n "checking whether yytext is a pointer... " >&6; } 8419if ${ac_cv_prog_lex_yytext_pointer+:} false; then : 8420 $as_echo_n "(cached) " >&6 8421else 8422 # POSIX says lex can declare yytext either as a pointer or an array; the 8423# default is implementation-dependent. Figure out which it is, since 8424# not all implementations provide the %pointer and %array declarations. 8425ac_cv_prog_lex_yytext_pointer=no 8426ac_save_LIBS=$LIBS 8427LIBS="$LEXLIB $ac_save_LIBS" 8428cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8429/* end confdefs.h. */ 8430 8431 #define YYTEXT_POINTER 1 8432`cat $LEX_OUTPUT_ROOT.c` 8433_ACEOF 8434if ac_fn_c_try_link "$LINENO"; then : 8435 ac_cv_prog_lex_yytext_pointer=yes 8436fi 8437rm -f core conftest.err conftest.$ac_objext \ 8438 conftest$ac_exeext conftest.$ac_ext 8439LIBS=$ac_save_LIBS 8440 8441fi 8442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 8443$as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } 8444if test $ac_cv_prog_lex_yytext_pointer = yes; then 8445 8446$as_echo "#define YYTEXT_POINTER 1" >>confdefs.h 8447 8448fi 8449rm -f conftest.l $LEX_OUTPUT_ROOT.c 8450 8451fi 8452$LEX_IS_FLEX || as_fn_error $? "Flex is required" "$LINENO" 5 8453for ac_prog in 'bison -y' byacc 8454do 8455 # Extract the first word of "$ac_prog", so it can be a program name with args. 8456set dummy $ac_prog; ac_word=$2 8457{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8458$as_echo_n "checking for $ac_word... " >&6; } 8459if ${ac_cv_prog_YACC+:} false; then : 8460 $as_echo_n "(cached) " >&6 8461else 8462 if test -n "$YACC"; then 8463 ac_cv_prog_YACC="$YACC" # Let the user override the test. 8464else 8465as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8466for as_dir in $PATH 8467do 8468 IFS=$as_save_IFS 8469 test -z "$as_dir" && as_dir=. 8470 for ac_exec_ext in '' $ac_executable_extensions; do 8471 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8472 ac_cv_prog_YACC="$ac_prog" 8473 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8474 break 2 8475 fi 8476done 8477 done 8478IFS=$as_save_IFS 8479 8480fi 8481fi 8482YACC=$ac_cv_prog_YACC 8483if test -n "$YACC"; then 8484 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 8485$as_echo "$YACC" >&6; } 8486else 8487 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8488$as_echo "no" >&6; } 8489fi 8490 8491 8492 test -n "$YACC" && break 8493done 8494test -n "$YACC" || YACC="yacc" 8495 8496if test -n "$ac_tool_prefix"; then 8497 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. 8498set dummy ${ac_tool_prefix}ranlib; ac_word=$2 8499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8500$as_echo_n "checking for $ac_word... " >&6; } 8501if ${ac_cv_prog_RANLIB+:} false; then : 8502 $as_echo_n "(cached) " >&6 8503else 8504 if test -n "$RANLIB"; then 8505 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. 8506else 8507as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8508for as_dir in $PATH 8509do 8510 IFS=$as_save_IFS 8511 test -z "$as_dir" && as_dir=. 8512 for ac_exec_ext in '' $ac_executable_extensions; do 8513 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8514 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" 8515 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8516 break 2 8517 fi 8518done 8519 done 8520IFS=$as_save_IFS 8521 8522fi 8523fi 8524RANLIB=$ac_cv_prog_RANLIB 8525if test -n "$RANLIB"; then 8526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 8527$as_echo "$RANLIB" >&6; } 8528else 8529 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8530$as_echo "no" >&6; } 8531fi 8532 8533 8534fi 8535if test -z "$ac_cv_prog_RANLIB"; then 8536 ac_ct_RANLIB=$RANLIB 8537 # Extract the first word of "ranlib", so it can be a program name with args. 8538set dummy ranlib; ac_word=$2 8539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8540$as_echo_n "checking for $ac_word... " >&6; } 8541if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : 8542 $as_echo_n "(cached) " >&6 8543else 8544 if test -n "$ac_ct_RANLIB"; then 8545 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. 8546else 8547as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8548for as_dir in $PATH 8549do 8550 IFS=$as_save_IFS 8551 test -z "$as_dir" && as_dir=. 8552 for ac_exec_ext in '' $ac_executable_extensions; do 8553 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8554 ac_cv_prog_ac_ct_RANLIB="ranlib" 8555 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8556 break 2 8557 fi 8558done 8559 done 8560IFS=$as_save_IFS 8561 8562fi 8563fi 8564ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB 8565if test -n "$ac_ct_RANLIB"; then 8566 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 8567$as_echo "$ac_ct_RANLIB" >&6; } 8568else 8569 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8570$as_echo "no" >&6; } 8571fi 8572 8573 if test "x$ac_ct_RANLIB" = x; then 8574 RANLIB=":" 8575 else 8576 case $cross_compiling:$ac_tool_warned in 8577yes:) 8578{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 8579$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} 8580ac_tool_warned=yes ;; 8581esac 8582 RANLIB=$ac_ct_RANLIB 8583 fi 8584else 8585 RANLIB="$ac_cv_prog_RANLIB" 8586fi 8587 8588 8589 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU M4 that supports accurate traces" >&5 8590$as_echo_n "checking for GNU M4 that supports accurate traces... " >&6; } 8591if ${ac_cv_path_M4+:} false; then : 8592 $as_echo_n "(cached) " >&6 8593else 8594 rm -f conftest.m4f 8595ac_had_posixly_correct=${POSIXLY_CORRECT:+yes} 8596{ POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} 8597if test -z "$M4"; then 8598 ac_path_M4_found=false 8599 # Loop through the user's path and test for each of PROGNAME-LIST 8600 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8601for as_dir in $PATH 8602do 8603 IFS=$as_save_IFS 8604 test -z "$as_dir" && as_dir=. 8605 for ac_prog in m4 gm4 gnum4; do 8606 for ac_exec_ext in '' $ac_executable_extensions; do 8607 ac_path_M4="$as_dir/$ac_prog$ac_exec_ext" 8608 as_fn_executable_p "$ac_path_M4" || continue 8609 # Root out GNU M4 1.4.5, as well as non-GNU m4 that ignore -t, -F. 8610 # Root out GNU M4 1.4.15 with buggy false negative replacement strstr. 8611 # Root out Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 with buggy 8612 # false positive strstr. 8613 ac_snippet=change'quote(<,>)in''dir(<if''def>,mac,bug)' 8614 ac_snippet=${ac_snippet}pat'subst(a,\(b\)\|\(a\),\1)d'nl 8615 ac_snippet=${ac_snippet}${as_nl}if'else(in''dex(..wi.d.,.d.),-1,bug)' 8616 ac_snippet=${ac_snippet}${as_nl}if'else(in''dex(;:11-:12-:12-:12-:12-:12-:12-:12-:12.:12.:12.:12.:12.:12.:12.:12.:12-,:12-:12-:12-:12-:12-:12-:12-:12-),-1,,strstr-bug2)' 8617 test -z "`$ac_path_M4 -F conftest.m4f </dev/null 2>&1`" \ 8618 && test -z "`$as_echo $ac_snippet | $ac_path_M4 --trace=mac 2>&1`" \ 8619 && test -f conftest.m4f \ 8620 && ac_cv_path_M4=$ac_path_M4 ac_path_M4_found=: 8621 rm -f conftest.m4f 8622 $ac_path_M4_found && break 3 8623 done 8624 done 8625 done 8626IFS=$as_save_IFS 8627 if test -z "$ac_cv_path_M4"; then 8628 as_fn_error $? "no acceptable m4 could be found in \$PATH. 8629GNU M4 1.4.6 or later is required; 1.4.16 or newer is recommended. 8630GNU M4 1.4.15 uses a buggy replacement strstr on some systems. 8631Glibc 2.9 - 2.12 and GNU M4 1.4.11 - 1.4.15 have another strstr bug." "$LINENO" 5 8632 fi 8633else 8634 ac_cv_path_M4=$M4 8635fi 8636 8637fi 8638{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_M4" >&5 8639$as_echo "$ac_cv_path_M4" >&6; } 8640 M4=$ac_cv_path_M4 8641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $ac_cv_path_M4 accepts --gnu" >&5 8642$as_echo_n "checking whether $ac_cv_path_M4 accepts --gnu... " >&6; } 8643if ${ac_cv_prog_gnu_m4_gnu+:} false; then : 8644 $as_echo_n "(cached) " >&6 8645else 8646 case `$M4 --help < /dev/null 2>&1` in 8647 *--gnu*) ac_cv_prog_gnu_m4_gnu=yes ;; 8648 *) ac_cv_prog_gnu_m4_gnu=no ;; 8649 esac 8650fi 8651{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_m4_gnu" >&5 8652$as_echo "$ac_cv_prog_gnu_m4_gnu" >&6; } 8653 if test "$ac_cv_prog_gnu_m4_gnu" = yes; then 8654 M4_GNU=--gnu 8655 else 8656 M4_GNU= 8657 fi 8658 8659 if test x$ac_had_posixly_correct = xyes; then 8660 POSIXLY_CORRECT=: 8661 if test $ac_cv_prog_gnu_m4_gnu = no; then 8662 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: the version of M4 that was found does not support -g" >&5 8663$as_echo "$as_me: WARNING: the version of M4 that was found does not support -g" >&2;} 8664 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using it with POSIXLY_CORRECT set may cause problems" >&5 8665$as_echo "$as_me: WARNING: using it with POSIXLY_CORRECT set may cause problems" >&2;} 8666 fi 8667 fi 8668 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how m4 supports trace files" >&5 8669$as_echo_n "checking how m4 supports trace files... " >&6; } 8670if ${ac_cv_prog_gnu_m4_debugfile+:} false; then : 8671 $as_echo_n "(cached) " >&6 8672else 8673 case `$M4 --help < /dev/null 2>&1` in 8674 *debugfile*) ac_cv_prog_gnu_m4_debugfile=--debugfile ;; 8675 *) ac_cv_prog_gnu_m4_debugfile=--error-output ;; 8676 esac 8677fi 8678{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_gnu_m4_debugfile" >&5 8679$as_echo "$ac_cv_prog_gnu_m4_debugfile" >&6; } 8680 M4_DEBUGFILE=$ac_cv_prog_gnu_m4_debugfile 8681 8682 8683 8684cat >>confdefs.h <<_ACEOF 8685#define M4 "$M4" 8686_ACEOF 8687 8688 8689cat >>confdefs.h <<_ACEOF 8690#define M4_GNU_OPTION "$M4_GNU" 8691_ACEOF 8692 8693# Extract the first word of "perl", so it can be a program name with args. 8694set dummy perl; ac_word=$2 8695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8696$as_echo_n "checking for $ac_word... " >&6; } 8697if ${ac_cv_path_PERL+:} false; then : 8698 $as_echo_n "(cached) " >&6 8699else 8700 case $PERL in 8701 [\\/]* | ?:[\\/]*) 8702 ac_cv_path_PERL="$PERL" # Let the user override the test with a path. 8703 ;; 8704 *) 8705 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8706for as_dir in $PATH 8707do 8708 IFS=$as_save_IFS 8709 test -z "$as_dir" && as_dir=. 8710 for ac_exec_ext in '' $ac_executable_extensions; do 8711 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8712 ac_cv_path_PERL="$as_dir/$ac_word$ac_exec_ext" 8713 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8714 break 2 8715 fi 8716done 8717 done 8718IFS=$as_save_IFS 8719 8720 ;; 8721esac 8722fi 8723PERL=$ac_cv_path_PERL 8724if test -n "$PERL"; then 8725 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PERL" >&5 8726$as_echo "$PERL" >&6; } 8727else 8728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8729$as_echo "no" >&6; } 8730fi 8731 8732 8733if test -z "$PERL"; then 8734 as_fn_error $? "perl not found" "$LINENO" 5 8735fi 8736 8737HELP2MAN=${HELP2MAN-"${am_missing_run}help2man"} 8738 8739# Extract the first word of "xsltproc", so it can be a program name with args. 8740set dummy xsltproc; ac_word=$2 8741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 8742$as_echo_n "checking for $ac_word... " >&6; } 8743if ${ac_cv_path_XSLTPROC+:} false; then : 8744 $as_echo_n "(cached) " >&6 8745else 8746 case $XSLTPROC in 8747 [\\/]* | ?:[\\/]*) 8748 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. 8749 ;; 8750 *) 8751 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 8752for as_dir in $PATH 8753do 8754 IFS=$as_save_IFS 8755 test -z "$as_dir" && as_dir=. 8756 for ac_exec_ext in '' $ac_executable_extensions; do 8757 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 8758 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" 8759 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 8760 break 2 8761 fi 8762done 8763 done 8764IFS=$as_save_IFS 8765 8766 ;; 8767esac 8768fi 8769XSLTPROC=$ac_cv_path_XSLTPROC 8770if test -n "$XSLTPROC"; then 8771 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 8772$as_echo "$XSLTPROC" >&6; } 8773else 8774 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 8775$as_echo "no" >&6; } 8776fi 8777 8778 8779 8780 8781# Checks for header files. 8782 8783 8784 8785 for ac_header in $ac_header_list 8786do : 8787 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 8788ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default 8789" 8790if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 8791 cat >>confdefs.h <<_ACEOF 8792#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 8793_ACEOF 8794 8795fi 8796 8797done 8798 8799 8800 8801 8802 8803# Checks for compiler characteristics. 8804{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 8805$as_echo_n "checking for inline... " >&6; } 8806if ${ac_cv_c_inline+:} false; then : 8807 $as_echo_n "(cached) " >&6 8808else 8809 ac_cv_c_inline=no 8810for ac_kw in inline __inline__ __inline; do 8811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8812/* end confdefs.h. */ 8813#ifndef __cplusplus 8814typedef int foo_t; 8815static $ac_kw foo_t static_foo () {return 0; } 8816$ac_kw foo_t foo () {return 0; } 8817#endif 8818 8819_ACEOF 8820if ac_fn_c_try_compile "$LINENO"; then : 8821 ac_cv_c_inline=$ac_kw 8822fi 8823rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 8824 test "$ac_cv_c_inline" != no && break 8825done 8826 8827fi 8828{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 8829$as_echo "$ac_cv_c_inline" >&6; } 8830 8831case $ac_cv_c_inline in 8832 inline | yes) ;; 8833 *) 8834 case $ac_cv_c_inline in 8835 no) ac_val=;; 8836 *) ac_val=$ac_cv_c_inline;; 8837 esac 8838 cat >>confdefs.h <<_ACEOF 8839#ifndef __cplusplus 8840#define inline $ac_val 8841#endif 8842_ACEOF 8843 ;; 8844esac 8845 8846 8847# Gnulib (later checks). Putting them here rather than right after 8848# gl_EARLY avoids some redundant checks. 8849 8850 8851 8852 8853 8854 LIBC_FATAL_STDERR_=1 8855 export LIBC_FATAL_STDERR_ 8856 8857ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" 8858if test "x$ac_cv_type_size_t" = xyes; then : 8859 8860else 8861 8862cat >>confdefs.h <<_ACEOF 8863#define size_t unsigned int 8864_ACEOF 8865 8866fi 8867 8868# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works 8869# for constant arguments. Useless! 8870{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 8871$as_echo_n "checking for working alloca.h... " >&6; } 8872if ${ac_cv_working_alloca_h+:} false; then : 8873 $as_echo_n "(cached) " >&6 8874else 8875 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8876/* end confdefs.h. */ 8877#include <alloca.h> 8878int 8879main () 8880{ 8881char *p = (char *) alloca (2 * sizeof (int)); 8882 if (p) return 0; 8883 ; 8884 return 0; 8885} 8886_ACEOF 8887if ac_fn_c_try_link "$LINENO"; then : 8888 ac_cv_working_alloca_h=yes 8889else 8890 ac_cv_working_alloca_h=no 8891fi 8892rm -f core conftest.err conftest.$ac_objext \ 8893 conftest$ac_exeext conftest.$ac_ext 8894fi 8895{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 8896$as_echo "$ac_cv_working_alloca_h" >&6; } 8897if test $ac_cv_working_alloca_h = yes; then 8898 8899$as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h 8900 8901fi 8902 8903{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 8904$as_echo_n "checking for alloca... " >&6; } 8905if ${ac_cv_func_alloca_works+:} false; then : 8906 $as_echo_n "(cached) " >&6 8907else 8908 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8909/* end confdefs.h. */ 8910#ifdef __GNUC__ 8911# define alloca __builtin_alloca 8912#else 8913# ifdef _MSC_VER 8914# include <malloc.h> 8915# define alloca _alloca 8916# else 8917# ifdef HAVE_ALLOCA_H 8918# include <alloca.h> 8919# else 8920# ifdef _AIX 8921 #pragma alloca 8922# else 8923# ifndef alloca /* predefined by HP cc +Olibcalls */ 8924void *alloca (size_t); 8925# endif 8926# endif 8927# endif 8928# endif 8929#endif 8930 8931int 8932main () 8933{ 8934char *p = (char *) alloca (1); 8935 if (p) return 0; 8936 ; 8937 return 0; 8938} 8939_ACEOF 8940if ac_fn_c_try_link "$LINENO"; then : 8941 ac_cv_func_alloca_works=yes 8942else 8943 ac_cv_func_alloca_works=no 8944fi 8945rm -f core conftest.err conftest.$ac_objext \ 8946 conftest$ac_exeext conftest.$ac_ext 8947fi 8948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 8949$as_echo "$ac_cv_func_alloca_works" >&6; } 8950 8951if test $ac_cv_func_alloca_works = yes; then 8952 8953$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h 8954 8955else 8956 # The SVR3 libPW and SVR4 libucb both contain incompatible functions 8957# that cause trouble. Some versions do not even contain alloca or 8958# contain a buggy version. If you still want to use their alloca, 8959# use ar to extract alloca.o from them instead of compiling alloca.c. 8960 8961 8962 8963 8964 8965ALLOCA=\${LIBOBJDIR}alloca.$ac_objext 8966 8967$as_echo "#define C_ALLOCA 1" >>confdefs.h 8968 8969 8970{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 8971$as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } 8972if ${ac_cv_os_cray+:} false; then : 8973 $as_echo_n "(cached) " >&6 8974else 8975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 8976/* end confdefs.h. */ 8977#if defined CRAY && ! defined CRAY2 8978webecray 8979#else 8980wenotbecray 8981#endif 8982 8983_ACEOF 8984if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 8985 $EGREP "webecray" >/dev/null 2>&1; then : 8986 ac_cv_os_cray=yes 8987else 8988 ac_cv_os_cray=no 8989fi 8990rm -f conftest* 8991 8992fi 8993{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 8994$as_echo "$ac_cv_os_cray" >&6; } 8995if test $ac_cv_os_cray = yes; then 8996 for ac_func in _getb67 GETB67 getb67; do 8997 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 8998ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 8999if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 9000 9001cat >>confdefs.h <<_ACEOF 9002#define CRAY_STACKSEG_END $ac_func 9003_ACEOF 9004 9005 break 9006fi 9007 9008 done 9009fi 9010 9011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 9012$as_echo_n "checking stack direction for C alloca... " >&6; } 9013if ${ac_cv_c_stack_direction+:} false; then : 9014 $as_echo_n "(cached) " >&6 9015else 9016 if test "$cross_compiling" = yes; then : 9017 ac_cv_c_stack_direction=0 9018else 9019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9020/* end confdefs.h. */ 9021$ac_includes_default 9022int 9023find_stack_direction (int *addr, int depth) 9024{ 9025 int dir, dummy = 0; 9026 if (! addr) 9027 addr = &dummy; 9028 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; 9029 dir = depth ? find_stack_direction (addr, depth - 1) : 0; 9030 return dir + dummy; 9031} 9032 9033int 9034main (int argc, char **argv) 9035{ 9036 return find_stack_direction (0, argc + !argv + 20) < 0; 9037} 9038_ACEOF 9039if ac_fn_c_try_run "$LINENO"; then : 9040 ac_cv_c_stack_direction=1 9041else 9042 ac_cv_c_stack_direction=-1 9043fi 9044rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 9045 conftest.$ac_objext conftest.beam conftest.$ac_ext 9046fi 9047 9048fi 9049{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 9050$as_echo "$ac_cv_c_stack_direction" >&6; } 9051cat >>confdefs.h <<_ACEOF 9052#define STACK_DIRECTION $ac_cv_c_stack_direction 9053_ACEOF 9054 9055 9056fi 9057 9058 9059 GNULIB__EXIT=0; 9060 GNULIB_ATOLL=0; 9061 GNULIB_CALLOC_POSIX=0; 9062 GNULIB_CANONICALIZE_FILE_NAME=0; 9063 GNULIB_GETLOADAVG=0; 9064 GNULIB_GETSUBOPT=0; 9065 GNULIB_GRANTPT=0; 9066 GNULIB_MALLOC_POSIX=0; 9067 GNULIB_MBTOWC=0; 9068 GNULIB_MKDTEMP=0; 9069 GNULIB_MKOSTEMP=0; 9070 GNULIB_MKOSTEMPS=0; 9071 GNULIB_MKSTEMP=0; 9072 GNULIB_MKSTEMPS=0; 9073 GNULIB_POSIX_OPENPT=0; 9074 GNULIB_PTSNAME=0; 9075 GNULIB_PTSNAME_R=0; 9076 GNULIB_PUTENV=0; 9077 GNULIB_RANDOM=0; 9078 GNULIB_RANDOM_R=0; 9079 GNULIB_REALLOC_POSIX=0; 9080 GNULIB_REALPATH=0; 9081 GNULIB_RPMATCH=0; 9082 GNULIB_SETENV=0; 9083 GNULIB_STRTOD=0; 9084 GNULIB_STRTOLL=0; 9085 GNULIB_STRTOULL=0; 9086 GNULIB_SYSTEM_POSIX=0; 9087 GNULIB_UNLOCKPT=0; 9088 GNULIB_UNSETENV=0; 9089 GNULIB_WCTOMB=0; 9090 HAVE__EXIT=1; 9091 HAVE_ATOLL=1; 9092 HAVE_CANONICALIZE_FILE_NAME=1; 9093 HAVE_DECL_GETLOADAVG=1; 9094 HAVE_GETSUBOPT=1; 9095 HAVE_GRANTPT=1; 9096 HAVE_MKDTEMP=1; 9097 HAVE_MKOSTEMP=1; 9098 HAVE_MKOSTEMPS=1; 9099 HAVE_MKSTEMP=1; 9100 HAVE_MKSTEMPS=1; 9101 HAVE_POSIX_OPENPT=1; 9102 HAVE_PTSNAME=1; 9103 HAVE_PTSNAME_R=1; 9104 HAVE_RANDOM=1; 9105 HAVE_RANDOM_H=1; 9106 HAVE_RANDOM_R=1; 9107 HAVE_REALPATH=1; 9108 HAVE_RPMATCH=1; 9109 HAVE_SETENV=1; 9110 HAVE_DECL_SETENV=1; 9111 HAVE_STRTOD=1; 9112 HAVE_STRTOLL=1; 9113 HAVE_STRTOULL=1; 9114 HAVE_STRUCT_RANDOM_DATA=1; 9115 HAVE_SYS_LOADAVG_H=0; 9116 HAVE_UNLOCKPT=1; 9117 HAVE_DECL_UNSETENV=1; 9118 REPLACE_CALLOC=0; 9119 REPLACE_CANONICALIZE_FILE_NAME=0; 9120 REPLACE_MALLOC=0; 9121 REPLACE_MBTOWC=0; 9122 REPLACE_MKSTEMP=0; 9123 REPLACE_PTSNAME=0; 9124 REPLACE_PTSNAME_R=0; 9125 REPLACE_PUTENV=0; 9126 REPLACE_RANDOM_R=0; 9127 REPLACE_REALLOC=0; 9128 REPLACE_REALPATH=0; 9129 REPLACE_SETENV=0; 9130 REPLACE_STRTOD=0; 9131 REPLACE_UNSETENV=0; 9132 REPLACE_WCTOMB=0; 9133 9134 9135 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether malloc, realloc, calloc are POSIX compliant" >&5 9136$as_echo_n "checking whether malloc, realloc, calloc are POSIX compliant... " >&6; } 9137if ${gl_cv_func_malloc_posix+:} false; then : 9138 $as_echo_n "(cached) " >&6 9139else 9140 9141 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9142/* end confdefs.h. */ 9143 9144int 9145main () 9146{ 9147#if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ 9148 choke me 9149 #endif 9150 9151 ; 9152 return 0; 9153} 9154_ACEOF 9155if ac_fn_c_try_compile "$LINENO"; then : 9156 gl_cv_func_malloc_posix=yes 9157else 9158 gl_cv_func_malloc_posix=no 9159fi 9160rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9161 9162fi 9163{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_malloc_posix" >&5 9164$as_echo "$gl_cv_func_malloc_posix" >&6; } 9165 9166 9167 GNULIB_CHDIR=0; 9168 GNULIB_CHOWN=0; 9169 GNULIB_CLOSE=0; 9170 GNULIB_DUP=0; 9171 GNULIB_DUP2=0; 9172 GNULIB_DUP3=0; 9173 GNULIB_ENVIRON=0; 9174 GNULIB_EUIDACCESS=0; 9175 GNULIB_FACCESSAT=0; 9176 GNULIB_FCHDIR=0; 9177 GNULIB_FCHOWNAT=0; 9178 GNULIB_FDATASYNC=0; 9179 GNULIB_FSYNC=0; 9180 GNULIB_FTRUNCATE=0; 9181 GNULIB_GETCWD=0; 9182 GNULIB_GETDOMAINNAME=0; 9183 GNULIB_GETDTABLESIZE=0; 9184 GNULIB_GETGROUPS=0; 9185 GNULIB_GETHOSTNAME=0; 9186 GNULIB_GETLOGIN=0; 9187 GNULIB_GETLOGIN_R=0; 9188 GNULIB_GETPAGESIZE=0; 9189 GNULIB_GETUSERSHELL=0; 9190 GNULIB_GROUP_MEMBER=0; 9191 GNULIB_ISATTY=0; 9192 GNULIB_LCHOWN=0; 9193 GNULIB_LINK=0; 9194 GNULIB_LINKAT=0; 9195 GNULIB_LSEEK=0; 9196 GNULIB_PIPE=0; 9197 GNULIB_PIPE2=0; 9198 GNULIB_PREAD=0; 9199 GNULIB_PWRITE=0; 9200 GNULIB_READ=0; 9201 GNULIB_READLINK=0; 9202 GNULIB_READLINKAT=0; 9203 GNULIB_RMDIR=0; 9204 GNULIB_SETHOSTNAME=0; 9205 GNULIB_SLEEP=0; 9206 GNULIB_SYMLINK=0; 9207 GNULIB_SYMLINKAT=0; 9208 GNULIB_TTYNAME_R=0; 9209 GNULIB_UNISTD_H_NONBLOCKING=0; 9210 GNULIB_UNISTD_H_SIGPIPE=0; 9211 GNULIB_UNLINK=0; 9212 GNULIB_UNLINKAT=0; 9213 GNULIB_USLEEP=0; 9214 GNULIB_WRITE=0; 9215 HAVE_CHOWN=1; 9216 HAVE_DUP2=1; 9217 HAVE_DUP3=1; 9218 HAVE_EUIDACCESS=1; 9219 HAVE_FACCESSAT=1; 9220 HAVE_FCHDIR=1; 9221 HAVE_FCHOWNAT=1; 9222 HAVE_FDATASYNC=1; 9223 HAVE_FSYNC=1; 9224 HAVE_FTRUNCATE=1; 9225 HAVE_GETDTABLESIZE=1; 9226 HAVE_GETGROUPS=1; 9227 HAVE_GETHOSTNAME=1; 9228 HAVE_GETLOGIN=1; 9229 HAVE_GETPAGESIZE=1; 9230 HAVE_GROUP_MEMBER=1; 9231 HAVE_LCHOWN=1; 9232 HAVE_LINK=1; 9233 HAVE_LINKAT=1; 9234 HAVE_PIPE=1; 9235 HAVE_PIPE2=1; 9236 HAVE_PREAD=1; 9237 HAVE_PWRITE=1; 9238 HAVE_READLINK=1; 9239 HAVE_READLINKAT=1; 9240 HAVE_SETHOSTNAME=1; 9241 HAVE_SLEEP=1; 9242 HAVE_SYMLINK=1; 9243 HAVE_SYMLINKAT=1; 9244 HAVE_UNLINKAT=1; 9245 HAVE_USLEEP=1; 9246 HAVE_DECL_ENVIRON=1; 9247 HAVE_DECL_FCHDIR=1; 9248 HAVE_DECL_FDATASYNC=1; 9249 HAVE_DECL_GETDOMAINNAME=1; 9250 HAVE_DECL_GETLOGIN_R=1; 9251 HAVE_DECL_GETPAGESIZE=1; 9252 HAVE_DECL_GETUSERSHELL=1; 9253 HAVE_DECL_SETHOSTNAME=1; 9254 HAVE_DECL_TTYNAME_R=1; 9255 HAVE_OS_H=0; 9256 HAVE_SYS_PARAM_H=0; 9257 REPLACE_CHOWN=0; 9258 REPLACE_CLOSE=0; 9259 REPLACE_DUP=0; 9260 REPLACE_DUP2=0; 9261 REPLACE_FCHOWNAT=0; 9262 REPLACE_FTRUNCATE=0; 9263 REPLACE_GETCWD=0; 9264 REPLACE_GETDOMAINNAME=0; 9265 REPLACE_GETLOGIN_R=0; 9266 REPLACE_GETGROUPS=0; 9267 REPLACE_GETPAGESIZE=0; 9268 REPLACE_ISATTY=0; 9269 REPLACE_LCHOWN=0; 9270 REPLACE_LINK=0; 9271 REPLACE_LINKAT=0; 9272 REPLACE_LSEEK=0; 9273 REPLACE_PREAD=0; 9274 REPLACE_PWRITE=0; 9275 REPLACE_READ=0; 9276 REPLACE_READLINK=0; 9277 REPLACE_RMDIR=0; 9278 REPLACE_SLEEP=0; 9279 REPLACE_SYMLINK=0; 9280 REPLACE_TTYNAME_R=0; 9281 REPLACE_UNLINK=0; 9282 REPLACE_UNLINKAT=0; 9283 REPLACE_USLEEP=0; 9284 REPLACE_WRITE=0; 9285 UNISTD_H_HAVE_WINSOCK2_H=0; 9286 UNISTD_H_HAVE_WINSOCK2_H_AND_USE_SOCKETS=0; 9287 9288 9289 9290 9291 9292 for ac_func in $ac_func_list 9293do : 9294 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 9295ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 9296if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 9297 cat >>confdefs.h <<_ACEOF 9298#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 9299_ACEOF 9300 9301fi 9302done 9303 9304 9305 9306 9307 9308 if test $ac_cv_func__set_invalid_parameter_handler = yes; then 9309 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 9310 9311$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h 9312 9313 else 9314 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 9315 fi 9316 9317 9318 9319 9320 9321 9322 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 9323$as_echo_n "checking whether // is distinct from /... " >&6; } 9324if ${gl_cv_double_slash_root+:} false; then : 9325 $as_echo_n "(cached) " >&6 9326else 9327 if test x"$cross_compiling" = xyes ; then 9328 # When cross-compiling, there is no way to tell whether // is special 9329 # short of a list of hosts. However, the only known hosts to date 9330 # that have a distinct // are Apollo DomainOS (too old to port to), 9331 # Cygwin, and z/OS. If anyone knows of another system for which // has 9332 # special semantics and is distinct from /, please report it to 9333 # <bug-gnulib@gnu.org>. 9334 case $host in 9335 *-cygwin | i370-ibm-openedition) 9336 gl_cv_double_slash_root=yes ;; 9337 *) 9338 # Be optimistic and assume that / and // are the same when we 9339 # don't know. 9340 gl_cv_double_slash_root='unknown, assuming no' ;; 9341 esac 9342 else 9343 set x `ls -di / // 2>/dev/null` 9344 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then 9345 gl_cv_double_slash_root=no 9346 else 9347 gl_cv_double_slash_root=yes 9348 fi 9349 fi 9350fi 9351{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 9352$as_echo "$gl_cv_double_slash_root" >&6; } 9353 if test "$gl_cv_double_slash_root" = yes; then 9354 9355$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h 9356 9357 fi 9358 9359 9360 9361 9362 9363 9364 9365 9366 9367 9368 9369 9370 9371 9372 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if environ is properly declared" >&5 9373$as_echo_n "checking if environ is properly declared... " >&6; } 9374 if ${gt_cv_var_environ_declaration+:} false; then : 9375 $as_echo_n "(cached) " >&6 9376else 9377 9378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9379/* end confdefs.h. */ 9380#if HAVE_UNISTD_H 9381 #include <unistd.h> 9382 #endif 9383 /* mingw, BeOS, Haiku declare environ in <stdlib.h>, not in <unistd.h>. */ 9384 #include <stdlib.h> 9385 9386 extern struct { int foo; } environ; 9387int 9388main () 9389{ 9390environ.foo = 1; 9391 ; 9392 return 0; 9393} 9394_ACEOF 9395if ac_fn_c_try_compile "$LINENO"; then : 9396 gt_cv_var_environ_declaration=no 9397else 9398 gt_cv_var_environ_declaration=yes 9399fi 9400rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9401fi 9402 9403 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_var_environ_declaration" >&5 9404$as_echo "$gt_cv_var_environ_declaration" >&6; } 9405 if test $gt_cv_var_environ_declaration = yes; then 9406 9407$as_echo "#define HAVE_ENVIRON_DECL 1" >>confdefs.h 9408 9409 fi 9410 9411 9412 if test $gt_cv_var_environ_declaration != yes; then 9413 HAVE_DECL_ENVIRON=0 9414 fi 9415 9416 9417 9418 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the preprocessor supports include_next" >&5 9419$as_echo_n "checking whether the preprocessor supports include_next... " >&6; } 9420if ${gl_cv_have_include_next+:} false; then : 9421 $as_echo_n "(cached) " >&6 9422else 9423 rm -rf conftestd1a conftestd1b conftestd2 9424 mkdir conftestd1a conftestd1b conftestd2 9425 cat <<EOF > conftestd1a/conftest.h 9426#define DEFINED_IN_CONFTESTD1 9427#include_next <conftest.h> 9428#ifdef DEFINED_IN_CONFTESTD2 9429int foo; 9430#else 9431#error "include_next doesn't work" 9432#endif 9433EOF 9434 cat <<EOF > conftestd1b/conftest.h 9435#define DEFINED_IN_CONFTESTD1 9436#include <stdio.h> 9437#include_next <conftest.h> 9438#ifdef DEFINED_IN_CONFTESTD2 9439int foo; 9440#else 9441#error "include_next doesn't work" 9442#endif 9443EOF 9444 cat <<EOF > conftestd2/conftest.h 9445#ifndef DEFINED_IN_CONFTESTD1 9446#error "include_next test doesn't work" 9447#endif 9448#define DEFINED_IN_CONFTESTD2 9449EOF 9450 gl_save_CPPFLAGS="$CPPFLAGS" 9451 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1b -Iconftestd2" 9452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9453/* end confdefs.h. */ 9454#include <conftest.h> 9455_ACEOF 9456if ac_fn_c_try_compile "$LINENO"; then : 9457 gl_cv_have_include_next=yes 9458else 9459 CPPFLAGS="$gl_save_CPPFLAGS -Iconftestd1a -Iconftestd2" 9460 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9461/* end confdefs.h. */ 9462#include <conftest.h> 9463_ACEOF 9464if ac_fn_c_try_compile "$LINENO"; then : 9465 gl_cv_have_include_next=buggy 9466else 9467 gl_cv_have_include_next=no 9468fi 9469rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9470 9471fi 9472rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9473 CPPFLAGS="$gl_save_CPPFLAGS" 9474 rm -rf conftestd1a conftestd1b conftestd2 9475 9476fi 9477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_include_next" >&5 9478$as_echo "$gl_cv_have_include_next" >&6; } 9479 PRAGMA_SYSTEM_HEADER= 9480 if test $gl_cv_have_include_next = yes; then 9481 INCLUDE_NEXT=include_next 9482 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next 9483 if test -n "$GCC"; then 9484 PRAGMA_SYSTEM_HEADER='#pragma GCC system_header' 9485 fi 9486 else 9487 if test $gl_cv_have_include_next = buggy; then 9488 INCLUDE_NEXT=include 9489 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include_next 9490 else 9491 INCLUDE_NEXT=include 9492 INCLUDE_NEXT_AS_FIRST_DIRECTIVE=include 9493 fi 9494 fi 9495 9496 9497 9498 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system header files limit the line length" >&5 9499$as_echo_n "checking whether system header files limit the line length... " >&6; } 9500if ${gl_cv_pragma_columns+:} false; then : 9501 $as_echo_n "(cached) " >&6 9502else 9503 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9504/* end confdefs.h. */ 9505 9506#ifdef __TANDEM 9507choke me 9508#endif 9509 9510_ACEOF 9511if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 9512 $EGREP "choke me" >/dev/null 2>&1; then : 9513 gl_cv_pragma_columns=yes 9514else 9515 gl_cv_pragma_columns=no 9516fi 9517rm -f conftest* 9518 9519 9520fi 9521{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pragma_columns" >&5 9522$as_echo "$gl_cv_pragma_columns" >&6; } 9523 if test $gl_cv_pragma_columns = yes; then 9524 PRAGMA_COLUMNS="#pragma COLUMNS 10000" 9525 else 9526 PRAGMA_COLUMNS= 9527 fi 9528 9529 9530 9531 9532 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for complete errno.h" >&5 9533$as_echo_n "checking for complete errno.h... " >&6; } 9534if ${gl_cv_header_errno_h_complete+:} false; then : 9535 $as_echo_n "(cached) " >&6 9536else 9537 9538 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9539/* end confdefs.h. */ 9540 9541#include <errno.h> 9542#if !defined ETXTBSY 9543booboo 9544#endif 9545#if !defined ENOMSG 9546booboo 9547#endif 9548#if !defined EIDRM 9549booboo 9550#endif 9551#if !defined ENOLINK 9552booboo 9553#endif 9554#if !defined EPROTO 9555booboo 9556#endif 9557#if !defined EMULTIHOP 9558booboo 9559#endif 9560#if !defined EBADMSG 9561booboo 9562#endif 9563#if !defined EOVERFLOW 9564booboo 9565#endif 9566#if !defined ENOTSUP 9567booboo 9568#endif 9569#if !defined ENETRESET 9570booboo 9571#endif 9572#if !defined ECONNABORTED 9573booboo 9574#endif 9575#if !defined ESTALE 9576booboo 9577#endif 9578#if !defined EDQUOT 9579booboo 9580#endif 9581#if !defined ECANCELED 9582booboo 9583#endif 9584#if !defined EOWNERDEAD 9585booboo 9586#endif 9587#if !defined ENOTRECOVERABLE 9588booboo 9589#endif 9590#if !defined EILSEQ 9591booboo 9592#endif 9593 9594_ACEOF 9595if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 9596 $EGREP "booboo" >/dev/null 2>&1; then : 9597 gl_cv_header_errno_h_complete=no 9598else 9599 gl_cv_header_errno_h_complete=yes 9600fi 9601rm -f conftest* 9602 9603 9604fi 9605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_complete" >&5 9606$as_echo "$gl_cv_header_errno_h_complete" >&6; } 9607 if test $gl_cv_header_errno_h_complete = yes; then 9608 ERRNO_H='' 9609 else 9610 9611 9612 9613 9614 9615 9616 9617 9618 if test $gl_cv_have_include_next = yes; then 9619 gl_cv_next_errno_h='<'errno.h'>' 9620 else 9621 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <errno.h>" >&5 9622$as_echo_n "checking absolute name of <errno.h>... " >&6; } 9623if ${gl_cv_next_errno_h+:} false; then : 9624 $as_echo_n "(cached) " >&6 9625else 9626 9627 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9628/* end confdefs.h. */ 9629#include <errno.h> 9630 9631_ACEOF 9632 case "$host_os" in 9633 aix*) gl_absname_cpp="$ac_cpp -C" ;; 9634 *) gl_absname_cpp="$ac_cpp" ;; 9635 esac 9636 9637 case "$host_os" in 9638 mingw*) 9639 gl_dirsep_regex='[/\\]' 9640 ;; 9641 *) 9642 gl_dirsep_regex='\/' 9643 ;; 9644 esac 9645 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 9646 9647 gl_header_literal_regex=`echo 'errno.h' \ 9648 | sed -e "$gl_make_literal_regex_sed"` 9649 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 9650 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 9651 s|^/[^/]|//&| 9652 p 9653 q 9654 }' 9655 gl_cv_next_errno_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 9656 sed -n "$gl_absolute_header_sed"`'"' 9657 9658 9659fi 9660{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_errno_h" >&5 9661$as_echo "$gl_cv_next_errno_h" >&6; } 9662 fi 9663 NEXT_ERRNO_H=$gl_cv_next_errno_h 9664 9665 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 9666 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 9667 gl_next_as_first_directive='<'errno.h'>' 9668 else 9669 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 9670 gl_next_as_first_directive=$gl_cv_next_errno_h 9671 fi 9672 NEXT_AS_FIRST_DIRECTIVE_ERRNO_H=$gl_next_as_first_directive 9673 9674 9675 9676 9677 ERRNO_H='errno.h' 9678 fi 9679 9680 if test -n "$ERRNO_H"; then 9681 GL_GENERATE_ERRNO_H_TRUE= 9682 GL_GENERATE_ERRNO_H_FALSE='#' 9683else 9684 GL_GENERATE_ERRNO_H_TRUE='#' 9685 GL_GENERATE_ERRNO_H_FALSE= 9686fi 9687 9688 9689 if test -n "$ERRNO_H"; then 9690 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EMULTIHOP value" >&5 9691$as_echo_n "checking for EMULTIHOP value... " >&6; } 9692if ${gl_cv_header_errno_h_EMULTIHOP+:} false; then : 9693 $as_echo_n "(cached) " >&6 9694else 9695 9696 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9697/* end confdefs.h. */ 9698 9699#include <errno.h> 9700#ifdef EMULTIHOP 9701yes 9702#endif 9703 9704_ACEOF 9705if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 9706 $EGREP "yes" >/dev/null 2>&1; then : 9707 gl_cv_header_errno_h_EMULTIHOP=yes 9708else 9709 gl_cv_header_errno_h_EMULTIHOP=no 9710fi 9711rm -f conftest* 9712 9713 if test $gl_cv_header_errno_h_EMULTIHOP = no; then 9714 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9715/* end confdefs.h. */ 9716 9717#define _XOPEN_SOURCE_EXTENDED 1 9718#include <errno.h> 9719#ifdef EMULTIHOP 9720yes 9721#endif 9722 9723_ACEOF 9724if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 9725 $EGREP "yes" >/dev/null 2>&1; then : 9726 gl_cv_header_errno_h_EMULTIHOP=hidden 9727fi 9728rm -f conftest* 9729 9730 if test $gl_cv_header_errno_h_EMULTIHOP = hidden; then 9731 if ac_fn_c_compute_int "$LINENO" "EMULTIHOP" "gl_cv_header_errno_h_EMULTIHOP" " 9732#define _XOPEN_SOURCE_EXTENDED 1 9733#include <errno.h> 9734/* The following two lines are a workaround against an autoconf-2.52 bug. */ 9735#include <stdio.h> 9736#include <stdlib.h> 9737"; then : 9738 9739fi 9740 9741 fi 9742 fi 9743 9744fi 9745{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EMULTIHOP" >&5 9746$as_echo "$gl_cv_header_errno_h_EMULTIHOP" >&6; } 9747 case $gl_cv_header_errno_h_EMULTIHOP in 9748 yes | no) 9749 EMULTIHOP_HIDDEN=0; EMULTIHOP_VALUE= 9750 ;; 9751 *) 9752 EMULTIHOP_HIDDEN=1; EMULTIHOP_VALUE="$gl_cv_header_errno_h_EMULTIHOP" 9753 ;; 9754 esac 9755 9756 9757 fi 9758 9759 9760 if test -n "$ERRNO_H"; then 9761 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOLINK value" >&5 9762$as_echo_n "checking for ENOLINK value... " >&6; } 9763if ${gl_cv_header_errno_h_ENOLINK+:} false; then : 9764 $as_echo_n "(cached) " >&6 9765else 9766 9767 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9768/* end confdefs.h. */ 9769 9770#include <errno.h> 9771#ifdef ENOLINK 9772yes 9773#endif 9774 9775_ACEOF 9776if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 9777 $EGREP "yes" >/dev/null 2>&1; then : 9778 gl_cv_header_errno_h_ENOLINK=yes 9779else 9780 gl_cv_header_errno_h_ENOLINK=no 9781fi 9782rm -f conftest* 9783 9784 if test $gl_cv_header_errno_h_ENOLINK = no; then 9785 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9786/* end confdefs.h. */ 9787 9788#define _XOPEN_SOURCE_EXTENDED 1 9789#include <errno.h> 9790#ifdef ENOLINK 9791yes 9792#endif 9793 9794_ACEOF 9795if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 9796 $EGREP "yes" >/dev/null 2>&1; then : 9797 gl_cv_header_errno_h_ENOLINK=hidden 9798fi 9799rm -f conftest* 9800 9801 if test $gl_cv_header_errno_h_ENOLINK = hidden; then 9802 if ac_fn_c_compute_int "$LINENO" "ENOLINK" "gl_cv_header_errno_h_ENOLINK" " 9803#define _XOPEN_SOURCE_EXTENDED 1 9804#include <errno.h> 9805/* The following two lines are a workaround against an autoconf-2.52 bug. */ 9806#include <stdio.h> 9807#include <stdlib.h> 9808"; then : 9809 9810fi 9811 9812 fi 9813 fi 9814 9815fi 9816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_ENOLINK" >&5 9817$as_echo "$gl_cv_header_errno_h_ENOLINK" >&6; } 9818 case $gl_cv_header_errno_h_ENOLINK in 9819 yes | no) 9820 ENOLINK_HIDDEN=0; ENOLINK_VALUE= 9821 ;; 9822 *) 9823 ENOLINK_HIDDEN=1; ENOLINK_VALUE="$gl_cv_header_errno_h_ENOLINK" 9824 ;; 9825 esac 9826 9827 9828 fi 9829 9830 9831 if test -n "$ERRNO_H"; then 9832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EOVERFLOW value" >&5 9833$as_echo_n "checking for EOVERFLOW value... " >&6; } 9834if ${gl_cv_header_errno_h_EOVERFLOW+:} false; then : 9835 $as_echo_n "(cached) " >&6 9836else 9837 9838 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9839/* end confdefs.h. */ 9840 9841#include <errno.h> 9842#ifdef EOVERFLOW 9843yes 9844#endif 9845 9846_ACEOF 9847if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 9848 $EGREP "yes" >/dev/null 2>&1; then : 9849 gl_cv_header_errno_h_EOVERFLOW=yes 9850else 9851 gl_cv_header_errno_h_EOVERFLOW=no 9852fi 9853rm -f conftest* 9854 9855 if test $gl_cv_header_errno_h_EOVERFLOW = no; then 9856 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9857/* end confdefs.h. */ 9858 9859#define _XOPEN_SOURCE_EXTENDED 1 9860#include <errno.h> 9861#ifdef EOVERFLOW 9862yes 9863#endif 9864 9865_ACEOF 9866if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 9867 $EGREP "yes" >/dev/null 2>&1; then : 9868 gl_cv_header_errno_h_EOVERFLOW=hidden 9869fi 9870rm -f conftest* 9871 9872 if test $gl_cv_header_errno_h_EOVERFLOW = hidden; then 9873 if ac_fn_c_compute_int "$LINENO" "EOVERFLOW" "gl_cv_header_errno_h_EOVERFLOW" " 9874#define _XOPEN_SOURCE_EXTENDED 1 9875#include <errno.h> 9876/* The following two lines are a workaround against an autoconf-2.52 bug. */ 9877#include <stdio.h> 9878#include <stdlib.h> 9879"; then : 9880 9881fi 9882 9883 fi 9884 fi 9885 9886fi 9887{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_errno_h_EOVERFLOW" >&5 9888$as_echo "$gl_cv_header_errno_h_EOVERFLOW" >&6; } 9889 case $gl_cv_header_errno_h_EOVERFLOW in 9890 yes | no) 9891 EOVERFLOW_HIDDEN=0; EOVERFLOW_VALUE= 9892 ;; 9893 *) 9894 EOVERFLOW_HIDDEN=1; EOVERFLOW_VALUE="$gl_cv_header_errno_h_EOVERFLOW" 9895 ;; 9896 esac 9897 9898 9899 fi 9900 9901 9902ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" 9903if test "x$ac_cv_have_decl_strerror_r" = xyes; then : 9904 ac_have_decl=1 9905else 9906 ac_have_decl=0 9907fi 9908 9909cat >>confdefs.h <<_ACEOF 9910#define HAVE_DECL_STRERROR_R $ac_have_decl 9911_ACEOF 9912 9913for ac_func in strerror_r 9914do : 9915 ac_fn_c_check_func "$LINENO" "strerror_r" "ac_cv_func_strerror_r" 9916if test "x$ac_cv_func_strerror_r" = xyes; then : 9917 cat >>confdefs.h <<_ACEOF 9918#define HAVE_STRERROR_R 1 9919_ACEOF 9920 9921fi 9922done 9923 9924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r returns char *" >&5 9925$as_echo_n "checking whether strerror_r returns char *... " >&6; } 9926if ${ac_cv_func_strerror_r_char_p+:} false; then : 9927 $as_echo_n "(cached) " >&6 9928else 9929 9930 ac_cv_func_strerror_r_char_p=no 9931 if test $ac_cv_have_decl_strerror_r = yes; then 9932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9933/* end confdefs.h. */ 9934$ac_includes_default 9935int 9936main () 9937{ 9938 9939 char buf[100]; 9940 char x = *strerror_r (0, buf, sizeof buf); 9941 char *p = strerror_r (0, buf, sizeof buf); 9942 return !p || x; 9943 9944 ; 9945 return 0; 9946} 9947_ACEOF 9948if ac_fn_c_try_compile "$LINENO"; then : 9949 ac_cv_func_strerror_r_char_p=yes 9950fi 9951rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 9952 else 9953 # strerror_r is not declared. Choose between 9954 # systems that have relatively inaccessible declarations for the 9955 # function. BeOS and DEC UNIX 4.0 fall in this category, but the 9956 # former has a strerror_r that returns char*, while the latter 9957 # has a strerror_r that returns `int'. 9958 # This test should segfault on the DEC system. 9959 if test "$cross_compiling" = yes; then : 9960 : 9961else 9962 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 9963/* end confdefs.h. */ 9964$ac_includes_default 9965 extern char *strerror_r (); 9966int 9967main () 9968{ 9969char buf[100]; 9970 char x = *strerror_r (0, buf, sizeof buf); 9971 return ! isalpha (x); 9972 ; 9973 return 0; 9974} 9975_ACEOF 9976if ac_fn_c_try_run "$LINENO"; then : 9977 ac_cv_func_strerror_r_char_p=yes 9978fi 9979rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 9980 conftest.$ac_objext conftest.beam conftest.$ac_ext 9981fi 9982 9983 fi 9984 9985fi 9986{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strerror_r_char_p" >&5 9987$as_echo "$ac_cv_func_strerror_r_char_p" >&6; } 9988if test $ac_cv_func_strerror_r_char_p = yes; then 9989 9990$as_echo "#define STRERROR_R_CHAR_P 1" >>confdefs.h 9991 9992fi 9993 9994 9995 XGETTEXT_EXTRA_OPTIONS= 9996 9997 9998 9999 10000 10001 ac_fn_c_check_type "$LINENO" "sig_atomic_t" "ac_cv_type_sig_atomic_t" "#include <signal.h> 10002" 10003if test "x$ac_cv_type_sig_atomic_t" = xyes; then : 10004 10005cat >>confdefs.h <<_ACEOF 10006#define HAVE_SIG_ATOMIC_T 1 10007_ACEOF 10008 10009 10010else 10011 10012$as_echo "#define sig_atomic_t int" >>confdefs.h 10013 10014fi 10015 10016 10017 10018 GNULIB_FCNTL=0; 10019 GNULIB_NONBLOCKING=0; 10020 GNULIB_OPEN=0; 10021 GNULIB_OPENAT=0; 10022 HAVE_FCNTL=1; 10023 HAVE_OPENAT=1; 10024 REPLACE_FCNTL=0; 10025 REPLACE_OPEN=0; 10026 REPLACE_OPENAT=0; 10027 10028 10029 10030 10031 10032 10033 10034 10035 10036 10037 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 10038$as_echo_n "checking for working fcntl.h... " >&6; } 10039if ${gl_cv_header_working_fcntl_h+:} false; then : 10040 $as_echo_n "(cached) " >&6 10041else 10042 if test "$cross_compiling" = yes; then : 10043 gl_cv_header_working_fcntl_h=cross-compiling 10044else 10045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10046/* end confdefs.h. */ 10047#include <sys/types.h> 10048 #include <sys/stat.h> 10049 #if HAVE_UNISTD_H 10050 # include <unistd.h> 10051 #else /* on Windows with MSVC */ 10052 # include <io.h> 10053 # include <stdlib.h> 10054 # defined sleep(n) _sleep ((n) * 1000) 10055 #endif 10056 #include <fcntl.h> 10057 #ifndef O_NOATIME 10058 #define O_NOATIME 0 10059 #endif 10060 #ifndef O_NOFOLLOW 10061 #define O_NOFOLLOW 0 10062 #endif 10063 static int const constants[] = 10064 { 10065 O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, 10066 O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY 10067 }; 10068 10069int 10070main () 10071{ 10072 10073 int result = !constants; 10074 #if HAVE_SYMLINK 10075 { 10076 static char const sym[] = "conftest.sym"; 10077 if (symlink ("/dev/null", sym) != 0) 10078 result |= 2; 10079 else 10080 { 10081 int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0); 10082 if (fd >= 0) 10083 { 10084 close (fd); 10085 result |= 4; 10086 } 10087 } 10088 if (unlink (sym) != 0 || symlink (".", sym) != 0) 10089 result |= 2; 10090 else 10091 { 10092 int fd = open (sym, O_RDONLY | O_NOFOLLOW); 10093 if (fd >= 0) 10094 { 10095 close (fd); 10096 result |= 4; 10097 } 10098 } 10099 unlink (sym); 10100 } 10101 #endif 10102 { 10103 static char const file[] = "confdefs.h"; 10104 int fd = open (file, O_RDONLY | O_NOATIME); 10105 if (fd < 0) 10106 result |= 8; 10107 else 10108 { 10109 struct stat st0; 10110 if (fstat (fd, &st0) != 0) 10111 result |= 16; 10112 else 10113 { 10114 char c; 10115 sleep (1); 10116 if (read (fd, &c, 1) != 1) 10117 result |= 24; 10118 else 10119 { 10120 if (close (fd) != 0) 10121 result |= 32; 10122 else 10123 { 10124 struct stat st1; 10125 if (stat (file, &st1) != 0) 10126 result |= 40; 10127 else 10128 if (st0.st_atime != st1.st_atime) 10129 result |= 64; 10130 } 10131 } 10132 } 10133 } 10134 } 10135 return result; 10136 ; 10137 return 0; 10138} 10139_ACEOF 10140if ac_fn_c_try_run "$LINENO"; then : 10141 gl_cv_header_working_fcntl_h=yes 10142else 10143 case $? in #( 10144 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( 10145 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( 10146 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( 10147 *) gl_cv_header_working_fcntl_h='no';; 10148 esac 10149fi 10150rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 10151 conftest.$ac_objext conftest.beam conftest.$ac_ext 10152fi 10153 10154fi 10155{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5 10156$as_echo "$gl_cv_header_working_fcntl_h" >&6; } 10157 10158 case $gl_cv_header_working_fcntl_h in #( 10159 *O_NOATIME* | no | cross-compiling) ac_val=0;; #( 10160 *) ac_val=1;; 10161 esac 10162 10163cat >>confdefs.h <<_ACEOF 10164#define HAVE_WORKING_O_NOATIME $ac_val 10165_ACEOF 10166 10167 10168 case $gl_cv_header_working_fcntl_h in #( 10169 *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( 10170 *) ac_val=1;; 10171 esac 10172 10173cat >>confdefs.h <<_ACEOF 10174#define HAVE_WORKING_O_NOFOLLOW $ac_val 10175_ACEOF 10176 10177 10178ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" 10179if test "x$ac_cv_type_pid_t" = xyes; then : 10180 10181else 10182 10183cat >>confdefs.h <<_ACEOF 10184#define pid_t int 10185_ACEOF 10186 10187fi 10188 10189ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" 10190if test "x$ac_cv_type_mode_t" = xyes; then : 10191 10192else 10193 10194cat >>confdefs.h <<_ACEOF 10195#define mode_t int 10196_ACEOF 10197 10198fi 10199 10200 10201 GNULIB_DPRINTF=0; 10202 GNULIB_FCLOSE=0; 10203 GNULIB_FDOPEN=0; 10204 GNULIB_FFLUSH=0; 10205 GNULIB_FGETC=0; 10206 GNULIB_FGETS=0; 10207 GNULIB_FOPEN=0; 10208 GNULIB_FPRINTF=0; 10209 GNULIB_FPRINTF_POSIX=0; 10210 GNULIB_FPURGE=0; 10211 GNULIB_FPUTC=0; 10212 GNULIB_FPUTS=0; 10213 GNULIB_FREAD=0; 10214 GNULIB_FREOPEN=0; 10215 GNULIB_FSCANF=0; 10216 GNULIB_FSEEK=0; 10217 GNULIB_FSEEKO=0; 10218 GNULIB_FTELL=0; 10219 GNULIB_FTELLO=0; 10220 GNULIB_FWRITE=0; 10221 GNULIB_GETC=0; 10222 GNULIB_GETCHAR=0; 10223 GNULIB_GETDELIM=0; 10224 GNULIB_GETLINE=0; 10225 GNULIB_OBSTACK_PRINTF=0; 10226 GNULIB_OBSTACK_PRINTF_POSIX=0; 10227 GNULIB_PCLOSE=0; 10228 GNULIB_PERROR=0; 10229 GNULIB_POPEN=0; 10230 GNULIB_PRINTF=0; 10231 GNULIB_PRINTF_POSIX=0; 10232 GNULIB_PUTC=0; 10233 GNULIB_PUTCHAR=0; 10234 GNULIB_PUTS=0; 10235 GNULIB_REMOVE=0; 10236 GNULIB_RENAME=0; 10237 GNULIB_RENAMEAT=0; 10238 GNULIB_SCANF=0; 10239 GNULIB_SNPRINTF=0; 10240 GNULIB_SPRINTF_POSIX=0; 10241 GNULIB_STDIO_H_NONBLOCKING=0; 10242 GNULIB_STDIO_H_SIGPIPE=0; 10243 GNULIB_TMPFILE=0; 10244 GNULIB_VASPRINTF=0; 10245 GNULIB_VFSCANF=0; 10246 GNULIB_VSCANF=0; 10247 GNULIB_VDPRINTF=0; 10248 GNULIB_VFPRINTF=0; 10249 GNULIB_VFPRINTF_POSIX=0; 10250 GNULIB_VPRINTF=0; 10251 GNULIB_VPRINTF_POSIX=0; 10252 GNULIB_VSNPRINTF=0; 10253 GNULIB_VSPRINTF_POSIX=0; 10254 HAVE_DECL_FPURGE=1; 10255 HAVE_DECL_FSEEKO=1; 10256 HAVE_DECL_FTELLO=1; 10257 HAVE_DECL_GETDELIM=1; 10258 HAVE_DECL_GETLINE=1; 10259 HAVE_DECL_OBSTACK_PRINTF=1; 10260 HAVE_DECL_SNPRINTF=1; 10261 HAVE_DECL_VSNPRINTF=1; 10262 HAVE_DPRINTF=1; 10263 HAVE_FSEEKO=1; 10264 HAVE_FTELLO=1; 10265 HAVE_PCLOSE=1; 10266 HAVE_POPEN=1; 10267 HAVE_RENAMEAT=1; 10268 HAVE_VASPRINTF=1; 10269 HAVE_VDPRINTF=1; 10270 REPLACE_DPRINTF=0; 10271 REPLACE_FCLOSE=0; 10272 REPLACE_FDOPEN=0; 10273 REPLACE_FFLUSH=0; 10274 REPLACE_FOPEN=0; 10275 REPLACE_FPRINTF=0; 10276 REPLACE_FPURGE=0; 10277 REPLACE_FREOPEN=0; 10278 REPLACE_FSEEK=0; 10279 REPLACE_FSEEKO=0; 10280 REPLACE_FTELL=0; 10281 REPLACE_FTELLO=0; 10282 REPLACE_GETDELIM=0; 10283 REPLACE_GETLINE=0; 10284 REPLACE_OBSTACK_PRINTF=0; 10285 REPLACE_PERROR=0; 10286 REPLACE_POPEN=0; 10287 REPLACE_PRINTF=0; 10288 REPLACE_REMOVE=0; 10289 REPLACE_RENAME=0; 10290 REPLACE_RENAMEAT=0; 10291 REPLACE_SNPRINTF=0; 10292 REPLACE_SPRINTF=0; 10293 REPLACE_STDIO_READ_FUNCS=0; 10294 REPLACE_STDIO_WRITE_FUNCS=0; 10295 REPLACE_TMPFILE=0; 10296 REPLACE_VASPRINTF=0; 10297 REPLACE_VDPRINTF=0; 10298 REPLACE_VFPRINTF=0; 10299 REPLACE_VPRINTF=0; 10300 REPLACE_VSNPRINTF=0; 10301 REPLACE_VSPRINTF=0; 10302 10303 10304 10305 10306 10307 10308 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5 10309$as_echo_n "checking for stdint.h... " >&6; } 10310if ${gl_cv_header_stdint_h+:} false; then : 10311 $as_echo_n "(cached) " >&6 10312else 10313 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10314/* end confdefs.h. */ 10315#include <sys/types.h> 10316 #include <stdint.h> 10317int 10318main () 10319{ 10320uintmax_t i = (uintmax_t) -1; return !i; 10321 ; 10322 return 0; 10323} 10324_ACEOF 10325if ac_fn_c_try_compile "$LINENO"; then : 10326 gl_cv_header_stdint_h=yes 10327else 10328 gl_cv_header_stdint_h=no 10329fi 10330rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10331fi 10332{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5 10333$as_echo "$gl_cv_header_stdint_h" >&6; } 10334 if test $gl_cv_header_stdint_h = yes; then 10335 10336cat >>confdefs.h <<_ACEOF 10337#define HAVE_STDINT_H_WITH_UINTMAX 1 10338_ACEOF 10339 10340 fi 10341 10342 10343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 10344$as_echo_n "checking for inttypes.h... " >&6; } 10345if ${gl_cv_header_inttypes_h+:} false; then : 10346 $as_echo_n "(cached) " >&6 10347else 10348 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10349/* end confdefs.h. */ 10350 10351#include <sys/types.h> 10352#include <inttypes.h> 10353 10354int 10355main () 10356{ 10357uintmax_t i = (uintmax_t) -1; return !i; 10358 ; 10359 return 0; 10360} 10361_ACEOF 10362if ac_fn_c_try_compile "$LINENO"; then : 10363 gl_cv_header_inttypes_h=yes 10364else 10365 gl_cv_header_inttypes_h=no 10366fi 10367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10368fi 10369{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5 10370$as_echo "$gl_cv_header_inttypes_h" >&6; } 10371 if test $gl_cv_header_inttypes_h = yes; then 10372 10373cat >>confdefs.h <<_ACEOF 10374#define HAVE_INTTYPES_H_WITH_UINTMAX 1 10375_ACEOF 10376 10377 fi 10378 10379 10380 10381 10382 10383 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports size specifiers as in C99" >&5 10384$as_echo_n "checking whether printf supports size specifiers as in C99... " >&6; } 10385if ${gl_cv_func_printf_sizes_c99+:} false; then : 10386 $as_echo_n "(cached) " >&6 10387else 10388 10389 if test "$cross_compiling" = yes; then : 10390 10391 case "$host_os" in 10392 # Guess yes on glibc systems. 10393 *-gnu*) gl_cv_func_printf_sizes_c99="guessing yes";; 10394 # Guess yes on FreeBSD >= 5. 10395 freebsd[1-4]*) gl_cv_func_printf_sizes_c99="guessing no";; 10396 freebsd* | kfreebsd*) gl_cv_func_printf_sizes_c99="guessing yes";; 10397 # Guess yes on Mac OS X >= 10.3. 10398 darwin[1-6].*) gl_cv_func_printf_sizes_c99="guessing no";; 10399 darwin*) gl_cv_func_printf_sizes_c99="guessing yes";; 10400 # Guess yes on OpenBSD >= 3.9. 10401 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) 10402 gl_cv_func_printf_sizes_c99="guessing no";; 10403 openbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; 10404 # Guess yes on Solaris >= 2.10. 10405 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; 10406 solaris*) gl_cv_func_printf_sizes_c99="guessing no";; 10407 # Guess yes on NetBSD >= 3. 10408 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) 10409 gl_cv_func_printf_sizes_c99="guessing no";; 10410 netbsd*) gl_cv_func_printf_sizes_c99="guessing yes";; 10411 # If we don't know, assume the worst. 10412 *) gl_cv_func_printf_sizes_c99="guessing no";; 10413 esac 10414 10415else 10416 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10417/* end confdefs.h. */ 10418 10419#include <stddef.h> 10420#include <stdio.h> 10421#include <string.h> 10422#include <sys/types.h> 10423#if HAVE_STDINT_H_WITH_UINTMAX 10424# include <stdint.h> 10425#endif 10426#if HAVE_INTTYPES_H_WITH_UINTMAX 10427# include <inttypes.h> 10428#endif 10429static char buf[100]; 10430int main () 10431{ 10432 int result = 0; 10433#if HAVE_STDINT_H_WITH_UINTMAX || HAVE_INTTYPES_H_WITH_UINTMAX 10434 buf[0] = '\0'; 10435 if (sprintf (buf, "%ju %d", (uintmax_t) 12345671, 33, 44, 55) < 0 10436 || strcmp (buf, "12345671 33") != 0) 10437 result |= 1; 10438#endif 10439 buf[0] = '\0'; 10440 if (sprintf (buf, "%zu %d", (size_t) 12345672, 33, 44, 55) < 0 10441 || strcmp (buf, "12345672 33") != 0) 10442 result |= 2; 10443 buf[0] = '\0'; 10444 if (sprintf (buf, "%tu %d", (ptrdiff_t) 12345673, 33, 44, 55) < 0 10445 || strcmp (buf, "12345673 33") != 0) 10446 result |= 4; 10447 buf[0] = '\0'; 10448 if (sprintf (buf, "%Lg %d", (long double) 1.5, 33, 44, 55) < 0 10449 || strcmp (buf, "1.5 33") != 0) 10450 result |= 8; 10451 return result; 10452} 10453_ACEOF 10454if ac_fn_c_try_run "$LINENO"; then : 10455 gl_cv_func_printf_sizes_c99=yes 10456else 10457 gl_cv_func_printf_sizes_c99=no 10458fi 10459rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 10460 conftest.$ac_objext conftest.beam conftest.$ac_ext 10461fi 10462 10463 10464fi 10465{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_sizes_c99" >&5 10466$as_echo "$gl_cv_func_printf_sizes_c99" >&6; } 10467 10468 10469 10470 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports 'long double' arguments" >&5 10471$as_echo_n "checking whether printf supports 'long double' arguments... " >&6; } 10472if ${gl_cv_func_printf_long_double+:} false; then : 10473 $as_echo_n "(cached) " >&6 10474else 10475 10476 if test "$cross_compiling" = yes; then : 10477 10478 case "$host_os" in 10479 beos*) gl_cv_func_printf_long_double="guessing no";; 10480 mingw* | pw*) gl_cv_func_printf_long_double="guessing no";; 10481 *) gl_cv_func_printf_long_double="guessing yes";; 10482 esac 10483 10484else 10485 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10486/* end confdefs.h. */ 10487 10488#include <stdio.h> 10489#include <string.h> 10490static char buf[10000]; 10491int main () 10492{ 10493 int result = 0; 10494 buf[0] = '\0'; 10495 if (sprintf (buf, "%Lf %d", 1.75L, 33, 44, 55) < 0 10496 || strcmp (buf, "1.750000 33") != 0) 10497 result |= 1; 10498 buf[0] = '\0'; 10499 if (sprintf (buf, "%Le %d", 1.75L, 33, 44, 55) < 0 10500 || strcmp (buf, "1.750000e+00 33") != 0) 10501 result |= 2; 10502 buf[0] = '\0'; 10503 if (sprintf (buf, "%Lg %d", 1.75L, 33, 44, 55) < 0 10504 || strcmp (buf, "1.75 33") != 0) 10505 result |= 4; 10506 return result; 10507} 10508_ACEOF 10509if ac_fn_c_try_run "$LINENO"; then : 10510 gl_cv_func_printf_long_double=yes 10511else 10512 gl_cv_func_printf_long_double=no 10513fi 10514rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 10515 conftest.$ac_objext conftest.beam conftest.$ac_ext 10516fi 10517 10518 10519fi 10520{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_long_double" >&5 10521$as_echo "$gl_cv_func_printf_long_double" >&6; } 10522 10523 10524 10525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'double' arguments" >&5 10526$as_echo_n "checking whether printf supports infinite 'double' arguments... " >&6; } 10527if ${gl_cv_func_printf_infinite+:} false; then : 10528 $as_echo_n "(cached) " >&6 10529else 10530 10531 if test "$cross_compiling" = yes; then : 10532 10533 case "$host_os" in 10534 # Guess yes on glibc systems. 10535 *-gnu*) gl_cv_func_printf_infinite="guessing yes";; 10536 # Guess yes on FreeBSD >= 6. 10537 freebsd[1-5]*) gl_cv_func_printf_infinite="guessing no";; 10538 freebsd* | kfreebsd*) gl_cv_func_printf_infinite="guessing yes";; 10539 # Guess yes on Mac OS X >= 10.3. 10540 darwin[1-6].*) gl_cv_func_printf_infinite="guessing no";; 10541 darwin*) gl_cv_func_printf_infinite="guessing yes";; 10542 # Guess yes on HP-UX >= 11. 10543 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite="guessing no";; 10544 hpux*) gl_cv_func_printf_infinite="guessing yes";; 10545 # Guess yes on NetBSD >= 3. 10546 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) 10547 gl_cv_func_printf_infinite="guessing no";; 10548 netbsd*) gl_cv_func_printf_infinite="guessing yes";; 10549 # Guess yes on BeOS. 10550 beos*) gl_cv_func_printf_infinite="guessing yes";; 10551 # If we don't know, assume the worst. 10552 *) gl_cv_func_printf_infinite="guessing no";; 10553 esac 10554 10555else 10556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10557/* end confdefs.h. */ 10558 10559#include <stdio.h> 10560#include <string.h> 10561static int 10562strisnan (const char *string, size_t start_index, size_t end_index) 10563{ 10564 if (start_index < end_index) 10565 { 10566 if (string[start_index] == '-') 10567 start_index++; 10568 if (start_index + 3 <= end_index 10569 && memcmp (string + start_index, "nan", 3) == 0) 10570 { 10571 start_index += 3; 10572 if (start_index == end_index 10573 || (string[start_index] == '(' && string[end_index - 1] == ')')) 10574 return 1; 10575 } 10576 } 10577 return 0; 10578} 10579static int 10580have_minus_zero () 10581{ 10582 static double plus_zero = 0.0; 10583 double minus_zero = - plus_zero; 10584 return memcmp (&plus_zero, &minus_zero, sizeof (double)) != 0; 10585} 10586static char buf[10000]; 10587static double zero = 0.0; 10588int main () 10589{ 10590 int result = 0; 10591 if (sprintf (buf, "%f", 1.0 / zero) < 0 10592 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) 10593 result |= 1; 10594 if (sprintf (buf, "%f", -1.0 / zero) < 0 10595 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) 10596 result |= 1; 10597 if (sprintf (buf, "%f", zero / zero) < 0 10598 || !strisnan (buf, 0, strlen (buf))) 10599 result |= 2; 10600 if (sprintf (buf, "%e", 1.0 / zero) < 0 10601 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) 10602 result |= 4; 10603 if (sprintf (buf, "%e", -1.0 / zero) < 0 10604 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) 10605 result |= 4; 10606 if (sprintf (buf, "%e", zero / zero) < 0 10607 || !strisnan (buf, 0, strlen (buf))) 10608 result |= 8; 10609 if (sprintf (buf, "%g", 1.0 / zero) < 0 10610 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) 10611 result |= 16; 10612 if (sprintf (buf, "%g", -1.0 / zero) < 0 10613 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) 10614 result |= 16; 10615 if (sprintf (buf, "%g", zero / zero) < 0 10616 || !strisnan (buf, 0, strlen (buf))) 10617 result |= 32; 10618 /* This test fails on HP-UX 10.20. */ 10619 if (have_minus_zero ()) 10620 if (sprintf (buf, "%g", - zero) < 0 10621 || strcmp (buf, "-0") != 0) 10622 result |= 64; 10623 return result; 10624} 10625_ACEOF 10626if ac_fn_c_try_run "$LINENO"; then : 10627 gl_cv_func_printf_infinite=yes 10628else 10629 gl_cv_func_printf_infinite=no 10630fi 10631rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 10632 conftest.$ac_objext conftest.beam conftest.$ac_ext 10633fi 10634 10635 10636fi 10637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite" >&5 10638$as_echo "$gl_cv_func_printf_infinite" >&6; } 10639 10640 10641 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 10642$as_echo_n "checking whether byte ordering is bigendian... " >&6; } 10643if ${ac_cv_c_bigendian+:} false; then : 10644 $as_echo_n "(cached) " >&6 10645else 10646 ac_cv_c_bigendian=unknown 10647 # See if we're dealing with a universal compiler. 10648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10649/* end confdefs.h. */ 10650#ifndef __APPLE_CC__ 10651 not a universal capable compiler 10652 #endif 10653 typedef int dummy; 10654 10655_ACEOF 10656if ac_fn_c_try_compile "$LINENO"; then : 10657 10658 # Check for potential -arch flags. It is not universal unless 10659 # there are at least two -arch flags with different values. 10660 ac_arch= 10661 ac_prev= 10662 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do 10663 if test -n "$ac_prev"; then 10664 case $ac_word in 10665 i?86 | x86_64 | ppc | ppc64) 10666 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then 10667 ac_arch=$ac_word 10668 else 10669 ac_cv_c_bigendian=universal 10670 break 10671 fi 10672 ;; 10673 esac 10674 ac_prev= 10675 elif test "x$ac_word" = "x-arch"; then 10676 ac_prev=arch 10677 fi 10678 done 10679fi 10680rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10681 if test $ac_cv_c_bigendian = unknown; then 10682 # See if sys/param.h defines the BYTE_ORDER macro. 10683 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10684/* end confdefs.h. */ 10685#include <sys/types.h> 10686 #include <sys/param.h> 10687 10688int 10689main () 10690{ 10691#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ 10692 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ 10693 && LITTLE_ENDIAN) 10694 bogus endian macros 10695 #endif 10696 10697 ; 10698 return 0; 10699} 10700_ACEOF 10701if ac_fn_c_try_compile "$LINENO"; then : 10702 # It does; now see whether it defined to BIG_ENDIAN or not. 10703 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10704/* end confdefs.h. */ 10705#include <sys/types.h> 10706 #include <sys/param.h> 10707 10708int 10709main () 10710{ 10711#if BYTE_ORDER != BIG_ENDIAN 10712 not big endian 10713 #endif 10714 10715 ; 10716 return 0; 10717} 10718_ACEOF 10719if ac_fn_c_try_compile "$LINENO"; then : 10720 ac_cv_c_bigendian=yes 10721else 10722 ac_cv_c_bigendian=no 10723fi 10724rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10725fi 10726rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10727 fi 10728 if test $ac_cv_c_bigendian = unknown; then 10729 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). 10730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10731/* end confdefs.h. */ 10732#include <limits.h> 10733 10734int 10735main () 10736{ 10737#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) 10738 bogus endian macros 10739 #endif 10740 10741 ; 10742 return 0; 10743} 10744_ACEOF 10745if ac_fn_c_try_compile "$LINENO"; then : 10746 # It does; now see whether it defined to _BIG_ENDIAN or not. 10747 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10748/* end confdefs.h. */ 10749#include <limits.h> 10750 10751int 10752main () 10753{ 10754#ifndef _BIG_ENDIAN 10755 not big endian 10756 #endif 10757 10758 ; 10759 return 0; 10760} 10761_ACEOF 10762if ac_fn_c_try_compile "$LINENO"; then : 10763 ac_cv_c_bigendian=yes 10764else 10765 ac_cv_c_bigendian=no 10766fi 10767rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10768fi 10769rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10770 fi 10771 if test $ac_cv_c_bigendian = unknown; then 10772 # Compile a test program. 10773 if test "$cross_compiling" = yes; then : 10774 # Try to guess by grepping values from an object file. 10775 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10776/* end confdefs.h. */ 10777short int ascii_mm[] = 10778 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; 10779 short int ascii_ii[] = 10780 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; 10781 int use_ascii (int i) { 10782 return ascii_mm[i] + ascii_ii[i]; 10783 } 10784 short int ebcdic_ii[] = 10785 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; 10786 short int ebcdic_mm[] = 10787 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; 10788 int use_ebcdic (int i) { 10789 return ebcdic_mm[i] + ebcdic_ii[i]; 10790 } 10791 extern int foo; 10792 10793int 10794main () 10795{ 10796return use_ascii (foo) == use_ebcdic (foo); 10797 ; 10798 return 0; 10799} 10800_ACEOF 10801if ac_fn_c_try_compile "$LINENO"; then : 10802 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then 10803 ac_cv_c_bigendian=yes 10804 fi 10805 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then 10806 if test "$ac_cv_c_bigendian" = unknown; then 10807 ac_cv_c_bigendian=no 10808 else 10809 # finding both strings is unlikely to happen, but who knows? 10810 ac_cv_c_bigendian=unknown 10811 fi 10812 fi 10813fi 10814rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10815else 10816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10817/* end confdefs.h. */ 10818$ac_includes_default 10819int 10820main () 10821{ 10822 10823 /* Are we little or big endian? From Harbison&Steele. */ 10824 union 10825 { 10826 long int l; 10827 char c[sizeof (long int)]; 10828 } u; 10829 u.l = 1; 10830 return u.c[sizeof (long int) - 1] == 1; 10831 10832 ; 10833 return 0; 10834} 10835_ACEOF 10836if ac_fn_c_try_run "$LINENO"; then : 10837 ac_cv_c_bigendian=no 10838else 10839 ac_cv_c_bigendian=yes 10840fi 10841rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 10842 conftest.$ac_objext conftest.beam conftest.$ac_ext 10843fi 10844 10845 fi 10846fi 10847{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 10848$as_echo "$ac_cv_c_bigendian" >&6; } 10849 case $ac_cv_c_bigendian in #( 10850 yes) 10851 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h 10852;; #( 10853 no) 10854 ;; #( 10855 universal) 10856 10857$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h 10858 10859 ;; #( 10860 *) 10861 as_fn_error $? "unknown endianness 10862 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; 10863 esac 10864 10865 10866 10867 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether long double and double are the same" >&5 10868$as_echo_n "checking whether long double and double are the same... " >&6; } 10869if ${gl_cv_long_double_equals_double+:} false; then : 10870 $as_echo_n "(cached) " >&6 10871else 10872 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10873/* end confdefs.h. */ 10874#include <float.h> 10875int 10876main () 10877{ 10878typedef int check[sizeof (long double) == sizeof (double) 10879 && LDBL_MANT_DIG == DBL_MANT_DIG 10880 && LDBL_MAX_EXP == DBL_MAX_EXP 10881 && LDBL_MIN_EXP == DBL_MIN_EXP 10882 ? 1 : -1]; 10883 10884 ; 10885 return 0; 10886} 10887_ACEOF 10888if ac_fn_c_try_compile "$LINENO"; then : 10889 gl_cv_long_double_equals_double=yes 10890else 10891 gl_cv_long_double_equals_double=no 10892fi 10893rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 10894 10895fi 10896{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_long_double_equals_double" >&5 10897$as_echo "$gl_cv_long_double_equals_double" >&6; } 10898 if test $gl_cv_long_double_equals_double = yes; then 10899 10900$as_echo "#define HAVE_SAME_LONG_DOUBLE_AS_DOUBLE 1" >>confdefs.h 10901 10902 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=1 10903 else 10904 HAVE_SAME_LONG_DOUBLE_AS_DOUBLE=0 10905 fi 10906 10907 10908 10909 10910 10911 10912 10913 if test -n "$gl_printf_safe"; then 10914 10915$as_echo "#define CHECK_PRINTF_SAFE 1" >>confdefs.h 10916 10917 fi 10918 case "$gl_cv_func_printf_long_double" in 10919 *yes) 10920 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports infinite 'long double' arguments" >&5 10921$as_echo_n "checking whether printf supports infinite 'long double' arguments... " >&6; } 10922if ${gl_cv_func_printf_infinite_long_double+:} false; then : 10923 $as_echo_n "(cached) " >&6 10924else 10925 10926 if test "$cross_compiling" = yes; then : 10927 10928 case "$host_cpu" in 10929 # Guess no on ia64, x86_64, i386. 10930 ia64 | x86_64 | i*86) gl_cv_func_printf_infinite_long_double="guessing no";; 10931 *) 10932 case "$host_os" in 10933 # Guess yes on glibc systems. 10934 *-gnu*) gl_cv_func_printf_infinite_long_double="guessing yes";; 10935 # Guess yes on FreeBSD >= 6. 10936 freebsd[1-5]*) gl_cv_func_printf_infinite_long_double="guessing no";; 10937 freebsd* | kfreebsd*) gl_cv_func_printf_infinite_long_double="guessing yes";; 10938 # Guess yes on HP-UX >= 11. 10939 hpux[7-9]* | hpux10*) gl_cv_func_printf_infinite_long_double="guessing no";; 10940 hpux*) gl_cv_func_printf_infinite_long_double="guessing yes";; 10941 # If we don't know, assume the worst. 10942 *) gl_cv_func_printf_infinite_long_double="guessing no";; 10943 esac 10944 ;; 10945 esac 10946 10947else 10948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 10949/* end confdefs.h. */ 10950 10951 10952#include <stdlib.h> 10953#if defined __MACH__ && defined __APPLE__ 10954/* Avoid a crash on Mac OS X. */ 10955#include <mach/mach.h> 10956#include <mach/mach_error.h> 10957#include <mach/thread_status.h> 10958#include <mach/exception.h> 10959#include <mach/task.h> 10960#include <pthread.h> 10961/* The exception port on which our thread listens. */ 10962static mach_port_t our_exception_port; 10963/* The main function of the thread listening for exceptions of type 10964 EXC_BAD_ACCESS. */ 10965static void * 10966mach_exception_thread (void *arg) 10967{ 10968 /* Buffer for a message to be received. */ 10969 struct { 10970 mach_msg_header_t head; 10971 mach_msg_body_t msgh_body; 10972 char data[1024]; 10973 } msg; 10974 mach_msg_return_t retval; 10975 /* Wait for a message on the exception port. */ 10976 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), 10977 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); 10978 if (retval != MACH_MSG_SUCCESS) 10979 abort (); 10980 exit (1); 10981} 10982static void 10983nocrash_init (void) 10984{ 10985 mach_port_t self = mach_task_self (); 10986 /* Allocate a port on which the thread shall listen for exceptions. */ 10987 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) 10988 == KERN_SUCCESS) { 10989 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ 10990 if (mach_port_insert_right (self, our_exception_port, our_exception_port, 10991 MACH_MSG_TYPE_MAKE_SEND) 10992 == KERN_SUCCESS) { 10993 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting 10994 for us. */ 10995 exception_mask_t mask = EXC_MASK_BAD_ACCESS; 10996 /* Create the thread listening on the exception port. */ 10997 pthread_attr_t attr; 10998 pthread_t thread; 10999 if (pthread_attr_init (&attr) == 0 11000 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 11001 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { 11002 pthread_attr_destroy (&attr); 11003 /* Replace the exception port info for these exceptions with our own. 11004 Note that we replace the exception port for the entire task, not only 11005 for a particular thread. This has the effect that when our exception 11006 port gets the message, the thread specific exception port has already 11007 been asked, and we don't need to bother about it. 11008 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ 11009 task_set_exception_ports (self, mask, our_exception_port, 11010 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); 11011 } 11012 } 11013 } 11014} 11015#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ 11016/* Avoid a crash on native Windows. */ 11017#define WIN32_LEAN_AND_MEAN 11018#include <windows.h> 11019#include <winerror.h> 11020static LONG WINAPI 11021exception_filter (EXCEPTION_POINTERS *ExceptionInfo) 11022{ 11023 switch (ExceptionInfo->ExceptionRecord->ExceptionCode) 11024 { 11025 case EXCEPTION_ACCESS_VIOLATION: 11026 case EXCEPTION_IN_PAGE_ERROR: 11027 case EXCEPTION_STACK_OVERFLOW: 11028 case EXCEPTION_GUARD_PAGE: 11029 case EXCEPTION_PRIV_INSTRUCTION: 11030 case EXCEPTION_ILLEGAL_INSTRUCTION: 11031 case EXCEPTION_DATATYPE_MISALIGNMENT: 11032 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: 11033 case EXCEPTION_NONCONTINUABLE_EXCEPTION: 11034 exit (1); 11035 } 11036 return EXCEPTION_CONTINUE_SEARCH; 11037} 11038static void 11039nocrash_init (void) 11040{ 11041 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); 11042} 11043#else 11044/* Avoid a crash on POSIX systems. */ 11045#include <signal.h> 11046/* A POSIX signal handler. */ 11047static void 11048exception_handler (int sig) 11049{ 11050 exit (1); 11051} 11052static void 11053nocrash_init (void) 11054{ 11055#ifdef SIGSEGV 11056 signal (SIGSEGV, exception_handler); 11057#endif 11058#ifdef SIGBUS 11059 signal (SIGBUS, exception_handler); 11060#endif 11061} 11062#endif 11063 11064#include <float.h> 11065#include <stdio.h> 11066#include <string.h> 11067static int 11068strisnan (const char *string, size_t start_index, size_t end_index) 11069{ 11070 if (start_index < end_index) 11071 { 11072 if (string[start_index] == '-') 11073 start_index++; 11074 if (start_index + 3 <= end_index 11075 && memcmp (string + start_index, "nan", 3) == 0) 11076 { 11077 start_index += 3; 11078 if (start_index == end_index 11079 || (string[start_index] == '(' && string[end_index - 1] == ')')) 11080 return 1; 11081 } 11082 } 11083 return 0; 11084} 11085static char buf[10000]; 11086static long double zeroL = 0.0L; 11087int main () 11088{ 11089 int result = 0; 11090 nocrash_init(); 11091 if (sprintf (buf, "%Lf", 1.0L / zeroL) < 0 11092 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) 11093 result |= 1; 11094 if (sprintf (buf, "%Lf", -1.0L / zeroL) < 0 11095 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) 11096 result |= 1; 11097 if (sprintf (buf, "%Lf", zeroL / zeroL) < 0 11098 || !strisnan (buf, 0, strlen (buf))) 11099 result |= 1; 11100 if (sprintf (buf, "%Le", 1.0L / zeroL) < 0 11101 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) 11102 result |= 1; 11103 if (sprintf (buf, "%Le", -1.0L / zeroL) < 0 11104 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) 11105 result |= 1; 11106 if (sprintf (buf, "%Le", zeroL / zeroL) < 0 11107 || !strisnan (buf, 0, strlen (buf))) 11108 result |= 1; 11109 if (sprintf (buf, "%Lg", 1.0L / zeroL) < 0 11110 || (strcmp (buf, "inf") != 0 && strcmp (buf, "infinity") != 0)) 11111 result |= 1; 11112 if (sprintf (buf, "%Lg", -1.0L / zeroL) < 0 11113 || (strcmp (buf, "-inf") != 0 && strcmp (buf, "-infinity") != 0)) 11114 result |= 1; 11115 if (sprintf (buf, "%Lg", zeroL / zeroL) < 0 11116 || !strisnan (buf, 0, strlen (buf))) 11117 result |= 1; 11118#if CHECK_PRINTF_SAFE && ((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 11119/* Representation of an 80-bit 'long double' as an initializer for a sequence 11120 of 'unsigned int' words. */ 11121# ifdef WORDS_BIGENDIAN 11122# define LDBL80_WORDS(exponent,manthi,mantlo) \ 11123 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ 11124 ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ 11125 (unsigned int) (mantlo) << 16 \ 11126 } 11127# else 11128# define LDBL80_WORDS(exponent,manthi,mantlo) \ 11129 { mantlo, manthi, exponent } 11130# endif 11131 { /* Quiet NaN. */ 11132 static union { unsigned int word[4]; long double value; } x = 11133 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; 11134 if (sprintf (buf, "%Lf", x.value) < 0 11135 || !strisnan (buf, 0, strlen (buf))) 11136 result |= 2; 11137 if (sprintf (buf, "%Le", x.value) < 0 11138 || !strisnan (buf, 0, strlen (buf))) 11139 result |= 2; 11140 if (sprintf (buf, "%Lg", x.value) < 0 11141 || !strisnan (buf, 0, strlen (buf))) 11142 result |= 2; 11143 } 11144 { 11145 /* Signalling NaN. */ 11146 static union { unsigned int word[4]; long double value; } x = 11147 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; 11148 if (sprintf (buf, "%Lf", x.value) < 0 11149 || !strisnan (buf, 0, strlen (buf))) 11150 result |= 2; 11151 if (sprintf (buf, "%Le", x.value) < 0 11152 || !strisnan (buf, 0, strlen (buf))) 11153 result |= 2; 11154 if (sprintf (buf, "%Lg", x.value) < 0 11155 || !strisnan (buf, 0, strlen (buf))) 11156 result |= 2; 11157 } 11158 { /* Pseudo-NaN. */ 11159 static union { unsigned int word[4]; long double value; } x = 11160 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; 11161 if (sprintf (buf, "%Lf", x.value) < 0 11162 || !strisnan (buf, 0, strlen (buf))) 11163 result |= 4; 11164 if (sprintf (buf, "%Le", x.value) < 0 11165 || !strisnan (buf, 0, strlen (buf))) 11166 result |= 4; 11167 if (sprintf (buf, "%Lg", x.value) < 0 11168 || !strisnan (buf, 0, strlen (buf))) 11169 result |= 4; 11170 } 11171 { /* Pseudo-Infinity. */ 11172 static union { unsigned int word[4]; long double value; } x = 11173 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; 11174 if (sprintf (buf, "%Lf", x.value) < 0 11175 || !strisnan (buf, 0, strlen (buf))) 11176 result |= 8; 11177 if (sprintf (buf, "%Le", x.value) < 0 11178 || !strisnan (buf, 0, strlen (buf))) 11179 result |= 8; 11180 if (sprintf (buf, "%Lg", x.value) < 0 11181 || !strisnan (buf, 0, strlen (buf))) 11182 result |= 8; 11183 } 11184 { /* Pseudo-Zero. */ 11185 static union { unsigned int word[4]; long double value; } x = 11186 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; 11187 if (sprintf (buf, "%Lf", x.value) < 0 11188 || !strisnan (buf, 0, strlen (buf))) 11189 result |= 16; 11190 if (sprintf (buf, "%Le", x.value) < 0 11191 || !strisnan (buf, 0, strlen (buf))) 11192 result |= 16; 11193 if (sprintf (buf, "%Lg", x.value) < 0 11194 || !strisnan (buf, 0, strlen (buf))) 11195 result |= 16; 11196 } 11197 { /* Unnormalized number. */ 11198 static union { unsigned int word[4]; long double value; } x = 11199 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; 11200 if (sprintf (buf, "%Lf", x.value) < 0 11201 || !strisnan (buf, 0, strlen (buf))) 11202 result |= 32; 11203 if (sprintf (buf, "%Le", x.value) < 0 11204 || !strisnan (buf, 0, strlen (buf))) 11205 result |= 32; 11206 if (sprintf (buf, "%Lg", x.value) < 0 11207 || !strisnan (buf, 0, strlen (buf))) 11208 result |= 32; 11209 } 11210 { /* Pseudo-Denormal. */ 11211 static union { unsigned int word[4]; long double value; } x = 11212 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; 11213 if (sprintf (buf, "%Lf", x.value) < 0 11214 || !strisnan (buf, 0, strlen (buf))) 11215 result |= 64; 11216 if (sprintf (buf, "%Le", x.value) < 0 11217 || !strisnan (buf, 0, strlen (buf))) 11218 result |= 64; 11219 if (sprintf (buf, "%Lg", x.value) < 0 11220 || !strisnan (buf, 0, strlen (buf))) 11221 result |= 64; 11222 } 11223#endif 11224 return result; 11225} 11226_ACEOF 11227if ac_fn_c_try_run "$LINENO"; then : 11228 gl_cv_func_printf_infinite_long_double=yes 11229else 11230 gl_cv_func_printf_infinite_long_double=no 11231fi 11232rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 11233 conftest.$ac_objext conftest.beam conftest.$ac_ext 11234fi 11235 11236 11237fi 11238{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_infinite_long_double" >&5 11239$as_echo "$gl_cv_func_printf_infinite_long_double" >&6; } 11240 ;; 11241 *) 11242 gl_cv_func_printf_infinite_long_double="irrelevant" 11243 ;; 11244 esac 11245 11246 11247 11248 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'a' and 'A' directives" >&5 11249$as_echo_n "checking whether printf supports the 'a' and 'A' directives... " >&6; } 11250if ${gl_cv_func_printf_directive_a+:} false; then : 11251 $as_echo_n "(cached) " >&6 11252else 11253 11254 if test "$cross_compiling" = yes; then : 11255 11256 case "$host_os" in 11257 # Guess yes on glibc >= 2.5 systems. 11258 *-gnu*) 11259 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11260/* end confdefs.h. */ 11261 11262 #include <features.h> 11263 #ifdef __GNU_LIBRARY__ 11264 #if ((__GLIBC__ == 2 && __GLIBC_MINOR__ >= 5) || (__GLIBC__ > 2)) && !defined __UCLIBC__ 11265 BZ2908 11266 #endif 11267 #endif 11268 11269_ACEOF 11270if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 11271 $EGREP "BZ2908" >/dev/null 2>&1; then : 11272 gl_cv_func_printf_directive_a="guessing yes" 11273else 11274 gl_cv_func_printf_directive_a="guessing no" 11275fi 11276rm -f conftest* 11277 11278 ;; 11279 # If we don't know, assume the worst. 11280 *) gl_cv_func_printf_directive_a="guessing no";; 11281 esac 11282 11283else 11284 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11285/* end confdefs.h. */ 11286 11287#include <stdio.h> 11288#include <string.h> 11289static char buf[100]; 11290static double zero = 0.0; 11291int main () 11292{ 11293 int result = 0; 11294 if (sprintf (buf, "%a %d", 3.1416015625, 33, 44, 55) < 0 11295 || (strcmp (buf, "0x1.922p+1 33") != 0 11296 && strcmp (buf, "0x3.244p+0 33") != 0 11297 && strcmp (buf, "0x6.488p-1 33") != 0 11298 && strcmp (buf, "0xc.91p-2 33") != 0)) 11299 result |= 1; 11300 if (sprintf (buf, "%A %d", -3.1416015625, 33, 44, 55) < 0 11301 || (strcmp (buf, "-0X1.922P+1 33") != 0 11302 && strcmp (buf, "-0X3.244P+0 33") != 0 11303 && strcmp (buf, "-0X6.488P-1 33") != 0 11304 && strcmp (buf, "-0XC.91P-2 33") != 0)) 11305 result |= 2; 11306 /* This catches a FreeBSD 6.1 bug: it doesn't round. */ 11307 if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0 11308 || (strcmp (buf, "0x1.83p+0 33") != 0 11309 && strcmp (buf, "0x3.05p-1 33") != 0 11310 && strcmp (buf, "0x6.0ap-2 33") != 0 11311 && strcmp (buf, "0xc.14p-3 33") != 0)) 11312 result |= 4; 11313 /* This catches a FreeBSD 6.1 bug. See 11314 <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */ 11315 if (sprintf (buf, "%010a %d", 1.0 / zero, 33, 44, 55) < 0 11316 || buf[0] == '0') 11317 result |= 8; 11318 /* This catches a Mac OS X 10.3.9 (Darwin 7.9) bug. */ 11319 if (sprintf (buf, "%.1a", 1.999) < 0 11320 || (strcmp (buf, "0x1.0p+1") != 0 11321 && strcmp (buf, "0x2.0p+0") != 0 11322 && strcmp (buf, "0x4.0p-1") != 0 11323 && strcmp (buf, "0x8.0p-2") != 0)) 11324 result |= 16; 11325 /* This catches the same Mac OS X 10.3.9 (Darwin 7.9) bug and also a 11326 glibc 2.4 bug <http://sourceware.org/bugzilla/show_bug.cgi?id=2908>. */ 11327 if (sprintf (buf, "%.1La", 1.999L) < 0 11328 || (strcmp (buf, "0x1.0p+1") != 0 11329 && strcmp (buf, "0x2.0p+0") != 0 11330 && strcmp (buf, "0x4.0p-1") != 0 11331 && strcmp (buf, "0x8.0p-2") != 0)) 11332 result |= 32; 11333 return result; 11334} 11335_ACEOF 11336if ac_fn_c_try_run "$LINENO"; then : 11337 gl_cv_func_printf_directive_a=yes 11338else 11339 gl_cv_func_printf_directive_a=no 11340fi 11341rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 11342 conftest.$ac_objext conftest.beam conftest.$ac_ext 11343fi 11344 11345 11346fi 11347{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_a" >&5 11348$as_echo "$gl_cv_func_printf_directive_a" >&6; } 11349 11350 11351 11352 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'F' directive" >&5 11353$as_echo_n "checking whether printf supports the 'F' directive... " >&6; } 11354if ${gl_cv_func_printf_directive_f+:} false; then : 11355 $as_echo_n "(cached) " >&6 11356else 11357 11358 if test "$cross_compiling" = yes; then : 11359 11360 case "$host_os" in 11361 # Guess yes on glibc systems. 11362 *-gnu*) gl_cv_func_printf_directive_f="guessing yes";; 11363 # Guess yes on FreeBSD >= 6. 11364 freebsd[1-5]*) gl_cv_func_printf_directive_f="guessing no";; 11365 freebsd* | kfreebsd*) gl_cv_func_printf_directive_f="guessing yes";; 11366 # Guess yes on Mac OS X >= 10.3. 11367 darwin[1-6].*) gl_cv_func_printf_directive_f="guessing no";; 11368 darwin*) gl_cv_func_printf_directive_f="guessing yes";; 11369 # Guess yes on Solaris >= 2.10. 11370 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; 11371 solaris*) gl_cv_func_printf_sizes_c99="guessing no";; 11372 # If we don't know, assume the worst. 11373 *) gl_cv_func_printf_directive_f="guessing no";; 11374 esac 11375 11376else 11377 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11378/* end confdefs.h. */ 11379 11380#include <stdio.h> 11381#include <string.h> 11382static char buf[100]; 11383static double zero = 0.0; 11384int main () 11385{ 11386 int result = 0; 11387 if (sprintf (buf, "%F %d", 1234567.0, 33, 44, 55) < 0 11388 || strcmp (buf, "1234567.000000 33") != 0) 11389 result |= 1; 11390 if (sprintf (buf, "%F", 1.0 / zero) < 0 11391 || (strcmp (buf, "INF") != 0 && strcmp (buf, "INFINITY") != 0)) 11392 result |= 2; 11393 /* This catches a Cygwin 1.5.x bug. */ 11394 if (sprintf (buf, "%.F", 1234.0) < 0 11395 || strcmp (buf, "1234") != 0) 11396 result |= 4; 11397 return result; 11398} 11399_ACEOF 11400if ac_fn_c_try_run "$LINENO"; then : 11401 gl_cv_func_printf_directive_f=yes 11402else 11403 gl_cv_func_printf_directive_f=no 11404fi 11405rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 11406 conftest.$ac_objext conftest.beam conftest.$ac_ext 11407fi 11408 11409 11410fi 11411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_f" >&5 11412$as_echo "$gl_cv_func_printf_directive_f" >&6; } 11413 11414 11415 11416 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'n' directive" >&5 11417$as_echo_n "checking whether printf supports the 'n' directive... " >&6; } 11418if ${gl_cv_func_printf_directive_n+:} false; then : 11419 $as_echo_n "(cached) " >&6 11420else 11421 11422 if test "$cross_compiling" = yes; then : 11423 11424 case "$host_os" in 11425 mingw*) gl_cv_func_printf_directive_n="guessing no";; 11426 *) gl_cv_func_printf_directive_n="guessing yes";; 11427 esac 11428 11429else 11430 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11431/* end confdefs.h. */ 11432 11433#include <stdio.h> 11434#include <stdlib.h> 11435#include <string.h> 11436#ifdef _MSC_VER 11437/* See page about "Parameter Validation" on msdn.microsoft.com. */ 11438static void cdecl 11439invalid_parameter_handler (const wchar_t *expression, 11440 const wchar_t *function, 11441 const wchar_t *file, unsigned int line, 11442 uintptr_t dummy) 11443{ 11444 exit (1); 11445} 11446#endif 11447static char fmtstring[10]; 11448static char buf[100]; 11449int main () 11450{ 11451 int count = -1; 11452#ifdef _MSC_VER 11453 _set_invalid_parameter_handler (invalid_parameter_handler); 11454#endif 11455 /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) 11456 support %n in format strings in read-only memory but not in writable 11457 memory. */ 11458 strcpy (fmtstring, "%d %n"); 11459 if (sprintf (buf, fmtstring, 123, &count, 33, 44, 55) < 0 11460 || strcmp (buf, "123 ") != 0 11461 || count != 4) 11462 return 1; 11463 return 0; 11464} 11465_ACEOF 11466if ac_fn_c_try_run "$LINENO"; then : 11467 gl_cv_func_printf_directive_n=yes 11468else 11469 gl_cv_func_printf_directive_n=no 11470fi 11471rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 11472 conftest.$ac_objext conftest.beam conftest.$ac_ext 11473fi 11474 11475 11476fi 11477{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_n" >&5 11478$as_echo "$gl_cv_func_printf_directive_n" >&6; } 11479 11480 11481 11482 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the 'ls' directive" >&5 11483$as_echo_n "checking whether printf supports the 'ls' directive... " >&6; } 11484if ${gl_cv_func_printf_directive_ls+:} false; then : 11485 $as_echo_n "(cached) " >&6 11486else 11487 11488 if test "$cross_compiling" = yes; then : 11489 11490 case "$host_os" in 11491 openbsd*) gl_cv_func_printf_directive_ls="guessing no";; 11492 irix*) gl_cv_func_printf_directive_ls="guessing no";; 11493 solaris*) gl_cv_func_printf_directive_ls="guessing no";; 11494 cygwin*) gl_cv_func_printf_directive_ls="guessing no";; 11495 beos* | haiku*) gl_cv_func_printf_directive_ls="guessing no";; 11496 *) gl_cv_func_printf_directive_ls="guessing yes";; 11497 esac 11498 11499else 11500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11501/* end confdefs.h. */ 11502 11503/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 11504 <wchar.h>. 11505 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 11506 included before <wchar.h>. */ 11507#include <stddef.h> 11508#include <stdio.h> 11509#include <time.h> 11510#include <wchar.h> 11511#include <string.h> 11512int main () 11513{ 11514 int result = 0; 11515 char buf[100]; 11516 /* Test whether %ls works at all. 11517 This test fails on OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Haiku, but not on 11518 Cygwin 1.5. */ 11519 { 11520 static const wchar_t wstring[] = { 'a', 'b', 'c', 0 }; 11521 buf[0] = '\0'; 11522 if (sprintf (buf, "%ls", wstring) < 0 11523 || strcmp (buf, "abc") != 0) 11524 result |= 1; 11525 } 11526 /* This test fails on IRIX 6.5, Solaris 2.6, Cygwin 1.5, Haiku (with an 11527 assertion failure inside libc), but not on OpenBSD 4.0. */ 11528 { 11529 static const wchar_t wstring[] = { 'a', 0 }; 11530 buf[0] = '\0'; 11531 if (sprintf (buf, "%ls", wstring) < 0 11532 || strcmp (buf, "a") != 0) 11533 result |= 2; 11534 } 11535 /* Test whether precisions in %ls are supported as specified in ISO C 99 11536 section 7.19.6.1: 11537 "If a precision is specified, no more than that many bytes are written 11538 (including shift sequences, if any), and the array shall contain a 11539 null wide character if, to equal the multibyte character sequence 11540 length given by the precision, the function would need to access a 11541 wide character one past the end of the array." 11542 This test fails on Solaris 10. */ 11543 { 11544 static const wchar_t wstring[] = { 'a', 'b', (wchar_t) 0xfdfdfdfd, 0 }; 11545 buf[0] = '\0'; 11546 if (sprintf (buf, "%.2ls", wstring) < 0 11547 || strcmp (buf, "ab") != 0) 11548 result |= 8; 11549 } 11550 return result; 11551} 11552_ACEOF 11553if ac_fn_c_try_run "$LINENO"; then : 11554 gl_cv_func_printf_directive_ls=yes 11555else 11556 gl_cv_func_printf_directive_ls=no 11557fi 11558rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 11559 conftest.$ac_objext conftest.beam conftest.$ac_ext 11560fi 11561 11562 11563fi 11564{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_directive_ls" >&5 11565$as_echo "$gl_cv_func_printf_directive_ls" >&6; } 11566 11567 11568 11569 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5 11570$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; } 11571if ${gl_cv_func_printf_positions+:} false; then : 11572 $as_echo_n "(cached) " >&6 11573else 11574 11575 if test "$cross_compiling" = yes; then : 11576 11577 case "$host_os" in 11578 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) 11579 gl_cv_func_printf_positions="guessing no";; 11580 beos*) gl_cv_func_printf_positions="guessing no";; 11581 mingw* | pw*) gl_cv_func_printf_positions="guessing no";; 11582 *) gl_cv_func_printf_positions="guessing yes";; 11583 esac 11584 11585else 11586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11587/* end confdefs.h. */ 11588 11589#include <stdio.h> 11590#include <string.h> 11591/* The string "%2$d %1$d", with dollar characters protected from the shell's 11592 dollar expansion (possibly an autoconf bug). */ 11593static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; 11594static char buf[100]; 11595int main () 11596{ 11597 sprintf (buf, format, 33, 55); 11598 return (strcmp (buf, "55 33") != 0); 11599} 11600_ACEOF 11601if ac_fn_c_try_run "$LINENO"; then : 11602 gl_cv_func_printf_positions=yes 11603else 11604 gl_cv_func_printf_positions=no 11605fi 11606rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 11607 conftest.$ac_objext conftest.beam conftest.$ac_ext 11608fi 11609 11610 11611fi 11612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5 11613$as_echo "$gl_cv_func_printf_positions" >&6; } 11614 11615 11616 11617 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the grouping flag" >&5 11618$as_echo_n "checking whether printf supports the grouping flag... " >&6; } 11619if ${gl_cv_func_printf_flag_grouping+:} false; then : 11620 $as_echo_n "(cached) " >&6 11621else 11622 11623 if test "$cross_compiling" = yes; then : 11624 11625 case "$host_os" in 11626 cygwin*) gl_cv_func_printf_flag_grouping="guessing no";; 11627 netbsd*) gl_cv_func_printf_flag_grouping="guessing no";; 11628 mingw* | pw*) gl_cv_func_printf_flag_grouping="guessing no";; 11629 *) gl_cv_func_printf_flag_grouping="guessing yes";; 11630 esac 11631 11632else 11633 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11634/* end confdefs.h. */ 11635 11636#include <stdio.h> 11637#include <string.h> 11638static char buf[100]; 11639int main () 11640{ 11641 if (sprintf (buf, "%'d %d", 1234567, 99) < 0 11642 || buf[strlen (buf) - 1] != '9') 11643 return 1; 11644 return 0; 11645} 11646_ACEOF 11647if ac_fn_c_try_run "$LINENO"; then : 11648 gl_cv_func_printf_flag_grouping=yes 11649else 11650 gl_cv_func_printf_flag_grouping=no 11651fi 11652rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 11653 conftest.$ac_objext conftest.beam conftest.$ac_ext 11654fi 11655 11656 11657fi 11658{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_grouping" >&5 11659$as_echo "$gl_cv_func_printf_flag_grouping" >&6; } 11660 11661 11662 11663 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the left-adjust flag correctly" >&5 11664$as_echo_n "checking whether printf supports the left-adjust flag correctly... " >&6; } 11665if ${gl_cv_func_printf_flag_leftadjust+:} false; then : 11666 $as_echo_n "(cached) " >&6 11667else 11668 11669 if test "$cross_compiling" = yes; then : 11670 11671 case "$host_os" in 11672 # Guess yes on HP-UX 11. 11673 hpux11*) gl_cv_func_printf_flag_leftadjust="guessing yes";; 11674 # Guess no on HP-UX 10 and older. 11675 hpux*) gl_cv_func_printf_flag_leftadjust="guessing no";; 11676 # Guess yes otherwise. 11677 *) gl_cv_func_printf_flag_leftadjust="guessing yes";; 11678 esac 11679 11680else 11681 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11682/* end confdefs.h. */ 11683 11684#include <stdio.h> 11685#include <string.h> 11686static char buf[100]; 11687int main () 11688{ 11689 /* Check that a '-' flag is not annihilated by a negative width. */ 11690 if (sprintf (buf, "a%-*sc", -3, "b") < 0 11691 || strcmp (buf, "ab c") != 0) 11692 return 1; 11693 return 0; 11694} 11695_ACEOF 11696if ac_fn_c_try_run "$LINENO"; then : 11697 gl_cv_func_printf_flag_leftadjust=yes 11698else 11699 gl_cv_func_printf_flag_leftadjust=no 11700fi 11701rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 11702 conftest.$ac_objext conftest.beam conftest.$ac_ext 11703fi 11704 11705 11706fi 11707{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_leftadjust" >&5 11708$as_echo "$gl_cv_func_printf_flag_leftadjust" >&6; } 11709 11710 11711 11712 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports the zero flag correctly" >&5 11713$as_echo_n "checking whether printf supports the zero flag correctly... " >&6; } 11714if ${gl_cv_func_printf_flag_zero+:} false; then : 11715 $as_echo_n "(cached) " >&6 11716else 11717 11718 if test "$cross_compiling" = yes; then : 11719 11720 case "$host_os" in 11721 # Guess yes on glibc systems. 11722 *-gnu*) gl_cv_func_printf_flag_zero="guessing yes";; 11723 # Guess yes on BeOS. 11724 beos*) gl_cv_func_printf_flag_zero="guessing yes";; 11725 # If we don't know, assume the worst. 11726 *) gl_cv_func_printf_flag_zero="guessing no";; 11727 esac 11728 11729else 11730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11731/* end confdefs.h. */ 11732 11733#include <stdio.h> 11734#include <string.h> 11735static char buf[100]; 11736static double zero = 0.0; 11737int main () 11738{ 11739 if (sprintf (buf, "%010f", 1.0 / zero, 33, 44, 55) < 0 11740 || (strcmp (buf, " inf") != 0 11741 && strcmp (buf, " infinity") != 0)) 11742 return 1; 11743 return 0; 11744} 11745_ACEOF 11746if ac_fn_c_try_run "$LINENO"; then : 11747 gl_cv_func_printf_flag_zero=yes 11748else 11749 gl_cv_func_printf_flag_zero=no 11750fi 11751rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 11752 conftest.$ac_objext conftest.beam conftest.$ac_ext 11753fi 11754 11755 11756fi 11757{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_flag_zero" >&5 11758$as_echo "$gl_cv_func_printf_flag_zero" >&6; } 11759 11760 11761 11762 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports large precisions" >&5 11763$as_echo_n "checking whether printf supports large precisions... " >&6; } 11764if ${gl_cv_func_printf_precision+:} false; then : 11765 $as_echo_n "(cached) " >&6 11766else 11767 11768 if test "$cross_compiling" = yes; then : 11769 11770 case "$host_os" in 11771 # Guess no only on Solaris, native Windows, and BeOS systems. 11772 solaris*) gl_cv_func_printf_precision="guessing no" ;; 11773 mingw* | pw*) gl_cv_func_printf_precision="guessing no" ;; 11774 beos*) gl_cv_func_printf_precision="guessing no" ;; 11775 *) gl_cv_func_printf_precision="guessing yes" ;; 11776 esac 11777 11778else 11779 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11780/* end confdefs.h. */ 11781 11782#include <stdio.h> 11783#include <string.h> 11784static char buf[5000]; 11785int main () 11786{ 11787 int result = 0; 11788#ifdef __BEOS__ 11789 /* On BeOS, this would crash and show a dialog box. Avoid the crash. */ 11790 return 1; 11791#endif 11792 if (sprintf (buf, "%.4000d %d", 1, 33, 44) < 4000 + 3) 11793 result |= 1; 11794 if (sprintf (buf, "%.4000f %d", 1.0, 33, 44) < 4000 + 5) 11795 result |= 2; 11796 if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5 11797 || buf[0] != '1') 11798 result |= 4; 11799 if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5 11800 || buf[0] != '1') 11801 result |= 4; 11802 return result; 11803} 11804_ACEOF 11805if ac_fn_c_try_run "$LINENO"; then : 11806 gl_cv_func_printf_precision=yes 11807else 11808 gl_cv_func_printf_precision=no 11809fi 11810rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 11811 conftest.$ac_objext conftest.beam conftest.$ac_ext 11812fi 11813 11814 11815fi 11816{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_precision" >&5 11817$as_echo "$gl_cv_func_printf_precision" >&6; } 11818 11819 11820 gl_cv_c_multiarch=no 11821 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11822/* end confdefs.h. */ 11823#ifndef __APPLE_CC__ 11824 not a universal capable compiler 11825 #endif 11826 typedef int dummy; 11827 11828_ACEOF 11829if ac_fn_c_try_compile "$LINENO"; then : 11830 11831 arch= 11832 prev= 11833 for word in ${CC} ${CFLAGS} ${CPPFLAGS} ${LDFLAGS}; do 11834 if test -n "$prev"; then 11835 case $word in 11836 i?86 | x86_64 | ppc | ppc64) 11837 if test -z "$arch" || test "$arch" = "$word"; then 11838 arch="$word" 11839 else 11840 gl_cv_c_multiarch=yes 11841 fi 11842 ;; 11843 esac 11844 prev= 11845 else 11846 if test "x$word" = "x-arch"; then 11847 prev=arch 11848 fi 11849 fi 11850 done 11851 11852fi 11853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 11854 if test $gl_cv_c_multiarch = yes; then 11855 APPLE_UNIVERSAL_BUILD=1 11856 else 11857 APPLE_UNIVERSAL_BUILD=0 11858 fi 11859 11860 11861 11862 11863 11864 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf survives out-of-memory conditions" >&5 11865$as_echo_n "checking whether printf survives out-of-memory conditions... " >&6; } 11866if ${gl_cv_func_printf_enomem+:} false; then : 11867 $as_echo_n "(cached) " >&6 11868else 11869 11870 gl_cv_func_printf_enomem="guessing no" 11871 if test "$cross_compiling" = no; then 11872 if test $APPLE_UNIVERSAL_BUILD = 0; then 11873 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 11874/* end confdefs.h. */ 11875 11876 11877#include <stdlib.h> 11878#if defined __MACH__ && defined __APPLE__ 11879/* Avoid a crash on Mac OS X. */ 11880#include <mach/mach.h> 11881#include <mach/mach_error.h> 11882#include <mach/thread_status.h> 11883#include <mach/exception.h> 11884#include <mach/task.h> 11885#include <pthread.h> 11886/* The exception port on which our thread listens. */ 11887static mach_port_t our_exception_port; 11888/* The main function of the thread listening for exceptions of type 11889 EXC_BAD_ACCESS. */ 11890static void * 11891mach_exception_thread (void *arg) 11892{ 11893 /* Buffer for a message to be received. */ 11894 struct { 11895 mach_msg_header_t head; 11896 mach_msg_body_t msgh_body; 11897 char data1024; 11898 } msg; 11899 mach_msg_return_t retval; 11900 /* Wait for a message on the exception port. */ 11901 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), 11902 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); 11903 if (retval != MACH_MSG_SUCCESS) 11904 abort (); 11905 exit (1); 11906} 11907static void 11908nocrash_init (void) 11909{ 11910 mach_port_t self = mach_task_self (); 11911 /* Allocate a port on which the thread shall listen for exceptions. */ 11912 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) 11913 == KERN_SUCCESS) { 11914 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ 11915 if (mach_port_insert_right (self, our_exception_port, our_exception_port, 11916 MACH_MSG_TYPE_MAKE_SEND) 11917 == KERN_SUCCESS) { 11918 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting 11919 for us. */ 11920 exception_mask_t mask = EXC_MASK_BAD_ACCESS; 11921 /* Create the thread listening on the exception port. */ 11922 pthread_attr_t attr; 11923 pthread_t thread; 11924 if (pthread_attr_init (&attr) == 0 11925 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 11926 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { 11927 pthread_attr_destroy (&attr); 11928 /* Replace the exception port info for these exceptions with our own. 11929 Note that we replace the exception port for the entire task, not only 11930 for a particular thread. This has the effect that when our exception 11931 port gets the message, the thread specific exception port has already 11932 been asked, and we don't need to bother about it. 11933 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ 11934 task_set_exception_ports (self, mask, our_exception_port, 11935 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); 11936 } 11937 } 11938 } 11939} 11940#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ 11941/* Avoid a crash on native Windows. */ 11942#define WIN32_LEAN_AND_MEAN 11943#include <windows.h> 11944#include <winerror.h> 11945static LONG WINAPI 11946exception_filter (EXCEPTION_POINTERS *ExceptionInfo) 11947{ 11948 switch (ExceptionInfo->ExceptionRecord->ExceptionCode) 11949 { 11950 case EXCEPTION_ACCESS_VIOLATION: 11951 case EXCEPTION_IN_PAGE_ERROR: 11952 case EXCEPTION_STACK_OVERFLOW: 11953 case EXCEPTION_GUARD_PAGE: 11954 case EXCEPTION_PRIV_INSTRUCTION: 11955 case EXCEPTION_ILLEGAL_INSTRUCTION: 11956 case EXCEPTION_DATATYPE_MISALIGNMENT: 11957 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: 11958 case EXCEPTION_NONCONTINUABLE_EXCEPTION: 11959 exit (1); 11960 } 11961 return EXCEPTION_CONTINUE_SEARCH; 11962} 11963static void 11964nocrash_init (void) 11965{ 11966 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); 11967} 11968#else 11969/* Avoid a crash on POSIX systems. */ 11970#include <signal.h> 11971/* A POSIX signal handler. */ 11972static void 11973exception_handler (int sig) 11974{ 11975 exit (1); 11976} 11977static void 11978nocrash_init (void) 11979{ 11980#ifdef SIGSEGV 11981 signal (SIGSEGV, exception_handler); 11982#endif 11983#ifdef SIGBUS 11984 signal (SIGBUS, exception_handler); 11985#endif 11986} 11987#endif 11988 11989#include <stdio.h> 11990#include <sys/types.h> 11991#include <sys/time.h> 11992#include <sys/resource.h> 11993#include <errno.h> 11994int main() 11995{ 11996 struct rlimit limit; 11997 int ret; 11998 nocrash_init (); 11999 /* Some printf implementations allocate temporary space with malloc. */ 12000 /* On BSD systems, malloc() is limited by RLIMIT_DATA. */ 12001#ifdef RLIMIT_DATA 12002 if (getrlimit (RLIMIT_DATA, &limit) < 0) 12003 return 77; 12004 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) 12005 limit.rlim_max = 5000000; 12006 limit.rlim_cur = limit.rlim_max; 12007 if (setrlimit (RLIMIT_DATA, &limit) < 0) 12008 return 77; 12009#endif 12010 /* On Linux systems, malloc() is limited by RLIMIT_AS. */ 12011#ifdef RLIMIT_AS 12012 if (getrlimit (RLIMIT_AS, &limit) < 0) 12013 return 77; 12014 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) 12015 limit.rlim_max = 5000000; 12016 limit.rlim_cur = limit.rlim_max; 12017 if (setrlimit (RLIMIT_AS, &limit) < 0) 12018 return 77; 12019#endif 12020 /* Some printf implementations allocate temporary space on the stack. */ 12021#ifdef RLIMIT_STACK 12022 if (getrlimit (RLIMIT_STACK, &limit) < 0) 12023 return 77; 12024 if (limit.rlim_max == RLIM_INFINITY || limit.rlim_max > 5000000) 12025 limit.rlim_max = 5000000; 12026 limit.rlim_cur = limit.rlim_max; 12027 if (setrlimit (RLIMIT_STACK, &limit) < 0) 12028 return 77; 12029#endif 12030 ret = printf ("%.5000000f", 1.0); 12031 return !(ret == 5000002 || (ret < 0 && errno == ENOMEM)); 12032} 12033 12034_ACEOF 12035 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 12036 (eval $ac_link) 2>&5 12037 ac_status=$? 12038 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 12039 test $ac_status = 0; } && test -s conftest$ac_exeext; then 12040 (./conftest 2>&5 12041 result=$? 12042 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $result" >&5 12043 if test $result != 0 && test $result != 77; then result=1; fi 12044 exit $result 12045 ) >/dev/null 2>/dev/null 12046 case $? in 12047 0) gl_cv_func_printf_enomem="yes" ;; 12048 77) gl_cv_func_printf_enomem="guessing no" ;; 12049 *) gl_cv_func_printf_enomem="no" ;; 12050 esac 12051 else 12052 gl_cv_func_printf_enomem="guessing no" 12053 fi 12054 rm -fr conftest* 12055 else 12056 gl_cv_func_printf_enomem="guessing no" 12057 fi 12058 fi 12059 if test "$gl_cv_func_printf_enomem" = "guessing no"; then 12060 case "$host_os" in 12061 # Guess yes on glibc systems. 12062 *-gnu*) gl_cv_func_printf_enomem="guessing yes";; 12063 # Guess yes on Solaris. 12064 solaris*) gl_cv_func_printf_enomem="guessing yes";; 12065 # Guess yes on AIX. 12066 aix*) gl_cv_func_printf_enomem="guessing yes";; 12067 # Guess yes on HP-UX/hppa. 12068 hpux*) case "$host_cpu" in 12069 hppa*) gl_cv_func_printf_enomem="guessing yes";; 12070 *) gl_cv_func_printf_enomem="guessing no";; 12071 esac 12072 ;; 12073 # Guess yes on IRIX. 12074 irix*) gl_cv_func_printf_enomem="guessing yes";; 12075 # Guess yes on OSF/1. 12076 osf*) gl_cv_func_printf_enomem="guessing yes";; 12077 # Guess yes on BeOS. 12078 beos*) gl_cv_func_printf_enomem="guessing yes";; 12079 # Guess yes on Haiku. 12080 haiku*) gl_cv_func_printf_enomem="guessing yes";; 12081 # If we don't know, assume the worst. 12082 *) gl_cv_func_printf_enomem="guessing no";; 12083 esac 12084 fi 12085 12086fi 12087{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_enomem" >&5 12088$as_echo "$gl_cv_func_printf_enomem" >&6; } 12089 12090 12091 12092 case "$gl_cv_func_printf_long_double" in 12093 *yes) 12094 ;; 12095 *) 12096 12097$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h 12098 12099 ;; 12100 esac 12101 12102 12103 12104 12105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 12106$as_echo_n "checking for unsigned long long int... " >&6; } 12107if ${ac_cv_type_unsigned_long_long_int+:} false; then : 12108 $as_echo_n "(cached) " >&6 12109else 12110 ac_cv_type_unsigned_long_long_int=yes 12111 if test "x${ac_cv_prog_cc_c99-no}" = xno; then 12112 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12113/* end confdefs.h. */ 12114 12115 /* For now, do not test the preprocessor; as of 2007 there are too many 12116 implementations with broken preprocessors. Perhaps this can 12117 be revisited in 2012. In the meantime, code should not expect 12118 #if to work with literals wider than 32 bits. */ 12119 /* Test literals. */ 12120 long long int ll = 9223372036854775807ll; 12121 long long int nll = -9223372036854775807LL; 12122 unsigned long long int ull = 18446744073709551615ULL; 12123 /* Test constant expressions. */ 12124 typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) 12125 ? 1 : -1)]; 12126 typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 12127 ? 1 : -1)]; 12128 int i = 63; 12129int 12130main () 12131{ 12132/* Test availability of runtime routines for shift and division. */ 12133 long long int llmax = 9223372036854775807ll; 12134 unsigned long long int ullmax = 18446744073709551615ull; 12135 return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) 12136 | (llmax / ll) | (llmax % ll) 12137 | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) 12138 | (ullmax / ull) | (ullmax % ull)); 12139 ; 12140 return 0; 12141} 12142 12143_ACEOF 12144if ac_fn_c_try_link "$LINENO"; then : 12145 12146else 12147 ac_cv_type_unsigned_long_long_int=no 12148fi 12149rm -f core conftest.err conftest.$ac_objext \ 12150 conftest$ac_exeext conftest.$ac_ext 12151 fi 12152fi 12153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 12154$as_echo "$ac_cv_type_unsigned_long_long_int" >&6; } 12155 if test $ac_cv_type_unsigned_long_long_int = yes; then 12156 12157$as_echo "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h 12158 12159 fi 12160 12161 12162 12163 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 12164$as_echo_n "checking for long long int... " >&6; } 12165if ${ac_cv_type_long_long_int+:} false; then : 12166 $as_echo_n "(cached) " >&6 12167else 12168 ac_cv_type_long_long_int=yes 12169 if test "x${ac_cv_prog_cc_c99-no}" = xno; then 12170 ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int 12171 if test $ac_cv_type_long_long_int = yes; then 12172 if test "$cross_compiling" = yes; then : 12173 : 12174else 12175 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12176/* end confdefs.h. */ 12177#include <limits.h> 12178 #ifndef LLONG_MAX 12179 # define HALF \ 12180 (1LL << (sizeof (long long int) * CHAR_BIT - 2)) 12181 # define LLONG_MAX (HALF - 1 + HALF) 12182 #endif 12183int 12184main () 12185{ 12186long long int n = 1; 12187 int i; 12188 for (i = 0; ; i++) 12189 { 12190 long long int m = n << i; 12191 if (m >> i != n) 12192 return 1; 12193 if (LLONG_MAX / 2 < m) 12194 break; 12195 } 12196 return 0; 12197 ; 12198 return 0; 12199} 12200_ACEOF 12201if ac_fn_c_try_run "$LINENO"; then : 12202 12203else 12204 ac_cv_type_long_long_int=no 12205fi 12206rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 12207 conftest.$ac_objext conftest.beam conftest.$ac_ext 12208fi 12209 12210 fi 12211 fi 12212fi 12213{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 12214$as_echo "$ac_cv_type_long_long_int" >&6; } 12215 if test $ac_cv_type_long_long_int = yes; then 12216 12217$as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h 12218 12219 fi 12220 12221 12222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 12223$as_echo_n "checking for wchar_t... " >&6; } 12224if ${gt_cv_c_wchar_t+:} false; then : 12225 $as_echo_n "(cached) " >&6 12226else 12227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12228/* end confdefs.h. */ 12229#include <stddef.h> 12230 wchar_t foo = (wchar_t)'\0'; 12231int 12232main () 12233{ 12234 12235 ; 12236 return 0; 12237} 12238_ACEOF 12239if ac_fn_c_try_compile "$LINENO"; then : 12240 gt_cv_c_wchar_t=yes 12241else 12242 gt_cv_c_wchar_t=no 12243fi 12244rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12245fi 12246{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 12247$as_echo "$gt_cv_c_wchar_t" >&6; } 12248 if test $gt_cv_c_wchar_t = yes; then 12249 12250$as_echo "#define HAVE_WCHAR_T 1" >>confdefs.h 12251 12252 fi 12253 12254 12255 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 12256$as_echo_n "checking for wint_t... " >&6; } 12257if ${gt_cv_c_wint_t+:} false; then : 12258 $as_echo_n "(cached) " >&6 12259else 12260 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12261/* end confdefs.h. */ 12262 12263/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 12264 <wchar.h>. 12265 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included 12266 before <wchar.h>. */ 12267#include <stddef.h> 12268#include <stdio.h> 12269#include <time.h> 12270#include <wchar.h> 12271 wint_t foo = (wchar_t)'\0'; 12272int 12273main () 12274{ 12275 12276 ; 12277 return 0; 12278} 12279_ACEOF 12280if ac_fn_c_try_compile "$LINENO"; then : 12281 gt_cv_c_wint_t=yes 12282else 12283 gt_cv_c_wint_t=no 12284fi 12285rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12286fi 12287{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 12288$as_echo "$gt_cv_c_wint_t" >&6; } 12289 if test $gt_cv_c_wint_t = yes; then 12290 12291$as_echo "#define HAVE_WINT_T 1" >>confdefs.h 12292 12293 fi 12294 12295 12296 12297 12298 12299 if test $ac_cv_header_features_h = yes; then 12300 HAVE_FEATURES_H=1 12301 else 12302 HAVE_FEATURES_H=0 12303 fi 12304 12305 12306 12307 12308 12309 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5 12310$as_echo_n "checking for intmax_t... " >&6; } 12311if ${gt_cv_c_intmax_t+:} false; then : 12312 $as_echo_n "(cached) " >&6 12313else 12314 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12315/* end confdefs.h. */ 12316 12317#include <stddef.h> 12318#include <stdlib.h> 12319#if HAVE_STDINT_H_WITH_UINTMAX 12320#include <stdint.h> 12321#endif 12322#if HAVE_INTTYPES_H_WITH_UINTMAX 12323#include <inttypes.h> 12324#endif 12325 12326int 12327main () 12328{ 12329intmax_t x = -1; return !x; 12330 ; 12331 return 0; 12332} 12333_ACEOF 12334if ac_fn_c_try_compile "$LINENO"; then : 12335 gt_cv_c_intmax_t=yes 12336else 12337 gt_cv_c_intmax_t=no 12338fi 12339rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12340fi 12341{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5 12342$as_echo "$gt_cv_c_intmax_t" >&6; } 12343 if test $gt_cv_c_intmax_t = yes; then 12344 12345$as_echo "#define HAVE_INTMAX_T 1" >>confdefs.h 12346 12347 else 12348 12349 test $ac_cv_type_long_long_int = yes \ 12350 && ac_type='long long' \ 12351 || ac_type='long' 12352 12353cat >>confdefs.h <<_ACEOF 12354#define intmax_t $ac_type 12355_ACEOF 12356 12357 fi 12358 12359 12360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'double'" >&5 12361$as_echo_n "checking where to find the exponent in a 'double'... " >&6; } 12362if ${gl_cv_cc_double_expbit0+:} false; then : 12363 $as_echo_n "(cached) " >&6 12364else 12365 12366 if test "$cross_compiling" = yes; then : 12367 12368 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12369/* end confdefs.h. */ 12370 12371#if defined arm || defined __arm || defined __arm__ 12372 mixed_endianness 12373#endif 12374 12375_ACEOF 12376if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 12377 $EGREP "mixed_endianness" >/dev/null 2>&1; then : 12378 gl_cv_cc_double_expbit0="unknown" 12379else 12380 12381 : 12382if ${ac_cv_c_bigendian+:} false; then : 12383 $as_echo_n "(cached) " >&6 12384else 12385 ac_cv_c_bigendian=unknown 12386 # See if we're dealing with a universal compiler. 12387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12388/* end confdefs.h. */ 12389#ifndef __APPLE_CC__ 12390 not a universal capable compiler 12391 #endif 12392 typedef int dummy; 12393 12394_ACEOF 12395if ac_fn_c_try_compile "$LINENO"; then : 12396 12397 # Check for potential -arch flags. It is not universal unless 12398 # there are at least two -arch flags with different values. 12399 ac_arch= 12400 ac_prev= 12401 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do 12402 if test -n "$ac_prev"; then 12403 case $ac_word in 12404 i?86 | x86_64 | ppc | ppc64) 12405 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then 12406 ac_arch=$ac_word 12407 else 12408 ac_cv_c_bigendian=universal 12409 break 12410 fi 12411 ;; 12412 esac 12413 ac_prev= 12414 elif test "x$ac_word" = "x-arch"; then 12415 ac_prev=arch 12416 fi 12417 done 12418fi 12419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12420 if test $ac_cv_c_bigendian = unknown; then 12421 # See if sys/param.h defines the BYTE_ORDER macro. 12422 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12423/* end confdefs.h. */ 12424#include <sys/types.h> 12425 #include <sys/param.h> 12426 12427int 12428main () 12429{ 12430#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ 12431 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ 12432 && LITTLE_ENDIAN) 12433 bogus endian macros 12434 #endif 12435 12436 ; 12437 return 0; 12438} 12439_ACEOF 12440if ac_fn_c_try_compile "$LINENO"; then : 12441 # It does; now see whether it defined to BIG_ENDIAN or not. 12442 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12443/* end confdefs.h. */ 12444#include <sys/types.h> 12445 #include <sys/param.h> 12446 12447int 12448main () 12449{ 12450#if BYTE_ORDER != BIG_ENDIAN 12451 not big endian 12452 #endif 12453 12454 ; 12455 return 0; 12456} 12457_ACEOF 12458if ac_fn_c_try_compile "$LINENO"; then : 12459 ac_cv_c_bigendian=yes 12460else 12461 ac_cv_c_bigendian=no 12462fi 12463rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12464fi 12465rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12466 fi 12467 if test $ac_cv_c_bigendian = unknown; then 12468 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). 12469 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12470/* end confdefs.h. */ 12471#include <limits.h> 12472 12473int 12474main () 12475{ 12476#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) 12477 bogus endian macros 12478 #endif 12479 12480 ; 12481 return 0; 12482} 12483_ACEOF 12484if ac_fn_c_try_compile "$LINENO"; then : 12485 # It does; now see whether it defined to _BIG_ENDIAN or not. 12486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12487/* end confdefs.h. */ 12488#include <limits.h> 12489 12490int 12491main () 12492{ 12493#ifndef _BIG_ENDIAN 12494 not big endian 12495 #endif 12496 12497 ; 12498 return 0; 12499} 12500_ACEOF 12501if ac_fn_c_try_compile "$LINENO"; then : 12502 ac_cv_c_bigendian=yes 12503else 12504 ac_cv_c_bigendian=no 12505fi 12506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12507fi 12508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12509 fi 12510 if test $ac_cv_c_bigendian = unknown; then 12511 # Compile a test program. 12512 if test "$cross_compiling" = yes; then : 12513 # Try to guess by grepping values from an object file. 12514 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12515/* end confdefs.h. */ 12516short int ascii_mm[] = 12517 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; 12518 short int ascii_ii[] = 12519 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; 12520 int use_ascii (int i) { 12521 return ascii_mm[i] + ascii_ii[i]; 12522 } 12523 short int ebcdic_ii[] = 12524 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; 12525 short int ebcdic_mm[] = 12526 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; 12527 int use_ebcdic (int i) { 12528 return ebcdic_mm[i] + ebcdic_ii[i]; 12529 } 12530 extern int foo; 12531 12532int 12533main () 12534{ 12535return use_ascii (foo) == use_ebcdic (foo); 12536 ; 12537 return 0; 12538} 12539_ACEOF 12540if ac_fn_c_try_compile "$LINENO"; then : 12541 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then 12542 ac_cv_c_bigendian=yes 12543 fi 12544 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then 12545 if test "$ac_cv_c_bigendian" = unknown; then 12546 ac_cv_c_bigendian=no 12547 else 12548 # finding both strings is unlikely to happen, but who knows? 12549 ac_cv_c_bigendian=unknown 12550 fi 12551 fi 12552fi 12553rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 12554else 12555 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12556/* end confdefs.h. */ 12557$ac_includes_default 12558int 12559main () 12560{ 12561 12562 /* Are we little or big endian? From Harbison&Steele. */ 12563 union 12564 { 12565 long int l; 12566 char c[sizeof (long int)]; 12567 } u; 12568 u.l = 1; 12569 return u.c[sizeof (long int) - 1] == 1; 12570 12571 ; 12572 return 0; 12573} 12574_ACEOF 12575if ac_fn_c_try_run "$LINENO"; then : 12576 ac_cv_c_bigendian=no 12577else 12578 ac_cv_c_bigendian=yes 12579fi 12580rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 12581 conftest.$ac_objext conftest.beam conftest.$ac_ext 12582fi 12583 12584 fi 12585fi 12586: 12587 case $ac_cv_c_bigendian in #( 12588 yes) 12589 gl_cv_cc_double_expbit0="word 0 bit 20";; #( 12590 no) 12591 gl_cv_cc_double_expbit0="word 1 bit 20" ;; #( 12592 universal) 12593 12594$as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h 12595 12596 ;; #( 12597 *) 12598 gl_cv_cc_double_expbit0="unknown" ;; 12599 esac 12600 12601 12602fi 12603rm -f conftest* 12604 12605 12606else 12607 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12608/* end confdefs.h. */ 12609 12610#include <float.h> 12611#include <stddef.h> 12612#include <stdio.h> 12613#include <string.h> 12614#define NWORDS \ 12615 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 12616typedef union { double value; unsigned int word[NWORDS]; } memory_double; 12617static unsigned int ored_words[NWORDS]; 12618static unsigned int anded_words[NWORDS]; 12619static void add_to_ored_words (double x) 12620{ 12621 memory_double m; 12622 size_t i; 12623 /* Clear it first, in case sizeof (double) < sizeof (memory_double). */ 12624 memset (&m, 0, sizeof (memory_double)); 12625 m.value = x; 12626 for (i = 0; i < NWORDS; i++) 12627 { 12628 ored_words[i] |= m.word[i]; 12629 anded_words[i] &= m.word[i]; 12630 } 12631} 12632int main () 12633{ 12634 size_t j; 12635 FILE *fp = fopen ("conftest.out", "w"); 12636 if (fp == NULL) 12637 return 1; 12638 for (j = 0; j < NWORDS; j++) 12639 anded_words[j] = ~ (unsigned int) 0; 12640 add_to_ored_words (0.25); 12641 add_to_ored_words (0.5); 12642 add_to_ored_words (1.0); 12643 add_to_ored_words (2.0); 12644 add_to_ored_words (4.0); 12645 /* Remove bits that are common (e.g. if representation of the first mantissa 12646 bit is explicit). */ 12647 for (j = 0; j < NWORDS; j++) 12648 ored_words[j] &= ~anded_words[j]; 12649 /* Now find the nonzero word. */ 12650 for (j = 0; j < NWORDS; j++) 12651 if (ored_words[j] != 0) 12652 break; 12653 if (j < NWORDS) 12654 { 12655 size_t i; 12656 for (i = j + 1; i < NWORDS; i++) 12657 if (ored_words[i] != 0) 12658 { 12659 fprintf (fp, "unknown"); 12660 return (fclose (fp) != 0); 12661 } 12662 for (i = 0; ; i++) 12663 if ((ored_words[j] >> i) & 1) 12664 { 12665 fprintf (fp, "word %d bit %d", (int) j, (int) i); 12666 return (fclose (fp) != 0); 12667 } 12668 } 12669 fprintf (fp, "unknown"); 12670 return (fclose (fp) != 0); 12671} 12672 12673_ACEOF 12674if ac_fn_c_try_run "$LINENO"; then : 12675 gl_cv_cc_double_expbit0=`cat conftest.out` 12676else 12677 gl_cv_cc_double_expbit0="unknown" 12678fi 12679rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 12680 conftest.$ac_objext conftest.beam conftest.$ac_ext 12681fi 12682 12683 rm -f conftest.out 12684 12685fi 12686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_expbit0" >&5 12687$as_echo "$gl_cv_cc_double_expbit0" >&6; } 12688 case "$gl_cv_cc_double_expbit0" in 12689 word*bit*) 12690 word=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` 12691 bit=`echo "$gl_cv_cc_double_expbit0" | sed -e 's/word.*bit //'` 12692 12693cat >>confdefs.h <<_ACEOF 12694#define DBL_EXPBIT0_WORD $word 12695_ACEOF 12696 12697 12698cat >>confdefs.h <<_ACEOF 12699#define DBL_EXPBIT0_BIT $bit 12700_ACEOF 12701 12702 ;; 12703 esac 12704 12705 12706 12707 12708 12709 12710 12711 12712 12713 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf returns a byte count as in C99" >&5 12714$as_echo_n "checking whether snprintf returns a byte count as in C99... " >&6; } 12715if ${gl_cv_func_snprintf_retval_c99+:} false; then : 12716 $as_echo_n "(cached) " >&6 12717else 12718 12719 if test "$cross_compiling" = yes; then : 12720 12721 case "$host_os" in 12722 # Guess yes on glibc systems. 12723 *-gnu*) gl_cv_func_snprintf_retval_c99="guessing yes";; 12724 # Guess yes on FreeBSD >= 5. 12725 freebsd[1-4]*) gl_cv_func_snprintf_retval_c99="guessing no";; 12726 freebsd* | kfreebsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; 12727 # Guess yes on Mac OS X >= 10.3. 12728 darwin[1-6].*) gl_cv_func_snprintf_retval_c99="guessing no";; 12729 darwin*) gl_cv_func_snprintf_retval_c99="guessing yes";; 12730 # Guess yes on OpenBSD >= 3.9. 12731 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) 12732 gl_cv_func_snprintf_retval_c99="guessing no";; 12733 openbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; 12734 # Guess yes on Solaris >= 2.10. 12735 solaris2.[1-9][0-9]*) gl_cv_func_printf_sizes_c99="guessing yes";; 12736 solaris*) gl_cv_func_printf_sizes_c99="guessing no";; 12737 # Guess yes on AIX >= 4. 12738 aix[1-3]*) gl_cv_func_snprintf_retval_c99="guessing no";; 12739 aix*) gl_cv_func_snprintf_retval_c99="guessing yes";; 12740 # Guess yes on NetBSD >= 3. 12741 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) 12742 gl_cv_func_snprintf_retval_c99="guessing no";; 12743 netbsd*) gl_cv_func_snprintf_retval_c99="guessing yes";; 12744 # Guess yes on BeOS. 12745 beos*) gl_cv_func_snprintf_retval_c99="guessing yes";; 12746 # If we don't know, assume the worst. 12747 *) gl_cv_func_snprintf_retval_c99="guessing no";; 12748 esac 12749 12750else 12751 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 12752/* end confdefs.h. */ 12753 12754#include <stdio.h> 12755#include <string.h> 12756#if HAVE_SNPRINTF 12757# define my_snprintf snprintf 12758#else 12759# include <stdarg.h> 12760static int my_snprintf (char *buf, int size, const char *format, ...) 12761{ 12762 va_list args; 12763 int ret; 12764 va_start (args, format); 12765 ret = vsnprintf (buf, size, format, args); 12766 va_end (args); 12767 return ret; 12768} 12769#endif 12770static char buf[100]; 12771int main () 12772{ 12773 strcpy (buf, "ABCDEF"); 12774 if (my_snprintf (buf, 3, "%d %d", 4567, 89) != 7) 12775 return 1; 12776 if (my_snprintf (buf, 0, "%d %d", 4567, 89) != 7) 12777 return 2; 12778 if (my_snprintf (NULL, 0, "%d %d", 4567, 89) != 7) 12779 return 3; 12780 return 0; 12781} 12782_ACEOF 12783if ac_fn_c_try_run "$LINENO"; then : 12784 gl_cv_func_snprintf_retval_c99=yes 12785else 12786 gl_cv_func_snprintf_retval_c99=no 12787fi 12788rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 12789 conftest.$ac_objext conftest.beam conftest.$ac_ext 12790fi 12791 12792 12793fi 12794{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_retval_c99" >&5 12795$as_echo "$gl_cv_func_snprintf_retval_c99" >&6; } 12796 12797 12798 12799 12800 12801 12802 for ac_func in snprintf strnlen wcslen wcsnlen mbrtowc wcrtomb 12803do : 12804 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 12805ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 12806if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 12807 cat >>confdefs.h <<_ACEOF 12808#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 12809_ACEOF 12810 12811fi 12812done 12813 12814 ac_fn_c_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h> 12815" 12816if test "x$ac_cv_have_decl__snprintf" = xyes; then : 12817 ac_have_decl=1 12818else 12819 ac_have_decl=0 12820fi 12821 12822cat >>confdefs.h <<_ACEOF 12823#define HAVE_DECL__SNPRINTF $ac_have_decl 12824_ACEOF 12825 12826 12827 12828 case "$gl_cv_func_snprintf_retval_c99" in 12829 *yes) 12830 12831$as_echo "#define HAVE_SNPRINTF_RETVAL_C99 1" >>confdefs.h 12832 12833 ;; 12834 esac 12835 12836 12837 GNULIB_ACOSF=0; 12838 GNULIB_ACOSL=0; 12839 GNULIB_ASINF=0; 12840 GNULIB_ASINL=0; 12841 GNULIB_ATANF=0; 12842 GNULIB_ATANL=0; 12843 GNULIB_ATAN2F=0; 12844 GNULIB_CBRT=0; 12845 GNULIB_CBRTF=0; 12846 GNULIB_CBRTL=0; 12847 GNULIB_CEIL=0; 12848 GNULIB_CEILF=0; 12849 GNULIB_CEILL=0; 12850 GNULIB_COPYSIGN=0; 12851 GNULIB_COPYSIGNF=0; 12852 GNULIB_COPYSIGNL=0; 12853 GNULIB_COSF=0; 12854 GNULIB_COSL=0; 12855 GNULIB_COSHF=0; 12856 GNULIB_EXPF=0; 12857 GNULIB_EXPL=0; 12858 GNULIB_EXP2=0; 12859 GNULIB_EXP2F=0; 12860 GNULIB_EXP2L=0; 12861 GNULIB_EXPM1=0; 12862 GNULIB_EXPM1F=0; 12863 GNULIB_EXPM1L=0; 12864 GNULIB_FABSF=0; 12865 GNULIB_FABSL=0; 12866 GNULIB_FLOOR=0; 12867 GNULIB_FLOORF=0; 12868 GNULIB_FLOORL=0; 12869 GNULIB_FMA=0; 12870 GNULIB_FMAF=0; 12871 GNULIB_FMAL=0; 12872 GNULIB_FMOD=0; 12873 GNULIB_FMODF=0; 12874 GNULIB_FMODL=0; 12875 GNULIB_FREXPF=0; 12876 GNULIB_FREXP=0; 12877 GNULIB_FREXPL=0; 12878 GNULIB_HYPOT=0; 12879 GNULIB_HYPOTF=0; 12880 GNULIB_HYPOTL=0; 12881 GNULIB_ILOGB=0; 12882 GNULIB_ILOGBF=0; 12883 GNULIB_ILOGBL=0; 12884 GNULIB_ISFINITE=0; 12885 GNULIB_ISINF=0; 12886 GNULIB_ISNAN=0; 12887 GNULIB_ISNANF=0; 12888 GNULIB_ISNAND=0; 12889 GNULIB_ISNANL=0; 12890 GNULIB_LDEXPF=0; 12891 GNULIB_LDEXPL=0; 12892 GNULIB_LOG=0; 12893 GNULIB_LOGF=0; 12894 GNULIB_LOGL=0; 12895 GNULIB_LOG10=0; 12896 GNULIB_LOG10F=0; 12897 GNULIB_LOG10L=0; 12898 GNULIB_LOG1P=0; 12899 GNULIB_LOG1PF=0; 12900 GNULIB_LOG1PL=0; 12901 GNULIB_LOG2=0; 12902 GNULIB_LOG2F=0; 12903 GNULIB_LOG2L=0; 12904 GNULIB_LOGB=0; 12905 GNULIB_LOGBF=0; 12906 GNULIB_LOGBL=0; 12907 GNULIB_MODF=0; 12908 GNULIB_MODFF=0; 12909 GNULIB_MODFL=0; 12910 GNULIB_POWF=0; 12911 GNULIB_REMAINDER=0; 12912 GNULIB_REMAINDERF=0; 12913 GNULIB_REMAINDERL=0; 12914 GNULIB_RINT=0; 12915 GNULIB_RINTF=0; 12916 GNULIB_RINTL=0; 12917 GNULIB_ROUND=0; 12918 GNULIB_ROUNDF=0; 12919 GNULIB_ROUNDL=0; 12920 GNULIB_SIGNBIT=0; 12921 GNULIB_SINF=0; 12922 GNULIB_SINL=0; 12923 GNULIB_SINHF=0; 12924 GNULIB_SQRTF=0; 12925 GNULIB_SQRTL=0; 12926 GNULIB_TANF=0; 12927 GNULIB_TANL=0; 12928 GNULIB_TANHF=0; 12929 GNULIB_TRUNC=0; 12930 GNULIB_TRUNCF=0; 12931 GNULIB_TRUNCL=0; 12932 HAVE_ACOSF=1; 12933 HAVE_ACOSL=1; 12934 HAVE_ASINF=1; 12935 HAVE_ASINL=1; 12936 HAVE_ATANF=1; 12937 HAVE_ATANL=1; 12938 HAVE_ATAN2F=1; 12939 HAVE_CBRT=1; 12940 HAVE_CBRTF=1; 12941 HAVE_CBRTL=1; 12942 HAVE_COPYSIGN=1; 12943 HAVE_COPYSIGNL=1; 12944 HAVE_COSF=1; 12945 HAVE_COSL=1; 12946 HAVE_COSHF=1; 12947 HAVE_EXPF=1; 12948 HAVE_EXPL=1; 12949 HAVE_EXPM1=1; 12950 HAVE_EXPM1F=1; 12951 HAVE_FABSF=1; 12952 HAVE_FABSL=1; 12953 HAVE_FMA=1; 12954 HAVE_FMAF=1; 12955 HAVE_FMAL=1; 12956 HAVE_FMODF=1; 12957 HAVE_FMODL=1; 12958 HAVE_FREXPF=1; 12959 HAVE_HYPOTF=1; 12960 HAVE_HYPOTL=1; 12961 HAVE_ILOGB=1; 12962 HAVE_ILOGBF=1; 12963 HAVE_ILOGBL=1; 12964 HAVE_ISNANF=1; 12965 HAVE_ISNAND=1; 12966 HAVE_ISNANL=1; 12967 HAVE_LDEXPF=1; 12968 HAVE_LOGF=1; 12969 HAVE_LOGL=1; 12970 HAVE_LOG10F=1; 12971 HAVE_LOG10L=1; 12972 HAVE_LOG1P=1; 12973 HAVE_LOG1PF=1; 12974 HAVE_LOG1PL=1; 12975 HAVE_LOGBF=1; 12976 HAVE_LOGBL=1; 12977 HAVE_MODFF=1; 12978 HAVE_MODFL=1; 12979 HAVE_POWF=1; 12980 HAVE_REMAINDER=1; 12981 HAVE_REMAINDERF=1; 12982 HAVE_RINT=1; 12983 HAVE_RINTL=1; 12984 HAVE_SINF=1; 12985 HAVE_SINL=1; 12986 HAVE_SINHF=1; 12987 HAVE_SQRTF=1; 12988 HAVE_SQRTL=1; 12989 HAVE_TANF=1; 12990 HAVE_TANL=1; 12991 HAVE_TANHF=1; 12992 HAVE_DECL_ACOSL=1; 12993 HAVE_DECL_ASINL=1; 12994 HAVE_DECL_ATANL=1; 12995 HAVE_DECL_CBRTF=1; 12996 HAVE_DECL_CBRTL=1; 12997 HAVE_DECL_CEILF=1; 12998 HAVE_DECL_CEILL=1; 12999 HAVE_DECL_COPYSIGNF=1; 13000 HAVE_DECL_COSL=1; 13001 HAVE_DECL_EXPL=1; 13002 HAVE_DECL_EXP2=1; 13003 HAVE_DECL_EXP2F=1; 13004 HAVE_DECL_EXP2L=1; 13005 HAVE_DECL_EXPM1L=1; 13006 HAVE_DECL_FLOORF=1; 13007 HAVE_DECL_FLOORL=1; 13008 HAVE_DECL_FREXPL=1; 13009 HAVE_DECL_LDEXPL=1; 13010 HAVE_DECL_LOGL=1; 13011 HAVE_DECL_LOG10L=1; 13012 HAVE_DECL_LOG2=1; 13013 HAVE_DECL_LOG2F=1; 13014 HAVE_DECL_LOG2L=1; 13015 HAVE_DECL_LOGB=1; 13016 HAVE_DECL_REMAINDER=1; 13017 HAVE_DECL_REMAINDERL=1; 13018 HAVE_DECL_RINTF=1; 13019 HAVE_DECL_ROUND=1; 13020 HAVE_DECL_ROUNDF=1; 13021 HAVE_DECL_ROUNDL=1; 13022 HAVE_DECL_SINL=1; 13023 HAVE_DECL_SQRTL=1; 13024 HAVE_DECL_TANL=1; 13025 HAVE_DECL_TRUNC=1; 13026 HAVE_DECL_TRUNCF=1; 13027 HAVE_DECL_TRUNCL=1; 13028 REPLACE_CBRTF=0; 13029 REPLACE_CBRTL=0; 13030 REPLACE_CEIL=0; 13031 REPLACE_CEILF=0; 13032 REPLACE_CEILL=0; 13033 REPLACE_EXPM1=0; 13034 REPLACE_EXPM1F=0; 13035 REPLACE_EXP2=0; 13036 REPLACE_EXP2L=0; 13037 REPLACE_FABSL=0; 13038 REPLACE_FLOOR=0; 13039 REPLACE_FLOORF=0; 13040 REPLACE_FLOORL=0; 13041 REPLACE_FMA=0; 13042 REPLACE_FMAF=0; 13043 REPLACE_FMAL=0; 13044 REPLACE_FMOD=0; 13045 REPLACE_FMODF=0; 13046 REPLACE_FMODL=0; 13047 REPLACE_FREXPF=0; 13048 REPLACE_FREXP=0; 13049 REPLACE_FREXPL=0; 13050 REPLACE_HUGE_VAL=0; 13051 REPLACE_HYPOT=0; 13052 REPLACE_HYPOTF=0; 13053 REPLACE_HYPOTL=0; 13054 REPLACE_ILOGB=0; 13055 REPLACE_ILOGBF=0; 13056 REPLACE_ISFINITE=0; 13057 REPLACE_ISINF=0; 13058 REPLACE_ISNAN=0; 13059 REPLACE_LDEXPL=0; 13060 REPLACE_LOG=0; 13061 REPLACE_LOGF=0; 13062 REPLACE_LOGL=0; 13063 REPLACE_LOG10=0; 13064 REPLACE_LOG10F=0; 13065 REPLACE_LOG10L=0; 13066 REPLACE_LOG1P=0; 13067 REPLACE_LOG1PF=0; 13068 REPLACE_LOG1PL=0; 13069 REPLACE_LOG2=0; 13070 REPLACE_LOG2F=0; 13071 REPLACE_LOG2L=0; 13072 REPLACE_LOGB=0; 13073 REPLACE_LOGBF=0; 13074 REPLACE_LOGBL=0; 13075 REPLACE_MODF=0; 13076 REPLACE_MODFF=0; 13077 REPLACE_MODFL=0; 13078 REPLACE_NAN=0; 13079 REPLACE_REMAINDER=0; 13080 REPLACE_REMAINDERF=0; 13081 REPLACE_REMAINDERL=0; 13082 REPLACE_ROUND=0; 13083 REPLACE_ROUNDF=0; 13084 REPLACE_ROUNDL=0; 13085 REPLACE_SIGNBIT=0; 13086 REPLACE_SIGNBIT_USING_GCC=0; 13087 REPLACE_SQRTL=0; 13088 REPLACE_TRUNC=0; 13089 REPLACE_TRUNCF=0; 13090 REPLACE_TRUNCL=0; 13091 13092 13093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp() can be used without linking with libm" >&5 13094$as_echo_n "checking whether frexp() can be used without linking with libm... " >&6; } 13095if ${gl_cv_func_frexp_no_libm+:} false; then : 13096 $as_echo_n "(cached) " >&6 13097else 13098 13099 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13100/* end confdefs.h. */ 13101#include <math.h> 13102 double x; 13103int 13104main () 13105{ 13106int e; return frexp (x, &e) > 0; 13107 ; 13108 return 0; 13109} 13110_ACEOF 13111if ac_fn_c_try_link "$LINENO"; then : 13112 gl_cv_func_frexp_no_libm=yes 13113else 13114 gl_cv_func_frexp_no_libm=no 13115fi 13116rm -f core conftest.err conftest.$ac_objext \ 13117 conftest$ac_exeext conftest.$ac_ext 13118 13119fi 13120{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_no_libm" >&5 13121$as_echo "$gl_cv_func_frexp_no_libm" >&6; } 13122 13123 13124 13125 13126 13127 13128 GNULIB_FCHMODAT=0; 13129 GNULIB_FSTAT=0; 13130 GNULIB_FSTATAT=0; 13131 GNULIB_FUTIMENS=0; 13132 GNULIB_LCHMOD=0; 13133 GNULIB_LSTAT=0; 13134 GNULIB_MKDIRAT=0; 13135 GNULIB_MKFIFO=0; 13136 GNULIB_MKFIFOAT=0; 13137 GNULIB_MKNOD=0; 13138 GNULIB_MKNODAT=0; 13139 GNULIB_STAT=0; 13140 GNULIB_UTIMENSAT=0; 13141 HAVE_FCHMODAT=1; 13142 HAVE_FSTATAT=1; 13143 HAVE_FUTIMENS=1; 13144 HAVE_LCHMOD=1; 13145 HAVE_LSTAT=1; 13146 HAVE_MKDIRAT=1; 13147 HAVE_MKFIFO=1; 13148 HAVE_MKFIFOAT=1; 13149 HAVE_MKNOD=1; 13150 HAVE_MKNODAT=1; 13151 HAVE_UTIMENSAT=1; 13152 REPLACE_FSTAT=0; 13153 REPLACE_FSTATAT=0; 13154 REPLACE_FUTIMENS=0; 13155 REPLACE_LSTAT=0; 13156 REPLACE_MKDIR=0; 13157 REPLACE_MKFIFO=0; 13158 REPLACE_MKNOD=0; 13159 REPLACE_STAT=0; 13160 REPLACE_UTIMENSAT=0; 13161 13162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 13163$as_echo_n "checking whether stat file-mode macros are broken... " >&6; } 13164if ${ac_cv_header_stat_broken+:} false; then : 13165 $as_echo_n "(cached) " >&6 13166else 13167 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13168/* end confdefs.h. */ 13169#include <sys/types.h> 13170#include <sys/stat.h> 13171 13172#if defined S_ISBLK && defined S_IFDIR 13173extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; 13174#endif 13175 13176#if defined S_ISBLK && defined S_IFCHR 13177extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; 13178#endif 13179 13180#if defined S_ISLNK && defined S_IFREG 13181extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; 13182#endif 13183 13184#if defined S_ISSOCK && defined S_IFREG 13185extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; 13186#endif 13187 13188_ACEOF 13189if ac_fn_c_try_compile "$LINENO"; then : 13190 ac_cv_header_stat_broken=no 13191else 13192 ac_cv_header_stat_broken=yes 13193fi 13194rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13195fi 13196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 13197$as_echo "$ac_cv_header_stat_broken" >&6; } 13198if test $ac_cv_header_stat_broken = yes; then 13199 13200$as_echo "#define STAT_MACROS_BROKEN 1" >>confdefs.h 13201 13202fi 13203 13204 13205 13206 13207 13208 case "$host_os" in 13209 mingw*) 13210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit off_t" >&5 13211$as_echo_n "checking for 64-bit off_t... " >&6; } 13212if ${gl_cv_type_off_t_64+:} false; then : 13213 $as_echo_n "(cached) " >&6 13214else 13215 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13216/* end confdefs.h. */ 13217#include <sys/types.h> 13218 int verify_off_t_size[sizeof (off_t) >= 8 ? 1 : -1]; 13219 13220int 13221main () 13222{ 13223 13224 ; 13225 return 0; 13226} 13227_ACEOF 13228if ac_fn_c_try_compile "$LINENO"; then : 13229 gl_cv_type_off_t_64=yes 13230else 13231 gl_cv_type_off_t_64=no 13232fi 13233rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13234 13235fi 13236{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_off_t_64" >&5 13237$as_echo "$gl_cv_type_off_t_64" >&6; } 13238 if test $gl_cv_type_off_t_64 = no; then 13239 WINDOWS_64_BIT_OFF_T=1 13240 else 13241 WINDOWS_64_BIT_OFF_T=0 13242 fi 13243 WINDOWS_64_BIT_ST_SIZE=1 13244 ;; 13245 *) 13246 WINDOWS_64_BIT_OFF_T=0 13247 WINDOWS_64_BIT_ST_SIZE=0 13248 ;; 13249 esac 13250 13251 13252 13253 13254 13255 13256 13257 13258 13259 13260 13261 13262 13263 13264 13265 if test $gl_cv_have_include_next = yes; then 13266 gl_cv_next_sys_stat_h='<'sys/stat.h'>' 13267 else 13268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5 13269$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; } 13270if ${gl_cv_next_sys_stat_h+:} false; then : 13271 $as_echo_n "(cached) " >&6 13272else 13273 13274 if test $ac_cv_header_sys_stat_h = yes; then 13275 13276 13277 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13278/* end confdefs.h. */ 13279#include <sys/stat.h> 13280 13281_ACEOF 13282 case "$host_os" in 13283 aix*) gl_absname_cpp="$ac_cpp -C" ;; 13284 *) gl_absname_cpp="$ac_cpp" ;; 13285 esac 13286 13287 case "$host_os" in 13288 mingw*) 13289 gl_dirsep_regex='[/\\]' 13290 ;; 13291 *) 13292 gl_dirsep_regex='\/' 13293 ;; 13294 esac 13295 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 13296 13297 gl_header_literal_regex=`echo 'sys/stat.h' \ 13298 | sed -e "$gl_make_literal_regex_sed"` 13299 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 13300 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 13301 s|^/[^/]|//&| 13302 p 13303 q 13304 }' 13305 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 13306 sed -n "$gl_absolute_header_sed"`'"' 13307 else 13308 gl_cv_next_sys_stat_h='<'sys/stat.h'>' 13309 fi 13310 13311 13312fi 13313{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 13314$as_echo "$gl_cv_next_sys_stat_h" >&6; } 13315 fi 13316 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h 13317 13318 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 13319 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 13320 gl_next_as_first_directive='<'sys/stat.h'>' 13321 else 13322 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 13323 gl_next_as_first_directive=$gl_cv_next_sys_stat_h 13324 fi 13325 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive 13326 13327 13328 13329 13330 13331 13332 13333 13334 13335 13336 13337 if test $WINDOWS_64_BIT_ST_SIZE = 1; then 13338 13339$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h 13340 13341 fi 13342 13343 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h> 13344 #include <sys/stat.h> 13345" 13346if test "x$ac_cv_type_nlink_t" = xyes; then : 13347 13348else 13349 13350$as_echo "#define nlink_t int" >>confdefs.h 13351 13352fi 13353 13354 13355 13356 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do 13357 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` 13358 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 13359$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } 13360if eval \${$as_gl_Symbol+:} false; then : 13361 $as_echo_n "(cached) " >&6 13362else 13363 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13364/* end confdefs.h. */ 13365#include <sys/stat.h> 13366 13367int 13368main () 13369{ 13370#undef $gl_func 13371 (void) $gl_func; 13372 ; 13373 return 0; 13374} 13375_ACEOF 13376if ac_fn_c_try_compile "$LINENO"; then : 13377 eval "$as_gl_Symbol=yes" 13378else 13379 eval "$as_gl_Symbol=no" 13380fi 13381rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 13382fi 13383eval ac_res=\$$as_gl_Symbol 13384 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 13385$as_echo "$ac_res" >&6; } 13386 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : 13387 cat >>confdefs.h <<_ACEOF 13388#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 13389_ACEOF 13390 13391 eval ac_cv_have_decl_$gl_func=yes 13392fi 13393 done 13394 13395 13396ac_fn_c_check_decl "$LINENO" "getdelim" "ac_cv_have_decl_getdelim" "$ac_includes_default" 13397if test "x$ac_cv_have_decl_getdelim" = xyes; then : 13398 ac_have_decl=1 13399else 13400 ac_have_decl=0 13401fi 13402 13403cat >>confdefs.h <<_ACEOF 13404#define HAVE_DECL_GETDELIM $ac_have_decl 13405_ACEOF 13406 13407 13408 13409 13410 13411ac_fn_c_check_decl "$LINENO" "getline" "ac_cv_have_decl_getline" "$ac_includes_default" 13412if test "x$ac_cv_have_decl_getline" = xyes; then : 13413 ac_have_decl=1 13414else 13415 ac_have_decl=0 13416fi 13417 13418cat >>confdefs.h <<_ACEOF 13419#define HAVE_DECL_GETLINE $ac_have_decl 13420_ACEOF 13421 13422 13423 13424 13425 13426 13427 13428 13429 13430 13431 13432 13433 13434 13435 13436 13437 if test $gl_cv_have_include_next = yes; then 13438 gl_cv_next_getopt_h='<'getopt.h'>' 13439 else 13440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <getopt.h>" >&5 13441$as_echo_n "checking absolute name of <getopt.h>... " >&6; } 13442if ${gl_cv_next_getopt_h+:} false; then : 13443 $as_echo_n "(cached) " >&6 13444else 13445 13446 if test $ac_cv_header_getopt_h = yes; then 13447 13448 13449 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13450/* end confdefs.h. */ 13451#include <getopt.h> 13452 13453_ACEOF 13454 case "$host_os" in 13455 aix*) gl_absname_cpp="$ac_cpp -C" ;; 13456 *) gl_absname_cpp="$ac_cpp" ;; 13457 esac 13458 13459 case "$host_os" in 13460 mingw*) 13461 gl_dirsep_regex='[/\\]' 13462 ;; 13463 *) 13464 gl_dirsep_regex='\/' 13465 ;; 13466 esac 13467 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 13468 13469 gl_header_literal_regex=`echo 'getopt.h' \ 13470 | sed -e "$gl_make_literal_regex_sed"` 13471 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 13472 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 13473 s|^/[^/]|//&| 13474 p 13475 q 13476 }' 13477 gl_cv_next_getopt_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 13478 sed -n "$gl_absolute_header_sed"`'"' 13479 else 13480 gl_cv_next_getopt_h='<'getopt.h'>' 13481 fi 13482 13483 13484fi 13485{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_getopt_h" >&5 13486$as_echo "$gl_cv_next_getopt_h" >&6; } 13487 fi 13488 NEXT_GETOPT_H=$gl_cv_next_getopt_h 13489 13490 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 13491 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 13492 gl_next_as_first_directive='<'getopt.h'>' 13493 else 13494 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 13495 gl_next_as_first_directive=$gl_cv_next_getopt_h 13496 fi 13497 NEXT_AS_FIRST_DIRECTIVE_GETOPT_H=$gl_next_as_first_directive 13498 13499 13500 13501 13502 if test $ac_cv_header_getopt_h = yes; then 13503 HAVE_GETOPT_H=1 13504 else 13505 HAVE_GETOPT_H=0 13506 fi 13507 13508 13509 gl_replace_getopt= 13510 13511 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then 13512 for ac_header in getopt.h 13513do : 13514 ac_fn_c_check_header_mongrel "$LINENO" "getopt.h" "ac_cv_header_getopt_h" "$ac_includes_default" 13515if test "x$ac_cv_header_getopt_h" = xyes; then : 13516 cat >>confdefs.h <<_ACEOF 13517#define HAVE_GETOPT_H 1 13518_ACEOF 13519 13520else 13521 gl_replace_getopt=yes 13522fi 13523 13524done 13525 13526 fi 13527 13528 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then 13529 for ac_func in getopt_long_only 13530do : 13531 ac_fn_c_check_func "$LINENO" "getopt_long_only" "ac_cv_func_getopt_long_only" 13532if test "x$ac_cv_func_getopt_long_only" = xyes; then : 13533 cat >>confdefs.h <<_ACEOF 13534#define HAVE_GETOPT_LONG_ONLY 1 13535_ACEOF 13536 13537else 13538 gl_replace_getopt=yes 13539fi 13540done 13541 13542 fi 13543 13544 if test -z "$gl_replace_getopt"; then 13545 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether getopt is POSIX compatible" >&5 13546$as_echo_n "checking whether getopt is POSIX compatible... " >&6; } 13547if ${gl_cv_func_getopt_posix+:} false; then : 13548 $as_echo_n "(cached) " >&6 13549else 13550 13551 if test $cross_compiling = no; then 13552 if test "$cross_compiling" = yes; then : 13553 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 13554$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 13555as_fn_error $? "cannot run test program while cross compiling 13556See \`config.log' for more details" "$LINENO" 5; } 13557else 13558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13559/* end confdefs.h. */ 13560 13561#include <unistd.h> 13562#include <stdlib.h> 13563#include <string.h> 13564 13565int 13566main () 13567{ 13568 static char program[] = "program"; 13569 static char a[] = "-a"; 13570 static char foo[] = "foo"; 13571 static char bar[] = "bar"; 13572 char *argv[] = { program, a, foo, bar, NULL }; 13573 int c; 13574 13575 c = getopt (4, argv, "ab"); 13576 if (!(c == 'a')) 13577 return 1; 13578 c = getopt (4, argv, "ab"); 13579 if (!(c == -1)) 13580 return 2; 13581 if (!(optind == 2)) 13582 return 3; 13583 return 0; 13584} 13585 13586_ACEOF 13587if ac_fn_c_try_run "$LINENO"; then : 13588 gl_cv_func_getopt_posix=maybe 13589else 13590 gl_cv_func_getopt_posix=no 13591fi 13592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 13593 conftest.$ac_objext conftest.beam conftest.$ac_ext 13594fi 13595 13596 if test $gl_cv_func_getopt_posix = maybe; then 13597 if test "$cross_compiling" = yes; then : 13598 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 13599$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 13600as_fn_error $? "cannot run test program while cross compiling 13601See \`config.log' for more details" "$LINENO" 5; } 13602else 13603 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13604/* end confdefs.h. */ 13605 13606#include <unistd.h> 13607#include <stdlib.h> 13608#include <string.h> 13609 13610int 13611main () 13612{ 13613 static char program[] = "program"; 13614 static char donald[] = "donald"; 13615 static char p[] = "-p"; 13616 static char billy[] = "billy"; 13617 static char duck[] = "duck"; 13618 static char a[] = "-a"; 13619 static char bar[] = "bar"; 13620 char *argv[] = { program, donald, p, billy, duck, a, bar, NULL }; 13621 int c; 13622 13623 c = getopt (7, argv, "+abp:q:"); 13624 if (!(c == -1)) 13625 return 4; 13626 if (!(strcmp (argv[0], "program") == 0)) 13627 return 5; 13628 if (!(strcmp (argv[1], "donald") == 0)) 13629 return 6; 13630 if (!(strcmp (argv[2], "-p") == 0)) 13631 return 7; 13632 if (!(strcmp (argv[3], "billy") == 0)) 13633 return 8; 13634 if (!(strcmp (argv[4], "duck") == 0)) 13635 return 9; 13636 if (!(strcmp (argv[5], "-a") == 0)) 13637 return 10; 13638 if (!(strcmp (argv[6], "bar") == 0)) 13639 return 11; 13640 if (!(optind == 1)) 13641 return 12; 13642 return 0; 13643} 13644 13645_ACEOF 13646if ac_fn_c_try_run "$LINENO"; then : 13647 gl_cv_func_getopt_posix=maybe 13648else 13649 gl_cv_func_getopt_posix=no 13650fi 13651rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 13652 conftest.$ac_objext conftest.beam conftest.$ac_ext 13653fi 13654 13655 fi 13656 if test $gl_cv_func_getopt_posix = maybe; then 13657 if test "$cross_compiling" = yes; then : 13658 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 13659$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 13660as_fn_error $? "cannot run test program while cross compiling 13661See \`config.log' for more details" "$LINENO" 5; } 13662else 13663 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13664/* end confdefs.h. */ 13665 13666#include <unistd.h> 13667#include <stdlib.h> 13668#include <string.h> 13669 13670int 13671main () 13672{ 13673 static char program[] = "program"; 13674 static char ab[] = "-ab"; 13675 char *argv[3] = { program, ab, NULL }; 13676 if (getopt (2, argv, "ab:") != 'a') 13677 return 13; 13678 if (getopt (2, argv, "ab:") != '?') 13679 return 14; 13680 if (optopt != 'b') 13681 return 15; 13682 if (optind != 2) 13683 return 16; 13684 return 0; 13685} 13686 13687_ACEOF 13688if ac_fn_c_try_run "$LINENO"; then : 13689 gl_cv_func_getopt_posix=yes 13690else 13691 gl_cv_func_getopt_posix=no 13692fi 13693rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 13694 conftest.$ac_objext conftest.beam conftest.$ac_ext 13695fi 13696 13697 fi 13698 else 13699 case "$host_os" in 13700 darwin* | aix* | mingw*) gl_cv_func_getopt_posix="guessing no";; 13701 *) gl_cv_func_getopt_posix="guessing yes";; 13702 esac 13703 fi 13704 13705fi 13706{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_posix" >&5 13707$as_echo "$gl_cv_func_getopt_posix" >&6; } 13708 case "$gl_cv_func_getopt_posix" in 13709 *no) gl_replace_getopt=yes ;; 13710 esac 13711 fi 13712 13713 if test -z "$gl_replace_getopt" && test $gl_getopt_required = GNU; then 13714 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt function" >&5 13715$as_echo_n "checking for working GNU getopt function... " >&6; } 13716if ${gl_cv_func_getopt_gnu+:} false; then : 13717 $as_echo_n "(cached) " >&6 13718else 13719 # Even with POSIXLY_CORRECT, the GNU extension of leading '-' in the 13720 # optstring is necessary for programs like m4 that have POSIX-mandated 13721 # semantics for supporting options interspersed with files. 13722 # Also, since getopt_long is a GNU extension, we require optind=0. 13723 # Bash ties 'set -o posix' to a non-exported POSIXLY_CORRECT; 13724 # so take care to revert to the correct (non-)export state. 13725 gl_awk_probe='BEGIN { if ("POSIXLY_CORRECT" in ENVIRON) print "x" }' 13726 case ${POSIXLY_CORRECT+x}`$AWK "$gl_awk_probe" </dev/null` in 13727 xx) gl_had_POSIXLY_CORRECT=exported ;; 13728 x) gl_had_POSIXLY_CORRECT=yes ;; 13729 *) gl_had_POSIXLY_CORRECT= ;; 13730 esac 13731 POSIXLY_CORRECT=1 13732 export POSIXLY_CORRECT 13733 if test "$cross_compiling" = yes; then : 13734 gl_cv_func_getopt_gnu="guessing no" 13735 13736else 13737 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13738/* end confdefs.h. */ 13739#include <getopt.h> 13740 #include <stddef.h> 13741 #include <string.h> 13742 13743#include <stdlib.h> 13744#if defined __MACH__ && defined __APPLE__ 13745/* Avoid a crash on Mac OS X. */ 13746#include <mach/mach.h> 13747#include <mach/mach_error.h> 13748#include <mach/thread_status.h> 13749#include <mach/exception.h> 13750#include <mach/task.h> 13751#include <pthread.h> 13752/* The exception port on which our thread listens. */ 13753static mach_port_t our_exception_port; 13754/* The main function of the thread listening for exceptions of type 13755 EXC_BAD_ACCESS. */ 13756static void * 13757mach_exception_thread (void *arg) 13758{ 13759 /* Buffer for a message to be received. */ 13760 struct { 13761 mach_msg_header_t head; 13762 mach_msg_body_t msgh_body; 13763 char data[1024]; 13764 } msg; 13765 mach_msg_return_t retval; 13766 /* Wait for a message on the exception port. */ 13767 retval = mach_msg (&msg.head, MACH_RCV_MSG | MACH_RCV_LARGE, 0, sizeof (msg), 13768 our_exception_port, MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL); 13769 if (retval != MACH_MSG_SUCCESS) 13770 abort (); 13771 exit (1); 13772} 13773static void 13774nocrash_init (void) 13775{ 13776 mach_port_t self = mach_task_self (); 13777 /* Allocate a port on which the thread shall listen for exceptions. */ 13778 if (mach_port_allocate (self, MACH_PORT_RIGHT_RECEIVE, &our_exception_port) 13779 == KERN_SUCCESS) { 13780 /* See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/mach_port_insert_right.html. */ 13781 if (mach_port_insert_right (self, our_exception_port, our_exception_port, 13782 MACH_MSG_TYPE_MAKE_SEND) 13783 == KERN_SUCCESS) { 13784 /* The exceptions we want to catch. Only EXC_BAD_ACCESS is interesting 13785 for us. */ 13786 exception_mask_t mask = EXC_MASK_BAD_ACCESS; 13787 /* Create the thread listening on the exception port. */ 13788 pthread_attr_t attr; 13789 pthread_t thread; 13790 if (pthread_attr_init (&attr) == 0 13791 && pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED) == 0 13792 && pthread_create (&thread, &attr, mach_exception_thread, NULL) == 0) { 13793 pthread_attr_destroy (&attr); 13794 /* Replace the exception port info for these exceptions with our own. 13795 Note that we replace the exception port for the entire task, not only 13796 for a particular thread. This has the effect that when our exception 13797 port gets the message, the thread specific exception port has already 13798 been asked, and we don't need to bother about it. 13799 See http://web.mit.edu/darwin/src/modules/xnu/osfmk/man/task_set_exception_ports.html. */ 13800 task_set_exception_ports (self, mask, our_exception_port, 13801 EXCEPTION_DEFAULT, MACHINE_THREAD_STATE); 13802 } 13803 } 13804 } 13805} 13806#elif (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ 13807/* Avoid a crash on native Windows. */ 13808#define WIN32_LEAN_AND_MEAN 13809#include <windows.h> 13810#include <winerror.h> 13811static LONG WINAPI 13812exception_filter (EXCEPTION_POINTERS *ExceptionInfo) 13813{ 13814 switch (ExceptionInfo->ExceptionRecord->ExceptionCode) 13815 { 13816 case EXCEPTION_ACCESS_VIOLATION: 13817 case EXCEPTION_IN_PAGE_ERROR: 13818 case EXCEPTION_STACK_OVERFLOW: 13819 case EXCEPTION_GUARD_PAGE: 13820 case EXCEPTION_PRIV_INSTRUCTION: 13821 case EXCEPTION_ILLEGAL_INSTRUCTION: 13822 case EXCEPTION_DATATYPE_MISALIGNMENT: 13823 case EXCEPTION_ARRAY_BOUNDS_EXCEEDED: 13824 case EXCEPTION_NONCONTINUABLE_EXCEPTION: 13825 exit (1); 13826 } 13827 return EXCEPTION_CONTINUE_SEARCH; 13828} 13829static void 13830nocrash_init (void) 13831{ 13832 SetUnhandledExceptionFilter ((LPTOP_LEVEL_EXCEPTION_FILTER) exception_filter); 13833} 13834#else 13835/* Avoid a crash on POSIX systems. */ 13836#include <signal.h> 13837/* A POSIX signal handler. */ 13838static void 13839exception_handler (int sig) 13840{ 13841 exit (1); 13842} 13843static void 13844nocrash_init (void) 13845{ 13846#ifdef SIGSEGV 13847 signal (SIGSEGV, exception_handler); 13848#endif 13849#ifdef SIGBUS 13850 signal (SIGBUS, exception_handler); 13851#endif 13852} 13853#endif 13854 13855 13856int 13857main () 13858{ 13859 13860 int result = 0; 13861 13862 nocrash_init(); 13863 13864 /* This code succeeds on glibc 2.8, OpenBSD 4.0, Cygwin, mingw, 13865 and fails on Mac OS X 10.5, AIX 5.2, HP-UX 11, IRIX 6.5, 13866 OSF/1 5.1, Solaris 10. */ 13867 { 13868 static char conftest[] = "conftest"; 13869 static char plus[] = "-+"; 13870 char *argv[3] = { conftest, plus, NULL }; 13871 opterr = 0; 13872 if (getopt (2, argv, "+a") != '?') 13873 result |= 1; 13874 } 13875 /* This code succeeds on glibc 2.8, mingw, 13876 and fails on Mac OS X 10.5, OpenBSD 4.0, AIX 5.2, HP-UX 11, 13877 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x. */ 13878 { 13879 static char program[] = "program"; 13880 static char p[] = "-p"; 13881 static char foo[] = "foo"; 13882 static char bar[] = "bar"; 13883 char *argv[] = { program, p, foo, bar, NULL }; 13884 13885 optind = 1; 13886 if (getopt (4, argv, "p::") != 'p') 13887 result |= 2; 13888 else if (optarg != NULL) 13889 result |= 4; 13890 else if (getopt (4, argv, "p::") != -1) 13891 result |= 6; 13892 else if (optind != 2) 13893 result |= 8; 13894 } 13895 /* This code succeeds on glibc 2.8 and fails on Cygwin 1.7.0. */ 13896 { 13897 static char program[] = "program"; 13898 static char foo[] = "foo"; 13899 static char p[] = "-p"; 13900 char *argv[] = { program, foo, p, NULL }; 13901 optind = 0; 13902 if (getopt (3, argv, "-p") != 1) 13903 result |= 16; 13904 else if (getopt (3, argv, "-p") != 'p') 13905 result |= 16; 13906 } 13907 /* This code fails on glibc 2.11. */ 13908 { 13909 static char program[] = "program"; 13910 static char b[] = "-b"; 13911 static char a[] = "-a"; 13912 char *argv[] = { program, b, a, NULL }; 13913 optind = opterr = 0; 13914 if (getopt (3, argv, "+:a:b") != 'b') 13915 result |= 32; 13916 else if (getopt (3, argv, "+:a:b") != ':') 13917 result |= 32; 13918 } 13919 /* This code dumps core on glibc 2.14. */ 13920 { 13921 static char program[] = "program"; 13922 static char w[] = "-W"; 13923 static char dummy[] = "dummy"; 13924 char *argv[] = { program, w, dummy, NULL }; 13925 optind = opterr = 1; 13926 if (getopt (3, argv, "W;") != 'W') 13927 result |= 64; 13928 } 13929 return result; 13930 13931 ; 13932 return 0; 13933} 13934_ACEOF 13935if ac_fn_c_try_run "$LINENO"; then : 13936 gl_cv_func_getopt_gnu=yes 13937else 13938 gl_cv_func_getopt_gnu=no 13939fi 13940rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 13941 conftest.$ac_objext conftest.beam conftest.$ac_ext 13942fi 13943 13944 case $gl_had_POSIXLY_CORRECT in 13945 exported) ;; 13946 yes) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;}; POSIXLY_CORRECT=1 ;; 13947 *) { POSIXLY_CORRECT=; unset POSIXLY_CORRECT;} ;; 13948 esac 13949 13950fi 13951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_gnu" >&5 13952$as_echo "$gl_cv_func_getopt_gnu" >&6; } 13953 if test "$gl_cv_func_getopt_gnu" != yes; then 13954 gl_replace_getopt=yes 13955 else 13956 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working GNU getopt_long function" >&5 13957$as_echo_n "checking for working GNU getopt_long function... " >&6; } 13958if ${gl_cv_func_getopt_long_gnu+:} false; then : 13959 $as_echo_n "(cached) " >&6 13960else 13961 if test "$cross_compiling" = yes; then : 13962 case "$host_os" in 13963 openbsd*) gl_cv_func_getopt_long_gnu="guessing no";; 13964 *) gl_cv_func_getopt_long_gnu="guessing yes";; 13965 esac 13966 13967else 13968 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 13969/* end confdefs.h. */ 13970#include <getopt.h> 13971 #include <stddef.h> 13972 #include <string.h> 13973 13974int 13975main () 13976{ 13977static const struct option long_options[] = 13978 { 13979 { "xtremely-",no_argument, NULL, 1003 }, 13980 { "xtra", no_argument, NULL, 1001 }, 13981 { "xtreme", no_argument, NULL, 1002 }, 13982 { "xtremely", no_argument, NULL, 1003 }, 13983 { NULL, 0, NULL, 0 } 13984 }; 13985 /* This code fails on OpenBSD 5.0. */ 13986 { 13987 static char program[] = "program"; 13988 static char xtremel[] = "--xtremel"; 13989 char *argv[] = { program, xtremel, NULL }; 13990 int option_index; 13991 optind = 1; opterr = 0; 13992 if (getopt_long (2, argv, "", long_options, &option_index) != 1003) 13993 return 1; 13994 } 13995 return 0; 13996 13997 ; 13998 return 0; 13999} 14000_ACEOF 14001if ac_fn_c_try_run "$LINENO"; then : 14002 gl_cv_func_getopt_long_gnu=yes 14003else 14004 gl_cv_func_getopt_long_gnu=no 14005fi 14006rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 14007 conftest.$ac_objext conftest.beam conftest.$ac_ext 14008fi 14009 14010 14011fi 14012{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_getopt_long_gnu" >&5 14013$as_echo "$gl_cv_func_getopt_long_gnu" >&6; } 14014 case "$gl_cv_func_getopt_long_gnu" in 14015 *yes) ;; 14016 *) gl_replace_getopt=yes ;; 14017 esac 14018 fi 14019 fi 14020 14021 14022 14023 14024 14025 14026 REPLACE_GETOPT=0 14027 if test -n "$gl_replace_getopt"; then 14028 REPLACE_GETOPT=1 14029 fi 14030 14031 if test $REPLACE_GETOPT = 1; then 14032 14033 GETOPT_H=getopt.h 14034 14035$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h 14036 14037 14038 14039 fi 14040 14041ac_fn_c_check_decl "$LINENO" "getenv" "ac_cv_have_decl_getenv" "$ac_includes_default" 14042if test "x$ac_cv_have_decl_getenv" = xyes; then : 14043 ac_have_decl=1 14044else 14045 ac_have_decl=0 14046fi 14047 14048cat >>confdefs.h <<_ACEOF 14049#define HAVE_DECL_GETENV $ac_have_decl 14050_ACEOF 14051 14052 14053 14054 14055 14056 14057 14058 14059 if test $ac_cv_type_long_long_int = yes; then 14060 HAVE_LONG_LONG_INT=1 14061 else 14062 HAVE_LONG_LONG_INT=0 14063 fi 14064 14065 14066 if test $ac_cv_type_unsigned_long_long_int = yes; then 14067 HAVE_UNSIGNED_LONG_LONG_INT=1 14068 else 14069 HAVE_UNSIGNED_LONG_LONG_INT=0 14070 fi 14071 14072 14073 14074 if test $ac_cv_header_wchar_h = yes; then 14075 HAVE_WCHAR_H=1 14076 else 14077 HAVE_WCHAR_H=0 14078 fi 14079 14080 14081 if test $ac_cv_header_inttypes_h = yes; then 14082 HAVE_INTTYPES_H=1 14083 else 14084 HAVE_INTTYPES_H=0 14085 fi 14086 14087 14088 if test $ac_cv_header_sys_types_h = yes; then 14089 HAVE_SYS_TYPES_H=1 14090 else 14091 HAVE_SYS_TYPES_H=0 14092 fi 14093 14094 14095 14096 14097 14098 14099 14100 14101 14102 14103 14104 if test $gl_cv_have_include_next = yes; then 14105 gl_cv_next_stdint_h='<'stdint.h'>' 14106 else 14107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdint.h>" >&5 14108$as_echo_n "checking absolute name of <stdint.h>... " >&6; } 14109if ${gl_cv_next_stdint_h+:} false; then : 14110 $as_echo_n "(cached) " >&6 14111else 14112 14113 if test $ac_cv_header_stdint_h = yes; then 14114 14115 14116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14117/* end confdefs.h. */ 14118#include <stdint.h> 14119 14120_ACEOF 14121 case "$host_os" in 14122 aix*) gl_absname_cpp="$ac_cpp -C" ;; 14123 *) gl_absname_cpp="$ac_cpp" ;; 14124 esac 14125 14126 case "$host_os" in 14127 mingw*) 14128 gl_dirsep_regex='[/\\]' 14129 ;; 14130 *) 14131 gl_dirsep_regex='\/' 14132 ;; 14133 esac 14134 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 14135 14136 gl_header_literal_regex=`echo 'stdint.h' \ 14137 | sed -e "$gl_make_literal_regex_sed"` 14138 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 14139 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 14140 s|^/[^/]|//&| 14141 p 14142 q 14143 }' 14144 gl_cv_next_stdint_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 14145 sed -n "$gl_absolute_header_sed"`'"' 14146 else 14147 gl_cv_next_stdint_h='<'stdint.h'>' 14148 fi 14149 14150 14151fi 14152{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdint_h" >&5 14153$as_echo "$gl_cv_next_stdint_h" >&6; } 14154 fi 14155 NEXT_STDINT_H=$gl_cv_next_stdint_h 14156 14157 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 14158 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 14159 gl_next_as_first_directive='<'stdint.h'>' 14160 else 14161 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 14162 gl_next_as_first_directive=$gl_cv_next_stdint_h 14163 fi 14164 NEXT_AS_FIRST_DIRECTIVE_STDINT_H=$gl_next_as_first_directive 14165 14166 14167 14168 14169 if test $ac_cv_header_stdint_h = yes; then 14170 HAVE_STDINT_H=1 14171 else 14172 HAVE_STDINT_H=0 14173 fi 14174 14175 14176 if test $ac_cv_header_stdint_h = yes; then 14177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stdint.h conforms to C99" >&5 14178$as_echo_n "checking whether stdint.h conforms to C99... " >&6; } 14179if ${gl_cv_header_working_stdint_h+:} false; then : 14180 $as_echo_n "(cached) " >&6 14181else 14182 gl_cv_header_working_stdint_h=no 14183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14184/* end confdefs.h. */ 14185 14186 14187#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ 14188#include <stdint.h> 14189/* Dragonfly defines WCHAR_MIN, WCHAR_MAX only in <wchar.h>. */ 14190#if !(defined WCHAR_MIN && defined WCHAR_MAX) 14191#error "WCHAR_MIN, WCHAR_MAX not defined in <stdint.h>" 14192#endif 14193 14194 14195 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 14196 included before <wchar.h>. */ 14197 #include <stddef.h> 14198 #include <signal.h> 14199 #if HAVE_WCHAR_H 14200 # include <stdio.h> 14201 # include <time.h> 14202 # include <wchar.h> 14203 #endif 14204 14205 14206#ifdef INT8_MAX 14207int8_t a1 = INT8_MAX; 14208int8_t a1min = INT8_MIN; 14209#endif 14210#ifdef INT16_MAX 14211int16_t a2 = INT16_MAX; 14212int16_t a2min = INT16_MIN; 14213#endif 14214#ifdef INT32_MAX 14215int32_t a3 = INT32_MAX; 14216int32_t a3min = INT32_MIN; 14217#endif 14218#ifdef INT64_MAX 14219int64_t a4 = INT64_MAX; 14220int64_t a4min = INT64_MIN; 14221#endif 14222#ifdef UINT8_MAX 14223uint8_t b1 = UINT8_MAX; 14224#else 14225typedef int b1[(unsigned char) -1 != 255 ? 1 : -1]; 14226#endif 14227#ifdef UINT16_MAX 14228uint16_t b2 = UINT16_MAX; 14229#endif 14230#ifdef UINT32_MAX 14231uint32_t b3 = UINT32_MAX; 14232#endif 14233#ifdef UINT64_MAX 14234uint64_t b4 = UINT64_MAX; 14235#endif 14236int_least8_t c1 = INT8_C (0x7f); 14237int_least8_t c1max = INT_LEAST8_MAX; 14238int_least8_t c1min = INT_LEAST8_MIN; 14239int_least16_t c2 = INT16_C (0x7fff); 14240int_least16_t c2max = INT_LEAST16_MAX; 14241int_least16_t c2min = INT_LEAST16_MIN; 14242int_least32_t c3 = INT32_C (0x7fffffff); 14243int_least32_t c3max = INT_LEAST32_MAX; 14244int_least32_t c3min = INT_LEAST32_MIN; 14245int_least64_t c4 = INT64_C (0x7fffffffffffffff); 14246int_least64_t c4max = INT_LEAST64_MAX; 14247int_least64_t c4min = INT_LEAST64_MIN; 14248uint_least8_t d1 = UINT8_C (0xff); 14249uint_least8_t d1max = UINT_LEAST8_MAX; 14250uint_least16_t d2 = UINT16_C (0xffff); 14251uint_least16_t d2max = UINT_LEAST16_MAX; 14252uint_least32_t d3 = UINT32_C (0xffffffff); 14253uint_least32_t d3max = UINT_LEAST32_MAX; 14254uint_least64_t d4 = UINT64_C (0xffffffffffffffff); 14255uint_least64_t d4max = UINT_LEAST64_MAX; 14256int_fast8_t e1 = INT_FAST8_MAX; 14257int_fast8_t e1min = INT_FAST8_MIN; 14258int_fast16_t e2 = INT_FAST16_MAX; 14259int_fast16_t e2min = INT_FAST16_MIN; 14260int_fast32_t e3 = INT_FAST32_MAX; 14261int_fast32_t e3min = INT_FAST32_MIN; 14262int_fast64_t e4 = INT_FAST64_MAX; 14263int_fast64_t e4min = INT_FAST64_MIN; 14264uint_fast8_t f1 = UINT_FAST8_MAX; 14265uint_fast16_t f2 = UINT_FAST16_MAX; 14266uint_fast32_t f3 = UINT_FAST32_MAX; 14267uint_fast64_t f4 = UINT_FAST64_MAX; 14268#ifdef INTPTR_MAX 14269intptr_t g = INTPTR_MAX; 14270intptr_t gmin = INTPTR_MIN; 14271#endif 14272#ifdef UINTPTR_MAX 14273uintptr_t h = UINTPTR_MAX; 14274#endif 14275intmax_t i = INTMAX_MAX; 14276uintmax_t j = UINTMAX_MAX; 14277 14278#include <limits.h> /* for CHAR_BIT */ 14279#define TYPE_MINIMUM(t) \ 14280 ((t) ((t) 0 < (t) -1 ? (t) 0 : ~ TYPE_MAXIMUM (t))) 14281#define TYPE_MAXIMUM(t) \ 14282 ((t) ((t) 0 < (t) -1 \ 14283 ? (t) -1 \ 14284 : ((((t) 1 << (sizeof (t) * CHAR_BIT - 2)) - 1) * 2 + 1))) 14285struct s { 14286 int check_PTRDIFF: 14287 PTRDIFF_MIN == TYPE_MINIMUM (ptrdiff_t) 14288 && PTRDIFF_MAX == TYPE_MAXIMUM (ptrdiff_t) 14289 ? 1 : -1; 14290 /* Detect bug in FreeBSD 6.0 / ia64. */ 14291 int check_SIG_ATOMIC: 14292 SIG_ATOMIC_MIN == TYPE_MINIMUM (sig_atomic_t) 14293 && SIG_ATOMIC_MAX == TYPE_MAXIMUM (sig_atomic_t) 14294 ? 1 : -1; 14295 int check_SIZE: SIZE_MAX == TYPE_MAXIMUM (size_t) ? 1 : -1; 14296 int check_WCHAR: 14297 WCHAR_MIN == TYPE_MINIMUM (wchar_t) 14298 && WCHAR_MAX == TYPE_MAXIMUM (wchar_t) 14299 ? 1 : -1; 14300 /* Detect bug in mingw. */ 14301 int check_WINT: 14302 WINT_MIN == TYPE_MINIMUM (wint_t) 14303 && WINT_MAX == TYPE_MAXIMUM (wint_t) 14304 ? 1 : -1; 14305 14306 /* Detect bugs in glibc 2.4 and Solaris 10 stdint.h, among others. */ 14307 int check_UINT8_C: 14308 (-1 < UINT8_C (0)) == (-1 < (uint_least8_t) 0) ? 1 : -1; 14309 int check_UINT16_C: 14310 (-1 < UINT16_C (0)) == (-1 < (uint_least16_t) 0) ? 1 : -1; 14311 14312 /* Detect bugs in OpenBSD 3.9 stdint.h. */ 14313#ifdef UINT8_MAX 14314 int check_uint8: (uint8_t) -1 == UINT8_MAX ? 1 : -1; 14315#endif 14316#ifdef UINT16_MAX 14317 int check_uint16: (uint16_t) -1 == UINT16_MAX ? 1 : -1; 14318#endif 14319#ifdef UINT32_MAX 14320 int check_uint32: (uint32_t) -1 == UINT32_MAX ? 1 : -1; 14321#endif 14322#ifdef UINT64_MAX 14323 int check_uint64: (uint64_t) -1 == UINT64_MAX ? 1 : -1; 14324#endif 14325 int check_uint_least8: (uint_least8_t) -1 == UINT_LEAST8_MAX ? 1 : -1; 14326 int check_uint_least16: (uint_least16_t) -1 == UINT_LEAST16_MAX ? 1 : -1; 14327 int check_uint_least32: (uint_least32_t) -1 == UINT_LEAST32_MAX ? 1 : -1; 14328 int check_uint_least64: (uint_least64_t) -1 == UINT_LEAST64_MAX ? 1 : -1; 14329 int check_uint_fast8: (uint_fast8_t) -1 == UINT_FAST8_MAX ? 1 : -1; 14330 int check_uint_fast16: (uint_fast16_t) -1 == UINT_FAST16_MAX ? 1 : -1; 14331 int check_uint_fast32: (uint_fast32_t) -1 == UINT_FAST32_MAX ? 1 : -1; 14332 int check_uint_fast64: (uint_fast64_t) -1 == UINT_FAST64_MAX ? 1 : -1; 14333 int check_uintptr: (uintptr_t) -1 == UINTPTR_MAX ? 1 : -1; 14334 int check_uintmax: (uintmax_t) -1 == UINTMAX_MAX ? 1 : -1; 14335 int check_size: (size_t) -1 == SIZE_MAX ? 1 : -1; 14336}; 14337 14338int 14339main () 14340{ 14341 14342 ; 14343 return 0; 14344} 14345_ACEOF 14346if ac_fn_c_try_compile "$LINENO"; then : 14347 if test "$cross_compiling" = yes; then : 14348 gl_cv_header_working_stdint_h=yes 14349 14350else 14351 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14352/* end confdefs.h. */ 14353 14354 14355#define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 1 /* work if build isn't clean */ 14356#include <stdint.h> 14357 14358 14359 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 14360 included before <wchar.h>. */ 14361 #include <stddef.h> 14362 #include <signal.h> 14363 #if HAVE_WCHAR_H 14364 # include <stdio.h> 14365 # include <time.h> 14366 # include <wchar.h> 14367 #endif 14368 14369 14370#include <stdio.h> 14371#include <string.h> 14372#define MVAL(macro) MVAL1(macro) 14373#define MVAL1(expression) #expression 14374static const char *macro_values[] = 14375 { 14376#ifdef INT8_MAX 14377 MVAL (INT8_MAX), 14378#endif 14379#ifdef INT16_MAX 14380 MVAL (INT16_MAX), 14381#endif 14382#ifdef INT32_MAX 14383 MVAL (INT32_MAX), 14384#endif 14385#ifdef INT64_MAX 14386 MVAL (INT64_MAX), 14387#endif 14388#ifdef UINT8_MAX 14389 MVAL (UINT8_MAX), 14390#endif 14391#ifdef UINT16_MAX 14392 MVAL (UINT16_MAX), 14393#endif 14394#ifdef UINT32_MAX 14395 MVAL (UINT32_MAX), 14396#endif 14397#ifdef UINT64_MAX 14398 MVAL (UINT64_MAX), 14399#endif 14400 NULL 14401 }; 14402 14403int 14404main () 14405{ 14406 14407 const char **mv; 14408 for (mv = macro_values; *mv != NULL; mv++) 14409 { 14410 const char *value = *mv; 14411 /* Test whether it looks like a cast expression. */ 14412 if (strncmp (value, "((unsigned int)"/*)*/, 15) == 0 14413 || strncmp (value, "((unsigned short)"/*)*/, 17) == 0 14414 || strncmp (value, "((unsigned char)"/*)*/, 16) == 0 14415 || strncmp (value, "((int)"/*)*/, 6) == 0 14416 || strncmp (value, "((signed short)"/*)*/, 15) == 0 14417 || strncmp (value, "((signed char)"/*)*/, 14) == 0) 14418 return mv - macro_values + 1; 14419 } 14420 return 0; 14421 14422 ; 14423 return 0; 14424} 14425_ACEOF 14426if ac_fn_c_try_run "$LINENO"; then : 14427 gl_cv_header_working_stdint_h=yes 14428fi 14429rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 14430 conftest.$ac_objext conftest.beam conftest.$ac_ext 14431fi 14432 14433 14434fi 14435rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14436 14437fi 14438{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_stdint_h" >&5 14439$as_echo "$gl_cv_header_working_stdint_h" >&6; } 14440 fi 14441 if test "$gl_cv_header_working_stdint_h" = yes; then 14442 STDINT_H= 14443 else 14444 for ac_header in sys/inttypes.h sys/bitypes.h 14445do : 14446 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 14447ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 14448if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 14449 cat >>confdefs.h <<_ACEOF 14450#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 14451_ACEOF 14452 14453fi 14454 14455done 14456 14457 if test $ac_cv_header_sys_inttypes_h = yes; then 14458 HAVE_SYS_INTTYPES_H=1 14459 else 14460 HAVE_SYS_INTTYPES_H=0 14461 fi 14462 14463 if test $ac_cv_header_sys_bitypes_h = yes; then 14464 HAVE_SYS_BITYPES_H=1 14465 else 14466 HAVE_SYS_BITYPES_H=0 14467 fi 14468 14469 14470 14471 14472 if test $APPLE_UNIVERSAL_BUILD = 0; then 14473 14474 14475 for gltype in ptrdiff_t size_t ; do 14476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 14477$as_echo_n "checking for bit size of $gltype... " >&6; } 14478if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : 14479 $as_echo_n "(cached) " >&6 14480else 14481 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " 14482 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 14483 included before <wchar.h>. */ 14484 #include <stddef.h> 14485 #include <signal.h> 14486 #if HAVE_WCHAR_H 14487 # include <stdio.h> 14488 # include <time.h> 14489 # include <wchar.h> 14490 #endif 14491 14492#include <limits.h>"; then : 14493 14494else 14495 result=unknown 14496fi 14497 14498 eval gl_cv_bitsizeof_${gltype}=\$result 14499 14500fi 14501eval ac_res=\$gl_cv_bitsizeof_${gltype} 14502 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 14503$as_echo "$ac_res" >&6; } 14504 eval result=\$gl_cv_bitsizeof_${gltype} 14505 if test $result = unknown; then 14506 result=0 14507 fi 14508 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` 14509 cat >>confdefs.h <<_ACEOF 14510#define BITSIZEOF_${GLTYPE} $result 14511_ACEOF 14512 14513 eval BITSIZEOF_${GLTYPE}=\$result 14514 done 14515 14516 14517 fi 14518 14519 14520 for gltype in sig_atomic_t wchar_t wint_t ; do 14521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for bit size of $gltype" >&5 14522$as_echo_n "checking for bit size of $gltype... " >&6; } 14523if eval \${gl_cv_bitsizeof_${gltype}+:} false; then : 14524 $as_echo_n "(cached) " >&6 14525else 14526 if ac_fn_c_compute_int "$LINENO" "sizeof ($gltype) * CHAR_BIT" "result" " 14527 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 14528 included before <wchar.h>. */ 14529 #include <stddef.h> 14530 #include <signal.h> 14531 #if HAVE_WCHAR_H 14532 # include <stdio.h> 14533 # include <time.h> 14534 # include <wchar.h> 14535 #endif 14536 14537#include <limits.h>"; then : 14538 14539else 14540 result=unknown 14541fi 14542 14543 eval gl_cv_bitsizeof_${gltype}=\$result 14544 14545fi 14546eval ac_res=\$gl_cv_bitsizeof_${gltype} 14547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 14548$as_echo "$ac_res" >&6; } 14549 eval result=\$gl_cv_bitsizeof_${gltype} 14550 if test $result = unknown; then 14551 result=0 14552 fi 14553 GLTYPE=`echo "$gltype" | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` 14554 cat >>confdefs.h <<_ACEOF 14555#define BITSIZEOF_${GLTYPE} $result 14556_ACEOF 14557 14558 eval BITSIZEOF_${GLTYPE}=\$result 14559 done 14560 14561 14562 14563 14564 for gltype in sig_atomic_t wchar_t wint_t ; do 14565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gltype is signed" >&5 14566$as_echo_n "checking whether $gltype is signed... " >&6; } 14567if eval \${gl_cv_type_${gltype}_signed+:} false; then : 14568 $as_echo_n "(cached) " >&6 14569else 14570 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14571/* end confdefs.h. */ 14572 14573 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 14574 included before <wchar.h>. */ 14575 #include <stddef.h> 14576 #include <signal.h> 14577 #if HAVE_WCHAR_H 14578 # include <stdio.h> 14579 # include <time.h> 14580 # include <wchar.h> 14581 #endif 14582 14583 int verify[2 * (($gltype) -1 < ($gltype) 0) - 1]; 14584int 14585main () 14586{ 14587 14588 ; 14589 return 0; 14590} 14591_ACEOF 14592if ac_fn_c_try_compile "$LINENO"; then : 14593 result=yes 14594else 14595 result=no 14596fi 14597rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14598 eval gl_cv_type_${gltype}_signed=\$result 14599 14600fi 14601eval ac_res=\$gl_cv_type_${gltype}_signed 14602 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 14603$as_echo "$ac_res" >&6; } 14604 eval result=\$gl_cv_type_${gltype}_signed 14605 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` 14606 if test "$result" = yes; then 14607 cat >>confdefs.h <<_ACEOF 14608#define HAVE_SIGNED_${GLTYPE} 1 14609_ACEOF 14610 14611 eval HAVE_SIGNED_${GLTYPE}=1 14612 else 14613 eval HAVE_SIGNED_${GLTYPE}=0 14614 fi 14615 done 14616 14617 14618 gl_cv_type_ptrdiff_t_signed=yes 14619 gl_cv_type_size_t_signed=no 14620 if test $APPLE_UNIVERSAL_BUILD = 0; then 14621 14622 14623 for gltype in ptrdiff_t size_t ; do 14624 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 14625$as_echo_n "checking for $gltype integer literal suffix... " >&6; } 14626if eval \${gl_cv_type_${gltype}_suffix+:} false; then : 14627 $as_echo_n "(cached) " >&6 14628else 14629 eval gl_cv_type_${gltype}_suffix=no 14630 eval result=\$gl_cv_type_${gltype}_signed 14631 if test "$result" = yes; then 14632 glsufu= 14633 else 14634 glsufu=u 14635 fi 14636 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do 14637 case $glsuf in 14638 '') gltype1='int';; 14639 l) gltype1='long int';; 14640 ll) gltype1='long long int';; 14641 i64) gltype1='__int64';; 14642 u) gltype1='unsigned int';; 14643 ul) gltype1='unsigned long int';; 14644 ull) gltype1='unsigned long long int';; 14645 ui64)gltype1='unsigned __int64';; 14646 esac 14647 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14648/* end confdefs.h. */ 14649 14650 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 14651 included before <wchar.h>. */ 14652 #include <stddef.h> 14653 #include <signal.h> 14654 #if HAVE_WCHAR_H 14655 # include <stdio.h> 14656 # include <time.h> 14657 # include <wchar.h> 14658 #endif 14659 14660 extern $gltype foo; 14661 extern $gltype1 foo; 14662int 14663main () 14664{ 14665 14666 ; 14667 return 0; 14668} 14669_ACEOF 14670if ac_fn_c_try_compile "$LINENO"; then : 14671 eval gl_cv_type_${gltype}_suffix=\$glsuf 14672fi 14673rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14674 eval result=\$gl_cv_type_${gltype}_suffix 14675 test "$result" != no && break 14676 done 14677fi 14678eval ac_res=\$gl_cv_type_${gltype}_suffix 14679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 14680$as_echo "$ac_res" >&6; } 14681 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` 14682 eval result=\$gl_cv_type_${gltype}_suffix 14683 test "$result" = no && result= 14684 eval ${GLTYPE}_SUFFIX=\$result 14685 cat >>confdefs.h <<_ACEOF 14686#define ${GLTYPE}_SUFFIX $result 14687_ACEOF 14688 14689 done 14690 14691 14692 fi 14693 14694 14695 for gltype in sig_atomic_t wchar_t wint_t ; do 14696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $gltype integer literal suffix" >&5 14697$as_echo_n "checking for $gltype integer literal suffix... " >&6; } 14698if eval \${gl_cv_type_${gltype}_suffix+:} false; then : 14699 $as_echo_n "(cached) " >&6 14700else 14701 eval gl_cv_type_${gltype}_suffix=no 14702 eval result=\$gl_cv_type_${gltype}_signed 14703 if test "$result" = yes; then 14704 glsufu= 14705 else 14706 glsufu=u 14707 fi 14708 for glsuf in "$glsufu" ${glsufu}l ${glsufu}ll ${glsufu}i64; do 14709 case $glsuf in 14710 '') gltype1='int';; 14711 l) gltype1='long int';; 14712 ll) gltype1='long long int';; 14713 i64) gltype1='__int64';; 14714 u) gltype1='unsigned int';; 14715 ul) gltype1='unsigned long int';; 14716 ull) gltype1='unsigned long long int';; 14717 ui64)gltype1='unsigned __int64';; 14718 esac 14719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14720/* end confdefs.h. */ 14721 14722 /* BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 14723 included before <wchar.h>. */ 14724 #include <stddef.h> 14725 #include <signal.h> 14726 #if HAVE_WCHAR_H 14727 # include <stdio.h> 14728 # include <time.h> 14729 # include <wchar.h> 14730 #endif 14731 14732 extern $gltype foo; 14733 extern $gltype1 foo; 14734int 14735main () 14736{ 14737 14738 ; 14739 return 0; 14740} 14741_ACEOF 14742if ac_fn_c_try_compile "$LINENO"; then : 14743 eval gl_cv_type_${gltype}_suffix=\$glsuf 14744fi 14745rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14746 eval result=\$gl_cv_type_${gltype}_suffix 14747 test "$result" != no && break 14748 done 14749fi 14750eval ac_res=\$gl_cv_type_${gltype}_suffix 14751 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 14752$as_echo "$ac_res" >&6; } 14753 GLTYPE=`echo $gltype | tr 'abcdefghijklmnopqrstuvwxyz ' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ_'` 14754 eval result=\$gl_cv_type_${gltype}_suffix 14755 test "$result" = no && result= 14756 eval ${GLTYPE}_SUFFIX=\$result 14757 cat >>confdefs.h <<_ACEOF 14758#define ${GLTYPE}_SUFFIX $result 14759_ACEOF 14760 14761 done 14762 14763 14764 14765 if test $BITSIZEOF_WINT_T -lt 32; then 14766 BITSIZEOF_WINT_T=32 14767 fi 14768 14769 STDINT_H=stdint.h 14770 fi 14771 14772 if test -n "$STDINT_H"; then 14773 GL_GENERATE_STDINT_H_TRUE= 14774 GL_GENERATE_STDINT_H_FALSE='#' 14775else 14776 GL_GENERATE_STDINT_H_TRUE='#' 14777 GL_GENERATE_STDINT_H_FALSE= 14778fi 14779 14780 14781 14782 14783 14784 GNULIB_IMAXABS=0; 14785 GNULIB_IMAXDIV=0; 14786 GNULIB_STRTOIMAX=0; 14787 GNULIB_STRTOUMAX=0; 14788 HAVE_DECL_IMAXABS=1; 14789 HAVE_DECL_IMAXDIV=1; 14790 HAVE_DECL_STRTOIMAX=1; 14791 HAVE_DECL_STRTOUMAX=1; 14792 REPLACE_STRTOIMAX=0; 14793 INT32_MAX_LT_INTMAX_MAX=1; 14794 INT64_MAX_EQ_LONG_MAX='defined _LP64'; 14795 PRI_MACROS_BROKEN=0; 14796 PRIPTR_PREFIX=__PRIPTR_PREFIX; 14797 UINT32_MAX_LT_UINTMAX_MAX=1; 14798 UINT64_MAX_EQ_ULONG_MAX='defined _LP64'; 14799 14800 14801 14802 14803 14804 14805 14806 14807 14808 14809 14810 14811 14812 14813 14814 if test $gl_cv_have_include_next = yes; then 14815 gl_cv_next_inttypes_h='<'inttypes.h'>' 14816 else 14817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <inttypes.h>" >&5 14818$as_echo_n "checking absolute name of <inttypes.h>... " >&6; } 14819if ${gl_cv_next_inttypes_h+:} false; then : 14820 $as_echo_n "(cached) " >&6 14821else 14822 14823 if test $ac_cv_header_inttypes_h = yes; then 14824 14825 14826 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14827/* end confdefs.h. */ 14828#include <inttypes.h> 14829 14830_ACEOF 14831 case "$host_os" in 14832 aix*) gl_absname_cpp="$ac_cpp -C" ;; 14833 *) gl_absname_cpp="$ac_cpp" ;; 14834 esac 14835 14836 case "$host_os" in 14837 mingw*) 14838 gl_dirsep_regex='[/\\]' 14839 ;; 14840 *) 14841 gl_dirsep_regex='\/' 14842 ;; 14843 esac 14844 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 14845 14846 gl_header_literal_regex=`echo 'inttypes.h' \ 14847 | sed -e "$gl_make_literal_regex_sed"` 14848 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 14849 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 14850 s|^/[^/]|//&| 14851 p 14852 q 14853 }' 14854 gl_cv_next_inttypes_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 14855 sed -n "$gl_absolute_header_sed"`'"' 14856 else 14857 gl_cv_next_inttypes_h='<'inttypes.h'>' 14858 fi 14859 14860 14861fi 14862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_inttypes_h" >&5 14863$as_echo "$gl_cv_next_inttypes_h" >&6; } 14864 fi 14865 NEXT_INTTYPES_H=$gl_cv_next_inttypes_h 14866 14867 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 14868 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 14869 gl_next_as_first_directive='<'inttypes.h'>' 14870 else 14871 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 14872 gl_next_as_first_directive=$gl_cv_next_inttypes_h 14873 fi 14874 NEXT_AS_FIRST_DIRECTIVE_INTTYPES_H=$gl_next_as_first_directive 14875 14876 14877 14878 14879 14880 14881 14882 14883 for gl_func in imaxabs imaxdiv strtoimax strtoumax; do 14884 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` 14885 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 14886$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } 14887if eval \${$as_gl_Symbol+:} false; then : 14888 $as_echo_n "(cached) " >&6 14889else 14890 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14891/* end confdefs.h. */ 14892#include <inttypes.h> 14893 14894int 14895main () 14896{ 14897#undef $gl_func 14898 (void) $gl_func; 14899 ; 14900 return 0; 14901} 14902_ACEOF 14903if ac_fn_c_try_compile "$LINENO"; then : 14904 eval "$as_gl_Symbol=yes" 14905else 14906 eval "$as_gl_Symbol=no" 14907fi 14908rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14909fi 14910eval ac_res=\$$as_gl_Symbol 14911 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 14912$as_echo "$ac_res" >&6; } 14913 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : 14914 cat >>confdefs.h <<_ACEOF 14915#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 14916_ACEOF 14917 14918 eval ac_cv_have_decl_$gl_func=yes 14919fi 14920 done 14921 14922 14923 14924 for ac_header in inttypes.h 14925do : 14926 ac_fn_c_check_header_mongrel "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" 14927if test "x$ac_cv_header_inttypes_h" = xyes; then : 14928 cat >>confdefs.h <<_ACEOF 14929#define HAVE_INTTYPES_H 1 14930_ACEOF 14931 14932fi 14933 14934done 14935 14936 if test $ac_cv_header_inttypes_h = yes; then 14937 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the inttypes.h PRIxNN macros are broken" >&5 14938$as_echo_n "checking whether the inttypes.h PRIxNN macros are broken... " >&6; } 14939if ${gt_cv_inttypes_pri_broken+:} false; then : 14940 $as_echo_n "(cached) " >&6 14941else 14942 14943 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14944/* end confdefs.h. */ 14945 14946#include <inttypes.h> 14947#ifdef PRId32 14948char *p = PRId32; 14949#endif 14950 14951int 14952main () 14953{ 14954 14955 ; 14956 return 0; 14957} 14958_ACEOF 14959if ac_fn_c_try_compile "$LINENO"; then : 14960 gt_cv_inttypes_pri_broken=no 14961else 14962 gt_cv_inttypes_pri_broken=yes 14963fi 14964rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 14965 14966fi 14967{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_inttypes_pri_broken" >&5 14968$as_echo "$gt_cv_inttypes_pri_broken" >&6; } 14969 fi 14970 if test "$gt_cv_inttypes_pri_broken" = yes; then 14971 14972cat >>confdefs.h <<_ACEOF 14973#define PRI_MACROS_BROKEN 1 14974_ACEOF 14975 14976 PRI_MACROS_BROKEN=1 14977 else 14978 PRI_MACROS_BROKEN=0 14979 fi 14980 14981 14982 14983 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5 14984$as_echo_n "checking where to find the exponent in a 'float'... " >&6; } 14985if ${gl_cv_cc_float_expbit0+:} false; then : 14986 $as_echo_n "(cached) " >&6 14987else 14988 14989 if test "$cross_compiling" = yes; then : 14990 gl_cv_cc_float_expbit0="word 0 bit 23" 14991else 14992 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 14993/* end confdefs.h. */ 14994 14995#include <float.h> 14996#include <stddef.h> 14997#include <stdio.h> 14998#include <string.h> 14999#define NWORDS \ 15000 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 15001typedef union { float value; unsigned int word[NWORDS]; } memory_float; 15002static unsigned int ored_words[NWORDS]; 15003static unsigned int anded_words[NWORDS]; 15004static void add_to_ored_words (float x) 15005{ 15006 memory_float m; 15007 size_t i; 15008 /* Clear it first, in case 15009 sizeof (float) < sizeof (memory_float). */ 15010 memset (&m, 0, sizeof (memory_float)); 15011 m.value = x; 15012 for (i = 0; i < NWORDS; i++) 15013 { 15014 ored_words[i] |= m.word[i]; 15015 anded_words[i] &= m.word[i]; 15016 } 15017} 15018int main () 15019{ 15020 size_t j; 15021 FILE *fp = fopen ("conftest.out", "w"); 15022 if (fp == NULL) 15023 return 1; 15024 for (j = 0; j < NWORDS; j++) 15025 anded_words[j] = ~ (unsigned int) 0; 15026 add_to_ored_words (0.25f); 15027 add_to_ored_words (0.5f); 15028 add_to_ored_words (1.0f); 15029 add_to_ored_words (2.0f); 15030 add_to_ored_words (4.0f); 15031 /* Remove bits that are common (e.g. if representation of the first mantissa 15032 bit is explicit). */ 15033 for (j = 0; j < NWORDS; j++) 15034 ored_words[j] &= ~anded_words[j]; 15035 /* Now find the nonzero word. */ 15036 for (j = 0; j < NWORDS; j++) 15037 if (ored_words[j] != 0) 15038 break; 15039 if (j < NWORDS) 15040 { 15041 size_t i; 15042 for (i = j + 1; i < NWORDS; i++) 15043 if (ored_words[i] != 0) 15044 { 15045 fprintf (fp, "unknown"); 15046 return (fclose (fp) != 0); 15047 } 15048 for (i = 0; ; i++) 15049 if ((ored_words[j] >> i) & 1) 15050 { 15051 fprintf (fp, "word %d bit %d", (int) j, (int) i); 15052 return (fclose (fp) != 0); 15053 } 15054 } 15055 fprintf (fp, "unknown"); 15056 return (fclose (fp) != 0); 15057} 15058 15059_ACEOF 15060if ac_fn_c_try_run "$LINENO"; then : 15061 gl_cv_cc_float_expbit0=`cat conftest.out` 15062else 15063 gl_cv_cc_float_expbit0="unknown" 15064fi 15065rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 15066 conftest.$ac_objext conftest.beam conftest.$ac_ext 15067fi 15068 15069 rm -f conftest.out 15070 15071fi 15072{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5 15073$as_echo "$gl_cv_cc_float_expbit0" >&6; } 15074 case "$gl_cv_cc_float_expbit0" in 15075 word*bit*) 15076 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` 15077 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` 15078 15079cat >>confdefs.h <<_ACEOF 15080#define FLT_EXPBIT0_WORD $word 15081_ACEOF 15082 15083 15084cat >>confdefs.h <<_ACEOF 15085#define FLT_EXPBIT0_BIT $bit 15086_ACEOF 15087 15088 ;; 15089 esac 15090 15091 15092 15093 ISNANF_LIBM= 15094 15095 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5 15096$as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; } 15097if ${gl_cv_func_isnanf_no_libm+:} false; then : 15098 $as_echo_n "(cached) " >&6 15099else 15100 15101 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15102/* end confdefs.h. */ 15103#include <math.h> 15104 #if __GNUC__ >= 4 15105 # undef isnanf 15106 # define isnanf(x) __builtin_isnanf ((float)(x)) 15107 #elif defined isnan 15108 # undef isnanf 15109 # define isnanf(x) isnan ((float)(x)) 15110 #endif 15111 float x; 15112int 15113main () 15114{ 15115return isnanf (x); 15116 ; 15117 return 0; 15118} 15119_ACEOF 15120if ac_fn_c_try_link "$LINENO"; then : 15121 gl_cv_func_isnanf_no_libm=yes 15122else 15123 gl_cv_func_isnanf_no_libm=no 15124fi 15125rm -f core conftest.err conftest.$ac_objext \ 15126 conftest$ac_exeext conftest.$ac_ext 15127 15128fi 15129{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5 15130$as_echo "$gl_cv_func_isnanf_no_libm" >&6; } 15131 15132 if test $gl_cv_func_isnanf_no_libm = no; then 15133 15134 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used with libm" >&5 15135$as_echo_n "checking whether isnan(float) can be used with libm... " >&6; } 15136if ${gl_cv_func_isnanf_in_libm+:} false; then : 15137 $as_echo_n "(cached) " >&6 15138else 15139 15140 save_LIBS="$LIBS" 15141 LIBS="$LIBS -lm" 15142 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15143/* end confdefs.h. */ 15144#include <math.h> 15145 #if __GNUC__ >= 4 15146 # undef isnanf 15147 # define isnanf(x) __builtin_isnanf ((float)(x)) 15148 #elif defined isnan 15149 # undef isnanf 15150 # define isnanf(x) isnan ((float)(x)) 15151 #endif 15152 float x; 15153int 15154main () 15155{ 15156return isnanf (x); 15157 ; 15158 return 0; 15159} 15160_ACEOF 15161if ac_fn_c_try_link "$LINENO"; then : 15162 gl_cv_func_isnanf_in_libm=yes 15163else 15164 gl_cv_func_isnanf_in_libm=no 15165fi 15166rm -f core conftest.err conftest.$ac_objext \ 15167 conftest$ac_exeext conftest.$ac_ext 15168 LIBS="$save_LIBS" 15169 15170fi 15171{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_in_libm" >&5 15172$as_echo "$gl_cv_func_isnanf_in_libm" >&6; } 15173 15174 if test $gl_cv_func_isnanf_in_libm = yes; then 15175 ISNANF_LIBM=-lm 15176 fi 15177 fi 15178 if test $gl_cv_func_isnanf_no_libm = yes \ 15179 || test $gl_cv_func_isnanf_in_libm = yes; then 15180 save_LIBS="$LIBS" 15181 LIBS="$LIBS $ISNANF_LIBM" 15182 15183 15184 15185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5 15186$as_echo_n "checking whether isnan(float) works... " >&6; } 15187if ${gl_cv_func_isnanf_works+:} false; then : 15188 $as_echo_n "(cached) " >&6 15189else 15190 15191 if test "$cross_compiling" = yes; then : 15192 case "$host_os" in 15193 irix* | solaris*) gl_cv_func_isnanf_works="guessing no";; 15194 *) gl_cv_func_isnanf_works="guessing yes";; 15195 esac 15196 15197else 15198 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15199/* end confdefs.h. */ 15200 15201#include <math.h> 15202#if __GNUC__ >= 4 15203# undef isnanf 15204# define isnanf(x) __builtin_isnanf ((float)(x)) 15205#elif defined isnan 15206# undef isnanf 15207# define isnanf(x) isnan ((float)(x)) 15208#endif 15209/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */ 15210#ifdef __DECC 15211static float 15212NaN () 15213{ 15214 static float zero = 0.0f; 15215 return zero / zero; 15216} 15217#else 15218# define NaN() (0.0f / 0.0f) 15219#endif 15220#define NWORDS \ 15221 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 15222typedef union { unsigned int word[NWORDS]; float value; } memory_float; 15223int main() 15224{ 15225 int result = 0; 15226 15227 if (isnanf (1.0f / 0.0f)) 15228 result |= 1; 15229 15230 if (!isnanf (NaN ())) 15231 result |= 2; 15232 15233#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT 15234 /* The isnanf function should be immune against changes in the sign bit and 15235 in the mantissa bits. The xor operation twiddles a bit that can only be 15236 a sign bit or a mantissa bit. */ 15237 if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0) 15238 { 15239 memory_float m; 15240 15241 m.value = NaN (); 15242 /* Set the bits below the exponent to 01111...111. */ 15243 m.word[0] &= -1U << FLT_EXPBIT0_BIT; 15244 m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1; 15245 if (!isnanf (m.value)) 15246 result |= 4; 15247 } 15248#endif 15249 15250 return result; 15251} 15252_ACEOF 15253if ac_fn_c_try_run "$LINENO"; then : 15254 gl_cv_func_isnanf_works=yes 15255else 15256 gl_cv_func_isnanf_works=no 15257fi 15258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 15259 conftest.$ac_objext conftest.beam conftest.$ac_ext 15260fi 15261 15262 15263fi 15264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5 15265$as_echo "$gl_cv_func_isnanf_works" >&6; } 15266 15267 LIBS="$save_LIBS" 15268 case "$gl_cv_func_isnanf_works" in 15269 *yes) gl_func_isnanf=yes ;; 15270 *) gl_func_isnanf=no; ISNANF_LIBM= ;; 15271 esac 15272 else 15273 gl_func_isnanf=no 15274 fi 15275 if test $gl_func_isnanf != yes; then 15276 HAVE_ISNANF=0 15277 fi 15278 15279 15280 15281 15282 ISNAND_LIBM= 15283 15284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5 15285$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; } 15286if ${gl_cv_func_isnand_no_libm+:} false; then : 15287 $as_echo_n "(cached) " >&6 15288else 15289 15290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15291/* end confdefs.h. */ 15292#include <math.h> 15293 #if __GNUC__ >= 4 15294 # undef isnand 15295 # define isnand(x) __builtin_isnan ((double)(x)) 15296 #else 15297 # undef isnand 15298 # define isnand(x) isnan ((double)(x)) 15299 #endif 15300 double x; 15301int 15302main () 15303{ 15304return isnand (x); 15305 ; 15306 return 0; 15307} 15308_ACEOF 15309if ac_fn_c_try_link "$LINENO"; then : 15310 gl_cv_func_isnand_no_libm=yes 15311else 15312 gl_cv_func_isnand_no_libm=no 15313fi 15314rm -f core conftest.err conftest.$ac_objext \ 15315 conftest$ac_exeext conftest.$ac_ext 15316 15317fi 15318{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5 15319$as_echo "$gl_cv_func_isnand_no_libm" >&6; } 15320 15321 if test $gl_cv_func_isnand_no_libm = no; then 15322 15323 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used with libm" >&5 15324$as_echo_n "checking whether isnan(double) can be used with libm... " >&6; } 15325if ${gl_cv_func_isnand_in_libm+:} false; then : 15326 $as_echo_n "(cached) " >&6 15327else 15328 15329 save_LIBS="$LIBS" 15330 LIBS="$LIBS -lm" 15331 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15332/* end confdefs.h. */ 15333#include <math.h> 15334 #if __GNUC__ >= 4 15335 # undef isnand 15336 # define isnand(x) __builtin_isnan ((double)(x)) 15337 #elif defined isnan 15338 # undef isnand 15339 # define isnand(x) isnan ((double)(x)) 15340 #endif 15341 double x; 15342int 15343main () 15344{ 15345return isnand (x); 15346 ; 15347 return 0; 15348} 15349_ACEOF 15350if ac_fn_c_try_link "$LINENO"; then : 15351 gl_cv_func_isnand_in_libm=yes 15352else 15353 gl_cv_func_isnand_in_libm=no 15354fi 15355rm -f core conftest.err conftest.$ac_objext \ 15356 conftest$ac_exeext conftest.$ac_ext 15357 LIBS="$save_LIBS" 15358 15359fi 15360{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_in_libm" >&5 15361$as_echo "$gl_cv_func_isnand_in_libm" >&6; } 15362 15363 if test $gl_cv_func_isnand_in_libm = yes; then 15364 ISNAND_LIBM=-lm 15365 fi 15366 fi 15367 if test $gl_cv_func_isnand_no_libm = yes \ 15368 || test $gl_cv_func_isnand_in_libm = yes; then 15369 gl_func_isnand=yes 15370 else 15371 gl_func_isnand=no 15372 HAVE_ISNAND=0 15373 fi 15374 15375 15376 15377 15378 ISNANL_LIBM= 15379 15380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5 15381$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; } 15382if ${gl_cv_func_isnanl_no_libm+:} false; then : 15383 $as_echo_n "(cached) " >&6 15384else 15385 15386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15387/* end confdefs.h. */ 15388#include <math.h> 15389 #if __GNUC__ >= 4 15390 # undef isnanl 15391 # define isnanl(x) __builtin_isnanl ((long double)(x)) 15392 #elif defined isnan 15393 # undef isnanl 15394 # define isnanl(x) isnan ((long double)(x)) 15395 #endif 15396 long double x; 15397int 15398main () 15399{ 15400return isnanl (x); 15401 ; 15402 return 0; 15403} 15404_ACEOF 15405if ac_fn_c_try_link "$LINENO"; then : 15406 gl_cv_func_isnanl_no_libm=yes 15407else 15408 gl_cv_func_isnanl_no_libm=no 15409fi 15410rm -f core conftest.err conftest.$ac_objext \ 15411 conftest$ac_exeext conftest.$ac_ext 15412 15413fi 15414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5 15415$as_echo "$gl_cv_func_isnanl_no_libm" >&6; } 15416 15417 if test $gl_cv_func_isnanl_no_libm = no; then 15418 15419 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used with libm" >&5 15420$as_echo_n "checking whether isnan(long double) can be used with libm... " >&6; } 15421if ${gl_cv_func_isnanl_in_libm+:} false; then : 15422 $as_echo_n "(cached) " >&6 15423else 15424 15425 save_LIBS="$LIBS" 15426 LIBS="$LIBS -lm" 15427 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15428/* end confdefs.h. */ 15429#include <math.h> 15430 #if __GNUC__ >= 4 15431 # undef isnanl 15432 # define isnanl(x) __builtin_isnanl ((long double)(x)) 15433 #elif defined isnan 15434 # undef isnanl 15435 # define isnanl(x) isnan ((long double)(x)) 15436 #endif 15437 long double x; 15438int 15439main () 15440{ 15441return isnanl (x); 15442 ; 15443 return 0; 15444} 15445_ACEOF 15446if ac_fn_c_try_link "$LINENO"; then : 15447 gl_cv_func_isnanl_in_libm=yes 15448else 15449 gl_cv_func_isnanl_in_libm=no 15450fi 15451rm -f core conftest.err conftest.$ac_objext \ 15452 conftest$ac_exeext conftest.$ac_ext 15453 LIBS="$save_LIBS" 15454 15455fi 15456{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_in_libm" >&5 15457$as_echo "$gl_cv_func_isnanl_in_libm" >&6; } 15458 15459 if test $gl_cv_func_isnanl_in_libm = yes; then 15460 ISNANL_LIBM=-lm 15461 fi 15462 fi 15463 if test $gl_cv_func_isnanl_no_libm = yes \ 15464 || test $gl_cv_func_isnanl_in_libm = yes; then 15465 save_LIBS="$LIBS" 15466 LIBS="$LIBS $ISNANL_LIBM" 15467 15468 15469 15470 15471 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5 15472$as_echo_n "checking whether isnanl works... " >&6; } 15473if ${gl_cv_func_isnanl_works+:} false; then : 15474 $as_echo_n "(cached) " >&6 15475else 15476 15477 if test "$cross_compiling" = yes; then : 15478 case "$host_cpu" in 15479 # Guess no on ia64, x86_64, i386. 15480 ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";; 15481 *) 15482 case "$host_os" in 15483 netbsd*) gl_cv_func_isnanl_works="guessing no";; 15484 *) gl_cv_func_isnanl_works="guessing yes";; 15485 esac 15486 ;; 15487 esac 15488 15489else 15490 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15491/* end confdefs.h. */ 15492 15493#include <float.h> 15494#include <limits.h> 15495#include <math.h> 15496#if __GNUC__ >= 4 15497# undef isnanl 15498# define isnanl(x) __builtin_isnanl ((long double)(x)) 15499#elif defined isnan 15500# undef isnanl 15501# define isnanl(x) isnan ((long double)(x)) 15502#endif 15503#define NWORDS \ 15504 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 15505typedef union { unsigned int word[NWORDS]; long double value; } 15506 memory_long_double; 15507/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the 15508 runtime type conversion. */ 15509#ifdef __sgi 15510static long double NaNl () 15511{ 15512 double zero = 0.0; 15513 return zero / zero; 15514} 15515#else 15516# define NaNl() (0.0L / 0.0L) 15517#endif 15518int main () 15519{ 15520 int result = 0; 15521 15522 if (!isnanl (NaNl ())) 15523 result |= 1; 15524 15525 { 15526 memory_long_double m; 15527 unsigned int i; 15528 15529 /* The isnanl function should be immune against changes in the sign bit and 15530 in the mantissa bits. The xor operation twiddles a bit that can only be 15531 a sign bit or a mantissa bit (since the exponent never extends to 15532 bit 31). */ 15533 m.value = NaNl (); 15534 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); 15535 for (i = 0; i < NWORDS; i++) 15536 m.word[i] |= 1; 15537 if (!isnanl (m.value)) 15538 result |= 1; 15539 } 15540 15541#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 15542/* Representation of an 80-bit 'long double' as an initializer for a sequence 15543 of 'unsigned int' words. */ 15544# ifdef WORDS_BIGENDIAN 15545# define LDBL80_WORDS(exponent,manthi,mantlo) \ 15546 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ 15547 ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ 15548 (unsigned int) (mantlo) << 16 \ 15549 } 15550# else 15551# define LDBL80_WORDS(exponent,manthi,mantlo) \ 15552 { mantlo, manthi, exponent } 15553# endif 15554 { /* Quiet NaN. */ 15555 static memory_long_double x = 15556 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; 15557 if (!isnanl (x.value)) 15558 result |= 2; 15559 } 15560 { 15561 /* Signalling NaN. */ 15562 static memory_long_double x = 15563 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; 15564 if (!isnanl (x.value)) 15565 result |= 2; 15566 } 15567 /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, 15568 Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in 15569 Intel IA-64 Architecture Software Developer's Manual, Volume 1: 15570 Application Architecture. 15571 Table 5-2 "Floating-Point Register Encodings" 15572 Figure 5-6 "Memory to Floating-Point Register Data Translation" 15573 */ 15574 { /* Pseudo-NaN. */ 15575 static memory_long_double x = 15576 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; 15577 if (!isnanl (x.value)) 15578 result |= 4; 15579 } 15580 { /* Pseudo-Infinity. */ 15581 static memory_long_double x = 15582 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; 15583 if (!isnanl (x.value)) 15584 result |= 8; 15585 } 15586 { /* Pseudo-Zero. */ 15587 static memory_long_double x = 15588 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; 15589 if (!isnanl (x.value)) 15590 result |= 16; 15591 } 15592 { /* Unnormalized number. */ 15593 static memory_long_double x = 15594 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; 15595 if (!isnanl (x.value)) 15596 result |= 32; 15597 } 15598 { /* Pseudo-Denormal. */ 15599 static memory_long_double x = 15600 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; 15601 if (!isnanl (x.value)) 15602 result |= 64; 15603 } 15604#endif 15605 15606 return result; 15607} 15608_ACEOF 15609if ac_fn_c_try_run "$LINENO"; then : 15610 gl_cv_func_isnanl_works=yes 15611else 15612 gl_cv_func_isnanl_works=no 15613fi 15614rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 15615 conftest.$ac_objext conftest.beam conftest.$ac_ext 15616fi 15617 15618 15619fi 15620{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5 15621$as_echo "$gl_cv_func_isnanl_works" >&6; } 15622 15623 LIBS="$save_LIBS" 15624 case "$gl_cv_func_isnanl_works" in 15625 *yes) gl_func_isnanl=yes ;; 15626 *) gl_func_isnanl=no; ISNANL_LIBM= ;; 15627 esac 15628 else 15629 gl_func_isnanl=no 15630 fi 15631 if test $gl_func_isnanl != yes; then 15632 HAVE_ISNANL=0 15633 fi 15634 15635 15636 15637 GNULIB_ISWBLANK=0; 15638 GNULIB_WCTYPE=0; 15639 GNULIB_ISWCTYPE=0; 15640 GNULIB_WCTRANS=0; 15641 GNULIB_TOWCTRANS=0; 15642 HAVE_ISWBLANK=1; 15643 HAVE_WCTYPE_T=1; 15644 HAVE_WCTRANS_T=1; 15645 REPLACE_ISWBLANK=0; 15646 15647 15648 15649 15650 15651 15652 15653 15654 15655 15656 if test $ac_cv_func_iswcntrl = yes; then 15657 HAVE_ISWCNTRL=1 15658 else 15659 HAVE_ISWCNTRL=0 15660 fi 15661 15662 15663 15664 if test $gt_cv_c_wint_t = yes; then 15665 HAVE_WINT_T=1 15666 else 15667 HAVE_WINT_T=0 15668 fi 15669 15670 15671 15672 15673 15674 15675 15676 15677 15678 15679 15680 if test $gl_cv_have_include_next = yes; then 15681 gl_cv_next_wctype_h='<'wctype.h'>' 15682 else 15683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5 15684$as_echo_n "checking absolute name of <wctype.h>... " >&6; } 15685if ${gl_cv_next_wctype_h+:} false; then : 15686 $as_echo_n "(cached) " >&6 15687else 15688 15689 if test $ac_cv_header_wctype_h = yes; then 15690 15691 15692 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15693/* end confdefs.h. */ 15694#include <wctype.h> 15695 15696_ACEOF 15697 case "$host_os" in 15698 aix*) gl_absname_cpp="$ac_cpp -C" ;; 15699 *) gl_absname_cpp="$ac_cpp" ;; 15700 esac 15701 15702 case "$host_os" in 15703 mingw*) 15704 gl_dirsep_regex='[/\\]' 15705 ;; 15706 *) 15707 gl_dirsep_regex='\/' 15708 ;; 15709 esac 15710 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 15711 15712 gl_header_literal_regex=`echo 'wctype.h' \ 15713 | sed -e "$gl_make_literal_regex_sed"` 15714 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 15715 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 15716 s|^/[^/]|//&| 15717 p 15718 q 15719 }' 15720 gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 15721 sed -n "$gl_absolute_header_sed"`'"' 15722 else 15723 gl_cv_next_wctype_h='<'wctype.h'>' 15724 fi 15725 15726 15727fi 15728{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5 15729$as_echo "$gl_cv_next_wctype_h" >&6; } 15730 fi 15731 NEXT_WCTYPE_H=$gl_cv_next_wctype_h 15732 15733 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 15734 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 15735 gl_next_as_first_directive='<'wctype.h'>' 15736 else 15737 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 15738 gl_next_as_first_directive=$gl_cv_next_wctype_h 15739 fi 15740 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive 15741 15742 15743 15744 15745 if test $ac_cv_header_wctype_h = yes; then 15746 if test $ac_cv_func_iswcntrl = yes; then 15747 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5 15748$as_echo_n "checking whether iswcntrl works... " >&6; } 15749if ${gl_cv_func_iswcntrl_works+:} false; then : 15750 $as_echo_n "(cached) " >&6 15751else 15752 15753 if test "$cross_compiling" = yes; then : 15754 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15755/* end confdefs.h. */ 15756#include <stdlib.h> 15757 #if __GNU_LIBRARY__ == 1 15758 Linux libc5 i18n is broken. 15759 #endif 15760int 15761main () 15762{ 15763 15764 ; 15765 return 0; 15766} 15767_ACEOF 15768if ac_fn_c_try_compile "$LINENO"; then : 15769 gl_cv_func_iswcntrl_works="guessing yes" 15770else 15771 gl_cv_func_iswcntrl_works="guessing no" 15772fi 15773rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 15774 15775else 15776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15777/* end confdefs.h. */ 15778 15779 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be 15780 included before <wchar.h>. 15781 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> 15782 must be included before <wchar.h>. */ 15783 #include <stddef.h> 15784 #include <stdio.h> 15785 #include <time.h> 15786 #include <wchar.h> 15787 #include <wctype.h> 15788 int main () { return iswprint ('x') == 0; } 15789 15790_ACEOF 15791if ac_fn_c_try_run "$LINENO"; then : 15792 gl_cv_func_iswcntrl_works=yes 15793else 15794 gl_cv_func_iswcntrl_works=no 15795fi 15796rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 15797 conftest.$ac_objext conftest.beam conftest.$ac_ext 15798fi 15799 15800 15801fi 15802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5 15803$as_echo "$gl_cv_func_iswcntrl_works" >&6; } 15804 fi 15805 HAVE_WCTYPE_H=1 15806 else 15807 HAVE_WCTYPE_H=0 15808 fi 15809 15810 15811 case "$gl_cv_func_iswcntrl_works" in 15812 *yes) REPLACE_ISWCNTRL=0 ;; 15813 *) REPLACE_ISWCNTRL=1 ;; 15814 esac 15815 15816 15817 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then 15818 : 15819 fi 15820 15821 if test $REPLACE_ISWCNTRL = 1; then 15822 REPLACE_TOWLOWER=1 15823 else 15824 for ac_func in towlower 15825do : 15826 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower" 15827if test "x$ac_cv_func_towlower" = xyes; then : 15828 cat >>confdefs.h <<_ACEOF 15829#define HAVE_TOWLOWER 1 15830_ACEOF 15831 15832fi 15833done 15834 15835 if test $ac_cv_func_towlower = yes; then 15836 REPLACE_TOWLOWER=0 15837 else 15838 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be 15839 included before <wchar.h>. 15840 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> 15841 must be included before <wchar.h>. */ 15842 #include <stddef.h> 15843 #include <stdio.h> 15844 #include <time.h> 15845 #include <wchar.h> 15846 #if HAVE_WCTYPE_H 15847 # include <wctype.h> 15848 #endif 15849 15850" 15851if test "x$ac_cv_have_decl_towlower" = xyes; then : 15852 ac_have_decl=1 15853else 15854 ac_have_decl=0 15855fi 15856 15857cat >>confdefs.h <<_ACEOF 15858#define HAVE_DECL_TOWLOWER $ac_have_decl 15859_ACEOF 15860 15861 if test $ac_cv_have_decl_towlower = yes; then 15862 REPLACE_TOWLOWER=1 15863 else 15864 REPLACE_TOWLOWER=0 15865 fi 15866 fi 15867 fi 15868 15869 15870 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then 15871 : 15872 fi 15873 15874 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5 15875$as_echo_n "checking for wctype_t... " >&6; } 15876if ${gl_cv_type_wctype_t+:} false; then : 15877 $as_echo_n "(cached) " >&6 15878else 15879 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15880/* end confdefs.h. */ 15881/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be 15882 included before <wchar.h>. 15883 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> 15884 must be included before <wchar.h>. */ 15885 #include <stddef.h> 15886 #include <stdio.h> 15887 #include <time.h> 15888 #include <wchar.h> 15889 #if HAVE_WCTYPE_H 15890 # include <wctype.h> 15891 #endif 15892 wctype_t a; 15893 15894int 15895main () 15896{ 15897 15898 ; 15899 return 0; 15900} 15901_ACEOF 15902if ac_fn_c_try_compile "$LINENO"; then : 15903 gl_cv_type_wctype_t=yes 15904else 15905 gl_cv_type_wctype_t=no 15906fi 15907rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 15908 15909fi 15910{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5 15911$as_echo "$gl_cv_type_wctype_t" >&6; } 15912 if test $gl_cv_type_wctype_t = no; then 15913 HAVE_WCTYPE_T=0 15914 fi 15915 15916 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5 15917$as_echo_n "checking for wctrans_t... " >&6; } 15918if ${gl_cv_type_wctrans_t+:} false; then : 15919 $as_echo_n "(cached) " >&6 15920else 15921 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15922/* end confdefs.h. */ 15923/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be 15924 included before <wchar.h>. 15925 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> 15926 must be included before <wchar.h>. */ 15927 #include <stddef.h> 15928 #include <stdio.h> 15929 #include <time.h> 15930 #include <wchar.h> 15931 #include <wctype.h> 15932 wctrans_t a; 15933 15934int 15935main () 15936{ 15937 15938 ; 15939 return 0; 15940} 15941_ACEOF 15942if ac_fn_c_try_compile "$LINENO"; then : 15943 gl_cv_type_wctrans_t=yes 15944else 15945 gl_cv_type_wctrans_t=no 15946fi 15947rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 15948 15949fi 15950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5 15951$as_echo "$gl_cv_type_wctrans_t" >&6; } 15952 if test $gl_cv_type_wctrans_t = no; then 15953 HAVE_WCTRANS_T=0 15954 fi 15955 15956 15957 for gl_func in wctype iswctype wctrans towctrans ; do 15958 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` 15959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 15960$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } 15961if eval \${$as_gl_Symbol+:} false; then : 15962 $as_echo_n "(cached) " >&6 15963else 15964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 15965/* end confdefs.h. */ 15966 15967/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 15968 <wchar.h>. 15969 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 15970 included before <wchar.h>. */ 15971#if !(defined __GLIBC__ && !defined __UCLIBC__) 15972# include <stddef.h> 15973# include <stdio.h> 15974# include <time.h> 15975# include <wchar.h> 15976#endif 15977#include <wctype.h> 15978 15979int 15980main () 15981{ 15982#undef $gl_func 15983 (void) $gl_func; 15984 ; 15985 return 0; 15986} 15987_ACEOF 15988if ac_fn_c_try_compile "$LINENO"; then : 15989 eval "$as_gl_Symbol=yes" 15990else 15991 eval "$as_gl_Symbol=no" 15992fi 15993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 15994fi 15995eval ac_res=\$$as_gl_Symbol 15996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 15997$as_echo "$ac_res" >&6; } 15998 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : 15999 cat >>confdefs.h <<_ACEOF 16000#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 16001_ACEOF 16002 16003 eval ac_cv_have_decl_$gl_func=yes 16004fi 16005 done 16006 16007 16008 16009 16010 16011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp() can be used without linking with libm" >&5 16012$as_echo_n "checking whether ldexp() can be used without linking with libm... " >&6; } 16013if ${gl_cv_func_ldexp_no_libm+:} false; then : 16014 $as_echo_n "(cached) " >&6 16015else 16016 16017 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16018/* end confdefs.h. */ 16019#ifndef __NO_MATH_INLINES 16020 # define __NO_MATH_INLINES 1 /* for glibc */ 16021 #endif 16022 #include <math.h> 16023 double (*funcptr) (double, int) = ldexp; 16024 double x; 16025int 16026main () 16027{ 16028return ldexp (x, -1) > 0; 16029 ; 16030 return 0; 16031} 16032_ACEOF 16033if ac_fn_c_try_link "$LINENO"; then : 16034 gl_cv_func_ldexp_no_libm=yes 16035else 16036 gl_cv_func_ldexp_no_libm=no 16037fi 16038rm -f core conftest.err conftest.$ac_objext \ 16039 conftest$ac_exeext conftest.$ac_ext 16040 16041fi 16042{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5 16043$as_echo "$gl_cv_func_ldexp_no_libm" >&6; } 16044 16045 16046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 16047$as_echo_n "checking for nl_langinfo and CODESET... " >&6; } 16048if ${am_cv_langinfo_codeset+:} false; then : 16049 $as_echo_n "(cached) " >&6 16050else 16051 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16052/* end confdefs.h. */ 16053#include <langinfo.h> 16054int 16055main () 16056{ 16057char* cs = nl_langinfo(CODESET); return !cs; 16058 ; 16059 return 0; 16060} 16061_ACEOF 16062if ac_fn_c_try_link "$LINENO"; then : 16063 am_cv_langinfo_codeset=yes 16064else 16065 am_cv_langinfo_codeset=no 16066fi 16067rm -f core conftest.err conftest.$ac_objext \ 16068 conftest$ac_exeext conftest.$ac_ext 16069 16070fi 16071{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 16072$as_echo "$am_cv_langinfo_codeset" >&6; } 16073 if test $am_cv_langinfo_codeset = yes; then 16074 16075$as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h 16076 16077 fi 16078 16079ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" 16080if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then : 16081 ac_have_decl=1 16082else 16083 ac_have_decl=0 16084fi 16085 16086cat >>confdefs.h <<_ACEOF 16087#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl 16088_ACEOF 16089 16090 16091 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library >= 2.1 or uClibc" >&5 16092$as_echo_n "checking whether we are using the GNU C Library >= 2.1 or uClibc... " >&6; } 16093if ${ac_cv_gnu_library_2_1+:} false; then : 16094 $as_echo_n "(cached) " >&6 16095else 16096 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16097/* end confdefs.h. */ 16098 16099#include <features.h> 16100#ifdef __GNU_LIBRARY__ 16101 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2) 16102 Lucky GNU user 16103 #endif 16104#endif 16105#ifdef __UCLIBC__ 16106 Lucky user 16107#endif 16108 16109_ACEOF 16110if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 16111 $EGREP "Lucky" >/dev/null 2>&1; then : 16112 ac_cv_gnu_library_2_1=yes 16113else 16114 ac_cv_gnu_library_2_1=no 16115fi 16116rm -f conftest* 16117 16118 16119 16120fi 16121{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2_1" >&5 16122$as_echo "$ac_cv_gnu_library_2_1" >&6; } 16123 16124 GLIBC21="$ac_cv_gnu_library_2_1" 16125 16126 16127 16128 if test "X$prefix" = "XNONE"; then 16129 acl_final_prefix="$ac_default_prefix" 16130 else 16131 acl_final_prefix="$prefix" 16132 fi 16133 if test "X$exec_prefix" = "XNONE"; then 16134 acl_final_exec_prefix='${prefix}' 16135 else 16136 acl_final_exec_prefix="$exec_prefix" 16137 fi 16138 acl_save_prefix="$prefix" 16139 prefix="$acl_final_prefix" 16140 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" 16141 prefix="$acl_save_prefix" 16142 16143 16144 16145# Check whether --with-gnu-ld was given. 16146if test "${with_gnu_ld+set}" = set; then : 16147 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes 16148else 16149 with_gnu_ld=no 16150fi 16151 16152# Prepare PATH_SEPARATOR. 16153# The user is always right. 16154if test "${PATH_SEPARATOR+set}" != set; then 16155 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which 16156 # contains only /bin. Note that ksh looks also at the FPATH variable, 16157 # so we have to set that as well for the test. 16158 PATH_SEPARATOR=: 16159 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ 16160 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ 16161 || PATH_SEPARATOR=';' 16162 } 16163fi 16164 16165ac_prog=ld 16166if test "$GCC" = yes; then 16167 # Check if gcc -print-prog-name=ld gives a path. 16168 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 16169$as_echo_n "checking for ld used by $CC... " >&6; } 16170 case $host in 16171 *-*-mingw*) 16172 # gcc leaves a trailing carriage return which upsets mingw 16173 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; 16174 *) 16175 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; 16176 esac 16177 case $ac_prog in 16178 # Accept absolute paths. 16179 [\\/]* | ?:[\\/]*) 16180 re_direlt='/[^/][^/]*/\.\./' 16181 # Canonicalize the pathname of ld 16182 ac_prog=`echo "$ac_prog"| sed 's%\\\\%/%g'` 16183 while echo "$ac_prog" | grep "$re_direlt" > /dev/null 2>&1; do 16184 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` 16185 done 16186 test -z "$LD" && LD="$ac_prog" 16187 ;; 16188 "") 16189 # If it fails, then pretend we aren't using GCC. 16190 ac_prog=ld 16191 ;; 16192 *) 16193 # If it is relative, then search for the first ld in PATH. 16194 with_gnu_ld=unknown 16195 ;; 16196 esac 16197elif test "$with_gnu_ld" = yes; then 16198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 16199$as_echo_n "checking for GNU ld... " >&6; } 16200else 16201 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 16202$as_echo_n "checking for non-GNU ld... " >&6; } 16203fi 16204if ${acl_cv_path_LD+:} false; then : 16205 $as_echo_n "(cached) " >&6 16206else 16207 if test -z "$LD"; then 16208 acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR 16209 for ac_dir in $PATH; do 16210 IFS="$acl_save_ifs" 16211 test -z "$ac_dir" && ac_dir=. 16212 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then 16213 acl_cv_path_LD="$ac_dir/$ac_prog" 16214 # Check to see if the program is GNU ld. I'd rather use --version, 16215 # but apparently some variants of GNU ld only accept -v. 16216 # Break only if it was the GNU/non-GNU ld that we prefer. 16217 case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in 16218 *GNU* | *'with BFD'*) 16219 test "$with_gnu_ld" != no && break 16220 ;; 16221 *) 16222 test "$with_gnu_ld" != yes && break 16223 ;; 16224 esac 16225 fi 16226 done 16227 IFS="$acl_save_ifs" 16228else 16229 acl_cv_path_LD="$LD" # Let the user override the test with a path. 16230fi 16231fi 16232 16233LD="$acl_cv_path_LD" 16234if test -n "$LD"; then 16235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 16236$as_echo "$LD" >&6; } 16237else 16238 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 16239$as_echo "no" >&6; } 16240fi 16241test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 16242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 16243$as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } 16244if ${acl_cv_prog_gnu_ld+:} false; then : 16245 $as_echo_n "(cached) " >&6 16246else 16247 # I'd rather use --version here, but apparently some GNU lds only accept -v. 16248case `$LD -v 2>&1 </dev/null` in 16249*GNU* | *'with BFD'*) 16250 acl_cv_prog_gnu_ld=yes 16251 ;; 16252*) 16253 acl_cv_prog_gnu_ld=no 16254 ;; 16255esac 16256fi 16257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 16258$as_echo "$acl_cv_prog_gnu_ld" >&6; } 16259with_gnu_ld=$acl_cv_prog_gnu_ld 16260 16261 16262 16263 16264 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 16265$as_echo_n "checking for shared library run path origin... " >&6; } 16266if ${acl_cv_rpath+:} false; then : 16267 $as_echo_n "(cached) " >&6 16268else 16269 16270 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ 16271 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh 16272 . ./conftest.sh 16273 rm -f ./conftest.sh 16274 acl_cv_rpath=done 16275 16276fi 16277{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 16278$as_echo "$acl_cv_rpath" >&6; } 16279 wl="$acl_cv_wl" 16280 acl_libext="$acl_cv_libext" 16281 acl_shlibext="$acl_cv_shlibext" 16282 acl_libname_spec="$acl_cv_libname_spec" 16283 acl_library_names_spec="$acl_cv_library_names_spec" 16284 acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" 16285 acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" 16286 acl_hardcode_direct="$acl_cv_hardcode_direct" 16287 acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" 16288 # Check whether --enable-rpath was given. 16289if test "${enable_rpath+set}" = set; then : 16290 enableval=$enable_rpath; : 16291else 16292 enable_rpath=yes 16293fi 16294 16295 16296 16297 16298 acl_libdirstem=lib 16299 acl_libdirstem2= 16300 case "$host_os" in 16301 solaris*) 16302 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 64-bit host" >&5 16303$as_echo_n "checking for 64-bit host... " >&6; } 16304if ${gl_cv_solaris_64bit+:} false; then : 16305 $as_echo_n "(cached) " >&6 16306else 16307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16308/* end confdefs.h. */ 16309 16310#ifdef _LP64 16311sixtyfour bits 16312#endif 16313 16314_ACEOF 16315if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 16316 $EGREP "sixtyfour bits" >/dev/null 2>&1; then : 16317 gl_cv_solaris_64bit=yes 16318else 16319 gl_cv_solaris_64bit=no 16320fi 16321rm -f conftest* 16322 16323 16324fi 16325{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_solaris_64bit" >&5 16326$as_echo "$gl_cv_solaris_64bit" >&6; } 16327 if test $gl_cv_solaris_64bit = yes; then 16328 acl_libdirstem=lib/64 16329 case "$host_cpu" in 16330 sparc*) acl_libdirstem2=lib/sparcv9 ;; 16331 i*86 | x86_64) acl_libdirstem2=lib/amd64 ;; 16332 esac 16333 fi 16334 ;; 16335 *) 16336 searchpath=`(LC_ALL=C $CC -print-search-dirs) 2>/dev/null | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` 16337 if test -n "$searchpath"; then 16338 acl_save_IFS="${IFS= }"; IFS=":" 16339 for searchdir in $searchpath; do 16340 if test -d "$searchdir"; then 16341 case "$searchdir" in 16342 */lib64/ | */lib64 ) acl_libdirstem=lib64 ;; 16343 */../ | */.. ) 16344 # Better ignore directories of this form. They are misleading. 16345 ;; 16346 *) searchdir=`cd "$searchdir" && pwd` 16347 case "$searchdir" in 16348 */lib64 ) acl_libdirstem=lib64 ;; 16349 esac ;; 16350 esac 16351 fi 16352 done 16353 IFS="$acl_save_IFS" 16354 fi 16355 ;; 16356 esac 16357 test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" 16358 16359 16360 16361 gl_threads_api=none 16362 LIBTHREAD= 16363 LTLIBTHREAD= 16364 LIBMULTITHREAD= 16365 LTLIBMULTITHREAD= 16366 if test "$gl_use_threads" != no; then 16367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 16368$as_echo_n "checking whether imported symbols can be declared weak... " >&6; } 16369if ${gl_cv_have_weak+:} false; then : 16370 $as_echo_n "(cached) " >&6 16371else 16372 gl_cv_have_weak=no 16373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16374/* end confdefs.h. */ 16375extern void xyzzy (); 16376#pragma weak xyzzy 16377int 16378main () 16379{ 16380xyzzy(); 16381 ; 16382 return 0; 16383} 16384_ACEOF 16385if ac_fn_c_try_link "$LINENO"; then : 16386 gl_cv_have_weak=maybe 16387fi 16388rm -f core conftest.err conftest.$ac_objext \ 16389 conftest$ac_exeext conftest.$ac_ext 16390 if test $gl_cv_have_weak = maybe; then 16391 if test "$cross_compiling" = yes; then : 16392 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16393/* end confdefs.h. */ 16394#ifdef __ELF__ 16395 Extensible Linking Format 16396 #endif 16397 16398_ACEOF 16399if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 16400 $EGREP "Extensible Linking Format" >/dev/null 2>&1; then : 16401 gl_cv_have_weak="guessing yes" 16402else 16403 gl_cv_have_weak="guessing no" 16404fi 16405rm -f conftest* 16406 16407 16408else 16409 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16410/* end confdefs.h. */ 16411 16412#include <stdio.h> 16413#pragma weak fputs 16414int main () 16415{ 16416 return (fputs == NULL); 16417} 16418_ACEOF 16419if ac_fn_c_try_run "$LINENO"; then : 16420 gl_cv_have_weak=yes 16421else 16422 gl_cv_have_weak=no 16423fi 16424rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 16425 conftest.$ac_objext conftest.beam conftest.$ac_ext 16426fi 16427 16428 fi 16429 16430fi 16431{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 16432$as_echo "$gl_cv_have_weak" >&6; } 16433 if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then 16434 # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that 16435 # it groks <pthread.h>. It's added above, in gl_THREADLIB_EARLY_BODY. 16436 ac_fn_c_check_header_mongrel "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" 16437if test "x$ac_cv_header_pthread_h" = xyes; then : 16438 gl_have_pthread_h=yes 16439else 16440 gl_have_pthread_h=no 16441fi 16442 16443 16444 if test "$gl_have_pthread_h" = yes; then 16445 # Other possible tests: 16446 # -lpthreads (FSU threads, PCthreads) 16447 # -lgthreads 16448 gl_have_pthread= 16449 # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist 16450 # in libc. IRIX 6.5 has the first one in both libc and libpthread, but 16451 # the second one only in libpthread, and lock.c needs it. 16452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16453/* end confdefs.h. */ 16454#include <pthread.h> 16455int 16456main () 16457{ 16458pthread_mutex_lock((pthread_mutex_t*)0); 16459 pthread_mutexattr_init((pthread_mutexattr_t*)0); 16460 ; 16461 return 0; 16462} 16463_ACEOF 16464if ac_fn_c_try_link "$LINENO"; then : 16465 gl_have_pthread=yes 16466fi 16467rm -f core conftest.err conftest.$ac_objext \ 16468 conftest$ac_exeext conftest.$ac_ext 16469 # Test for libpthread by looking for pthread_kill. (Not pthread_self, 16470 # since it is defined as a macro on OSF/1.) 16471 if test -n "$gl_have_pthread"; then 16472 # The program links fine without libpthread. But it may actually 16473 # need to link with libpthread in order to create multiple threads. 16474 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 16475$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } 16476if ${ac_cv_lib_pthread_pthread_kill+:} false; then : 16477 $as_echo_n "(cached) " >&6 16478else 16479 ac_check_lib_save_LIBS=$LIBS 16480LIBS="-lpthread $LIBS" 16481cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16482/* end confdefs.h. */ 16483 16484/* Override any GCC internal prototype to avoid an error. 16485 Use char because int might match the return type of a GCC 16486 builtin and then its argument prototype would still apply. */ 16487#ifdef __cplusplus 16488extern "C" 16489#endif 16490char pthread_kill (); 16491int 16492main () 16493{ 16494return pthread_kill (); 16495 ; 16496 return 0; 16497} 16498_ACEOF 16499if ac_fn_c_try_link "$LINENO"; then : 16500 ac_cv_lib_pthread_pthread_kill=yes 16501else 16502 ac_cv_lib_pthread_pthread_kill=no 16503fi 16504rm -f core conftest.err conftest.$ac_objext \ 16505 conftest$ac_exeext conftest.$ac_ext 16506LIBS=$ac_check_lib_save_LIBS 16507fi 16508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 16509$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } 16510if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : 16511 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread 16512 # On Solaris and HP-UX, most pthread functions exist also in libc. 16513 # Therefore pthread_in_use() needs to actually try to create a 16514 # thread: pthread_create from libc will fail, whereas 16515 # pthread_create will actually create a thread. 16516 case "$host_os" in 16517 solaris* | hpux*) 16518 16519$as_echo "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h 16520 16521 esac 16522 16523fi 16524 16525 else 16526 # Some library is needed. Try libpthread and libc_r. 16527 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 16528$as_echo_n "checking for pthread_kill in -lpthread... " >&6; } 16529if ${ac_cv_lib_pthread_pthread_kill+:} false; then : 16530 $as_echo_n "(cached) " >&6 16531else 16532 ac_check_lib_save_LIBS=$LIBS 16533LIBS="-lpthread $LIBS" 16534cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16535/* end confdefs.h. */ 16536 16537/* Override any GCC internal prototype to avoid an error. 16538 Use char because int might match the return type of a GCC 16539 builtin and then its argument prototype would still apply. */ 16540#ifdef __cplusplus 16541extern "C" 16542#endif 16543char pthread_kill (); 16544int 16545main () 16546{ 16547return pthread_kill (); 16548 ; 16549 return 0; 16550} 16551_ACEOF 16552if ac_fn_c_try_link "$LINENO"; then : 16553 ac_cv_lib_pthread_pthread_kill=yes 16554else 16555 ac_cv_lib_pthread_pthread_kill=no 16556fi 16557rm -f core conftest.err conftest.$ac_objext \ 16558 conftest$ac_exeext conftest.$ac_ext 16559LIBS=$ac_check_lib_save_LIBS 16560fi 16561{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 16562$as_echo "$ac_cv_lib_pthread_pthread_kill" >&6; } 16563if test "x$ac_cv_lib_pthread_pthread_kill" = xyes; then : 16564 gl_have_pthread=yes 16565 LIBTHREAD=-lpthread LTLIBTHREAD=-lpthread 16566 LIBMULTITHREAD=-lpthread LTLIBMULTITHREAD=-lpthread 16567fi 16568 16569 if test -z "$gl_have_pthread"; then 16570 # For FreeBSD 4. 16571 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 16572$as_echo_n "checking for pthread_kill in -lc_r... " >&6; } 16573if ${ac_cv_lib_c_r_pthread_kill+:} false; then : 16574 $as_echo_n "(cached) " >&6 16575else 16576 ac_check_lib_save_LIBS=$LIBS 16577LIBS="-lc_r $LIBS" 16578cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16579/* end confdefs.h. */ 16580 16581/* Override any GCC internal prototype to avoid an error. 16582 Use char because int might match the return type of a GCC 16583 builtin and then its argument prototype would still apply. */ 16584#ifdef __cplusplus 16585extern "C" 16586#endif 16587char pthread_kill (); 16588int 16589main () 16590{ 16591return pthread_kill (); 16592 ; 16593 return 0; 16594} 16595_ACEOF 16596if ac_fn_c_try_link "$LINENO"; then : 16597 ac_cv_lib_c_r_pthread_kill=yes 16598else 16599 ac_cv_lib_c_r_pthread_kill=no 16600fi 16601rm -f core conftest.err conftest.$ac_objext \ 16602 conftest$ac_exeext conftest.$ac_ext 16603LIBS=$ac_check_lib_save_LIBS 16604fi 16605{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 16606$as_echo "$ac_cv_lib_c_r_pthread_kill" >&6; } 16607if test "x$ac_cv_lib_c_r_pthread_kill" = xyes; then : 16608 gl_have_pthread=yes 16609 LIBTHREAD=-lc_r LTLIBTHREAD=-lc_r 16610 LIBMULTITHREAD=-lc_r LTLIBMULTITHREAD=-lc_r 16611fi 16612 16613 fi 16614 fi 16615 if test -n "$gl_have_pthread"; then 16616 gl_threads_api=posix 16617 16618$as_echo "#define USE_POSIX_THREADS 1" >>confdefs.h 16619 16620 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then 16621 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then 16622 16623$as_echo "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h 16624 16625 LIBTHREAD= 16626 LTLIBTHREAD= 16627 fi 16628 fi 16629 fi 16630 fi 16631 fi 16632 if test -z "$gl_have_pthread"; then 16633 if test "$gl_use_threads" = yes || test "$gl_use_threads" = solaris; then 16634 gl_have_solaristhread= 16635 gl_save_LIBS="$LIBS" 16636 LIBS="$LIBS -lthread" 16637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 16638/* end confdefs.h. */ 16639 16640#include <thread.h> 16641#include <synch.h> 16642 16643int 16644main () 16645{ 16646thr_self(); 16647 ; 16648 return 0; 16649} 16650_ACEOF 16651if ac_fn_c_try_link "$LINENO"; then : 16652 gl_have_solaristhread=yes 16653fi 16654rm -f core conftest.err conftest.$ac_objext \ 16655 conftest$ac_exeext conftest.$ac_ext 16656 LIBS="$gl_save_LIBS" 16657 if test -n "$gl_have_solaristhread"; then 16658 gl_threads_api=solaris 16659 LIBTHREAD=-lthread 16660 LTLIBTHREAD=-lthread 16661 LIBMULTITHREAD="$LIBTHREAD" 16662 LTLIBMULTITHREAD="$LTLIBTHREAD" 16663 16664$as_echo "#define USE_SOLARIS_THREADS 1" >>confdefs.h 16665 16666 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then 16667 16668$as_echo "#define USE_SOLARIS_THREADS_WEAK 1" >>confdefs.h 16669 16670 LIBTHREAD= 16671 LTLIBTHREAD= 16672 fi 16673 fi 16674 fi 16675 fi 16676 if test "$gl_use_threads" = pth; then 16677 gl_save_CPPFLAGS="$CPPFLAGS" 16678 16679 16680 16681 16682 16683 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libpth" >&5 16684$as_echo_n "checking how to link with libpth... " >&6; } 16685if ${ac_cv_libpth_libs+:} false; then : 16686 $as_echo_n "(cached) " >&6 16687else 16688 16689 16690 16691 16692 16693 16694 16695 16696 use_additional=yes 16697 16698 acl_save_prefix="$prefix" 16699 prefix="$acl_final_prefix" 16700 acl_save_exec_prefix="$exec_prefix" 16701 exec_prefix="$acl_final_exec_prefix" 16702 16703 eval additional_includedir=\"$includedir\" 16704 eval additional_libdir=\"$libdir\" 16705 16706 exec_prefix="$acl_save_exec_prefix" 16707 prefix="$acl_save_prefix" 16708 16709 16710# Check whether --with-libpth-prefix was given. 16711if test "${with_libpth_prefix+set}" = set; then : 16712 withval=$with_libpth_prefix; 16713 if test "X$withval" = "Xno"; then 16714 use_additional=no 16715 else 16716 if test "X$withval" = "X"; then 16717 16718 acl_save_prefix="$prefix" 16719 prefix="$acl_final_prefix" 16720 acl_save_exec_prefix="$exec_prefix" 16721 exec_prefix="$acl_final_exec_prefix" 16722 16723 eval additional_includedir=\"$includedir\" 16724 eval additional_libdir=\"$libdir\" 16725 16726 exec_prefix="$acl_save_exec_prefix" 16727 prefix="$acl_save_prefix" 16728 16729 else 16730 additional_includedir="$withval/include" 16731 additional_libdir="$withval/$acl_libdirstem" 16732 if test "$acl_libdirstem2" != "$acl_libdirstem" \ 16733 && ! test -d "$withval/$acl_libdirstem"; then 16734 additional_libdir="$withval/$acl_libdirstem2" 16735 fi 16736 fi 16737 fi 16738 16739fi 16740 16741 LIBPTH= 16742 LTLIBPTH= 16743 INCPTH= 16744 LIBPTH_PREFIX= 16745 HAVE_LIBPTH= 16746 rpathdirs= 16747 ltrpathdirs= 16748 names_already_handled= 16749 names_next_round='pth ' 16750 while test -n "$names_next_round"; do 16751 names_this_round="$names_next_round" 16752 names_next_round= 16753 for name in $names_this_round; do 16754 already_handled= 16755 for n in $names_already_handled; do 16756 if test "$n" = "$name"; then 16757 already_handled=yes 16758 break 16759 fi 16760 done 16761 if test -z "$already_handled"; then 16762 names_already_handled="$names_already_handled $name" 16763 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` 16764 eval value=\"\$HAVE_LIB$uppername\" 16765 if test -n "$value"; then 16766 if test "$value" = yes; then 16767 eval value=\"\$LIB$uppername\" 16768 test -z "$value" || LIBPTH="${LIBPTH}${LIBPTH:+ }$value" 16769 eval value=\"\$LTLIB$uppername\" 16770 test -z "$value" || LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$value" 16771 else 16772 : 16773 fi 16774 else 16775 found_dir= 16776 found_la= 16777 found_so= 16778 found_a= 16779 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name 16780 if test -n "$acl_shlibext"; then 16781 shrext=".$acl_shlibext" # typically: shrext=.so 16782 else 16783 shrext= 16784 fi 16785 if test $use_additional = yes; then 16786 dir="$additional_libdir" 16787 if test -n "$acl_shlibext"; then 16788 if test -f "$dir/$libname$shrext"; then 16789 found_dir="$dir" 16790 found_so="$dir/$libname$shrext" 16791 else 16792 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then 16793 ver=`(cd "$dir" && \ 16794 for f in "$libname$shrext".*; do echo "$f"; done \ 16795 | sed -e "s,^$libname$shrext\\\\.,," \ 16796 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ 16797 | sed 1q ) 2>/dev/null` 16798 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then 16799 found_dir="$dir" 16800 found_so="$dir/$libname$shrext.$ver" 16801 fi 16802 else 16803 eval library_names=\"$acl_library_names_spec\" 16804 for f in $library_names; do 16805 if test -f "$dir/$f"; then 16806 found_dir="$dir" 16807 found_so="$dir/$f" 16808 break 16809 fi 16810 done 16811 fi 16812 fi 16813 fi 16814 if test "X$found_dir" = "X"; then 16815 if test -f "$dir/$libname.$acl_libext"; then 16816 found_dir="$dir" 16817 found_a="$dir/$libname.$acl_libext" 16818 fi 16819 fi 16820 if test "X$found_dir" != "X"; then 16821 if test -f "$dir/$libname.la"; then 16822 found_la="$dir/$libname.la" 16823 fi 16824 fi 16825 fi 16826 if test "X$found_dir" = "X"; then 16827 for x in $LDFLAGS $LTLIBPTH; do 16828 16829 acl_save_prefix="$prefix" 16830 prefix="$acl_final_prefix" 16831 acl_save_exec_prefix="$exec_prefix" 16832 exec_prefix="$acl_final_exec_prefix" 16833 eval x=\"$x\" 16834 exec_prefix="$acl_save_exec_prefix" 16835 prefix="$acl_save_prefix" 16836 16837 case "$x" in 16838 -L*) 16839 dir=`echo "X$x" | sed -e 's/^X-L//'` 16840 if test -n "$acl_shlibext"; then 16841 if test -f "$dir/$libname$shrext"; then 16842 found_dir="$dir" 16843 found_so="$dir/$libname$shrext" 16844 else 16845 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then 16846 ver=`(cd "$dir" && \ 16847 for f in "$libname$shrext".*; do echo "$f"; done \ 16848 | sed -e "s,^$libname$shrext\\\\.,," \ 16849 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ 16850 | sed 1q ) 2>/dev/null` 16851 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then 16852 found_dir="$dir" 16853 found_so="$dir/$libname$shrext.$ver" 16854 fi 16855 else 16856 eval library_names=\"$acl_library_names_spec\" 16857 for f in $library_names; do 16858 if test -f "$dir/$f"; then 16859 found_dir="$dir" 16860 found_so="$dir/$f" 16861 break 16862 fi 16863 done 16864 fi 16865 fi 16866 fi 16867 if test "X$found_dir" = "X"; then 16868 if test -f "$dir/$libname.$acl_libext"; then 16869 found_dir="$dir" 16870 found_a="$dir/$libname.$acl_libext" 16871 fi 16872 fi 16873 if test "X$found_dir" != "X"; then 16874 if test -f "$dir/$libname.la"; then 16875 found_la="$dir/$libname.la" 16876 fi 16877 fi 16878 ;; 16879 esac 16880 if test "X$found_dir" != "X"; then 16881 break 16882 fi 16883 done 16884 fi 16885 if test "X$found_dir" != "X"; then 16886 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$found_dir -l$name" 16887 if test "X$found_so" != "X"; then 16888 if test "$enable_rpath" = no \ 16889 || test "X$found_dir" = "X/usr/$acl_libdirstem" \ 16890 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then 16891 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" 16892 else 16893 haveit= 16894 for x in $ltrpathdirs; do 16895 if test "X$x" = "X$found_dir"; then 16896 haveit=yes 16897 break 16898 fi 16899 done 16900 if test -z "$haveit"; then 16901 ltrpathdirs="$ltrpathdirs $found_dir" 16902 fi 16903 if test "$acl_hardcode_direct" = yes; then 16904 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" 16905 else 16906 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then 16907 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" 16908 haveit= 16909 for x in $rpathdirs; do 16910 if test "X$x" = "X$found_dir"; then 16911 haveit=yes 16912 break 16913 fi 16914 done 16915 if test -z "$haveit"; then 16916 rpathdirs="$rpathdirs $found_dir" 16917 fi 16918 else 16919 haveit= 16920 for x in $LDFLAGS $LIBPTH; do 16921 16922 acl_save_prefix="$prefix" 16923 prefix="$acl_final_prefix" 16924 acl_save_exec_prefix="$exec_prefix" 16925 exec_prefix="$acl_final_exec_prefix" 16926 eval x=\"$x\" 16927 exec_prefix="$acl_save_exec_prefix" 16928 prefix="$acl_save_prefix" 16929 16930 if test "X$x" = "X-L$found_dir"; then 16931 haveit=yes 16932 break 16933 fi 16934 done 16935 if test -z "$haveit"; then 16936 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir" 16937 fi 16938 if test "$acl_hardcode_minus_L" != no; then 16939 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_so" 16940 else 16941 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" 16942 fi 16943 fi 16944 fi 16945 fi 16946 else 16947 if test "X$found_a" != "X"; then 16948 LIBPTH="${LIBPTH}${LIBPTH:+ }$found_a" 16949 else 16950 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$found_dir -l$name" 16951 fi 16952 fi 16953 additional_includedir= 16954 case "$found_dir" in 16955 */$acl_libdirstem | */$acl_libdirstem/) 16956 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` 16957 if test "$name" = 'pth'; then 16958 LIBPTH_PREFIX="$basedir" 16959 fi 16960 additional_includedir="$basedir/include" 16961 ;; 16962 */$acl_libdirstem2 | */$acl_libdirstem2/) 16963 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` 16964 if test "$name" = 'pth'; then 16965 LIBPTH_PREFIX="$basedir" 16966 fi 16967 additional_includedir="$basedir/include" 16968 ;; 16969 esac 16970 if test "X$additional_includedir" != "X"; then 16971 if test "X$additional_includedir" != "X/usr/include"; then 16972 haveit= 16973 if test "X$additional_includedir" = "X/usr/local/include"; then 16974 if test -n "$GCC"; then 16975 case $host_os in 16976 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 16977 esac 16978 fi 16979 fi 16980 if test -z "$haveit"; then 16981 for x in $CPPFLAGS $INCPTH; do 16982 16983 acl_save_prefix="$prefix" 16984 prefix="$acl_final_prefix" 16985 acl_save_exec_prefix="$exec_prefix" 16986 exec_prefix="$acl_final_exec_prefix" 16987 eval x=\"$x\" 16988 exec_prefix="$acl_save_exec_prefix" 16989 prefix="$acl_save_prefix" 16990 16991 if test "X$x" = "X-I$additional_includedir"; then 16992 haveit=yes 16993 break 16994 fi 16995 done 16996 if test -z "$haveit"; then 16997 if test -d "$additional_includedir"; then 16998 INCPTH="${INCPTH}${INCPTH:+ }-I$additional_includedir" 16999 fi 17000 fi 17001 fi 17002 fi 17003 fi 17004 if test -n "$found_la"; then 17005 save_libdir="$libdir" 17006 case "$found_la" in 17007 */* | *\\*) . "$found_la" ;; 17008 *) . "./$found_la" ;; 17009 esac 17010 libdir="$save_libdir" 17011 for dep in $dependency_libs; do 17012 case "$dep" in 17013 -L*) 17014 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` 17015 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ 17016 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then 17017 haveit= 17018 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ 17019 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then 17020 if test -n "$GCC"; then 17021 case $host_os in 17022 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 17023 esac 17024 fi 17025 fi 17026 if test -z "$haveit"; then 17027 haveit= 17028 for x in $LDFLAGS $LIBPTH; do 17029 17030 acl_save_prefix="$prefix" 17031 prefix="$acl_final_prefix" 17032 acl_save_exec_prefix="$exec_prefix" 17033 exec_prefix="$acl_final_exec_prefix" 17034 eval x=\"$x\" 17035 exec_prefix="$acl_save_exec_prefix" 17036 prefix="$acl_save_prefix" 17037 17038 if test "X$x" = "X-L$additional_libdir"; then 17039 haveit=yes 17040 break 17041 fi 17042 done 17043 if test -z "$haveit"; then 17044 if test -d "$additional_libdir"; then 17045 LIBPTH="${LIBPTH}${LIBPTH:+ }-L$additional_libdir" 17046 fi 17047 fi 17048 haveit= 17049 for x in $LDFLAGS $LTLIBPTH; do 17050 17051 acl_save_prefix="$prefix" 17052 prefix="$acl_final_prefix" 17053 acl_save_exec_prefix="$exec_prefix" 17054 exec_prefix="$acl_final_exec_prefix" 17055 eval x=\"$x\" 17056 exec_prefix="$acl_save_exec_prefix" 17057 prefix="$acl_save_prefix" 17058 17059 if test "X$x" = "X-L$additional_libdir"; then 17060 haveit=yes 17061 break 17062 fi 17063 done 17064 if test -z "$haveit"; then 17065 if test -d "$additional_libdir"; then 17066 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-L$additional_libdir" 17067 fi 17068 fi 17069 fi 17070 fi 17071 ;; 17072 -R*) 17073 dir=`echo "X$dep" | sed -e 's/^X-R//'` 17074 if test "$enable_rpath" != no; then 17075 haveit= 17076 for x in $rpathdirs; do 17077 if test "X$x" = "X$dir"; then 17078 haveit=yes 17079 break 17080 fi 17081 done 17082 if test -z "$haveit"; then 17083 rpathdirs="$rpathdirs $dir" 17084 fi 17085 haveit= 17086 for x in $ltrpathdirs; do 17087 if test "X$x" = "X$dir"; then 17088 haveit=yes 17089 break 17090 fi 17091 done 17092 if test -z "$haveit"; then 17093 ltrpathdirs="$ltrpathdirs $dir" 17094 fi 17095 fi 17096 ;; 17097 -l*) 17098 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` 17099 ;; 17100 *.la) 17101 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` 17102 ;; 17103 *) 17104 LIBPTH="${LIBPTH}${LIBPTH:+ }$dep" 17105 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }$dep" 17106 ;; 17107 esac 17108 done 17109 fi 17110 else 17111 LIBPTH="${LIBPTH}${LIBPTH:+ }-l$name" 17112 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-l$name" 17113 fi 17114 fi 17115 fi 17116 done 17117 done 17118 if test "X$rpathdirs" != "X"; then 17119 if test -n "$acl_hardcode_libdir_separator"; then 17120 alldirs= 17121 for found_dir in $rpathdirs; do 17122 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" 17123 done 17124 acl_save_libdir="$libdir" 17125 libdir="$alldirs" 17126 eval flag=\"$acl_hardcode_libdir_flag_spec\" 17127 libdir="$acl_save_libdir" 17128 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" 17129 else 17130 for found_dir in $rpathdirs; do 17131 acl_save_libdir="$libdir" 17132 libdir="$found_dir" 17133 eval flag=\"$acl_hardcode_libdir_flag_spec\" 17134 libdir="$acl_save_libdir" 17135 LIBPTH="${LIBPTH}${LIBPTH:+ }$flag" 17136 done 17137 fi 17138 fi 17139 if test "X$ltrpathdirs" != "X"; then 17140 for found_dir in $ltrpathdirs; do 17141 LTLIBPTH="${LTLIBPTH}${LTLIBPTH:+ }-R$found_dir" 17142 done 17143 fi 17144 17145 17146 17147 17148 17149 17150 ac_cv_libpth_libs="$LIBPTH" 17151 ac_cv_libpth_ltlibs="$LTLIBPTH" 17152 ac_cv_libpth_cppflags="$INCPTH" 17153 ac_cv_libpth_prefix="$LIBPTH_PREFIX" 17154 17155fi 17156{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libpth_libs" >&5 17157$as_echo "$ac_cv_libpth_libs" >&6; } 17158 LIBPTH="$ac_cv_libpth_libs" 17159 LTLIBPTH="$ac_cv_libpth_ltlibs" 17160 INCPTH="$ac_cv_libpth_cppflags" 17161 LIBPTH_PREFIX="$ac_cv_libpth_prefix" 17162 17163 for element in $INCPTH; do 17164 haveit= 17165 for x in $CPPFLAGS; do 17166 17167 acl_save_prefix="$prefix" 17168 prefix="$acl_final_prefix" 17169 acl_save_exec_prefix="$exec_prefix" 17170 exec_prefix="$acl_final_exec_prefix" 17171 eval x=\"$x\" 17172 exec_prefix="$acl_save_exec_prefix" 17173 prefix="$acl_save_prefix" 17174 17175 if test "X$x" = "X$element"; then 17176 haveit=yes 17177 break 17178 fi 17179 done 17180 if test -z "$haveit"; then 17181 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" 17182 fi 17183 done 17184 17185 17186 17187 17188 HAVE_LIBPTH=yes 17189 17190 17191 17192 gl_have_pth= 17193 gl_save_LIBS="$LIBS" 17194 LIBS="$LIBS $LIBPTH" 17195 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17196/* end confdefs.h. */ 17197#include <pth.h> 17198int 17199main () 17200{ 17201pth_self(); 17202 ; 17203 return 0; 17204} 17205_ACEOF 17206if ac_fn_c_try_link "$LINENO"; then : 17207 gl_have_pth=yes 17208fi 17209rm -f core conftest.err conftest.$ac_objext \ 17210 conftest$ac_exeext conftest.$ac_ext 17211 LIBS="$gl_save_LIBS" 17212 if test -n "$gl_have_pth"; then 17213 gl_threads_api=pth 17214 LIBTHREAD="$LIBPTH" 17215 LTLIBTHREAD="$LTLIBPTH" 17216 LIBMULTITHREAD="$LIBTHREAD" 17217 LTLIBMULTITHREAD="$LTLIBTHREAD" 17218 17219$as_echo "#define USE_PTH_THREADS 1" >>confdefs.h 17220 17221 if test -n "$LIBMULTITHREAD" || test -n "$LTLIBMULTITHREAD"; then 17222 if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then 17223 17224$as_echo "#define USE_PTH_THREADS_WEAK 1" >>confdefs.h 17225 17226 LIBTHREAD= 17227 LTLIBTHREAD= 17228 fi 17229 fi 17230 else 17231 CPPFLAGS="$gl_save_CPPFLAGS" 17232 fi 17233 fi 17234 if test -z "$gl_have_pthread"; then 17235 case "$gl_use_threads" in 17236 yes | windows | win32) # The 'win32' is for backward compatibility. 17237 if { case "$host_os" in 17238 mingw*) true;; 17239 *) false;; 17240 esac 17241 }; then 17242 gl_threads_api=windows 17243 17244$as_echo "#define USE_WINDOWS_THREADS 1" >>confdefs.h 17245 17246 fi 17247 ;; 17248 esac 17249 fi 17250 fi 17251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5 17252$as_echo_n "checking for multithread API to use... " >&6; } 17253 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5 17254$as_echo "$gl_threads_api" >&6; } 17255 17256 17257 17258 17259 17260 17261 17262 17263 17264 17265 17266 17267 GNULIB_BTOWC=0; 17268 GNULIB_WCTOB=0; 17269 GNULIB_MBSINIT=0; 17270 GNULIB_MBRTOWC=0; 17271 GNULIB_MBRLEN=0; 17272 GNULIB_MBSRTOWCS=0; 17273 GNULIB_MBSNRTOWCS=0; 17274 GNULIB_WCRTOMB=0; 17275 GNULIB_WCSRTOMBS=0; 17276 GNULIB_WCSNRTOMBS=0; 17277 GNULIB_WCWIDTH=0; 17278 GNULIB_WMEMCHR=0; 17279 GNULIB_WMEMCMP=0; 17280 GNULIB_WMEMCPY=0; 17281 GNULIB_WMEMMOVE=0; 17282 GNULIB_WMEMSET=0; 17283 GNULIB_WCSLEN=0; 17284 GNULIB_WCSNLEN=0; 17285 GNULIB_WCSCPY=0; 17286 GNULIB_WCPCPY=0; 17287 GNULIB_WCSNCPY=0; 17288 GNULIB_WCPNCPY=0; 17289 GNULIB_WCSCAT=0; 17290 GNULIB_WCSNCAT=0; 17291 GNULIB_WCSCMP=0; 17292 GNULIB_WCSNCMP=0; 17293 GNULIB_WCSCASECMP=0; 17294 GNULIB_WCSNCASECMP=0; 17295 GNULIB_WCSCOLL=0; 17296 GNULIB_WCSXFRM=0; 17297 GNULIB_WCSDUP=0; 17298 GNULIB_WCSCHR=0; 17299 GNULIB_WCSRCHR=0; 17300 GNULIB_WCSCSPN=0; 17301 GNULIB_WCSSPN=0; 17302 GNULIB_WCSPBRK=0; 17303 GNULIB_WCSSTR=0; 17304 GNULIB_WCSTOK=0; 17305 GNULIB_WCSWIDTH=0; 17306 HAVE_BTOWC=1; 17307 HAVE_MBSINIT=1; 17308 HAVE_MBRTOWC=1; 17309 HAVE_MBRLEN=1; 17310 HAVE_MBSRTOWCS=1; 17311 HAVE_MBSNRTOWCS=1; 17312 HAVE_WCRTOMB=1; 17313 HAVE_WCSRTOMBS=1; 17314 HAVE_WCSNRTOMBS=1; 17315 HAVE_WMEMCHR=1; 17316 HAVE_WMEMCMP=1; 17317 HAVE_WMEMCPY=1; 17318 HAVE_WMEMMOVE=1; 17319 HAVE_WMEMSET=1; 17320 HAVE_WCSLEN=1; 17321 HAVE_WCSNLEN=1; 17322 HAVE_WCSCPY=1; 17323 HAVE_WCPCPY=1; 17324 HAVE_WCSNCPY=1; 17325 HAVE_WCPNCPY=1; 17326 HAVE_WCSCAT=1; 17327 HAVE_WCSNCAT=1; 17328 HAVE_WCSCMP=1; 17329 HAVE_WCSNCMP=1; 17330 HAVE_WCSCASECMP=1; 17331 HAVE_WCSNCASECMP=1; 17332 HAVE_WCSCOLL=1; 17333 HAVE_WCSXFRM=1; 17334 HAVE_WCSDUP=1; 17335 HAVE_WCSCHR=1; 17336 HAVE_WCSRCHR=1; 17337 HAVE_WCSCSPN=1; 17338 HAVE_WCSSPN=1; 17339 HAVE_WCSPBRK=1; 17340 HAVE_WCSSTR=1; 17341 HAVE_WCSTOK=1; 17342 HAVE_WCSWIDTH=1; 17343 HAVE_DECL_WCTOB=1; 17344 HAVE_DECL_WCWIDTH=1; 17345 REPLACE_MBSTATE_T=0; 17346 REPLACE_BTOWC=0; 17347 REPLACE_WCTOB=0; 17348 REPLACE_MBSINIT=0; 17349 REPLACE_MBRTOWC=0; 17350 REPLACE_MBRLEN=0; 17351 REPLACE_MBSRTOWCS=0; 17352 REPLACE_MBSNRTOWCS=0; 17353 REPLACE_WCRTOMB=0; 17354 REPLACE_WCSRTOMBS=0; 17355 REPLACE_WCSNRTOMBS=0; 17356 REPLACE_WCWIDTH=0; 17357 REPLACE_WCSWIDTH=0; 17358 17359 17360 17361 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 17362$as_echo_n "checking for mbstate_t... " >&6; } 17363if ${ac_cv_type_mbstate_t+:} false; then : 17364 $as_echo_n "(cached) " >&6 17365else 17366 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17367/* end confdefs.h. */ 17368$ac_includes_default 17369/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 17370 <wchar.h>. 17371 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 17372 included before <wchar.h>. */ 17373#include <stddef.h> 17374#include <stdio.h> 17375#include <time.h> 17376#include <wchar.h> 17377int 17378main () 17379{ 17380mbstate_t x; return sizeof x; 17381 ; 17382 return 0; 17383} 17384_ACEOF 17385if ac_fn_c_try_compile "$LINENO"; then : 17386 ac_cv_type_mbstate_t=yes 17387else 17388 ac_cv_type_mbstate_t=no 17389fi 17390rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 17391fi 17392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 17393$as_echo "$ac_cv_type_mbstate_t" >&6; } 17394 if test $ac_cv_type_mbstate_t = yes; then 17395 17396$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h 17397 17398 else 17399 17400$as_echo "#define mbstate_t int" >>confdefs.h 17401 17402 fi 17403 17404 17405 17406 17407 17408 17409 17410 17411 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a traditional japanese locale" >&5 17412$as_echo_n "checking for a traditional japanese locale... " >&6; } 17413if ${gt_cv_locale_ja+:} false; then : 17414 $as_echo_n "(cached) " >&6 17415else 17416 17417 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17418/* end confdefs.h. */ 17419 17420#include <locale.h> 17421#include <time.h> 17422#if HAVE_LANGINFO_CODESET 17423# include <langinfo.h> 17424#endif 17425#include <stdlib.h> 17426#include <string.h> 17427struct tm t; 17428char buf[16]; 17429int main () 17430{ 17431 const char *p; 17432 /* Check whether the given locale name is recognized by the system. */ 17433#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ 17434 /* On native Windows, setlocale(category, "") looks at the system settings, 17435 not at the environment variables. Also, when an encoding suffix such 17436 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE 17437 category of the locale to "C". */ 17438 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL 17439 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) 17440 return 1; 17441#else 17442 if (setlocale (LC_ALL, "") == NULL) return 1; 17443#endif 17444 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". 17445 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) 17446 is empty, and the behaviour of Tcl 8.4 in this locale is not useful. 17447 On OpenBSD 4.0, when an unsupported locale is specified, setlocale() 17448 succeeds but then nl_langinfo(CODESET) is "646". In this situation, 17449 some unit tests fail. 17450 On MirBSD 10, when an unsupported locale is specified, setlocale() 17451 succeeds but then nl_langinfo(CODESET) is "UTF-8". */ 17452#if HAVE_LANGINFO_CODESET 17453 { 17454 const char *cs = nl_langinfo (CODESET); 17455 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 17456 || strcmp (cs, "UTF-8") == 0) 17457 return 1; 17458 } 17459#endif 17460#ifdef __CYGWIN__ 17461 /* On Cygwin, avoid locale names without encoding suffix, because the 17462 locale_charset() function relies on the encoding suffix. Note that 17463 LC_ALL is set on the command line. */ 17464 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; 17465#endif 17466 /* Check whether MB_CUR_MAX is > 1. This excludes the dysfunctional locales 17467 on Cygwin 1.5.x. */ 17468 if (MB_CUR_MAX == 1) 17469 return 1; 17470 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. 17471 This excludes the UTF-8 encoding (except on MirBSD). */ 17472 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; 17473 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; 17474 for (p = buf; *p != '\0'; p++) 17475 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) 17476 return 1; 17477 return 0; 17478} 17479 17480_ACEOF 17481 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 17482 (eval $ac_link) 2>&5 17483 ac_status=$? 17484 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 17485 test $ac_status = 0; } && test -s conftest$ac_exeext; then 17486 case "$host_os" in 17487 # Handle native Windows specially, because there setlocale() interprets 17488 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", 17489 # "fr" or "fra" as "French" or "French_France.1252", 17490 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", 17491 # "ja" as "Japanese" or "Japanese_Japan.932", 17492 # and similar. 17493 mingw*) 17494 # Note that on native Windows, the Japanese locale is 17495 # Japanese_Japan.932, and CP932 is very different from EUC-JP, so we 17496 # cannot use it here. 17497 gt_cv_locale_ja=none 17498 ;; 17499 *) 17500 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because 17501 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the 17502 # configure script would override the LC_ALL setting. Likewise for 17503 # LC_CTYPE, which is also set at the beginning of the configure script. 17504 # Test for the AIX locale name. 17505 if (LC_ALL=ja_JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 17506 gt_cv_locale_ja=ja_JP 17507 else 17508 # Test for the locale name with explicit encoding suffix. 17509 if (LC_ALL=ja_JP.EUC-JP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 17510 gt_cv_locale_ja=ja_JP.EUC-JP 17511 else 17512 # Test for the HP-UX, OSF/1, NetBSD locale name. 17513 if (LC_ALL=ja_JP.eucJP LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 17514 gt_cv_locale_ja=ja_JP.eucJP 17515 else 17516 # Test for the IRIX, FreeBSD locale name. 17517 if (LC_ALL=ja_JP.EUC LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 17518 gt_cv_locale_ja=ja_JP.EUC 17519 else 17520 # Test for the Solaris 7 locale name. 17521 if (LC_ALL=ja LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 17522 gt_cv_locale_ja=ja 17523 else 17524 # Special test for NetBSD 1.6. 17525 if test -f /usr/share/locale/ja_JP.eucJP/LC_CTYPE; then 17526 gt_cv_locale_ja=ja_JP.eucJP 17527 else 17528 # None found. 17529 gt_cv_locale_ja=none 17530 fi 17531 fi 17532 fi 17533 fi 17534 fi 17535 fi 17536 ;; 17537 esac 17538 fi 17539 rm -fr conftest* 17540 17541fi 17542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_ja" >&5 17543$as_echo "$gt_cv_locale_ja" >&6; } 17544 LOCALE_JA=$gt_cv_locale_ja 17545 17546 17547 17548 17549 17550 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a transitional chinese locale" >&5 17551$as_echo_n "checking for a transitional chinese locale... " >&6; } 17552if ${gt_cv_locale_zh_CN+:} false; then : 17553 $as_echo_n "(cached) " >&6 17554else 17555 17556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17557/* end confdefs.h. */ 17558 17559#include <locale.h> 17560#include <stdlib.h> 17561#include <time.h> 17562#if HAVE_LANGINFO_CODESET 17563# include <langinfo.h> 17564#endif 17565#include <stdlib.h> 17566#include <string.h> 17567struct tm t; 17568char buf[16]; 17569int main () 17570{ 17571 const char *p; 17572 /* Check whether the given locale name is recognized by the system. */ 17573#if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ 17574 /* On native Windows, setlocale(category, "") looks at the system settings, 17575 not at the environment variables. Also, when an encoding suffix such 17576 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE 17577 category of the locale to "C". */ 17578 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL 17579 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) 17580 return 1; 17581#else 17582 if (setlocale (LC_ALL, "") == NULL) return 1; 17583#endif 17584 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". 17585 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) 17586 is empty, and the behaviour of Tcl 8.4 in this locale is not useful. 17587 On OpenBSD 4.0, when an unsupported locale is specified, setlocale() 17588 succeeds but then nl_langinfo(CODESET) is "646". In this situation, 17589 some unit tests fail. 17590 On MirBSD 10, when an unsupported locale is specified, setlocale() 17591 succeeds but then nl_langinfo(CODESET) is "UTF-8". */ 17592#if HAVE_LANGINFO_CODESET 17593 { 17594 const char *cs = nl_langinfo (CODESET); 17595 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0 17596 || strcmp (cs, "UTF-8") == 0) 17597 return 1; 17598 } 17599#endif 17600#ifdef __CYGWIN__ 17601 /* On Cygwin, avoid locale names without encoding suffix, because the 17602 locale_charset() function relies on the encoding suffix. Note that 17603 LC_ALL is set on the command line. */ 17604 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; 17605#endif 17606 /* Check whether in a month name, no byte in the range 0x80..0x9F occurs. 17607 This excludes the UTF-8 encoding (except on MirBSD). */ 17608 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; 17609 if (strftime (buf, sizeof (buf), "%B", &t) < 2) return 1; 17610 for (p = buf; *p != '\0'; p++) 17611 if ((unsigned char) *p >= 0x80 && (unsigned char) *p < 0xa0) 17612 return 1; 17613 /* Check whether a typical GB18030 multibyte sequence is recognized as a 17614 single wide character. This excludes the GB2312 and GBK encodings. */ 17615 if (mblen ("\203\062\332\066", 5) != 4) 17616 return 1; 17617 return 0; 17618} 17619 17620_ACEOF 17621 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 17622 (eval $ac_link) 2>&5 17623 ac_status=$? 17624 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 17625 test $ac_status = 0; } && test -s conftest$ac_exeext; then 17626 case "$host_os" in 17627 # Handle native Windows specially, because there setlocale() interprets 17628 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", 17629 # "fr" or "fra" as "French" or "French_France.1252", 17630 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", 17631 # "ja" as "Japanese" or "Japanese_Japan.932", 17632 # and similar. 17633 mingw*) 17634 # Test for the hypothetical native Windows locale name. 17635 if (LC_ALL=Chinese_China.54936 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 17636 gt_cv_locale_zh_CN=Chinese_China.54936 17637 else 17638 # None found. 17639 gt_cv_locale_zh_CN=none 17640 fi 17641 ;; 17642 solaris2.8) 17643 # On Solaris 8, the locales zh_CN.GB18030, zh_CN.GBK, zh.GBK are 17644 # broken. One witness is the test case in gl_MBRTOWC_SANITYCHECK. 17645 # Another witness is that "LC_ALL=zh_CN.GB18030 bash -c true" dumps core. 17646 gt_cv_locale_zh_CN=none 17647 ;; 17648 *) 17649 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because 17650 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the 17651 # configure script would override the LC_ALL setting. Likewise for 17652 # LC_CTYPE, which is also set at the beginning of the configure script. 17653 # Test for the locale name without encoding suffix. 17654 if (LC_ALL=zh_CN LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 17655 gt_cv_locale_zh_CN=zh_CN 17656 else 17657 # Test for the locale name with explicit encoding suffix. 17658 if (LC_ALL=zh_CN.GB18030 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 17659 gt_cv_locale_zh_CN=zh_CN.GB18030 17660 else 17661 # None found. 17662 gt_cv_locale_zh_CN=none 17663 fi 17664 fi 17665 ;; 17666 esac 17667 else 17668 # If there was a link error, due to mblen(), the system is so old that 17669 # it certainly doesn't have a chinese locale. 17670 gt_cv_locale_zh_CN=none 17671 fi 17672 rm -fr conftest* 17673 17674fi 17675{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_zh_CN" >&5 17676$as_echo "$gt_cv_locale_zh_CN" >&6; } 17677 LOCALE_ZH_CN=$gt_cv_locale_zh_CN 17678 17679 17680 17681 17682 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a french Unicode locale" >&5 17683$as_echo_n "checking for a french Unicode locale... " >&6; } 17684if ${gt_cv_locale_fr_utf8+:} false; then : 17685 $as_echo_n "(cached) " >&6 17686else 17687 17688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17689/* end confdefs.h. */ 17690 17691#include <locale.h> 17692#include <time.h> 17693#if HAVE_LANGINFO_CODESET 17694# include <langinfo.h> 17695#endif 17696#include <stdlib.h> 17697#include <string.h> 17698struct tm t; 17699char buf[16]; 17700int main () { 17701 /* On BeOS and Haiku, locales are not implemented in libc. Rather, libintl 17702 imitates locale dependent behaviour by looking at the environment 17703 variables, and all locales use the UTF-8 encoding. */ 17704#if !(defined __BEOS__ || defined __HAIKU__) 17705 /* Check whether the given locale name is recognized by the system. */ 17706# if (defined _WIN32 || defined __WIN32__) && !defined __CYGWIN__ 17707 /* On native Windows, setlocale(category, "") looks at the system settings, 17708 not at the environment variables. Also, when an encoding suffix such 17709 as ".65001" or ".54936" is specified, it succeeds but sets the LC_CTYPE 17710 category of the locale to "C". */ 17711 if (setlocale (LC_ALL, getenv ("LC_ALL")) == NULL 17712 || strcmp (setlocale (LC_CTYPE, NULL), "C") == 0) 17713 return 1; 17714# else 17715 if (setlocale (LC_ALL, "") == NULL) return 1; 17716# endif 17717 /* Check whether nl_langinfo(CODESET) is nonempty and not "ASCII" or "646". 17718 On Mac OS X 10.3.5 (Darwin 7.5) in the fr_FR locale, nl_langinfo(CODESET) 17719 is empty, and the behaviour of Tcl 8.4 in this locale is not useful. 17720 On OpenBSD 4.0, when an unsupported locale is specified, setlocale() 17721 succeeds but then nl_langinfo(CODESET) is "646". In this situation, 17722 some unit tests fail. */ 17723# if HAVE_LANGINFO_CODESET 17724 { 17725 const char *cs = nl_langinfo (CODESET); 17726 if (cs[0] == '\0' || strcmp (cs, "ASCII") == 0 || strcmp (cs, "646") == 0) 17727 return 1; 17728 } 17729# endif 17730# ifdef __CYGWIN__ 17731 /* On Cygwin, avoid locale names without encoding suffix, because the 17732 locale_charset() function relies on the encoding suffix. Note that 17733 LC_ALL is set on the command line. */ 17734 if (strchr (getenv ("LC_ALL"), '.') == NULL) return 1; 17735# endif 17736 /* Check whether in the abbreviation of the second month, the second 17737 character (should be U+00E9: LATIN SMALL LETTER E WITH ACUTE) is 17738 two bytes long, with UTF-8 encoding. */ 17739 t.tm_year = 1975 - 1900; t.tm_mon = 2 - 1; t.tm_mday = 4; 17740 if (strftime (buf, sizeof (buf), "%b", &t) < 4 17741 || buf[1] != (char) 0xc3 || buf[2] != (char) 0xa9 || buf[3] != 'v') 17742 return 1; 17743#endif 17744#if !defined __BIONIC__ /* Bionic libc's 'struct lconv' is just a dummy. */ 17745 /* Check whether the decimal separator is a comma. 17746 On NetBSD 3.0 in the fr_FR.ISO8859-1 locale, localeconv()->decimal_point 17747 are nl_langinfo(RADIXCHAR) are both ".". */ 17748 if (localeconv () ->decimal_point[0] != ',') return 1; 17749#endif 17750 return 0; 17751} 17752 17753_ACEOF 17754 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 17755 (eval $ac_link) 2>&5 17756 ac_status=$? 17757 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 17758 test $ac_status = 0; } && test -s conftest$ac_exeext; then 17759 case "$host_os" in 17760 # Handle native Windows specially, because there setlocale() interprets 17761 # "ar" as "Arabic" or "Arabic_Saudi Arabia.1256", 17762 # "fr" or "fra" as "French" or "French_France.1252", 17763 # "ge"(!) or "deu"(!) as "German" or "German_Germany.1252", 17764 # "ja" as "Japanese" or "Japanese_Japan.932", 17765 # and similar. 17766 mingw*) 17767 # Test for the hypothetical native Windows locale name. 17768 if (LC_ALL=French_France.65001 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 17769 gt_cv_locale_fr_utf8=French_France.65001 17770 else 17771 # None found. 17772 gt_cv_locale_fr_utf8=none 17773 fi 17774 ;; 17775 *) 17776 # Setting LC_ALL is not enough. Need to set LC_TIME to empty, because 17777 # otherwise on Mac OS X 10.3.5 the LC_TIME=C from the beginning of the 17778 # configure script would override the LC_ALL setting. Likewise for 17779 # LC_CTYPE, which is also set at the beginning of the configure script. 17780 # Test for the usual locale name. 17781 if (LC_ALL=fr_FR LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 17782 gt_cv_locale_fr_utf8=fr_FR 17783 else 17784 # Test for the locale name with explicit encoding suffix. 17785 if (LC_ALL=fr_FR.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 17786 gt_cv_locale_fr_utf8=fr_FR.UTF-8 17787 else 17788 # Test for the Solaris 7 locale name. 17789 if (LC_ALL=fr.UTF-8 LC_TIME= LC_CTYPE= ./conftest; exit) 2>/dev/null; then 17790 gt_cv_locale_fr_utf8=fr.UTF-8 17791 else 17792 # None found. 17793 gt_cv_locale_fr_utf8=none 17794 fi 17795 fi 17796 fi 17797 ;; 17798 esac 17799 fi 17800 rm -fr conftest* 17801 17802fi 17803{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fr_utf8" >&5 17804$as_echo "$gt_cv_locale_fr_utf8" >&6; } 17805 LOCALE_FR_UTF8=$gt_cv_locale_fr_utf8 17806 17807 17808 17809 GNULIB_FFSL=0; 17810 GNULIB_FFSLL=0; 17811 GNULIB_MEMCHR=0; 17812 GNULIB_MEMMEM=0; 17813 GNULIB_MEMPCPY=0; 17814 GNULIB_MEMRCHR=0; 17815 GNULIB_RAWMEMCHR=0; 17816 GNULIB_STPCPY=0; 17817 GNULIB_STPNCPY=0; 17818 GNULIB_STRCHRNUL=0; 17819 GNULIB_STRDUP=0; 17820 GNULIB_STRNCAT=0; 17821 GNULIB_STRNDUP=0; 17822 GNULIB_STRNLEN=0; 17823 GNULIB_STRPBRK=0; 17824 GNULIB_STRSEP=0; 17825 GNULIB_STRSTR=0; 17826 GNULIB_STRCASESTR=0; 17827 GNULIB_STRTOK_R=0; 17828 GNULIB_MBSLEN=0; 17829 GNULIB_MBSNLEN=0; 17830 GNULIB_MBSCHR=0; 17831 GNULIB_MBSRCHR=0; 17832 GNULIB_MBSSTR=0; 17833 GNULIB_MBSCASECMP=0; 17834 GNULIB_MBSNCASECMP=0; 17835 GNULIB_MBSPCASECMP=0; 17836 GNULIB_MBSCASESTR=0; 17837 GNULIB_MBSCSPN=0; 17838 GNULIB_MBSPBRK=0; 17839 GNULIB_MBSSPN=0; 17840 GNULIB_MBSSEP=0; 17841 GNULIB_MBSTOK_R=0; 17842 GNULIB_STRERROR=0; 17843 GNULIB_STRERROR_R=0; 17844 GNULIB_STRSIGNAL=0; 17845 GNULIB_STRVERSCMP=0; 17846 HAVE_MBSLEN=0; 17847 HAVE_FFSL=1; 17848 HAVE_FFSLL=1; 17849 HAVE_MEMCHR=1; 17850 HAVE_DECL_MEMMEM=1; 17851 HAVE_MEMPCPY=1; 17852 HAVE_DECL_MEMRCHR=1; 17853 HAVE_RAWMEMCHR=1; 17854 HAVE_STPCPY=1; 17855 HAVE_STPNCPY=1; 17856 HAVE_STRCHRNUL=1; 17857 HAVE_DECL_STRDUP=1; 17858 HAVE_DECL_STRNDUP=1; 17859 HAVE_DECL_STRNLEN=1; 17860 HAVE_STRPBRK=1; 17861 HAVE_STRSEP=1; 17862 HAVE_STRCASESTR=1; 17863 HAVE_DECL_STRTOK_R=1; 17864 HAVE_DECL_STRERROR_R=1; 17865 HAVE_DECL_STRSIGNAL=1; 17866 HAVE_STRVERSCMP=1; 17867 REPLACE_MEMCHR=0; 17868 REPLACE_MEMMEM=0; 17869 REPLACE_STPNCPY=0; 17870 REPLACE_STRDUP=0; 17871 REPLACE_STRSTR=0; 17872 REPLACE_STRCASESTR=0; 17873 REPLACE_STRCHRNUL=0; 17874 REPLACE_STRERROR=0; 17875 REPLACE_STRERROR_R=0; 17876 REPLACE_STRNCAT=0; 17877 REPLACE_STRNDUP=0; 17878 REPLACE_STRNLEN=0; 17879 REPLACE_STRSIGNAL=0; 17880 REPLACE_STRTOK_R=0; 17881 UNDEFINE_STRTOK_R=0; 17882 17883 17884 17885 17886 17887 17888 17889 17890 17891 17892 17893 # Check for mmap(). Don't use AC_FUNC_MMAP, because it checks too much: it 17894 # fails on HP-UX 11, because MAP_FIXED mappings do not work. But this is 17895 # irrelevant for anonymous mappings. 17896 ac_fn_c_check_func "$LINENO" "mmap" "ac_cv_func_mmap" 17897if test "x$ac_cv_func_mmap" = xyes; then : 17898 gl_have_mmap=yes 17899else 17900 gl_have_mmap=no 17901fi 17902 17903 17904 # Try to allow MAP_ANONYMOUS. 17905 gl_have_mmap_anonymous=no 17906 if test $gl_have_mmap = yes; then 17907 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAP_ANONYMOUS" >&5 17908$as_echo_n "checking for MAP_ANONYMOUS... " >&6; } 17909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17910/* end confdefs.h. */ 17911 17912#include <sys/mman.h> 17913#ifdef MAP_ANONYMOUS 17914 I cannot identify this map 17915#endif 17916 17917_ACEOF 17918if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 17919 $EGREP "I cannot identify this map" >/dev/null 2>&1; then : 17920 gl_have_mmap_anonymous=yes 17921fi 17922rm -f conftest* 17923 17924 if test $gl_have_mmap_anonymous != yes; then 17925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17926/* end confdefs.h. */ 17927 17928#include <sys/mman.h> 17929#ifdef MAP_ANON 17930 I cannot identify this map 17931#endif 17932 17933_ACEOF 17934if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 17935 $EGREP "I cannot identify this map" >/dev/null 2>&1; then : 17936 17937$as_echo "#define MAP_ANONYMOUS MAP_ANON" >>confdefs.h 17938 17939 gl_have_mmap_anonymous=yes 17940fi 17941rm -f conftest* 17942 17943 fi 17944 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_have_mmap_anonymous" >&5 17945$as_echo "$gl_have_mmap_anonymous" >&6; } 17946 if test $gl_have_mmap_anonymous = yes; then 17947 17948$as_echo "#define HAVE_MAP_ANONYMOUS 1" >>confdefs.h 17949 17950 fi 17951 fi 17952 17953 17954 17955 17956 17957 17958 if test $HAVE_MEMCHR = 1; then 17959 # Detect platform-specific bugs in some versions of glibc: 17960 # memchr should not dereference anything with length 0 17961 # http://bugzilla.redhat.com/499689 17962 # memchr should not dereference overestimated length after a match 17963 # http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=521737 17964 # http://sourceware.org/bugzilla/show_bug.cgi?id=10162 17965 # Assume that memchr works on platforms that lack mprotect. 17966 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether memchr works" >&5 17967$as_echo_n "checking whether memchr works... " >&6; } 17968if ${gl_cv_func_memchr_works+:} false; then : 17969 $as_echo_n "(cached) " >&6 17970else 17971 if test "$cross_compiling" = yes; then : 17972 gl_cv_func_memchr_works="guessing no" 17973else 17974 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 17975/* end confdefs.h. */ 17976 17977#include <string.h> 17978#if HAVE_SYS_MMAN_H 17979# include <fcntl.h> 17980# include <unistd.h> 17981# include <sys/types.h> 17982# include <sys/mman.h> 17983# ifndef MAP_FILE 17984# define MAP_FILE 0 17985# endif 17986#endif 17987 17988int 17989main () 17990{ 17991 17992 int result = 0; 17993 char *fence = NULL; 17994#if HAVE_SYS_MMAN_H && HAVE_MPROTECT 17995# if HAVE_MAP_ANONYMOUS 17996 const int flags = MAP_ANONYMOUS | MAP_PRIVATE; 17997 const int fd = -1; 17998# else /* !HAVE_MAP_ANONYMOUS */ 17999 const int flags = MAP_FILE | MAP_PRIVATE; 18000 int fd = open ("/dev/zero", O_RDONLY, 0666); 18001 if (fd >= 0) 18002# endif 18003 { 18004 int pagesize = getpagesize (); 18005 char *two_pages = 18006 (char *) mmap (NULL, 2 * pagesize, PROT_READ | PROT_WRITE, 18007 flags, fd, 0); 18008 if (two_pages != (char *)(-1) 18009 && mprotect (two_pages + pagesize, pagesize, PROT_NONE) == 0) 18010 fence = two_pages + pagesize; 18011 } 18012#endif 18013 if (fence) 18014 { 18015 if (memchr (fence, 0, 0)) 18016 result |= 1; 18017 strcpy (fence - 9, "12345678"); 18018 if (memchr (fence - 9, 0, 79) != fence - 1) 18019 result |= 2; 18020 if (memchr (fence - 1, 0, 3) != fence - 1) 18021 result |= 4; 18022 } 18023 return result; 18024 18025 ; 18026 return 0; 18027} 18028_ACEOF 18029if ac_fn_c_try_run "$LINENO"; then : 18030 gl_cv_func_memchr_works=yes 18031else 18032 gl_cv_func_memchr_works=no 18033fi 18034rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 18035 conftest.$ac_objext conftest.beam conftest.$ac_ext 18036fi 18037 18038fi 18039{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_memchr_works" >&5 18040$as_echo "$gl_cv_func_memchr_works" >&6; } 18041 if test "$gl_cv_func_memchr_works" != yes; then 18042 REPLACE_MEMCHR=1 18043 fi 18044 fi 18045 18046 18047 18048ac_fn_c_check_decl "$LINENO" "obstack_printf" "ac_cv_have_decl_obstack_printf" "$ac_includes_default" 18049if test "x$ac_cv_have_decl_obstack_printf" = xyes; then : 18050 ac_have_decl=1 18051else 18052 ac_have_decl=0 18053fi 18054 18055cat >>confdefs.h <<_ACEOF 18056#define HAVE_DECL_OBSTACK_PRINTF $ac_have_decl 18057_ACEOF 18058 18059 18060 18061 18062 18063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for promoted mode_t type" >&5 18064$as_echo_n "checking for promoted mode_t type... " >&6; } 18065if ${gl_cv_promoted_mode_t+:} false; then : 18066 $as_echo_n "(cached) " >&6 18067else 18068 18069 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18070/* end confdefs.h. */ 18071#include <sys/types.h> 18072int 18073main () 18074{ 18075typedef int array[2 * (sizeof (mode_t) < sizeof (int)) - 1]; 18076 ; 18077 return 0; 18078} 18079_ACEOF 18080if ac_fn_c_try_compile "$LINENO"; then : 18081 gl_cv_promoted_mode_t='int' 18082else 18083 gl_cv_promoted_mode_t='mode_t' 18084fi 18085rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 18086 18087fi 18088{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_promoted_mode_t" >&5 18089$as_echo "$gl_cv_promoted_mode_t" >&6; } 18090 18091cat >>confdefs.h <<_ACEOF 18092#define PROMOTED_MODE_T $gl_cv_promoted_mode_t 18093_ACEOF 18094 18095 18096 18097 18098 18099 REPLACE_STRERROR_0=0 18100 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror(0) succeeds" >&5 18101$as_echo_n "checking whether strerror(0) succeeds... " >&6; } 18102if ${gl_cv_func_strerror_0_works+:} false; then : 18103 $as_echo_n "(cached) " >&6 18104else 18105 if test "$cross_compiling" = yes; then : 18106 case "$host_os" in 18107 # Guess yes on glibc systems. 18108 *-gnu*) gl_cv_func_strerror_0_works="guessing yes" ;; 18109 # If we don't know, assume the worst. 18110 *) gl_cv_func_strerror_0_works="guessing no" ;; 18111 esac 18112 18113else 18114 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18115/* end confdefs.h. */ 18116#include <string.h> 18117 #include <errno.h> 18118 18119int 18120main () 18121{ 18122int result = 0; 18123 char *str; 18124 errno = 0; 18125 str = strerror (0); 18126 if (!*str) result |= 1; 18127 if (errno) result |= 2; 18128 if (strstr (str, "nknown") || strstr (str, "ndefined")) 18129 result |= 4; 18130 return result; 18131 ; 18132 return 0; 18133} 18134_ACEOF 18135if ac_fn_c_try_run "$LINENO"; then : 18136 gl_cv_func_strerror_0_works=yes 18137else 18138 gl_cv_func_strerror_0_works=no 18139fi 18140rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 18141 conftest.$ac_objext conftest.beam conftest.$ac_ext 18142fi 18143 18144 18145fi 18146{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_0_works" >&5 18147$as_echo "$gl_cv_func_strerror_0_works" >&6; } 18148 case "$gl_cv_func_strerror_0_works" in 18149 *yes) ;; 18150 *) 18151 REPLACE_STRERROR_0=1 18152 18153$as_echo "#define REPLACE_STRERROR_0 1" >>confdefs.h 18154 18155 ;; 18156 esac 18157 18158 18159 18160 18161 18162 18163 18164 18165 18166 18167 if test $ac_cv_func_strerror_r = yes; then 18168 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then 18169 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for strerror_r with POSIX signature" >&5 18170$as_echo_n "checking for strerror_r with POSIX signature... " >&6; } 18171if ${gl_cv_func_strerror_r_posix_signature+:} false; then : 18172 $as_echo_n "(cached) " >&6 18173else 18174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18175/* end confdefs.h. */ 18176#include <string.h> 18177 int strerror_r (int, char *, size_t); 18178 18179int 18180main () 18181{ 18182 18183 ; 18184 return 0; 18185} 18186_ACEOF 18187if ac_fn_c_try_compile "$LINENO"; then : 18188 gl_cv_func_strerror_r_posix_signature=yes 18189else 18190 gl_cv_func_strerror_r_posix_signature=no 18191fi 18192rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 18193 18194fi 18195{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_posix_signature" >&5 18196$as_echo "$gl_cv_func_strerror_r_posix_signature" >&6; } 18197 if test $gl_cv_func_strerror_r_posix_signature = yes; then 18198 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strerror_r works" >&5 18199$as_echo_n "checking whether strerror_r works... " >&6; } 18200if ${gl_cv_func_strerror_r_works+:} false; then : 18201 $as_echo_n "(cached) " >&6 18202else 18203 if test "$cross_compiling" = yes; then : 18204 18205 case "$host_os" in 18206 # Guess no on AIX. 18207 aix*) gl_cv_func_strerror_r_works="guessing no";; 18208 # Guess no on HP-UX. 18209 hpux*) gl_cv_func_strerror_r_works="guessing no";; 18210 # Guess no on BSD variants. 18211 *bsd*) gl_cv_func_strerror_r_works="guessing no";; 18212 # Guess yes otherwise. 18213 *) gl_cv_func_strerror_r_works="guessing yes";; 18214 esac 18215 18216else 18217 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18218/* end confdefs.h. */ 18219#include <errno.h> 18220 #include <string.h> 18221 18222int 18223main () 18224{ 18225int result = 0; 18226 char buf[79]; 18227 if (strerror_r (EACCES, buf, 0) < 0) 18228 result |= 1; 18229 errno = 0; 18230 if (strerror_r (EACCES, buf, sizeof buf) != 0) 18231 result |= 2; 18232 strcpy (buf, "Unknown"); 18233 if (strerror_r (0, buf, sizeof buf) != 0) 18234 result |= 4; 18235 if (errno) 18236 result |= 8; 18237 if (strstr (buf, "nknown") || strstr (buf, "ndefined")) 18238 result |= 0x10; 18239 errno = 0; 18240 *buf = 0; 18241 if (strerror_r (-3, buf, sizeof buf) < 0) 18242 result |= 0x20; 18243 if (errno) 18244 result |= 0x40; 18245 if (!*buf) 18246 result |= 0x80; 18247 return result; 18248 18249 ; 18250 return 0; 18251} 18252_ACEOF 18253if ac_fn_c_try_run "$LINENO"; then : 18254 gl_cv_func_strerror_r_works=yes 18255else 18256 gl_cv_func_strerror_r_works=no 18257fi 18258rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 18259 conftest.$ac_objext conftest.beam conftest.$ac_ext 18260fi 18261 18262 18263fi 18264{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5 18265$as_echo "$gl_cv_func_strerror_r_works" >&6; } 18266 else 18267 18268 if test $ac_cv_func___xpg_strerror_r = yes; then 18269 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether __xpg_strerror_r works" >&5 18270$as_echo_n "checking whether __xpg_strerror_r works... " >&6; } 18271if ${gl_cv_func_strerror_r_works+:} false; then : 18272 $as_echo_n "(cached) " >&6 18273else 18274 if test "$cross_compiling" = yes; then : 18275 gl_cv_func_strerror_r_works="guessing no" 18276 18277else 18278 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18279/* end confdefs.h. */ 18280#include <errno.h> 18281 #include <string.h> 18282 extern 18283 #ifdef __cplusplus 18284 "C" 18285 #endif 18286 int __xpg_strerror_r(int, char *, size_t); 18287 18288int 18289main () 18290{ 18291int result = 0; 18292 char buf[256] = "^"; 18293 char copy[256]; 18294 char *str = strerror (-1); 18295 strcpy (copy, str); 18296 if (__xpg_strerror_r (-2, buf, 1) == 0) 18297 result |= 1; 18298 if (*buf) 18299 result |= 2; 18300 __xpg_strerror_r (-2, buf, 256); 18301 if (strcmp (str, copy)) 18302 result |= 4; 18303 return result; 18304 18305 ; 18306 return 0; 18307} 18308_ACEOF 18309if ac_fn_c_try_run "$LINENO"; then : 18310 gl_cv_func_strerror_r_works=yes 18311else 18312 gl_cv_func_strerror_r_works=no 18313fi 18314rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 18315 conftest.$ac_objext conftest.beam conftest.$ac_ext 18316fi 18317 18318 18319fi 18320{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strerror_r_works" >&5 18321$as_echo "$gl_cv_func_strerror_r_works" >&6; } 18322 fi 18323 fi 18324 fi 18325 fi 18326 18327ac_fn_c_check_decl "$LINENO" "strerror_r" "ac_cv_have_decl_strerror_r" "$ac_includes_default" 18328if test "x$ac_cv_have_decl_strerror_r" = xyes; then : 18329 ac_have_decl=1 18330else 18331 ac_have_decl=0 18332fi 18333 18334cat >>confdefs.h <<_ACEOF 18335#define HAVE_DECL_STRERROR_R $ac_have_decl 18336_ACEOF 18337 18338 18339 18340 18341 18342 18343 18344 18345 if test $ac_cv_have_decl_strerror_r = no; then 18346 HAVE_DECL_STRERROR_R=0 18347 fi 18348 18349 if test $ac_cv_func_strerror_r = yes; then 18350 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then 18351 if test $gl_cv_func_strerror_r_posix_signature = yes; then 18352 case "$gl_cv_func_strerror_r_works" in 18353 *no) REPLACE_STRERROR_R=1 ;; 18354 esac 18355 else 18356 REPLACE_STRERROR_R=1 18357 fi 18358 else 18359 REPLACE_STRERROR_R=1 18360 fi 18361 fi 18362 18363 18364 18365 18366 GNULIB_POSIX_SPAWN=0; 18367 GNULIB_POSIX_SPAWNP=0; 18368 GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=0; 18369 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0; 18370 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0; 18371 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0; 18372 GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=0; 18373 GNULIB_POSIX_SPAWNATTR_INIT=0; 18374 GNULIB_POSIX_SPAWNATTR_GETFLAGS=0; 18375 GNULIB_POSIX_SPAWNATTR_SETFLAGS=0; 18376 GNULIB_POSIX_SPAWNATTR_GETPGROUP=0; 18377 GNULIB_POSIX_SPAWNATTR_SETPGROUP=0; 18378 GNULIB_POSIX_SPAWNATTR_GETSCHEDPARAM=0; 18379 GNULIB_POSIX_SPAWNATTR_SETSCHEDPARAM=0; 18380 GNULIB_POSIX_SPAWNATTR_GETSCHEDPOLICY=0; 18381 GNULIB_POSIX_SPAWNATTR_SETSCHEDPOLICY=0; 18382 GNULIB_POSIX_SPAWNATTR_GETSIGDEFAULT=0; 18383 GNULIB_POSIX_SPAWNATTR_SETSIGDEFAULT=0; 18384 GNULIB_POSIX_SPAWNATTR_GETSIGMASK=0; 18385 GNULIB_POSIX_SPAWNATTR_SETSIGMASK=0; 18386 GNULIB_POSIX_SPAWNATTR_DESTROY=0; 18387 HAVE_POSIX_SPAWN=1; 18388 HAVE_POSIX_SPAWNATTR_T=1; 18389 HAVE_POSIX_SPAWN_FILE_ACTIONS_T=1; 18390 18391 REPLACE_POSIX_SPAWN=0; 18392 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=0; 18393 18394 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=0; 18395 18396 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=0; 18397 18398 18399 18400 18401 18402 18403 18404 18405 if test $ac_cv_func_posix_spawn != yes; then 18406 HAVE_POSIX_SPAWN=0 18407 fi 18408 18409 18410 18411 18412 if test $ac_cv_func_posix_spawn = yes; then 18413 18414 18415 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn works" >&5 18416$as_echo_n "checking whether posix_spawn works... " >&6; } 18417if ${gl_cv_func_posix_spawn_works+:} false; then : 18418 $as_echo_n "(cached) " >&6 18419else 18420 if test $cross_compiling = no; then 18421 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18422/* end confdefs.h. */ 18423 18424#include <errno.h> 18425#include <fcntl.h> 18426#include <signal.h> 18427#include <spawn.h> 18428#include <stdbool.h> 18429#include <stdio.h> 18430#include <stdlib.h> 18431#include <string.h> 18432#include <unistd.h> 18433#include <sys/types.h> 18434#include <sys/wait.h> 18435 18436extern char **environ; 18437 18438#ifndef STDIN_FILENO 18439# define STDIN_FILENO 0 18440#endif 18441#ifndef STDOUT_FILENO 18442# define STDOUT_FILENO 1 18443#endif 18444#ifndef STDERR_FILENO 18445# define STDERR_FILENO 2 18446#endif 18447 18448#ifndef WTERMSIG 18449# define WTERMSIG(x) ((x) & 0x7f) 18450#endif 18451#ifndef WIFEXITED 18452# define WIFEXITED(x) (WTERMSIG (x) == 0) 18453#endif 18454#ifndef WEXITSTATUS 18455# define WEXITSTATUS(x) (((x) >> 8) & 0xff) 18456#endif 18457 18458#define CHILD_PROGRAM_FILENAME "/non/exist/ent" 18459 18460static int 18461fd_safer (int fd) 18462{ 18463 if (0 <= fd && fd <= 2) 18464 { 18465 int f = fd_safer (dup (fd)); 18466 int e = errno; 18467 close (fd); 18468 errno = e; 18469 fd = f; 18470 } 18471 18472 return fd; 18473} 18474 18475int 18476main () 18477{ 18478 char *argv[2] = { CHILD_PROGRAM_FILENAME, NULL }; 18479 int ofd[2]; 18480 sigset_t blocked_signals; 18481 sigset_t fatal_signal_set; 18482 posix_spawn_file_actions_t actions; 18483 bool actions_allocated; 18484 posix_spawnattr_t attrs; 18485 bool attrs_allocated; 18486 int err; 18487 pid_t child; 18488 int status; 18489 int exitstatus; 18490 18491 setvbuf (stdout, NULL, _IOFBF, 0); 18492 puts ("This should be seen only once."); 18493 if (pipe (ofd) < 0 || (ofd[1] = fd_safer (ofd[1])) < 0) 18494 { 18495 perror ("cannot create pipe"); 18496 exit (1); 18497 } 18498 sigprocmask (SIG_SETMASK, NULL, &blocked_signals); 18499 sigemptyset (&fatal_signal_set); 18500 sigaddset (&fatal_signal_set, SIGINT); 18501 sigaddset (&fatal_signal_set, SIGTERM); 18502 sigaddset (&fatal_signal_set, SIGHUP); 18503 sigaddset (&fatal_signal_set, SIGPIPE); 18504 sigprocmask (SIG_BLOCK, &fatal_signal_set, NULL); 18505 actions_allocated = false; 18506 attrs_allocated = false; 18507 if ((err = posix_spawn_file_actions_init (&actions)) != 0 18508 || (actions_allocated = true, 18509 (err = posix_spawn_file_actions_adddup2 (&actions, ofd[0], STDIN_FILENO)) != 0 18510 || (err = posix_spawn_file_actions_addclose (&actions, ofd[0])) != 0 18511 || (err = posix_spawn_file_actions_addclose (&actions, ofd[1])) != 0 18512 || (err = posix_spawnattr_init (&attrs)) != 0 18513 || (attrs_allocated = true, 18514 (err = posix_spawnattr_setsigmask (&attrs, &blocked_signals)) != 0 18515 || (err = posix_spawnattr_setflags (&attrs, POSIX_SPAWN_SETSIGMASK)) != 0) 18516 || (err = posix_spawnp (&child, CHILD_PROGRAM_FILENAME, &actions, &attrs, argv, environ)) != 0)) 18517 { 18518 if (actions_allocated) 18519 posix_spawn_file_actions_destroy (&actions); 18520 if (attrs_allocated) 18521 posix_spawnattr_destroy (&attrs); 18522 sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL); 18523 if (err == ENOENT) 18524 return 0; 18525 else 18526 { 18527 errno = err; 18528 perror ("subprocess failed"); 18529 exit (1); 18530 } 18531 } 18532 posix_spawn_file_actions_destroy (&actions); 18533 posix_spawnattr_destroy (&attrs); 18534 sigprocmask (SIG_UNBLOCK, &fatal_signal_set, NULL); 18535 close (ofd[0]); 18536 close (ofd[1]); 18537 status = 0; 18538 while (waitpid (child, &status, 0) != child) 18539 ; 18540 if (!WIFEXITED (status)) 18541 { 18542 fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status); 18543 exit (1); 18544 } 18545 exitstatus = WEXITSTATUS (status); 18546 if (exitstatus != 127) 18547 { 18548 fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus); 18549 exit (1); 18550 } 18551 return 0; 18552} 18553 18554_ACEOF 18555if ac_fn_c_try_link "$LINENO"; then : 18556 if test -s conftest$ac_exeext \ 18557 && ./conftest$ac_exeext > conftest.out \ 18558 && echo 'This should be seen only once.' > conftest.ok \ 18559 && cmp conftest.out conftest.ok > /dev/null; then 18560 gl_cv_func_posix_spawn_works=yes 18561 else 18562 gl_cv_func_posix_spawn_works=no 18563 fi 18564else 18565 gl_cv_func_posix_spawn_works=no 18566fi 18567rm -f core conftest.err conftest.$ac_objext \ 18568 conftest$ac_exeext conftest.$ac_ext 18569 if test $gl_cv_func_posix_spawn_works = yes; then 18570 if test "$cross_compiling" = yes; then : 18571 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 18572$as_echo "$as_me: error: in \`$ac_pwd':" >&2;} 18573as_fn_error $? "cannot run test program while cross compiling 18574See \`config.log' for more details" "$LINENO" 5; } 18575else 18576 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18577/* end confdefs.h. */ 18578 18579/* Test whether posix_spawn_file_actions_addopen supports filename arguments 18580 that contain special characters such as '*'. */ 18581 18582#include <errno.h> 18583#include <fcntl.h> 18584#include <signal.h> 18585#include <spawn.h> 18586#include <stdbool.h> 18587#include <stdio.h> 18588#include <string.h> 18589#include <unistd.h> 18590#include <sys/types.h> 18591#include <sys/wait.h> 18592 18593extern char **environ; 18594 18595#ifndef STDIN_FILENO 18596# define STDIN_FILENO 0 18597#endif 18598#ifndef STDOUT_FILENO 18599# define STDOUT_FILENO 1 18600#endif 18601#ifndef STDERR_FILENO 18602# define STDERR_FILENO 2 18603#endif 18604 18605#ifndef WTERMSIG 18606# define WTERMSIG(x) ((x) & 0x7f) 18607#endif 18608#ifndef WIFEXITED 18609# define WIFEXITED(x) (WTERMSIG (x) == 0) 18610#endif 18611#ifndef WEXITSTATUS 18612# define WEXITSTATUS(x) (((x) >> 8) & 0xff) 18613#endif 18614 18615#define CHILD_PROGRAM_FILENAME "conftest" 18616#define DATA_FILENAME "conftest%=*#?" 18617 18618static int 18619parent_main (void) 18620{ 18621 FILE *fp; 18622 char *argv[3] = { CHILD_PROGRAM_FILENAME, "-child", NULL }; 18623 posix_spawn_file_actions_t actions; 18624 bool actions_allocated; 18625 int err; 18626 pid_t child; 18627 int status; 18628 int exitstatus; 18629 18630 /* Create a data file with specific contents. */ 18631 fp = fopen (DATA_FILENAME, "wb"); 18632 if (fp == NULL) 18633 { 18634 perror ("cannot create data file"); 18635 return 1; 18636 } 18637 fwrite ("Halle Potta", 1, 11, fp); 18638 if (fflush (fp) || fclose (fp)) 18639 { 18640 perror ("cannot prepare data file"); 18641 return 2; 18642 } 18643 18644 /* Avoid reading from our stdin, as it could block. */ 18645 freopen ("/dev/null", "rb", stdin); 18646 18647 /* Test whether posix_spawn_file_actions_addopen with this file name 18648 actually works, but spawning a child that reads from this file. */ 18649 actions_allocated = false; 18650 if ((err = posix_spawn_file_actions_init (&actions)) != 0 18651 || (actions_allocated = true, 18652 (err = posix_spawn_file_actions_addopen (&actions, STDIN_FILENO, DATA_FILENAME, O_RDONLY, 0600)) != 0 18653 || (err = posix_spawn (&child, CHILD_PROGRAM_FILENAME, &actions, NULL, argv, environ)) != 0)) 18654 { 18655 if (actions_allocated) 18656 posix_spawn_file_actions_destroy (&actions); 18657 errno = err; 18658 perror ("subprocess failed"); 18659 return 3; 18660 } 18661 posix_spawn_file_actions_destroy (&actions); 18662 status = 0; 18663 while (waitpid (child, &status, 0) != child) 18664 ; 18665 if (!WIFEXITED (status)) 18666 { 18667 fprintf (stderr, "subprocess terminated with unexpected wait status %d\n", status); 18668 return 4; 18669 } 18670 exitstatus = WEXITSTATUS (status); 18671 if (exitstatus != 0) 18672 { 18673 fprintf (stderr, "subprocess terminated with unexpected exit status %d\n", exitstatus); 18674 return 5; 18675 } 18676 return 0; 18677} 18678 18679static int 18680child_main (void) 18681{ 18682 char buf[1024]; 18683 18684 /* See if reading from STDIN_FILENO yields the expected contents. */ 18685 if (fread (buf, 1, sizeof (buf), stdin) == 11 18686 && memcmp (buf, "Halle Potta", 11) == 0) 18687 return 0; 18688 else 18689 return 8; 18690} 18691 18692static void 18693cleanup_then_die (int sig) 18694{ 18695 /* Clean up data file. */ 18696 unlink (DATA_FILENAME); 18697 18698 /* Re-raise the signal and die from it. */ 18699 signal (sig, SIG_DFL); 18700 raise (sig); 18701} 18702 18703int 18704main (int argc, char *argv[]) 18705{ 18706 int exitstatus; 18707 18708 if (!(argc > 1 && strcmp (argv[1], "-child") == 0)) 18709 { 18710 /* This is the parent process. */ 18711 signal (SIGINT, cleanup_then_die); 18712 signal (SIGTERM, cleanup_then_die); 18713 #ifdef SIGHUP 18714 signal (SIGHUP, cleanup_then_die); 18715 #endif 18716 18717 exitstatus = parent_main (); 18718 } 18719 else 18720 { 18721 /* This is the child process. */ 18722 18723 exitstatus = child_main (); 18724 } 18725 unlink (DATA_FILENAME); 18726 return exitstatus; 18727} 18728 18729_ACEOF 18730if ac_fn_c_try_run "$LINENO"; then : 18731 18732else 18733 gl_cv_func_posix_spawn_works=no 18734fi 18735rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 18736 conftest.$ac_objext conftest.beam conftest.$ac_ext 18737fi 18738 18739 fi 18740 else 18741 case "$host_os" in 18742 aix*) gl_cv_func_posix_spawn_works="guessing no";; 18743 *) gl_cv_func_posix_spawn_works="guessing yes";; 18744 esac 18745 fi 18746 18747fi 18748{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_works" >&5 18749$as_echo "$gl_cv_func_posix_spawn_works" >&6; } 18750 18751 case "$gl_cv_func_posix_spawn_works" in 18752 *yes) 18753 18754$as_echo "#define HAVE_WORKING_POSIX_SPAWN 1" >>confdefs.h 18755 18756 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedpolicy is supported" >&5 18757$as_echo_n "checking whether posix_spawnattr_setschedpolicy is supported... " >&6; } 18758if ${gl_cv_func_spawnattr_setschedpolicy+:} false; then : 18759 $as_echo_n "(cached) " >&6 18760else 18761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18762/* end confdefs.h. */ 18763 18764#include <spawn.h> 18765#if POSIX_SPAWN_SETSCHEDULER 18766 POSIX scheduling supported 18767#endif 18768 18769_ACEOF 18770if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 18771 $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then : 18772 gl_cv_func_spawnattr_setschedpolicy=yes 18773else 18774 gl_cv_func_spawnattr_setschedpolicy=no 18775fi 18776rm -f conftest* 18777 18778 18779fi 18780{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedpolicy" >&5 18781$as_echo "$gl_cv_func_spawnattr_setschedpolicy" >&6; } 18782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawnattr_setschedparam is supported" >&5 18783$as_echo_n "checking whether posix_spawnattr_setschedparam is supported... " >&6; } 18784if ${gl_cv_func_spawnattr_setschedparam+:} false; then : 18785 $as_echo_n "(cached) " >&6 18786else 18787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 18788/* end confdefs.h. */ 18789 18790#include <spawn.h> 18791#if POSIX_SPAWN_SETSCHEDPARAM 18792 POSIX scheduling supported 18793#endif 18794 18795_ACEOF 18796if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 18797 $EGREP "POSIX scheduling supported" >/dev/null 2>&1; then : 18798 gl_cv_func_spawnattr_setschedparam=yes 18799else 18800 gl_cv_func_spawnattr_setschedparam=no 18801fi 18802rm -f conftest* 18803 18804 18805fi 18806{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_spawnattr_setschedparam" >&5 18807$as_echo "$gl_cv_func_spawnattr_setschedparam" >&6; } 18808 ;; 18809 *) REPLACE_POSIX_SPAWN=1 ;; 18810 esac 18811 fi 18812 18813 18814 18815 18816 18817 18818 18819 18820 18821 18822 18823 18824 18825 18826 18827 18828 gl_cv_func_vfprintf_posix=no 18829 case "$gl_cv_func_printf_sizes_c99" in 18830 *yes) 18831 case "$gl_cv_func_printf_long_double" in 18832 *yes) 18833 case "$gl_cv_func_printf_infinite" in 18834 *yes) 18835 case "$gl_cv_func_printf_infinite_long_double" in 18836 *yes) 18837 case "$gl_cv_func_printf_directive_a" in 18838 *yes) 18839 case "$gl_cv_func_printf_directive_f" in 18840 *yes) 18841 case "$gl_cv_func_printf_directive_n" in 18842 *yes) 18843 case "$gl_cv_func_printf_directive_ls" in 18844 *yes) 18845 case "$gl_cv_func_printf_positions" in 18846 *yes) 18847 case "$gl_cv_func_printf_flag_grouping" in 18848 *yes) 18849 case "$gl_cv_func_printf_flag_leftadjust" in 18850 *yes) 18851 case "$gl_cv_func_printf_flag_zero" in 18852 *yes) 18853 case "$gl_cv_func_printf_precision" in 18854 *yes) 18855 case "$gl_cv_func_printf_enomem" in 18856 *yes) 18857 # vfprintf exists and is 18858 # already POSIX compliant. 18859 gl_cv_func_vfprintf_posix=yes 18860 ;; 18861 esac 18862 ;; 18863 esac 18864 ;; 18865 esac 18866 ;; 18867 esac 18868 ;; 18869 esac 18870 ;; 18871 esac 18872 ;; 18873 esac 18874 ;; 18875 esac 18876 ;; 18877 esac 18878 ;; 18879 esac 18880 ;; 18881 esac 18882 ;; 18883 esac 18884 ;; 18885 esac 18886 ;; 18887 esac 18888 if test $gl_cv_func_vfprintf_posix = no; then 18889 18890 18891 18892 case "$gl_cv_func_printf_infinite" in 18893 *yes) 18894 ;; 18895 *) 18896 18897$as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h 18898 18899 ;; 18900 esac 18901 18902 18903 18904 18905 case "$gl_cv_func_printf_long_double" in 18906 *yes) 18907 case "$gl_cv_func_printf_infinite_long_double" in 18908 *yes) 18909 ;; 18910 *) 18911 18912$as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h 18913 18914 ;; 18915 esac 18916 ;; 18917 esac 18918 18919 18920 18921 case "$gl_cv_func_printf_directive_a" in 18922 *yes) 18923 ;; 18924 *) 18925 18926$as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h 18927 18928 for ac_func in nl_langinfo 18929do : 18930 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" 18931if test "x$ac_cv_func_nl_langinfo" = xyes; then : 18932 cat >>confdefs.h <<_ACEOF 18933#define HAVE_NL_LANGINFO 1 18934_ACEOF 18935 18936fi 18937done 18938 18939 ;; 18940 esac 18941 18942 18943 18944 case "$gl_cv_func_printf_directive_f" in 18945 *yes) 18946 ;; 18947 *) 18948 18949$as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h 18950 18951 ;; 18952 esac 18953 18954 18955 18956 case "$gl_cv_func_printf_directive_ls" in 18957 *yes) 18958 ;; 18959 *) 18960 18961$as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h 18962 18963 ;; 18964 esac 18965 18966 18967 18968 case "$gl_cv_func_printf_flag_grouping" in 18969 *yes) 18970 ;; 18971 *) 18972 18973$as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h 18974 18975 ;; 18976 esac 18977 18978 18979 18980 case "$gl_cv_func_printf_flag_leftadjust" in 18981 *yes) 18982 ;; 18983 *) 18984 18985$as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h 18986 18987 ;; 18988 esac 18989 18990 18991 18992 case "$gl_cv_func_printf_flag_zero" in 18993 *yes) 18994 ;; 18995 *) 18996 18997$as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h 18998 18999 ;; 19000 esac 19001 19002 19003 19004 case "$gl_cv_func_printf_precision" in 19005 *yes) 19006 ;; 19007 *) 19008 19009$as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h 19010 19011 19012$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h 19013 19014 19015$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h 19016 19017 ;; 19018 esac 19019 19020 19021 19022 case "$gl_cv_func_printf_enomem" in 19023 *yes) 19024 ;; 19025 *) 19026 19027$as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h 19028 19029 19030$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h 19031 19032 19033$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h 19034 19035 ;; 19036 esac 19037 19038 19039 19040 19041 19042 19043 19044 19045 19046 19047 19048 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" 19049 19050 19051 19052 19053 19054 19055 19056 19057 19058 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" 19059 19060 19061 19062 19063 19064 19065 19066 19067 19068 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" 19069 19070 19071 19072 19073 19074 19075 19076 19077 19078 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" 19079 19080 if test $ac_cv_func_vasnprintf = yes; then 19081 19082$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h 19083 19084 fi 19085 19086 19087 19088 19089 19090 19091 19092 19093 19094 19095 19096 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" 19097if test "x$ac_cv_type_ptrdiff_t" = xyes; then : 19098 19099else 19100 19101$as_echo "#define ptrdiff_t long" >>confdefs.h 19102 19103 19104fi 19105 19106 19107 19108 19109 19110 19111 19112 19113 19114 19115 19116 19117 19118 19119 19120 19121 19122 gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext" 19123 19124 REPLACE_VFPRINTF=1 19125 19126$as_echo "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h 19127 19128 : 19129 19130 fi 19131 19132 19133 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19134/* end confdefs.h. */ 19135 19136#ifdef _MSC_VER 19137MicrosoftCompiler 19138#endif 19139 19140_ACEOF 19141if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 19142 $EGREP "MicrosoftCompiler" >/dev/null 2>&1; then : 19143 gl_asmext='asm' 19144 gl_c_asm_opt='-c -Fa' 19145 19146else 19147 gl_asmext='s' 19148 gl_c_asm_opt='-S' 19149 19150fi 19151rm -f conftest* 19152 19153 19154 19155 19156 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether C symbols are prefixed with underscore at the linker level" >&5 19157$as_echo_n "checking whether C symbols are prefixed with underscore at the linker level... " >&6; } 19158if ${gl_cv_prog_as_underscore+:} false; then : 19159 $as_echo_n "(cached) " >&6 19160else 19161 cat > conftest.c <<EOF 19162#ifdef __cplusplus 19163extern "C" int foo (void); 19164#endif 19165int foo(void) { return 0; } 19166EOF 19167 # Look for the assembly language name in the .s file. 19168 { ac_try='${CC-cc} $CFLAGS $CPPFLAGS $gl_c_asm_opt conftest.c' 19169 { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5 19170 (eval $ac_try) 2>&5 19171 ac_status=$? 19172 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 19173 test $ac_status = 0; }; } >/dev/null 2>&1 19174 if grep _foo conftest.$gl_asmext >/dev/null ; then 19175 gl_cv_prog_as_underscore=yes 19176 else 19177 gl_cv_prog_as_underscore=no 19178 fi 19179 rm -f conftest* 19180 19181fi 19182{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_prog_as_underscore" >&5 19183$as_echo "$gl_cv_prog_as_underscore" >&6; } 19184 if test $gl_cv_prog_as_underscore = yes; then 19185 USER_LABEL_PREFIX=_ 19186 else 19187 USER_LABEL_PREFIX= 19188 fi 19189 19190cat >>confdefs.h <<_ACEOF 19191#define USER_LABEL_PREFIX $USER_LABEL_PREFIX 19192_ACEOF 19193 19194 ASM_SYMBOL_PREFIX='"'${USER_LABEL_PREFIX}'"' 19195 19196 19197 19198 GNULIB_PTHREAD_SIGMASK=0; 19199 GNULIB_RAISE=0; 19200 GNULIB_SIGNAL_H_SIGPIPE=0; 19201 GNULIB_SIGPROCMASK=0; 19202 GNULIB_SIGACTION=0; 19203 HAVE_POSIX_SIGNALBLOCKING=1; 19204 HAVE_PTHREAD_SIGMASK=1; 19205 HAVE_RAISE=1; 19206 HAVE_SIGSET_T=1; 19207 HAVE_SIGINFO_T=1; 19208 HAVE_SIGACTION=1; 19209 HAVE_STRUCT_SIGACTION_SA_SIGACTION=1; 19210 19211 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=1; 19212 19213 HAVE_SIGHANDLER_T=1; 19214 REPLACE_PTHREAD_SIGMASK=0; 19215 REPLACE_RAISE=0; 19216 19217 19218 ac_fn_c_check_type "$LINENO" "sigset_t" "ac_cv_type_sigset_t" " 19219 #include <signal.h> 19220 /* Mingw defines sigset_t not in <signal.h>, but in <sys/types.h>. */ 19221 #include <sys/types.h> 19222 19223" 19224if test "x$ac_cv_type_sigset_t" = xyes; then : 19225 19226cat >>confdefs.h <<_ACEOF 19227#define HAVE_SIGSET_T 1 19228_ACEOF 19229 19230gl_cv_type_sigset_t=yes 19231else 19232 gl_cv_type_sigset_t=no 19233fi 19234 19235 if test $gl_cv_type_sigset_t != yes; then 19236 HAVE_SIGSET_T=0 19237 fi 19238 19239 19240 19241 19242 19243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 19244$as_echo_n "checking for C/C++ restrict keyword... " >&6; } 19245if ${ac_cv_c_restrict+:} false; then : 19246 $as_echo_n "(cached) " >&6 19247else 19248 ac_cv_c_restrict=no 19249 # The order here caters to the fact that C++ does not require restrict. 19250 for ac_kw in __restrict __restrict__ _Restrict restrict; do 19251 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19252/* end confdefs.h. */ 19253typedef int * int_ptr; 19254 int foo (int_ptr $ac_kw ip) { 19255 return ip[0]; 19256 } 19257int 19258main () 19259{ 19260int s[1]; 19261 int * $ac_kw t = s; 19262 t[0] = 0; 19263 return foo(t) 19264 ; 19265 return 0; 19266} 19267_ACEOF 19268if ac_fn_c_try_compile "$LINENO"; then : 19269 ac_cv_c_restrict=$ac_kw 19270fi 19271rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19272 test "$ac_cv_c_restrict" != no && break 19273 done 19274 19275fi 19276{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 19277$as_echo "$ac_cv_c_restrict" >&6; } 19278 19279 case $ac_cv_c_restrict in 19280 restrict) ;; 19281 no) $as_echo "#define restrict /**/" >>confdefs.h 19282 ;; 19283 *) cat >>confdefs.h <<_ACEOF 19284#define restrict $ac_cv_c_restrict 19285_ACEOF 19286 ;; 19287 esac 19288 19289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 19290$as_echo_n "checking for uid_t in sys/types.h... " >&6; } 19291if ${ac_cv_type_uid_t+:} false; then : 19292 $as_echo_n "(cached) " >&6 19293else 19294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19295/* end confdefs.h. */ 19296#include <sys/types.h> 19297 19298_ACEOF 19299if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 19300 $EGREP "uid_t" >/dev/null 2>&1; then : 19301 ac_cv_type_uid_t=yes 19302else 19303 ac_cv_type_uid_t=no 19304fi 19305rm -f conftest* 19306 19307fi 19308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 19309$as_echo "$ac_cv_type_uid_t" >&6; } 19310if test $ac_cv_type_uid_t = no; then 19311 19312$as_echo "#define uid_t int" >>confdefs.h 19313 19314 19315$as_echo "#define gid_t int" >>confdefs.h 19316 19317fi 19318 19319 19320 19321 19322 19323ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" 19324if test "x$ac_cv_have_decl_snprintf" = xyes; then : 19325 ac_have_decl=1 19326else 19327 ac_have_decl=0 19328fi 19329 19330cat >>confdefs.h <<_ACEOF 19331#define HAVE_DECL_SNPRINTF $ac_have_decl 19332_ACEOF 19333 19334 19335 19336{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 19337$as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } 19338if ${ac_cv_header_stdbool_h+:} false; then : 19339 $as_echo_n "(cached) " >&6 19340else 19341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19342/* end confdefs.h. */ 19343 19344 #include <stdbool.h> 19345 #ifndef bool 19346 "error: bool is not defined" 19347 #endif 19348 #ifndef false 19349 "error: false is not defined" 19350 #endif 19351 #if false 19352 "error: false is not 0" 19353 #endif 19354 #ifndef true 19355 "error: true is not defined" 19356 #endif 19357 #if true != 1 19358 "error: true is not 1" 19359 #endif 19360 #ifndef __bool_true_false_are_defined 19361 "error: __bool_true_false_are_defined is not defined" 19362 #endif 19363 19364 struct s { _Bool s: 1; _Bool t; } s; 19365 19366 char a[true == 1 ? 1 : -1]; 19367 char b[false == 0 ? 1 : -1]; 19368 char c[__bool_true_false_are_defined == 1 ? 1 : -1]; 19369 char d[(bool) 0.5 == true ? 1 : -1]; 19370 /* See body of main program for 'e'. */ 19371 char f[(_Bool) 0.0 == false ? 1 : -1]; 19372 char g[true]; 19373 char h[sizeof (_Bool)]; 19374 char i[sizeof s.t]; 19375 enum { j = false, k = true, l = false * true, m = true * 256 }; 19376 /* The following fails for 19377 HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ 19378 _Bool n[m]; 19379 char o[sizeof n == m * sizeof n[0] ? 1 : -1]; 19380 char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; 19381 /* Catch a bug in an HP-UX C compiler. See 19382 http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html 19383 http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html 19384 */ 19385 _Bool q = true; 19386 _Bool *pq = &q; 19387 19388int 19389main () 19390{ 19391 19392 bool e = &s; 19393 *pq |= q; 19394 *pq |= ! q; 19395 /* Refer to every declared value, to avoid compiler optimizations. */ 19396 return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l 19397 + !m + !n + !o + !p + !q + !pq); 19398 19399 ; 19400 return 0; 19401} 19402_ACEOF 19403if ac_fn_c_try_compile "$LINENO"; then : 19404 ac_cv_header_stdbool_h=yes 19405else 19406 ac_cv_header_stdbool_h=no 19407fi 19408rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19409fi 19410{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 19411$as_echo "$ac_cv_header_stdbool_h" >&6; } 19412 ac_fn_c_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" 19413if test "x$ac_cv_type__Bool" = xyes; then : 19414 19415cat >>confdefs.h <<_ACEOF 19416#define HAVE__BOOL 1 19417_ACEOF 19418 19419 19420fi 19421 19422 19423 19424 REPLACE_NULL=0; 19425 HAVE_WCHAR_T=1; 19426 19427 19428 19429ac_fn_c_check_decl "$LINENO" "strdup" "ac_cv_have_decl_strdup" "$ac_includes_default" 19430if test "x$ac_cv_have_decl_strdup" = xyes; then : 19431 ac_have_decl=1 19432else 19433 ac_have_decl=0 19434fi 19435 19436cat >>confdefs.h <<_ACEOF 19437#define HAVE_DECL_STRDUP $ac_have_decl 19438_ACEOF 19439 19440 19441 19442 19443 19444 19445 19446 19447 19448 19449 19450 19451 19452 19453 if test $gl_cv_have_include_next = yes; then 19454 gl_cv_next_string_h='<'string.h'>' 19455 else 19456 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <string.h>" >&5 19457$as_echo_n "checking absolute name of <string.h>... " >&6; } 19458if ${gl_cv_next_string_h+:} false; then : 19459 $as_echo_n "(cached) " >&6 19460else 19461 19462 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19463/* end confdefs.h. */ 19464#include <string.h> 19465 19466_ACEOF 19467 case "$host_os" in 19468 aix*) gl_absname_cpp="$ac_cpp -C" ;; 19469 *) gl_absname_cpp="$ac_cpp" ;; 19470 esac 19471 19472 case "$host_os" in 19473 mingw*) 19474 gl_dirsep_regex='[/\\]' 19475 ;; 19476 *) 19477 gl_dirsep_regex='\/' 19478 ;; 19479 esac 19480 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 19481 19482 gl_header_literal_regex=`echo 'string.h' \ 19483 | sed -e "$gl_make_literal_regex_sed"` 19484 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 19485 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 19486 s|^/[^/]|//&| 19487 p 19488 q 19489 }' 19490 gl_cv_next_string_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 19491 sed -n "$gl_absolute_header_sed"`'"' 19492 19493 19494fi 19495{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_string_h" >&5 19496$as_echo "$gl_cv_next_string_h" >&6; } 19497 fi 19498 NEXT_STRING_H=$gl_cv_next_string_h 19499 19500 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 19501 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 19502 gl_next_as_first_directive='<'string.h'>' 19503 else 19504 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 19505 gl_next_as_first_directive=$gl_cv_next_string_h 19506 fi 19507 NEXT_AS_FIRST_DIRECTIVE_STRING_H=$gl_next_as_first_directive 19508 19509 19510 19511 19512 19513 19514 for gl_func in ffsl ffsll memmem mempcpy memrchr rawmemchr stpcpy stpncpy strchrnul strdup strncat strndup strnlen strpbrk strsep strcasestr strtok_r strerror_r strsignal strverscmp; do 19515 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` 19516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 19517$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } 19518if eval \${$as_gl_Symbol+:} false; then : 19519 $as_echo_n "(cached) " >&6 19520else 19521 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19522/* end confdefs.h. */ 19523#include <string.h> 19524 19525int 19526main () 19527{ 19528#undef $gl_func 19529 (void) $gl_func; 19530 ; 19531 return 0; 19532} 19533_ACEOF 19534if ac_fn_c_try_compile "$LINENO"; then : 19535 eval "$as_gl_Symbol=yes" 19536else 19537 eval "$as_gl_Symbol=no" 19538fi 19539rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19540fi 19541eval ac_res=\$$as_gl_Symbol 19542 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 19543$as_echo "$ac_res" >&6; } 19544 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : 19545 cat >>confdefs.h <<_ACEOF 19546#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 19547_ACEOF 19548 19549 eval ac_cv_have_decl_$gl_func=yes 19550fi 19551 done 19552 19553 19554ac_fn_c_check_decl "$LINENO" "strndup" "ac_cv_have_decl_strndup" "$ac_includes_default" 19555if test "x$ac_cv_have_decl_strndup" = xyes; then : 19556 ac_have_decl=1 19557else 19558 ac_have_decl=0 19559fi 19560 19561cat >>confdefs.h <<_ACEOF 19562#define HAVE_DECL_STRNDUP $ac_have_decl 19563_ACEOF 19564 19565 19566 19567ac_fn_c_check_decl "$LINENO" "strnlen" "ac_cv_have_decl_strnlen" "$ac_includes_default" 19568if test "x$ac_cv_have_decl_strnlen" = xyes; then : 19569 ac_have_decl=1 19570else 19571 ac_have_decl=0 19572fi 19573 19574cat >>confdefs.h <<_ACEOF 19575#define HAVE_DECL_STRNLEN $ac_have_decl 19576_ACEOF 19577 19578 19579 19580 19581 19582 19583 19584 19585 19586 19587 GNULIB_WAITPID=0; 19588 19589 19590 19591 19592 GNULIB_MKTIME=0; 19593 GNULIB_NANOSLEEP=0; 19594 GNULIB_STRPTIME=0; 19595 GNULIB_TIMEGM=0; 19596 GNULIB_TIME_R=0; 19597 HAVE_DECL_LOCALTIME_R=1; 19598 HAVE_NANOSLEEP=1; 19599 HAVE_STRPTIME=1; 19600 HAVE_TIMEGM=1; 19601 REPLACE_LOCALTIME_R=GNULIB_PORTCHECK; 19602 REPLACE_MKTIME=GNULIB_PORTCHECK; 19603 REPLACE_NANOSLEEP=GNULIB_PORTCHECK; 19604 REPLACE_TIMEGM=GNULIB_PORTCHECK; 19605 19606 19607 19608 19609 19610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5 19611$as_echo_n "checking for struct timespec in <time.h>... " >&6; } 19612if ${gl_cv_sys_struct_timespec_in_time_h+:} false; then : 19613 $as_echo_n "(cached) " >&6 19614else 19615 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19616/* end confdefs.h. */ 19617#include <time.h> 19618 19619int 19620main () 19621{ 19622static struct timespec x; x.tv_sec = x.tv_nsec; 19623 ; 19624 return 0; 19625} 19626_ACEOF 19627if ac_fn_c_try_compile "$LINENO"; then : 19628 gl_cv_sys_struct_timespec_in_time_h=yes 19629else 19630 gl_cv_sys_struct_timespec_in_time_h=no 19631fi 19632rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19633fi 19634{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_time_h" >&5 19635$as_echo "$gl_cv_sys_struct_timespec_in_time_h" >&6; } 19636 19637 TIME_H_DEFINES_STRUCT_TIMESPEC=0 19638 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 19639 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 19640 if test $gl_cv_sys_struct_timespec_in_time_h = yes; then 19641 TIME_H_DEFINES_STRUCT_TIMESPEC=1 19642 else 19643 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5 19644$as_echo_n "checking for struct timespec in <sys/time.h>... " >&6; } 19645if ${gl_cv_sys_struct_timespec_in_sys_time_h+:} false; then : 19646 $as_echo_n "(cached) " >&6 19647else 19648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19649/* end confdefs.h. */ 19650#include <sys/time.h> 19651 19652int 19653main () 19654{ 19655static struct timespec x; x.tv_sec = x.tv_nsec; 19656 ; 19657 return 0; 19658} 19659_ACEOF 19660if ac_fn_c_try_compile "$LINENO"; then : 19661 gl_cv_sys_struct_timespec_in_sys_time_h=yes 19662else 19663 gl_cv_sys_struct_timespec_in_sys_time_h=no 19664fi 19665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19666fi 19667{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_sys_time_h" >&5 19668$as_echo "$gl_cv_sys_struct_timespec_in_sys_time_h" >&6; } 19669 if test $gl_cv_sys_struct_timespec_in_sys_time_h = yes; then 19670 SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 19671 else 19672 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5 19673$as_echo_n "checking for struct timespec in <pthread.h>... " >&6; } 19674if ${gl_cv_sys_struct_timespec_in_pthread_h+:} false; then : 19675 $as_echo_n "(cached) " >&6 19676else 19677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19678/* end confdefs.h. */ 19679#include <pthread.h> 19680 19681int 19682main () 19683{ 19684static struct timespec x; x.tv_sec = x.tv_nsec; 19685 ; 19686 return 0; 19687} 19688_ACEOF 19689if ac_fn_c_try_compile "$LINENO"; then : 19690 gl_cv_sys_struct_timespec_in_pthread_h=yes 19691else 19692 gl_cv_sys_struct_timespec_in_pthread_h=no 19693fi 19694rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 19695fi 19696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_sys_struct_timespec_in_pthread_h" >&5 19697$as_echo "$gl_cv_sys_struct_timespec_in_pthread_h" >&6; } 19698 if test $gl_cv_sys_struct_timespec_in_pthread_h = yes; then 19699 PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 19700 fi 19701 fi 19702 fi 19703 19704 19705 19706 19707 19708 19709 19710 19711 19712 19713 19714 19715 19716 19717 19718 if test $gl_cv_have_include_next = yes; then 19719 gl_cv_next_time_h='<'time.h'>' 19720 else 19721 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <time.h>" >&5 19722$as_echo_n "checking absolute name of <time.h>... " >&6; } 19723if ${gl_cv_next_time_h+:} false; then : 19724 $as_echo_n "(cached) " >&6 19725else 19726 19727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19728/* end confdefs.h. */ 19729#include <time.h> 19730 19731_ACEOF 19732 case "$host_os" in 19733 aix*) gl_absname_cpp="$ac_cpp -C" ;; 19734 *) gl_absname_cpp="$ac_cpp" ;; 19735 esac 19736 19737 case "$host_os" in 19738 mingw*) 19739 gl_dirsep_regex='[/\\]' 19740 ;; 19741 *) 19742 gl_dirsep_regex='\/' 19743 ;; 19744 esac 19745 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 19746 19747 gl_header_literal_regex=`echo 'time.h' \ 19748 | sed -e "$gl_make_literal_regex_sed"` 19749 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 19750 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 19751 s|^/[^/]|//&| 19752 p 19753 q 19754 }' 19755 gl_cv_next_time_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 19756 sed -n "$gl_absolute_header_sed"`'"' 19757 19758 19759fi 19760{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_time_h" >&5 19761$as_echo "$gl_cv_next_time_h" >&6; } 19762 fi 19763 NEXT_TIME_H=$gl_cv_next_time_h 19764 19765 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 19766 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 19767 gl_next_as_first_directive='<'time.h'>' 19768 else 19769 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 19770 gl_next_as_first_directive=$gl_cv_next_time_h 19771 fi 19772 NEXT_AS_FIRST_DIRECTIVE_TIME_H=$gl_next_as_first_directive 19773 19774 19775 19776 19777 19778 19779 19780 19781 19782 19783 19784 19785 19786 19787gl_libunistring_sed_extract_major='/^[0-9]/{s/^\([0-9]*\).*/\1/p;q;} 19788i\ 197890 19790q 19791' 19792gl_libunistring_sed_extract_minor='/^[0-9][0-9]*[.][0-9]/{s/^[0-9]*[.]\([0-9]*\).*/\1/p;q;} 19793i\ 197940 19795q 19796' 19797gl_libunistring_sed_extract_subminor='/^[0-9][0-9]*[.][0-9][0-9]*[.][0-9]/{s/^[0-9]*[.][0-9]*[.]\([0-9]*\).*/\1/p;q;} 19798i\ 197990 19800q 19801' 19802 19803 19804 if test "$HAVE_LIBUNISTRING" = yes; then 19805 LIBUNISTRING_VERSION_MAJOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_major"` 19806 LIBUNISTRING_VERSION_MINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_minor"` 19807 LIBUNISTRING_VERSION_SUBMINOR=`echo "$LIBUNISTRING_VERSION" | sed -n -e "$gl_libunistring_sed_extract_subminor"` 19808 fi 19809 19810ac_fn_c_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default" 19811if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes; then : 19812 ac_have_decl=1 19813else 19814 ac_have_decl=0 19815fi 19816 19817cat >>confdefs.h <<_ACEOF 19818#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl 19819_ACEOF 19820 19821ac_fn_c_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default" 19822if test "x$ac_cv_have_decl_feof_unlocked" = xyes; then : 19823 ac_have_decl=1 19824else 19825 ac_have_decl=0 19826fi 19827 19828cat >>confdefs.h <<_ACEOF 19829#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl 19830_ACEOF 19831 19832ac_fn_c_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default" 19833if test "x$ac_cv_have_decl_ferror_unlocked" = xyes; then : 19834 ac_have_decl=1 19835else 19836 ac_have_decl=0 19837fi 19838 19839cat >>confdefs.h <<_ACEOF 19840#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl 19841_ACEOF 19842 19843ac_fn_c_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default" 19844if test "x$ac_cv_have_decl_fflush_unlocked" = xyes; then : 19845 ac_have_decl=1 19846else 19847 ac_have_decl=0 19848fi 19849 19850cat >>confdefs.h <<_ACEOF 19851#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl 19852_ACEOF 19853 19854ac_fn_c_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default" 19855if test "x$ac_cv_have_decl_fgets_unlocked" = xyes; then : 19856 ac_have_decl=1 19857else 19858 ac_have_decl=0 19859fi 19860 19861cat >>confdefs.h <<_ACEOF 19862#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl 19863_ACEOF 19864 19865ac_fn_c_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default" 19866if test "x$ac_cv_have_decl_fputc_unlocked" = xyes; then : 19867 ac_have_decl=1 19868else 19869 ac_have_decl=0 19870fi 19871 19872cat >>confdefs.h <<_ACEOF 19873#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl 19874_ACEOF 19875 19876ac_fn_c_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default" 19877if test "x$ac_cv_have_decl_fputs_unlocked" = xyes; then : 19878 ac_have_decl=1 19879else 19880 ac_have_decl=0 19881fi 19882 19883cat >>confdefs.h <<_ACEOF 19884#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl 19885_ACEOF 19886 19887ac_fn_c_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default" 19888if test "x$ac_cv_have_decl_fread_unlocked" = xyes; then : 19889 ac_have_decl=1 19890else 19891 ac_have_decl=0 19892fi 19893 19894cat >>confdefs.h <<_ACEOF 19895#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl 19896_ACEOF 19897 19898ac_fn_c_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default" 19899if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes; then : 19900 ac_have_decl=1 19901else 19902 ac_have_decl=0 19903fi 19904 19905cat >>confdefs.h <<_ACEOF 19906#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl 19907_ACEOF 19908 19909ac_fn_c_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default" 19910if test "x$ac_cv_have_decl_getchar_unlocked" = xyes; then : 19911 ac_have_decl=1 19912else 19913 ac_have_decl=0 19914fi 19915 19916cat >>confdefs.h <<_ACEOF 19917#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl 19918_ACEOF 19919 19920ac_fn_c_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default" 19921if test "x$ac_cv_have_decl_putc_unlocked" = xyes; then : 19922 ac_have_decl=1 19923else 19924 ac_have_decl=0 19925fi 19926 19927cat >>confdefs.h <<_ACEOF 19928#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl 19929_ACEOF 19930 19931ac_fn_c_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default" 19932if test "x$ac_cv_have_decl_putchar_unlocked" = xyes; then : 19933 ac_have_decl=1 19934else 19935 ac_have_decl=0 19936fi 19937 19938cat >>confdefs.h <<_ACEOF 19939#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl 19940_ACEOF 19941 19942ac_fn_c_check_decl "$LINENO" "unsetenv" "ac_cv_have_decl_unsetenv" "$ac_includes_default" 19943if test "x$ac_cv_have_decl_unsetenv" = xyes; then : 19944 ac_have_decl=1 19945else 19946 ac_have_decl=0 19947fi 19948 19949cat >>confdefs.h <<_ACEOF 19950#define HAVE_DECL_UNSETENV $ac_have_decl 19951_ACEOF 19952 19953ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" 19954if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : 19955 ac_have_decl=1 19956else 19957 ac_have_decl=0 19958fi 19959 19960cat >>confdefs.h <<_ACEOF 19961#define HAVE_DECL_VSNPRINTF $ac_have_decl 19962_ACEOF 19963 19964 19965 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <wchar.h> uses 'inline' correctly" >&5 19966$as_echo_n "checking whether <wchar.h> uses 'inline' correctly... " >&6; } 19967if ${gl_cv_header_wchar_h_correct_inline+:} false; then : 19968 $as_echo_n "(cached) " >&6 19969else 19970 gl_cv_header_wchar_h_correct_inline=yes 19971 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19972/* end confdefs.h. */ 19973 19974 #define wcstod renamed_wcstod 19975/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 19976 <wchar.h>. 19977 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 19978 included before <wchar.h>. */ 19979#include <stddef.h> 19980#include <stdio.h> 19981#include <time.h> 19982#include <wchar.h> 19983extern int zero (void); 19984int main () { return zero(); } 19985 19986_ACEOF 19987 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 19988 (eval $ac_compile) 2>&5 19989 ac_status=$? 19990 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 19991 test $ac_status = 0; }; then 19992 mv conftest.$ac_objext conftest1.$ac_objext 19993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 19994/* end confdefs.h. */ 19995 19996 #define wcstod renamed_wcstod 19997/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 19998 <wchar.h>. 19999 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 20000 included before <wchar.h>. */ 20001#include <stddef.h> 20002#include <stdio.h> 20003#include <time.h> 20004#include <wchar.h> 20005int zero (void) { return 0; } 20006 20007_ACEOF 20008 if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 20009 (eval $ac_compile) 2>&5 20010 ac_status=$? 20011 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 20012 test $ac_status = 0; }; then 20013 mv conftest.$ac_objext conftest2.$ac_objext 20014 if $CC -o conftest$ac_exeext $CFLAGS $LDFLAGS conftest1.$ac_objext conftest2.$ac_objext $LIBS >&5 2>&1; then 20015 : 20016 else 20017 gl_cv_header_wchar_h_correct_inline=no 20018 fi 20019 fi 20020 fi 20021 rm -f conftest1.$ac_objext conftest2.$ac_objext conftest$ac_exeext 20022 20023fi 20024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_wchar_h_correct_inline" >&5 20025$as_echo "$gl_cv_header_wchar_h_correct_inline" >&6; } 20026 if test $gl_cv_header_wchar_h_correct_inline = no; then 20027 as_fn_error $? "<wchar.h> cannot be used with this compiler ($CC $CFLAGS $CPPFLAGS). 20028This is a known interoperability problem of glibc <= 2.5 with gcc >= 4.3 in 20029C99 mode. You have four options: 20030 - Add the flag -fgnu89-inline to CC and reconfigure, or 20031 - Fix your include files, using parts of 20032 <http://sourceware.org/git/?p=glibc.git;a=commitdiff;h=b037a293a48718af30d706c2e18c929d0e69a621>, or 20033 - Use a gcc version older than 4.3, or 20034 - Don't use the flags -std=c99 or -std=gnu99. 20035Configuration aborted." "$LINENO" 5 20036 fi 20037 20038 20039 20040 20041 if false; then 20042 GL_COND_LIBTOOL_TRUE= 20043 GL_COND_LIBTOOL_FALSE='#' 20044else 20045 GL_COND_LIBTOOL_TRUE='#' 20046 GL_COND_LIBTOOL_FALSE= 20047fi 20048 20049 gl_cond_libtool=false 20050 gl_libdeps= 20051 gl_ltlibdeps= 20052 gl_m4_base='m4' 20053 20054 20055 20056 20057 20058 20059 20060 20061 20062 gl_source_base='lib' 20063 20064 20065 if test $ac_cv_func_alloca_works = no; then 20066 : 20067 fi 20068 20069 # Define an additional variable used in the Makefile substitution. 20070 if test $ac_cv_working_alloca_h = yes; then 20071 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca as a compiler built-in" >&5 20072$as_echo_n "checking for alloca as a compiler built-in... " >&6; } 20073if ${gl_cv_rpl_alloca+:} false; then : 20074 $as_echo_n "(cached) " >&6 20075else 20076 20077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20078/* end confdefs.h. */ 20079 20080#if defined __GNUC__ || defined _AIX || defined _MSC_VER 20081 Need own alloca 20082#endif 20083 20084_ACEOF 20085if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 20086 $EGREP "Need own alloca" >/dev/null 2>&1; then : 20087 gl_cv_rpl_alloca=yes 20088else 20089 gl_cv_rpl_alloca=no 20090fi 20091rm -f conftest* 20092 20093 20094fi 20095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_rpl_alloca" >&5 20096$as_echo "$gl_cv_rpl_alloca" >&6; } 20097 if test $gl_cv_rpl_alloca = yes; then 20098 20099$as_echo "#define HAVE_ALLOCA 1" >>confdefs.h 20100 20101 ALLOCA_H=alloca.h 20102 else 20103 ALLOCA_H= 20104 fi 20105 else 20106 ALLOCA_H=alloca.h 20107 fi 20108 20109 if test -n "$ALLOCA_H"; then 20110 GL_GENERATE_ALLOCA_H_TRUE= 20111 GL_GENERATE_ALLOCA_H_FALSE='#' 20112else 20113 GL_GENERATE_ALLOCA_H_TRUE='#' 20114 GL_GENERATE_ALLOCA_H_FALSE= 20115fi 20116 20117 20118 20119 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable assertions" >&5 20120$as_echo_n "checking whether to enable assertions... " >&6; } 20121 # Check whether --enable-assert was given. 20122if test "${enable_assert+set}" = set; then : 20123 enableval=$enable_assert; if test "x$enableval" = xno; then : 20124 20125$as_echo "#define NDEBUG 1" >>confdefs.h 20126 20127elif test "x$enableval" != xyes; then : 20128 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: invalid argument supplied to --enable-assert" >&5 20129$as_echo "$as_me: WARNING: invalid argument supplied to --enable-assert" >&2;} 20130 enable_assert=yes 20131fi 20132else 20133 enable_assert=yes 20134fi 20135 20136 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_assert" >&5 20137$as_echo "$enable_assert" >&6; } 20138 20139 20140 20141 20142 if test $gl_cv_func_malloc_posix = yes; then 20143 20144$as_echo "#define HAVE_CALLOC_POSIX 1" >>confdefs.h 20145 20146 else 20147 REPLACE_CALLOC=1 20148 fi 20149 20150 if test $REPLACE_CALLOC = 1; then 20151 20152 20153 20154 20155 20156 20157 20158 20159 gl_LIBOBJS="$gl_LIBOBJS calloc.$ac_objext" 20160 20161 fi 20162 20163 20164 20165 20166 20167 GNULIB_CALLOC_POSIX=1 20168 20169 20170 20171 20172 20173$as_echo "#define GNULIB_TEST_CALLOC_POSIX 1" >>confdefs.h 20174 20175 20176 20177 20178 20179$as_echo "#define GNULIB_TEST_CLOEXEC 1" >>confdefs.h 20180 20181 20182 20183 20184 20185 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then 20186 REPLACE_CLOSE=1 20187 fi 20188 20189 20190 20191 20192 20193 if test $ac_cv_header_sys_socket_h != yes; then 20194 for ac_header in winsock2.h 20195do : 20196 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" 20197if test "x$ac_cv_header_winsock2_h" = xyes; then : 20198 cat >>confdefs.h <<_ACEOF 20199#define HAVE_WINSOCK2_H 1 20200_ACEOF 20201 20202fi 20203 20204done 20205 20206 fi 20207 if test "$ac_cv_header_winsock2_h" = yes; then 20208 HAVE_WINSOCK2_H=1 20209 UNISTD_H_HAVE_WINSOCK2_H=1 20210 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 20211 else 20212 HAVE_WINSOCK2_H=0 20213 fi 20214 20215 20216 if test $UNISTD_H_HAVE_WINSOCK2_H = 1; then 20217 REPLACE_CLOSE=1 20218 fi 20219 20220 20221 20222 if test $REPLACE_CLOSE = 1; then 20223 20224 20225 20226 20227 20228 20229 20230 20231 gl_LIBOBJS="$gl_LIBOBJS close.$ac_objext" 20232 20233 fi 20234 20235 20236 20237 20238 20239 GNULIB_CLOSE=1 20240 20241 20242 20243 20244 20245$as_echo "#define GNULIB_TEST_CLOSE 1" >>confdefs.h 20246 20247 20248 20249 20250 : 20251 20252 20253 20254cat >>confdefs.h <<_ACEOF 20255#define GNULIB_CLOSE_STREAM 1 20256_ACEOF 20257 20258 20259 20260 : 20261 20262 20263 20264 if test "x$datarootdir" = x; then 20265 datarootdir='${datadir}' 20266 20267 fi 20268 if test "x$docdir" = x; then 20269 docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' 20270 20271 fi 20272 if test "x$htmldir" = x; then 20273 htmldir='${docdir}' 20274 20275 fi 20276 if test "x$dvidir" = x; then 20277 dvidir='${docdir}' 20278 20279 fi 20280 if test "x$pdfdir" = x; then 20281 pdfdir='${docdir}' 20282 20283 fi 20284 if test "x$psdir" = x; then 20285 psdir='${docdir}' 20286 20287 fi 20288 if test "x$lispdir" = x; then 20289 lispdir='${datarootdir}/emacs/site-lisp' 20290 20291 fi 20292 if test "x$localedir" = x; then 20293 localedir='${datarootdir}/locale' 20294 20295 fi 20296 20297 pkglibexecdir='${libexecdir}/${PACKAGE}' 20298 20299 20300 20301 20302 20303 20304 20305cat >>confdefs.h <<_ACEOF 20306#define GNULIB_DIRNAME 1 20307_ACEOF 20308 20309 20310 20311 20312 20313 20314 20315 20316 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether // is distinct from /" >&5 20317$as_echo_n "checking whether // is distinct from /... " >&6; } 20318if ${gl_cv_double_slash_root+:} false; then : 20319 $as_echo_n "(cached) " >&6 20320else 20321 if test x"$cross_compiling" = xyes ; then 20322 # When cross-compiling, there is no way to tell whether // is special 20323 # short of a list of hosts. However, the only known hosts to date 20324 # that have a distinct // are Apollo DomainOS (too old to port to), 20325 # Cygwin, and z/OS. If anyone knows of another system for which // has 20326 # special semantics and is distinct from /, please report it to 20327 # <bug-gnulib@gnu.org>. 20328 case $host in 20329 *-cygwin | i370-ibm-openedition) 20330 gl_cv_double_slash_root=yes ;; 20331 *) 20332 # Be optimistic and assume that / and // are the same when we 20333 # don't know. 20334 gl_cv_double_slash_root='unknown, assuming no' ;; 20335 esac 20336 else 20337 set x `ls -di / // 2>/dev/null` 20338 if test "$2" = "$4" && wc //dev/null >/dev/null 2>&1; then 20339 gl_cv_double_slash_root=no 20340 else 20341 gl_cv_double_slash_root=yes 20342 fi 20343 fi 20344fi 20345{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_double_slash_root" >&5 20346$as_echo "$gl_cv_double_slash_root" >&6; } 20347 if test "$gl_cv_double_slash_root" = yes; then 20348 20349$as_echo "#define DOUBLE_SLASH_IS_DISTINCT_ROOT 1" >>confdefs.h 20350 20351 fi 20352 20353 20354 20355 20356 20357 20358$as_echo "#define HAVE_DUP2 1" >>confdefs.h 20359 20360 20361 if test $HAVE_DUP2 = 1; then 20362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether dup2 works" >&5 20363$as_echo_n "checking whether dup2 works... " >&6; } 20364if ${gl_cv_func_dup2_works+:} false; then : 20365 $as_echo_n "(cached) " >&6 20366else 20367 if test "$cross_compiling" = yes; then : 20368 case "$host_os" in 20369 mingw*) # on this platform, dup2 always returns 0 for success 20370 gl_cv_func_dup2_works="guessing no" ;; 20371 cygwin*) # on cygwin 1.5.x, dup2(1,1) returns 0 20372 gl_cv_func_dup2_works="guessing no" ;; 20373 linux*) # On linux between 2008-07-27 and 2009-05-11, dup2 of a 20374 # closed fd may yield -EBADF instead of -1 / errno=EBADF. 20375 gl_cv_func_dup2_works="guessing no" ;; 20376 freebsd*) # on FreeBSD 6.1, dup2(1,1000000) gives EMFILE, not EBADF. 20377 gl_cv_func_dup2_works="guessing no" ;; 20378 haiku*) # on Haiku alpha 2, dup2(1, 1) resets FD_CLOEXEC. 20379 gl_cv_func_dup2_works="guessing no" ;; 20380 *) gl_cv_func_dup2_works="guessing yes" ;; 20381 esac 20382else 20383 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20384/* end confdefs.h. */ 20385 20386 #include <unistd.h> 20387#include <fcntl.h> 20388#include <errno.h> 20389int 20390main () 20391{ 20392int result = 0; 20393#ifdef FD_CLOEXEC 20394 if (fcntl (1, F_SETFD, FD_CLOEXEC) == -1) 20395 result |= 1; 20396#endif 20397 if (dup2 (1, 1) == 0) 20398 result |= 2; 20399#ifdef FD_CLOEXEC 20400 if (fcntl (1, F_GETFD) != FD_CLOEXEC) 20401 result |= 4; 20402#endif 20403 close (0); 20404 if (dup2 (0, 0) != -1) 20405 result |= 8; 20406 /* Many gnulib modules require POSIX conformance of EBADF. */ 20407 if (dup2 (2, 1000000) == -1 && errno != EBADF) 20408 result |= 16; 20409 return result; 20410 20411 ; 20412 return 0; 20413} 20414 20415_ACEOF 20416if ac_fn_c_try_run "$LINENO"; then : 20417 gl_cv_func_dup2_works=yes 20418else 20419 gl_cv_func_dup2_works=no 20420fi 20421rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 20422 conftest.$ac_objext conftest.beam conftest.$ac_ext 20423fi 20424 20425 20426fi 20427{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_dup2_works" >&5 20428$as_echo "$gl_cv_func_dup2_works" >&6; } 20429 case "$gl_cv_func_dup2_works" in 20430 *yes) ;; 20431 *) 20432 REPLACE_DUP2=1 20433 ;; 20434 esac 20435 fi 20436 20437 20438 if test $HAVE_DUP2 = 0 || test $REPLACE_DUP2 = 1; then 20439 20440 20441 20442 20443 20444 20445 20446 20447 gl_LIBOBJS="$gl_LIBOBJS dup2.$ac_objext" 20448 20449 20450 fi 20451 20452 20453 20454 20455 20456 GNULIB_DUP2=1 20457 20458 20459 20460 20461 20462$as_echo "#define GNULIB_TEST_DUP2 1" >>confdefs.h 20463 20464 20465 20466 20467 20468 20469 20470 20471 20472 GNULIB_ENVIRON=1 20473 20474 20475 20476 20477 20478$as_echo "#define GNULIB_TEST_ENVIRON 1" >>confdefs.h 20479 20480 20481 20482 20483 20484 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for error_at_line" >&5 20485$as_echo_n "checking for error_at_line... " >&6; } 20486if ${ac_cv_lib_error_at_line+:} false; then : 20487 $as_echo_n "(cached) " >&6 20488else 20489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20490/* end confdefs.h. */ 20491#include <error.h> 20492int 20493main () 20494{ 20495error_at_line (0, 0, "", 0, "an error occurred"); 20496 ; 20497 return 0; 20498} 20499_ACEOF 20500if ac_fn_c_try_link "$LINENO"; then : 20501 ac_cv_lib_error_at_line=yes 20502else 20503 ac_cv_lib_error_at_line=no 20504fi 20505rm -f core conftest.err conftest.$ac_objext \ 20506 conftest$ac_exeext conftest.$ac_ext 20507fi 20508{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_error_at_line" >&5 20509$as_echo "$ac_cv_lib_error_at_line" >&6; } 20510 20511 if test $ac_cv_lib_error_at_line = no; then 20512 20513 20514 20515 20516 20517 20518 20519 20520 gl_LIBOBJS="$gl_LIBOBJS error.$ac_objext" 20521 20522 20523 20524 : 20525 20526 fi 20527 20528 20529 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error:3:c-format" 20530 20531 20532 20533 XGETTEXT_EXTRA_OPTIONS="$XGETTEXT_EXTRA_OPTIONS --flag=error_at_line:5:c-format" 20534 20535 20536 20537 20538 20539 : 20540 20541 20542 20543 20544 20545 20546 if test $ac_cv_func_fcntl = no; then 20547 20548 20549 20550 if test $ac_cv_func_fcntl = no; then 20551 HAVE_FCNTL=0 20552 else 20553 REPLACE_FCNTL=1 20554 fi 20555 20556 else 20557 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl handles F_DUPFD correctly" >&5 20558$as_echo_n "checking whether fcntl handles F_DUPFD correctly... " >&6; } 20559if ${gl_cv_func_fcntl_f_dupfd_works+:} false; then : 20560 $as_echo_n "(cached) " >&6 20561else 20562 if test "$cross_compiling" = yes; then : 20563 # Guess that it works on glibc systems 20564 case $host_os in #(( 20565 *-gnu*) gl_cv_func_fcntl_f_dupfd_works="guessing yes";; 20566 *) gl_cv_func_fcntl_f_dupfd_works="guessing no";; 20567 esac 20568else 20569 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20570/* end confdefs.h. */ 20571 20572#include <fcntl.h> 20573#include <errno.h> 20574 20575int 20576main () 20577{ 20578int result = 0; 20579 if (fcntl (0, F_DUPFD, -1) != -1) result |= 1; 20580 if (errno != EINVAL) result |= 2; 20581 return result; 20582 20583 ; 20584 return 0; 20585} 20586_ACEOF 20587if ac_fn_c_try_run "$LINENO"; then : 20588 gl_cv_func_fcntl_f_dupfd_works=yes 20589else 20590 gl_cv_func_fcntl_f_dupfd_works=no 20591fi 20592rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 20593 conftest.$ac_objext conftest.beam conftest.$ac_ext 20594fi 20595 20596fi 20597{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_works" >&5 20598$as_echo "$gl_cv_func_fcntl_f_dupfd_works" >&6; } 20599 case $gl_cv_func_fcntl_f_dupfd_works in 20600 *yes) ;; 20601 *) 20602 20603 20604 if test $ac_cv_func_fcntl = no; then 20605 HAVE_FCNTL=0 20606 else 20607 REPLACE_FCNTL=1 20608 fi 20609 20610 20611$as_echo "#define FCNTL_DUPFD_BUGGY 1" >>confdefs.h 20612 ;; 20613 esac 20614 20615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fcntl understands F_DUPFD_CLOEXEC" >&5 20616$as_echo_n "checking whether fcntl understands F_DUPFD_CLOEXEC... " >&6; } 20617if ${gl_cv_func_fcntl_f_dupfd_cloexec+:} false; then : 20618 $as_echo_n "(cached) " >&6 20619else 20620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20621/* end confdefs.h. */ 20622 20623#include <fcntl.h> 20624#ifndef F_DUPFD_CLOEXEC 20625choke me 20626#endif 20627 20628int 20629main () 20630{ 20631 20632 ; 20633 return 0; 20634} 20635_ACEOF 20636if ac_fn_c_try_compile "$LINENO"; then : 20637 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20638/* end confdefs.h. */ 20639 20640#ifdef __linux__ 20641/* The Linux kernel only added F_DUPFD_CLOEXEC in 2.6.24, so we always replace 20642 it to support the semantics on older kernels that failed with EINVAL. */ 20643choke me 20644#endif 20645 20646int 20647main () 20648{ 20649 20650 ; 20651 return 0; 20652} 20653_ACEOF 20654if ac_fn_c_try_compile "$LINENO"; then : 20655 gl_cv_func_fcntl_f_dupfd_cloexec=yes 20656else 20657 gl_cv_func_fcntl_f_dupfd_cloexec="needs runtime check" 20658fi 20659rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20660else 20661 gl_cv_func_fcntl_f_dupfd_cloexec=no 20662fi 20663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20664fi 20665{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fcntl_f_dupfd_cloexec" >&5 20666$as_echo "$gl_cv_func_fcntl_f_dupfd_cloexec" >&6; } 20667 if test "$gl_cv_func_fcntl_f_dupfd_cloexec" != yes; then 20668 20669 20670 20671 if test $ac_cv_func_fcntl = no; then 20672 HAVE_FCNTL=0 20673 else 20674 REPLACE_FCNTL=1 20675 fi 20676 20677 fi 20678 fi 20679 20680 20681 if test $HAVE_FCNTL = 0 || test $REPLACE_FCNTL = 1; then 20682 20683 20684 20685 20686 20687 20688 20689 20690 gl_LIBOBJS="$gl_LIBOBJS fcntl.$ac_objext" 20691 20692 fi 20693 20694 20695 20696 20697 20698 GNULIB_FCNTL=1 20699 20700 20701 20702 20703 20704$as_echo "#define GNULIB_TEST_FCNTL 1" >>confdefs.h 20705 20706 20707 20708 20709 20710 20711 20712 20713 20714 20715 20716 20717 20718 20719 if test $gl_cv_have_include_next = yes; then 20720 gl_cv_next_fcntl_h='<'fcntl.h'>' 20721 else 20722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <fcntl.h>" >&5 20723$as_echo_n "checking absolute name of <fcntl.h>... " >&6; } 20724if ${gl_cv_next_fcntl_h+:} false; then : 20725 $as_echo_n "(cached) " >&6 20726else 20727 20728 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20729/* end confdefs.h. */ 20730#include <fcntl.h> 20731 20732_ACEOF 20733 case "$host_os" in 20734 aix*) gl_absname_cpp="$ac_cpp -C" ;; 20735 *) gl_absname_cpp="$ac_cpp" ;; 20736 esac 20737 20738 case "$host_os" in 20739 mingw*) 20740 gl_dirsep_regex='[/\\]' 20741 ;; 20742 *) 20743 gl_dirsep_regex='\/' 20744 ;; 20745 esac 20746 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 20747 20748 gl_header_literal_regex=`echo 'fcntl.h' \ 20749 | sed -e "$gl_make_literal_regex_sed"` 20750 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 20751 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 20752 s|^/[^/]|//&| 20753 p 20754 q 20755 }' 20756 gl_cv_next_fcntl_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 20757 sed -n "$gl_absolute_header_sed"`'"' 20758 20759 20760fi 20761{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_fcntl_h" >&5 20762$as_echo "$gl_cv_next_fcntl_h" >&6; } 20763 fi 20764 NEXT_FCNTL_H=$gl_cv_next_fcntl_h 20765 20766 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 20767 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 20768 gl_next_as_first_directive='<'fcntl.h'>' 20769 else 20770 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 20771 gl_next_as_first_directive=$gl_cv_next_fcntl_h 20772 fi 20773 NEXT_AS_FIRST_DIRECTIVE_FCNTL_H=$gl_next_as_first_directive 20774 20775 20776 20777 20778 20779 20780 20781 20782 20783 20784 for gl_func in fcntl openat; do 20785 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` 20786 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 20787$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } 20788if eval \${$as_gl_Symbol+:} false; then : 20789 $as_echo_n "(cached) " >&6 20790else 20791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20792/* end confdefs.h. */ 20793#include <fcntl.h> 20794 20795int 20796main () 20797{ 20798#undef $gl_func 20799 (void) $gl_func; 20800 ; 20801 return 0; 20802} 20803_ACEOF 20804if ac_fn_c_try_compile "$LINENO"; then : 20805 eval "$as_gl_Symbol=yes" 20806else 20807 eval "$as_gl_Symbol=no" 20808fi 20809rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 20810fi 20811eval ac_res=\$$as_gl_Symbol 20812 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 20813$as_echo "$ac_res" >&6; } 20814 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : 20815 cat >>confdefs.h <<_ACEOF 20816#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 20817_ACEOF 20818 20819 eval ac_cv_have_decl_$gl_func=yes 20820fi 20821 done 20822 20823 20824 20825 20826cat >>confdefs.h <<_ACEOF 20827#define GNULIB_FD_SAFER_FLAG 1 20828_ACEOF 20829 20830 20831 20832 20833 20834 FLOAT_H= 20835 REPLACE_FLOAT_LDBL=0 20836 case "$host_os" in 20837 aix* | beos* | openbsd* | mirbsd* | irix*) 20838 FLOAT_H=float.h 20839 ;; 20840 freebsd*) 20841 case "$host_cpu" in 20842 i[34567]86 ) 20843 FLOAT_H=float.h 20844 ;; 20845 x86_64 ) 20846 # On x86_64 systems, the C compiler may still be generating 20847 # 32-bit code. 20848 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20849/* end confdefs.h. */ 20850#if defined __LP64__ || defined __x86_64__ || defined __amd64__ 20851 yes 20852 #endif 20853_ACEOF 20854if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 20855 $EGREP "yes" >/dev/null 2>&1; then : 20856 20857else 20858 FLOAT_H=float.h 20859fi 20860rm -f conftest* 20861 20862 ;; 20863 esac 20864 ;; 20865 linux*) 20866 case "$host_cpu" in 20867 powerpc*) 20868 FLOAT_H=float.h 20869 ;; 20870 esac 20871 ;; 20872 esac 20873 case "$host_os" in 20874 aix* | freebsd* | linux*) 20875 if test -n "$FLOAT_H"; then 20876 REPLACE_FLOAT_LDBL=1 20877 fi 20878 ;; 20879 esac 20880 20881 REPLACE_ITOLD=0 20882 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether conversion from 'int' to 'long double' works" >&5 20883$as_echo_n "checking whether conversion from 'int' to 'long double' works... " >&6; } 20884if ${gl_cv_func_itold_works+:} false; then : 20885 $as_echo_n "(cached) " >&6 20886else 20887 20888 if test "$cross_compiling" = yes; then : 20889 case "$host" in 20890 sparc*-*-linux*) 20891 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20892/* end confdefs.h. */ 20893#if defined __LP64__ || defined __arch64__ 20894 yes 20895 #endif 20896_ACEOF 20897if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 20898 $EGREP "yes" >/dev/null 2>&1; then : 20899 gl_cv_func_itold_works="guessing no" 20900else 20901 gl_cv_func_itold_works="guessing yes" 20902fi 20903rm -f conftest* 20904 20905 ;; 20906 *) gl_cv_func_itold_works="guessing yes" ;; 20907 esac 20908 20909else 20910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20911/* end confdefs.h. */ 20912 20913int i = -1; 20914volatile long double ld; 20915int main () 20916{ 20917 ld += i * 1.0L; 20918 if (ld > 0) 20919 return 1; 20920 return 0; 20921} 20922_ACEOF 20923if ac_fn_c_try_run "$LINENO"; then : 20924 gl_cv_func_itold_works=yes 20925else 20926 gl_cv_func_itold_works=no 20927fi 20928rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 20929 conftest.$ac_objext conftest.beam conftest.$ac_ext 20930fi 20931 20932 20933fi 20934{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_itold_works" >&5 20935$as_echo "$gl_cv_func_itold_works" >&6; } 20936 case "$gl_cv_func_itold_works" in 20937 *no) 20938 REPLACE_ITOLD=1 20939 FLOAT_H=float.h 20940 ;; 20941 esac 20942 20943 if test -n "$FLOAT_H"; then 20944 20945 20946 20947 20948 20949 20950 20951 20952 if test $gl_cv_have_include_next = yes; then 20953 gl_cv_next_float_h='<'float.h'>' 20954 else 20955 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <float.h>" >&5 20956$as_echo_n "checking absolute name of <float.h>... " >&6; } 20957if ${gl_cv_next_float_h+:} false; then : 20958 $as_echo_n "(cached) " >&6 20959else 20960 20961 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 20962/* end confdefs.h. */ 20963#include <float.h> 20964 20965_ACEOF 20966 case "$host_os" in 20967 aix*) gl_absname_cpp="$ac_cpp -C" ;; 20968 *) gl_absname_cpp="$ac_cpp" ;; 20969 esac 20970 20971 case "$host_os" in 20972 mingw*) 20973 gl_dirsep_regex='[/\\]' 20974 ;; 20975 *) 20976 gl_dirsep_regex='\/' 20977 ;; 20978 esac 20979 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 20980 20981 gl_header_literal_regex=`echo 'float.h' \ 20982 | sed -e "$gl_make_literal_regex_sed"` 20983 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 20984 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 20985 s|^/[^/]|//&| 20986 p 20987 q 20988 }' 20989 gl_cv_next_float_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 20990 sed -n "$gl_absolute_header_sed"`'"' 20991 20992 20993fi 20994{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_float_h" >&5 20995$as_echo "$gl_cv_next_float_h" >&6; } 20996 fi 20997 NEXT_FLOAT_H=$gl_cv_next_float_h 20998 20999 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 21000 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 21001 gl_next_as_first_directive='<'float.h'>' 21002 else 21003 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 21004 gl_next_as_first_directive=$gl_cv_next_float_h 21005 fi 21006 NEXT_AS_FIRST_DIRECTIVE_FLOAT_H=$gl_next_as_first_directive 21007 21008 21009 21010 21011 fi 21012 21013 if test -n "$FLOAT_H"; then 21014 GL_GENERATE_FLOAT_H_TRUE= 21015 GL_GENERATE_FLOAT_H_FALSE='#' 21016else 21017 GL_GENERATE_FLOAT_H_TRUE='#' 21018 GL_GENERATE_FLOAT_H_FALSE= 21019fi 21020 21021 21022 21023 if test $REPLACE_FLOAT_LDBL = 1; then 21024 21025 21026 21027 21028 21029 21030 21031 21032 gl_LIBOBJS="$gl_LIBOBJS float.$ac_objext" 21033 21034 fi 21035 if test $REPLACE_ITOLD = 1; then 21036 21037 21038 21039 21040 21041 21042 21043 21044 gl_LIBOBJS="$gl_LIBOBJS itold.$ac_objext" 21045 21046 fi 21047 21048 21049 21050 case "$host_os" in 21051 mingw* | pw*) 21052 REPLACE_FOPEN=1 21053 gl_cv_func_fopen_slash="guessing no" 21054 ;; 21055 *) 21056 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether fopen recognizes a trailing slash" >&5 21057$as_echo_n "checking whether fopen recognizes a trailing slash... " >&6; } 21058if ${gl_cv_func_fopen_slash+:} false; then : 21059 $as_echo_n "(cached) " >&6 21060else 21061 21062 if test "$cross_compiling" = yes; then : 21063 21064 case "$host_os" in 21065 aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) 21066 gl_cv_func_fopen_slash="guessing no" ;; 21067 *) 21068 gl_cv_func_fopen_slash="guessing yes" ;; 21069 esac 21070 21071else 21072 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21073/* end confdefs.h. */ 21074 21075#include <stddef.h> 21076#include <stdio.h> 21077int main () 21078{ 21079 return fopen ("conftest.sl/", "w") != NULL; 21080} 21081_ACEOF 21082if ac_fn_c_try_run "$LINENO"; then : 21083 gl_cv_func_fopen_slash=yes 21084else 21085 gl_cv_func_fopen_slash=no 21086fi 21087rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 21088 conftest.$ac_objext conftest.beam conftest.$ac_ext 21089fi 21090 21091 rm -f conftest.sl 21092 21093fi 21094{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_fopen_slash" >&5 21095$as_echo "$gl_cv_func_fopen_slash" >&6; } 21096 ;; 21097 esac 21098 case "$gl_cv_func_fopen_slash" in 21099 *no) 21100 21101$as_echo "#define FOPEN_TRAILING_SLASH_BUG 1" >>confdefs.h 21102 21103 REPLACE_FOPEN=1 21104 ;; 21105 esac 21106 21107 if test $REPLACE_FOPEN = 1; then 21108 21109 21110 21111 21112 21113 21114 21115 21116 gl_LIBOBJS="$gl_LIBOBJS fopen.$ac_objext" 21117 21118 : 21119 fi 21120 21121 21122 21123 21124 21125 GNULIB_FOPEN=1 21126 21127 21128 21129 21130 21131$as_echo "#define GNULIB_TEST_FOPEN 1" >>confdefs.h 21132 21133 21134 21135 21136 21137cat >>confdefs.h <<_ACEOF 21138#define GNULIB_FOPEN_SAFER 1 21139_ACEOF 21140 21141 21142 21143 21144 21145 fp_headers=' 21146# include <stdio.h> 21147# if HAVE_STDIO_EXT_H 21148# include <stdio_ext.h> 21149# endif 21150' 21151 ac_fn_c_check_decl "$LINENO" "__fpending" "ac_cv_have_decl___fpending" "$fp_headers 21152" 21153if test "x$ac_cv_have_decl___fpending" = xyes; then : 21154 ac_have_decl=1 21155else 21156 ac_have_decl=0 21157fi 21158 21159cat >>confdefs.h <<_ACEOF 21160#define HAVE_DECL___FPENDING $ac_have_decl 21161_ACEOF 21162 21163 21164 if test $ac_cv_func___fpending = no; then 21165 21166 21167 21168 21169 21170 21171 21172 21173 gl_LIBOBJS="$gl_LIBOBJS fpending.$ac_objext" 21174 21175 21176 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to determine the number of pending output bytes on a stream" >&5 21177$as_echo_n "checking how to determine the number of pending output bytes on a stream... " >&6; } 21178if ${ac_cv_sys_pending_output_n_bytes+:} false; then : 21179 $as_echo_n "(cached) " >&6 21180else 21181 21182 for ac_expr in \ 21183 \ 21184 '# glibc2' \ 21185 'fp->_IO_write_ptr - fp->_IO_write_base' \ 21186 \ 21187 '# traditional Unix' \ 21188 'fp->_ptr - fp->_base' \ 21189 \ 21190 '# BSD' \ 21191 'fp->_p - fp->_bf._base' \ 21192 \ 21193 '# SCO, Unixware' \ 21194 '(fp->__ptr ? fp->__ptr - fp->__base : 0)' \ 21195 \ 21196 '# QNX' \ 21197 '(fp->_Mode & 0x2000 /*_MWRITE*/ ? fp->_Next - fp->_Buf : 0)' \ 21198 \ 21199 '# old glibc?' \ 21200 'fp->__bufp - fp->__buffer' \ 21201 \ 21202 '# old glibc iostream?' \ 21203 'fp->_pptr - fp->_pbase' \ 21204 \ 21205 '# emx+gcc' \ 21206 'fp->_ptr - fp->_buffer' \ 21207 \ 21208 '# Minix' \ 21209 'fp->_ptr - fp->_buf' \ 21210 \ 21211 '# Plan9' \ 21212 'fp->wp - fp->buf' \ 21213 \ 21214 '# VMS' \ 21215 '(*fp)->_ptr - (*fp)->_base' \ 21216 \ 21217 '# e.g., DGUX R4.11; the info is not available' \ 21218 1 \ 21219 ; do 21220 21221 # Skip each embedded comment. 21222 case "$ac_expr" in '#'*) continue;; esac 21223 21224 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21225/* end confdefs.h. */ 21226#include <stdio.h> 21227int 21228main () 21229{ 21230FILE *fp = stdin; (void) ($ac_expr); 21231 ; 21232 return 0; 21233} 21234_ACEOF 21235if ac_fn_c_try_compile "$LINENO"; then : 21236 fp_done=yes 21237 21238fi 21239rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 21240 test "$fp_done" = yes && break 21241 done 21242 21243 ac_cv_sys_pending_output_n_bytes=$ac_expr 21244 21245 21246fi 21247{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_pending_output_n_bytes" >&5 21248$as_echo "$ac_cv_sys_pending_output_n_bytes" >&6; } 21249 21250cat >>confdefs.h <<_ACEOF 21251#define PENDING_OUTPUT_N_BYTES $ac_cv_sys_pending_output_n_bytes 21252_ACEOF 21253 21254 21255 fi 21256 21257 21258 21259 21260 21261 21262 21263 21264 21265 21266 21267 21268 21269 21270 21271 gl_cv_func_fprintf_posix=no 21272 case "$gl_cv_func_printf_sizes_c99" in 21273 *yes) 21274 case "$gl_cv_func_printf_long_double" in 21275 *yes) 21276 case "$gl_cv_func_printf_infinite" in 21277 *yes) 21278 case "$gl_cv_func_printf_infinite_long_double" in 21279 *yes) 21280 case "$gl_cv_func_printf_directive_a" in 21281 *yes) 21282 case "$gl_cv_func_printf_directive_f" in 21283 *yes) 21284 case "$gl_cv_func_printf_directive_n" in 21285 *yes) 21286 case "$gl_cv_func_printf_directive_ls" in 21287 *yes) 21288 case "$gl_cv_func_printf_positions" in 21289 *yes) 21290 case "$gl_cv_func_printf_flag_grouping" in 21291 *yes) 21292 case "$gl_cv_func_printf_flag_leftadjust" in 21293 *yes) 21294 case "$gl_cv_func_printf_flag_zero" in 21295 *yes) 21296 case "$gl_cv_func_printf_precision" in 21297 *yes) 21298 case "$gl_cv_func_printf_enomem" in 21299 *yes) 21300 # fprintf exists and is 21301 # already POSIX compliant. 21302 gl_cv_func_fprintf_posix=yes 21303 ;; 21304 esac 21305 ;; 21306 esac 21307 ;; 21308 esac 21309 ;; 21310 esac 21311 ;; 21312 esac 21313 ;; 21314 esac 21315 ;; 21316 esac 21317 ;; 21318 esac 21319 ;; 21320 esac 21321 ;; 21322 esac 21323 ;; 21324 esac 21325 ;; 21326 esac 21327 ;; 21328 esac 21329 ;; 21330 esac 21331 if test $gl_cv_func_fprintf_posix = no; then 21332 21333 21334 21335 case "$gl_cv_func_printf_infinite" in 21336 *yes) 21337 ;; 21338 *) 21339 21340$as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h 21341 21342 ;; 21343 esac 21344 21345 21346 21347 21348 case "$gl_cv_func_printf_long_double" in 21349 *yes) 21350 case "$gl_cv_func_printf_infinite_long_double" in 21351 *yes) 21352 ;; 21353 *) 21354 21355$as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h 21356 21357 ;; 21358 esac 21359 ;; 21360 esac 21361 21362 21363 21364 case "$gl_cv_func_printf_directive_a" in 21365 *yes) 21366 ;; 21367 *) 21368 21369$as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h 21370 21371 for ac_func in nl_langinfo 21372do : 21373 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" 21374if test "x$ac_cv_func_nl_langinfo" = xyes; then : 21375 cat >>confdefs.h <<_ACEOF 21376#define HAVE_NL_LANGINFO 1 21377_ACEOF 21378 21379fi 21380done 21381 21382 ;; 21383 esac 21384 21385 21386 21387 case "$gl_cv_func_printf_directive_f" in 21388 *yes) 21389 ;; 21390 *) 21391 21392$as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h 21393 21394 ;; 21395 esac 21396 21397 21398 21399 case "$gl_cv_func_printf_directive_ls" in 21400 *yes) 21401 ;; 21402 *) 21403 21404$as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h 21405 21406 ;; 21407 esac 21408 21409 21410 21411 case "$gl_cv_func_printf_flag_grouping" in 21412 *yes) 21413 ;; 21414 *) 21415 21416$as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h 21417 21418 ;; 21419 esac 21420 21421 21422 21423 case "$gl_cv_func_printf_flag_leftadjust" in 21424 *yes) 21425 ;; 21426 *) 21427 21428$as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h 21429 21430 ;; 21431 esac 21432 21433 21434 21435 case "$gl_cv_func_printf_flag_zero" in 21436 *yes) 21437 ;; 21438 *) 21439 21440$as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h 21441 21442 ;; 21443 esac 21444 21445 21446 21447 case "$gl_cv_func_printf_precision" in 21448 *yes) 21449 ;; 21450 *) 21451 21452$as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h 21453 21454 21455$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h 21456 21457 21458$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h 21459 21460 ;; 21461 esac 21462 21463 21464 21465 case "$gl_cv_func_printf_enomem" in 21466 *yes) 21467 ;; 21468 *) 21469 21470$as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h 21471 21472 21473$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h 21474 21475 21476$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h 21477 21478 ;; 21479 esac 21480 21481 21482 21483 21484 21485 21486 21487 21488 21489 21490 21491 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" 21492 21493 21494 21495 21496 21497 21498 21499 21500 21501 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" 21502 21503 21504 21505 21506 21507 21508 21509 21510 21511 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" 21512 21513 21514 21515 21516 21517 21518 21519 21520 21521 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" 21522 21523 if test $ac_cv_func_vasnprintf = yes; then 21524 21525$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h 21526 21527 fi 21528 21529 21530 21531 21532 21533 21534 21535 21536 21537 21538 21539 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" 21540if test "x$ac_cv_type_ptrdiff_t" = xyes; then : 21541 21542else 21543 21544$as_echo "#define ptrdiff_t long" >>confdefs.h 21545 21546 21547fi 21548 21549 21550 21551 21552 21553 21554 21555 21556 21557 21558 21559 21560 21561 21562 21563 21564 21565 gl_LIBOBJS="$gl_LIBOBJS fprintf.$ac_objext" 21566 21567 REPLACE_FPRINTF=1 21568 21569$as_echo "#define REPLACE_FPRINTF_POSIX 1" >>confdefs.h 21570 21571 : 21572 21573 fi 21574 21575 21576 21577 21578 21579 21580 GNULIB_FPRINTF_POSIX=1 21581 21582 21583 21584 21585 21586$as_echo "#define GNULIB_TEST_FPRINTF_POSIX 1" >>confdefs.h 21587 21588 21589 21590 21591 21592 21593 if test $gl_cv_func_frexp_no_libm = yes; then 21594 21595 21596 21597 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5 21598$as_echo_n "checking whether frexp works... " >&6; } 21599if ${gl_cv_func_frexp_works+:} false; then : 21600 $as_echo_n "(cached) " >&6 21601else 21602 21603 if test "$cross_compiling" = yes; then : 21604 case "$host_os" in 21605 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";; 21606 *) gl_cv_func_frexp_works="guessing yes";; 21607 esac 21608 21609else 21610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21611/* end confdefs.h. */ 21612 21613#include <float.h> 21614#include <math.h> 21615#include <string.h> 21616#if HAVE_ALARM 21617# include <unistd.h> 21618#endif 21619/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. 21620 ICC 10.0 has a bug when optimizing the expression -zero. 21621 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling 21622 to PowerPC on Mac OS X 10.5. */ 21623#if defined __hpux || defined __sgi || defined __ICC 21624static double 21625compute_minus_zero (void) 21626{ 21627 return -DBL_MIN * DBL_MIN; 21628} 21629# define minus_zero compute_minus_zero () 21630#else 21631double minus_zero = -0.0; 21632#endif 21633int main() 21634{ 21635 int result = 0; 21636 int i; 21637 volatile double x; 21638 double zero = 0.0; 21639#if HAVE_ALARM 21640 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite 21641 number. Let the test fail in this case. */ 21642 alarm (5); 21643#endif 21644 /* Test on denormalized numbers. */ 21645 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) 21646 ; 21647 if (x > 0.0) 21648 { 21649 int exp; 21650 double y = frexp (x, &exp); 21651 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022. 21652 On NetBSD: y = 0.75. Correct: y = 0.5. */ 21653 if (y != 0.5) 21654 result |= 1; 21655 } 21656 /* Test on infinite numbers. */ 21657 x = 1.0 / zero; 21658 { 21659 int exp; 21660 double y = frexp (x, &exp); 21661 if (y != x) 21662 result |= 2; 21663 } 21664 /* Test on negative zero. */ 21665 x = minus_zero; 21666 { 21667 int exp; 21668 double y = frexp (x, &exp); 21669 if (memcmp (&y, &x, sizeof x)) 21670 result |= 4; 21671 } 21672 return result; 21673} 21674_ACEOF 21675if ac_fn_c_try_run "$LINENO"; then : 21676 gl_cv_func_frexp_works=yes 21677else 21678 gl_cv_func_frexp_works=no 21679fi 21680rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 21681 conftest.$ac_objext conftest.beam conftest.$ac_ext 21682fi 21683 21684 21685fi 21686{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5 21687$as_echo "$gl_cv_func_frexp_works" >&6; } 21688 21689 case "$gl_cv_func_frexp_works" in 21690 *yes) gl_func_frexp_no_libm=yes ;; 21691 *) gl_func_frexp_no_libm=no; REPLACE_FREXP=1 ;; 21692 esac 21693 else 21694 gl_func_frexp_no_libm=no 21695 REPLACE_FREXP=1 21696 fi 21697 if test $gl_func_frexp_no_libm = yes; then 21698 21699$as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h 21700 21701 fi 21702 21703 if test $gl_func_frexp_no_libm != yes; then 21704 21705 21706 21707 21708 21709 21710 21711 21712 gl_LIBOBJS="$gl_LIBOBJS frexp.$ac_objext" 21713 21714 fi 21715 21716 21717 21718 21719 21720 GNULIB_FREXP=1 21721 21722 21723 21724 21725 21726$as_echo "#define GNULIB_TEST_FREXP 1" >>confdefs.h 21727 21728 21729 21730 21731 21732 21733 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h> 21734" 21735if test "x$ac_cv_have_decl_frexpl" = xyes; then : 21736 21737else 21738 HAVE_DECL_FREXPL=0 21739fi 21740 21741 if test $HAVE_DECL_FREXPL = 1; then 21742 21743 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5 21744$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; } 21745if ${gl_cv_func_frexpl_no_libm+:} false; then : 21746 $as_echo_n "(cached) " >&6 21747else 21748 21749 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21750/* end confdefs.h. */ 21751#include <math.h> 21752 long double x; 21753int 21754main () 21755{ 21756int e; return frexpl (x, &e) > 0; 21757 ; 21758 return 0; 21759} 21760_ACEOF 21761if ac_fn_c_try_link "$LINENO"; then : 21762 gl_cv_func_frexpl_no_libm=yes 21763else 21764 gl_cv_func_frexpl_no_libm=no 21765fi 21766rm -f core conftest.err conftest.$ac_objext \ 21767 conftest$ac_exeext conftest.$ac_ext 21768 21769fi 21770{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5 21771$as_echo "$gl_cv_func_frexpl_no_libm" >&6; } 21772 21773 if test $gl_cv_func_frexpl_no_libm = yes; then 21774 21775 21776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5 21777$as_echo_n "checking whether frexpl works... " >&6; } 21778if ${gl_cv_func_frexpl_works+:} false; then : 21779 $as_echo_n "(cached) " >&6 21780else 21781 21782 if test "$cross_compiling" = yes; then : 21783 21784 case "$host_os" in 21785 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*) 21786 gl_cv_func_frexpl_works="guessing no";; 21787 *) gl_cv_func_frexpl_works="guessing yes";; 21788 esac 21789 21790else 21791 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 21792/* end confdefs.h. */ 21793 21794#include <float.h> 21795#include <math.h> 21796/* Override the values of <float.h>, like done in float.in.h. */ 21797#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) 21798# undef LDBL_MIN_EXP 21799# define LDBL_MIN_EXP (-16381) 21800#endif 21801#if defined __i386__ && defined __FreeBSD__ 21802# undef LDBL_MIN_EXP 21803# define LDBL_MIN_EXP (-16381) 21804#endif 21805#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__ 21806# undef LDBL_MIN_EXP 21807# define LDBL_MIN_EXP DBL_MIN_EXP 21808#endif 21809#if defined __sgi && (LDBL_MANT_DIG >= 106) 21810# if defined __GNUC__ 21811# undef LDBL_MIN_EXP 21812# define LDBL_MIN_EXP DBL_MIN_EXP 21813# endif 21814#endif 21815extern 21816#ifdef __cplusplus 21817"C" 21818#endif 21819long double frexpl (long double, int *); 21820int main() 21821{ 21822 int result = 0; 21823 volatile long double x; 21824 /* Test on finite numbers that fails on AIX 5.1. */ 21825 x = 16.0L; 21826 { 21827 int exp = -9999; 21828 frexpl (x, &exp); 21829 if (exp != 5) 21830 result |= 1; 21831 } 21832 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl 21833 function returns an invalid (incorrectly normalized) value: it returns 21834 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 } 21835 but the correct result is 21836 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */ 21837 x = 1.01L; 21838 { 21839 int exp = -9999; 21840 long double y = frexpl (x, &exp); 21841 if (!(exp == 1 && y == 0.505L)) 21842 result |= 2; 21843 } 21844 /* Test on large finite numbers. This fails on BeOS at i = 16322, while 21845 LDBL_MAX_EXP = 16384. 21846 In the loop end test, we test x against Infinity, rather than comparing 21847 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */ 21848 { 21849 int i; 21850 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L) 21851 { 21852 int exp = -9999; 21853 frexpl (x, &exp); 21854 if (exp != i) 21855 { 21856 result |= 4; 21857 break; 21858 } 21859 } 21860 } 21861 /* Test on denormalized numbers. */ 21862 { 21863 int i; 21864 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L) 21865 ; 21866 if (x > 0.0L) 21867 { 21868 int exp; 21869 long double y = frexpl (x, &exp); 21870 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932, 21871 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */ 21872 if (exp != LDBL_MIN_EXP - 1) 21873 result |= 8; 21874 } 21875 } 21876 /* Test on infinite numbers. */ 21877 x = 1.0L / 0.0L; 21878 { 21879 int exp; 21880 long double y = frexpl (x, &exp); 21881 if (y != x) 21882 result |= 16; 21883 } 21884 return result; 21885} 21886_ACEOF 21887if ac_fn_c_try_run "$LINENO"; then : 21888 gl_cv_func_frexpl_works=yes 21889else 21890 gl_cv_func_frexpl_works=no 21891fi 21892rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 21893 conftest.$ac_objext conftest.beam conftest.$ac_ext 21894fi 21895 21896 21897fi 21898{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5 21899$as_echo "$gl_cv_func_frexpl_works" >&6; } 21900 21901 case "$gl_cv_func_frexpl_works" in 21902 *yes) gl_func_frexpl_no_libm=yes ;; 21903 *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;; 21904 esac 21905 else 21906 gl_func_frexpl_no_libm=no 21907 REPLACE_FREXPL=1 21908 fi 21909 if test $gl_func_frexpl_no_libm = yes; then 21910 21911$as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h 21912 21913 fi 21914 fi 21915 21916 if test $HAVE_DECL_FREXPL = 0 || test $gl_func_frexpl_no_libm = no; then 21917 21918 21919 21920 21921 21922 21923 21924 21925 gl_LIBOBJS="$gl_LIBOBJS frexpl.$ac_objext" 21926 21927 fi 21928 21929 21930 21931 21932 21933 GNULIB_FREXPL=1 21934 21935 21936 21937 21938 21939$as_echo "#define GNULIB_TEST_FREXPL 1" >>confdefs.h 21940 21941 21942 21943 21944 21945 21946 if test $ac_cv_func___fseterr = no; then 21947 21948 21949 21950 21951 21952 21953 21954 21955 gl_LIBOBJS="$gl_LIBOBJS fseterr.$ac_objext" 21956 21957 fi 21958 21959 21960 21961 21962 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then 21963 REPLACE_FSTAT=1 21964 fi 21965 21966 21967 if test $WINDOWS_64_BIT_ST_SIZE = 1; then 21968 REPLACE_FSTAT=1 21969 fi 21970 21971 21972 21973 if test $REPLACE_FSTAT = 1; then 21974 21975 21976 21977 21978 21979 21980 21981 21982 gl_LIBOBJS="$gl_LIBOBJS fstat.$ac_objext" 21983 21984 : 21985 fi 21986 21987 21988 21989 21990 21991 GNULIB_FSTAT=1 21992 21993 21994 21995 21996 21997$as_echo "#define GNULIB_TEST_FSTAT 1" >>confdefs.h 21998 21999 22000 22001 22002 22003 22004 22005 22006 22007 22008 22009 if test $ac_cv_func_getdelim = yes; then 22010 HAVE_GETDELIM=1 22011 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getdelim function" >&5 22012$as_echo_n "checking for working getdelim function... " >&6; } 22013if ${gl_cv_func_working_getdelim+:} false; then : 22014 $as_echo_n "(cached) " >&6 22015else 22016 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data 22017 if test "$cross_compiling" = yes; then : 22018 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22019/* end confdefs.h. */ 22020 22021#include <features.h> 22022#ifdef __GNU_LIBRARY__ 22023 #if (__GLIBC__ >= 2) && !defined __UCLIBC__ 22024 Lucky GNU user 22025 #endif 22026#endif 22027 22028_ACEOF 22029if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 22030 $EGREP "Lucky GNU user" >/dev/null 2>&1; then : 22031 gl_cv_func_working_getdelim="guessing yes" 22032else 22033 gl_cv_func_working_getdelim="guessing no" 22034fi 22035rm -f conftest* 22036 22037 22038else 22039 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22040/* end confdefs.h. */ 22041 22042# include <stdio.h> 22043# include <stdlib.h> 22044# include <string.h> 22045 int main () 22046 { 22047 FILE *in = fopen ("./conftest.data", "r"); 22048 if (!in) 22049 return 1; 22050 { 22051 /* Test result for a NULL buffer and a zero size. 22052 Based on a test program from Karl Heuer. */ 22053 char *line = NULL; 22054 size_t siz = 0; 22055 int len = getdelim (&line, &siz, '\n', in); 22056 if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) 22057 return 2; 22058 } 22059 { 22060 /* Test result for a NULL buffer and a non-zero size. 22061 This crashes on FreeBSD 8.0. */ 22062 char *line = NULL; 22063 size_t siz = (size_t)(~0) / 4; 22064 if (getdelim (&line, &siz, '\n', in) == -1) 22065 return 3; 22066 } 22067 return 0; 22068 } 22069 22070_ACEOF 22071if ac_fn_c_try_run "$LINENO"; then : 22072 gl_cv_func_working_getdelim=yes 22073else 22074 gl_cv_func_working_getdelim=no 22075fi 22076rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 22077 conftest.$ac_objext conftest.beam conftest.$ac_ext 22078fi 22079 22080fi 22081{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_getdelim" >&5 22082$as_echo "$gl_cv_func_working_getdelim" >&6; } 22083 case "$gl_cv_func_working_getdelim" in 22084 *no) 22085 REPLACE_GETDELIM=1 22086 ;; 22087 esac 22088 else 22089 HAVE_GETDELIM=0 22090 fi 22091 22092 if test $ac_cv_have_decl_getdelim = no; then 22093 HAVE_DECL_GETDELIM=0 22094 fi 22095 22096 if test $HAVE_GETDELIM = 0 || test $REPLACE_GETDELIM = 1; then 22097 22098 22099 22100 22101 22102 22103 22104 22105 gl_LIBOBJS="$gl_LIBOBJS getdelim.$ac_objext" 22106 22107 22108 for ac_func in flockfile funlockfile 22109do : 22110 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 22111ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 22112if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 22113 cat >>confdefs.h <<_ACEOF 22114#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 22115_ACEOF 22116 22117fi 22118done 22119 22120 ac_fn_c_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" 22121if test "x$ac_cv_have_decl_getc_unlocked" = xyes; then : 22122 ac_have_decl=1 22123else 22124 ac_have_decl=0 22125fi 22126 22127cat >>confdefs.h <<_ACEOF 22128#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl 22129_ACEOF 22130 22131 22132 fi 22133 22134 22135 22136 22137 22138 GNULIB_GETDELIM=1 22139 22140 22141 22142 22143 22144$as_echo "#define GNULIB_TEST_GETDELIM 1" >>confdefs.h 22145 22146 22147 22148 22149 22150 22151 if test $ac_cv_func_getdtablesize != yes; then 22152 HAVE_GETDTABLESIZE=0 22153 fi 22154 22155 if test $HAVE_GETDTABLESIZE = 0; then 22156 22157 22158 22159 22160 22161 22162 22163 22164 gl_LIBOBJS="$gl_LIBOBJS getdtablesize.$ac_objext" 22165 22166 : 22167 fi 22168 22169 22170 22171 22172 22173 GNULIB_GETDTABLESIZE=1 22174 22175 22176 22177 22178 22179$as_echo "#define GNULIB_TEST_GETDTABLESIZE 1" >>confdefs.h 22180 22181 22182 22183 22184 22185 22186 22187 22188 22189 22190 gl_getline_needs_run_time_check=no 22191 ac_fn_c_check_func "$LINENO" "getline" "ac_cv_func_getline" 22192if test "x$ac_cv_func_getline" = xyes; then : 22193 gl_getline_needs_run_time_check=yes 22194else 22195 am_cv_func_working_getline=no 22196fi 22197 22198 if test $gl_getline_needs_run_time_check = yes; then 22199 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working getline function" >&5 22200$as_echo_n "checking for working getline function... " >&6; } 22201if ${am_cv_func_working_getline+:} false; then : 22202 $as_echo_n "(cached) " >&6 22203else 22204 echo fooNbarN | tr -d '\012' | tr N '\012' > conftest.data 22205 if test "$cross_compiling" = yes; then : 22206 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22207/* end confdefs.h. */ 22208 22209#include <features.h> 22210#ifdef __GNU_LIBRARY__ 22211 #if (__GLIBC__ >= 2) && !defined __UCLIBC__ 22212 Lucky GNU user 22213 #endif 22214#endif 22215 22216_ACEOF 22217if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 22218 $EGREP "Lucky GNU user" >/dev/null 2>&1; then : 22219 am_cv_func_working_getline="guessing yes" 22220else 22221 am_cv_func_working_getline="guessing no" 22222fi 22223rm -f conftest* 22224 22225 22226else 22227 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22228/* end confdefs.h. */ 22229 22230# include <stdio.h> 22231# include <stdlib.h> 22232# include <string.h> 22233 int main () 22234 { 22235 FILE *in = fopen ("./conftest.data", "r"); 22236 if (!in) 22237 return 1; 22238 { 22239 /* Test result for a NULL buffer and a zero size. 22240 Based on a test program from Karl Heuer. */ 22241 char *line = NULL; 22242 size_t siz = 0; 22243 int len = getline (&line, &siz, in); 22244 if (!(len == 4 && line && strcmp (line, "foo\n") == 0)) 22245 return 2; 22246 } 22247 { 22248 /* Test result for a NULL buffer and a non-zero size. 22249 This crashes on FreeBSD 8.0. */ 22250 char *line = NULL; 22251 size_t siz = (size_t)(~0) / 4; 22252 if (getline (&line, &siz, in) == -1) 22253 return 3; 22254 } 22255 return 0; 22256 } 22257 22258_ACEOF 22259if ac_fn_c_try_run "$LINENO"; then : 22260 am_cv_func_working_getline=yes 22261else 22262 am_cv_func_working_getline=no 22263fi 22264rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 22265 conftest.$ac_objext conftest.beam conftest.$ac_ext 22266fi 22267 22268fi 22269{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_working_getline" >&5 22270$as_echo "$am_cv_func_working_getline" >&6; } 22271 fi 22272 22273 if test $ac_cv_have_decl_getline = no; then 22274 HAVE_DECL_GETLINE=0 22275 fi 22276 22277 case "$am_cv_func_working_getline" in 22278 *no) 22279 REPLACE_GETLINE=1 22280 ;; 22281 esac 22282 22283 if test $REPLACE_GETLINE = 1; then 22284 22285 22286 22287 22288 22289 22290 22291 22292 gl_LIBOBJS="$gl_LIBOBJS getline.$ac_objext" 22293 22294 22295 : 22296 22297 fi 22298 22299 22300 22301 22302 22303 GNULIB_GETLINE=1 22304 22305 22306 22307 22308 22309$as_echo "#define GNULIB_TEST_GETLINE 1" >>confdefs.h 22310 22311 22312 22313 22314 22315 22316 22317 22318 if test $REPLACE_GETOPT = 1; then 22319 22320 22321 22322 22323 22324 22325 22326 22327 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" 22328 22329 22330 22331 22332 22333 22334 22335 22336 22337 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" 22338 22339 22340 22341 22342 GNULIB_GL_UNISTD_H_GETOPT=1 22343 fi 22344 22345 22346 22347$as_echo "#define GNULIB_TEST_GETOPT_GNU 1" >>confdefs.h 22348 22349 22350 22351 22352 22353 22354 22355 REPLACE_GETOPT=0 22356 if test -n "$gl_replace_getopt"; then 22357 REPLACE_GETOPT=1 22358 fi 22359 22360 if test $REPLACE_GETOPT = 1; then 22361 22362 GETOPT_H=getopt.h 22363 22364$as_echo "#define __GETOPT_PREFIX rpl_" >>confdefs.h 22365 22366 22367 22368 fi 22369 22370 if test $REPLACE_GETOPT = 1; then 22371 22372 22373 22374 22375 22376 22377 22378 22379 gl_LIBOBJS="$gl_LIBOBJS getopt.$ac_objext" 22380 22381 22382 22383 22384 22385 22386 22387 22388 22389 gl_LIBOBJS="$gl_LIBOBJS getopt1.$ac_objext" 22390 22391 22392 22393 22394 GNULIB_GL_UNISTD_H_GETOPT=1 22395 fi 22396 22397 22398 22399 22400 # Autoconf 2.61a.99 and earlier don't support linking a file only 22401 # in VPATH builds. But since GNUmakefile is for maintainer use 22402 # only, it does not matter if we skip the link with older autoconf. 22403 # Automake 1.10.1 and earlier try to remove GNUmakefile in non-VPATH 22404 # builds, so use a shell variable to bypass this. 22405 GNUmakefile=GNUmakefile 22406 ac_config_links="$ac_config_links $GNUmakefile:$GNUmakefile" 22407 22408 22409 22410 22411 22412 22413 PRIPTR_PREFIX= 22414 if test -n "$STDINT_H"; then 22415 PRIPTR_PREFIX='"l"' 22416 else 22417 for glpfx in '' l ll I64; do 22418 case $glpfx in 22419 '') gltype1='int';; 22420 l) gltype1='long int';; 22421 ll) gltype1='long long int';; 22422 I64) gltype1='__int64';; 22423 esac 22424 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22425/* end confdefs.h. */ 22426#include <stdint.h> 22427 extern intptr_t foo; 22428 extern $gltype1 foo; 22429int 22430main () 22431{ 22432 22433 ; 22434 return 0; 22435} 22436_ACEOF 22437if ac_fn_c_try_compile "$LINENO"; then : 22438 PRIPTR_PREFIX='"'$glpfx'"' 22439fi 22440rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22441 test -n "$PRIPTR_PREFIX" && break 22442 done 22443 fi 22444 22445 22446 22447 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT32_MAX < INTMAX_MAX" >&5 22448$as_echo_n "checking whether INT32_MAX < INTMAX_MAX... " >&6; } 22449if ${gl_cv_test_INT32_MAX_LT_INTMAX_MAX+:} false; then : 22450 $as_echo_n "(cached) " >&6 22451else 22452 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22453/* end confdefs.h. */ 22454/* Work also in C++ mode. */ 22455 #define __STDC_LIMIT_MACROS 1 22456 22457 /* Work if build is not clean. */ 22458 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 22459 22460 #include <limits.h> 22461 #if HAVE_STDINT_H 22462 #include <stdint.h> 22463 #endif 22464 22465 #if defined INT32_MAX && defined INTMAX_MAX 22466 #define CONDITION (INT32_MAX < INTMAX_MAX) 22467 #elif HAVE_LONG_LONG_INT 22468 #define CONDITION (sizeof (int) < sizeof (long long int)) 22469 #else 22470 #define CONDITION 0 22471 #endif 22472 int test[CONDITION ? 1 : -1]; 22473int 22474main () 22475{ 22476 22477 ; 22478 return 0; 22479} 22480_ACEOF 22481if ac_fn_c_try_compile "$LINENO"; then : 22482 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=yes 22483else 22484 gl_cv_test_INT32_MAX_LT_INTMAX_MAX=no 22485fi 22486rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22487fi 22488{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&5 22489$as_echo "$gl_cv_test_INT32_MAX_LT_INTMAX_MAX" >&6; } 22490 if test $gl_cv_test_INT32_MAX_LT_INTMAX_MAX = yes; then 22491 INT32_MAX_LT_INTMAX_MAX=1; 22492 else 22493 INT32_MAX_LT_INTMAX_MAX=0; 22494 fi 22495 22496 22497 if test $APPLE_UNIVERSAL_BUILD = 0; then 22498 22499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether INT64_MAX == LONG_MAX" >&5 22500$as_echo_n "checking whether INT64_MAX == LONG_MAX... " >&6; } 22501if ${gl_cv_test_INT64_MAX_EQ_LONG_MAX+:} false; then : 22502 $as_echo_n "(cached) " >&6 22503else 22504 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22505/* end confdefs.h. */ 22506/* Work also in C++ mode. */ 22507 #define __STDC_LIMIT_MACROS 1 22508 22509 /* Work if build is not clean. */ 22510 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 22511 22512 #include <limits.h> 22513 #if HAVE_STDINT_H 22514 #include <stdint.h> 22515 #endif 22516 22517 #if defined INT64_MAX 22518 #define CONDITION (INT64_MAX == LONG_MAX) 22519 #elif HAVE_LONG_LONG_INT 22520 #define CONDITION (sizeof (long long int) == sizeof (long int)) 22521 #else 22522 #define CONDITION 0 22523 #endif 22524 int test[CONDITION ? 1 : -1]; 22525int 22526main () 22527{ 22528 22529 ; 22530 return 0; 22531} 22532_ACEOF 22533if ac_fn_c_try_compile "$LINENO"; then : 22534 gl_cv_test_INT64_MAX_EQ_LONG_MAX=yes 22535else 22536 gl_cv_test_INT64_MAX_EQ_LONG_MAX=no 22537fi 22538rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22539fi 22540{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&5 22541$as_echo "$gl_cv_test_INT64_MAX_EQ_LONG_MAX" >&6; } 22542 if test $gl_cv_test_INT64_MAX_EQ_LONG_MAX = yes; then 22543 INT64_MAX_EQ_LONG_MAX=1; 22544 else 22545 INT64_MAX_EQ_LONG_MAX=0; 22546 fi 22547 22548 22549 else 22550 INT64_MAX_EQ_LONG_MAX=-1 22551 fi 22552 22553 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT32_MAX < UINTMAX_MAX" >&5 22554$as_echo_n "checking whether UINT32_MAX < UINTMAX_MAX... " >&6; } 22555if ${gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX+:} false; then : 22556 $as_echo_n "(cached) " >&6 22557else 22558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22559/* end confdefs.h. */ 22560/* Work also in C++ mode. */ 22561 #define __STDC_LIMIT_MACROS 1 22562 22563 /* Work if build is not clean. */ 22564 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 22565 22566 #include <limits.h> 22567 #if HAVE_STDINT_H 22568 #include <stdint.h> 22569 #endif 22570 22571 #if defined UINT32_MAX && defined UINTMAX_MAX 22572 #define CONDITION (UINT32_MAX < UINTMAX_MAX) 22573 #elif HAVE_LONG_LONG_INT 22574 #define CONDITION (sizeof (unsigned int) < sizeof (unsigned long long int)) 22575 #else 22576 #define CONDITION 0 22577 #endif 22578 int test[CONDITION ? 1 : -1]; 22579int 22580main () 22581{ 22582 22583 ; 22584 return 0; 22585} 22586_ACEOF 22587if ac_fn_c_try_compile "$LINENO"; then : 22588 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=yes 22589else 22590 gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX=no 22591fi 22592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22593fi 22594{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&5 22595$as_echo "$gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX" >&6; } 22596 if test $gl_cv_test_UINT32_MAX_LT_UINTMAX_MAX = yes; then 22597 UINT32_MAX_LT_UINTMAX_MAX=1; 22598 else 22599 UINT32_MAX_LT_UINTMAX_MAX=0; 22600 fi 22601 22602 22603 if test $APPLE_UNIVERSAL_BUILD = 0; then 22604 22605 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UINT64_MAX == ULONG_MAX" >&5 22606$as_echo_n "checking whether UINT64_MAX == ULONG_MAX... " >&6; } 22607if ${gl_cv_test_UINT64_MAX_EQ_ULONG_MAX+:} false; then : 22608 $as_echo_n "(cached) " >&6 22609else 22610 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22611/* end confdefs.h. */ 22612/* Work also in C++ mode. */ 22613 #define __STDC_LIMIT_MACROS 1 22614 22615 /* Work if build is not clean. */ 22616 #define _GL_JUST_INCLUDE_SYSTEM_STDINT_H 22617 22618 #include <limits.h> 22619 #if HAVE_STDINT_H 22620 #include <stdint.h> 22621 #endif 22622 22623 #if defined UINT64_MAX 22624 #define CONDITION (UINT64_MAX == ULONG_MAX) 22625 #elif HAVE_LONG_LONG_INT 22626 #define CONDITION (sizeof (unsigned long long int) == sizeof (unsigned long int)) 22627 #else 22628 #define CONDITION 0 22629 #endif 22630 int test[CONDITION ? 1 : -1]; 22631int 22632main () 22633{ 22634 22635 ; 22636 return 0; 22637} 22638_ACEOF 22639if ac_fn_c_try_compile "$LINENO"; then : 22640 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=yes 22641else 22642 gl_cv_test_UINT64_MAX_EQ_ULONG_MAX=no 22643fi 22644rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 22645fi 22646{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&5 22647$as_echo "$gl_cv_test_UINT64_MAX_EQ_ULONG_MAX" >&6; } 22648 if test $gl_cv_test_UINT64_MAX_EQ_ULONG_MAX = yes; then 22649 UINT64_MAX_EQ_ULONG_MAX=1; 22650 else 22651 UINT64_MAX_EQ_ULONG_MAX=0; 22652 fi 22653 22654 22655 else 22656 UINT64_MAX_EQ_ULONG_MAX=-1 22657 fi 22658 22659 22660 22661 22662 22663 22664 22665 22666 22667 # If we replaced any of the underlying isnan* functions, replace 22668 # the isnan macro; it undoubtedly suffers from the same flaws. 22669 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan macro works" >&5 22670$as_echo_n "checking whether isnan macro works... " >&6; } 22671 if test $gl_func_isnanf = yes \ 22672 && test $gl_func_isnand = yes \ 22673 && test $gl_func_isnanl = yes; then 22674 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 22675$as_echo "yes" >&6; } 22676 ISNAN_LIBM= 22677 case " $ISNAN_LIBM " in 22678 *" $ISNANF_LIBM "*) ;; 22679 *) ISNAN_LIBM="$ISNAN_LIBM $ISNANF_LIBM" ;; 22680 esac 22681 case " $ISNAN_LIBM " in 22682 *" $ISNAND_LIBM "*) ;; 22683 *) ISNAN_LIBM="$ISNAN_LIBM $ISNAND_LIBM" ;; 22684 esac 22685 case " $ISNAN_LIBM " in 22686 *" $ISNANL_LIBM "*) ;; 22687 *) ISNAN_LIBM="$ISNAN_LIBM $ISNANL_LIBM" ;; 22688 esac 22689 else 22690 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 22691$as_echo "no" >&6; } 22692 REPLACE_ISNAN=1 22693 ISNAN_LIBM= 22694 fi 22695 22696 22697 22698 22699 22700 22701 22702 GNULIB_ISNAN=1 22703 22704 22705 22706 22707 22708$as_echo "#define GNULIB_TEST_ISNAN 1" >>confdefs.h 22709 22710 22711 22712 22713 22714 ISNAND_LIBM= 22715 22716 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5 22717$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; } 22718if ${gl_cv_func_isnand_no_libm+:} false; then : 22719 $as_echo_n "(cached) " >&6 22720else 22721 22722 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22723/* end confdefs.h. */ 22724#include <math.h> 22725 #if __GNUC__ >= 4 22726 # undef isnand 22727 # define isnand(x) __builtin_isnan ((double)(x)) 22728 #else 22729 # undef isnand 22730 # define isnand(x) isnan ((double)(x)) 22731 #endif 22732 double x; 22733int 22734main () 22735{ 22736return isnand (x); 22737 ; 22738 return 0; 22739} 22740_ACEOF 22741if ac_fn_c_try_link "$LINENO"; then : 22742 gl_cv_func_isnand_no_libm=yes 22743else 22744 gl_cv_func_isnand_no_libm=no 22745fi 22746rm -f core conftest.err conftest.$ac_objext \ 22747 conftest$ac_exeext conftest.$ac_ext 22748 22749fi 22750{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5 22751$as_echo "$gl_cv_func_isnand_no_libm" >&6; } 22752 22753 if test $gl_cv_func_isnand_no_libm = no; then 22754 22755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used with libm" >&5 22756$as_echo_n "checking whether isnan(double) can be used with libm... " >&6; } 22757if ${gl_cv_func_isnand_in_libm+:} false; then : 22758 $as_echo_n "(cached) " >&6 22759else 22760 22761 save_LIBS="$LIBS" 22762 LIBS="$LIBS -lm" 22763 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22764/* end confdefs.h. */ 22765#include <math.h> 22766 #if __GNUC__ >= 4 22767 # undef isnand 22768 # define isnand(x) __builtin_isnan ((double)(x)) 22769 #elif defined isnan 22770 # undef isnand 22771 # define isnand(x) isnan ((double)(x)) 22772 #endif 22773 double x; 22774int 22775main () 22776{ 22777return isnand (x); 22778 ; 22779 return 0; 22780} 22781_ACEOF 22782if ac_fn_c_try_link "$LINENO"; then : 22783 gl_cv_func_isnand_in_libm=yes 22784else 22785 gl_cv_func_isnand_in_libm=no 22786fi 22787rm -f core conftest.err conftest.$ac_objext \ 22788 conftest$ac_exeext conftest.$ac_ext 22789 LIBS="$save_LIBS" 22790 22791fi 22792{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_in_libm" >&5 22793$as_echo "$gl_cv_func_isnand_in_libm" >&6; } 22794 22795 if test $gl_cv_func_isnand_in_libm = yes; then 22796 ISNAND_LIBM=-lm 22797 fi 22798 fi 22799 if test $gl_cv_func_isnand_no_libm = yes \ 22800 || test $gl_cv_func_isnand_in_libm = yes; then 22801 gl_func_isnand=yes 22802 else 22803 gl_func_isnand=no 22804 HAVE_ISNAND=0 22805 fi 22806 22807 22808 22809 22810 22811 if test $HAVE_ISNAND = 0 || test $REPLACE_ISNAN = 1; then 22812 22813 22814 22815 22816 22817 22818 22819 22820 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext" 22821 22822 22823 22824 22825 fi 22826 22827 22828 22829 22830 22831 GNULIB_ISNAND=1 22832 22833 22834 22835 22836 22837$as_echo "#define GNULIB_TEST_ISNAND 1" >>confdefs.h 22838 22839 22840 22841 22842 22843 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(double) can be used without linking with libm" >&5 22844$as_echo_n "checking whether isnan(double) can be used without linking with libm... " >&6; } 22845if ${gl_cv_func_isnand_no_libm+:} false; then : 22846 $as_echo_n "(cached) " >&6 22847else 22848 22849 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22850/* end confdefs.h. */ 22851#include <math.h> 22852 #if __GNUC__ >= 4 22853 # undef isnand 22854 # define isnand(x) __builtin_isnan ((double)(x)) 22855 #else 22856 # undef isnand 22857 # define isnand(x) isnan ((double)(x)) 22858 #endif 22859 double x; 22860int 22861main () 22862{ 22863return isnand (x); 22864 ; 22865 return 0; 22866} 22867_ACEOF 22868if ac_fn_c_try_link "$LINENO"; then : 22869 gl_cv_func_isnand_no_libm=yes 22870else 22871 gl_cv_func_isnand_no_libm=no 22872fi 22873rm -f core conftest.err conftest.$ac_objext \ 22874 conftest$ac_exeext conftest.$ac_ext 22875 22876fi 22877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnand_no_libm" >&5 22878$as_echo "$gl_cv_func_isnand_no_libm" >&6; } 22879 22880 gl_func_isnand_no_libm=$gl_cv_func_isnand_no_libm 22881 if test $gl_cv_func_isnand_no_libm = yes; then 22882 22883$as_echo "#define HAVE_ISNAND_IN_LIBC 1" >>confdefs.h 22884 22885 fi 22886 22887 if test $gl_func_isnand_no_libm != yes; then 22888 22889 22890 22891 22892 22893 22894 22895 22896 gl_LIBOBJS="$gl_LIBOBJS isnand.$ac_objext" 22897 22898 22899 22900 22901 fi 22902 22903 22904 ISNANF_LIBM= 22905 22906 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5 22907$as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; } 22908if ${gl_cv_func_isnanf_no_libm+:} false; then : 22909 $as_echo_n "(cached) " >&6 22910else 22911 22912 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22913/* end confdefs.h. */ 22914#include <math.h> 22915 #if __GNUC__ >= 4 22916 # undef isnanf 22917 # define isnanf(x) __builtin_isnanf ((float)(x)) 22918 #elif defined isnan 22919 # undef isnanf 22920 # define isnanf(x) isnan ((float)(x)) 22921 #endif 22922 float x; 22923int 22924main () 22925{ 22926return isnanf (x); 22927 ; 22928 return 0; 22929} 22930_ACEOF 22931if ac_fn_c_try_link "$LINENO"; then : 22932 gl_cv_func_isnanf_no_libm=yes 22933else 22934 gl_cv_func_isnanf_no_libm=no 22935fi 22936rm -f core conftest.err conftest.$ac_objext \ 22937 conftest$ac_exeext conftest.$ac_ext 22938 22939fi 22940{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5 22941$as_echo "$gl_cv_func_isnanf_no_libm" >&6; } 22942 22943 if test $gl_cv_func_isnanf_no_libm = no; then 22944 22945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used with libm" >&5 22946$as_echo_n "checking whether isnan(float) can be used with libm... " >&6; } 22947if ${gl_cv_func_isnanf_in_libm+:} false; then : 22948 $as_echo_n "(cached) " >&6 22949else 22950 22951 save_LIBS="$LIBS" 22952 LIBS="$LIBS -lm" 22953 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 22954/* end confdefs.h. */ 22955#include <math.h> 22956 #if __GNUC__ >= 4 22957 # undef isnanf 22958 # define isnanf(x) __builtin_isnanf ((float)(x)) 22959 #elif defined isnan 22960 # undef isnanf 22961 # define isnanf(x) isnan ((float)(x)) 22962 #endif 22963 float x; 22964int 22965main () 22966{ 22967return isnanf (x); 22968 ; 22969 return 0; 22970} 22971_ACEOF 22972if ac_fn_c_try_link "$LINENO"; then : 22973 gl_cv_func_isnanf_in_libm=yes 22974else 22975 gl_cv_func_isnanf_in_libm=no 22976fi 22977rm -f core conftest.err conftest.$ac_objext \ 22978 conftest$ac_exeext conftest.$ac_ext 22979 LIBS="$save_LIBS" 22980 22981fi 22982{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_in_libm" >&5 22983$as_echo "$gl_cv_func_isnanf_in_libm" >&6; } 22984 22985 if test $gl_cv_func_isnanf_in_libm = yes; then 22986 ISNANF_LIBM=-lm 22987 fi 22988 fi 22989 if test $gl_cv_func_isnanf_no_libm = yes \ 22990 || test $gl_cv_func_isnanf_in_libm = yes; then 22991 save_LIBS="$LIBS" 22992 LIBS="$LIBS $ISNANF_LIBM" 22993 22994 22995 22996 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5 22997$as_echo_n "checking whether isnan(float) works... " >&6; } 22998if ${gl_cv_func_isnanf_works+:} false; then : 22999 $as_echo_n "(cached) " >&6 23000else 23001 23002 if test "$cross_compiling" = yes; then : 23003 case "$host_os" in 23004 irix* | solaris*) gl_cv_func_isnanf_works="guessing no";; 23005 *) gl_cv_func_isnanf_works="guessing yes";; 23006 esac 23007 23008else 23009 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23010/* end confdefs.h. */ 23011 23012#include <math.h> 23013#if __GNUC__ >= 4 23014# undef isnanf 23015# define isnanf(x) __builtin_isnanf ((float)(x)) 23016#elif defined isnan 23017# undef isnanf 23018# define isnanf(x) isnan ((float)(x)) 23019#endif 23020/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */ 23021#ifdef __DECC 23022static float 23023NaN () 23024{ 23025 static float zero = 0.0f; 23026 return zero / zero; 23027} 23028#else 23029# define NaN() (0.0f / 0.0f) 23030#endif 23031#define NWORDS \ 23032 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 23033typedef union { unsigned int word[NWORDS]; float value; } memory_float; 23034int main() 23035{ 23036 int result = 0; 23037 23038 if (isnanf (1.0f / 0.0f)) 23039 result |= 1; 23040 23041 if (!isnanf (NaN ())) 23042 result |= 2; 23043 23044#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT 23045 /* The isnanf function should be immune against changes in the sign bit and 23046 in the mantissa bits. The xor operation twiddles a bit that can only be 23047 a sign bit or a mantissa bit. */ 23048 if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0) 23049 { 23050 memory_float m; 23051 23052 m.value = NaN (); 23053 /* Set the bits below the exponent to 01111...111. */ 23054 m.word[0] &= -1U << FLT_EXPBIT0_BIT; 23055 m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1; 23056 if (!isnanf (m.value)) 23057 result |= 4; 23058 } 23059#endif 23060 23061 return result; 23062} 23063_ACEOF 23064if ac_fn_c_try_run "$LINENO"; then : 23065 gl_cv_func_isnanf_works=yes 23066else 23067 gl_cv_func_isnanf_works=no 23068fi 23069rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 23070 conftest.$ac_objext conftest.beam conftest.$ac_ext 23071fi 23072 23073 23074fi 23075{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5 23076$as_echo "$gl_cv_func_isnanf_works" >&6; } 23077 23078 LIBS="$save_LIBS" 23079 case "$gl_cv_func_isnanf_works" in 23080 *yes) gl_func_isnanf=yes ;; 23081 *) gl_func_isnanf=no; ISNANF_LIBM= ;; 23082 esac 23083 else 23084 gl_func_isnanf=no 23085 fi 23086 if test $gl_func_isnanf != yes; then 23087 HAVE_ISNANF=0 23088 fi 23089 23090 23091 23092 23093 23094 if test $HAVE_ISNANF = 0 || test $REPLACE_ISNAN = 1; then 23095 23096 23097 23098 23099 23100 23101 23102 23103 gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext" 23104 23105 23106 23107 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5 23108$as_echo_n "checking where to find the exponent in a 'float'... " >&6; } 23109if ${gl_cv_cc_float_expbit0+:} false; then : 23110 $as_echo_n "(cached) " >&6 23111else 23112 23113 if test "$cross_compiling" = yes; then : 23114 gl_cv_cc_float_expbit0="word 0 bit 23" 23115else 23116 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23117/* end confdefs.h. */ 23118 23119#include <float.h> 23120#include <stddef.h> 23121#include <stdio.h> 23122#include <string.h> 23123#define NWORDS \ 23124 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 23125typedef union { float value; unsigned int word[NWORDS]; } memory_float; 23126static unsigned int ored_words[NWORDS]; 23127static unsigned int anded_words[NWORDS]; 23128static void add_to_ored_words (float x) 23129{ 23130 memory_float m; 23131 size_t i; 23132 /* Clear it first, in case 23133 sizeof (float) < sizeof (memory_float). */ 23134 memset (&m, 0, sizeof (memory_float)); 23135 m.value = x; 23136 for (i = 0; i < NWORDS; i++) 23137 { 23138 ored_words[i] |= m.word[i]; 23139 anded_words[i] &= m.word[i]; 23140 } 23141} 23142int main () 23143{ 23144 size_t j; 23145 FILE *fp = fopen ("conftest.out", "w"); 23146 if (fp == NULL) 23147 return 1; 23148 for (j = 0; j < NWORDS; j++) 23149 anded_words[j] = ~ (unsigned int) 0; 23150 add_to_ored_words (0.25f); 23151 add_to_ored_words (0.5f); 23152 add_to_ored_words (1.0f); 23153 add_to_ored_words (2.0f); 23154 add_to_ored_words (4.0f); 23155 /* Remove bits that are common (e.g. if representation of the first mantissa 23156 bit is explicit). */ 23157 for (j = 0; j < NWORDS; j++) 23158 ored_words[j] &= ~anded_words[j]; 23159 /* Now find the nonzero word. */ 23160 for (j = 0; j < NWORDS; j++) 23161 if (ored_words[j] != 0) 23162 break; 23163 if (j < NWORDS) 23164 { 23165 size_t i; 23166 for (i = j + 1; i < NWORDS; i++) 23167 if (ored_words[i] != 0) 23168 { 23169 fprintf (fp, "unknown"); 23170 return (fclose (fp) != 0); 23171 } 23172 for (i = 0; ; i++) 23173 if ((ored_words[j] >> i) & 1) 23174 { 23175 fprintf (fp, "word %d bit %d", (int) j, (int) i); 23176 return (fclose (fp) != 0); 23177 } 23178 } 23179 fprintf (fp, "unknown"); 23180 return (fclose (fp) != 0); 23181} 23182 23183_ACEOF 23184if ac_fn_c_try_run "$LINENO"; then : 23185 gl_cv_cc_float_expbit0=`cat conftest.out` 23186else 23187 gl_cv_cc_float_expbit0="unknown" 23188fi 23189rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 23190 conftest.$ac_objext conftest.beam conftest.$ac_ext 23191fi 23192 23193 rm -f conftest.out 23194 23195fi 23196{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5 23197$as_echo "$gl_cv_cc_float_expbit0" >&6; } 23198 case "$gl_cv_cc_float_expbit0" in 23199 word*bit*) 23200 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` 23201 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` 23202 23203cat >>confdefs.h <<_ACEOF 23204#define FLT_EXPBIT0_WORD $word 23205_ACEOF 23206 23207 23208cat >>confdefs.h <<_ACEOF 23209#define FLT_EXPBIT0_BIT $bit 23210_ACEOF 23211 23212 ;; 23213 esac 23214 23215 23216 fi 23217 23218 23219 23220 23221 23222 GNULIB_ISNANF=1 23223 23224 23225 23226 23227 23228$as_echo "#define GNULIB_TEST_ISNANF 1" >>confdefs.h 23229 23230 23231 23232 23233 23234 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) can be used without linking with libm" >&5 23235$as_echo_n "checking whether isnan(float) can be used without linking with libm... " >&6; } 23236if ${gl_cv_func_isnanf_no_libm+:} false; then : 23237 $as_echo_n "(cached) " >&6 23238else 23239 23240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23241/* end confdefs.h. */ 23242#include <math.h> 23243 #if __GNUC__ >= 4 23244 # undef isnanf 23245 # define isnanf(x) __builtin_isnanf ((float)(x)) 23246 #elif defined isnan 23247 # undef isnanf 23248 # define isnanf(x) isnan ((float)(x)) 23249 #endif 23250 float x; 23251int 23252main () 23253{ 23254return isnanf (x); 23255 ; 23256 return 0; 23257} 23258_ACEOF 23259if ac_fn_c_try_link "$LINENO"; then : 23260 gl_cv_func_isnanf_no_libm=yes 23261else 23262 gl_cv_func_isnanf_no_libm=no 23263fi 23264rm -f core conftest.err conftest.$ac_objext \ 23265 conftest$ac_exeext conftest.$ac_ext 23266 23267fi 23268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_no_libm" >&5 23269$as_echo "$gl_cv_func_isnanf_no_libm" >&6; } 23270 23271 if test $gl_cv_func_isnanf_no_libm = yes; then 23272 23273 23274 23275 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(float) works" >&5 23276$as_echo_n "checking whether isnan(float) works... " >&6; } 23277if ${gl_cv_func_isnanf_works+:} false; then : 23278 $as_echo_n "(cached) " >&6 23279else 23280 23281 if test "$cross_compiling" = yes; then : 23282 case "$host_os" in 23283 irix* | solaris*) gl_cv_func_isnanf_works="guessing no";; 23284 *) gl_cv_func_isnanf_works="guessing yes";; 23285 esac 23286 23287else 23288 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23289/* end confdefs.h. */ 23290 23291#include <math.h> 23292#if __GNUC__ >= 4 23293# undef isnanf 23294# define isnanf(x) __builtin_isnanf ((float)(x)) 23295#elif defined isnan 23296# undef isnanf 23297# define isnanf(x) isnan ((float)(x)) 23298#endif 23299/* The Compaq (ex-DEC) C 6.4 compiler chokes on the expression 0.0 / 0.0. */ 23300#ifdef __DECC 23301static float 23302NaN () 23303{ 23304 static float zero = 0.0f; 23305 return zero / zero; 23306} 23307#else 23308# define NaN() (0.0f / 0.0f) 23309#endif 23310#define NWORDS \ 23311 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 23312typedef union { unsigned int word[NWORDS]; float value; } memory_float; 23313int main() 23314{ 23315 int result = 0; 23316 23317 if (isnanf (1.0f / 0.0f)) 23318 result |= 1; 23319 23320 if (!isnanf (NaN ())) 23321 result |= 2; 23322 23323#if defined FLT_EXPBIT0_WORD && defined FLT_EXPBIT0_BIT 23324 /* The isnanf function should be immune against changes in the sign bit and 23325 in the mantissa bits. The xor operation twiddles a bit that can only be 23326 a sign bit or a mantissa bit. */ 23327 if (FLT_EXPBIT0_WORD == 0 && FLT_EXPBIT0_BIT > 0) 23328 { 23329 memory_float m; 23330 23331 m.value = NaN (); 23332 /* Set the bits below the exponent to 01111...111. */ 23333 m.word[0] &= -1U << FLT_EXPBIT0_BIT; 23334 m.word[0] |= 1U << (FLT_EXPBIT0_BIT - 1) - 1; 23335 if (!isnanf (m.value)) 23336 result |= 4; 23337 } 23338#endif 23339 23340 return result; 23341} 23342_ACEOF 23343if ac_fn_c_try_run "$LINENO"; then : 23344 gl_cv_func_isnanf_works=yes 23345else 23346 gl_cv_func_isnanf_works=no 23347fi 23348rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 23349 conftest.$ac_objext conftest.beam conftest.$ac_ext 23350fi 23351 23352 23353fi 23354{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanf_works" >&5 23355$as_echo "$gl_cv_func_isnanf_works" >&6; } 23356 23357 fi 23358 if test $gl_cv_func_isnanf_no_libm = yes \ 23359 && { case "$gl_cv_func_isnanf_works" in 23360 *yes) true;; 23361 *) false;; 23362 esac 23363 }; then 23364 gl_func_isnanf_no_libm=yes 23365 23366$as_echo "#define HAVE_ISNANF_IN_LIBC 1" >>confdefs.h 23367 23368 else 23369 gl_func_isnanf_no_libm=no 23370 fi 23371 23372 if test $gl_func_isnanf_no_libm != yes; then 23373 23374 23375 23376 23377 23378 23379 23380 23381 gl_LIBOBJS="$gl_LIBOBJS isnanf.$ac_objext" 23382 23383 23384 23385 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'float'" >&5 23386$as_echo_n "checking where to find the exponent in a 'float'... " >&6; } 23387if ${gl_cv_cc_float_expbit0+:} false; then : 23388 $as_echo_n "(cached) " >&6 23389else 23390 23391 if test "$cross_compiling" = yes; then : 23392 gl_cv_cc_float_expbit0="word 0 bit 23" 23393else 23394 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23395/* end confdefs.h. */ 23396 23397#include <float.h> 23398#include <stddef.h> 23399#include <stdio.h> 23400#include <string.h> 23401#define NWORDS \ 23402 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 23403typedef union { float value; unsigned int word[NWORDS]; } memory_float; 23404static unsigned int ored_words[NWORDS]; 23405static unsigned int anded_words[NWORDS]; 23406static void add_to_ored_words (float x) 23407{ 23408 memory_float m; 23409 size_t i; 23410 /* Clear it first, in case 23411 sizeof (float) < sizeof (memory_float). */ 23412 memset (&m, 0, sizeof (memory_float)); 23413 m.value = x; 23414 for (i = 0; i < NWORDS; i++) 23415 { 23416 ored_words[i] |= m.word[i]; 23417 anded_words[i] &= m.word[i]; 23418 } 23419} 23420int main () 23421{ 23422 size_t j; 23423 FILE *fp = fopen ("conftest.out", "w"); 23424 if (fp == NULL) 23425 return 1; 23426 for (j = 0; j < NWORDS; j++) 23427 anded_words[j] = ~ (unsigned int) 0; 23428 add_to_ored_words (0.25f); 23429 add_to_ored_words (0.5f); 23430 add_to_ored_words (1.0f); 23431 add_to_ored_words (2.0f); 23432 add_to_ored_words (4.0f); 23433 /* Remove bits that are common (e.g. if representation of the first mantissa 23434 bit is explicit). */ 23435 for (j = 0; j < NWORDS; j++) 23436 ored_words[j] &= ~anded_words[j]; 23437 /* Now find the nonzero word. */ 23438 for (j = 0; j < NWORDS; j++) 23439 if (ored_words[j] != 0) 23440 break; 23441 if (j < NWORDS) 23442 { 23443 size_t i; 23444 for (i = j + 1; i < NWORDS; i++) 23445 if (ored_words[i] != 0) 23446 { 23447 fprintf (fp, "unknown"); 23448 return (fclose (fp) != 0); 23449 } 23450 for (i = 0; ; i++) 23451 if ((ored_words[j] >> i) & 1) 23452 { 23453 fprintf (fp, "word %d bit %d", (int) j, (int) i); 23454 return (fclose (fp) != 0); 23455 } 23456 } 23457 fprintf (fp, "unknown"); 23458 return (fclose (fp) != 0); 23459} 23460 23461_ACEOF 23462if ac_fn_c_try_run "$LINENO"; then : 23463 gl_cv_cc_float_expbit0=`cat conftest.out` 23464else 23465 gl_cv_cc_float_expbit0="unknown" 23466fi 23467rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 23468 conftest.$ac_objext conftest.beam conftest.$ac_ext 23469fi 23470 23471 rm -f conftest.out 23472 23473fi 23474{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_expbit0" >&5 23475$as_echo "$gl_cv_cc_float_expbit0" >&6; } 23476 case "$gl_cv_cc_float_expbit0" in 23477 word*bit*) 23478 word=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` 23479 bit=`echo "$gl_cv_cc_float_expbit0" | sed -e 's/word.*bit //'` 23480 23481cat >>confdefs.h <<_ACEOF 23482#define FLT_EXPBIT0_WORD $word 23483_ACEOF 23484 23485 23486cat >>confdefs.h <<_ACEOF 23487#define FLT_EXPBIT0_BIT $bit 23488_ACEOF 23489 23490 ;; 23491 esac 23492 23493 23494 fi 23495 23496 23497 ISNANL_LIBM= 23498 23499 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5 23500$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; } 23501if ${gl_cv_func_isnanl_no_libm+:} false; then : 23502 $as_echo_n "(cached) " >&6 23503else 23504 23505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23506/* end confdefs.h. */ 23507#include <math.h> 23508 #if __GNUC__ >= 4 23509 # undef isnanl 23510 # define isnanl(x) __builtin_isnanl ((long double)(x)) 23511 #elif defined isnan 23512 # undef isnanl 23513 # define isnanl(x) isnan ((long double)(x)) 23514 #endif 23515 long double x; 23516int 23517main () 23518{ 23519return isnanl (x); 23520 ; 23521 return 0; 23522} 23523_ACEOF 23524if ac_fn_c_try_link "$LINENO"; then : 23525 gl_cv_func_isnanl_no_libm=yes 23526else 23527 gl_cv_func_isnanl_no_libm=no 23528fi 23529rm -f core conftest.err conftest.$ac_objext \ 23530 conftest$ac_exeext conftest.$ac_ext 23531 23532fi 23533{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5 23534$as_echo "$gl_cv_func_isnanl_no_libm" >&6; } 23535 23536 if test $gl_cv_func_isnanl_no_libm = no; then 23537 23538 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used with libm" >&5 23539$as_echo_n "checking whether isnan(long double) can be used with libm... " >&6; } 23540if ${gl_cv_func_isnanl_in_libm+:} false; then : 23541 $as_echo_n "(cached) " >&6 23542else 23543 23544 save_LIBS="$LIBS" 23545 LIBS="$LIBS -lm" 23546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23547/* end confdefs.h. */ 23548#include <math.h> 23549 #if __GNUC__ >= 4 23550 # undef isnanl 23551 # define isnanl(x) __builtin_isnanl ((long double)(x)) 23552 #elif defined isnan 23553 # undef isnanl 23554 # define isnanl(x) isnan ((long double)(x)) 23555 #endif 23556 long double x; 23557int 23558main () 23559{ 23560return isnanl (x); 23561 ; 23562 return 0; 23563} 23564_ACEOF 23565if ac_fn_c_try_link "$LINENO"; then : 23566 gl_cv_func_isnanl_in_libm=yes 23567else 23568 gl_cv_func_isnanl_in_libm=no 23569fi 23570rm -f core conftest.err conftest.$ac_objext \ 23571 conftest$ac_exeext conftest.$ac_ext 23572 LIBS="$save_LIBS" 23573 23574fi 23575{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_in_libm" >&5 23576$as_echo "$gl_cv_func_isnanl_in_libm" >&6; } 23577 23578 if test $gl_cv_func_isnanl_in_libm = yes; then 23579 ISNANL_LIBM=-lm 23580 fi 23581 fi 23582 if test $gl_cv_func_isnanl_no_libm = yes \ 23583 || test $gl_cv_func_isnanl_in_libm = yes; then 23584 save_LIBS="$LIBS" 23585 LIBS="$LIBS $ISNANL_LIBM" 23586 23587 23588 23589 23590 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5 23591$as_echo_n "checking whether isnanl works... " >&6; } 23592if ${gl_cv_func_isnanl_works+:} false; then : 23593 $as_echo_n "(cached) " >&6 23594else 23595 23596 if test "$cross_compiling" = yes; then : 23597 case "$host_cpu" in 23598 # Guess no on ia64, x86_64, i386. 23599 ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";; 23600 *) 23601 case "$host_os" in 23602 netbsd*) gl_cv_func_isnanl_works="guessing no";; 23603 *) gl_cv_func_isnanl_works="guessing yes";; 23604 esac 23605 ;; 23606 esac 23607 23608else 23609 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23610/* end confdefs.h. */ 23611 23612#include <float.h> 23613#include <limits.h> 23614#include <math.h> 23615#if __GNUC__ >= 4 23616# undef isnanl 23617# define isnanl(x) __builtin_isnanl ((long double)(x)) 23618#elif defined isnan 23619# undef isnanl 23620# define isnanl(x) isnan ((long double)(x)) 23621#endif 23622#define NWORDS \ 23623 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 23624typedef union { unsigned int word[NWORDS]; long double value; } 23625 memory_long_double; 23626/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the 23627 runtime type conversion. */ 23628#ifdef __sgi 23629static long double NaNl () 23630{ 23631 double zero = 0.0; 23632 return zero / zero; 23633} 23634#else 23635# define NaNl() (0.0L / 0.0L) 23636#endif 23637int main () 23638{ 23639 int result = 0; 23640 23641 if (!isnanl (NaNl ())) 23642 result |= 1; 23643 23644 { 23645 memory_long_double m; 23646 unsigned int i; 23647 23648 /* The isnanl function should be immune against changes in the sign bit and 23649 in the mantissa bits. The xor operation twiddles a bit that can only be 23650 a sign bit or a mantissa bit (since the exponent never extends to 23651 bit 31). */ 23652 m.value = NaNl (); 23653 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); 23654 for (i = 0; i < NWORDS; i++) 23655 m.word[i] |= 1; 23656 if (!isnanl (m.value)) 23657 result |= 1; 23658 } 23659 23660#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 23661/* Representation of an 80-bit 'long double' as an initializer for a sequence 23662 of 'unsigned int' words. */ 23663# ifdef WORDS_BIGENDIAN 23664# define LDBL80_WORDS(exponent,manthi,mantlo) \ 23665 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ 23666 ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ 23667 (unsigned int) (mantlo) << 16 \ 23668 } 23669# else 23670# define LDBL80_WORDS(exponent,manthi,mantlo) \ 23671 { mantlo, manthi, exponent } 23672# endif 23673 { /* Quiet NaN. */ 23674 static memory_long_double x = 23675 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; 23676 if (!isnanl (x.value)) 23677 result |= 2; 23678 } 23679 { 23680 /* Signalling NaN. */ 23681 static memory_long_double x = 23682 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; 23683 if (!isnanl (x.value)) 23684 result |= 2; 23685 } 23686 /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, 23687 Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in 23688 Intel IA-64 Architecture Software Developer's Manual, Volume 1: 23689 Application Architecture. 23690 Table 5-2 "Floating-Point Register Encodings" 23691 Figure 5-6 "Memory to Floating-Point Register Data Translation" 23692 */ 23693 { /* Pseudo-NaN. */ 23694 static memory_long_double x = 23695 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; 23696 if (!isnanl (x.value)) 23697 result |= 4; 23698 } 23699 { /* Pseudo-Infinity. */ 23700 static memory_long_double x = 23701 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; 23702 if (!isnanl (x.value)) 23703 result |= 8; 23704 } 23705 { /* Pseudo-Zero. */ 23706 static memory_long_double x = 23707 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; 23708 if (!isnanl (x.value)) 23709 result |= 16; 23710 } 23711 { /* Unnormalized number. */ 23712 static memory_long_double x = 23713 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; 23714 if (!isnanl (x.value)) 23715 result |= 32; 23716 } 23717 { /* Pseudo-Denormal. */ 23718 static memory_long_double x = 23719 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; 23720 if (!isnanl (x.value)) 23721 result |= 64; 23722 } 23723#endif 23724 23725 return result; 23726} 23727_ACEOF 23728if ac_fn_c_try_run "$LINENO"; then : 23729 gl_cv_func_isnanl_works=yes 23730else 23731 gl_cv_func_isnanl_works=no 23732fi 23733rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 23734 conftest.$ac_objext conftest.beam conftest.$ac_ext 23735fi 23736 23737 23738fi 23739{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5 23740$as_echo "$gl_cv_func_isnanl_works" >&6; } 23741 23742 LIBS="$save_LIBS" 23743 case "$gl_cv_func_isnanl_works" in 23744 *yes) gl_func_isnanl=yes ;; 23745 *) gl_func_isnanl=no; ISNANL_LIBM= ;; 23746 esac 23747 else 23748 gl_func_isnanl=no 23749 fi 23750 if test $gl_func_isnanl != yes; then 23751 HAVE_ISNANL=0 23752 fi 23753 23754 23755 23756 23757 23758 if test $HAVE_ISNANL = 0 || test $REPLACE_ISNAN = 1; then 23759 23760 23761 23762 23763 23764 23765 23766 23767 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext" 23768 23769 23770 23771 23772 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5 23773$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; } 23774if ${gl_cv_cc_long_double_expbit0+:} false; then : 23775 $as_echo_n "(cached) " >&6 23776else 23777 23778 if test "$cross_compiling" = yes; then : 23779 23780 gl_cv_cc_long_double_expbit0="unknown" 23781 23782else 23783 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23784/* end confdefs.h. */ 23785 23786#include <float.h> 23787#include <stddef.h> 23788#include <stdio.h> 23789#include <string.h> 23790#define NWORDS \ 23791 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 23792typedef union { long double value; unsigned int word[NWORDS]; } 23793 memory_long_double; 23794static unsigned int ored_words[NWORDS]; 23795static unsigned int anded_words[NWORDS]; 23796static void add_to_ored_words (long double x) 23797{ 23798 memory_long_double m; 23799 size_t i; 23800 /* Clear it first, in case 23801 sizeof (long double) < sizeof (memory_long_double). */ 23802 memset (&m, 0, sizeof (memory_long_double)); 23803 m.value = x; 23804 for (i = 0; i < NWORDS; i++) 23805 { 23806 ored_words[i] |= m.word[i]; 23807 anded_words[i] &= m.word[i]; 23808 } 23809} 23810int main () 23811{ 23812 size_t j; 23813 FILE *fp = fopen ("conftest.out", "w"); 23814 if (fp == NULL) 23815 return 1; 23816 for (j = 0; j < NWORDS; j++) 23817 anded_words[j] = ~ (unsigned int) 0; 23818 add_to_ored_words (0.25L); 23819 add_to_ored_words (0.5L); 23820 add_to_ored_words (1.0L); 23821 add_to_ored_words (2.0L); 23822 add_to_ored_words (4.0L); 23823 /* Remove bits that are common (e.g. if representation of the first mantissa 23824 bit is explicit). */ 23825 for (j = 0; j < NWORDS; j++) 23826 ored_words[j] &= ~anded_words[j]; 23827 /* Now find the nonzero word. */ 23828 for (j = 0; j < NWORDS; j++) 23829 if (ored_words[j] != 0) 23830 break; 23831 if (j < NWORDS) 23832 { 23833 size_t i; 23834 for (i = j + 1; i < NWORDS; i++) 23835 if (ored_words[i] != 0) 23836 { 23837 fprintf (fp, "unknown"); 23838 return (fclose (fp) != 0); 23839 } 23840 for (i = 0; ; i++) 23841 if ((ored_words[j] >> i) & 1) 23842 { 23843 fprintf (fp, "word %d bit %d", (int) j, (int) i); 23844 return (fclose (fp) != 0); 23845 } 23846 } 23847 fprintf (fp, "unknown"); 23848 return (fclose (fp) != 0); 23849} 23850 23851_ACEOF 23852if ac_fn_c_try_run "$LINENO"; then : 23853 gl_cv_cc_long_double_expbit0=`cat conftest.out` 23854else 23855 gl_cv_cc_long_double_expbit0="unknown" 23856fi 23857rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 23858 conftest.$ac_objext conftest.beam conftest.$ac_ext 23859fi 23860 23861 rm -f conftest.out 23862 23863fi 23864{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5 23865$as_echo "$gl_cv_cc_long_double_expbit0" >&6; } 23866 case "$gl_cv_cc_long_double_expbit0" in 23867 word*bit*) 23868 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` 23869 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'` 23870 23871cat >>confdefs.h <<_ACEOF 23872#define LDBL_EXPBIT0_WORD $word 23873_ACEOF 23874 23875 23876cat >>confdefs.h <<_ACEOF 23877#define LDBL_EXPBIT0_BIT $bit 23878_ACEOF 23879 23880 ;; 23881 esac 23882 23883 23884 23885 fi 23886 23887 23888 23889 23890 23891 GNULIB_ISNANL=1 23892 23893 23894 23895 23896 23897$as_echo "#define GNULIB_TEST_ISNANL 1" >>confdefs.h 23898 23899 23900 23901 23902 23903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnan(long double) can be used without linking with libm" >&5 23904$as_echo_n "checking whether isnan(long double) can be used without linking with libm... " >&6; } 23905if ${gl_cv_func_isnanl_no_libm+:} false; then : 23906 $as_echo_n "(cached) " >&6 23907else 23908 23909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23910/* end confdefs.h. */ 23911#include <math.h> 23912 #if __GNUC__ >= 4 23913 # undef isnanl 23914 # define isnanl(x) __builtin_isnanl ((long double)(x)) 23915 #elif defined isnan 23916 # undef isnanl 23917 # define isnanl(x) isnan ((long double)(x)) 23918 #endif 23919 long double x; 23920int 23921main () 23922{ 23923return isnanl (x); 23924 ; 23925 return 0; 23926} 23927_ACEOF 23928if ac_fn_c_try_link "$LINENO"; then : 23929 gl_cv_func_isnanl_no_libm=yes 23930else 23931 gl_cv_func_isnanl_no_libm=no 23932fi 23933rm -f core conftest.err conftest.$ac_objext \ 23934 conftest$ac_exeext conftest.$ac_ext 23935 23936fi 23937{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_no_libm" >&5 23938$as_echo "$gl_cv_func_isnanl_no_libm" >&6; } 23939 23940 gl_func_isnanl_no_libm=$gl_cv_func_isnanl_no_libm 23941 if test $gl_func_isnanl_no_libm = yes; then 23942 23943 23944 23945 23946 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether isnanl works" >&5 23947$as_echo_n "checking whether isnanl works... " >&6; } 23948if ${gl_cv_func_isnanl_works+:} false; then : 23949 $as_echo_n "(cached) " >&6 23950else 23951 23952 if test "$cross_compiling" = yes; then : 23953 case "$host_cpu" in 23954 # Guess no on ia64, x86_64, i386. 23955 ia64 | x86_64 | i*86) gl_cv_func_isnanl_works="guessing no";; 23956 *) 23957 case "$host_os" in 23958 netbsd*) gl_cv_func_isnanl_works="guessing no";; 23959 *) gl_cv_func_isnanl_works="guessing yes";; 23960 esac 23961 ;; 23962 esac 23963 23964else 23965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 23966/* end confdefs.h. */ 23967 23968#include <float.h> 23969#include <limits.h> 23970#include <math.h> 23971#if __GNUC__ >= 4 23972# undef isnanl 23973# define isnanl(x) __builtin_isnanl ((long double)(x)) 23974#elif defined isnan 23975# undef isnanl 23976# define isnanl(x) isnan ((long double)(x)) 23977#endif 23978#define NWORDS \ 23979 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 23980typedef union { unsigned int word[NWORDS]; long double value; } 23981 memory_long_double; 23982/* On Irix 6.5, gcc 3.4.3 can't compute compile-time NaN, and needs the 23983 runtime type conversion. */ 23984#ifdef __sgi 23985static long double NaNl () 23986{ 23987 double zero = 0.0; 23988 return zero / zero; 23989} 23990#else 23991# define NaNl() (0.0L / 0.0L) 23992#endif 23993int main () 23994{ 23995 int result = 0; 23996 23997 if (!isnanl (NaNl ())) 23998 result |= 1; 23999 24000 { 24001 memory_long_double m; 24002 unsigned int i; 24003 24004 /* The isnanl function should be immune against changes in the sign bit and 24005 in the mantissa bits. The xor operation twiddles a bit that can only be 24006 a sign bit or a mantissa bit (since the exponent never extends to 24007 bit 31). */ 24008 m.value = NaNl (); 24009 m.word[NWORDS / 2] ^= (unsigned int) 1 << (sizeof (unsigned int) * CHAR_BIT - 1); 24010 for (i = 0; i < NWORDS; i++) 24011 m.word[i] |= 1; 24012 if (!isnanl (m.value)) 24013 result |= 1; 24014 } 24015 24016#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 24017/* Representation of an 80-bit 'long double' as an initializer for a sequence 24018 of 'unsigned int' words. */ 24019# ifdef WORDS_BIGENDIAN 24020# define LDBL80_WORDS(exponent,manthi,mantlo) \ 24021 { ((unsigned int) (exponent) << 16) | ((unsigned int) (manthi) >> 16), \ 24022 ((unsigned int) (manthi) << 16) | (unsigned int) (mantlo) >> 16), \ 24023 (unsigned int) (mantlo) << 16 \ 24024 } 24025# else 24026# define LDBL80_WORDS(exponent,manthi,mantlo) \ 24027 { mantlo, manthi, exponent } 24028# endif 24029 { /* Quiet NaN. */ 24030 static memory_long_double x = 24031 { LDBL80_WORDS (0xFFFF, 0xC3333333, 0x00000000) }; 24032 if (!isnanl (x.value)) 24033 result |= 2; 24034 } 24035 { 24036 /* Signalling NaN. */ 24037 static memory_long_double x = 24038 { LDBL80_WORDS (0xFFFF, 0x83333333, 0x00000000) }; 24039 if (!isnanl (x.value)) 24040 result |= 2; 24041 } 24042 /* The isnanl function should recognize Pseudo-NaNs, Pseudo-Infinities, 24043 Pseudo-Zeroes, Unnormalized Numbers, and Pseudo-Denormals, as defined in 24044 Intel IA-64 Architecture Software Developer's Manual, Volume 1: 24045 Application Architecture. 24046 Table 5-2 "Floating-Point Register Encodings" 24047 Figure 5-6 "Memory to Floating-Point Register Data Translation" 24048 */ 24049 { /* Pseudo-NaN. */ 24050 static memory_long_double x = 24051 { LDBL80_WORDS (0xFFFF, 0x40000001, 0x00000000) }; 24052 if (!isnanl (x.value)) 24053 result |= 4; 24054 } 24055 { /* Pseudo-Infinity. */ 24056 static memory_long_double x = 24057 { LDBL80_WORDS (0xFFFF, 0x00000000, 0x00000000) }; 24058 if (!isnanl (x.value)) 24059 result |= 8; 24060 } 24061 { /* Pseudo-Zero. */ 24062 static memory_long_double x = 24063 { LDBL80_WORDS (0x4004, 0x00000000, 0x00000000) }; 24064 if (!isnanl (x.value)) 24065 result |= 16; 24066 } 24067 { /* Unnormalized number. */ 24068 static memory_long_double x = 24069 { LDBL80_WORDS (0x4000, 0x63333333, 0x00000000) }; 24070 if (!isnanl (x.value)) 24071 result |= 32; 24072 } 24073 { /* Pseudo-Denormal. */ 24074 static memory_long_double x = 24075 { LDBL80_WORDS (0x0000, 0x83333333, 0x00000000) }; 24076 if (!isnanl (x.value)) 24077 result |= 64; 24078 } 24079#endif 24080 24081 return result; 24082} 24083_ACEOF 24084if ac_fn_c_try_run "$LINENO"; then : 24085 gl_cv_func_isnanl_works=yes 24086else 24087 gl_cv_func_isnanl_works=no 24088fi 24089rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 24090 conftest.$ac_objext conftest.beam conftest.$ac_ext 24091fi 24092 24093 24094fi 24095{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_isnanl_works" >&5 24096$as_echo "$gl_cv_func_isnanl_works" >&6; } 24097 24098 case "$gl_cv_func_isnanl_works" in 24099 *yes) ;; 24100 *) gl_func_isnanl_no_libm=no ;; 24101 esac 24102 fi 24103 if test $gl_func_isnanl_no_libm = yes; then 24104 24105$as_echo "#define HAVE_ISNANL_IN_LIBC 1" >>confdefs.h 24106 24107 fi 24108 24109 if test $gl_func_isnanl_no_libm != yes; then 24110 24111 24112 24113 24114 24115 24116 24117 24118 gl_LIBOBJS="$gl_LIBOBJS isnanl.$ac_objext" 24119 24120 24121 24122 24123 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the exponent in a 'long double'" >&5 24124$as_echo_n "checking where to find the exponent in a 'long double'... " >&6; } 24125if ${gl_cv_cc_long_double_expbit0+:} false; then : 24126 $as_echo_n "(cached) " >&6 24127else 24128 24129 if test "$cross_compiling" = yes; then : 24130 24131 gl_cv_cc_long_double_expbit0="unknown" 24132 24133else 24134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24135/* end confdefs.h. */ 24136 24137#include <float.h> 24138#include <stddef.h> 24139#include <stdio.h> 24140#include <string.h> 24141#define NWORDS \ 24142 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 24143typedef union { long double value; unsigned int word[NWORDS]; } 24144 memory_long_double; 24145static unsigned int ored_words[NWORDS]; 24146static unsigned int anded_words[NWORDS]; 24147static void add_to_ored_words (long double x) 24148{ 24149 memory_long_double m; 24150 size_t i; 24151 /* Clear it first, in case 24152 sizeof (long double) < sizeof (memory_long_double). */ 24153 memset (&m, 0, sizeof (memory_long_double)); 24154 m.value = x; 24155 for (i = 0; i < NWORDS; i++) 24156 { 24157 ored_words[i] |= m.word[i]; 24158 anded_words[i] &= m.word[i]; 24159 } 24160} 24161int main () 24162{ 24163 size_t j; 24164 FILE *fp = fopen ("conftest.out", "w"); 24165 if (fp == NULL) 24166 return 1; 24167 for (j = 0; j < NWORDS; j++) 24168 anded_words[j] = ~ (unsigned int) 0; 24169 add_to_ored_words (0.25L); 24170 add_to_ored_words (0.5L); 24171 add_to_ored_words (1.0L); 24172 add_to_ored_words (2.0L); 24173 add_to_ored_words (4.0L); 24174 /* Remove bits that are common (e.g. if representation of the first mantissa 24175 bit is explicit). */ 24176 for (j = 0; j < NWORDS; j++) 24177 ored_words[j] &= ~anded_words[j]; 24178 /* Now find the nonzero word. */ 24179 for (j = 0; j < NWORDS; j++) 24180 if (ored_words[j] != 0) 24181 break; 24182 if (j < NWORDS) 24183 { 24184 size_t i; 24185 for (i = j + 1; i < NWORDS; i++) 24186 if (ored_words[i] != 0) 24187 { 24188 fprintf (fp, "unknown"); 24189 return (fclose (fp) != 0); 24190 } 24191 for (i = 0; ; i++) 24192 if ((ored_words[j] >> i) & 1) 24193 { 24194 fprintf (fp, "word %d bit %d", (int) j, (int) i); 24195 return (fclose (fp) != 0); 24196 } 24197 } 24198 fprintf (fp, "unknown"); 24199 return (fclose (fp) != 0); 24200} 24201 24202_ACEOF 24203if ac_fn_c_try_run "$LINENO"; then : 24204 gl_cv_cc_long_double_expbit0=`cat conftest.out` 24205else 24206 gl_cv_cc_long_double_expbit0="unknown" 24207fi 24208rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 24209 conftest.$ac_objext conftest.beam conftest.$ac_ext 24210fi 24211 24212 rm -f conftest.out 24213 24214fi 24215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_expbit0" >&5 24216$as_echo "$gl_cv_cc_long_double_expbit0" >&6; } 24217 case "$gl_cv_cc_long_double_expbit0" in 24218 word*bit*) 24219 word=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word //' -e 's/ bit.*//'` 24220 bit=`echo "$gl_cv_cc_long_double_expbit0" | sed -e 's/word.*bit //'` 24221 24222cat >>confdefs.h <<_ACEOF 24223#define LDBL_EXPBIT0_WORD $word 24224_ACEOF 24225 24226 24227cat >>confdefs.h <<_ACEOF 24228#define LDBL_EXPBIT0_BIT $bit 24229_ACEOF 24230 24231 ;; 24232 esac 24233 24234 24235 24236 fi 24237 24238 24239 24240 24241 24242 ac_fn_c_check_decl "$LINENO" "iswblank" "ac_cv_have_decl_iswblank" " 24243/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 24244 <wchar.h>. 24245 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included 24246 before <wchar.h>. */ 24247#include <stddef.h> 24248#include <stdio.h> 24249#include <time.h> 24250#include <wchar.h> 24251#include <wctype.h> 24252 24253" 24254if test "x$ac_cv_have_decl_iswblank" = xyes; then : 24255 ac_have_decl=1 24256else 24257 ac_have_decl=0 24258fi 24259 24260cat >>confdefs.h <<_ACEOF 24261#define HAVE_DECL_ISWBLANK $ac_have_decl 24262_ACEOF 24263 24264 if test $ac_cv_func_iswblank = no; then 24265 HAVE_ISWBLANK=0 24266 if test $ac_cv_have_decl_iswblank = yes; then 24267 REPLACE_ISWBLANK=1 24268 fi 24269 fi 24270 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then 24271 : 24272 else 24273 if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then 24274 : 24275 fi 24276 fi 24277 24278 24279 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then 24280 : 24281 else 24282 if test $HAVE_ISWBLANK = 0 || test $REPLACE_ISWBLANK = 1; then 24283 24284 24285 24286 24287 24288 24289 24290 24291 gl_LIBOBJS="$gl_LIBOBJS iswblank.$ac_objext" 24292 24293 fi 24294 fi 24295 24296 24297 24298 24299 24300 GNULIB_ISWBLANK=1 24301 24302 24303 24304 24305 24306$as_echo "#define GNULIB_TEST_ISWBLANK 1" >>confdefs.h 24307 24308 24309 24310 # You need to invoke gt_JAVACOMP yourself, possibly with arguments. 24311 ac_config_files="$ac_config_files javacomp.sh:build-aux/javacomp.sh.in" 24312 24313 # You need to invoke gt_JAVAEXEC yourself, possibly with arguments. 24314 ac_config_files="$ac_config_files javaexec.sh:build-aux/javaexec.sh.in" 24315 24316 24317 24318 24319 LDEXP_LIBM= 24320 if test $gl_cv_func_ldexp_no_libm = no; then 24321 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp() can be used with libm" >&5 24322$as_echo_n "checking whether ldexp() can be used with libm... " >&6; } 24323if ${gl_cv_func_ldexp_in_libm+:} false; then : 24324 $as_echo_n "(cached) " >&6 24325else 24326 24327 save_LIBS="$LIBS" 24328 LIBS="$LIBS -lm" 24329 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24330/* end confdefs.h. */ 24331#ifndef __NO_MATH_INLINES 24332 # define __NO_MATH_INLINES 1 /* for glibc */ 24333 #endif 24334 #include <math.h> 24335 double (*funcptr) (double, int) = ldexp; 24336 double x; 24337int 24338main () 24339{ 24340return ldexp (x, -1) > 0; 24341 ; 24342 return 0; 24343} 24344_ACEOF 24345if ac_fn_c_try_link "$LINENO"; then : 24346 gl_cv_func_ldexp_in_libm=yes 24347else 24348 gl_cv_func_ldexp_in_libm=no 24349fi 24350rm -f core conftest.err conftest.$ac_objext \ 24351 conftest$ac_exeext conftest.$ac_ext 24352 LIBS="$save_LIBS" 24353 24354fi 24355{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_in_libm" >&5 24356$as_echo "$gl_cv_func_ldexp_in_libm" >&6; } 24357 if test $gl_cv_func_ldexp_in_libm = yes; then 24358 LDEXP_LIBM=-lm 24359 fi 24360 fi 24361 24362 24363 24364 24365 24366 24367 24368 24369 ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h> 24370" 24371if test "x$ac_cv_have_decl_ldexpl" = xyes; then : 24372 24373else 24374 HAVE_DECL_LDEXPL=0 24375fi 24376 24377 24378 LDEXPL_LIBM= 24379 if test $HAVE_DECL_LDEXPL = 1; then 24380 24381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5 24382$as_echo_n "checking whether ldexpl() can be used without linking with libm... " >&6; } 24383if ${gl_cv_func_ldexpl_no_libm+:} false; then : 24384 $as_echo_n "(cached) " >&6 24385else 24386 24387 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24388/* end confdefs.h. */ 24389#include <math.h> 24390 long double x; 24391int 24392main () 24393{ 24394return ldexpl (x, -1) > 0; 24395 ; 24396 return 0; 24397} 24398_ACEOF 24399if ac_fn_c_try_link "$LINENO"; then : 24400 gl_cv_func_ldexpl_no_libm=yes 24401else 24402 gl_cv_func_ldexpl_no_libm=no 24403fi 24404rm -f core conftest.err conftest.$ac_objext \ 24405 conftest$ac_exeext conftest.$ac_ext 24406 24407fi 24408{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5 24409$as_echo "$gl_cv_func_ldexpl_no_libm" >&6; } 24410 24411 if test $gl_cv_func_ldexpl_no_libm = no; then 24412 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used with libm" >&5 24413$as_echo_n "checking whether ldexpl() can be used with libm... " >&6; } 24414if ${gl_cv_func_ldexpl_in_libm+:} false; then : 24415 $as_echo_n "(cached) " >&6 24416else 24417 24418 save_LIBS="$LIBS" 24419 LIBS="$LIBS -lm" 24420 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24421/* end confdefs.h. */ 24422#include <math.h> 24423 long double x; 24424int 24425main () 24426{ 24427return ldexpl (x, -1) > 0; 24428 ; 24429 return 0; 24430} 24431_ACEOF 24432if ac_fn_c_try_link "$LINENO"; then : 24433 gl_cv_func_ldexpl_in_libm=yes 24434else 24435 gl_cv_func_ldexpl_in_libm=no 24436fi 24437rm -f core conftest.err conftest.$ac_objext \ 24438 conftest$ac_exeext conftest.$ac_ext 24439 LIBS="$save_LIBS" 24440 24441fi 24442{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_in_libm" >&5 24443$as_echo "$gl_cv_func_ldexpl_in_libm" >&6; } 24444 if test $gl_cv_func_ldexpl_in_libm = yes; then 24445 LDEXPL_LIBM=-lm 24446 fi 24447 fi 24448 if test $gl_cv_func_ldexpl_no_libm = yes \ 24449 || test $gl_cv_func_ldexpl_in_libm = yes; then 24450 save_LIBS="$LIBS" 24451 LIBS="$LIBS $LDEXPL_LIBM" 24452 24453 24454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5 24455$as_echo_n "checking whether ldexpl works... " >&6; } 24456if ${gl_cv_func_ldexpl_works+:} false; then : 24457 $as_echo_n "(cached) " >&6 24458else 24459 24460 if test "$cross_compiling" = yes; then : 24461 24462 case "$host_os" in 24463 aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no";; 24464 *) gl_cv_func_ldexpl_works="guessing yes";; 24465 esac 24466 24467else 24468 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24469/* end confdefs.h. */ 24470 24471#include <math.h> 24472extern 24473#ifdef __cplusplus 24474"C" 24475#endif 24476long double ldexpl (long double, int); 24477int main() 24478{ 24479 int result = 0; 24480 { 24481 volatile long double x = 1.0; 24482 volatile long double y = ldexpl (x, -1); 24483 if (y != 0.5L) 24484 result |= 1; 24485 } 24486 { 24487 volatile long double x = 1.73205L; 24488 volatile long double y = ldexpl (x, 0); 24489 if (y != x) 24490 result |= 2; 24491 } 24492 return result; 24493} 24494_ACEOF 24495if ac_fn_c_try_run "$LINENO"; then : 24496 gl_cv_func_ldexpl_works=yes 24497else 24498 gl_cv_func_ldexpl_works=no 24499fi 24500rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 24501 conftest.$ac_objext conftest.beam conftest.$ac_ext 24502fi 24503 24504 24505fi 24506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5 24507$as_echo "$gl_cv_func_ldexpl_works" >&6; } 24508 24509 LIBS="$save_LIBS" 24510 case "$gl_cv_func_ldexpl_works" in 24511 *yes) gl_func_ldexpl=yes ;; 24512 *) gl_func_ldexpl=no; REPLACE_LDEXPL=1 ;; 24513 esac 24514 else 24515 gl_func_ldexpl=no 24516 fi 24517 if test $gl_func_ldexpl = yes; then 24518 24519$as_echo "#define HAVE_LDEXPL 1" >>confdefs.h 24520 24521 fi 24522 fi 24523 if test $HAVE_DECL_LDEXPL = 0 || test $gl_func_ldexpl = no; then 24524 if test $HAVE_SAME_LONG_DOUBLE_AS_DOUBLE = 1; then 24525 24526 LDEXPL_LIBM="$LDEXP_LIBM" 24527 else 24528 LDEXPL_LIBM="$ISNANL_LIBM" 24529 fi 24530 fi 24531 24532 24533 if test $HAVE_DECL_LDEXPL = 0 || test $gl_func_ldexpl = no; then 24534 24535 24536 24537 24538 24539 24540 24541 24542 gl_LIBOBJS="$gl_LIBOBJS ldexpl.$ac_objext" 24543 24544 fi 24545 24546 24547 24548 24549 24550 GNULIB_LDEXPL=1 24551 24552 24553 24554 24555 24556$as_echo "#define GNULIB_TEST_LDEXPL 1" >>confdefs.h 24557 24558 24559 24560 24561 24562 24563 24564 24565 24566 24567 24568 LOCALCHARSET_TESTS_ENVIRONMENT="CHARSETALIASDIR=\"\$(abs_top_builddir)/$gl_source_base\"" 24569 24570 24571 24572 if test "$gl_threads_api" = posix; then 24573 # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the 24574 # pthread_rwlock_* functions. 24575 ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h> 24576" 24577if test "x$ac_cv_type_pthread_rwlock_t" = xyes; then : 24578 24579$as_echo "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h 24580 24581fi 24582 24583 # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. 24584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24585/* end confdefs.h. */ 24586 24587 #include <pthread.h> 24588int 24589main () 24590{ 24591 24592#if __FreeBSD__ == 4 24593error "No, in FreeBSD 4.0 recursive mutexes actually don't work." 24594#else 24595int x = (int)PTHREAD_MUTEX_RECURSIVE; 24596return !x; 24597#endif 24598 24599 ; 24600 return 0; 24601} 24602_ACEOF 24603if ac_fn_c_try_compile "$LINENO"; then : 24604 24605$as_echo "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h 24606 24607fi 24608rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24609 fi 24610 : 24611 24612 24613 24614 24615 24616 for ac_header in stdlib.h 24617do : 24618 ac_fn_c_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" 24619if test "x$ac_cv_header_stdlib_h" = xyes; then : 24620 cat >>confdefs.h <<_ACEOF 24621#define HAVE_STDLIB_H 1 24622_ACEOF 24623 24624fi 24625 24626done 24627 24628 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 24629$as_echo_n "checking for GNU libc compatible malloc... " >&6; } 24630if ${ac_cv_func_malloc_0_nonnull+:} false; then : 24631 $as_echo_n "(cached) " >&6 24632else 24633 if test "$cross_compiling" = yes; then : 24634 case "$host_os" in 24635 # Guess yes on platforms where we know the result. 24636 *-gnu* | freebsd* | netbsd* | openbsd* \ 24637 | hpux* | solaris* | cygwin* | mingw*) 24638 ac_cv_func_malloc_0_nonnull=yes ;; 24639 # If we don't know, assume the worst. 24640 *) ac_cv_func_malloc_0_nonnull=no ;; 24641 esac 24642 24643else 24644 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24645/* end confdefs.h. */ 24646#if defined STDC_HEADERS || defined HAVE_STDLIB_H 24647 # include <stdlib.h> 24648 #else 24649 char *malloc (); 24650 #endif 24651 24652int 24653main () 24654{ 24655return ! malloc (0); 24656 ; 24657 return 0; 24658} 24659 24660_ACEOF 24661if ac_fn_c_try_run "$LINENO"; then : 24662 ac_cv_func_malloc_0_nonnull=yes 24663else 24664 ac_cv_func_malloc_0_nonnull=no 24665fi 24666rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 24667 conftest.$ac_objext conftest.beam conftest.$ac_ext 24668fi 24669 24670 24671fi 24672{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 24673$as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } 24674 if test $ac_cv_func_malloc_0_nonnull = yes; then : 24675 24676$as_echo "#define HAVE_MALLOC_GNU 1" >>confdefs.h 24677 24678else 24679 $as_echo "#define HAVE_MALLOC_GNU 0" >>confdefs.h 24680 24681 REPLACE_MALLOC=1 24682 24683fi 24684 24685 24686 if test $REPLACE_MALLOC = 1; then 24687 24688 24689 24690 24691 24692 24693 24694 24695 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" 24696 24697 fi 24698 24699 24700cat >>confdefs.h <<_ACEOF 24701#define GNULIB_MALLOC_GNU 1 24702_ACEOF 24703 24704 24705 24706 24707 24708 if test $gl_cv_func_malloc_posix = yes; then 24709 24710$as_echo "#define HAVE_MALLOC_POSIX 1" >>confdefs.h 24711 24712 else 24713 REPLACE_MALLOC=1 24714 fi 24715 24716 if test $REPLACE_MALLOC = 1; then 24717 24718 24719 24720 24721 24722 24723 24724 24725 gl_LIBOBJS="$gl_LIBOBJS malloc.$ac_objext" 24726 24727 fi 24728 24729 24730 24731 24732 24733 GNULIB_MALLOC_POSIX=1 24734 24735 24736 24737 24738 24739$as_echo "#define GNULIB_TEST_MALLOC_POSIX 1" >>confdefs.h 24740 24741 24742 24743 24744 24745 24746 24747 24748 24749 24750 24751 24752 24753 24754 if test $gl_cv_have_include_next = yes; then 24755 gl_cv_next_math_h='<'math.h'>' 24756 else 24757 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <math.h>" >&5 24758$as_echo_n "checking absolute name of <math.h>... " >&6; } 24759if ${gl_cv_next_math_h+:} false; then : 24760 $as_echo_n "(cached) " >&6 24761else 24762 24763 if test $ac_cv_header_math_h = yes; then 24764 24765 24766 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24767/* end confdefs.h. */ 24768#include <math.h> 24769 24770_ACEOF 24771 case "$host_os" in 24772 aix*) gl_absname_cpp="$ac_cpp -C" ;; 24773 *) gl_absname_cpp="$ac_cpp" ;; 24774 esac 24775 24776 case "$host_os" in 24777 mingw*) 24778 gl_dirsep_regex='[/\\]' 24779 ;; 24780 *) 24781 gl_dirsep_regex='\/' 24782 ;; 24783 esac 24784 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 24785 24786 gl_header_literal_regex=`echo 'math.h' \ 24787 | sed -e "$gl_make_literal_regex_sed"` 24788 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 24789 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 24790 s|^/[^/]|//&| 24791 p 24792 q 24793 }' 24794 gl_cv_next_math_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 24795 sed -n "$gl_absolute_header_sed"`'"' 24796 else 24797 gl_cv_next_math_h='<'math.h'>' 24798 fi 24799 24800 24801fi 24802{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_math_h" >&5 24803$as_echo "$gl_cv_next_math_h" >&6; } 24804 fi 24805 NEXT_MATH_H=$gl_cv_next_math_h 24806 24807 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 24808 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 24809 gl_next_as_first_directive='<'math.h'>' 24810 else 24811 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 24812 gl_next_as_first_directive=$gl_cv_next_math_h 24813 fi 24814 NEXT_AS_FIRST_DIRECTIVE_MATH_H=$gl_next_as_first_directive 24815 24816 24817 24818 24819 24820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NAN macro works" >&5 24821$as_echo_n "checking whether NAN macro works... " >&6; } 24822if ${gl_cv_header_math_nan_works+:} false; then : 24823 $as_echo_n "(cached) " >&6 24824else 24825 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24826/* end confdefs.h. */ 24827#include <math.h> 24828int 24829main () 24830{ 24831/* Solaris 10 has a broken definition of NAN. Other platforms 24832 fail to provide NAN, or provide it only in C99 mode; this 24833 test only needs to fail when NAN is provided but wrong. */ 24834 float f = 1.0f; 24835#ifdef NAN 24836 f = NAN; 24837#endif 24838 return f == 0; 24839 ; 24840 return 0; 24841} 24842_ACEOF 24843if ac_fn_c_try_compile "$LINENO"; then : 24844 gl_cv_header_math_nan_works=yes 24845else 24846 gl_cv_header_math_nan_works=no 24847fi 24848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24849fi 24850{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_nan_works" >&5 24851$as_echo "$gl_cv_header_math_nan_works" >&6; } 24852 if test $gl_cv_header_math_nan_works = no; then 24853 REPLACE_NAN=1 24854 fi 24855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether HUGE_VAL works" >&5 24856$as_echo_n "checking whether HUGE_VAL works... " >&6; } 24857if ${gl_cv_header_math_huge_val_works+:} false; then : 24858 $as_echo_n "(cached) " >&6 24859else 24860 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24861/* end confdefs.h. */ 24862#include <math.h> 24863int 24864main () 24865{ 24866/* Solaris 10 has a broken definition of HUGE_VAL. */ 24867 double d = HUGE_VAL; 24868 return d == 0; 24869 ; 24870 return 0; 24871} 24872_ACEOF 24873if ac_fn_c_try_compile "$LINENO"; then : 24874 gl_cv_header_math_huge_val_works=yes 24875else 24876 gl_cv_header_math_huge_val_works=no 24877fi 24878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24879fi 24880{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_math_huge_val_works" >&5 24881$as_echo "$gl_cv_header_math_huge_val_works" >&6; } 24882 if test $gl_cv_header_math_huge_val_works = no; then 24883 REPLACE_HUGE_VAL=1 24884 fi 24885 24886 24887 for gl_func in acosf acosl asinf asinl atanf atanl cbrt cbrtf cbrtl ceilf ceill copysign copysignf copysignl cosf cosl coshf expf expl exp2 exp2f exp2l expm1 expm1f expm1l fabsf fabsl floorf floorl fma fmaf fmal fmod fmodf fmodl frexpf frexpl hypotf hypotl ilogb ilogbf ilogbl ldexpf ldexpl log logf logl log10 log10f log10l log1p log1pf log1pl log2 log2f log2l logb logbf logbl modf modff modfl powf remainder remainderf remainderl rint rintf rintl round roundf roundl sinf sinl sinhf sqrtf sqrtl tanf tanl tanhf trunc truncf truncl; do 24888 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` 24889 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 24890$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } 24891if eval \${$as_gl_Symbol+:} false; then : 24892 $as_echo_n "(cached) " >&6 24893else 24894 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24895/* end confdefs.h. */ 24896#include <math.h> 24897int 24898main () 24899{ 24900#undef $gl_func 24901 (void) $gl_func; 24902 ; 24903 return 0; 24904} 24905_ACEOF 24906if ac_fn_c_try_compile "$LINENO"; then : 24907 eval "$as_gl_Symbol=yes" 24908else 24909 eval "$as_gl_Symbol=no" 24910fi 24911rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 24912fi 24913eval ac_res=\$$as_gl_Symbol 24914 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 24915$as_echo "$ac_res" >&6; } 24916 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : 24917 cat >>confdefs.h <<_ACEOF 24918#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 24919_ACEOF 24920 24921 eval ac_cv_have_decl_$gl_func=yes 24922fi 24923 done 24924 24925 24926 24927 24928 24929 24930 24931 24932 24933 24934 24935 24936 24937 24938 24939 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then 24940 24941 24942 24943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 24944$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } 24945if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : 24946 $as_echo_n "(cached) " >&6 24947else 24948 24949 case "$host_os" in 24950 # Guess no on AIX and OSF/1. 24951 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; 24952 # Guess yes otherwise. 24953 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; 24954 esac 24955 if test $LOCALE_JA != none; then 24956 if test "$cross_compiling" = yes; then : 24957 : 24958else 24959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 24960/* end confdefs.h. */ 24961 24962#include <locale.h> 24963#include <string.h> 24964/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 24965 <wchar.h>. 24966 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 24967 included before <wchar.h>. */ 24968#include <stddef.h> 24969#include <stdio.h> 24970#include <time.h> 24971#include <wchar.h> 24972int main () 24973{ 24974 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) 24975 { 24976 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ 24977 mbstate_t state; 24978 wchar_t wc; 24979 24980 memset (&state, '\0', sizeof (mbstate_t)); 24981 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) 24982 if (mbsinit (&state)) 24983 return 1; 24984 } 24985 return 0; 24986} 24987_ACEOF 24988if ac_fn_c_try_run "$LINENO"; then : 24989 gl_cv_func_mbrtowc_incomplete_state=yes 24990else 24991 gl_cv_func_mbrtowc_incomplete_state=no 24992fi 24993rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 24994 conftest.$ac_objext conftest.beam conftest.$ac_ext 24995fi 24996 24997 fi 24998 24999fi 25000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 25001$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } 25002 25003 25004 25005 25006 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 25007$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } 25008if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : 25009 $as_echo_n "(cached) " >&6 25010else 25011 25012 case "$host_os" in 25013 # Guess no on Solaris 8. 25014 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; 25015 # Guess yes otherwise. 25016 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; 25017 esac 25018 if test $LOCALE_ZH_CN != none; then 25019 if test "$cross_compiling" = yes; then : 25020 : 25021else 25022 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25023/* end confdefs.h. */ 25024 25025#include <locale.h> 25026#include <stdlib.h> 25027#include <string.h> 25028/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 25029 <wchar.h>. 25030 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 25031 included before <wchar.h>. */ 25032#include <stddef.h> 25033#include <stdio.h> 25034#include <time.h> 25035#include <wchar.h> 25036int main () 25037{ 25038 /* This fails on Solaris 8: 25039 mbrtowc returns 2, and sets wc to 0x00F0. 25040 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ 25041 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) 25042 { 25043 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ 25044 mbstate_t state; 25045 wchar_t wc; 25046 25047 memset (&state, '\0', sizeof (mbstate_t)); 25048 if (mbrtowc (&wc, input + 3, 6, &state) != 4 25049 && mbtowc (&wc, input + 3, 6) == 4) 25050 return 1; 25051 } 25052 return 0; 25053} 25054_ACEOF 25055if ac_fn_c_try_run "$LINENO"; then : 25056 gl_cv_func_mbrtowc_sanitycheck=yes 25057else 25058 gl_cv_func_mbrtowc_sanitycheck=no 25059fi 25060rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 25061 conftest.$ac_objext conftest.beam conftest.$ac_ext 25062fi 25063 25064 fi 25065 25066fi 25067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 25068$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } 25069 25070 REPLACE_MBSTATE_T=0 25071 case "$gl_cv_func_mbrtowc_incomplete_state" in 25072 *yes) ;; 25073 *) REPLACE_MBSTATE_T=1 ;; 25074 esac 25075 case "$gl_cv_func_mbrtowc_sanitycheck" in 25076 *yes) ;; 25077 *) REPLACE_MBSTATE_T=1 ;; 25078 esac 25079 else 25080 REPLACE_MBSTATE_T=1 25081 fi 25082 25083 25084 25085 if test $ac_cv_func_mbrtowc = no; then 25086 HAVE_MBRTOWC=0 25087 ac_fn_c_check_decl "$LINENO" "mbrtowc" "ac_cv_have_decl_mbrtowc" " 25088/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 25089 <wchar.h>. 25090 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 25091 included before <wchar.h>. */ 25092#include <stddef.h> 25093#include <stdio.h> 25094#include <time.h> 25095#include <wchar.h> 25096 25097" 25098if test "x$ac_cv_have_decl_mbrtowc" = xyes; then : 25099 ac_have_decl=1 25100else 25101 ac_have_decl=0 25102fi 25103 25104cat >>confdefs.h <<_ACEOF 25105#define HAVE_DECL_MBRTOWC $ac_have_decl 25106_ACEOF 25107 25108 if test $ac_cv_have_decl_mbrtowc = yes; then 25109 REPLACE_MBRTOWC=1 25110 fi 25111 else 25112 if test $REPLACE_MBSTATE_T = 1; then 25113 REPLACE_MBRTOWC=1 25114 else 25115 25116 25117 25118 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL pwc argument" >&5 25119$as_echo_n "checking whether mbrtowc handles a NULL pwc argument... " >&6; } 25120if ${gl_cv_func_mbrtowc_null_arg1+:} false; then : 25121 $as_echo_n "(cached) " >&6 25122else 25123 25124 case "$host_os" in 25125 # Guess no on Solaris. 25126 solaris*) gl_cv_func_mbrtowc_null_arg1="guessing no" ;; 25127 # Guess yes otherwise. 25128 *) gl_cv_func_mbrtowc_null_arg1="guessing yes" ;; 25129 esac 25130 if test $LOCALE_FR_UTF8 != none; then 25131 if test "$cross_compiling" = yes; then : 25132 : 25133else 25134 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25135/* end confdefs.h. */ 25136 25137#include <locale.h> 25138#include <stdlib.h> 25139#include <string.h> 25140/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 25141 <wchar.h>. 25142 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 25143 included before <wchar.h>. */ 25144#include <stddef.h> 25145#include <stdio.h> 25146#include <time.h> 25147#include <wchar.h> 25148int main () 25149{ 25150 int result = 0; 25151 25152 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) 25153 { 25154 char input[] = "\303\237er"; 25155 mbstate_t state; 25156 wchar_t wc; 25157 size_t ret; 25158 25159 memset (&state, '\0', sizeof (mbstate_t)); 25160 wc = (wchar_t) 0xBADFACE; 25161 ret = mbrtowc (&wc, input, 5, &state); 25162 if (ret != 2) 25163 result |= 1; 25164 if (!mbsinit (&state)) 25165 result |= 2; 25166 25167 memset (&state, '\0', sizeof (mbstate_t)); 25168 ret = mbrtowc (NULL, input, 5, &state); 25169 if (ret != 2) /* Solaris 7 fails here: ret is -1. */ 25170 result |= 4; 25171 if (!mbsinit (&state)) 25172 result |= 8; 25173 } 25174 return result; 25175} 25176_ACEOF 25177if ac_fn_c_try_run "$LINENO"; then : 25178 gl_cv_func_mbrtowc_null_arg1=yes 25179else 25180 gl_cv_func_mbrtowc_null_arg1=no 25181fi 25182rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 25183 conftest.$ac_objext conftest.beam conftest.$ac_ext 25184fi 25185 25186 fi 25187 25188fi 25189{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg1" >&5 25190$as_echo "$gl_cv_func_mbrtowc_null_arg1" >&6; } 25191 25192 25193 25194 25195 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles a NULL string argument" >&5 25196$as_echo_n "checking whether mbrtowc handles a NULL string argument... " >&6; } 25197if ${gl_cv_func_mbrtowc_null_arg2+:} false; then : 25198 $as_echo_n "(cached) " >&6 25199else 25200 25201 case "$host_os" in 25202 # Guess no on OSF/1. 25203 osf*) gl_cv_func_mbrtowc_null_arg2="guessing no" ;; 25204 # Guess yes otherwise. 25205 *) gl_cv_func_mbrtowc_null_arg2="guessing yes" ;; 25206 esac 25207 if test $LOCALE_FR_UTF8 != none; then 25208 if test "$cross_compiling" = yes; then : 25209 : 25210else 25211 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25212/* end confdefs.h. */ 25213 25214#include <locale.h> 25215#include <string.h> 25216/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 25217 <wchar.h>. 25218 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 25219 included before <wchar.h>. */ 25220#include <stddef.h> 25221#include <stdio.h> 25222#include <time.h> 25223#include <wchar.h> 25224int main () 25225{ 25226 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) 25227 { 25228 mbstate_t state; 25229 wchar_t wc; 25230 int ret; 25231 25232 memset (&state, '\0', sizeof (mbstate_t)); 25233 wc = (wchar_t) 0xBADFACE; 25234 mbrtowc (&wc, NULL, 5, &state); 25235 /* Check that wc was not modified. */ 25236 if (wc != (wchar_t) 0xBADFACE) 25237 return 1; 25238 } 25239 return 0; 25240} 25241_ACEOF 25242if ac_fn_c_try_run "$LINENO"; then : 25243 gl_cv_func_mbrtowc_null_arg2=yes 25244else 25245 gl_cv_func_mbrtowc_null_arg2=no 25246fi 25247rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 25248 conftest.$ac_objext conftest.beam conftest.$ac_ext 25249fi 25250 25251 fi 25252 25253fi 25254{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_null_arg2" >&5 25255$as_echo "$gl_cv_func_mbrtowc_null_arg2" >&6; } 25256 25257 25258 25259 25260 25261 25262 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc has a correct return value" >&5 25263$as_echo_n "checking whether mbrtowc has a correct return value... " >&6; } 25264if ${gl_cv_func_mbrtowc_retval+:} false; then : 25265 $as_echo_n "(cached) " >&6 25266else 25267 25268 case "$host_os" in 25269 # Guess no on HP-UX, Solaris, native Windows. 25270 hpux* | solaris* | mingw*) gl_cv_func_mbrtowc_retval="guessing no" ;; 25271 # Guess yes otherwise. 25272 *) gl_cv_func_mbrtowc_retval="guessing yes" ;; 25273 esac 25274 if test $LOCALE_FR_UTF8 != none || test $LOCALE_JA != none \ 25275 || { case "$host_os" in mingw*) true;; *) false;; esac; }; then 25276 if test "$cross_compiling" = yes; then : 25277 : 25278else 25279 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25280/* end confdefs.h. */ 25281 25282#include <locale.h> 25283#include <string.h> 25284/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 25285 <wchar.h>. 25286 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 25287 included before <wchar.h>. */ 25288#include <stddef.h> 25289#include <stdio.h> 25290#include <time.h> 25291#include <wchar.h> 25292int main () 25293{ 25294 int result = 0; 25295 int found_some_locale = 0; 25296 /* This fails on Solaris. */ 25297 if (setlocale (LC_ALL, "$LOCALE_FR_UTF8") != NULL) 25298 { 25299 char input[] = "B\303\274\303\237er"; /* "Büßer" */ 25300 mbstate_t state; 25301 wchar_t wc; 25302 25303 memset (&state, '\0', sizeof (mbstate_t)); 25304 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) 25305 { 25306 input[1] = '\0'; 25307 if (mbrtowc (&wc, input + 2, 5, &state) != 1) 25308 result |= 1; 25309 } 25310 found_some_locale = 1; 25311 } 25312 /* This fails on HP-UX 11.11. */ 25313 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) 25314 { 25315 char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ 25316 mbstate_t state; 25317 wchar_t wc; 25318 25319 memset (&state, '\0', sizeof (mbstate_t)); 25320 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) 25321 { 25322 input[1] = '\0'; 25323 if (mbrtowc (&wc, input + 2, 5, &state) != 2) 25324 result |= 2; 25325 } 25326 found_some_locale = 1; 25327 } 25328 /* This fails on native Windows. */ 25329 if (setlocale (LC_ALL, "Japanese_Japan.932") != NULL) 25330 { 25331 char input[] = "<\223\372\226\173\214\352>"; /* "<日本語>" */ 25332 mbstate_t state; 25333 wchar_t wc; 25334 25335 memset (&state, '\0', sizeof (mbstate_t)); 25336 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) 25337 { 25338 input[3] = '\0'; 25339 if (mbrtowc (&wc, input + 4, 4, &state) != 1) 25340 result |= 4; 25341 } 25342 found_some_locale = 1; 25343 } 25344 if (setlocale (LC_ALL, "Chinese_Taiwan.950") != NULL) 25345 { 25346 char input[] = "<\244\351\245\273\273\171>"; /* "<日本語>" */ 25347 mbstate_t state; 25348 wchar_t wc; 25349 25350 memset (&state, '\0', sizeof (mbstate_t)); 25351 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) 25352 { 25353 input[3] = '\0'; 25354 if (mbrtowc (&wc, input + 4, 4, &state) != 1) 25355 result |= 8; 25356 } 25357 found_some_locale = 1; 25358 } 25359 if (setlocale (LC_ALL, "Chinese_China.936") != NULL) 25360 { 25361 char input[] = "<\310\325\261\276\325\132>"; /* "<日本語>" */ 25362 mbstate_t state; 25363 wchar_t wc; 25364 25365 memset (&state, '\0', sizeof (mbstate_t)); 25366 if (mbrtowc (&wc, input + 3, 1, &state) == (size_t)(-2)) 25367 { 25368 input[3] = '\0'; 25369 if (mbrtowc (&wc, input + 4, 4, &state) != 1) 25370 result |= 16; 25371 } 25372 found_some_locale = 1; 25373 } 25374 return (found_some_locale ? result : 77); 25375} 25376_ACEOF 25377if ac_fn_c_try_run "$LINENO"; then : 25378 gl_cv_func_mbrtowc_retval=yes 25379else 25380 if test $? != 77; then 25381 gl_cv_func_mbrtowc_retval=no 25382 fi 25383 25384fi 25385rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 25386 conftest.$ac_objext conftest.beam conftest.$ac_ext 25387fi 25388 25389 fi 25390 25391fi 25392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_retval" >&5 25393$as_echo "$gl_cv_func_mbrtowc_retval" >&6; } 25394 25395 25396 25397 25398 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc returns 0 when parsing a NUL character" >&5 25399$as_echo_n "checking whether mbrtowc returns 0 when parsing a NUL character... " >&6; } 25400if ${gl_cv_func_mbrtowc_nul_retval+:} false; then : 25401 $as_echo_n "(cached) " >&6 25402else 25403 25404 case "$host_os" in 25405 # Guess no on Solaris 8 and 9. 25406 solaris2.[89]) gl_cv_func_mbrtowc_nul_retval="guessing no" ;; 25407 # Guess yes otherwise. 25408 *) gl_cv_func_mbrtowc_nul_retval="guessing yes" ;; 25409 esac 25410 if test $LOCALE_ZH_CN != none; then 25411 if test "$cross_compiling" = yes; then : 25412 : 25413else 25414 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25415/* end confdefs.h. */ 25416 25417#include <locale.h> 25418#include <string.h> 25419/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 25420 <wchar.h>. 25421 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 25422 included before <wchar.h>. */ 25423#include <stddef.h> 25424#include <stdio.h> 25425#include <time.h> 25426#include <wchar.h> 25427int main () 25428{ 25429 /* This fails on Solaris 8 and 9. */ 25430 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) 25431 { 25432 mbstate_t state; 25433 wchar_t wc; 25434 25435 memset (&state, '\0', sizeof (mbstate_t)); 25436 if (mbrtowc (&wc, "", 1, &state) != 0) 25437 return 1; 25438 } 25439 return 0; 25440} 25441_ACEOF 25442if ac_fn_c_try_run "$LINENO"; then : 25443 gl_cv_func_mbrtowc_nul_retval=yes 25444else 25445 gl_cv_func_mbrtowc_nul_retval=no 25446fi 25447rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 25448 conftest.$ac_objext conftest.beam conftest.$ac_ext 25449fi 25450 25451 fi 25452 25453fi 25454{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_nul_retval" >&5 25455$as_echo "$gl_cv_func_mbrtowc_nul_retval" >&6; } 25456 25457 case "$gl_cv_func_mbrtowc_null_arg1" in 25458 *yes) ;; 25459 *) 25460$as_echo "#define MBRTOWC_NULL_ARG1_BUG 1" >>confdefs.h 25461 25462 REPLACE_MBRTOWC=1 25463 ;; 25464 esac 25465 case "$gl_cv_func_mbrtowc_null_arg2" in 25466 *yes) ;; 25467 *) 25468$as_echo "#define MBRTOWC_NULL_ARG2_BUG 1" >>confdefs.h 25469 25470 REPLACE_MBRTOWC=1 25471 ;; 25472 esac 25473 case "$gl_cv_func_mbrtowc_retval" in 25474 *yes) ;; 25475 *) 25476$as_echo "#define MBRTOWC_RETVAL_BUG 1" >>confdefs.h 25477 25478 REPLACE_MBRTOWC=1 25479 ;; 25480 esac 25481 case "$gl_cv_func_mbrtowc_nul_retval" in 25482 *yes) ;; 25483 *) 25484$as_echo "#define MBRTOWC_NUL_RETVAL_BUG 1" >>confdefs.h 25485 25486 REPLACE_MBRTOWC=1 25487 ;; 25488 esac 25489 fi 25490 fi 25491 25492 if test $HAVE_MBRTOWC = 0 || test $REPLACE_MBRTOWC = 1; then 25493 25494 25495 25496 25497 25498 25499 25500 25501 gl_LIBOBJS="$gl_LIBOBJS mbrtowc.$ac_objext" 25502 25503 25504 : 25505 25506 fi 25507 25508 25509 25510 25511 25512 GNULIB_MBRTOWC=1 25513 25514 25515 25516 25517 25518$as_echo "#define GNULIB_TEST_MBRTOWC 1" >>confdefs.h 25519 25520 25521 25522 25523 25524 25525 25526 25527 GNULIB_MBSCHR=1 25528 25529 25530 25531 25532 25533$as_echo "#define GNULIB_TEST_MBSCHR 1" >>confdefs.h 25534 25535 25536 25537 25538 25539 25540 25541 25542 25543 25544 25545 25546 25547 25548 if test $ac_cv_func_mbsinit = yes && test $ac_cv_func_mbrtowc = yes; then 25549 25550 25551 25552 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc handles incomplete characters" >&5 25553$as_echo_n "checking whether mbrtowc handles incomplete characters... " >&6; } 25554if ${gl_cv_func_mbrtowc_incomplete_state+:} false; then : 25555 $as_echo_n "(cached) " >&6 25556else 25557 25558 case "$host_os" in 25559 # Guess no on AIX and OSF/1. 25560 aix* | osf*) gl_cv_func_mbrtowc_incomplete_state="guessing no" ;; 25561 # Guess yes otherwise. 25562 *) gl_cv_func_mbrtowc_incomplete_state="guessing yes" ;; 25563 esac 25564 if test $LOCALE_JA != none; then 25565 if test "$cross_compiling" = yes; then : 25566 : 25567else 25568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25569/* end confdefs.h. */ 25570 25571#include <locale.h> 25572#include <string.h> 25573/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 25574 <wchar.h>. 25575 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 25576 included before <wchar.h>. */ 25577#include <stddef.h> 25578#include <stdio.h> 25579#include <time.h> 25580#include <wchar.h> 25581int main () 25582{ 25583 if (setlocale (LC_ALL, "$LOCALE_JA") != NULL) 25584 { 25585 const char input[] = "B\217\253\344\217\251\316er"; /* "Büßer" */ 25586 mbstate_t state; 25587 wchar_t wc; 25588 25589 memset (&state, '\0', sizeof (mbstate_t)); 25590 if (mbrtowc (&wc, input + 1, 1, &state) == (size_t)(-2)) 25591 if (mbsinit (&state)) 25592 return 1; 25593 } 25594 return 0; 25595} 25596_ACEOF 25597if ac_fn_c_try_run "$LINENO"; then : 25598 gl_cv_func_mbrtowc_incomplete_state=yes 25599else 25600 gl_cv_func_mbrtowc_incomplete_state=no 25601fi 25602rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 25603 conftest.$ac_objext conftest.beam conftest.$ac_ext 25604fi 25605 25606 fi 25607 25608fi 25609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_incomplete_state" >&5 25610$as_echo "$gl_cv_func_mbrtowc_incomplete_state" >&6; } 25611 25612 25613 25614 25615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc works as well as mbtowc" >&5 25616$as_echo_n "checking whether mbrtowc works as well as mbtowc... " >&6; } 25617if ${gl_cv_func_mbrtowc_sanitycheck+:} false; then : 25618 $as_echo_n "(cached) " >&6 25619else 25620 25621 case "$host_os" in 25622 # Guess no on Solaris 8. 25623 solaris2.8) gl_cv_func_mbrtowc_sanitycheck="guessing no" ;; 25624 # Guess yes otherwise. 25625 *) gl_cv_func_mbrtowc_sanitycheck="guessing yes" ;; 25626 esac 25627 if test $LOCALE_ZH_CN != none; then 25628 if test "$cross_compiling" = yes; then : 25629 : 25630else 25631 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25632/* end confdefs.h. */ 25633 25634#include <locale.h> 25635#include <stdlib.h> 25636#include <string.h> 25637/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 25638 <wchar.h>. 25639 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 25640 included before <wchar.h>. */ 25641#include <stddef.h> 25642#include <stdio.h> 25643#include <time.h> 25644#include <wchar.h> 25645int main () 25646{ 25647 /* This fails on Solaris 8: 25648 mbrtowc returns 2, and sets wc to 0x00F0. 25649 mbtowc returns 4 (correct) and sets wc to 0x5EDC. */ 25650 if (setlocale (LC_ALL, "$LOCALE_ZH_CN") != NULL) 25651 { 25652 char input[] = "B\250\271\201\060\211\070er"; /* "Büßer" */ 25653 mbstate_t state; 25654 wchar_t wc; 25655 25656 memset (&state, '\0', sizeof (mbstate_t)); 25657 if (mbrtowc (&wc, input + 3, 6, &state) != 4 25658 && mbtowc (&wc, input + 3, 6) == 4) 25659 return 1; 25660 } 25661 return 0; 25662} 25663_ACEOF 25664if ac_fn_c_try_run "$LINENO"; then : 25665 gl_cv_func_mbrtowc_sanitycheck=yes 25666else 25667 gl_cv_func_mbrtowc_sanitycheck=no 25668fi 25669rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 25670 conftest.$ac_objext conftest.beam conftest.$ac_ext 25671fi 25672 25673 fi 25674 25675fi 25676{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_mbrtowc_sanitycheck" >&5 25677$as_echo "$gl_cv_func_mbrtowc_sanitycheck" >&6; } 25678 25679 REPLACE_MBSTATE_T=0 25680 case "$gl_cv_func_mbrtowc_incomplete_state" in 25681 *yes) ;; 25682 *) REPLACE_MBSTATE_T=1 ;; 25683 esac 25684 case "$gl_cv_func_mbrtowc_sanitycheck" in 25685 *yes) ;; 25686 *) REPLACE_MBSTATE_T=1 ;; 25687 esac 25688 else 25689 REPLACE_MBSTATE_T=1 25690 fi 25691 25692 25693 25694 if test $ac_cv_func_mbsinit = no; then 25695 HAVE_MBSINIT=0 25696 ac_fn_c_check_decl "$LINENO" "mbsinit" "ac_cv_have_decl_mbsinit" " 25697/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 25698 <wchar.h>. 25699 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 25700 included before <wchar.h>. */ 25701#include <stddef.h> 25702#include <stdio.h> 25703#include <time.h> 25704#include <wchar.h> 25705 25706" 25707if test "x$ac_cv_have_decl_mbsinit" = xyes; then : 25708 ac_have_decl=1 25709else 25710 ac_have_decl=0 25711fi 25712 25713cat >>confdefs.h <<_ACEOF 25714#define HAVE_DECL_MBSINIT $ac_have_decl 25715_ACEOF 25716 25717 if test $ac_cv_have_decl_mbsinit = yes; then 25718 REPLACE_MBSINIT=1 25719 fi 25720 else 25721 if test $REPLACE_MBSTATE_T = 1; then 25722 REPLACE_MBSINIT=1 25723 else 25724 case "$host_os" in 25725 mingw*) REPLACE_MBSINIT=1 ;; 25726 esac 25727 fi 25728 fi 25729 25730 if test $HAVE_MBSINIT = 0 || test $REPLACE_MBSINIT = 1; then 25731 25732 25733 25734 25735 25736 25737 25738 25739 gl_LIBOBJS="$gl_LIBOBJS mbsinit.$ac_objext" 25740 25741 25742 : 25743 25744 fi 25745 25746 25747 25748 25749 25750 GNULIB_MBSINIT=1 25751 25752 25753 25754 25755 25756$as_echo "#define GNULIB_TEST_MBSINIT 1" >>confdefs.h 25757 25758 25759 25760 25761 25762 25763 25764 25765 GNULIB_MBSRCHR=1 25766 25767 25768 25769 25770 25771$as_echo "#define GNULIB_TEST_MBSRCHR 1" >>confdefs.h 25772 25773 25774 25775 25776 25777 25778 25779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether mbswidth is declared in <wchar.h>" >&5 25780$as_echo_n "checking whether mbswidth is declared in <wchar.h>... " >&6; } 25781if ${ac_cv_have_decl_mbswidth+:} false; then : 25782 $as_echo_n "(cached) " >&6 25783else 25784 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25785/* end confdefs.h. */ 25786 25787/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 25788 <wchar.h>. 25789 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included 25790 before <wchar.h>. */ 25791#include <stddef.h> 25792#include <stdio.h> 25793#include <time.h> 25794#include <wchar.h> 25795 25796int 25797main () 25798{ 25799 25800 char *p = (char *) mbswidth; 25801 return !p; 25802 25803 ; 25804 return 0; 25805} 25806_ACEOF 25807if ac_fn_c_try_compile "$LINENO"; then : 25808 ac_cv_have_decl_mbswidth=yes 25809else 25810 ac_cv_have_decl_mbswidth=no 25811fi 25812rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 25813fi 25814{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_decl_mbswidth" >&5 25815$as_echo "$ac_cv_have_decl_mbswidth" >&6; } 25816 if test $ac_cv_have_decl_mbswidth = yes; then 25817 ac_val=1 25818 else 25819 ac_val=0 25820 fi 25821 25822cat >>confdefs.h <<_ACEOF 25823#define HAVE_DECL_MBSWIDTH_IN_WCHAR_H $ac_val 25824_ACEOF 25825 25826 25827 25828 25829 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for mbstate_t" >&5 25830$as_echo_n "checking for mbstate_t... " >&6; } 25831if ${ac_cv_type_mbstate_t+:} false; then : 25832 $as_echo_n "(cached) " >&6 25833else 25834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25835/* end confdefs.h. */ 25836$ac_includes_default 25837/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 25838 <wchar.h>. 25839 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 25840 included before <wchar.h>. */ 25841#include <stddef.h> 25842#include <stdio.h> 25843#include <time.h> 25844#include <wchar.h> 25845int 25846main () 25847{ 25848mbstate_t x; return sizeof x; 25849 ; 25850 return 0; 25851} 25852_ACEOF 25853if ac_fn_c_try_compile "$LINENO"; then : 25854 ac_cv_type_mbstate_t=yes 25855else 25856 ac_cv_type_mbstate_t=no 25857fi 25858rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 25859fi 25860{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_mbstate_t" >&5 25861$as_echo "$ac_cv_type_mbstate_t" >&6; } 25862 if test $ac_cv_type_mbstate_t = yes; then 25863 25864$as_echo "#define HAVE_MBSTATE_T 1" >>confdefs.h 25865 25866 else 25867 25868$as_echo "#define mbstate_t int" >>confdefs.h 25869 25870 fi 25871 25872 25873 25874 25875 : 25876 25877 25878 if test $HAVE_MEMCHR = 0 || test $REPLACE_MEMCHR = 1; then 25879 25880 25881 25882 25883 25884 25885 25886 25887 gl_LIBOBJS="$gl_LIBOBJS memchr.$ac_objext" 25888 25889 25890 for ac_header in bp-sym.h 25891do : 25892 ac_fn_c_check_header_mongrel "$LINENO" "bp-sym.h" "ac_cv_header_bp_sym_h" "$ac_includes_default" 25893if test "x$ac_cv_header_bp_sym_h" = xyes; then : 25894 cat >>confdefs.h <<_ACEOF 25895#define HAVE_BP_SYM_H 1 25896_ACEOF 25897 25898fi 25899 25900done 25901 25902 25903 fi 25904 25905 25906 25907 25908 25909 GNULIB_MEMCHR=1 25910 25911 25912 25913 25914 25915$as_echo "#define GNULIB_TEST_MEMCHR 1" >>confdefs.h 25916 25917 25918 25919 25920 25921 if test $ac_cv_func__set_invalid_parameter_handler = yes; then 25922 HAVE_MSVC_INVALID_PARAMETER_HANDLER=1 25923 25924$as_echo "#define HAVE_MSVC_INVALID_PARAMETER_HANDLER 1" >>confdefs.h 25925 25926 else 25927 HAVE_MSVC_INVALID_PARAMETER_HANDLER=0 25928 fi 25929 25930 25931 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then 25932 25933 25934 25935 25936 25937 25938 25939 25940 gl_LIBOBJS="$gl_LIBOBJS msvc-inval.$ac_objext" 25941 25942 fi 25943 25944 25945 25946 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then 25947 25948 25949 25950 25951 25952 25953 25954 25955 gl_LIBOBJS="$gl_LIBOBJS msvc-nothrow.$ac_objext" 25956 25957 fi 25958 25959 25960 25961 25962 25963 25964 25965 25966 25967 25968 25969 25970 25971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for obstacks" >&5 25972$as_echo_n "checking for obstacks... " >&6; } 25973if ${ac_cv_func_obstack+:} false; then : 25974 $as_echo_n "(cached) " >&6 25975else 25976 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 25977/* end confdefs.h. */ 25978$ac_includes_default 25979 #include "obstack.h" 25980int 25981main () 25982{ 25983struct obstack mem; 25984 #define obstack_chunk_alloc malloc 25985 #define obstack_chunk_free free 25986 obstack_init (&mem); 25987 obstack_free (&mem, 0); 25988 ; 25989 return 0; 25990} 25991_ACEOF 25992if ac_fn_c_try_link "$LINENO"; then : 25993 ac_cv_func_obstack=yes 25994else 25995 ac_cv_func_obstack=no 25996fi 25997rm -f core conftest.err conftest.$ac_objext \ 25998 conftest$ac_exeext conftest.$ac_ext 25999fi 26000{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_obstack" >&5 26001$as_echo "$ac_cv_func_obstack" >&6; } 26002if test $ac_cv_func_obstack = yes; then 26003 26004$as_echo "#define HAVE_OBSTACK 1" >>confdefs.h 26005 26006else 26007 26008 26009 26010 26011 26012 26013 26014 26015 gl_LIBOBJS="$gl_LIBOBJS obstack.$ac_objext" 26016 26017fi 26018 26019 26020 26021 26022 26023 26024 if test $ac_cv_func_obstack_printf = no ; then 26025 26026 26027 if test $ac_cv_func_obstack_printf = yes; then 26028 REPLACE_OBSTACK_PRINTF=1 26029 fi 26030 26031 fi 26032 26033 26034 26035 if test $ac_cv_have_decl_obstack_printf = no; then 26036 HAVE_DECL_OBSTACK_PRINTF=0 26037 fi 26038 26039 26040 if test $ac_cv_func_obstack_printf = no || test $REPLACE_OBSTACK_PRINTF = 1; then 26041 26042 26043 26044 26045 26046 26047 26048 26049 gl_LIBOBJS="$gl_LIBOBJS obstack_printf.$ac_objext" 26050 26051 fi 26052 26053 26054 26055 26056 26057 GNULIB_OBSTACK_PRINTF=1 26058 26059 26060 26061 26062 26063$as_echo "#define GNULIB_TEST_OBSTACK_PRINTF 1" >>confdefs.h 26064 26065 26066 26067 26068 26069 case "$host_os" in 26070 mingw* | pw*) 26071 REPLACE_OPEN=1 26072 ;; 26073 *) 26074 26075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether open recognizes a trailing slash" >&5 26076$as_echo_n "checking whether open recognizes a trailing slash... " >&6; } 26077if ${gl_cv_func_open_slash+:} false; then : 26078 $as_echo_n "(cached) " >&6 26079else 26080 # Assume that if we have lstat, we can also check symlinks. 26081 if test $ac_cv_func_lstat = yes; then 26082 touch conftest.tmp 26083 ln -s conftest.tmp conftest.lnk 26084 fi 26085 if test "$cross_compiling" = yes; then : 26086 26087 case "$host_os" in 26088 freebsd* | aix* | hpux* | solaris2.[0-9] | solaris2.[0-9].*) 26089 gl_cv_func_open_slash="guessing no" ;; 26090 *) 26091 gl_cv_func_open_slash="guessing yes" ;; 26092 esac 26093 26094else 26095 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26096/* end confdefs.h. */ 26097 26098#include <fcntl.h> 26099#if HAVE_UNISTD_H 26100# include <unistd.h> 26101#endif 26102int main () 26103{ 26104 int result = 0; 26105#if HAVE_LSTAT 26106 if (open ("conftest.lnk/", O_RDONLY) != -1) 26107 result |= 1; 26108#endif 26109 if (open ("conftest.sl/", O_CREAT, 0600) >= 0) 26110 result |= 2; 26111 return result; 26112} 26113_ACEOF 26114if ac_fn_c_try_run "$LINENO"; then : 26115 gl_cv_func_open_slash=yes 26116else 26117 gl_cv_func_open_slash=no 26118fi 26119rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 26120 conftest.$ac_objext conftest.beam conftest.$ac_ext 26121fi 26122 26123 rm -f conftest.sl conftest.tmp conftest.lnk 26124 26125fi 26126{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_open_slash" >&5 26127$as_echo "$gl_cv_func_open_slash" >&6; } 26128 case "$gl_cv_func_open_slash" in 26129 *no) 26130 26131$as_echo "#define OPEN_TRAILING_SLASH_BUG 1" >>confdefs.h 26132 26133 REPLACE_OPEN=1 26134 ;; 26135 esac 26136 ;; 26137 esac 26138 26139 26140 26141 if test $REPLACE_OPEN = 1; then 26142 26143 26144 26145 26146 26147 26148 26149 26150 gl_LIBOBJS="$gl_LIBOBJS open.$ac_objext" 26151 26152 26153 26154 : 26155 26156 fi 26157 26158 26159 26160 26161 26162 GNULIB_OPEN=1 26163 26164 26165 26166 26167 26168$as_echo "#define GNULIB_TEST_OPEN 1" >>confdefs.h 26169 26170 26171 26172 26173 26174 26175 26176 26177 26178 26179 26180 if test "$ERRNO_H:$REPLACE_STRERROR_0" != :0; then 26181 REPLACE_PERROR=1 26182 fi 26183 case ${gl_cv_func_strerror_r_works-unset} in 26184 unset|*yes) 26185 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether perror matches strerror" >&5 26186$as_echo_n "checking whether perror matches strerror... " >&6; } 26187if ${gl_cv_func_perror_works+:} false; then : 26188 $as_echo_n "(cached) " >&6 26189else 26190 if test "$cross_compiling" = yes; then : 26191 gl_cv_func_perror_works="guessing no" 26192 26193else 26194 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26195/* end confdefs.h. */ 26196#include <errno.h> 26197 #include <stdio.h> 26198 #include <stdlib.h> 26199 #include <string.h> 26200 26201int 26202main () 26203{ 26204char *str = strerror (-1); 26205 if (!getenv("CONFTEST_OUTPUT")) return 0; 26206 if (!str) str = ""; 26207 puts (str); 26208 errno = -1; 26209 perror (""); 26210 return 0; 26211 26212 ; 26213 return 0; 26214} 26215_ACEOF 26216if ac_fn_c_try_run "$LINENO"; then : 26217 if CONFTEST_OUTPUT=1 ./conftest$EXEEXT >conftest.txt1 2>conftest.txt2 \ 26218 && cmp conftest.txt1 conftest.txt2 >/dev/null; then 26219 gl_cv_func_perror_works=yes 26220 else 26221 gl_cv_func_perror_works=no 26222 fi 26223 rm -rf conftest.txt1 conftest.txt2 26224else 26225 gl_cv_func_perror_works=no 26226fi 26227rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 26228 conftest.$ac_objext conftest.beam conftest.$ac_ext 26229fi 26230 26231 26232fi 26233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_perror_works" >&5 26234$as_echo "$gl_cv_func_perror_works" >&6; } 26235 if test "$gl_cv_func_perror_works" != yes; then 26236 REPLACE_PERROR=1 26237 fi 26238 ;; 26239 *) 26240 REPLACE_PERROR=1 26241 ;; 26242 esac 26243 26244 if test $REPLACE_PERROR = 1; then 26245 26246 26247 26248 26249 26250 26251 26252 26253 gl_LIBOBJS="$gl_LIBOBJS perror.$ac_objext" 26254 26255 fi 26256 26257 26258 26259 26260 26261 GNULIB_PERROR=1 26262 26263 26264 26265 26266 26267$as_echo "#define GNULIB_TEST_PERROR 1" >>confdefs.h 26268 26269 26270 26271 26272 26273 26274 26275 26276 26277 if test $ac_cv_func_pipe2 != yes; then 26278 HAVE_PIPE2=0 26279 fi 26280 26281 26282 26283 26284 26285 26286 GNULIB_PIPE2=1 26287 26288 26289 26290 26291 26292$as_echo "#define GNULIB_TEST_PIPE2 1" >>confdefs.h 26293 26294 26295 26296 26297 26298cat >>confdefs.h <<_ACEOF 26299#define GNULIB_PIPE2_SAFER 1 26300_ACEOF 26301 26302 26303 26304 26305 26306 26307 26308 26309 if test $REPLACE_POSIX_SPAWN = 1; then 26310 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1 26311 else 26312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addclose works" >&5 26313$as_echo_n "checking whether posix_spawn_file_actions_addclose works... " >&6; } 26314if ${gl_cv_func_posix_spawn_file_actions_addclose_works+:} false; then : 26315 $as_echo_n "(cached) " >&6 26316else 26317 if test "$cross_compiling" = yes; then : 26318 # Guess no on Solaris, yes otherwise. 26319 case "$host_os" in 26320 solaris*) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing no";; 26321 *) gl_cv_func_posix_spawn_file_actions_addclose_works="guessing yes";; 26322 esac 26323 26324else 26325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26326/* end confdefs.h. */ 26327 26328#include <spawn.h> 26329int main () 26330{ 26331 posix_spawn_file_actions_t actions; 26332 if (posix_spawn_file_actions_init (&actions) != 0) 26333 return 1; 26334 if (posix_spawn_file_actions_addclose (&actions, 10000000) == 0) 26335 return 2; 26336 return 0; 26337} 26338_ACEOF 26339if ac_fn_c_try_run "$LINENO"; then : 26340 gl_cv_func_posix_spawn_file_actions_addclose_works=yes 26341else 26342 gl_cv_func_posix_spawn_file_actions_addclose_works=no 26343fi 26344rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 26345 conftest.$ac_objext conftest.beam conftest.$ac_ext 26346fi 26347 26348 26349fi 26350{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addclose_works" >&5 26351$as_echo "$gl_cv_func_posix_spawn_file_actions_addclose_works" >&6; } 26352 case "$gl_cv_func_posix_spawn_file_actions_addclose_works" in 26353 *yes) ;; 26354 *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1 ;; 26355 esac 26356 fi 26357 26358 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE = 1; then 26359 26360 26361 26362 26363 26364 26365 26366 26367 gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addclose.$ac_objext" 26368 26369 fi 26370 26371 26372 26373 26374 26375 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE=1 26376 26377 26378 26379 26380 26381$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDCLOSE 1" >>confdefs.h 26382 26383 26384 26385 26386 26387 26388 26389 26390 26391 if test $REPLACE_POSIX_SPAWN = 1; then 26392 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1 26393 else 26394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_adddup2 works" >&5 26395$as_echo_n "checking whether posix_spawn_file_actions_adddup2 works... " >&6; } 26396if ${gl_cv_func_posix_spawn_file_actions_adddup2_works+:} false; then : 26397 $as_echo_n "(cached) " >&6 26398else 26399 if test "$cross_compiling" = yes; then : 26400 # Guess no on Solaris, yes otherwise. 26401 case "$host_os" in 26402 solaris*) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing no";; 26403 *) gl_cv_func_posix_spawn_file_actions_adddup2_works="guessing yes";; 26404 esac 26405 26406else 26407 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26408/* end confdefs.h. */ 26409 26410#include <spawn.h> 26411int main () 26412{ 26413 posix_spawn_file_actions_t actions; 26414 if (posix_spawn_file_actions_init (&actions) != 0) 26415 return 1; 26416 if (posix_spawn_file_actions_adddup2 (&actions, 10000000, 2) == 0) 26417 return 2; 26418 return 0; 26419} 26420_ACEOF 26421if ac_fn_c_try_run "$LINENO"; then : 26422 gl_cv_func_posix_spawn_file_actions_adddup2_works=yes 26423else 26424 gl_cv_func_posix_spawn_file_actions_adddup2_works=no 26425fi 26426rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 26427 conftest.$ac_objext conftest.beam conftest.$ac_ext 26428fi 26429 26430 26431fi 26432{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_adddup2_works" >&5 26433$as_echo "$gl_cv_func_posix_spawn_file_actions_adddup2_works" >&6; } 26434 case "$gl_cv_func_posix_spawn_file_actions_adddup2_works" in 26435 *yes) ;; 26436 *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1 ;; 26437 esac 26438 fi 26439 26440 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 = 1; then 26441 26442 26443 26444 26445 26446 26447 26448 26449 gl_LIBOBJS="$gl_LIBOBJS spawn_faction_adddup2.$ac_objext" 26450 26451 fi 26452 26453 26454 26455 26456 26457 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2=1 26458 26459 26460 26461 26462 26463$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDDUP2 1" >>confdefs.h 26464 26465 26466 26467 26468 26469 26470 26471 26472 26473 if test $REPLACE_POSIX_SPAWN = 1; then 26474 REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1 26475 else 26476 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether posix_spawn_file_actions_addopen works" >&5 26477$as_echo_n "checking whether posix_spawn_file_actions_addopen works... " >&6; } 26478if ${gl_cv_func_posix_spawn_file_actions_addopen_works+:} false; then : 26479 $as_echo_n "(cached) " >&6 26480else 26481 if test "$cross_compiling" = yes; then : 26482 # Guess no on Solaris, yes otherwise. 26483 case "$host_os" in 26484 solaris*) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing no";; 26485 *) gl_cv_func_posix_spawn_file_actions_addopen_works="guessing yes";; 26486 esac 26487 26488else 26489 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26490/* end confdefs.h. */ 26491 26492#include <spawn.h> 26493#include <fcntl.h> 26494int main () 26495{ 26496 posix_spawn_file_actions_t actions; 26497 if (posix_spawn_file_actions_init (&actions) != 0) 26498 return 1; 26499 if (posix_spawn_file_actions_addopen (&actions, 10000000, "foo", 0, O_RDONLY) 26500 == 0) 26501 return 2; 26502 return 0; 26503} 26504_ACEOF 26505if ac_fn_c_try_run "$LINENO"; then : 26506 gl_cv_func_posix_spawn_file_actions_addopen_works=yes 26507else 26508 gl_cv_func_posix_spawn_file_actions_addopen_works=no 26509fi 26510rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 26511 conftest.$ac_objext conftest.beam conftest.$ac_ext 26512fi 26513 26514 26515fi 26516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_posix_spawn_file_actions_addopen_works" >&5 26517$as_echo "$gl_cv_func_posix_spawn_file_actions_addopen_works" >&6; } 26518 case "$gl_cv_func_posix_spawn_file_actions_addopen_works" in 26519 *yes) ;; 26520 *) REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1 ;; 26521 esac 26522 fi 26523 26524 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN = 1; then 26525 26526 26527 26528 26529 26530 26531 26532 26533 gl_LIBOBJS="$gl_LIBOBJS spawn_faction_addopen.$ac_objext" 26534 26535 fi 26536 26537 26538 26539 26540 26541 GNULIB_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN=1 26542 26543 26544 26545 26546 26547$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_ADDOPEN 1" >>confdefs.h 26548 26549 26550 26551 26552 26553 26554 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then 26555 26556 26557 26558 26559 26560 26561 26562 26563 gl_LIBOBJS="$gl_LIBOBJS spawn_faction_destroy.$ac_objext" 26564 26565 fi 26566 26567 26568 26569 26570 26571 GNULIB_POSIX_SPAWN_FILE_ACTIONS_DESTROY=1 26572 26573 26574 26575 26576 26577$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_DESTROY 1" >>confdefs.h 26578 26579 26580 26581 26582 26583 26584 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then 26585 26586 26587 26588 26589 26590 26591 26592 26593 gl_LIBOBJS="$gl_LIBOBJS spawn_faction_init.$ac_objext" 26594 26595 fi 26596 26597 26598 26599 26600 26601 GNULIB_POSIX_SPAWN_FILE_ACTIONS_INIT=1 26602 26603 26604 26605 26606 26607$as_echo "#define GNULIB_TEST_POSIX_SPAWN_FILE_ACTIONS_INIT 1" >>confdefs.h 26608 26609 26610 26611 26612 26613 26614 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then 26615 26616 26617 26618 26619 26620 26621 26622 26623 gl_LIBOBJS="$gl_LIBOBJS spawnattr_destroy.$ac_objext" 26624 26625 fi 26626 26627 26628 26629 26630 26631 GNULIB_POSIX_SPAWNATTR_DESTROY=1 26632 26633 26634 26635 26636 26637$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_DESTROY 1" >>confdefs.h 26638 26639 26640 26641 26642 26643 26644 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then 26645 26646 26647 26648 26649 26650 26651 26652 26653 gl_LIBOBJS="$gl_LIBOBJS spawnattr_init.$ac_objext" 26654 26655 fi 26656 26657 26658 26659 26660 26661 GNULIB_POSIX_SPAWNATTR_INIT=1 26662 26663 26664 26665 26666 26667$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_INIT 1" >>confdefs.h 26668 26669 26670 26671 26672 26673 26674 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then 26675 26676 26677 26678 26679 26680 26681 26682 26683 gl_LIBOBJS="$gl_LIBOBJS spawnattr_setflags.$ac_objext" 26684 26685 fi 26686 26687 26688 26689 26690 26691 GNULIB_POSIX_SPAWNATTR_SETFLAGS=1 26692 26693 26694 26695 26696 26697$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETFLAGS 1" >>confdefs.h 26698 26699 26700 26701 26702 26703 26704 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then 26705 26706 26707 26708 26709 26710 26711 26712 26713 gl_LIBOBJS="$gl_LIBOBJS spawnattr_setsigmask.$ac_objext" 26714 26715 fi 26716 26717 26718 26719 26720 26721 GNULIB_POSIX_SPAWNATTR_SETSIGMASK=1 26722 26723 26724 26725 26726 26727$as_echo "#define GNULIB_TEST_POSIX_SPAWNATTR_SETSIGMASK 1" >>confdefs.h 26728 26729 26730 26731 26732 26733 26734 if test $HAVE_POSIX_SPAWN = 0 || test $REPLACE_POSIX_SPAWN = 1; then 26735 26736 26737 26738 26739 26740 26741 26742 26743 gl_LIBOBJS="$gl_LIBOBJS spawnp.$ac_objext" 26744 26745 26746 26747 26748 26749 26750 26751 26752 26753 gl_LIBOBJS="$gl_LIBOBJS spawni.$ac_objext" 26754 26755 26756 for ac_header in paths.h 26757do : 26758 ac_fn_c_check_header_mongrel "$LINENO" "paths.h" "ac_cv_header_paths_h" "$ac_includes_default" 26759if test "x$ac_cv_header_paths_h" = xyes; then : 26760 cat >>confdefs.h <<_ACEOF 26761#define HAVE_PATHS_H 1 26762_ACEOF 26763 26764fi 26765 26766done 26767 26768 for ac_func in confstr sched_setparam sched_setscheduler setegid seteuid vfork 26769do : 26770 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` 26771ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" 26772if eval test \"x\$"$as_ac_var"\" = x"yes"; then : 26773 cat >>confdefs.h <<_ACEOF 26774#define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 26775_ACEOF 26776 26777fi 26778done 26779 26780 26781 fi 26782 26783 26784 26785 26786 26787 GNULIB_POSIX_SPAWNP=1 26788 26789 26790 26791 26792 26793$as_echo "#define GNULIB_TEST_POSIX_SPAWNP 1" >>confdefs.h 26794 26795 26796 26797 26798 26799 if test $gl_cv_func_frexp_no_libm = yes; then 26800 26801 26802 26803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexp works" >&5 26804$as_echo_n "checking whether frexp works... " >&6; } 26805if ${gl_cv_func_frexp_works+:} false; then : 26806 $as_echo_n "(cached) " >&6 26807else 26808 26809 if test "$cross_compiling" = yes; then : 26810 case "$host_os" in 26811 netbsd* | irix* | mingw*) gl_cv_func_frexp_works="guessing no";; 26812 *) gl_cv_func_frexp_works="guessing yes";; 26813 esac 26814 26815else 26816 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26817/* end confdefs.h. */ 26818 26819#include <float.h> 26820#include <math.h> 26821#include <string.h> 26822#if HAVE_ALARM 26823# include <unistd.h> 26824#endif 26825/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. 26826 ICC 10.0 has a bug when optimizing the expression -zero. 26827 The expression -DBL_MIN * DBL_MIN does not work when cross-compiling 26828 to PowerPC on Mac OS X 10.5. */ 26829#if defined __hpux || defined __sgi || defined __ICC 26830static double 26831compute_minus_zero (void) 26832{ 26833 return -DBL_MIN * DBL_MIN; 26834} 26835# define minus_zero compute_minus_zero () 26836#else 26837double minus_zero = -0.0; 26838#endif 26839int main() 26840{ 26841 int result = 0; 26842 int i; 26843 volatile double x; 26844 double zero = 0.0; 26845#if HAVE_ALARM 26846 /* NeXTstep 3.3 frexp() runs into an endless loop when called on an infinite 26847 number. Let the test fail in this case. */ 26848 alarm (5); 26849#endif 26850 /* Test on denormalized numbers. */ 26851 for (i = 1, x = 1.0; i >= DBL_MIN_EXP; i--, x *= 0.5) 26852 ; 26853 if (x > 0.0) 26854 { 26855 int exp; 26856 double y = frexp (x, &exp); 26857 /* On machines with IEEE754 arithmetic: x = 1.11254e-308, exp = -1022. 26858 On NetBSD: y = 0.75. Correct: y = 0.5. */ 26859 if (y != 0.5) 26860 result |= 1; 26861 } 26862 /* Test on infinite numbers. */ 26863 x = 1.0 / zero; 26864 { 26865 int exp; 26866 double y = frexp (x, &exp); 26867 if (y != x) 26868 result |= 2; 26869 } 26870 /* Test on negative zero. */ 26871 x = minus_zero; 26872 { 26873 int exp; 26874 double y = frexp (x, &exp); 26875 if (memcmp (&y, &x, sizeof x)) 26876 result |= 4; 26877 } 26878 return result; 26879} 26880_ACEOF 26881if ac_fn_c_try_run "$LINENO"; then : 26882 gl_cv_func_frexp_works=yes 26883else 26884 gl_cv_func_frexp_works=no 26885fi 26886rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 26887 conftest.$ac_objext conftest.beam conftest.$ac_ext 26888fi 26889 26890 26891fi 26892{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexp_works" >&5 26893$as_echo "$gl_cv_func_frexp_works" >&6; } 26894 26895 case "$gl_cv_func_frexp_works" in 26896 *yes) 26897 26898$as_echo "#define HAVE_FREXP_IN_LIBC 1" >>confdefs.h 26899 26900 ;; 26901 esac 26902 fi 26903 26904 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexp can be used without linking with libm" >&5 26905$as_echo_n "checking whether ldexp can be used without linking with libm... " >&6; } 26906if ${gl_cv_func_ldexp_no_libm+:} false; then : 26907 $as_echo_n "(cached) " >&6 26908else 26909 26910 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26911/* end confdefs.h. */ 26912#include <math.h> 26913 double x; 26914 int y; 26915int 26916main () 26917{ 26918return ldexp (x, y) < 1; 26919 ; 26920 return 0; 26921} 26922_ACEOF 26923if ac_fn_c_try_link "$LINENO"; then : 26924 gl_cv_func_ldexp_no_libm=yes 26925else 26926 gl_cv_func_ldexp_no_libm=no 26927fi 26928rm -f core conftest.err conftest.$ac_objext \ 26929 conftest$ac_exeext conftest.$ac_ext 26930 26931fi 26932{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexp_no_libm" >&5 26933$as_echo "$gl_cv_func_ldexp_no_libm" >&6; } 26934 if test $gl_cv_func_ldexp_no_libm = yes; then 26935 26936$as_echo "#define HAVE_LDEXP_IN_LIBC 1" >>confdefs.h 26937 26938 fi 26939 26940 26941 26942 26943 26944 26945 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl() can be used without linking with libm" >&5 26946$as_echo_n "checking whether frexpl() can be used without linking with libm... " >&6; } 26947if ${gl_cv_func_frexpl_no_libm+:} false; then : 26948 $as_echo_n "(cached) " >&6 26949else 26950 26951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26952/* end confdefs.h. */ 26953#include <math.h> 26954 long double x; 26955int 26956main () 26957{ 26958int e; return frexpl (x, &e) > 0; 26959 ; 26960 return 0; 26961} 26962_ACEOF 26963if ac_fn_c_try_link "$LINENO"; then : 26964 gl_cv_func_frexpl_no_libm=yes 26965else 26966 gl_cv_func_frexpl_no_libm=no 26967fi 26968rm -f core conftest.err conftest.$ac_objext \ 26969 conftest$ac_exeext conftest.$ac_ext 26970 26971fi 26972{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_no_libm" >&5 26973$as_echo "$gl_cv_func_frexpl_no_libm" >&6; } 26974 26975 if test $gl_cv_func_frexpl_no_libm = yes; then 26976 26977 26978 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether frexpl works" >&5 26979$as_echo_n "checking whether frexpl works... " >&6; } 26980if ${gl_cv_func_frexpl_works+:} false; then : 26981 $as_echo_n "(cached) " >&6 26982else 26983 26984 if test "$cross_compiling" = yes; then : 26985 26986 case "$host_os" in 26987 aix | aix[3-6]* | beos* | darwin* | irix* | mingw* | pw*) 26988 gl_cv_func_frexpl_works="guessing no";; 26989 *) gl_cv_func_frexpl_works="guessing yes";; 26990 esac 26991 26992else 26993 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 26994/* end confdefs.h. */ 26995 26996#include <float.h> 26997#include <math.h> 26998/* Override the values of <float.h>, like done in float.in.h. */ 26999#if defined __i386__ && (defined __BEOS__ || defined __OpenBSD__) 27000# undef LDBL_MIN_EXP 27001# define LDBL_MIN_EXP (-16381) 27002#endif 27003#if defined __i386__ && defined __FreeBSD__ 27004# undef LDBL_MIN_EXP 27005# define LDBL_MIN_EXP (-16381) 27006#endif 27007#if (defined _ARCH_PPC || defined _POWER) && defined _AIX && (LDBL_MANT_DIG == 106) && defined __GNUC__ 27008# undef LDBL_MIN_EXP 27009# define LDBL_MIN_EXP DBL_MIN_EXP 27010#endif 27011#if defined __sgi && (LDBL_MANT_DIG >= 106) 27012# if defined __GNUC__ 27013# undef LDBL_MIN_EXP 27014# define LDBL_MIN_EXP DBL_MIN_EXP 27015# endif 27016#endif 27017extern 27018#ifdef __cplusplus 27019"C" 27020#endif 27021long double frexpl (long double, int *); 27022int main() 27023{ 27024 int result = 0; 27025 volatile long double x; 27026 /* Test on finite numbers that fails on AIX 5.1. */ 27027 x = 16.0L; 27028 { 27029 int exp = -9999; 27030 frexpl (x, &exp); 27031 if (exp != 5) 27032 result |= 1; 27033 } 27034 /* Test on finite numbers that fails on Mac OS X 10.4, because its frexpl 27035 function returns an invalid (incorrectly normalized) value: it returns 27036 y = { 0x3fe028f5, 0xc28f5c28, 0x3c9eb851, 0xeb851eb8 } 27037 but the correct result is 27038 0.505L = { 0x3fe028f5, 0xc28f5c29, 0xbc547ae1, 0x47ae1480 } */ 27039 x = 1.01L; 27040 { 27041 int exp = -9999; 27042 long double y = frexpl (x, &exp); 27043 if (!(exp == 1 && y == 0.505L)) 27044 result |= 2; 27045 } 27046 /* Test on large finite numbers. This fails on BeOS at i = 16322, while 27047 LDBL_MAX_EXP = 16384. 27048 In the loop end test, we test x against Infinity, rather than comparing 27049 i with LDBL_MAX_EXP, because BeOS <float.h> has a wrong LDBL_MAX_EXP. */ 27050 { 27051 int i; 27052 for (i = 1, x = 1.0L; x != x + x; i++, x *= 2.0L) 27053 { 27054 int exp = -9999; 27055 frexpl (x, &exp); 27056 if (exp != i) 27057 { 27058 result |= 4; 27059 break; 27060 } 27061 } 27062 } 27063 /* Test on denormalized numbers. */ 27064 { 27065 int i; 27066 for (i = 1, x = 1.0L; i >= LDBL_MIN_EXP; i--, x *= 0.5L) 27067 ; 27068 if (x > 0.0L) 27069 { 27070 int exp; 27071 long double y = frexpl (x, &exp); 27072 /* On machines with IEEE854 arithmetic: x = 1.68105e-4932, 27073 exp = -16382, y = 0.5. On Mac OS X 10.5: exp = -16384, y = 0.5. */ 27074 if (exp != LDBL_MIN_EXP - 1) 27075 result |= 8; 27076 } 27077 } 27078 /* Test on infinite numbers. */ 27079 x = 1.0L / 0.0L; 27080 { 27081 int exp; 27082 long double y = frexpl (x, &exp); 27083 if (y != x) 27084 result |= 16; 27085 } 27086 return result; 27087} 27088_ACEOF 27089if ac_fn_c_try_run "$LINENO"; then : 27090 gl_cv_func_frexpl_works=yes 27091else 27092 gl_cv_func_frexpl_works=no 27093fi 27094rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 27095 conftest.$ac_objext conftest.beam conftest.$ac_ext 27096fi 27097 27098 27099fi 27100{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_frexpl_works" >&5 27101$as_echo "$gl_cv_func_frexpl_works" >&6; } 27102 27103 case "$gl_cv_func_frexpl_works" in 27104 *yes) gl_func_frexpl_no_libm=yes ;; 27105 *) gl_func_frexpl_no_libm=no; REPLACE_FREXPL=1 ;; 27106 esac 27107 else 27108 gl_func_frexpl_no_libm=no 27109 REPLACE_FREXPL=1 27110 fi 27111 if test $gl_func_frexpl_no_libm = yes; then 27112 27113$as_echo "#define HAVE_FREXPL_IN_LIBC 1" >>confdefs.h 27114 27115 ac_fn_c_check_decl "$LINENO" "frexpl" "ac_cv_have_decl_frexpl" "#include <math.h> 27116" 27117if test "x$ac_cv_have_decl_frexpl" = xyes; then : 27118 27119else 27120 HAVE_DECL_FREXPL=0 27121fi 27122 27123 fi 27124 27125 27126 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl() can be used without linking with libm" >&5 27127$as_echo_n "checking whether ldexpl() can be used without linking with libm... " >&6; } 27128if ${gl_cv_func_ldexpl_no_libm+:} false; then : 27129 $as_echo_n "(cached) " >&6 27130else 27131 27132 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 27133/* end confdefs.h. */ 27134#include <math.h> 27135 long double x; 27136int 27137main () 27138{ 27139return ldexpl (x, -1) > 0; 27140 ; 27141 return 0; 27142} 27143_ACEOF 27144if ac_fn_c_try_link "$LINENO"; then : 27145 gl_cv_func_ldexpl_no_libm=yes 27146else 27147 gl_cv_func_ldexpl_no_libm=no 27148fi 27149rm -f core conftest.err conftest.$ac_objext \ 27150 conftest$ac_exeext conftest.$ac_ext 27151 27152fi 27153{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_no_libm" >&5 27154$as_echo "$gl_cv_func_ldexpl_no_libm" >&6; } 27155 27156 if test $gl_cv_func_ldexpl_no_libm = yes; then 27157 27158 27159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ldexpl works" >&5 27160$as_echo_n "checking whether ldexpl works... " >&6; } 27161if ${gl_cv_func_ldexpl_works+:} false; then : 27162 $as_echo_n "(cached) " >&6 27163else 27164 27165 if test "$cross_compiling" = yes; then : 27166 27167 case "$host_os" in 27168 aix | aix[3-6]*) gl_cv_func_ldexpl_works="guessing no";; 27169 *) gl_cv_func_ldexpl_works="guessing yes";; 27170 esac 27171 27172else 27173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 27174/* end confdefs.h. */ 27175 27176#include <math.h> 27177extern 27178#ifdef __cplusplus 27179"C" 27180#endif 27181long double ldexpl (long double, int); 27182int main() 27183{ 27184 int result = 0; 27185 { 27186 volatile long double x = 1.0; 27187 volatile long double y = ldexpl (x, -1); 27188 if (y != 0.5L) 27189 result |= 1; 27190 } 27191 { 27192 volatile long double x = 1.73205L; 27193 volatile long double y = ldexpl (x, 0); 27194 if (y != x) 27195 result |= 2; 27196 } 27197 return result; 27198} 27199_ACEOF 27200if ac_fn_c_try_run "$LINENO"; then : 27201 gl_cv_func_ldexpl_works=yes 27202else 27203 gl_cv_func_ldexpl_works=no 27204fi 27205rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 27206 conftest.$ac_objext conftest.beam conftest.$ac_ext 27207fi 27208 27209 27210fi 27211{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_ldexpl_works" >&5 27212$as_echo "$gl_cv_func_ldexpl_works" >&6; } 27213 27214 case "$gl_cv_func_ldexpl_works" in 27215 *yes) 27216 27217$as_echo "#define HAVE_LDEXPL_IN_LIBC 1" >>confdefs.h 27218 27219 ac_fn_c_check_decl "$LINENO" "ldexpl" "ac_cv_have_decl_ldexpl" "#include <math.h> 27220" 27221if test "x$ac_cv_have_decl_ldexpl" = xyes; then : 27222 27223else 27224 HAVE_DECL_LDEXPL=0 27225fi 27226 27227 ;; 27228 esac 27229 fi 27230 27231 27232 27233 if test $gl_cv_func_vfprintf_posix = no; then 27234 27235 27236 27237 27238 27239 27240 27241 27242 27243 27244 27245 gl_LIBOBJS="$gl_LIBOBJS printf.$ac_objext" 27246 27247 REPLACE_PRINTF=1 27248 27249$as_echo "#define REPLACE_PRINTF_POSIX 1" >>confdefs.h 27250 27251 : 27252 27253 fi 27254 27255 27256 27257 27258 27259 27260 GNULIB_PRINTF_POSIX=1 27261 27262 27263 27264 27265 27266$as_echo "#define GNULIB_TEST_PRINTF_POSIX 1" >>confdefs.h 27267 27268 27269 27270 27271 ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include <errno.h> 27272" 27273if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then : 27274 ac_have_decl=1 27275else 27276 ac_have_decl=0 27277fi 27278 27279cat >>confdefs.h <<_ACEOF 27280#define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl 27281_ACEOF 27282 27283 ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include <errno.h> 27284" 27285if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then : 27286 ac_have_decl=1 27287else 27288 ac_have_decl=0 27289fi 27290 27291cat >>confdefs.h <<_ACEOF 27292#define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl 27293_ACEOF 27294 27295 27296 : 27297 27298 27299 : 27300 27301 27302 27303 27304 27305 for ac_func in raise 27306do : 27307 ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise" 27308if test "x$ac_cv_func_raise" = xyes; then : 27309 cat >>confdefs.h <<_ACEOF 27310#define HAVE_RAISE 1 27311_ACEOF 27312 27313fi 27314done 27315 27316 if test $ac_cv_func_raise = no; then 27317 HAVE_RAISE=0 27318 else 27319 if test $HAVE_MSVC_INVALID_PARAMETER_HANDLER = 1; then 27320 REPLACE_RAISE=1 27321 fi 27322 27323 27324 27325 27326 if test $gl_cv_type_sigset_t = yes; then 27327 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask" 27328if test "x$ac_cv_func_sigprocmask" = xyes; then : 27329 gl_cv_func_sigprocmask=1 27330fi 27331 27332 fi 27333 if test -z "$gl_cv_func_sigprocmask"; then 27334 HAVE_POSIX_SIGNALBLOCKING=0 27335 fi 27336 27337 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then 27338 : 27339 fi 27340 27341 fi 27342 27343 if test $HAVE_RAISE = 0 || test $REPLACE_RAISE = 1; then 27344 27345 27346 27347 27348 27349 27350 27351 27352 gl_LIBOBJS="$gl_LIBOBJS raise.$ac_objext" 27353 27354 : 27355 fi 27356 27357 27358 27359 27360 27361 GNULIB_RAISE=1 27362 27363 27364 27365 27366 27367$as_echo "#define GNULIB_TEST_RAISE 1" >>confdefs.h 27368 27369 27370 27371 27372 27373 27374 27375 for ac_func in rawmemchr 27376do : 27377 ac_fn_c_check_func "$LINENO" "rawmemchr" "ac_cv_func_rawmemchr" 27378if test "x$ac_cv_func_rawmemchr" = xyes; then : 27379 cat >>confdefs.h <<_ACEOF 27380#define HAVE_RAWMEMCHR 1 27381_ACEOF 27382 27383fi 27384done 27385 27386 if test $ac_cv_func_rawmemchr = no; then 27387 HAVE_RAWMEMCHR=0 27388 fi 27389 27390 if test $HAVE_RAWMEMCHR = 0; then 27391 27392 27393 27394 27395 27396 27397 27398 27399 gl_LIBOBJS="$gl_LIBOBJS rawmemchr.$ac_objext" 27400 27401 : 27402 fi 27403 27404 27405 27406 27407 27408 GNULIB_RAWMEMCHR=1 27409 27410 27411 27412 27413 27414$as_echo "#define GNULIB_TEST_RAWMEMCHR 1" >>confdefs.h 27415 27416 27417 27418 27419 27420 27421 if test $gl_cv_func_malloc_posix = yes; then 27422 27423$as_echo "#define HAVE_REALLOC_POSIX 1" >>confdefs.h 27424 27425 else 27426 REPLACE_REALLOC=1 27427 fi 27428 27429 if test $REPLACE_REALLOC = 1; then 27430 27431 27432 27433 27434 27435 27436 27437 27438 gl_LIBOBJS="$gl_LIBOBJS realloc.$ac_objext" 27439 27440 fi 27441 27442 27443 27444 27445 27446 GNULIB_REALLOC_POSIX=1 27447 27448 27449 27450 27451 27452$as_echo "#define GNULIB_TEST_REALLOC_POSIX 1" >>confdefs.h 27453 27454 27455 27456 27457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 27458/* end confdefs.h. */ 27459 27460 #include <sched.h> 27461 struct sched_param a; 27462 int b[] = { SCHED_FIFO, SCHED_RR, SCHED_OTHER }; 27463 pid_t t1; 27464 27465int 27466main () 27467{ 27468 27469 ; 27470 return 0; 27471} 27472_ACEOF 27473if ac_fn_c_try_compile "$LINENO"; then : 27474 SCHED_H='' 27475else 27476 SCHED_H='sched.h' 27477 27478 27479 27480 27481 27482 27483 27484 27485 27486 27487 if test $gl_cv_have_include_next = yes; then 27488 gl_cv_next_sched_h='<'sched.h'>' 27489 else 27490 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sched.h>" >&5 27491$as_echo_n "checking absolute name of <sched.h>... " >&6; } 27492if ${gl_cv_next_sched_h+:} false; then : 27493 $as_echo_n "(cached) " >&6 27494else 27495 27496 if test $ac_cv_header_sched_h = yes; then 27497 27498 27499 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 27500/* end confdefs.h. */ 27501#include <sched.h> 27502 27503_ACEOF 27504 case "$host_os" in 27505 aix*) gl_absname_cpp="$ac_cpp -C" ;; 27506 *) gl_absname_cpp="$ac_cpp" ;; 27507 esac 27508 27509 case "$host_os" in 27510 mingw*) 27511 gl_dirsep_regex='[/\\]' 27512 ;; 27513 *) 27514 gl_dirsep_regex='\/' 27515 ;; 27516 esac 27517 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 27518 27519 gl_header_literal_regex=`echo 'sched.h' \ 27520 | sed -e "$gl_make_literal_regex_sed"` 27521 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 27522 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 27523 s|^/[^/]|//&| 27524 p 27525 q 27526 }' 27527 gl_cv_next_sched_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 27528 sed -n "$gl_absolute_header_sed"`'"' 27529 else 27530 gl_cv_next_sched_h='<'sched.h'>' 27531 fi 27532 27533 27534fi 27535{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sched_h" >&5 27536$as_echo "$gl_cv_next_sched_h" >&6; } 27537 fi 27538 NEXT_SCHED_H=$gl_cv_next_sched_h 27539 27540 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 27541 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 27542 gl_next_as_first_directive='<'sched.h'>' 27543 else 27544 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 27545 gl_next_as_first_directive=$gl_cv_next_sched_h 27546 fi 27547 NEXT_AS_FIRST_DIRECTIVE_SCHED_H=$gl_next_as_first_directive 27548 27549 27550 27551 27552 27553 if test $ac_cv_header_sched_h = yes; then 27554 HAVE_SCHED_H=1 27555 else 27556 HAVE_SCHED_H=0 27557 fi 27558 27559 27560 ac_fn_c_check_type "$LINENO" "struct sched_param" "ac_cv_type_struct_sched_param" "#include <sched.h> 27561" 27562if test "x$ac_cv_type_struct_sched_param" = xyes; then : 27563 HAVE_STRUCT_SCHED_PARAM=1 27564else 27565 HAVE_STRUCT_SCHED_PARAM=0 27566fi 27567 27568 27569 27570 27571 27572fi 27573rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 27574 27575 if test -n "$SCHED_H"; then 27576 GL_GENERATE_SCHED_H_TRUE= 27577 GL_GENERATE_SCHED_H_FALSE='#' 27578else 27579 GL_GENERATE_SCHED_H_TRUE='#' 27580 GL_GENERATE_SCHED_H_FALSE= 27581fi 27582 27583 27584 27585 27586 27587 if test $ac_cv_func_sigaction = yes; then 27588 ac_fn_c_check_member "$LINENO" "struct sigaction" "sa_sigaction" "ac_cv_member_struct_sigaction_sa_sigaction" "#include <signal.h> 27589" 27590if test "x$ac_cv_member_struct_sigaction_sa_sigaction" = xyes; then : 27591 27592cat >>confdefs.h <<_ACEOF 27593#define HAVE_STRUCT_SIGACTION_SA_SIGACTION 1 27594_ACEOF 27595 27596 27597fi 27598 27599 if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then 27600 HAVE_STRUCT_SIGACTION_SA_SIGACTION=0 27601 fi 27602 else 27603 HAVE_SIGACTION=0 27604 fi 27605 27606 if test $HAVE_SIGACTION = 0; then 27607 27608 27609 27610 27611 27612 27613 27614 27615 gl_LIBOBJS="$gl_LIBOBJS sigaction.$ac_objext" 27616 27617 27618 27619 27620 27621 27622 27623 ac_fn_c_check_type "$LINENO" "siginfo_t" "ac_cv_type_siginfo_t" " 27624#include <signal.h> 27625 27626" 27627if test "x$ac_cv_type_siginfo_t" = xyes; then : 27628 27629cat >>confdefs.h <<_ACEOF 27630#define HAVE_SIGINFO_T 1 27631_ACEOF 27632 27633 27634fi 27635 27636 if test $ac_cv_type_siginfo_t = no; then 27637 HAVE_SIGINFO_T=0 27638 fi 27639 27640 fi 27641 27642 27643 27644 27645 27646 GNULIB_SIGACTION=1 27647 27648 27649 27650 27651 27652$as_echo "#define GNULIB_TEST_SIGACTION 1" >>confdefs.h 27653 27654 27655 27656 27657 27658 27659 27660 27661 27662 27663 27664 27665 27666 27667 if test $gl_cv_have_include_next = yes; then 27668 gl_cv_next_signal_h='<'signal.h'>' 27669 else 27670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <signal.h>" >&5 27671$as_echo_n "checking absolute name of <signal.h>... " >&6; } 27672if ${gl_cv_next_signal_h+:} false; then : 27673 $as_echo_n "(cached) " >&6 27674else 27675 27676 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 27677/* end confdefs.h. */ 27678#include <signal.h> 27679 27680_ACEOF 27681 case "$host_os" in 27682 aix*) gl_absname_cpp="$ac_cpp -C" ;; 27683 *) gl_absname_cpp="$ac_cpp" ;; 27684 esac 27685 27686 case "$host_os" in 27687 mingw*) 27688 gl_dirsep_regex='[/\\]' 27689 ;; 27690 *) 27691 gl_dirsep_regex='\/' 27692 ;; 27693 esac 27694 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 27695 27696 gl_header_literal_regex=`echo 'signal.h' \ 27697 | sed -e "$gl_make_literal_regex_sed"` 27698 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 27699 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 27700 s|^/[^/]|//&| 27701 p 27702 q 27703 }' 27704 gl_cv_next_signal_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 27705 sed -n "$gl_absolute_header_sed"`'"' 27706 27707 27708fi 27709{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_signal_h" >&5 27710$as_echo "$gl_cv_next_signal_h" >&6; } 27711 fi 27712 NEXT_SIGNAL_H=$gl_cv_next_signal_h 27713 27714 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 27715 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 27716 gl_next_as_first_directive='<'signal.h'>' 27717 else 27718 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 27719 gl_next_as_first_directive=$gl_cv_next_signal_h 27720 fi 27721 NEXT_AS_FIRST_DIRECTIVE_SIGNAL_H=$gl_next_as_first_directive 27722 27723 27724 27725 27726 27727# AIX declares sig_atomic_t to already include volatile, and C89 compilers 27728# then choke on 'volatile sig_atomic_t'. C99 requires that it compile. 27729 ac_fn_c_check_type "$LINENO" "volatile sig_atomic_t" "ac_cv_type_volatile_sig_atomic_t" " 27730#include <signal.h> 27731 27732" 27733if test "x$ac_cv_type_volatile_sig_atomic_t" = xyes; then : 27734 27735else 27736 HAVE_TYPE_VOLATILE_SIG_ATOMIC_T=0 27737fi 27738 27739 27740 27741 27742 27743 27744 27745 ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" " 27746#include <signal.h> 27747 27748" 27749if test "x$ac_cv_type_sighandler_t" = xyes; then : 27750 27751else 27752 HAVE_SIGHANDLER_T=0 27753fi 27754 27755 27756 27757 for gl_func in pthread_sigmask sigaction sigaddset sigdelset sigemptyset sigfillset sigismember sigpending sigprocmask; do 27758 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` 27759 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 27760$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } 27761if eval \${$as_gl_Symbol+:} false; then : 27762 $as_echo_n "(cached) " >&6 27763else 27764 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 27765/* end confdefs.h. */ 27766#include <signal.h> 27767 27768int 27769main () 27770{ 27771#undef $gl_func 27772 (void) $gl_func; 27773 ; 27774 return 0; 27775} 27776_ACEOF 27777if ac_fn_c_try_compile "$LINENO"; then : 27778 eval "$as_gl_Symbol=yes" 27779else 27780 eval "$as_gl_Symbol=no" 27781fi 27782rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 27783fi 27784eval ac_res=\$$as_gl_Symbol 27785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 27786$as_echo "$ac_res" >&6; } 27787 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : 27788 cat >>confdefs.h <<_ACEOF 27789#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 27790_ACEOF 27791 27792 eval ac_cv_have_decl_$gl_func=yes 27793fi 27794 done 27795 27796 27797 27798 27799 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit macro" >&5 27800$as_echo_n "checking for signbit macro... " >&6; } 27801if ${gl_cv_func_signbit+:} false; then : 27802 $as_echo_n "(cached) " >&6 27803else 27804 27805 if test "$cross_compiling" = yes; then : 27806 case "$host_os" in 27807 # Guess yes on glibc systems. 27808 *-gnu*) gl_cv_func_signbit="guessing yes" ;; 27809 # If we don't know, assume the worst. 27810 *) gl_cv_func_signbit="guessing no" ;; 27811 esac 27812 27813else 27814 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 27815/* end confdefs.h. */ 27816 27817#include <math.h> 27818/* If signbit is defined as a function, don't use it, since calling it for 27819 'float' or 'long double' arguments would involve conversions. 27820 If signbit is not declared at all but exists as a library function, don't 27821 use it, since the prototype may not match. 27822 If signbit is not declared at all but exists as a compiler built-in, don't 27823 use it, since it's preferable to use __builtin_signbit* (no warnings, 27824 no conversions). */ 27825#ifndef signbit 27826# error "signbit should be a macro" 27827#endif 27828#include <string.h> 27829 27830/* Global variables. 27831 Needed because GCC 4 constant-folds __builtin_signbitl (literal) 27832 but cannot constant-fold __builtin_signbitl (variable). */ 27833float vf; 27834double vd; 27835long double vl; 27836int main () 27837{ 27838/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. 27839 So we use -p0f and -p0d instead. */ 27840float p0f = 0.0f; 27841float m0f = -p0f; 27842double p0d = 0.0; 27843double m0d = -p0d; 27844/* On HP-UX 10.20, negating 0.0L does not yield -0.0L. 27845 So we use another constant expression instead. 27846 But that expression does not work on other platforms, such as when 27847 cross-compiling to PowerPC on Mac OS X 10.5. */ 27848long double p0l = 0.0L; 27849#if defined __hpux || defined __sgi 27850long double m0l = -LDBL_MIN * LDBL_MIN; 27851#else 27852long double m0l = -p0l; 27853#endif 27854 int result = 0; 27855 if (signbit (vf)) /* link check */ 27856 vf++; 27857 { 27858 float plus_inf = 1.0f / p0f; 27859 float minus_inf = -1.0f / p0f; 27860 if (!(!signbit (255.0f) 27861 && signbit (-255.0f) 27862 && !signbit (p0f) 27863 && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f)) 27864 && !signbit (plus_inf) 27865 && signbit (minus_inf))) 27866 result |= 1; 27867 } 27868 if (signbit (vd)) /* link check */ 27869 vd++; 27870 { 27871 double plus_inf = 1.0 / p0d; 27872 double minus_inf = -1.0 / p0d; 27873 if (!(!signbit (255.0) 27874 && signbit (-255.0) 27875 && !signbit (p0d) 27876 && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d)) 27877 && !signbit (plus_inf) 27878 && signbit (minus_inf))) 27879 result |= 2; 27880 } 27881 if (signbit (vl)) /* link check */ 27882 vl++; 27883 { 27884 long double plus_inf = 1.0L / p0l; 27885 long double minus_inf = -1.0L / p0l; 27886 if (signbit (255.0L)) 27887 result |= 4; 27888 if (!signbit (-255.0L)) 27889 result |= 4; 27890 if (signbit (p0l)) 27891 result |= 8; 27892 if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))) 27893 result |= 16; 27894 if (signbit (plus_inf)) 27895 result |= 32; 27896 if (!signbit (minus_inf)) 27897 result |= 64; 27898 } 27899 return result; 27900} 27901 27902 27903_ACEOF 27904if ac_fn_c_try_run "$LINENO"; then : 27905 gl_cv_func_signbit=yes 27906else 27907 gl_cv_func_signbit=no 27908fi 27909rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 27910 conftest.$ac_objext conftest.beam conftest.$ac_ext 27911fi 27912 27913 27914fi 27915{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit" >&5 27916$as_echo "$gl_cv_func_signbit" >&6; } 27917 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for signbit compiler built-ins" >&5 27918$as_echo_n "checking for signbit compiler built-ins... " >&6; } 27919if ${gl_cv_func_signbit_gcc+:} false; then : 27920 $as_echo_n "(cached) " >&6 27921else 27922 27923 if test "$cross_compiling" = yes; then : 27924 case "$host_os" in 27925 # Guess yes on glibc systems. 27926 *-gnu*) gl_cv_func_signbit_gcc="guessing yes" ;; 27927 # If we don't know, assume the worst. 27928 *) gl_cv_func_signbit_gcc="guessing no" ;; 27929 esac 27930 27931else 27932 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 27933/* end confdefs.h. */ 27934 27935#if __GNUC__ >= 4 27936# define signbit(x) \ 27937 (sizeof (x) == sizeof (long double) ? __builtin_signbitl (x) : \ 27938 sizeof (x) == sizeof (double) ? __builtin_signbit (x) : \ 27939 __builtin_signbitf (x)) 27940#else 27941# error "signbit should be three compiler built-ins" 27942#endif 27943#include <string.h> 27944 27945/* Global variables. 27946 Needed because GCC 4 constant-folds __builtin_signbitl (literal) 27947 but cannot constant-fold __builtin_signbitl (variable). */ 27948float vf; 27949double vd; 27950long double vl; 27951int main () 27952{ 27953/* HP cc on HP-UX 10.20 has a bug with the constant expression -0.0. 27954 So we use -p0f and -p0d instead. */ 27955float p0f = 0.0f; 27956float m0f = -p0f; 27957double p0d = 0.0; 27958double m0d = -p0d; 27959/* On HP-UX 10.20, negating 0.0L does not yield -0.0L. 27960 So we use another constant expression instead. 27961 But that expression does not work on other platforms, such as when 27962 cross-compiling to PowerPC on Mac OS X 10.5. */ 27963long double p0l = 0.0L; 27964#if defined __hpux || defined __sgi 27965long double m0l = -LDBL_MIN * LDBL_MIN; 27966#else 27967long double m0l = -p0l; 27968#endif 27969 int result = 0; 27970 if (signbit (vf)) /* link check */ 27971 vf++; 27972 { 27973 float plus_inf = 1.0f / p0f; 27974 float minus_inf = -1.0f / p0f; 27975 if (!(!signbit (255.0f) 27976 && signbit (-255.0f) 27977 && !signbit (p0f) 27978 && (memcmp (&m0f, &p0f, sizeof (float)) == 0 || signbit (m0f)) 27979 && !signbit (plus_inf) 27980 && signbit (minus_inf))) 27981 result |= 1; 27982 } 27983 if (signbit (vd)) /* link check */ 27984 vd++; 27985 { 27986 double plus_inf = 1.0 / p0d; 27987 double minus_inf = -1.0 / p0d; 27988 if (!(!signbit (255.0) 27989 && signbit (-255.0) 27990 && !signbit (p0d) 27991 && (memcmp (&m0d, &p0d, sizeof (double)) == 0 || signbit (m0d)) 27992 && !signbit (plus_inf) 27993 && signbit (minus_inf))) 27994 result |= 2; 27995 } 27996 if (signbit (vl)) /* link check */ 27997 vl++; 27998 { 27999 long double plus_inf = 1.0L / p0l; 28000 long double minus_inf = -1.0L / p0l; 28001 if (signbit (255.0L)) 28002 result |= 4; 28003 if (!signbit (-255.0L)) 28004 result |= 4; 28005 if (signbit (p0l)) 28006 result |= 8; 28007 if (!(memcmp (&m0l, &p0l, sizeof (long double)) == 0 || signbit (m0l))) 28008 result |= 16; 28009 if (signbit (plus_inf)) 28010 result |= 32; 28011 if (!signbit (minus_inf)) 28012 result |= 64; 28013 } 28014 return result; 28015} 28016 28017 28018_ACEOF 28019if ac_fn_c_try_run "$LINENO"; then : 28020 gl_cv_func_signbit_gcc=yes 28021else 28022 gl_cv_func_signbit_gcc=no 28023fi 28024rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 28025 conftest.$ac_objext conftest.beam conftest.$ac_ext 28026fi 28027 28028 28029fi 28030{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_signbit_gcc" >&5 28031$as_echo "$gl_cv_func_signbit_gcc" >&6; } 28032 case "$gl_cv_func_signbit_gcc" in 28033 *yes) 28034 REPLACE_SIGNBIT_USING_GCC=1 28035 ;; 28036 *) 28037 case "$gl_cv_func_signbit" in 28038 *yes) ;; 28039 *) 28040 REPLACE_SIGNBIT=1 28041 28042 28043 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'float'" >&5 28044$as_echo_n "checking where to find the sign bit in a 'float'... " >&6; } 28045if ${gl_cv_cc_float_signbit+:} false; then : 28046 $as_echo_n "(cached) " >&6 28047else 28048 28049 if test "$cross_compiling" = yes; then : 28050 28051 gl_cv_cc_float_signbit="unknown" 28052 28053else 28054 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28055/* end confdefs.h. */ 28056 28057#include <stddef.h> 28058#include <stdio.h> 28059#define NWORDS \ 28060 ((sizeof (float) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 28061typedef union { float value; unsigned int word[NWORDS]; } 28062 memory_float; 28063static memory_float plus = { 1.0f }; 28064static memory_float minus = { -1.0f }; 28065int main () 28066{ 28067 size_t j, k, i; 28068 unsigned int m; 28069 FILE *fp = fopen ("conftest.out", "w"); 28070 if (fp == NULL) 28071 return 1; 28072 /* Find the different bit. */ 28073 k = 0; m = 0; 28074 for (j = 0; j < NWORDS; j++) 28075 { 28076 unsigned int x = plus.word[j] ^ minus.word[j]; 28077 if ((x & (x - 1)) || (x && m)) 28078 { 28079 /* More than one bit difference. */ 28080 fprintf (fp, "unknown"); 28081 return 2; 28082 } 28083 if (x) 28084 { 28085 k = j; 28086 m = x; 28087 } 28088 } 28089 if (m == 0) 28090 { 28091 /* No difference. */ 28092 fprintf (fp, "unknown"); 28093 return 3; 28094 } 28095 /* Now m = plus.word[k] ^ ~minus.word[k]. */ 28096 if (plus.word[k] & ~minus.word[k]) 28097 { 28098 /* Oh? The sign bit is set in the positive and cleared in the negative 28099 numbers? */ 28100 fprintf (fp, "unknown"); 28101 return 4; 28102 } 28103 for (i = 0; ; i++) 28104 if ((m >> i) & 1) 28105 break; 28106 fprintf (fp, "word %d bit %d", (int) k, (int) i); 28107 if (fclose (fp) != 0) 28108 return 5; 28109 return 0; 28110} 28111 28112_ACEOF 28113if ac_fn_c_try_run "$LINENO"; then : 28114 gl_cv_cc_float_signbit=`cat conftest.out` 28115else 28116 gl_cv_cc_float_signbit="unknown" 28117fi 28118rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 28119 conftest.$ac_objext conftest.beam conftest.$ac_ext 28120fi 28121 28122 rm -f conftest.out 28123 28124fi 28125{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_float_signbit" >&5 28126$as_echo "$gl_cv_cc_float_signbit" >&6; } 28127 case "$gl_cv_cc_float_signbit" in 28128 word*bit*) 28129 word=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word //' -e 's/ bit.*//'` 28130 bit=`echo "$gl_cv_cc_float_signbit" | sed -e 's/word.*bit //'` 28131 28132cat >>confdefs.h <<_ACEOF 28133#define FLT_SIGNBIT_WORD $word 28134_ACEOF 28135 28136 28137cat >>confdefs.h <<_ACEOF 28138#define FLT_SIGNBIT_BIT $bit 28139_ACEOF 28140 28141 ;; 28142 esac 28143 28144 28145 28146 28147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'double'" >&5 28148$as_echo_n "checking where to find the sign bit in a 'double'... " >&6; } 28149if ${gl_cv_cc_double_signbit+:} false; then : 28150 $as_echo_n "(cached) " >&6 28151else 28152 28153 if test "$cross_compiling" = yes; then : 28154 28155 gl_cv_cc_double_signbit="unknown" 28156 28157else 28158 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28159/* end confdefs.h. */ 28160 28161#include <stddef.h> 28162#include <stdio.h> 28163#define NWORDS \ 28164 ((sizeof (double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 28165typedef union { double value; unsigned int word[NWORDS]; } 28166 memory_float; 28167static memory_float plus = { 1.0 }; 28168static memory_float minus = { -1.0 }; 28169int main () 28170{ 28171 size_t j, k, i; 28172 unsigned int m; 28173 FILE *fp = fopen ("conftest.out", "w"); 28174 if (fp == NULL) 28175 return 1; 28176 /* Find the different bit. */ 28177 k = 0; m = 0; 28178 for (j = 0; j < NWORDS; j++) 28179 { 28180 unsigned int x = plus.word[j] ^ minus.word[j]; 28181 if ((x & (x - 1)) || (x && m)) 28182 { 28183 /* More than one bit difference. */ 28184 fprintf (fp, "unknown"); 28185 return 2; 28186 } 28187 if (x) 28188 { 28189 k = j; 28190 m = x; 28191 } 28192 } 28193 if (m == 0) 28194 { 28195 /* No difference. */ 28196 fprintf (fp, "unknown"); 28197 return 3; 28198 } 28199 /* Now m = plus.word[k] ^ ~minus.word[k]. */ 28200 if (plus.word[k] & ~minus.word[k]) 28201 { 28202 /* Oh? The sign bit is set in the positive and cleared in the negative 28203 numbers? */ 28204 fprintf (fp, "unknown"); 28205 return 4; 28206 } 28207 for (i = 0; ; i++) 28208 if ((m >> i) & 1) 28209 break; 28210 fprintf (fp, "word %d bit %d", (int) k, (int) i); 28211 if (fclose (fp) != 0) 28212 return 5; 28213 return 0; 28214} 28215 28216_ACEOF 28217if ac_fn_c_try_run "$LINENO"; then : 28218 gl_cv_cc_double_signbit=`cat conftest.out` 28219else 28220 gl_cv_cc_double_signbit="unknown" 28221fi 28222rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 28223 conftest.$ac_objext conftest.beam conftest.$ac_ext 28224fi 28225 28226 rm -f conftest.out 28227 28228fi 28229{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_double_signbit" >&5 28230$as_echo "$gl_cv_cc_double_signbit" >&6; } 28231 case "$gl_cv_cc_double_signbit" in 28232 word*bit*) 28233 word=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'` 28234 bit=`echo "$gl_cv_cc_double_signbit" | sed -e 's/word.*bit //'` 28235 28236cat >>confdefs.h <<_ACEOF 28237#define DBL_SIGNBIT_WORD $word 28238_ACEOF 28239 28240 28241cat >>confdefs.h <<_ACEOF 28242#define DBL_SIGNBIT_BIT $bit 28243_ACEOF 28244 28245 ;; 28246 esac 28247 28248 28249 28250 28251 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to find the sign bit in a 'long double'" >&5 28252$as_echo_n "checking where to find the sign bit in a 'long double'... " >&6; } 28253if ${gl_cv_cc_long_double_signbit+:} false; then : 28254 $as_echo_n "(cached) " >&6 28255else 28256 28257 if test "$cross_compiling" = yes; then : 28258 28259 gl_cv_cc_long_double_signbit="unknown" 28260 28261else 28262 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28263/* end confdefs.h. */ 28264 28265#include <stddef.h> 28266#include <stdio.h> 28267#define NWORDS \ 28268 ((sizeof (long double) + sizeof (unsigned int) - 1) / sizeof (unsigned int)) 28269typedef union { long double value; unsigned int word[NWORDS]; } 28270 memory_float; 28271static memory_float plus = { 1.0L }; 28272static memory_float minus = { -1.0L }; 28273int main () 28274{ 28275 size_t j, k, i; 28276 unsigned int m; 28277 FILE *fp = fopen ("conftest.out", "w"); 28278 if (fp == NULL) 28279 return 1; 28280 /* Find the different bit. */ 28281 k = 0; m = 0; 28282 for (j = 0; j < NWORDS; j++) 28283 { 28284 unsigned int x = plus.word[j] ^ minus.word[j]; 28285 if ((x & (x - 1)) || (x && m)) 28286 { 28287 /* More than one bit difference. */ 28288 fprintf (fp, "unknown"); 28289 return 2; 28290 } 28291 if (x) 28292 { 28293 k = j; 28294 m = x; 28295 } 28296 } 28297 if (m == 0) 28298 { 28299 /* No difference. */ 28300 fprintf (fp, "unknown"); 28301 return 3; 28302 } 28303 /* Now m = plus.word[k] ^ ~minus.word[k]. */ 28304 if (plus.word[k] & ~minus.word[k]) 28305 { 28306 /* Oh? The sign bit is set in the positive and cleared in the negative 28307 numbers? */ 28308 fprintf (fp, "unknown"); 28309 return 4; 28310 } 28311 for (i = 0; ; i++) 28312 if ((m >> i) & 1) 28313 break; 28314 fprintf (fp, "word %d bit %d", (int) k, (int) i); 28315 if (fclose (fp) != 0) 28316 return 5; 28317 return 0; 28318} 28319 28320_ACEOF 28321if ac_fn_c_try_run "$LINENO"; then : 28322 gl_cv_cc_long_double_signbit=`cat conftest.out` 28323else 28324 gl_cv_cc_long_double_signbit="unknown" 28325fi 28326rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 28327 conftest.$ac_objext conftest.beam conftest.$ac_ext 28328fi 28329 28330 rm -f conftest.out 28331 28332fi 28333{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_long_double_signbit" >&5 28334$as_echo "$gl_cv_cc_long_double_signbit" >&6; } 28335 case "$gl_cv_cc_long_double_signbit" in 28336 word*bit*) 28337 word=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word //' -e 's/ bit.*//'` 28338 bit=`echo "$gl_cv_cc_long_double_signbit" | sed -e 's/word.*bit //'` 28339 28340cat >>confdefs.h <<_ACEOF 28341#define LDBL_SIGNBIT_WORD $word 28342_ACEOF 28343 28344 28345cat >>confdefs.h <<_ACEOF 28346#define LDBL_SIGNBIT_BIT $bit 28347_ACEOF 28348 28349 ;; 28350 esac 28351 28352 28353 if test "$gl_cv_cc_float_signbit" = unknown; then 28354 ac_fn_c_check_decl "$LINENO" "copysignf" "ac_cv_have_decl_copysignf" "#include <math.h> 28355" 28356if test "x$ac_cv_have_decl_copysignf" = xyes; then : 28357 ac_have_decl=1 28358else 28359 ac_have_decl=0 28360fi 28361 28362cat >>confdefs.h <<_ACEOF 28363#define HAVE_DECL_COPYSIGNF $ac_have_decl 28364_ACEOF 28365 28366 if test "$ac_cv_have_decl_copysignf" = yes; then 28367 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignf can be used without linking with libm" >&5 28368$as_echo_n "checking whether copysignf can be used without linking with libm... " >&6; } 28369if ${gl_cv_func_copysignf_no_libm+:} false; then : 28370 $as_echo_n "(cached) " >&6 28371else 28372 28373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28374/* end confdefs.h. */ 28375#include <math.h> 28376 float x, y; 28377int 28378main () 28379{ 28380return copysignf (x, y) < 0; 28381 ; 28382 return 0; 28383} 28384_ACEOF 28385if ac_fn_c_try_link "$LINENO"; then : 28386 gl_cv_func_copysignf_no_libm=yes 28387else 28388 gl_cv_func_copysignf_no_libm=no 28389fi 28390rm -f core conftest.err conftest.$ac_objext \ 28391 conftest$ac_exeext conftest.$ac_ext 28392 28393fi 28394{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignf_no_libm" >&5 28395$as_echo "$gl_cv_func_copysignf_no_libm" >&6; } 28396 if test $gl_cv_func_copysignf_no_libm = yes; then 28397 28398$as_echo "#define HAVE_COPYSIGNF_IN_LIBC 1" >>confdefs.h 28399 28400 fi 28401 fi 28402 fi 28403 if test "$gl_cv_cc_double_signbit" = unknown; then 28404 ac_fn_c_check_decl "$LINENO" "copysign" "ac_cv_have_decl_copysign" "#include <math.h> 28405" 28406if test "x$ac_cv_have_decl_copysign" = xyes; then : 28407 ac_have_decl=1 28408else 28409 ac_have_decl=0 28410fi 28411 28412cat >>confdefs.h <<_ACEOF 28413#define HAVE_DECL_COPYSIGN $ac_have_decl 28414_ACEOF 28415 28416 if test "$ac_cv_have_decl_copysign" = yes; then 28417 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysign can be used without linking with libm" >&5 28418$as_echo_n "checking whether copysign can be used without linking with libm... " >&6; } 28419if ${gl_cv_func_copysign_no_libm+:} false; then : 28420 $as_echo_n "(cached) " >&6 28421else 28422 28423 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28424/* end confdefs.h. */ 28425#include <math.h> 28426 double x, y; 28427int 28428main () 28429{ 28430return copysign (x, y) < 0; 28431 ; 28432 return 0; 28433} 28434_ACEOF 28435if ac_fn_c_try_link "$LINENO"; then : 28436 gl_cv_func_copysign_no_libm=yes 28437else 28438 gl_cv_func_copysign_no_libm=no 28439fi 28440rm -f core conftest.err conftest.$ac_objext \ 28441 conftest$ac_exeext conftest.$ac_ext 28442 28443fi 28444{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysign_no_libm" >&5 28445$as_echo "$gl_cv_func_copysign_no_libm" >&6; } 28446 if test $gl_cv_func_copysign_no_libm = yes; then 28447 28448$as_echo "#define HAVE_COPYSIGN_IN_LIBC 1" >>confdefs.h 28449 28450 fi 28451 fi 28452 fi 28453 if test "$gl_cv_cc_long_double_signbit" = unknown; then 28454 ac_fn_c_check_decl "$LINENO" "copysignl" "ac_cv_have_decl_copysignl" "#include <math.h> 28455" 28456if test "x$ac_cv_have_decl_copysignl" = xyes; then : 28457 ac_have_decl=1 28458else 28459 ac_have_decl=0 28460fi 28461 28462cat >>confdefs.h <<_ACEOF 28463#define HAVE_DECL_COPYSIGNL $ac_have_decl 28464_ACEOF 28465 28466 if test "$ac_cv_have_decl_copysignl" = yes; then 28467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether copysignl can be used without linking with libm" >&5 28468$as_echo_n "checking whether copysignl can be used without linking with libm... " >&6; } 28469if ${gl_cv_func_copysignl_no_libm+:} false; then : 28470 $as_echo_n "(cached) " >&6 28471else 28472 28473 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28474/* end confdefs.h. */ 28475#include <math.h> 28476 long double x, y; 28477int 28478main () 28479{ 28480return copysignl (x, y) < 0; 28481 ; 28482 return 0; 28483} 28484_ACEOF 28485if ac_fn_c_try_link "$LINENO"; then : 28486 gl_cv_func_copysignl_no_libm=yes 28487else 28488 gl_cv_func_copysignl_no_libm=no 28489fi 28490rm -f core conftest.err conftest.$ac_objext \ 28491 conftest$ac_exeext conftest.$ac_ext 28492 28493fi 28494{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_copysignl_no_libm" >&5 28495$as_echo "$gl_cv_func_copysignl_no_libm" >&6; } 28496 if test $gl_cv_func_copysignl_no_libm = yes; then 28497 28498$as_echo "#define HAVE_COPYSIGNL_IN_LIBC 1" >>confdefs.h 28499 28500 fi 28501 fi 28502 fi 28503 ;; 28504 esac 28505 ;; 28506 esac 28507 28508 if test $REPLACE_SIGNBIT = 1; then 28509 28510 28511 28512 28513 28514 28515 28516 28517 gl_LIBOBJS="$gl_LIBOBJS signbitf.$ac_objext" 28518 28519 28520 28521 28522 28523 28524 28525 28526 28527 gl_LIBOBJS="$gl_LIBOBJS signbitd.$ac_objext" 28528 28529 28530 28531 28532 28533 28534 28535 28536 28537 gl_LIBOBJS="$gl_LIBOBJS signbitl.$ac_objext" 28538 28539 fi 28540 28541 28542 28543 28544 28545 GNULIB_SIGNBIT=1 28546 28547 28548 28549 28550 28551$as_echo "#define GNULIB_TEST_SIGNBIT 1" >>confdefs.h 28552 28553 28554 28555 28556 28557 28558 if test $gl_cv_type_sigset_t = yes; then 28559 ac_fn_c_check_func "$LINENO" "sigprocmask" "ac_cv_func_sigprocmask" 28560if test "x$ac_cv_func_sigprocmask" = xyes; then : 28561 gl_cv_func_sigprocmask=1 28562fi 28563 28564 fi 28565 if test -z "$gl_cv_func_sigprocmask"; then 28566 HAVE_POSIX_SIGNALBLOCKING=0 28567 fi 28568 28569 if test $HAVE_POSIX_SIGNALBLOCKING = 0; then 28570 28571 28572 28573 28574 28575 28576 28577 28578 gl_LIBOBJS="$gl_LIBOBJS sigprocmask.$ac_objext" 28579 28580 : 28581 fi 28582 28583 28584 28585 28586 28587 GNULIB_SIGPROCMASK=1 28588 28589 28590 28591 28592 28593$as_echo "#define GNULIB_TEST_SIGPROCMASK 1" >>confdefs.h 28594 28595 28596 28597 28598 for ac_header in stdint.h 28599do : 28600 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" 28601if test "x$ac_cv_header_stdint_h" = xyes; then : 28602 cat >>confdefs.h <<_ACEOF 28603#define HAVE_STDINT_H 1 28604_ACEOF 28605 28606fi 28607 28608done 28609 28610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5 28611$as_echo_n "checking for SIZE_MAX... " >&6; } 28612if ${gl_cv_size_max+:} false; then : 28613 $as_echo_n "(cached) " >&6 28614else 28615 28616 gl_cv_size_max= 28617 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28618/* end confdefs.h. */ 28619 28620#include <limits.h> 28621#if HAVE_STDINT_H 28622#include <stdint.h> 28623#endif 28624#ifdef SIZE_MAX 28625Found it 28626#endif 28627 28628_ACEOF 28629if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 28630 $EGREP "Found it" >/dev/null 2>&1; then : 28631 gl_cv_size_max=yes 28632fi 28633rm -f conftest* 28634 28635 if test -z "$gl_cv_size_max"; then 28636 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h> 28637#include <limits.h>"; then : 28638 28639else 28640 size_t_bits_minus_1= 28641fi 28642 28643 if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>"; then : 28644 28645else 28646 fits_in_uint= 28647fi 28648 28649 if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then 28650 if test $fits_in_uint = 1; then 28651 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28652/* end confdefs.h. */ 28653#include <stddef.h> 28654 extern size_t foo; 28655 extern unsigned long foo; 28656 28657int 28658main () 28659{ 28660 28661 ; 28662 return 0; 28663} 28664_ACEOF 28665if ac_fn_c_try_compile "$LINENO"; then : 28666 fits_in_uint=0 28667fi 28668rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 28669 fi 28670 if test $fits_in_uint = 1; then 28671 gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" 28672 else 28673 gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" 28674 fi 28675 else 28676 gl_cv_size_max='((size_t)~(size_t)0)' 28677 fi 28678 fi 28679 28680fi 28681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5 28682$as_echo "$gl_cv_size_max" >&6; } 28683 if test "$gl_cv_size_max" != yes; then 28684 28685cat >>confdefs.h <<_ACEOF 28686#define SIZE_MAX $gl_cv_size_max 28687_ACEOF 28688 28689 fi 28690 28691 28692 28693 28694 gl_cv_func_snprintf_usable=no 28695 for ac_func in snprintf 28696do : 28697 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" 28698if test "x$ac_cv_func_snprintf" = xyes; then : 28699 cat >>confdefs.h <<_ACEOF 28700#define HAVE_SNPRINTF 1 28701_ACEOF 28702 28703fi 28704done 28705 28706 if test $ac_cv_func_snprintf = yes; then 28707 28708 28709 28710 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5 28711$as_echo_n "checking whether snprintf respects a size of 1... " >&6; } 28712if ${gl_cv_func_snprintf_size1+:} false; then : 28713 $as_echo_n "(cached) " >&6 28714else 28715 28716 if test "$cross_compiling" = yes; then : 28717 gl_cv_func_snprintf_size1="guessing yes" 28718else 28719 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28720/* end confdefs.h. */ 28721 28722#include <stdio.h> 28723#if HAVE_SNPRINTF 28724# define my_snprintf snprintf 28725#else 28726# include <stdarg.h> 28727static int my_snprintf (char *buf, int size, const char *format, ...) 28728{ 28729 va_list args; 28730 int ret; 28731 va_start (args, format); 28732 ret = vsnprintf (buf, size, format, args); 28733 va_end (args); 28734 return ret; 28735} 28736#endif 28737int main() 28738{ 28739 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; 28740 my_snprintf (buf, 1, "%d", 12345); 28741 return buf[1] != 'E'; 28742} 28743_ACEOF 28744if ac_fn_c_try_run "$LINENO"; then : 28745 gl_cv_func_snprintf_size1=yes 28746else 28747 gl_cv_func_snprintf_size1=no 28748fi 28749rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 28750 conftest.$ac_objext conftest.beam conftest.$ac_ext 28751fi 28752 28753 28754fi 28755{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5 28756$as_echo "$gl_cv_func_snprintf_size1" >&6; } 28757 28758 case "$gl_cv_func_snprintf_size1" in 28759 *yes) 28760 28761 case "$gl_cv_func_snprintf_retval_c99" in 28762 *yes) 28763 28764 28765 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5 28766$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; } 28767if ${gl_cv_func_printf_positions+:} false; then : 28768 $as_echo_n "(cached) " >&6 28769else 28770 28771 if test "$cross_compiling" = yes; then : 28772 28773 case "$host_os" in 28774 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) 28775 gl_cv_func_printf_positions="guessing no";; 28776 beos*) gl_cv_func_printf_positions="guessing no";; 28777 mingw* | pw*) gl_cv_func_printf_positions="guessing no";; 28778 *) gl_cv_func_printf_positions="guessing yes";; 28779 esac 28780 28781else 28782 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28783/* end confdefs.h. */ 28784 28785#include <stdio.h> 28786#include <string.h> 28787/* The string "%2$d %1$d", with dollar characters protected from the shell's 28788 dollar expansion (possibly an autoconf bug). */ 28789static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; 28790static char buf[100]; 28791int main () 28792{ 28793 sprintf (buf, format, 33, 55); 28794 return (strcmp (buf, "55 33") != 0); 28795} 28796_ACEOF 28797if ac_fn_c_try_run "$LINENO"; then : 28798 gl_cv_func_printf_positions=yes 28799else 28800 gl_cv_func_printf_positions=no 28801fi 28802rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 28803 conftest.$ac_objext conftest.beam conftest.$ac_ext 28804fi 28805 28806 28807fi 28808{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5 28809$as_echo "$gl_cv_func_printf_positions" >&6; } 28810 28811 case "$gl_cv_func_printf_positions" in 28812 *yes) 28813 gl_cv_func_snprintf_usable=yes 28814 ;; 28815 esac 28816 ;; 28817 esac 28818 ;; 28819 esac 28820 fi 28821 if test $gl_cv_func_snprintf_usable = no; then 28822 28823 28824 28825 28826 28827 28828 28829 28830 28831 28832 gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext" 28833 28834 if test $ac_cv_func_snprintf = yes; then 28835 REPLACE_SNPRINTF=1 28836 fi 28837 : 28838 28839 fi 28840 28841 if test $ac_cv_have_decl_snprintf = no; then 28842 HAVE_DECL_SNPRINTF=0 28843 fi 28844 28845 28846 28847 28848 28849 28850 GNULIB_SNPRINTF=1 28851 28852 28853 28854 28855 28856$as_echo "#define GNULIB_TEST_SNPRINTF 1" >>confdefs.h 28857 28858 28859 28860 28861 28862cat >>confdefs.h <<_ACEOF 28863#define GNULIB_SNPRINTF 1 28864_ACEOF 28865 28866 28867 28868 28869 28870 28871 28872 28873 28874 28875 28876 28877 28878 28879 28880 28881 28882 gl_cv_func_snprintf_posix=no 28883 for ac_func in snprintf 28884do : 28885 ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" 28886if test "x$ac_cv_func_snprintf" = xyes; then : 28887 cat >>confdefs.h <<_ACEOF 28888#define HAVE_SNPRINTF 1 28889_ACEOF 28890 28891fi 28892done 28893 28894 if test $ac_cv_func_snprintf = yes; then 28895 28896 28897 28898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5 28899$as_echo_n "checking whether snprintf truncates the result as in C99... " >&6; } 28900if ${gl_cv_func_snprintf_truncation_c99+:} false; then : 28901 $as_echo_n "(cached) " >&6 28902else 28903 28904 if test "$cross_compiling" = yes; then : 28905 28906 case "$host_os" in 28907 # Guess yes on glibc systems. 28908 *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 28909 # Guess yes on FreeBSD >= 5. 28910 freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; 28911 freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 28912 # Guess yes on Mac OS X >= 10.3. 28913 darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";; 28914 darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 28915 # Guess yes on OpenBSD >= 3.9. 28916 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) 28917 gl_cv_func_snprintf_truncation_c99="guessing no";; 28918 openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 28919 # Guess yes on Solaris >= 2.6. 28920 solaris2.[0-5] | solaris2.[0-5].*) 28921 gl_cv_func_snprintf_truncation_c99="guessing no";; 28922 solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 28923 # Guess yes on AIX >= 4. 28924 aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";; 28925 aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 28926 # Guess yes on HP-UX >= 11. 28927 hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";; 28928 hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 28929 # Guess yes on IRIX >= 6.5. 28930 irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";; 28931 # Guess yes on OSF/1 >= 5. 28932 osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; 28933 osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 28934 # Guess yes on NetBSD >= 3. 28935 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) 28936 gl_cv_func_snprintf_truncation_c99="guessing no";; 28937 netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 28938 # Guess yes on BeOS. 28939 beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 28940 # If we don't know, assume the worst. 28941 *) gl_cv_func_snprintf_truncation_c99="guessing no";; 28942 esac 28943 28944else 28945 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 28946/* end confdefs.h. */ 28947 28948#include <stdio.h> 28949#include <string.h> 28950#if HAVE_SNPRINTF 28951# define my_snprintf snprintf 28952#else 28953# include <stdarg.h> 28954static int my_snprintf (char *buf, int size, const char *format, ...) 28955{ 28956 va_list args; 28957 int ret; 28958 va_start (args, format); 28959 ret = vsnprintf (buf, size, format, args); 28960 va_end (args); 28961 return ret; 28962} 28963#endif 28964static char buf[100]; 28965int main () 28966{ 28967 strcpy (buf, "ABCDEF"); 28968 my_snprintf (buf, 3, "%d %d", 4567, 89); 28969 if (memcmp (buf, "45\0DEF", 6) != 0) 28970 return 1; 28971 return 0; 28972} 28973_ACEOF 28974if ac_fn_c_try_run "$LINENO"; then : 28975 gl_cv_func_snprintf_truncation_c99=yes 28976else 28977 gl_cv_func_snprintf_truncation_c99=no 28978fi 28979rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 28980 conftest.$ac_objext conftest.beam conftest.$ac_ext 28981fi 28982 28983 28984fi 28985{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5 28986$as_echo "$gl_cv_func_snprintf_truncation_c99" >&6; } 28987 28988 28989 28990 28991 28992 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf fully supports the 'n' directive" >&5 28993$as_echo_n "checking whether snprintf fully supports the 'n' directive... " >&6; } 28994if ${gl_cv_func_snprintf_directive_n+:} false; then : 28995 $as_echo_n "(cached) " >&6 28996else 28997 28998 if test "$cross_compiling" = yes; then : 28999 29000 case "$host_os" in 29001 # Guess yes on glibc systems. 29002 *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";; 29003 # Guess yes on FreeBSD >= 5. 29004 freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";; 29005 freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";; 29006 # Guess yes on Mac OS X >= 10.3. 29007 darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";; 29008 darwin*) gl_cv_func_snprintf_directive_n="guessing yes";; 29009 # Guess yes on Solaris >= 2.6. 29010 solaris2.[0-5] | solaris2.[0-5].*) 29011 gl_cv_func_snprintf_directive_n="guessing no";; 29012 solaris*) gl_cv_func_snprintf_directive_n="guessing yes";; 29013 # Guess yes on AIX >= 4. 29014 aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";; 29015 aix*) gl_cv_func_snprintf_directive_n="guessing yes";; 29016 # Guess yes on IRIX >= 6.5. 29017 irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";; 29018 # Guess yes on OSF/1 >= 5. 29019 osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";; 29020 osf*) gl_cv_func_snprintf_directive_n="guessing yes";; 29021 # Guess yes on NetBSD >= 3. 29022 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) 29023 gl_cv_func_snprintf_directive_n="guessing no";; 29024 netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";; 29025 # Guess yes on BeOS. 29026 beos*) gl_cv_func_snprintf_directive_n="guessing yes";; 29027 # If we don't know, assume the worst. 29028 *) gl_cv_func_snprintf_directive_n="guessing no";; 29029 esac 29030 29031else 29032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29033/* end confdefs.h. */ 29034 29035#include <stdio.h> 29036#include <string.h> 29037#if HAVE_SNPRINTF 29038# define my_snprintf snprintf 29039#else 29040# include <stdarg.h> 29041static int my_snprintf (char *buf, int size, const char *format, ...) 29042{ 29043 va_list args; 29044 int ret; 29045 va_start (args, format); 29046 ret = vsnprintf (buf, size, format, args); 29047 va_end (args); 29048 return ret; 29049} 29050#endif 29051static char fmtstring[10]; 29052static char buf[100]; 29053int main () 29054{ 29055 int count = -1; 29056 /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) 29057 support %n in format strings in read-only memory but not in writable 29058 memory. */ 29059 strcpy (fmtstring, "%d %n"); 29060 my_snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55); 29061 if (count != 6) 29062 return 1; 29063 return 0; 29064} 29065_ACEOF 29066if ac_fn_c_try_run "$LINENO"; then : 29067 gl_cv_func_snprintf_directive_n=yes 29068else 29069 gl_cv_func_snprintf_directive_n=no 29070fi 29071rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 29072 conftest.$ac_objext conftest.beam conftest.$ac_ext 29073fi 29074 29075 29076fi 29077{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_directive_n" >&5 29078$as_echo "$gl_cv_func_snprintf_directive_n" >&6; } 29079 29080 29081 29082 29083 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5 29084$as_echo_n "checking whether snprintf respects a size of 1... " >&6; } 29085if ${gl_cv_func_snprintf_size1+:} false; then : 29086 $as_echo_n "(cached) " >&6 29087else 29088 29089 if test "$cross_compiling" = yes; then : 29090 gl_cv_func_snprintf_size1="guessing yes" 29091else 29092 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29093/* end confdefs.h. */ 29094 29095#include <stdio.h> 29096#if HAVE_SNPRINTF 29097# define my_snprintf snprintf 29098#else 29099# include <stdarg.h> 29100static int my_snprintf (char *buf, int size, const char *format, ...) 29101{ 29102 va_list args; 29103 int ret; 29104 va_start (args, format); 29105 ret = vsnprintf (buf, size, format, args); 29106 va_end (args); 29107 return ret; 29108} 29109#endif 29110int main() 29111{ 29112 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; 29113 my_snprintf (buf, 1, "%d", 12345); 29114 return buf[1] != 'E'; 29115} 29116_ACEOF 29117if ac_fn_c_try_run "$LINENO"; then : 29118 gl_cv_func_snprintf_size1=yes 29119else 29120 gl_cv_func_snprintf_size1=no 29121fi 29122rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 29123 conftest.$ac_objext conftest.beam conftest.$ac_ext 29124fi 29125 29126 29127fi 29128{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5 29129$as_echo "$gl_cv_func_snprintf_size1" >&6; } 29130 29131 29132 29133 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf respects a zero size as in C99" >&5 29134$as_echo_n "checking whether vsnprintf respects a zero size as in C99... " >&6; } 29135if ${gl_cv_func_vsnprintf_zerosize_c99+:} false; then : 29136 $as_echo_n "(cached) " >&6 29137else 29138 29139 if test "$cross_compiling" = yes; then : 29140 29141 case "$host_os" in 29142 # Guess yes on glibc systems. 29143 *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 29144 # Guess yes on FreeBSD >= 5. 29145 freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; 29146 freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 29147 # Guess yes on Mac OS X >= 10.3. 29148 darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; 29149 darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 29150 # Guess yes on Cygwin. 29151 cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 29152 # Guess yes on Solaris >= 2.6. 29153 solaris2.[0-5] | solaris2.[0-5].*) 29154 gl_cv_func_vsnprintf_zerosize_c99="guessing no";; 29155 solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 29156 # Guess yes on AIX >= 4. 29157 aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; 29158 aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 29159 # Guess yes on IRIX >= 6.5. 29160 irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 29161 # Guess yes on NetBSD >= 3. 29162 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) 29163 gl_cv_func_vsnprintf_zerosize_c99="guessing no";; 29164 netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 29165 # Guess yes on BeOS. 29166 beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 29167 # Guess yes on mingw. 29168 mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 29169 # If we don't know, assume the worst. 29170 *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; 29171 esac 29172 29173else 29174 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29175/* end confdefs.h. */ 29176 29177#include <stdarg.h> 29178#include <stdio.h> 29179static int my_snprintf (char *buf, int size, const char *format, ...) 29180{ 29181 va_list args; 29182 int ret; 29183 va_start (args, format); 29184 ret = vsnprintf (buf, size, format, args); 29185 va_end (args); 29186 return ret; 29187} 29188int main() 29189{ 29190 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; 29191 my_snprintf (buf, 0, "%d", 12345); 29192 return buf[0] != 'D'; 29193} 29194_ACEOF 29195if ac_fn_c_try_run "$LINENO"; then : 29196 gl_cv_func_vsnprintf_zerosize_c99=yes 29197else 29198 gl_cv_func_vsnprintf_zerosize_c99=no 29199fi 29200rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 29201 conftest.$ac_objext conftest.beam conftest.$ac_ext 29202fi 29203 29204 29205fi 29206{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_vsnprintf_zerosize_c99" >&5 29207$as_echo "$gl_cv_func_vsnprintf_zerosize_c99" >&6; } 29208 29209 case "$gl_cv_func_printf_sizes_c99" in 29210 *yes) 29211 case "$gl_cv_func_printf_long_double" in 29212 *yes) 29213 case "$gl_cv_func_printf_infinite" in 29214 *yes) 29215 case "$gl_cv_func_printf_infinite_long_double" in 29216 *yes) 29217 case "$gl_cv_func_printf_directive_a" in 29218 *yes) 29219 case "$gl_cv_func_printf_directive_f" in 29220 *yes) 29221 case "$gl_cv_func_printf_directive_n" in 29222 *yes) 29223 case "$gl_cv_func_printf_directive_ls" in 29224 *yes) 29225 case "$gl_cv_func_printf_positions" in 29226 *yes) 29227 case "$gl_cv_func_printf_flag_grouping" in 29228 *yes) 29229 case "$gl_cv_func_printf_flag_leftadjust" in 29230 *yes) 29231 case "$gl_cv_func_printf_flag_zero" in 29232 *yes) 29233 case "$gl_cv_func_printf_precision" in 29234 *yes) 29235 case "$gl_cv_func_printf_enomem" in 29236 *yes) 29237 case "$gl_cv_func_snprintf_truncation_c99" in 29238 *yes) 29239 case "$gl_cv_func_snprintf_retval_c99" in 29240 *yes) 29241 case "$gl_cv_func_snprintf_directive_n" in 29242 *yes) 29243 case "$gl_cv_func_snprintf_size1" in 29244 *yes) 29245 case "$gl_cv_func_vsnprintf_zerosize_c99" in 29246 *yes) 29247 # snprintf exists and is 29248 # already POSIX compliant. 29249 gl_cv_func_snprintf_posix=yes 29250 ;; 29251 esac 29252 ;; 29253 esac 29254 ;; 29255 esac 29256 ;; 29257 esac 29258 ;; 29259 esac 29260 ;; 29261 esac 29262 ;; 29263 esac 29264 ;; 29265 esac 29266 ;; 29267 esac 29268 ;; 29269 esac 29270 ;; 29271 esac 29272 ;; 29273 esac 29274 ;; 29275 esac 29276 ;; 29277 esac 29278 ;; 29279 esac 29280 ;; 29281 esac 29282 ;; 29283 esac 29284 ;; 29285 esac 29286 ;; 29287 esac 29288 fi 29289 if test $gl_cv_func_snprintf_posix = no; then 29290 29291 29292 29293 case "$gl_cv_func_printf_infinite" in 29294 *yes) 29295 ;; 29296 *) 29297 29298$as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h 29299 29300 ;; 29301 esac 29302 29303 29304 29305 29306 case "$gl_cv_func_printf_long_double" in 29307 *yes) 29308 case "$gl_cv_func_printf_infinite_long_double" in 29309 *yes) 29310 ;; 29311 *) 29312 29313$as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h 29314 29315 ;; 29316 esac 29317 ;; 29318 esac 29319 29320 29321 29322 case "$gl_cv_func_printf_directive_a" in 29323 *yes) 29324 ;; 29325 *) 29326 29327$as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h 29328 29329 for ac_func in nl_langinfo 29330do : 29331 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" 29332if test "x$ac_cv_func_nl_langinfo" = xyes; then : 29333 cat >>confdefs.h <<_ACEOF 29334#define HAVE_NL_LANGINFO 1 29335_ACEOF 29336 29337fi 29338done 29339 29340 ;; 29341 esac 29342 29343 29344 29345 case "$gl_cv_func_printf_directive_f" in 29346 *yes) 29347 ;; 29348 *) 29349 29350$as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h 29351 29352 ;; 29353 esac 29354 29355 29356 29357 case "$gl_cv_func_printf_directive_ls" in 29358 *yes) 29359 ;; 29360 *) 29361 29362$as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h 29363 29364 ;; 29365 esac 29366 29367 29368 29369 case "$gl_cv_func_printf_flag_grouping" in 29370 *yes) 29371 ;; 29372 *) 29373 29374$as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h 29375 29376 ;; 29377 esac 29378 29379 29380 29381 case "$gl_cv_func_printf_flag_leftadjust" in 29382 *yes) 29383 ;; 29384 *) 29385 29386$as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h 29387 29388 ;; 29389 esac 29390 29391 29392 29393 case "$gl_cv_func_printf_flag_zero" in 29394 *yes) 29395 ;; 29396 *) 29397 29398$as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h 29399 29400 ;; 29401 esac 29402 29403 29404 29405 case "$gl_cv_func_printf_precision" in 29406 *yes) 29407 ;; 29408 *) 29409 29410$as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h 29411 29412 29413$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h 29414 29415 29416$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h 29417 29418 ;; 29419 esac 29420 29421 29422 29423 case "$gl_cv_func_printf_enomem" in 29424 *yes) 29425 ;; 29426 *) 29427 29428$as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h 29429 29430 29431$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h 29432 29433 29434$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h 29435 29436 ;; 29437 esac 29438 29439 29440 29441 29442 29443 29444 29445 29446 29447 29448 29449 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" 29450 29451 29452 29453 29454 29455 29456 29457 29458 29459 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" 29460 29461 29462 29463 29464 29465 29466 29467 29468 29469 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" 29470 29471 29472 29473 29474 29475 29476 29477 29478 29479 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" 29480 29481 if test $ac_cv_func_vasnprintf = yes; then 29482 29483$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h 29484 29485 fi 29486 29487 29488 29489 29490 29491 29492 29493 29494 29495 29496 29497 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" 29498if test "x$ac_cv_type_ptrdiff_t" = xyes; then : 29499 29500else 29501 29502$as_echo "#define ptrdiff_t long" >>confdefs.h 29503 29504 29505fi 29506 29507 29508 29509 29510 29511 29512 29513 29514 29515 29516 29517 29518 29519 29520 29521 29522 29523 gl_LIBOBJS="$gl_LIBOBJS snprintf.$ac_objext" 29524 29525 if test $ac_cv_func_snprintf = yes; then 29526 REPLACE_SNPRINTF=1 29527 fi 29528 : 29529 29530 fi 29531 29532 29533 29534 29535 29536 29537 29538 29539 29540 29541 29542 29543 29544 if test $gl_cv_have_include_next = yes; then 29545 gl_cv_next_spawn_h='<'spawn.h'>' 29546 else 29547 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <spawn.h>" >&5 29548$as_echo_n "checking absolute name of <spawn.h>... " >&6; } 29549if ${gl_cv_next_spawn_h+:} false; then : 29550 $as_echo_n "(cached) " >&6 29551else 29552 29553 if test $ac_cv_header_spawn_h = yes; then 29554 29555 29556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29557/* end confdefs.h. */ 29558#include <spawn.h> 29559 29560_ACEOF 29561 case "$host_os" in 29562 aix*) gl_absname_cpp="$ac_cpp -C" ;; 29563 *) gl_absname_cpp="$ac_cpp" ;; 29564 esac 29565 29566 case "$host_os" in 29567 mingw*) 29568 gl_dirsep_regex='[/\\]' 29569 ;; 29570 *) 29571 gl_dirsep_regex='\/' 29572 ;; 29573 esac 29574 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 29575 29576 gl_header_literal_regex=`echo 'spawn.h' \ 29577 | sed -e "$gl_make_literal_regex_sed"` 29578 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 29579 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 29580 s|^/[^/]|//&| 29581 p 29582 q 29583 }' 29584 gl_cv_next_spawn_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 29585 sed -n "$gl_absolute_header_sed"`'"' 29586 else 29587 gl_cv_next_spawn_h='<'spawn.h'>' 29588 fi 29589 29590 29591fi 29592{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_spawn_h" >&5 29593$as_echo "$gl_cv_next_spawn_h" >&6; } 29594 fi 29595 NEXT_SPAWN_H=$gl_cv_next_spawn_h 29596 29597 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 29598 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 29599 gl_next_as_first_directive='<'spawn.h'>' 29600 else 29601 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 29602 gl_next_as_first_directive=$gl_cv_next_spawn_h 29603 fi 29604 NEXT_AS_FIRST_DIRECTIVE_SPAWN_H=$gl_next_as_first_directive 29605 29606 29607 29608 29609 29610 if test $ac_cv_header_spawn_h = yes; then 29611 HAVE_SPAWN_H=1 29612 ac_fn_c_check_type "$LINENO" "posix_spawnattr_t" "ac_cv_type_posix_spawnattr_t" " 29613#include <spawn.h> 29614 29615" 29616if test "x$ac_cv_type_posix_spawnattr_t" = xyes; then : 29617 29618cat >>confdefs.h <<_ACEOF 29619#define HAVE_POSIX_SPAWNATTR_T 1 29620_ACEOF 29621 29622 29623else 29624 HAVE_POSIX_SPAWNATTR_T=0 29625fi 29626 29627 ac_fn_c_check_type "$LINENO" "posix_spawn_file_actions_t" "ac_cv_type_posix_spawn_file_actions_t" " 29628#include <spawn.h> 29629 29630" 29631if test "x$ac_cv_type_posix_spawn_file_actions_t" = xyes; then : 29632 29633cat >>confdefs.h <<_ACEOF 29634#define HAVE_POSIX_SPAWN_FILE_ACTIONS_T 1 29635_ACEOF 29636 29637 29638else 29639 HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0 29640fi 29641 29642 else 29643 HAVE_SPAWN_H=0 29644 HAVE_POSIX_SPAWNATTR_T=0 29645 HAVE_POSIX_SPAWN_FILE_ACTIONS_T=0 29646 fi 29647 29648 29649 29650 29651 29652 29653 29654 29655 29656 29657 29658 for gl_func in posix_spawn posix_spawnp posix_spawnattr_init posix_spawnattr_destroy posix_spawnattr_getsigdefault posix_spawnattr_setsigdefault posix_spawnattr_getsigmask posix_spawnattr_setsigmask posix_spawnattr_getflags posix_spawnattr_setflags posix_spawnattr_getpgroup posix_spawnattr_setpgroup posix_spawnattr_getschedpolicy posix_spawnattr_setschedpolicy posix_spawnattr_getschedparam posix_spawnattr_setschedparam posix_spawn_file_actions_init posix_spawn_file_actions_destroy posix_spawn_file_actions_addopen posix_spawn_file_actions_addclose posix_spawn_file_actions_adddup2; do 29659 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` 29660 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 29661$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } 29662if eval \${$as_gl_Symbol+:} false; then : 29663 $as_echo_n "(cached) " >&6 29664else 29665 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 29666/* end confdefs.h. */ 29667#include <spawn.h> 29668 29669int 29670main () 29671{ 29672#undef $gl_func 29673 (void) $gl_func; 29674 ; 29675 return 0; 29676} 29677_ACEOF 29678if ac_fn_c_try_compile "$LINENO"; then : 29679 eval "$as_gl_Symbol=yes" 29680else 29681 eval "$as_gl_Symbol=no" 29682fi 29683rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 29684fi 29685eval ac_res=\$$as_gl_Symbol 29686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 29687$as_echo "$ac_res" >&6; } 29688 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : 29689 cat >>confdefs.h <<_ACEOF 29690#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 29691_ACEOF 29692 29693 eval ac_cv_have_decl_$gl_func=yes 29694fi 29695 done 29696 29697 29698 29699 29700 29701 29702 29703 29704 29705 29706 29707 29708 29709 29710 29711 29712 29713 29714 29715 29716 gl_cv_func_sprintf_posix=no 29717 case "$gl_cv_func_printf_sizes_c99" in 29718 *yes) 29719 case "$gl_cv_func_printf_long_double" in 29720 *yes) 29721 case "$gl_cv_func_printf_infinite" in 29722 *yes) 29723 case "$gl_cv_func_printf_infinite_long_double" in 29724 *yes) 29725 case "$gl_cv_func_printf_directive_a" in 29726 *yes) 29727 case "$gl_cv_func_printf_directive_f" in 29728 *yes) 29729 case "$gl_cv_func_printf_directive_n" in 29730 *yes) 29731 case "$gl_cv_func_printf_directive_ls" in 29732 *yes) 29733 case "$gl_cv_func_printf_positions" in 29734 *yes) 29735 case "$gl_cv_func_printf_flag_grouping" in 29736 *yes) 29737 case "$gl_cv_func_printf_flag_leftadjust" in 29738 *yes) 29739 case "$gl_cv_func_printf_flag_zero" in 29740 *yes) 29741 case "$gl_cv_func_printf_precision" in 29742 *yes) 29743 case "$gl_cv_func_printf_enomem" in 29744 *yes) 29745 # sprintf exists and is 29746 # already POSIX compliant. 29747 gl_cv_func_sprintf_posix=yes 29748 ;; 29749 esac 29750 ;; 29751 esac 29752 ;; 29753 esac 29754 ;; 29755 esac 29756 ;; 29757 esac 29758 ;; 29759 esac 29760 ;; 29761 esac 29762 ;; 29763 esac 29764 ;; 29765 esac 29766 ;; 29767 esac 29768 ;; 29769 esac 29770 ;; 29771 esac 29772 ;; 29773 esac 29774 ;; 29775 esac 29776 if test $gl_cv_func_sprintf_posix = no; then 29777 29778 29779 29780 case "$gl_cv_func_printf_infinite" in 29781 *yes) 29782 ;; 29783 *) 29784 29785$as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h 29786 29787 ;; 29788 esac 29789 29790 29791 29792 29793 case "$gl_cv_func_printf_long_double" in 29794 *yes) 29795 case "$gl_cv_func_printf_infinite_long_double" in 29796 *yes) 29797 ;; 29798 *) 29799 29800$as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h 29801 29802 ;; 29803 esac 29804 ;; 29805 esac 29806 29807 29808 29809 case "$gl_cv_func_printf_directive_a" in 29810 *yes) 29811 ;; 29812 *) 29813 29814$as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h 29815 29816 for ac_func in nl_langinfo 29817do : 29818 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" 29819if test "x$ac_cv_func_nl_langinfo" = xyes; then : 29820 cat >>confdefs.h <<_ACEOF 29821#define HAVE_NL_LANGINFO 1 29822_ACEOF 29823 29824fi 29825done 29826 29827 ;; 29828 esac 29829 29830 29831 29832 case "$gl_cv_func_printf_directive_f" in 29833 *yes) 29834 ;; 29835 *) 29836 29837$as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h 29838 29839 ;; 29840 esac 29841 29842 29843 29844 case "$gl_cv_func_printf_directive_ls" in 29845 *yes) 29846 ;; 29847 *) 29848 29849$as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h 29850 29851 ;; 29852 esac 29853 29854 29855 29856 case "$gl_cv_func_printf_flag_grouping" in 29857 *yes) 29858 ;; 29859 *) 29860 29861$as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h 29862 29863 ;; 29864 esac 29865 29866 29867 29868 case "$gl_cv_func_printf_flag_leftadjust" in 29869 *yes) 29870 ;; 29871 *) 29872 29873$as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h 29874 29875 ;; 29876 esac 29877 29878 29879 29880 case "$gl_cv_func_printf_flag_zero" in 29881 *yes) 29882 ;; 29883 *) 29884 29885$as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h 29886 29887 ;; 29888 esac 29889 29890 29891 29892 case "$gl_cv_func_printf_precision" in 29893 *yes) 29894 ;; 29895 *) 29896 29897$as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h 29898 29899 29900$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h 29901 29902 29903$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h 29904 29905 ;; 29906 esac 29907 29908 29909 29910 case "$gl_cv_func_printf_enomem" in 29911 *yes) 29912 ;; 29913 *) 29914 29915$as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h 29916 29917 29918$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h 29919 29920 29921$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h 29922 29923 ;; 29924 esac 29925 29926 29927 29928 29929 29930 29931 29932 29933 29934 29935 29936 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" 29937 29938 29939 29940 29941 29942 29943 29944 29945 29946 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" 29947 29948 29949 29950 29951 29952 29953 29954 29955 29956 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" 29957 29958 29959 29960 29961 29962 29963 29964 29965 29966 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" 29967 29968 if test $ac_cv_func_vasnprintf = yes; then 29969 29970$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h 29971 29972 fi 29973 29974 29975 29976 29977 29978 29979 29980 29981 29982 29983 29984 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" 29985if test "x$ac_cv_type_ptrdiff_t" = xyes; then : 29986 29987else 29988 29989$as_echo "#define ptrdiff_t long" >>confdefs.h 29990 29991 29992fi 29993 29994 29995 29996 29997 29998 29999 30000 30001 30002 30003 30004 30005 30006 30007 30008 30009 30010 gl_LIBOBJS="$gl_LIBOBJS sprintf.$ac_objext" 30011 30012 REPLACE_SPRINTF=1 30013 : 30014 30015 fi 30016 30017 30018 30019 30020 30021 30022 GNULIB_SPRINTF_POSIX=1 30023 30024 30025 30026 30027 30028$as_echo "#define GNULIB_TEST_SPRINTF_POSIX 1" >>confdefs.h 30029 30030 30031 30032 30033 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ssize_t" >&5 30034$as_echo_n "checking for ssize_t... " >&6; } 30035if ${gt_cv_ssize_t+:} false; then : 30036 $as_echo_n "(cached) " >&6 30037else 30038 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30039/* end confdefs.h. */ 30040#include <sys/types.h> 30041int 30042main () 30043{ 30044int x = sizeof (ssize_t *) + sizeof (ssize_t); 30045 return !x; 30046 ; 30047 return 0; 30048} 30049_ACEOF 30050if ac_fn_c_try_compile "$LINENO"; then : 30051 gt_cv_ssize_t=yes 30052else 30053 gt_cv_ssize_t=no 30054fi 30055rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 30056fi 30057{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_ssize_t" >&5 30058$as_echo "$gt_cv_ssize_t" >&6; } 30059 if test $gt_cv_ssize_t = no; then 30060 30061$as_echo "#define ssize_t int" >>confdefs.h 30062 30063 fi 30064 30065 30066 30067 30068 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on directories" >&5 30069$as_echo_n "checking whether stat handles trailing slashes on directories... " >&6; } 30070if ${gl_cv_func_stat_dir_slash+:} false; then : 30071 $as_echo_n "(cached) " >&6 30072else 30073 if test "$cross_compiling" = yes; then : 30074 case $host_os in 30075 mingw*) gl_cv_func_stat_dir_slash="guessing no";; 30076 *) gl_cv_func_stat_dir_slash="guessing yes";; 30077 esac 30078else 30079 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30080/* end confdefs.h. */ 30081#include <sys/stat.h> 30082 30083int 30084main () 30085{ 30086struct stat st; return stat (".", &st) != stat ("./", &st); 30087 ; 30088 return 0; 30089} 30090_ACEOF 30091if ac_fn_c_try_run "$LINENO"; then : 30092 gl_cv_func_stat_dir_slash=yes 30093else 30094 gl_cv_func_stat_dir_slash=no 30095fi 30096rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 30097 conftest.$ac_objext conftest.beam conftest.$ac_ext 30098fi 30099 30100fi 30101{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_dir_slash" >&5 30102$as_echo "$gl_cv_func_stat_dir_slash" >&6; } 30103 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat handles trailing slashes on files" >&5 30104$as_echo_n "checking whether stat handles trailing slashes on files... " >&6; } 30105if ${gl_cv_func_stat_file_slash+:} false; then : 30106 $as_echo_n "(cached) " >&6 30107else 30108 touch conftest.tmp 30109 # Assume that if we have lstat, we can also check symlinks. 30110 if test $ac_cv_func_lstat = yes; then 30111 ln -s conftest.tmp conftest.lnk 30112 fi 30113 if test "$cross_compiling" = yes; then : 30114 case "$host_os" in 30115 # Guess yes on glibc systems. 30116 *-gnu*) gl_cv_func_stat_file_slash="guessing yes" ;; 30117 # If we don't know, assume the worst. 30118 *) gl_cv_func_stat_file_slash="guessing no" ;; 30119 esac 30120 30121else 30122 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30123/* end confdefs.h. */ 30124#include <sys/stat.h> 30125 30126int 30127main () 30128{ 30129int result = 0; 30130 struct stat st; 30131 if (!stat ("conftest.tmp/", &st)) 30132 result |= 1; 30133#if HAVE_LSTAT 30134 if (!stat ("conftest.lnk/", &st)) 30135 result |= 2; 30136#endif 30137 return result; 30138 30139 ; 30140 return 0; 30141} 30142_ACEOF 30143if ac_fn_c_try_run "$LINENO"; then : 30144 gl_cv_func_stat_file_slash=yes 30145else 30146 gl_cv_func_stat_file_slash=no 30147fi 30148rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 30149 conftest.$ac_objext conftest.beam conftest.$ac_ext 30150fi 30151 30152 rm -f conftest.tmp conftest.lnk 30153fi 30154{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_stat_file_slash" >&5 30155$as_echo "$gl_cv_func_stat_file_slash" >&6; } 30156 case $gl_cv_func_stat_dir_slash in 30157 *no) REPLACE_STAT=1 30158 30159$as_echo "#define REPLACE_FUNC_STAT_DIR 1" >>confdefs.h 30160;; 30161 esac 30162 case $gl_cv_func_stat_file_slash in 30163 *no) REPLACE_STAT=1 30164 30165$as_echo "#define REPLACE_FUNC_STAT_FILE 1" >>confdefs.h 30166;; 30167 esac 30168 30169 if test $REPLACE_STAT = 1; then 30170 30171 30172 30173 30174 30175 30176 30177 30178 gl_LIBOBJS="$gl_LIBOBJS stat.$ac_objext" 30179 30180 : 30181 fi 30182 30183 30184 30185 30186 30187 GNULIB_STAT=1 30188 30189 30190 30191 30192 30193$as_echo "#define GNULIB_TEST_STAT 1" >>confdefs.h 30194 30195 30196 30197 30198 30199 30200 # Define two additional variables used in the Makefile substitution. 30201 30202 if test "$ac_cv_header_stdbool_h" = yes; then 30203 STDBOOL_H='' 30204 else 30205 STDBOOL_H='stdbool.h' 30206 fi 30207 30208 if test -n "$STDBOOL_H"; then 30209 GL_GENERATE_STDBOOL_H_TRUE= 30210 GL_GENERATE_STDBOOL_H_FALSE='#' 30211else 30212 GL_GENERATE_STDBOOL_H_TRUE='#' 30213 GL_GENERATE_STDBOOL_H_FALSE= 30214fi 30215 30216 30217 if test "$ac_cv_type__Bool" = yes; then 30218 HAVE__BOOL=1 30219 else 30220 HAVE__BOOL=0 30221 fi 30222 30223 30224 30225 30226 30227 STDDEF_H= 30228 if test $gt_cv_c_wchar_t = no; then 30229 HAVE_WCHAR_T=0 30230 STDDEF_H=stddef.h 30231 fi 30232 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NULL can be used in arbitrary expressions" >&5 30233$as_echo_n "checking whether NULL can be used in arbitrary expressions... " >&6; } 30234if ${gl_cv_decl_null_works+:} false; then : 30235 $as_echo_n "(cached) " >&6 30236else 30237 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30238/* end confdefs.h. */ 30239#include <stddef.h> 30240 int test[2 * (sizeof NULL == sizeof (void *)) -1]; 30241 30242int 30243main () 30244{ 30245 30246 ; 30247 return 0; 30248} 30249_ACEOF 30250if ac_fn_c_try_compile "$LINENO"; then : 30251 gl_cv_decl_null_works=yes 30252else 30253 gl_cv_decl_null_works=no 30254fi 30255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 30256fi 30257{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_decl_null_works" >&5 30258$as_echo "$gl_cv_decl_null_works" >&6; } 30259 if test $gl_cv_decl_null_works = no; then 30260 REPLACE_NULL=1 30261 STDDEF_H=stddef.h 30262 fi 30263 30264 if test -n "$STDDEF_H"; then 30265 GL_GENERATE_STDDEF_H_TRUE= 30266 GL_GENERATE_STDDEF_H_FALSE='#' 30267else 30268 GL_GENERATE_STDDEF_H_TRUE='#' 30269 GL_GENERATE_STDDEF_H_FALSE= 30270fi 30271 30272 if test -n "$STDDEF_H"; then 30273 30274 30275 30276 30277 30278 30279 30280 30281 if test $gl_cv_have_include_next = yes; then 30282 gl_cv_next_stddef_h='<'stddef.h'>' 30283 else 30284 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stddef.h>" >&5 30285$as_echo_n "checking absolute name of <stddef.h>... " >&6; } 30286if ${gl_cv_next_stddef_h+:} false; then : 30287 $as_echo_n "(cached) " >&6 30288else 30289 30290 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30291/* end confdefs.h. */ 30292#include <stddef.h> 30293 30294_ACEOF 30295 case "$host_os" in 30296 aix*) gl_absname_cpp="$ac_cpp -C" ;; 30297 *) gl_absname_cpp="$ac_cpp" ;; 30298 esac 30299 30300 case "$host_os" in 30301 mingw*) 30302 gl_dirsep_regex='[/\\]' 30303 ;; 30304 *) 30305 gl_dirsep_regex='\/' 30306 ;; 30307 esac 30308 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 30309 30310 gl_header_literal_regex=`echo 'stddef.h' \ 30311 | sed -e "$gl_make_literal_regex_sed"` 30312 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 30313 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 30314 s|^/[^/]|//&| 30315 p 30316 q 30317 }' 30318 gl_cv_next_stddef_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 30319 sed -n "$gl_absolute_header_sed"`'"' 30320 30321 30322fi 30323{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stddef_h" >&5 30324$as_echo "$gl_cv_next_stddef_h" >&6; } 30325 fi 30326 NEXT_STDDEF_H=$gl_cv_next_stddef_h 30327 30328 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 30329 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 30330 gl_next_as_first_directive='<'stddef.h'>' 30331 else 30332 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 30333 gl_next_as_first_directive=$gl_cv_next_stddef_h 30334 fi 30335 NEXT_AS_FIRST_DIRECTIVE_STDDEF_H=$gl_next_as_first_directive 30336 30337 30338 30339 30340 fi 30341 30342 30343 30344 30345 30346 30347 30348 30349 30350 30351 30352 30353 if test $gl_cv_have_include_next = yes; then 30354 gl_cv_next_stdio_h='<'stdio.h'>' 30355 else 30356 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdio.h>" >&5 30357$as_echo_n "checking absolute name of <stdio.h>... " >&6; } 30358if ${gl_cv_next_stdio_h+:} false; then : 30359 $as_echo_n "(cached) " >&6 30360else 30361 30362 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30363/* end confdefs.h. */ 30364#include <stdio.h> 30365 30366_ACEOF 30367 case "$host_os" in 30368 aix*) gl_absname_cpp="$ac_cpp -C" ;; 30369 *) gl_absname_cpp="$ac_cpp" ;; 30370 esac 30371 30372 case "$host_os" in 30373 mingw*) 30374 gl_dirsep_regex='[/\\]' 30375 ;; 30376 *) 30377 gl_dirsep_regex='\/' 30378 ;; 30379 esac 30380 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 30381 30382 gl_header_literal_regex=`echo 'stdio.h' \ 30383 | sed -e "$gl_make_literal_regex_sed"` 30384 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 30385 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 30386 s|^/[^/]|//&| 30387 p 30388 q 30389 }' 30390 gl_cv_next_stdio_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 30391 sed -n "$gl_absolute_header_sed"`'"' 30392 30393 30394fi 30395{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdio_h" >&5 30396$as_echo "$gl_cv_next_stdio_h" >&6; } 30397 fi 30398 NEXT_STDIO_H=$gl_cv_next_stdio_h 30399 30400 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 30401 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 30402 gl_next_as_first_directive='<'stdio.h'>' 30403 else 30404 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 30405 gl_next_as_first_directive=$gl_cv_next_stdio_h 30406 fi 30407 NEXT_AS_FIRST_DIRECTIVE_STDIO_H=$gl_next_as_first_directive 30408 30409 30410 30411 30412 30413 GNULIB_FSCANF=1 30414 30415 30416cat >>confdefs.h <<_ACEOF 30417#define GNULIB_FSCANF 1 30418_ACEOF 30419 30420 30421 GNULIB_SCANF=1 30422 30423 30424cat >>confdefs.h <<_ACEOF 30425#define GNULIB_SCANF 1 30426_ACEOF 30427 30428 30429 GNULIB_FGETC=1 30430 GNULIB_GETC=1 30431 GNULIB_GETCHAR=1 30432 GNULIB_FGETS=1 30433 GNULIB_FREAD=1 30434 30435 30436 GNULIB_FPRINTF=1 30437 GNULIB_PRINTF=1 30438 GNULIB_VFPRINTF=1 30439 GNULIB_VPRINTF=1 30440 GNULIB_FPUTC=1 30441 GNULIB_PUTC=1 30442 GNULIB_PUTCHAR=1 30443 GNULIB_FPUTS=1 30444 GNULIB_PUTS=1 30445 GNULIB_FWRITE=1 30446 30447 30448 30449 30450 for gl_func in dprintf fpurge fseeko ftello getdelim getline gets pclose popen renameat snprintf tmpfile vdprintf vsnprintf; do 30451 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` 30452 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 30453$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } 30454if eval \${$as_gl_Symbol+:} false; then : 30455 $as_echo_n "(cached) " >&6 30456else 30457 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30458/* end confdefs.h. */ 30459#include <stdio.h> 30460 30461int 30462main () 30463{ 30464#undef $gl_func 30465 (void) $gl_func; 30466 ; 30467 return 0; 30468} 30469_ACEOF 30470if ac_fn_c_try_compile "$LINENO"; then : 30471 eval "$as_gl_Symbol=yes" 30472else 30473 eval "$as_gl_Symbol=no" 30474fi 30475rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 30476fi 30477eval ac_res=\$$as_gl_Symbol 30478 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 30479$as_echo "$ac_res" >&6; } 30480 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : 30481 cat >>confdefs.h <<_ACEOF 30482#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 30483_ACEOF 30484 30485 eval ac_cv_have_decl_$gl_func=yes 30486fi 30487 done 30488 30489 30490 30491 30492 30493 30494 30495 30496 30497 30498 30499 30500 if test $gl_cv_have_include_next = yes; then 30501 gl_cv_next_stdlib_h='<'stdlib.h'>' 30502 else 30503 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <stdlib.h>" >&5 30504$as_echo_n "checking absolute name of <stdlib.h>... " >&6; } 30505if ${gl_cv_next_stdlib_h+:} false; then : 30506 $as_echo_n "(cached) " >&6 30507else 30508 30509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30510/* end confdefs.h. */ 30511#include <stdlib.h> 30512 30513_ACEOF 30514 case "$host_os" in 30515 aix*) gl_absname_cpp="$ac_cpp -C" ;; 30516 *) gl_absname_cpp="$ac_cpp" ;; 30517 esac 30518 30519 case "$host_os" in 30520 mingw*) 30521 gl_dirsep_regex='[/\\]' 30522 ;; 30523 *) 30524 gl_dirsep_regex='\/' 30525 ;; 30526 esac 30527 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 30528 30529 gl_header_literal_regex=`echo 'stdlib.h' \ 30530 | sed -e "$gl_make_literal_regex_sed"` 30531 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 30532 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 30533 s|^/[^/]|//&| 30534 p 30535 q 30536 }' 30537 gl_cv_next_stdlib_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 30538 sed -n "$gl_absolute_header_sed"`'"' 30539 30540 30541fi 30542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_stdlib_h" >&5 30543$as_echo "$gl_cv_next_stdlib_h" >&6; } 30544 fi 30545 NEXT_STDLIB_H=$gl_cv_next_stdlib_h 30546 30547 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 30548 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 30549 gl_next_as_first_directive='<'stdlib.h'>' 30550 else 30551 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 30552 gl_next_as_first_directive=$gl_cv_next_stdlib_h 30553 fi 30554 NEXT_AS_FIRST_DIRECTIVE_STDLIB_H=$gl_next_as_first_directive 30555 30556 30557 30558 30559 30560 30561 for gl_func in _Exit atoll canonicalize_file_name getloadavg getsubopt grantpt initstate initstate_r mkdtemp mkostemp mkostemps mkstemp mkstemps posix_openpt ptsname ptsname_r random random_r realpath rpmatch setenv setstate setstate_r srandom srandom_r strtod strtoll strtoull unlockpt unsetenv; do 30562 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` 30563 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 30564$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } 30565if eval \${$as_gl_Symbol+:} false; then : 30566 $as_echo_n "(cached) " >&6 30567else 30568 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30569/* end confdefs.h. */ 30570#include <stdlib.h> 30571#if HAVE_SYS_LOADAVG_H 30572# include <sys/loadavg.h> 30573#endif 30574#if HAVE_RANDOM_H 30575# include <random.h> 30576#endif 30577 30578int 30579main () 30580{ 30581#undef $gl_func 30582 (void) $gl_func; 30583 ; 30584 return 0; 30585} 30586_ACEOF 30587if ac_fn_c_try_compile "$LINENO"; then : 30588 eval "$as_gl_Symbol=yes" 30589else 30590 eval "$as_gl_Symbol=no" 30591fi 30592rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 30593fi 30594eval ac_res=\$$as_gl_Symbol 30595 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 30596$as_echo "$ac_res" >&6; } 30597 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : 30598 cat >>confdefs.h <<_ACEOF 30599#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 30600_ACEOF 30601 30602 eval ac_cv_have_decl_$gl_func=yes 30603fi 30604 done 30605 30606 30607 30608 30609 30610 30611 30612 30613 for ac_func in stpcpy 30614do : 30615 ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy" 30616if test "x$ac_cv_func_stpcpy" = xyes; then : 30617 cat >>confdefs.h <<_ACEOF 30618#define HAVE_STPCPY 1 30619_ACEOF 30620 30621fi 30622done 30623 30624 if test $ac_cv_func_stpcpy = no; then 30625 HAVE_STPCPY=0 30626 fi 30627 30628 if test $HAVE_STPCPY = 0; then 30629 30630 30631 30632 30633 30634 30635 30636 30637 gl_LIBOBJS="$gl_LIBOBJS stpcpy.$ac_objext" 30638 30639 30640 : 30641 30642 fi 30643 30644 30645 30646 30647 30648 GNULIB_STPCPY=1 30649 30650 30651 30652 30653 30654$as_echo "#define GNULIB_TEST_STPCPY 1" >>confdefs.h 30655 30656 30657 30658 30659 30660 30661 30662 for ac_func in strchrnul 30663do : 30664 ac_fn_c_check_func "$LINENO" "strchrnul" "ac_cv_func_strchrnul" 30665if test "x$ac_cv_func_strchrnul" = xyes; then : 30666 cat >>confdefs.h <<_ACEOF 30667#define HAVE_STRCHRNUL 1 30668_ACEOF 30669 30670fi 30671done 30672 30673 if test $ac_cv_func_strchrnul = no; then 30674 HAVE_STRCHRNUL=0 30675 else 30676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5 30677$as_echo_n "checking whether strchrnul works... " >&6; } 30678if ${gl_cv_func_strchrnul_works+:} false; then : 30679 $as_echo_n "(cached) " >&6 30680else 30681 if test "$cross_compiling" = yes; then : 30682 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30683/* end confdefs.h. */ 30684 30685#if defined __CYGWIN__ 30686 #include <cygwin/version.h> 30687 #if CYGWIN_VERSION_DLL_COMBINED > CYGWIN_VERSION_DLL_MAKE_COMBINED (1007, 9) 30688 Lucky user 30689 #endif 30690#else 30691 Lucky user 30692#endif 30693 30694_ACEOF 30695if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 30696 $EGREP "Lucky user" >/dev/null 2>&1; then : 30697 gl_cv_func_strchrnul_works="guessing yes" 30698else 30699 gl_cv_func_strchrnul_works="guessing no" 30700fi 30701rm -f conftest* 30702 30703 30704else 30705 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30706/* end confdefs.h. */ 30707 30708#include <string.h> /* for strchrnul */ 30709 30710int 30711main () 30712{ 30713const char *buf = "a"; 30714 return strchrnul (buf, 'b') != buf + 1; 30715 30716 ; 30717 return 0; 30718} 30719_ACEOF 30720if ac_fn_c_try_run "$LINENO"; then : 30721 gl_cv_func_strchrnul_works=yes 30722else 30723 gl_cv_func_strchrnul_works=no 30724fi 30725rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 30726 conftest.$ac_objext conftest.beam conftest.$ac_ext 30727fi 30728 30729 30730fi 30731{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strchrnul_works" >&5 30732$as_echo "$gl_cv_func_strchrnul_works" >&6; } 30733 case "$gl_cv_func_strchrnul_works" in 30734 *yes) ;; 30735 *) REPLACE_STRCHRNUL=1 ;; 30736 esac 30737 fi 30738 30739 if test $HAVE_STRCHRNUL = 0 || test $REPLACE_STRCHRNUL = 1; then 30740 30741 30742 30743 30744 30745 30746 30747 30748 gl_LIBOBJS="$gl_LIBOBJS strchrnul.$ac_objext" 30749 30750 : 30751 fi 30752 30753 30754 30755 30756 30757 GNULIB_STRCHRNUL=1 30758 30759 30760 30761 30762 30763$as_echo "#define GNULIB_TEST_STRCHRNUL 1" >>confdefs.h 30764 30765 30766 30767 30768 30769 30770 30771 if test $ac_cv_func_strdup = yes; then 30772 if test $gl_cv_func_malloc_posix != yes; then 30773 REPLACE_STRDUP=1 30774 fi 30775 fi 30776 30777 if test $ac_cv_have_decl_strdup = no; then 30778 HAVE_DECL_STRDUP=0 30779 fi 30780 30781 if test $ac_cv_func_strdup = no || test $REPLACE_STRDUP = 1; then 30782 30783 30784 30785 30786 30787 30788 30789 30790 gl_LIBOBJS="$gl_LIBOBJS strdup.$ac_objext" 30791 30792 : 30793 fi 30794 30795 30796 30797 30798 30799 GNULIB_STRDUP=1 30800 30801 30802 30803 30804 30805$as_echo "#define GNULIB_TEST_STRDUP 1" >>confdefs.h 30806 30807 30808 30809 30810 30811 30812 30813 30814 30815 30816 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then 30817 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strerror function" >&5 30818$as_echo_n "checking for working strerror function... " >&6; } 30819if ${gl_cv_func_working_strerror+:} false; then : 30820 $as_echo_n "(cached) " >&6 30821else 30822 if test "$cross_compiling" = yes; then : 30823 case "$host_os" in 30824 # Guess yes on glibc systems. 30825 *-gnu*) gl_cv_func_working_strerror="guessing yes" ;; 30826 # If we don't know, assume the worst. 30827 *) gl_cv_func_working_strerror="guessing no" ;; 30828 esac 30829 30830else 30831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 30832/* end confdefs.h. */ 30833#include <string.h> 30834 30835int 30836main () 30837{ 30838if (!*strerror (-2)) return 1; 30839 ; 30840 return 0; 30841} 30842_ACEOF 30843if ac_fn_c_try_run "$LINENO"; then : 30844 gl_cv_func_working_strerror=yes 30845else 30846 gl_cv_func_working_strerror=no 30847fi 30848rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 30849 conftest.$ac_objext conftest.beam conftest.$ac_ext 30850fi 30851 30852 30853fi 30854{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_working_strerror" >&5 30855$as_echo "$gl_cv_func_working_strerror" >&6; } 30856 case "$gl_cv_func_working_strerror" in 30857 *yes) ;; 30858 *) 30859 REPLACE_STRERROR=1 30860 ;; 30861 esac 30862 30863 case "$gl_cv_func_strerror_r_works" in 30864 *no) REPLACE_STRERROR=1 ;; 30865 esac 30866 30867 else 30868 REPLACE_STRERROR=1 30869 fi 30870 30871 if test $REPLACE_STRERROR = 1; then 30872 30873 30874 30875 30876 30877 30878 30879 30880 gl_LIBOBJS="$gl_LIBOBJS strerror.$ac_objext" 30881 30882 fi 30883 30884 30885cat >>confdefs.h <<_ACEOF 30886#define GNULIB_STRERROR 1 30887_ACEOF 30888 30889 30890 30891 30892 30893 30894 30895 GNULIB_STRERROR=1 30896 30897 30898 30899 30900 30901$as_echo "#define GNULIB_TEST_STRERROR 1" >>confdefs.h 30902 30903 30904 30905 30906 30907 if test -n "$ERRNO_H" || test $REPLACE_STRERROR_0 = 1; then 30908 30909 30910 30911 30912 30913 30914 30915 30916 gl_LIBOBJS="$gl_LIBOBJS strerror-override.$ac_objext" 30917 30918 30919 30920 30921 30922 if test $ac_cv_header_sys_socket_h != yes; then 30923 for ac_header in winsock2.h 30924do : 30925 ac_fn_c_check_header_mongrel "$LINENO" "winsock2.h" "ac_cv_header_winsock2_h" "$ac_includes_default" 30926if test "x$ac_cv_header_winsock2_h" = xyes; then : 30927 cat >>confdefs.h <<_ACEOF 30928#define HAVE_WINSOCK2_H 1 30929_ACEOF 30930 30931fi 30932 30933done 30934 30935 fi 30936 if test "$ac_cv_header_winsock2_h" = yes; then 30937 HAVE_WINSOCK2_H=1 30938 UNISTD_H_HAVE_WINSOCK2_H=1 30939 SYS_IOCTL_H_HAVE_WINSOCK2_H=1 30940 else 30941 HAVE_WINSOCK2_H=0 30942 fi 30943 30944 30945 fi 30946 30947 30948 30949 30950 30951 30952 30953 if test $ac_cv_have_decl_strerror_r = no; then 30954 HAVE_DECL_STRERROR_R=0 30955 fi 30956 30957 if test $ac_cv_func_strerror_r = yes; then 30958 if test "$ERRNO_H:$REPLACE_STRERROR_0" = :0; then 30959 if test $gl_cv_func_strerror_r_posix_signature = yes; then 30960 case "$gl_cv_func_strerror_r_works" in 30961 *no) REPLACE_STRERROR_R=1 ;; 30962 esac 30963 else 30964 REPLACE_STRERROR_R=1 30965 fi 30966 else 30967 REPLACE_STRERROR_R=1 30968 fi 30969 fi 30970 30971 if test $HAVE_DECL_STRERROR_R = 0 || test $REPLACE_STRERROR_R = 1; then 30972 30973 30974 30975 30976 30977 30978 30979 30980 gl_LIBOBJS="$gl_LIBOBJS strerror_r.$ac_objext" 30981 30982 30983 30984 30985 30986 30987 fi 30988 30989 30990 30991 30992 30993 GNULIB_STRERROR_R=1 30994 30995 30996 30997 30998 30999$as_echo "#define GNULIB_TEST_STRERROR_R 1" >>confdefs.h 31000 31001 31002 31003 31004 31005 31006 31007 31008 31009 31010 31011 31012 if test $ac_cv_have_decl_strndup = no; then 31013 HAVE_DECL_STRNDUP=0 31014 fi 31015 31016 if test $ac_cv_func_strndup = yes; then 31017 HAVE_STRNDUP=1 31018 # AIX 4.3.3, AIX 5.1 have a function that fails to add the terminating '\0'. 31019 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strndup" >&5 31020$as_echo_n "checking for working strndup... " >&6; } 31021if ${gl_cv_func_strndup_works+:} false; then : 31022 $as_echo_n "(cached) " >&6 31023else 31024 if test "$cross_compiling" = yes; then : 31025 31026 case $host_os in 31027 aix | aix[3-6]*) gl_cv_func_strndup_works="guessing no";; 31028 *) gl_cv_func_strndup_works="guessing yes";; 31029 esac 31030 31031else 31032 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31033/* end confdefs.h. */ 31034 31035 #include <string.h> 31036 #include <stdlib.h> 31037int 31038main () 31039{ 31040 31041#if !HAVE_DECL_STRNDUP 31042 extern 31043 #ifdef __cplusplus 31044 "C" 31045 #endif 31046 char *strndup (const char *, size_t); 31047#endif 31048 char *s; 31049 s = strndup ("some longer string", 15); 31050 free (s); 31051 s = strndup ("shorter string", 13); 31052 return s[13] != '\0'; 31053 ; 31054 return 0; 31055} 31056_ACEOF 31057if ac_fn_c_try_run "$LINENO"; then : 31058 gl_cv_func_strndup_works=yes 31059else 31060 gl_cv_func_strndup_works=no 31061fi 31062rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 31063 conftest.$ac_objext conftest.beam conftest.$ac_ext 31064fi 31065 31066fi 31067{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_strndup_works" >&5 31068$as_echo "$gl_cv_func_strndup_works" >&6; } 31069 case $gl_cv_func_strndup_works in 31070 *no) REPLACE_STRNDUP=1 ;; 31071 esac 31072 else 31073 HAVE_STRNDUP=0 31074 fi 31075 31076 if test $HAVE_STRNDUP = 0 || test $REPLACE_STRNDUP = 1; then 31077 31078 31079 31080 31081 31082 31083 31084 31085 gl_LIBOBJS="$gl_LIBOBJS strndup.$ac_objext" 31086 31087 fi 31088 31089 31090 31091 31092 31093 GNULIB_STRNDUP=1 31094 31095 31096 31097 31098 31099$as_echo "#define GNULIB_TEST_STRNDUP 1" >>confdefs.h 31100 31101 31102 31103 31104 31105 31106 31107 31108 31109 if test $ac_cv_have_decl_strnlen = no; then 31110 HAVE_DECL_STRNLEN=0 31111 else 31112 31113 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working strnlen" >&5 31114$as_echo_n "checking for working strnlen... " >&6; } 31115if ${ac_cv_func_strnlen_working+:} false; then : 31116 $as_echo_n "(cached) " >&6 31117else 31118 if test "$cross_compiling" = yes; then : 31119 # Guess no on AIX systems, yes otherwise. 31120 case "$host_os" in 31121 aix*) ac_cv_func_strnlen_working=no;; 31122 *) ac_cv_func_strnlen_working=yes;; 31123 esac 31124else 31125 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31126/* end confdefs.h. */ 31127$ac_includes_default 31128int 31129main () 31130{ 31131 31132#define S "foobar" 31133#define S_LEN (sizeof S - 1) 31134 31135 /* At least one implementation is buggy: that of AIX 4.3 would 31136 give strnlen (S, 1) == 3. */ 31137 31138 int i; 31139 for (i = 0; i < S_LEN + 1; ++i) 31140 { 31141 int expected = i <= S_LEN ? i : S_LEN; 31142 if (strnlen (S, i) != expected) 31143 return 1; 31144 } 31145 return 0; 31146 31147 ; 31148 return 0; 31149} 31150_ACEOF 31151if ac_fn_c_try_run "$LINENO"; then : 31152 ac_cv_func_strnlen_working=yes 31153else 31154 ac_cv_func_strnlen_working=no 31155fi 31156rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 31157 conftest.$ac_objext conftest.beam conftest.$ac_ext 31158fi 31159 31160fi 31161{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strnlen_working" >&5 31162$as_echo "$ac_cv_func_strnlen_working" >&6; } 31163test $ac_cv_func_strnlen_working = no && : 31164 31165 31166 if test $ac_cv_func_strnlen_working = no; then 31167 REPLACE_STRNLEN=1 31168 fi 31169 fi 31170 31171 if test $HAVE_DECL_STRNLEN = 0 || test $REPLACE_STRNLEN = 1; then 31172 31173 31174 31175 31176 31177 31178 31179 31180 gl_LIBOBJS="$gl_LIBOBJS strnlen.$ac_objext" 31181 31182 : 31183 fi 31184 31185 31186 31187 31188 31189 GNULIB_STRNLEN=1 31190 31191 31192 31193 31194 31195$as_echo "#define GNULIB_TEST_STRNLEN 1" >>confdefs.h 31196 31197 31198 31199 31200 for ac_func in strtoul 31201do : 31202 ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" 31203if test "x$ac_cv_func_strtoul" = xyes; then : 31204 cat >>confdefs.h <<_ACEOF 31205#define HAVE_STRTOUL 1 31206_ACEOF 31207 31208fi 31209done 31210 31211 31212 if test $ac_cv_func_strtoul = no; then 31213 31214 31215 31216 31217 31218 31219 31220 31221 gl_LIBOBJS="$gl_LIBOBJS strtoul.$ac_objext" 31222 31223 fi 31224 31225 31226 31227 31228 for ac_func in strverscmp 31229do : 31230 ac_fn_c_check_func "$LINENO" "strverscmp" "ac_cv_func_strverscmp" 31231if test "x$ac_cv_func_strverscmp" = xyes; then : 31232 cat >>confdefs.h <<_ACEOF 31233#define HAVE_STRVERSCMP 1 31234_ACEOF 31235 31236fi 31237done 31238 31239 if test $ac_cv_func_strverscmp = no; then 31240 HAVE_STRVERSCMP=0 31241 fi 31242 31243 if test $HAVE_STRVERSCMP = 0; then 31244 31245 31246 31247 31248 31249 31250 31251 31252 gl_LIBOBJS="$gl_LIBOBJS strverscmp.$ac_objext" 31253 31254 31255 : 31256 31257 fi 31258 31259 31260 31261 31262 31263 GNULIB_STRVERSCMP=1 31264 31265 31266 31267 31268 31269$as_echo "#define GNULIB_TEST_STRVERSCMP 1" >>confdefs.h 31270 31271 31272 31273 31274 31275 31276 31277 31278 31279 31280 31281 31282 31283 31284 31285 31286 31287 if test $gl_cv_have_include_next = yes; then 31288 gl_cv_next_sys_stat_h='<'sys/stat.h'>' 31289 else 31290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/stat.h>" >&5 31291$as_echo_n "checking absolute name of <sys/stat.h>... " >&6; } 31292if ${gl_cv_next_sys_stat_h+:} false; then : 31293 $as_echo_n "(cached) " >&6 31294else 31295 31296 if test $ac_cv_header_sys_stat_h = yes; then 31297 31298 31299 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31300/* end confdefs.h. */ 31301#include <sys/stat.h> 31302 31303_ACEOF 31304 case "$host_os" in 31305 aix*) gl_absname_cpp="$ac_cpp -C" ;; 31306 *) gl_absname_cpp="$ac_cpp" ;; 31307 esac 31308 31309 case "$host_os" in 31310 mingw*) 31311 gl_dirsep_regex='[/\\]' 31312 ;; 31313 *) 31314 gl_dirsep_regex='\/' 31315 ;; 31316 esac 31317 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 31318 31319 gl_header_literal_regex=`echo 'sys/stat.h' \ 31320 | sed -e "$gl_make_literal_regex_sed"` 31321 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 31322 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 31323 s|^/[^/]|//&| 31324 p 31325 q 31326 }' 31327 gl_cv_next_sys_stat_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 31328 sed -n "$gl_absolute_header_sed"`'"' 31329 else 31330 gl_cv_next_sys_stat_h='<'sys/stat.h'>' 31331 fi 31332 31333 31334fi 31335{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_stat_h" >&5 31336$as_echo "$gl_cv_next_sys_stat_h" >&6; } 31337 fi 31338 NEXT_SYS_STAT_H=$gl_cv_next_sys_stat_h 31339 31340 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 31341 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 31342 gl_next_as_first_directive='<'sys/stat.h'>' 31343 else 31344 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 31345 gl_next_as_first_directive=$gl_cv_next_sys_stat_h 31346 fi 31347 NEXT_AS_FIRST_DIRECTIVE_SYS_STAT_H=$gl_next_as_first_directive 31348 31349 31350 31351 31352 31353 31354 31355 31356 31357 31358 31359 if test $WINDOWS_64_BIT_ST_SIZE = 1; then 31360 31361$as_echo "#define _GL_WINDOWS_64_BIT_ST_SIZE 1" >>confdefs.h 31362 31363 fi 31364 31365 ac_fn_c_check_type "$LINENO" "nlink_t" "ac_cv_type_nlink_t" "#include <sys/types.h> 31366 #include <sys/stat.h> 31367" 31368if test "x$ac_cv_type_nlink_t" = xyes; then : 31369 31370else 31371 31372$as_echo "#define nlink_t int" >>confdefs.h 31373 31374fi 31375 31376 31377 31378 for gl_func in fchmodat fstat fstatat futimens lchmod lstat mkdirat mkfifo mkfifoat mknod mknodat stat utimensat; do 31379 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` 31380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 31381$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } 31382if eval \${$as_gl_Symbol+:} false; then : 31383 $as_echo_n "(cached) " >&6 31384else 31385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31386/* end confdefs.h. */ 31387#include <sys/stat.h> 31388 31389int 31390main () 31391{ 31392#undef $gl_func 31393 (void) $gl_func; 31394 ; 31395 return 0; 31396} 31397_ACEOF 31398if ac_fn_c_try_compile "$LINENO"; then : 31399 eval "$as_gl_Symbol=yes" 31400else 31401 eval "$as_gl_Symbol=no" 31402fi 31403rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 31404fi 31405eval ac_res=\$$as_gl_Symbol 31406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 31407$as_echo "$ac_res" >&6; } 31408 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : 31409 cat >>confdefs.h <<_ACEOF 31410#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 31411_ACEOF 31412 31413 eval ac_cv_have_decl_$gl_func=yes 31414fi 31415 done 31416 31417 31418 31419 31420 31421 31422 31423 31424 31425 31426 31427 31428 31429 if test $gl_cv_have_include_next = yes; then 31430 gl_cv_next_sys_types_h='<'sys/types.h'>' 31431 else 31432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/types.h>" >&5 31433$as_echo_n "checking absolute name of <sys/types.h>... " >&6; } 31434if ${gl_cv_next_sys_types_h+:} false; then : 31435 $as_echo_n "(cached) " >&6 31436else 31437 31438 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31439/* end confdefs.h. */ 31440#include <sys/types.h> 31441 31442_ACEOF 31443 case "$host_os" in 31444 aix*) gl_absname_cpp="$ac_cpp -C" ;; 31445 *) gl_absname_cpp="$ac_cpp" ;; 31446 esac 31447 31448 case "$host_os" in 31449 mingw*) 31450 gl_dirsep_regex='[/\\]' 31451 ;; 31452 *) 31453 gl_dirsep_regex='\/' 31454 ;; 31455 esac 31456 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 31457 31458 gl_header_literal_regex=`echo 'sys/types.h' \ 31459 | sed -e "$gl_make_literal_regex_sed"` 31460 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 31461 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 31462 s|^/[^/]|//&| 31463 p 31464 q 31465 }' 31466 gl_cv_next_sys_types_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 31467 sed -n "$gl_absolute_header_sed"`'"' 31468 31469 31470fi 31471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_types_h" >&5 31472$as_echo "$gl_cv_next_sys_types_h" >&6; } 31473 fi 31474 NEXT_SYS_TYPES_H=$gl_cv_next_sys_types_h 31475 31476 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 31477 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 31478 gl_next_as_first_directive='<'sys/types.h'>' 31479 else 31480 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 31481 gl_next_as_first_directive=$gl_cv_next_sys_types_h 31482 fi 31483 NEXT_AS_FIRST_DIRECTIVE_SYS_TYPES_H=$gl_next_as_first_directive 31484 31485 31486 31487 31488 31489 31490 31491 31492 31493 31494 31495 31496 31497 31498 31499 31500 31501 31502 31503 31504 31505 31506 31507 31508 if test $gl_cv_have_include_next = yes; then 31509 gl_cv_next_sys_wait_h='<'sys/wait.h'>' 31510 else 31511 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <sys/wait.h>" >&5 31512$as_echo_n "checking absolute name of <sys/wait.h>... " >&6; } 31513if ${gl_cv_next_sys_wait_h+:} false; then : 31514 $as_echo_n "(cached) " >&6 31515else 31516 31517 if test $ac_cv_header_sys_wait_h = yes; then 31518 31519 31520 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31521/* end confdefs.h. */ 31522#include <sys/wait.h> 31523 31524_ACEOF 31525 case "$host_os" in 31526 aix*) gl_absname_cpp="$ac_cpp -C" ;; 31527 *) gl_absname_cpp="$ac_cpp" ;; 31528 esac 31529 31530 case "$host_os" in 31531 mingw*) 31532 gl_dirsep_regex='[/\\]' 31533 ;; 31534 *) 31535 gl_dirsep_regex='\/' 31536 ;; 31537 esac 31538 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 31539 31540 gl_header_literal_regex=`echo 'sys/wait.h' \ 31541 | sed -e "$gl_make_literal_regex_sed"` 31542 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 31543 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 31544 s|^/[^/]|//&| 31545 p 31546 q 31547 }' 31548 gl_cv_next_sys_wait_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 31549 sed -n "$gl_absolute_header_sed"`'"' 31550 else 31551 gl_cv_next_sys_wait_h='<'sys/wait.h'>' 31552 fi 31553 31554 31555fi 31556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_sys_wait_h" >&5 31557$as_echo "$gl_cv_next_sys_wait_h" >&6; } 31558 fi 31559 NEXT_SYS_WAIT_H=$gl_cv_next_sys_wait_h 31560 31561 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 31562 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 31563 gl_next_as_first_directive='<'sys/wait.h'>' 31564 else 31565 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 31566 gl_next_as_first_directive=$gl_cv_next_sys_wait_h 31567 fi 31568 NEXT_AS_FIRST_DIRECTIVE_SYS_WAIT_H=$gl_next_as_first_directive 31569 31570 31571 31572 31573 31574 31575 31576 31577 for gl_func in waitpid; do 31578 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` 31579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 31580$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } 31581if eval \${$as_gl_Symbol+:} false; then : 31582 $as_echo_n "(cached) " >&6 31583else 31584 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31585/* end confdefs.h. */ 31586#include <sys/wait.h> 31587int 31588main () 31589{ 31590#undef $gl_func 31591 (void) $gl_func; 31592 ; 31593 return 0; 31594} 31595_ACEOF 31596if ac_fn_c_try_compile "$LINENO"; then : 31597 eval "$as_gl_Symbol=yes" 31598else 31599 eval "$as_gl_Symbol=no" 31600fi 31601rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 31602fi 31603eval ac_res=\$$as_gl_Symbol 31604 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 31605$as_echo "$ac_res" >&6; } 31606 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : 31607 cat >>confdefs.h <<_ACEOF 31608#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 31609_ACEOF 31610 31611 eval ac_cv_have_decl_$gl_func=yes 31612fi 31613 done 31614 31615 31616 31617 31618 31619 31620 31621 31622 31623 31624 31625 31626 31627 31628 31629 31630 31631 31632 31633 31634 31635 31636 if test $gl_cv_have_include_next = yes; then 31637 gl_cv_next_unistd_h='<'unistd.h'>' 31638 else 31639 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <unistd.h>" >&5 31640$as_echo_n "checking absolute name of <unistd.h>... " >&6; } 31641if ${gl_cv_next_unistd_h+:} false; then : 31642 $as_echo_n "(cached) " >&6 31643else 31644 31645 if test $ac_cv_header_unistd_h = yes; then 31646 31647 31648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31649/* end confdefs.h. */ 31650#include <unistd.h> 31651 31652_ACEOF 31653 case "$host_os" in 31654 aix*) gl_absname_cpp="$ac_cpp -C" ;; 31655 *) gl_absname_cpp="$ac_cpp" ;; 31656 esac 31657 31658 case "$host_os" in 31659 mingw*) 31660 gl_dirsep_regex='[/\\]' 31661 ;; 31662 *) 31663 gl_dirsep_regex='\/' 31664 ;; 31665 esac 31666 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 31667 31668 gl_header_literal_regex=`echo 'unistd.h' \ 31669 | sed -e "$gl_make_literal_regex_sed"` 31670 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 31671 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 31672 s|^/[^/]|//&| 31673 p 31674 q 31675 }' 31676 gl_cv_next_unistd_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 31677 sed -n "$gl_absolute_header_sed"`'"' 31678 else 31679 gl_cv_next_unistd_h='<'unistd.h'>' 31680 fi 31681 31682 31683fi 31684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_unistd_h" >&5 31685$as_echo "$gl_cv_next_unistd_h" >&6; } 31686 fi 31687 NEXT_UNISTD_H=$gl_cv_next_unistd_h 31688 31689 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 31690 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 31691 gl_next_as_first_directive='<'unistd.h'>' 31692 else 31693 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 31694 gl_next_as_first_directive=$gl_cv_next_unistd_h 31695 fi 31696 NEXT_AS_FIRST_DIRECTIVE_UNISTD_H=$gl_next_as_first_directive 31697 31698 31699 31700 31701 if test $ac_cv_header_unistd_h = yes; then 31702 HAVE_UNISTD_H=1 31703 else 31704 HAVE_UNISTD_H=0 31705 fi 31706 31707 31708 31709 31710 31711 31712 31713 for gl_func in chdir chown dup dup2 dup3 environ euidaccess faccessat fchdir fchownat fdatasync fsync ftruncate getcwd getdomainname getdtablesize getgroups gethostname getlogin getlogin_r getpagesize getusershell setusershell endusershell group_member isatty lchown link linkat lseek pipe pipe2 pread pwrite readlink readlinkat rmdir sethostname sleep symlink symlinkat ttyname_r unlink unlinkat usleep; do 31714 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` 31715 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 31716$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } 31717if eval \${$as_gl_Symbol+:} false; then : 31718 $as_echo_n "(cached) " >&6 31719else 31720 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31721/* end confdefs.h. */ 31722 31723#if HAVE_UNISTD_H 31724# include <unistd.h> 31725#endif 31726/* Some systems declare various items in the wrong headers. */ 31727#if !(defined __GLIBC__ && !defined __UCLIBC__) 31728# include <fcntl.h> 31729# include <stdio.h> 31730# include <stdlib.h> 31731# if (defined _WIN32 || defined __WIN32__) && ! defined __CYGWIN__ 31732# include <io.h> 31733# endif 31734#endif 31735 31736int 31737main () 31738{ 31739#undef $gl_func 31740 (void) $gl_func; 31741 ; 31742 return 0; 31743} 31744_ACEOF 31745if ac_fn_c_try_compile "$LINENO"; then : 31746 eval "$as_gl_Symbol=yes" 31747else 31748 eval "$as_gl_Symbol=no" 31749fi 31750rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 31751fi 31752eval ac_res=\$$as_gl_Symbol 31753 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 31754$as_echo "$ac_res" >&6; } 31755 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : 31756 cat >>confdefs.h <<_ACEOF 31757#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 31758_ACEOF 31759 31760 eval ac_cv_have_decl_$gl_func=yes 31761fi 31762 done 31763 31764 31765 31766 31767 31768 31769 31770 if { test "$HAVE_LIBUNISTRING" != yes \ 31771 || { 31772 31773 31774 31775 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \ 31776 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ 31777 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ 31778 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ 31779 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0 31780 } 31781 } 31782 } 31783 31784 31785 31786 31787 } 31788 }; then 31789 LIBUNISTRING_UNITYPES_H='unitypes.h' 31790 else 31791 LIBUNISTRING_UNITYPES_H= 31792 fi 31793 31794 31795 31796 31797 if { test "$HAVE_LIBUNISTRING" != yes \ 31798 || { 31799 31800 31801 31802 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \ 31803 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ 31804 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ 31805 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ 31806 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 0 31807 } 31808 } 31809 } 31810 31811 31812 31813 31814 } 31815 }; then 31816 LIBUNISTRING_UNIWIDTH_H='uniwidth.h' 31817 else 31818 LIBUNISTRING_UNIWIDTH_H= 31819 fi 31820 31821 31822 31823 31824 if { test "$HAVE_LIBUNISTRING" != yes \ 31825 || { 31826 31827 31828 31829 test $LIBUNISTRING_VERSION_MAJOR -lt 0 \ 31830 || { test $LIBUNISTRING_VERSION_MAJOR -eq 0 \ 31831 && { test $LIBUNISTRING_VERSION_MINOR -lt 9 \ 31832 || { test $LIBUNISTRING_VERSION_MINOR -eq 9 \ 31833 && test $LIBUNISTRING_VERSION_SUBMINOR -lt 4 31834 } 31835 } 31836 } 31837 31838 31839 31840 31841 } 31842 }; then 31843 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE= 31844 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE='#' 31845else 31846 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE='#' 31847 LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE= 31848fi 31849 31850 31851 31852 31853$as_echo "#define USE_UNLOCKED_IO 1" >>confdefs.h 31854 31855 31856 31857 31858 31859 31860 31861 31862 31863 31864 31865 31866 31867 31868 31869 31870 31871 31872 31873 31874 31875 if test $ac_cv_have_decl_unsetenv = no; then 31876 HAVE_DECL_UNSETENV=0 31877 fi 31878 for ac_func in unsetenv 31879do : 31880 ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv" 31881if test "x$ac_cv_func_unsetenv" = xyes; then : 31882 cat >>confdefs.h <<_ACEOF 31883#define HAVE_UNSETENV 1 31884_ACEOF 31885 31886fi 31887done 31888 31889 if test $ac_cv_func_unsetenv = no; then 31890 HAVE_UNSETENV=0 31891 else 31892 HAVE_UNSETENV=1 31893 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for unsetenv() return type" >&5 31894$as_echo_n "checking for unsetenv() return type... " >&6; } 31895if ${gt_cv_func_unsetenv_ret+:} false; then : 31896 $as_echo_n "(cached) " >&6 31897else 31898 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31899/* end confdefs.h. */ 31900 31901#undef _BSD 31902#define _BSD 1 /* unhide unsetenv declaration in OSF/1 5.1 <stdlib.h> */ 31903#include <stdlib.h> 31904extern 31905#ifdef __cplusplus 31906"C" 31907#endif 31908int unsetenv (const char *name); 31909 31910int 31911main () 31912{ 31913 31914 ; 31915 return 0; 31916} 31917_ACEOF 31918if ac_fn_c_try_compile "$LINENO"; then : 31919 gt_cv_func_unsetenv_ret='int' 31920else 31921 gt_cv_func_unsetenv_ret='void' 31922fi 31923rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 31924fi 31925{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_unsetenv_ret" >&5 31926$as_echo "$gt_cv_func_unsetenv_ret" >&6; } 31927 if test $gt_cv_func_unsetenv_ret = 'void'; then 31928 31929$as_echo "#define VOID_UNSETENV 1" >>confdefs.h 31930 31931 REPLACE_UNSETENV=1 31932 fi 31933 31934 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether unsetenv obeys POSIX" >&5 31935$as_echo_n "checking whether unsetenv obeys POSIX... " >&6; } 31936if ${gl_cv_func_unsetenv_works+:} false; then : 31937 $as_echo_n "(cached) " >&6 31938else 31939 if test "$cross_compiling" = yes; then : 31940 case "$host_os" in 31941 # Guess yes on glibc systems. 31942 *-gnu*) gl_cv_func_unsetenv_works="guessing yes" ;; 31943 # If we don't know, assume the worst. 31944 *) gl_cv_func_unsetenv_works="guessing no" ;; 31945 esac 31946 31947else 31948 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 31949/* end confdefs.h. */ 31950 31951 #include <stdlib.h> 31952 #include <errno.h> 31953 extern char **environ; 31954 31955int 31956main () 31957{ 31958 31959 char entry1[] = "a=1"; 31960 char entry2[] = "b=2"; 31961 char *env[] = { entry1, entry2, NULL }; 31962 if (putenv ((char *) "a=1")) return 1; 31963 if (putenv (entry2)) return 2; 31964 entry2[0] = 'a'; 31965 unsetenv ("a"); 31966 if (getenv ("a")) return 3; 31967 if (!unsetenv ("") || errno != EINVAL) return 4; 31968 entry2[0] = 'b'; 31969 environ = env; 31970 if (!getenv ("a")) return 5; 31971 entry2[0] = 'a'; 31972 unsetenv ("a"); 31973 if (getenv ("a")) return 6; 31974 31975 ; 31976 return 0; 31977} 31978_ACEOF 31979if ac_fn_c_try_run "$LINENO"; then : 31980 gl_cv_func_unsetenv_works=yes 31981else 31982 gl_cv_func_unsetenv_works=no 31983fi 31984rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 31985 conftest.$ac_objext conftest.beam conftest.$ac_ext 31986fi 31987 31988fi 31989{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_unsetenv_works" >&5 31990$as_echo "$gl_cv_func_unsetenv_works" >&6; } 31991 case "$gl_cv_func_unsetenv_works" in 31992 *yes) ;; 31993 *) 31994 REPLACE_UNSETENV=1 31995 ;; 31996 esac 31997 fi 31998 31999 if test $HAVE_UNSETENV = 0 || test $REPLACE_UNSETENV = 1; then 32000 32001 32002 32003 32004 32005 32006 32007 32008 gl_LIBOBJS="$gl_LIBOBJS unsetenv.$ac_objext" 32009 32010 32011 32012 32013 32014 fi 32015 32016 32017 32018 32019 32020 GNULIB_UNSETENV=1 32021 32022 32023 32024 32025 32026$as_echo "#define GNULIB_TEST_UNSETENV 1" >>confdefs.h 32027 32028 32029 32030 32031 32032 if test $ac_cv_func_vasnprintf = no; then 32033 32034 32035 32036 32037 32038 32039 32040 32041 32042 32043 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" 32044 32045 32046 32047 32048 32049 32050 32051 32052 32053 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" 32054 32055 32056 32057 32058 32059 32060 32061 32062 32063 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" 32064 32065 32066 32067 32068 32069 32070 32071 32072 32073 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" 32074 32075 if test $ac_cv_func_vasnprintf = yes; then 32076 32077$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h 32078 32079 fi 32080 32081 32082 32083 32084 32085 32086 32087 32088 32089 32090 32091 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" 32092if test "x$ac_cv_type_ptrdiff_t" = xyes; then : 32093 32094else 32095 32096$as_echo "#define ptrdiff_t long" >>confdefs.h 32097 32098 32099fi 32100 32101 32102 32103 32104 32105 32106 32107 fi 32108 32109 32110 32111 32112 32113 32114 32115 32116 32117 32118 32119 32120 32121 32122 32123 32124 gl_cv_func_vfprintf_posix=no 32125 case "$gl_cv_func_printf_sizes_c99" in 32126 *yes) 32127 case "$gl_cv_func_printf_long_double" in 32128 *yes) 32129 case "$gl_cv_func_printf_infinite" in 32130 *yes) 32131 case "$gl_cv_func_printf_infinite_long_double" in 32132 *yes) 32133 case "$gl_cv_func_printf_directive_a" in 32134 *yes) 32135 case "$gl_cv_func_printf_directive_f" in 32136 *yes) 32137 case "$gl_cv_func_printf_directive_n" in 32138 *yes) 32139 case "$gl_cv_func_printf_directive_ls" in 32140 *yes) 32141 case "$gl_cv_func_printf_positions" in 32142 *yes) 32143 case "$gl_cv_func_printf_flag_grouping" in 32144 *yes) 32145 case "$gl_cv_func_printf_flag_leftadjust" in 32146 *yes) 32147 case "$gl_cv_func_printf_flag_zero" in 32148 *yes) 32149 case "$gl_cv_func_printf_precision" in 32150 *yes) 32151 case "$gl_cv_func_printf_enomem" in 32152 *yes) 32153 # vfprintf exists and is 32154 # already POSIX compliant. 32155 gl_cv_func_vfprintf_posix=yes 32156 ;; 32157 esac 32158 ;; 32159 esac 32160 ;; 32161 esac 32162 ;; 32163 esac 32164 ;; 32165 esac 32166 ;; 32167 esac 32168 ;; 32169 esac 32170 ;; 32171 esac 32172 ;; 32173 esac 32174 ;; 32175 esac 32176 ;; 32177 esac 32178 ;; 32179 esac 32180 ;; 32181 esac 32182 ;; 32183 esac 32184 if test $gl_cv_func_vfprintf_posix = no; then 32185 32186 32187 32188 case "$gl_cv_func_printf_infinite" in 32189 *yes) 32190 ;; 32191 *) 32192 32193$as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h 32194 32195 ;; 32196 esac 32197 32198 32199 32200 32201 case "$gl_cv_func_printf_long_double" in 32202 *yes) 32203 case "$gl_cv_func_printf_infinite_long_double" in 32204 *yes) 32205 ;; 32206 *) 32207 32208$as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h 32209 32210 ;; 32211 esac 32212 ;; 32213 esac 32214 32215 32216 32217 case "$gl_cv_func_printf_directive_a" in 32218 *yes) 32219 ;; 32220 *) 32221 32222$as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h 32223 32224 for ac_func in nl_langinfo 32225do : 32226 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" 32227if test "x$ac_cv_func_nl_langinfo" = xyes; then : 32228 cat >>confdefs.h <<_ACEOF 32229#define HAVE_NL_LANGINFO 1 32230_ACEOF 32231 32232fi 32233done 32234 32235 ;; 32236 esac 32237 32238 32239 32240 case "$gl_cv_func_printf_directive_f" in 32241 *yes) 32242 ;; 32243 *) 32244 32245$as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h 32246 32247 ;; 32248 esac 32249 32250 32251 32252 case "$gl_cv_func_printf_directive_ls" in 32253 *yes) 32254 ;; 32255 *) 32256 32257$as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h 32258 32259 ;; 32260 esac 32261 32262 32263 32264 case "$gl_cv_func_printf_flag_grouping" in 32265 *yes) 32266 ;; 32267 *) 32268 32269$as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h 32270 32271 ;; 32272 esac 32273 32274 32275 32276 case "$gl_cv_func_printf_flag_leftadjust" in 32277 *yes) 32278 ;; 32279 *) 32280 32281$as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h 32282 32283 ;; 32284 esac 32285 32286 32287 32288 case "$gl_cv_func_printf_flag_zero" in 32289 *yes) 32290 ;; 32291 *) 32292 32293$as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h 32294 32295 ;; 32296 esac 32297 32298 32299 32300 case "$gl_cv_func_printf_precision" in 32301 *yes) 32302 ;; 32303 *) 32304 32305$as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h 32306 32307 32308$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h 32309 32310 32311$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h 32312 32313 ;; 32314 esac 32315 32316 32317 32318 case "$gl_cv_func_printf_enomem" in 32319 *yes) 32320 ;; 32321 *) 32322 32323$as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h 32324 32325 32326$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h 32327 32328 32329$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h 32330 32331 ;; 32332 esac 32333 32334 32335 32336 32337 32338 32339 32340 32341 32342 32343 32344 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" 32345 32346 32347 32348 32349 32350 32351 32352 32353 32354 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" 32355 32356 32357 32358 32359 32360 32361 32362 32363 32364 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" 32365 32366 32367 32368 32369 32370 32371 32372 32373 32374 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" 32375 32376 if test $ac_cv_func_vasnprintf = yes; then 32377 32378$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h 32379 32380 fi 32381 32382 32383 32384 32385 32386 32387 32388 32389 32390 32391 32392 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" 32393if test "x$ac_cv_type_ptrdiff_t" = xyes; then : 32394 32395else 32396 32397$as_echo "#define ptrdiff_t long" >>confdefs.h 32398 32399 32400fi 32401 32402 32403 32404 32405 32406 32407 32408 32409 32410 32411 32412 32413 32414 32415 32416 32417 32418 gl_LIBOBJS="$gl_LIBOBJS vfprintf.$ac_objext" 32419 32420 REPLACE_VFPRINTF=1 32421 32422$as_echo "#define REPLACE_VFPRINTF_POSIX 1" >>confdefs.h 32423 32424 : 32425 32426 fi 32427 32428 32429 32430 32431 32432 32433 GNULIB_VFPRINTF_POSIX=1 32434 32435 32436 32437 32438 32439$as_echo "#define GNULIB_TEST_VFPRINTF_POSIX 1" >>confdefs.h 32440 32441 32442 32443 32444 32445 gl_cv_func_vsnprintf_usable=no 32446 for ac_func in vsnprintf 32447do : 32448 ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" 32449if test "x$ac_cv_func_vsnprintf" = xyes; then : 32450 cat >>confdefs.h <<_ACEOF 32451#define HAVE_VSNPRINTF 1 32452_ACEOF 32453 32454fi 32455done 32456 32457 if test $ac_cv_func_vsnprintf = yes; then 32458 32459 32460 32461 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5 32462$as_echo_n "checking whether snprintf respects a size of 1... " >&6; } 32463if ${gl_cv_func_snprintf_size1+:} false; then : 32464 $as_echo_n "(cached) " >&6 32465else 32466 32467 if test "$cross_compiling" = yes; then : 32468 gl_cv_func_snprintf_size1="guessing yes" 32469else 32470 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32471/* end confdefs.h. */ 32472 32473#include <stdio.h> 32474#if HAVE_SNPRINTF 32475# define my_snprintf snprintf 32476#else 32477# include <stdarg.h> 32478static int my_snprintf (char *buf, int size, const char *format, ...) 32479{ 32480 va_list args; 32481 int ret; 32482 va_start (args, format); 32483 ret = vsnprintf (buf, size, format, args); 32484 va_end (args); 32485 return ret; 32486} 32487#endif 32488int main() 32489{ 32490 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; 32491 my_snprintf (buf, 1, "%d", 12345); 32492 return buf[1] != 'E'; 32493} 32494_ACEOF 32495if ac_fn_c_try_run "$LINENO"; then : 32496 gl_cv_func_snprintf_size1=yes 32497else 32498 gl_cv_func_snprintf_size1=no 32499fi 32500rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 32501 conftest.$ac_objext conftest.beam conftest.$ac_ext 32502fi 32503 32504 32505fi 32506{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5 32507$as_echo "$gl_cv_func_snprintf_size1" >&6; } 32508 32509 case "$gl_cv_func_snprintf_size1" in 32510 *yes) 32511 32512 case "$gl_cv_func_snprintf_retval_c99" in 32513 *yes) 32514 32515 32516 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether printf supports POSIX/XSI format strings with positions" >&5 32517$as_echo_n "checking whether printf supports POSIX/XSI format strings with positions... " >&6; } 32518if ${gl_cv_func_printf_positions+:} false; then : 32519 $as_echo_n "(cached) " >&6 32520else 32521 32522 if test "$cross_compiling" = yes; then : 32523 32524 case "$host_os" in 32525 netbsd[1-3]* | netbsdelf[1-3]* | netbsdaout[1-3]* | netbsdcoff[1-3]*) 32526 gl_cv_func_printf_positions="guessing no";; 32527 beos*) gl_cv_func_printf_positions="guessing no";; 32528 mingw* | pw*) gl_cv_func_printf_positions="guessing no";; 32529 *) gl_cv_func_printf_positions="guessing yes";; 32530 esac 32531 32532else 32533 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32534/* end confdefs.h. */ 32535 32536#include <stdio.h> 32537#include <string.h> 32538/* The string "%2$d %1$d", with dollar characters protected from the shell's 32539 dollar expansion (possibly an autoconf bug). */ 32540static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; 32541static char buf[100]; 32542int main () 32543{ 32544 sprintf (buf, format, 33, 55); 32545 return (strcmp (buf, "55 33") != 0); 32546} 32547_ACEOF 32548if ac_fn_c_try_run "$LINENO"; then : 32549 gl_cv_func_printf_positions=yes 32550else 32551 gl_cv_func_printf_positions=no 32552fi 32553rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 32554 conftest.$ac_objext conftest.beam conftest.$ac_ext 32555fi 32556 32557 32558fi 32559{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_printf_positions" >&5 32560$as_echo "$gl_cv_func_printf_positions" >&6; } 32561 32562 case "$gl_cv_func_printf_positions" in 32563 *yes) 32564 gl_cv_func_vsnprintf_usable=yes 32565 ;; 32566 esac 32567 ;; 32568 esac 32569 ;; 32570 esac 32571 fi 32572 if test $gl_cv_func_vsnprintf_usable = no; then 32573 32574 32575 32576 32577 32578 32579 32580 32581 32582 32583 gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext" 32584 32585 if test $ac_cv_func_vsnprintf = yes; then 32586 REPLACE_VSNPRINTF=1 32587 fi 32588 : 32589 32590 fi 32591 32592 if test $ac_cv_have_decl_vsnprintf = no; then 32593 HAVE_DECL_VSNPRINTF=0 32594 fi 32595 32596 32597 32598 32599 32600 32601 GNULIB_VSNPRINTF=1 32602 32603 32604 32605 32606 32607$as_echo "#define GNULIB_TEST_VSNPRINTF 1" >>confdefs.h 32608 32609 32610 32611 32612 32613 32614 32615 32616 32617 32618 32619 32620 32621 32622 32623 32624 32625 32626 gl_cv_func_vsnprintf_posix=no 32627 for ac_func in vsnprintf 32628do : 32629 ac_fn_c_check_func "$LINENO" "vsnprintf" "ac_cv_func_vsnprintf" 32630if test "x$ac_cv_func_vsnprintf" = xyes; then : 32631 cat >>confdefs.h <<_ACEOF 32632#define HAVE_VSNPRINTF 1 32633_ACEOF 32634 32635fi 32636done 32637 32638 if test $ac_cv_func_vsnprintf = yes; then 32639 32640 32641 32642 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf truncates the result as in C99" >&5 32643$as_echo_n "checking whether snprintf truncates the result as in C99... " >&6; } 32644if ${gl_cv_func_snprintf_truncation_c99+:} false; then : 32645 $as_echo_n "(cached) " >&6 32646else 32647 32648 if test "$cross_compiling" = yes; then : 32649 32650 case "$host_os" in 32651 # Guess yes on glibc systems. 32652 *-gnu*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 32653 # Guess yes on FreeBSD >= 5. 32654 freebsd[1-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; 32655 freebsd* | kfreebsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 32656 # Guess yes on Mac OS X >= 10.3. 32657 darwin[1-6].*) gl_cv_func_snprintf_truncation_c99="guessing no";; 32658 darwin*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 32659 # Guess yes on OpenBSD >= 3.9. 32660 openbsd[1-2].* | openbsd3.[0-8] | openbsd3.[0-8].*) 32661 gl_cv_func_snprintf_truncation_c99="guessing no";; 32662 openbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 32663 # Guess yes on Solaris >= 2.6. 32664 solaris2.[0-5] | solaris2.[0-5].*) 32665 gl_cv_func_snprintf_truncation_c99="guessing no";; 32666 solaris*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 32667 # Guess yes on AIX >= 4. 32668 aix[1-3]*) gl_cv_func_snprintf_truncation_c99="guessing no";; 32669 aix*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 32670 # Guess yes on HP-UX >= 11. 32671 hpux[7-9]* | hpux10*) gl_cv_func_snprintf_truncation_c99="guessing no";; 32672 hpux*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 32673 # Guess yes on IRIX >= 6.5. 32674 irix6.5) gl_cv_func_snprintf_truncation_c99="guessing yes";; 32675 # Guess yes on OSF/1 >= 5. 32676 osf[3-4]*) gl_cv_func_snprintf_truncation_c99="guessing no";; 32677 osf*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 32678 # Guess yes on NetBSD >= 3. 32679 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) 32680 gl_cv_func_snprintf_truncation_c99="guessing no";; 32681 netbsd*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 32682 # Guess yes on BeOS. 32683 beos*) gl_cv_func_snprintf_truncation_c99="guessing yes";; 32684 # If we don't know, assume the worst. 32685 *) gl_cv_func_snprintf_truncation_c99="guessing no";; 32686 esac 32687 32688else 32689 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32690/* end confdefs.h. */ 32691 32692#include <stdio.h> 32693#include <string.h> 32694#if HAVE_SNPRINTF 32695# define my_snprintf snprintf 32696#else 32697# include <stdarg.h> 32698static int my_snprintf (char *buf, int size, const char *format, ...) 32699{ 32700 va_list args; 32701 int ret; 32702 va_start (args, format); 32703 ret = vsnprintf (buf, size, format, args); 32704 va_end (args); 32705 return ret; 32706} 32707#endif 32708static char buf[100]; 32709int main () 32710{ 32711 strcpy (buf, "ABCDEF"); 32712 my_snprintf (buf, 3, "%d %d", 4567, 89); 32713 if (memcmp (buf, "45\0DEF", 6) != 0) 32714 return 1; 32715 return 0; 32716} 32717_ACEOF 32718if ac_fn_c_try_run "$LINENO"; then : 32719 gl_cv_func_snprintf_truncation_c99=yes 32720else 32721 gl_cv_func_snprintf_truncation_c99=no 32722fi 32723rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 32724 conftest.$ac_objext conftest.beam conftest.$ac_ext 32725fi 32726 32727 32728fi 32729{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_truncation_c99" >&5 32730$as_echo "$gl_cv_func_snprintf_truncation_c99" >&6; } 32731 32732 32733 32734 32735 32736 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf fully supports the 'n' directive" >&5 32737$as_echo_n "checking whether snprintf fully supports the 'n' directive... " >&6; } 32738if ${gl_cv_func_snprintf_directive_n+:} false; then : 32739 $as_echo_n "(cached) " >&6 32740else 32741 32742 if test "$cross_compiling" = yes; then : 32743 32744 case "$host_os" in 32745 # Guess yes on glibc systems. 32746 *-gnu*) gl_cv_func_snprintf_directive_n="guessing yes";; 32747 # Guess yes on FreeBSD >= 5. 32748 freebsd[1-4]*) gl_cv_func_snprintf_directive_n="guessing no";; 32749 freebsd* | kfreebsd*) gl_cv_func_snprintf_directive_n="guessing yes";; 32750 # Guess yes on Mac OS X >= 10.3. 32751 darwin[1-6].*) gl_cv_func_snprintf_directive_n="guessing no";; 32752 darwin*) gl_cv_func_snprintf_directive_n="guessing yes";; 32753 # Guess yes on Solaris >= 2.6. 32754 solaris2.[0-5] | solaris2.[0-5].*) 32755 gl_cv_func_snprintf_directive_n="guessing no";; 32756 solaris*) gl_cv_func_snprintf_directive_n="guessing yes";; 32757 # Guess yes on AIX >= 4. 32758 aix[1-3]*) gl_cv_func_snprintf_directive_n="guessing no";; 32759 aix*) gl_cv_func_snprintf_directive_n="guessing yes";; 32760 # Guess yes on IRIX >= 6.5. 32761 irix6.5) gl_cv_func_snprintf_directive_n="guessing yes";; 32762 # Guess yes on OSF/1 >= 5. 32763 osf[3-4]*) gl_cv_func_snprintf_directive_n="guessing no";; 32764 osf*) gl_cv_func_snprintf_directive_n="guessing yes";; 32765 # Guess yes on NetBSD >= 3. 32766 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) 32767 gl_cv_func_snprintf_directive_n="guessing no";; 32768 netbsd*) gl_cv_func_snprintf_directive_n="guessing yes";; 32769 # Guess yes on BeOS. 32770 beos*) gl_cv_func_snprintf_directive_n="guessing yes";; 32771 # If we don't know, assume the worst. 32772 *) gl_cv_func_snprintf_directive_n="guessing no";; 32773 esac 32774 32775else 32776 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32777/* end confdefs.h. */ 32778 32779#include <stdio.h> 32780#include <string.h> 32781#if HAVE_SNPRINTF 32782# define my_snprintf snprintf 32783#else 32784# include <stdarg.h> 32785static int my_snprintf (char *buf, int size, const char *format, ...) 32786{ 32787 va_list args; 32788 int ret; 32789 va_start (args, format); 32790 ret = vsnprintf (buf, size, format, args); 32791 va_end (args); 32792 return ret; 32793} 32794#endif 32795static char fmtstring[10]; 32796static char buf[100]; 32797int main () 32798{ 32799 int count = -1; 32800 /* Copy the format string. Some systems (glibc with _FORTIFY_SOURCE=2) 32801 support %n in format strings in read-only memory but not in writable 32802 memory. */ 32803 strcpy (fmtstring, "%d %n"); 32804 my_snprintf (buf, 4, fmtstring, 12345, &count, 33, 44, 55); 32805 if (count != 6) 32806 return 1; 32807 return 0; 32808} 32809_ACEOF 32810if ac_fn_c_try_run "$LINENO"; then : 32811 gl_cv_func_snprintf_directive_n=yes 32812else 32813 gl_cv_func_snprintf_directive_n=no 32814fi 32815rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 32816 conftest.$ac_objext conftest.beam conftest.$ac_ext 32817fi 32818 32819 32820fi 32821{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_directive_n" >&5 32822$as_echo "$gl_cv_func_snprintf_directive_n" >&6; } 32823 32824 32825 32826 32827 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether snprintf respects a size of 1" >&5 32828$as_echo_n "checking whether snprintf respects a size of 1... " >&6; } 32829if ${gl_cv_func_snprintf_size1+:} false; then : 32830 $as_echo_n "(cached) " >&6 32831else 32832 32833 if test "$cross_compiling" = yes; then : 32834 gl_cv_func_snprintf_size1="guessing yes" 32835else 32836 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32837/* end confdefs.h. */ 32838 32839#include <stdio.h> 32840#if HAVE_SNPRINTF 32841# define my_snprintf snprintf 32842#else 32843# include <stdarg.h> 32844static int my_snprintf (char *buf, int size, const char *format, ...) 32845{ 32846 va_list args; 32847 int ret; 32848 va_start (args, format); 32849 ret = vsnprintf (buf, size, format, args); 32850 va_end (args); 32851 return ret; 32852} 32853#endif 32854int main() 32855{ 32856 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; 32857 my_snprintf (buf, 1, "%d", 12345); 32858 return buf[1] != 'E'; 32859} 32860_ACEOF 32861if ac_fn_c_try_run "$LINENO"; then : 32862 gl_cv_func_snprintf_size1=yes 32863else 32864 gl_cv_func_snprintf_size1=no 32865fi 32866rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 32867 conftest.$ac_objext conftest.beam conftest.$ac_ext 32868fi 32869 32870 32871fi 32872{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_snprintf_size1" >&5 32873$as_echo "$gl_cv_func_snprintf_size1" >&6; } 32874 32875 32876 32877 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether vsnprintf respects a zero size as in C99" >&5 32878$as_echo_n "checking whether vsnprintf respects a zero size as in C99... " >&6; } 32879if ${gl_cv_func_vsnprintf_zerosize_c99+:} false; then : 32880 $as_echo_n "(cached) " >&6 32881else 32882 32883 if test "$cross_compiling" = yes; then : 32884 32885 case "$host_os" in 32886 # Guess yes on glibc systems. 32887 *-gnu*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 32888 # Guess yes on FreeBSD >= 5. 32889 freebsd[1-4]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; 32890 freebsd* | kfreebsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 32891 # Guess yes on Mac OS X >= 10.3. 32892 darwin[1-6].*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; 32893 darwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 32894 # Guess yes on Cygwin. 32895 cygwin*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 32896 # Guess yes on Solaris >= 2.6. 32897 solaris2.[0-5] | solaris2.[0-5].*) 32898 gl_cv_func_vsnprintf_zerosize_c99="guessing no";; 32899 solaris*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 32900 # Guess yes on AIX >= 4. 32901 aix[1-3]*) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; 32902 aix*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 32903 # Guess yes on IRIX >= 6.5. 32904 irix6.5) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 32905 # Guess yes on NetBSD >= 3. 32906 netbsd[1-2]* | netbsdelf[1-2]* | netbsdaout[1-2]* | netbsdcoff[1-2]*) 32907 gl_cv_func_vsnprintf_zerosize_c99="guessing no";; 32908 netbsd*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 32909 # Guess yes on BeOS. 32910 beos*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 32911 # Guess yes on mingw. 32912 mingw* | pw*) gl_cv_func_vsnprintf_zerosize_c99="guessing yes";; 32913 # If we don't know, assume the worst. 32914 *) gl_cv_func_vsnprintf_zerosize_c99="guessing no";; 32915 esac 32916 32917else 32918 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 32919/* end confdefs.h. */ 32920 32921#include <stdarg.h> 32922#include <stdio.h> 32923static int my_snprintf (char *buf, int size, const char *format, ...) 32924{ 32925 va_list args; 32926 int ret; 32927 va_start (args, format); 32928 ret = vsnprintf (buf, size, format, args); 32929 va_end (args); 32930 return ret; 32931} 32932int main() 32933{ 32934 static char buf[8] = { 'D', 'E', 'A', 'D', 'B', 'E', 'E', 'F' }; 32935 my_snprintf (buf, 0, "%d", 12345); 32936 return buf[0] != 'D'; 32937} 32938_ACEOF 32939if ac_fn_c_try_run "$LINENO"; then : 32940 gl_cv_func_vsnprintf_zerosize_c99=yes 32941else 32942 gl_cv_func_vsnprintf_zerosize_c99=no 32943fi 32944rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 32945 conftest.$ac_objext conftest.beam conftest.$ac_ext 32946fi 32947 32948 32949fi 32950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_vsnprintf_zerosize_c99" >&5 32951$as_echo "$gl_cv_func_vsnprintf_zerosize_c99" >&6; } 32952 32953 case "$gl_cv_func_printf_sizes_c99" in 32954 *yes) 32955 case "$gl_cv_func_printf_long_double" in 32956 *yes) 32957 case "$gl_cv_func_printf_infinite" in 32958 *yes) 32959 case "$gl_cv_func_printf_infinite_long_double" in 32960 *yes) 32961 case "$gl_cv_func_printf_directive_a" in 32962 *yes) 32963 case "$gl_cv_func_printf_directive_f" in 32964 *yes) 32965 case "$gl_cv_func_printf_directive_n" in 32966 *yes) 32967 case "$gl_cv_func_printf_directive_ls" in 32968 *yes) 32969 case "$gl_cv_func_printf_positions" in 32970 *yes) 32971 case "$gl_cv_func_printf_flag_grouping" in 32972 *yes) 32973 case "$gl_cv_func_printf_flag_leftadjust" in 32974 *yes) 32975 case "$gl_cv_func_printf_flag_zero" in 32976 *yes) 32977 case "$gl_cv_func_printf_precision" in 32978 *yes) 32979 case "$gl_cv_func_printf_enomem" in 32980 *yes) 32981 case "$gl_cv_func_snprintf_truncation_c99" in 32982 *yes) 32983 case "$gl_cv_func_snprintf_retval_c99" in 32984 *yes) 32985 case "$gl_cv_func_snprintf_directive_n" in 32986 *yes) 32987 case "$gl_cv_func_snprintf_size1" in 32988 *yes) 32989 case "$gl_cv_func_vsnprintf_zerosize_c99" in 32990 *yes) 32991 # vsnprintf exists and is 32992 # already POSIX compliant. 32993 gl_cv_func_vsnprintf_posix=yes 32994 ;; 32995 esac 32996 ;; 32997 esac 32998 ;; 32999 esac 33000 ;; 33001 esac 33002 ;; 33003 esac 33004 ;; 33005 esac 33006 ;; 33007 esac 33008 ;; 33009 esac 33010 ;; 33011 esac 33012 ;; 33013 esac 33014 ;; 33015 esac 33016 ;; 33017 esac 33018 ;; 33019 esac 33020 ;; 33021 esac 33022 ;; 33023 esac 33024 ;; 33025 esac 33026 ;; 33027 esac 33028 ;; 33029 esac 33030 ;; 33031 esac 33032 fi 33033 if test $gl_cv_func_vsnprintf_posix = no; then 33034 33035 33036 33037 case "$gl_cv_func_printf_infinite" in 33038 *yes) 33039 ;; 33040 *) 33041 33042$as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h 33043 33044 ;; 33045 esac 33046 33047 33048 33049 33050 case "$gl_cv_func_printf_long_double" in 33051 *yes) 33052 case "$gl_cv_func_printf_infinite_long_double" in 33053 *yes) 33054 ;; 33055 *) 33056 33057$as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h 33058 33059 ;; 33060 esac 33061 ;; 33062 esac 33063 33064 33065 33066 case "$gl_cv_func_printf_directive_a" in 33067 *yes) 33068 ;; 33069 *) 33070 33071$as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h 33072 33073 for ac_func in nl_langinfo 33074do : 33075 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" 33076if test "x$ac_cv_func_nl_langinfo" = xyes; then : 33077 cat >>confdefs.h <<_ACEOF 33078#define HAVE_NL_LANGINFO 1 33079_ACEOF 33080 33081fi 33082done 33083 33084 ;; 33085 esac 33086 33087 33088 33089 case "$gl_cv_func_printf_directive_f" in 33090 *yes) 33091 ;; 33092 *) 33093 33094$as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h 33095 33096 ;; 33097 esac 33098 33099 33100 33101 case "$gl_cv_func_printf_directive_ls" in 33102 *yes) 33103 ;; 33104 *) 33105 33106$as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h 33107 33108 ;; 33109 esac 33110 33111 33112 33113 case "$gl_cv_func_printf_flag_grouping" in 33114 *yes) 33115 ;; 33116 *) 33117 33118$as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h 33119 33120 ;; 33121 esac 33122 33123 33124 33125 case "$gl_cv_func_printf_flag_leftadjust" in 33126 *yes) 33127 ;; 33128 *) 33129 33130$as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h 33131 33132 ;; 33133 esac 33134 33135 33136 33137 case "$gl_cv_func_printf_flag_zero" in 33138 *yes) 33139 ;; 33140 *) 33141 33142$as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h 33143 33144 ;; 33145 esac 33146 33147 33148 33149 case "$gl_cv_func_printf_precision" in 33150 *yes) 33151 ;; 33152 *) 33153 33154$as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h 33155 33156 33157$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h 33158 33159 33160$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h 33161 33162 ;; 33163 esac 33164 33165 33166 33167 case "$gl_cv_func_printf_enomem" in 33168 *yes) 33169 ;; 33170 *) 33171 33172$as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h 33173 33174 33175$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h 33176 33177 33178$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h 33179 33180 ;; 33181 esac 33182 33183 33184 33185 33186 33187 33188 33189 33190 33191 33192 33193 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" 33194 33195 33196 33197 33198 33199 33200 33201 33202 33203 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" 33204 33205 33206 33207 33208 33209 33210 33211 33212 33213 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" 33214 33215 33216 33217 33218 33219 33220 33221 33222 33223 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" 33224 33225 if test $ac_cv_func_vasnprintf = yes; then 33226 33227$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h 33228 33229 fi 33230 33231 33232 33233 33234 33235 33236 33237 33238 33239 33240 33241 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" 33242if test "x$ac_cv_type_ptrdiff_t" = xyes; then : 33243 33244else 33245 33246$as_echo "#define ptrdiff_t long" >>confdefs.h 33247 33248 33249fi 33250 33251 33252 33253 33254 33255 33256 33257 33258 33259 33260 33261 33262 33263 33264 33265 33266 33267 gl_LIBOBJS="$gl_LIBOBJS vsnprintf.$ac_objext" 33268 33269 if test $ac_cv_func_vsnprintf = yes; then 33270 REPLACE_VSNPRINTF=1 33271 fi 33272 : 33273 33274 fi 33275 33276 33277 33278 33279 33280 33281 33282 33283 33284 33285 33286 33287 33288 33289 33290 33291 gl_cv_func_vsprintf_posix=no 33292 case "$gl_cv_func_printf_sizes_c99" in 33293 *yes) 33294 case "$gl_cv_func_printf_long_double" in 33295 *yes) 33296 case "$gl_cv_func_printf_infinite" in 33297 *yes) 33298 case "$gl_cv_func_printf_infinite_long_double" in 33299 *yes) 33300 case "$gl_cv_func_printf_directive_a" in 33301 *yes) 33302 case "$gl_cv_func_printf_directive_f" in 33303 *yes) 33304 case "$gl_cv_func_printf_directive_n" in 33305 *yes) 33306 case "$gl_cv_func_printf_directive_ls" in 33307 *yes) 33308 case "$gl_cv_func_printf_positions" in 33309 *yes) 33310 case "$gl_cv_func_printf_flag_grouping" in 33311 *yes) 33312 case "$gl_cv_func_printf_flag_leftadjust" in 33313 *yes) 33314 case "$gl_cv_func_printf_flag_zero" in 33315 *yes) 33316 case "$gl_cv_func_printf_precision" in 33317 *yes) 33318 case "$gl_cv_func_printf_enomem" in 33319 *yes) 33320 # vsprintf exists and is 33321 # already POSIX compliant. 33322 gl_cv_func_vsprintf_posix=yes 33323 ;; 33324 esac 33325 ;; 33326 esac 33327 ;; 33328 esac 33329 ;; 33330 esac 33331 ;; 33332 esac 33333 ;; 33334 esac 33335 ;; 33336 esac 33337 ;; 33338 esac 33339 ;; 33340 esac 33341 ;; 33342 esac 33343 ;; 33344 esac 33345 ;; 33346 esac 33347 ;; 33348 esac 33349 ;; 33350 esac 33351 if test $gl_cv_func_vsprintf_posix = no; then 33352 33353 33354 33355 case "$gl_cv_func_printf_infinite" in 33356 *yes) 33357 ;; 33358 *) 33359 33360$as_echo "#define NEED_PRINTF_INFINITE_DOUBLE 1" >>confdefs.h 33361 33362 ;; 33363 esac 33364 33365 33366 33367 33368 case "$gl_cv_func_printf_long_double" in 33369 *yes) 33370 case "$gl_cv_func_printf_infinite_long_double" in 33371 *yes) 33372 ;; 33373 *) 33374 33375$as_echo "#define NEED_PRINTF_INFINITE_LONG_DOUBLE 1" >>confdefs.h 33376 33377 ;; 33378 esac 33379 ;; 33380 esac 33381 33382 33383 33384 case "$gl_cv_func_printf_directive_a" in 33385 *yes) 33386 ;; 33387 *) 33388 33389$as_echo "#define NEED_PRINTF_DIRECTIVE_A 1" >>confdefs.h 33390 33391 for ac_func in nl_langinfo 33392do : 33393 ac_fn_c_check_func "$LINENO" "nl_langinfo" "ac_cv_func_nl_langinfo" 33394if test "x$ac_cv_func_nl_langinfo" = xyes; then : 33395 cat >>confdefs.h <<_ACEOF 33396#define HAVE_NL_LANGINFO 1 33397_ACEOF 33398 33399fi 33400done 33401 33402 ;; 33403 esac 33404 33405 33406 33407 case "$gl_cv_func_printf_directive_f" in 33408 *yes) 33409 ;; 33410 *) 33411 33412$as_echo "#define NEED_PRINTF_DIRECTIVE_F 1" >>confdefs.h 33413 33414 ;; 33415 esac 33416 33417 33418 33419 case "$gl_cv_func_printf_directive_ls" in 33420 *yes) 33421 ;; 33422 *) 33423 33424$as_echo "#define NEED_PRINTF_DIRECTIVE_LS 1" >>confdefs.h 33425 33426 ;; 33427 esac 33428 33429 33430 33431 case "$gl_cv_func_printf_flag_grouping" in 33432 *yes) 33433 ;; 33434 *) 33435 33436$as_echo "#define NEED_PRINTF_FLAG_GROUPING 1" >>confdefs.h 33437 33438 ;; 33439 esac 33440 33441 33442 33443 case "$gl_cv_func_printf_flag_leftadjust" in 33444 *yes) 33445 ;; 33446 *) 33447 33448$as_echo "#define NEED_PRINTF_FLAG_LEFTADJUST 1" >>confdefs.h 33449 33450 ;; 33451 esac 33452 33453 33454 33455 case "$gl_cv_func_printf_flag_zero" in 33456 *yes) 33457 ;; 33458 *) 33459 33460$as_echo "#define NEED_PRINTF_FLAG_ZERO 1" >>confdefs.h 33461 33462 ;; 33463 esac 33464 33465 33466 33467 case "$gl_cv_func_printf_precision" in 33468 *yes) 33469 ;; 33470 *) 33471 33472$as_echo "#define NEED_PRINTF_UNBOUNDED_PRECISION 1" >>confdefs.h 33473 33474 33475$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h 33476 33477 33478$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h 33479 33480 ;; 33481 esac 33482 33483 33484 33485 case "$gl_cv_func_printf_enomem" in 33486 *yes) 33487 ;; 33488 *) 33489 33490$as_echo "#define NEED_PRINTF_ENOMEM 1" >>confdefs.h 33491 33492 33493$as_echo "#define NEED_PRINTF_DOUBLE 1" >>confdefs.h 33494 33495 33496$as_echo "#define NEED_PRINTF_LONG_DOUBLE 1" >>confdefs.h 33497 33498 ;; 33499 esac 33500 33501 33502 33503 33504 33505 33506 33507 33508 33509 33510 33511 gl_LIBOBJS="$gl_LIBOBJS vasnprintf.$ac_objext" 33512 33513 33514 33515 33516 33517 33518 33519 33520 33521 gl_LIBOBJS="$gl_LIBOBJS printf-args.$ac_objext" 33522 33523 33524 33525 33526 33527 33528 33529 33530 33531 gl_LIBOBJS="$gl_LIBOBJS printf-parse.$ac_objext" 33532 33533 33534 33535 33536 33537 33538 33539 33540 33541 gl_LIBOBJS="$gl_LIBOBJS asnprintf.$ac_objext" 33542 33543 if test $ac_cv_func_vasnprintf = yes; then 33544 33545$as_echo "#define REPLACE_VASNPRINTF 1" >>confdefs.h 33546 33547 fi 33548 33549 33550 33551 33552 33553 33554 33555 33556 33557 33558 33559 ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" 33560if test "x$ac_cv_type_ptrdiff_t" = xyes; then : 33561 33562else 33563 33564$as_echo "#define ptrdiff_t long" >>confdefs.h 33565 33566 33567fi 33568 33569 33570 33571 33572 33573 33574 33575 33576 33577 33578 33579 33580 33581 33582 33583 33584 33585 gl_LIBOBJS="$gl_LIBOBJS vsprintf.$ac_objext" 33586 33587 REPLACE_VSPRINTF=1 33588 : 33589 33590 fi 33591 33592 33593 33594 33595 33596 33597 GNULIB_VSPRINTF_POSIX=1 33598 33599 33600 33601 33602 33603$as_echo "#define GNULIB_TEST_VSPRINTF_POSIX 1" >>confdefs.h 33604 33605 33606 33607 33608 33609 for ac_func in waitid 33610do : 33611 ac_fn_c_check_func "$LINENO" "waitid" "ac_cv_func_waitid" 33612if test "x$ac_cv_func_waitid" = xyes; then : 33613 cat >>confdefs.h <<_ACEOF 33614#define HAVE_WAITID 1 33615_ACEOF 33616 33617fi 33618done 33619 33620 33621 33622 33623 HAVE_WAITPID=1 33624 case $host_os in 33625 mingw*) HAVE_WAITPID=0 ;; 33626 esac 33627 33628 if test $HAVE_WAITPID = 0; then 33629 33630 33631 33632 33633 33634 33635 33636 33637 gl_LIBOBJS="$gl_LIBOBJS waitpid.$ac_objext" 33638 33639 fi 33640 33641 33642 33643 33644 33645 GNULIB_WAITPID=1 33646 33647 33648 33649 33650 33651$as_echo "#define GNULIB_TEST_WAITPID 1" >>confdefs.h 33652 33653 33654 33655 33656 33657 33658 33659 33660 33661 33662 33663 33664 33665 33666 33667 if test $gl_cv_have_include_next = yes; then 33668 gl_cv_next_wchar_h='<'wchar.h'>' 33669 else 33670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wchar.h>" >&5 33671$as_echo_n "checking absolute name of <wchar.h>... " >&6; } 33672if ${gl_cv_next_wchar_h+:} false; then : 33673 $as_echo_n "(cached) " >&6 33674else 33675 33676 if test $ac_cv_header_wchar_h = yes; then 33677 33678 33679 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 33680/* end confdefs.h. */ 33681#include <wchar.h> 33682 33683_ACEOF 33684 case "$host_os" in 33685 aix*) gl_absname_cpp="$ac_cpp -C" ;; 33686 *) gl_absname_cpp="$ac_cpp" ;; 33687 esac 33688 33689 case "$host_os" in 33690 mingw*) 33691 gl_dirsep_regex='[/\\]' 33692 ;; 33693 *) 33694 gl_dirsep_regex='\/' 33695 ;; 33696 esac 33697 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 33698 33699 gl_header_literal_regex=`echo 'wchar.h' \ 33700 | sed -e "$gl_make_literal_regex_sed"` 33701 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 33702 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 33703 s|^/[^/]|//&| 33704 p 33705 q 33706 }' 33707 gl_cv_next_wchar_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 33708 sed -n "$gl_absolute_header_sed"`'"' 33709 else 33710 gl_cv_next_wchar_h='<'wchar.h'>' 33711 fi 33712 33713 33714fi 33715{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wchar_h" >&5 33716$as_echo "$gl_cv_next_wchar_h" >&6; } 33717 fi 33718 NEXT_WCHAR_H=$gl_cv_next_wchar_h 33719 33720 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 33721 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 33722 gl_next_as_first_directive='<'wchar.h'>' 33723 else 33724 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 33725 gl_next_as_first_directive=$gl_cv_next_wchar_h 33726 fi 33727 NEXT_AS_FIRST_DIRECTIVE_WCHAR_H=$gl_next_as_first_directive 33728 33729 33730 33731 33732 if test $ac_cv_header_wchar_h = yes; then 33733 HAVE_WCHAR_H=1 33734 else 33735 HAVE_WCHAR_H=0 33736 fi 33737 33738 33739 33740 33741 33742 if test $gt_cv_c_wint_t = yes; then 33743 HAVE_WINT_T=1 33744 else 33745 HAVE_WINT_T=0 33746 fi 33747 33748 33749 33750 for gl_func in btowc wctob mbsinit mbrtowc mbrlen mbsrtowcs mbsnrtowcs wcrtomb wcsrtombs wcsnrtombs wcwidth wmemchr wmemcmp wmemcpy wmemmove wmemset wcslen wcsnlen wcscpy wcpcpy wcsncpy wcpncpy wcscat wcsncat wcscmp wcsncmp wcscasecmp wcsncasecmp wcscoll wcsxfrm wcsdup wcschr wcsrchr wcscspn wcsspn wcspbrk wcsstr wcstok wcswidth ; do 33751 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` 33752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 33753$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } 33754if eval \${$as_gl_Symbol+:} false; then : 33755 $as_echo_n "(cached) " >&6 33756else 33757 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 33758/* end confdefs.h. */ 33759 33760/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 33761 <wchar.h>. 33762 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 33763 included before <wchar.h>. */ 33764#if !(defined __GLIBC__ && !defined __UCLIBC__) 33765# include <stddef.h> 33766# include <stdio.h> 33767# include <time.h> 33768#endif 33769#include <wchar.h> 33770 33771int 33772main () 33773{ 33774#undef $gl_func 33775 (void) $gl_func; 33776 ; 33777 return 0; 33778} 33779_ACEOF 33780if ac_fn_c_try_compile "$LINENO"; then : 33781 eval "$as_gl_Symbol=yes" 33782else 33783 eval "$as_gl_Symbol=no" 33784fi 33785rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 33786fi 33787eval ac_res=\$$as_gl_Symbol 33788 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 33789$as_echo "$ac_res" >&6; } 33790 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : 33791 cat >>confdefs.h <<_ACEOF 33792#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 33793_ACEOF 33794 33795 eval ac_cv_have_decl_$gl_func=yes 33796fi 33797 done 33798 33799 33800 33801 33802 33803 33804 33805 if test $ac_cv_func_iswcntrl = yes; then 33806 HAVE_ISWCNTRL=1 33807 else 33808 HAVE_ISWCNTRL=0 33809 fi 33810 33811 33812 33813 if test $gt_cv_c_wint_t = yes; then 33814 HAVE_WINT_T=1 33815 else 33816 HAVE_WINT_T=0 33817 fi 33818 33819 33820 33821 33822 33823 33824 33825 33826 33827 33828 33829 if test $gl_cv_have_include_next = yes; then 33830 gl_cv_next_wctype_h='<'wctype.h'>' 33831 else 33832 { $as_echo "$as_me:${as_lineno-$LINENO}: checking absolute name of <wctype.h>" >&5 33833$as_echo_n "checking absolute name of <wctype.h>... " >&6; } 33834if ${gl_cv_next_wctype_h+:} false; then : 33835 $as_echo_n "(cached) " >&6 33836else 33837 33838 if test $ac_cv_header_wctype_h = yes; then 33839 33840 33841 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 33842/* end confdefs.h. */ 33843#include <wctype.h> 33844 33845_ACEOF 33846 case "$host_os" in 33847 aix*) gl_absname_cpp="$ac_cpp -C" ;; 33848 *) gl_absname_cpp="$ac_cpp" ;; 33849 esac 33850 33851 case "$host_os" in 33852 mingw*) 33853 gl_dirsep_regex='[/\\]' 33854 ;; 33855 *) 33856 gl_dirsep_regex='\/' 33857 ;; 33858 esac 33859 gl_make_literal_regex_sed='s,[]$^\\.*/[],\\&,g' 33860 33861 gl_header_literal_regex=`echo 'wctype.h' \ 33862 | sed -e "$gl_make_literal_regex_sed"` 33863 gl_absolute_header_sed="/${gl_dirsep_regex}${gl_header_literal_regex}/"'{ 33864 s/.*"\(.*'"${gl_dirsep_regex}${gl_header_literal_regex}"'\)".*/\1/ 33865 s|^/[^/]|//&| 33866 p 33867 q 33868 }' 33869 gl_cv_next_wctype_h='"'`(eval "$gl_absname_cpp conftest.$ac_ext") 2>&5 | 33870 sed -n "$gl_absolute_header_sed"`'"' 33871 else 33872 gl_cv_next_wctype_h='<'wctype.h'>' 33873 fi 33874 33875 33876fi 33877{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_next_wctype_h" >&5 33878$as_echo "$gl_cv_next_wctype_h" >&6; } 33879 fi 33880 NEXT_WCTYPE_H=$gl_cv_next_wctype_h 33881 33882 if test $gl_cv_have_include_next = yes || test $gl_cv_have_include_next = buggy; then 33883 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include_next' 33884 gl_next_as_first_directive='<'wctype.h'>' 33885 else 33886 # INCLUDE_NEXT_AS_FIRST_DIRECTIVE='include' 33887 gl_next_as_first_directive=$gl_cv_next_wctype_h 33888 fi 33889 NEXT_AS_FIRST_DIRECTIVE_WCTYPE_H=$gl_next_as_first_directive 33890 33891 33892 33893 33894 if test $ac_cv_header_wctype_h = yes; then 33895 if test $ac_cv_func_iswcntrl = yes; then 33896 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether iswcntrl works" >&5 33897$as_echo_n "checking whether iswcntrl works... " >&6; } 33898if ${gl_cv_func_iswcntrl_works+:} false; then : 33899 $as_echo_n "(cached) " >&6 33900else 33901 33902 if test "$cross_compiling" = yes; then : 33903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 33904/* end confdefs.h. */ 33905#include <stdlib.h> 33906 #if __GNU_LIBRARY__ == 1 33907 Linux libc5 i18n is broken. 33908 #endif 33909int 33910main () 33911{ 33912 33913 ; 33914 return 0; 33915} 33916_ACEOF 33917if ac_fn_c_try_compile "$LINENO"; then : 33918 gl_cv_func_iswcntrl_works="guessing yes" 33919else 33920 gl_cv_func_iswcntrl_works="guessing no" 33921fi 33922rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 33923 33924else 33925 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 33926/* end confdefs.h. */ 33927 33928 /* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be 33929 included before <wchar.h>. 33930 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> 33931 must be included before <wchar.h>. */ 33932 #include <stddef.h> 33933 #include <stdio.h> 33934 #include <time.h> 33935 #include <wchar.h> 33936 #include <wctype.h> 33937 int main () { return iswprint ('x') == 0; } 33938 33939_ACEOF 33940if ac_fn_c_try_run "$LINENO"; then : 33941 gl_cv_func_iswcntrl_works=yes 33942else 33943 gl_cv_func_iswcntrl_works=no 33944fi 33945rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 33946 conftest.$ac_objext conftest.beam conftest.$ac_ext 33947fi 33948 33949 33950fi 33951{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_iswcntrl_works" >&5 33952$as_echo "$gl_cv_func_iswcntrl_works" >&6; } 33953 fi 33954 HAVE_WCTYPE_H=1 33955 else 33956 HAVE_WCTYPE_H=0 33957 fi 33958 33959 33960 case "$gl_cv_func_iswcntrl_works" in 33961 *yes) REPLACE_ISWCNTRL=0 ;; 33962 *) REPLACE_ISWCNTRL=1 ;; 33963 esac 33964 33965 33966 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_ISWCNTRL = 1; then 33967 : 33968 fi 33969 33970 if test $REPLACE_ISWCNTRL = 1; then 33971 REPLACE_TOWLOWER=1 33972 else 33973 for ac_func in towlower 33974do : 33975 ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower" 33976if test "x$ac_cv_func_towlower" = xyes; then : 33977 cat >>confdefs.h <<_ACEOF 33978#define HAVE_TOWLOWER 1 33979_ACEOF 33980 33981fi 33982done 33983 33984 if test $ac_cv_func_towlower = yes; then 33985 REPLACE_TOWLOWER=0 33986 else 33987 ac_fn_c_check_decl "$LINENO" "towlower" "ac_cv_have_decl_towlower" "/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be 33988 included before <wchar.h>. 33989 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> 33990 must be included before <wchar.h>. */ 33991 #include <stddef.h> 33992 #include <stdio.h> 33993 #include <time.h> 33994 #include <wchar.h> 33995 #if HAVE_WCTYPE_H 33996 # include <wctype.h> 33997 #endif 33998 33999" 34000if test "x$ac_cv_have_decl_towlower" = xyes; then : 34001 ac_have_decl=1 34002else 34003 ac_have_decl=0 34004fi 34005 34006cat >>confdefs.h <<_ACEOF 34007#define HAVE_DECL_TOWLOWER $ac_have_decl 34008_ACEOF 34009 34010 if test $ac_cv_have_decl_towlower = yes; then 34011 REPLACE_TOWLOWER=1 34012 else 34013 REPLACE_TOWLOWER=0 34014 fi 34015 fi 34016 fi 34017 34018 34019 if test $HAVE_ISWCNTRL = 0 || test $REPLACE_TOWLOWER = 1; then 34020 : 34021 fi 34022 34023 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctype_t" >&5 34024$as_echo_n "checking for wctype_t... " >&6; } 34025if ${gl_cv_type_wctype_t+:} false; then : 34026 $as_echo_n "(cached) " >&6 34027else 34028 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 34029/* end confdefs.h. */ 34030/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be 34031 included before <wchar.h>. 34032 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> 34033 must be included before <wchar.h>. */ 34034 #include <stddef.h> 34035 #include <stdio.h> 34036 #include <time.h> 34037 #include <wchar.h> 34038 #if HAVE_WCTYPE_H 34039 # include <wctype.h> 34040 #endif 34041 wctype_t a; 34042 34043int 34044main () 34045{ 34046 34047 ; 34048 return 0; 34049} 34050_ACEOF 34051if ac_fn_c_try_compile "$LINENO"; then : 34052 gl_cv_type_wctype_t=yes 34053else 34054 gl_cv_type_wctype_t=no 34055fi 34056rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 34057 34058fi 34059{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctype_t" >&5 34060$as_echo "$gl_cv_type_wctype_t" >&6; } 34061 if test $gl_cv_type_wctype_t = no; then 34062 HAVE_WCTYPE_T=0 34063 fi 34064 34065 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for wctrans_t" >&5 34066$as_echo_n "checking for wctrans_t... " >&6; } 34067if ${gl_cv_type_wctrans_t+:} false; then : 34068 $as_echo_n "(cached) " >&6 34069else 34070 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 34071/* end confdefs.h. */ 34072/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be 34073 included before <wchar.h>. 34074 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> 34075 must be included before <wchar.h>. */ 34076 #include <stddef.h> 34077 #include <stdio.h> 34078 #include <time.h> 34079 #include <wchar.h> 34080 #include <wctype.h> 34081 wctrans_t a; 34082 34083int 34084main () 34085{ 34086 34087 ; 34088 return 0; 34089} 34090_ACEOF 34091if ac_fn_c_try_compile "$LINENO"; then : 34092 gl_cv_type_wctrans_t=yes 34093else 34094 gl_cv_type_wctrans_t=no 34095fi 34096rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 34097 34098fi 34099{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wctrans_t" >&5 34100$as_echo "$gl_cv_type_wctrans_t" >&6; } 34101 if test $gl_cv_type_wctrans_t = no; then 34102 HAVE_WCTRANS_T=0 34103 fi 34104 34105 34106 for gl_func in wctype iswctype wctrans towctrans ; do 34107 as_gl_Symbol=`$as_echo "gl_cv_have_raw_decl_$gl_func" | $as_tr_sh` 34108 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $gl_func is declared without a macro" >&5 34109$as_echo_n "checking whether $gl_func is declared without a macro... " >&6; } 34110if eval \${$as_gl_Symbol+:} false; then : 34111 $as_echo_n "(cached) " >&6 34112else 34113 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 34114/* end confdefs.h. */ 34115 34116/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 34117 <wchar.h>. 34118 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be 34119 included before <wchar.h>. */ 34120#if !(defined __GLIBC__ && !defined __UCLIBC__) 34121# include <stddef.h> 34122# include <stdio.h> 34123# include <time.h> 34124# include <wchar.h> 34125#endif 34126#include <wctype.h> 34127 34128int 34129main () 34130{ 34131#undef $gl_func 34132 (void) $gl_func; 34133 ; 34134 return 0; 34135} 34136_ACEOF 34137if ac_fn_c_try_compile "$LINENO"; then : 34138 eval "$as_gl_Symbol=yes" 34139else 34140 eval "$as_gl_Symbol=no" 34141fi 34142rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext 34143fi 34144eval ac_res=\$$as_gl_Symbol 34145 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 34146$as_echo "$ac_res" >&6; } 34147 if eval test \"x\$"$as_gl_Symbol"\" = x"yes"; then : 34148 cat >>confdefs.h <<_ACEOF 34149#define `$as_echo "HAVE_RAW_DECL_$gl_func" | $as_tr_cpp` 1 34150_ACEOF 34151 34152 eval ac_cv_have_decl_$gl_func=yes 34153fi 34154 done 34155 34156 34157 34158 34159 34160 34161 34162 34163 34164 34165 34166 34167 34168 ac_fn_c_check_decl "$LINENO" "wcwidth" "ac_cv_have_decl_wcwidth" " 34169/* AIX 3.2.5 declares wcwidth in <string.h>. */ 34170#include <string.h> 34171/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 34172 <wchar.h>. 34173 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included 34174 before <wchar.h>. */ 34175#include <stddef.h> 34176#include <stdio.h> 34177#include <time.h> 34178#include <wchar.h> 34179 34180" 34181if test "x$ac_cv_have_decl_wcwidth" = xyes; then : 34182 ac_have_decl=1 34183else 34184 ac_have_decl=0 34185fi 34186 34187cat >>confdefs.h <<_ACEOF 34188#define HAVE_DECL_WCWIDTH $ac_have_decl 34189_ACEOF 34190 34191 if test $ac_cv_have_decl_wcwidth != yes; then 34192 HAVE_DECL_WCWIDTH=0 34193 fi 34194 34195 if test $ac_cv_func_wcwidth = yes; then 34196 HAVE_WCWIDTH=1 34197 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether wcwidth works reasonably in UTF-8 locales" >&5 34198$as_echo_n "checking whether wcwidth works reasonably in UTF-8 locales... " >&6; } 34199if ${gl_cv_func_wcwidth_works+:} false; then : 34200 $as_echo_n "(cached) " >&6 34201else 34202 34203 if test "$cross_compiling" = yes; then : 34204 34205 case "$host_os" in 34206 # Guess yes on glibc and AIX 7 systems. 34207 *-gnu* | aix[7-9]*) gl_cv_func_wcwidth_works="guessing yes";; 34208 *) gl_cv_func_wcwidth_works="guessing no";; 34209 esac 34210 34211else 34212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 34213/* end confdefs.h. */ 34214 34215#include <locale.h> 34216/* AIX 3.2.5 declares wcwidth in <string.h>. */ 34217#include <string.h> 34218/* Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before 34219 <wchar.h>. 34220 BSD/OS 4.0.1 has a bug: <stddef.h>, <stdio.h> and <time.h> must be included 34221 before <wchar.h>. */ 34222#include <stddef.h> 34223#include <stdio.h> 34224#include <time.h> 34225#include <wchar.h> 34226#if !HAVE_DECL_WCWIDTH 34227extern 34228# ifdef __cplusplus 34229"C" 34230# endif 34231int wcwidth (int); 34232#endif 34233int main () 34234{ 34235 int result = 0; 34236 if (setlocale (LC_ALL, "fr_FR.UTF-8") != NULL) 34237 { 34238 if (wcwidth (0x0301) > 0) 34239 result |= 1; 34240 if (wcwidth (0x05B0) > 0) 34241 result |= 2; 34242 if (wcwidth (0x200B) > 0) 34243 result |= 4; 34244 } 34245 return result; 34246} 34247_ACEOF 34248if ac_fn_c_try_run "$LINENO"; then : 34249 gl_cv_func_wcwidth_works=yes 34250else 34251 gl_cv_func_wcwidth_works=no 34252fi 34253rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 34254 conftest.$ac_objext conftest.beam conftest.$ac_ext 34255fi 34256 34257 34258fi 34259{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gl_cv_func_wcwidth_works" >&5 34260$as_echo "$gl_cv_func_wcwidth_works" >&6; } 34261 case "$gl_cv_func_wcwidth_works" in 34262 *yes) ;; 34263 *no) REPLACE_WCWIDTH=1 ;; 34264 esac 34265 else 34266 HAVE_WCWIDTH=0 34267 fi 34268 34269 if test $HAVE_WCWIDTH = 0 || test $REPLACE_WCWIDTH = 1; then 34270 34271 34272 34273 34274 34275 34276 34277 34278 gl_LIBOBJS="$gl_LIBOBJS wcwidth.$ac_objext" 34279 34280 fi 34281 34282 34283 34284 34285 34286 GNULIB_WCWIDTH=1 34287 34288 34289 34290 34291 34292$as_echo "#define GNULIB_TEST_WCWIDTH 1" >>confdefs.h 34293 34294 34295 34296 : 34297 34298 34299 34300 34301 34302 34303 34304 34305 gl_LIBOBJS="$gl_LIBOBJS xmemdup0.$ac_objext" 34306 34307 34308 34309 for ac_header in stdint.h 34310do : 34311 ac_fn_c_check_header_mongrel "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" 34312if test "x$ac_cv_header_stdint_h" = xyes; then : 34313 cat >>confdefs.h <<_ACEOF 34314#define HAVE_STDINT_H 1 34315_ACEOF 34316 34317fi 34318 34319done 34320 34321 34322 34323 34324 : 34325 34326 34327 # End of code from modules 34328 34329 34330 34331 34332 34333 34334 34335 34336 34337 gltests_libdeps= 34338 gltests_ltlibdeps= 34339 34340 34341 34342 34343 34344 34345 34346 34347 34348 gl_source_base='tests' 34349 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 34350 34351 gl_module_indicator_condition=$gltests_WITNESS 34352 34353 34354 34355 34356 34357 34358 34359 34360 34361 LIBBISON_LIBDEPS="$gl_libdeps" 34362 34363 LIBBISON_LTLIBDEPS="$gl_ltlibdeps" 34364 34365 34366 34367# Checks for library functions. 34368 34369 34370 34371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking if malloc debugging is wanted" >&5 34372$as_echo_n "checking if malloc debugging is wanted... " >&6; } 34373 34374# Check whether --with-dmalloc was given. 34375if test "${with_dmalloc+set}" = set; then : 34376 withval=$with_dmalloc; if test "$withval" = yes; then 34377 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 34378$as_echo "yes" >&6; } 34379 34380$as_echo "#define WITH_DMALLOC 1" >>confdefs.h 34381 34382 LIBS="$LIBS -ldmalloc" 34383 LDFLAGS="$LDFLAGS -g" 34384else 34385 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 34386$as_echo "no" >&6; } 34387fi 34388else 34389 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 34390$as_echo "no" >&6; } 34391fi 34392 34393 34394for ac_header in sys/time.h sys/times.h 34395do : 34396 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` 34397ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" 34398if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : 34399 cat >>confdefs.h <<_ACEOF 34400#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 34401_ACEOF 34402 34403fi 34404 34405done 34406 34407 for ac_header in sys/resource.h 34408do : 34409 ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" "$ac_includes_default 34410#if HAVE_SYS_TIME_H 34411# include <sys/time.h> 34412#endif 34413#ifdef HAVE_SYS_TIMES_H 34414# include <sys/times.h> 34415#endif 34416 34417" 34418if test "x$ac_cv_header_sys_resource_h" = xyes; then : 34419 cat >>confdefs.h <<_ACEOF 34420#define HAVE_SYS_RESOURCE_H 1 34421_ACEOF 34422 34423fi 34424 34425done 34426 34427for ac_func in times 34428do : 34429 ac_fn_c_check_func "$LINENO" "times" "ac_cv_func_times" 34430if test "x$ac_cv_func_times" = xyes; then : 34431 cat >>confdefs.h <<_ACEOF 34432#define HAVE_TIMES 1 34433_ACEOF 34434 34435fi 34436done 34437 34438 34439ac_fn_c_check_decl "$LINENO" "getrusage" "ac_cv_have_decl_getrusage" "$ac_includes_default 34440#if HAVE_SYS_TIME_H 34441# include <sys/time.h> 34442#endif 34443#if HAVE_SYS_TIMES_H 34444# include <sys/times.h> 34445#endif 34446#if HAVE_SYS_RESOURCE_H 34447# include <sys/resource.h> 34448#endif 34449 34450" 34451if test "x$ac_cv_have_decl_getrusage" = xyes; then : 34452 ac_have_decl=1 34453else 34454 ac_have_decl=0 34455fi 34456 34457cat >>confdefs.h <<_ACEOF 34458#define HAVE_DECL_GETRUSAGE $ac_have_decl 34459_ACEOF 34460ac_fn_c_check_decl "$LINENO" "times" "ac_cv_have_decl_times" "$ac_includes_default 34461#if HAVE_SYS_TIME_H 34462# include <sys/time.h> 34463#endif 34464#if HAVE_SYS_TIMES_H 34465# include <sys/times.h> 34466#endif 34467#if HAVE_SYS_RESOURCE_H 34468# include <sys/resource.h> 34469#endif 34470 34471" 34472if test "x$ac_cv_have_decl_times" = xyes; then : 34473 ac_have_decl=1 34474else 34475 ac_have_decl=0 34476fi 34477 34478cat >>confdefs.h <<_ACEOF 34479#define HAVE_DECL_TIMES $ac_have_decl 34480_ACEOF 34481ac_fn_c_check_decl "$LINENO" "clock" "ac_cv_have_decl_clock" "$ac_includes_default 34482#if HAVE_SYS_TIME_H 34483# include <sys/time.h> 34484#endif 34485#if HAVE_SYS_TIMES_H 34486# include <sys/times.h> 34487#endif 34488#if HAVE_SYS_RESOURCE_H 34489# include <sys/resource.h> 34490#endif 34491 34492" 34493if test "x$ac_cv_have_decl_clock" = xyes; then : 34494 ac_have_decl=1 34495else 34496 ac_have_decl=0 34497fi 34498 34499cat >>confdefs.h <<_ACEOF 34500#define HAVE_DECL_CLOCK $ac_have_decl 34501_ACEOF 34502ac_fn_c_check_decl "$LINENO" "sysconf" "ac_cv_have_decl_sysconf" "$ac_includes_default 34503#if HAVE_SYS_TIME_H 34504# include <sys/time.h> 34505#endif 34506#if HAVE_SYS_TIMES_H 34507# include <sys/times.h> 34508#endif 34509#if HAVE_SYS_RESOURCE_H 34510# include <sys/resource.h> 34511#endif 34512 34513" 34514if test "x$ac_cv_have_decl_sysconf" = xyes; then : 34515 ac_have_decl=1 34516else 34517 ac_have_decl=0 34518fi 34519 34520cat >>confdefs.h <<_ACEOF 34521#define HAVE_DECL_SYSCONF $ac_have_decl 34522_ACEOF 34523 34524 34525ac_fn_c_check_type "$LINENO" "clock_t" "ac_cv_type_clock_t" "$ac_includes_default 34526#if HAVE_SYS_TIME_H 34527# include <sys/time.h> 34528#endif 34529#if HAVE_SYS_TIMES_H 34530# include <sys/times.h> 34531#endif 34532#if HAVE_SYS_RESOURCE_H 34533# include <sys/resource.h> 34534#endif 34535 34536" 34537if test "x$ac_cv_type_clock_t" = xyes; then : 34538 34539cat >>confdefs.h <<_ACEOF 34540#define HAVE_CLOCK_T 1 34541_ACEOF 34542 34543 34544fi 34545ac_fn_c_check_type "$LINENO" "struct tms" "ac_cv_type_struct_tms" "$ac_includes_default 34546#if HAVE_SYS_TIME_H 34547# include <sys/time.h> 34548#endif 34549#if HAVE_SYS_TIMES_H 34550# include <sys/times.h> 34551#endif 34552#if HAVE_SYS_RESOURCE_H 34553# include <sys/resource.h> 34554#endif 34555 34556" 34557if test "x$ac_cv_type_struct_tms" = xyes; then : 34558 34559cat >>confdefs.h <<_ACEOF 34560#define HAVE_STRUCT_TMS 1 34561_ACEOF 34562 34563 34564fi 34565 34566 34567 34568# Gettext. 34569# We use gnulib, which is only guaranteed to work properly with the 34570# latest Gettext. 34571 34572mkdir_p="$MKDIR_P" 34573case $mkdir_p in 34574 [\\/$]* | ?:[\\/]*) ;; 34575 */*) mkdir_p="\$(top_builddir)/$mkdir_p" ;; 34576esac 34577 34578 34579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 34580$as_echo_n "checking whether NLS is requested... " >&6; } 34581 # Check whether --enable-nls was given. 34582if test "${enable_nls+set}" = set; then : 34583 enableval=$enable_nls; USE_NLS=$enableval 34584else 34585 USE_NLS=yes 34586fi 34587 34588 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 34589$as_echo "$USE_NLS" >&6; } 34590 34591 34592 34593 34594 GETTEXT_MACRO_VERSION=0.18 34595 34596 34597 34598 34599# Prepare PATH_SEPARATOR. 34600# The user is always right. 34601if test "${PATH_SEPARATOR+set}" != set; then 34602 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which 34603 # contains only /bin. Note that ksh looks also at the FPATH variable, 34604 # so we have to set that as well for the test. 34605 PATH_SEPARATOR=: 34606 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ 34607 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ 34608 || PATH_SEPARATOR=';' 34609 } 34610fi 34611 34612# Find out how to test for executable files. Don't use a zero-byte file, 34613# as systems may use methods other than mode bits to determine executability. 34614cat >conf$$.file <<_ASEOF 34615#! /bin/sh 34616exit 0 34617_ASEOF 34618chmod +x conf$$.file 34619if test -x conf$$.file >/dev/null 2>&1; then 34620 ac_executable_p="test -x" 34621else 34622 ac_executable_p="test -f" 34623fi 34624rm -f conf$$.file 34625 34626# Extract the first word of "msgfmt", so it can be a program name with args. 34627set dummy msgfmt; ac_word=$2 34628{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 34629$as_echo_n "checking for $ac_word... " >&6; } 34630if ${ac_cv_path_MSGFMT+:} false; then : 34631 $as_echo_n "(cached) " >&6 34632else 34633 case "$MSGFMT" in 34634 [\\/]* | ?:[\\/]*) 34635 ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. 34636 ;; 34637 *) 34638 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR 34639 for ac_dir in $PATH; do 34640 IFS="$ac_save_IFS" 34641 test -z "$ac_dir" && ac_dir=. 34642 for ac_exec_ext in '' $ac_executable_extensions; do 34643 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then 34644 echo "$as_me: trying $ac_dir/$ac_word..." >&5 34645 if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && 34646 (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then 34647 ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" 34648 break 2 34649 fi 34650 fi 34651 done 34652 done 34653 IFS="$ac_save_IFS" 34654 test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" 34655 ;; 34656esac 34657fi 34658MSGFMT="$ac_cv_path_MSGFMT" 34659if test "$MSGFMT" != ":"; then 34660 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 34661$as_echo "$MSGFMT" >&6; } 34662else 34663 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 34664$as_echo "no" >&6; } 34665fi 34666 34667 # Extract the first word of "gmsgfmt", so it can be a program name with args. 34668set dummy gmsgfmt; ac_word=$2 34669{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 34670$as_echo_n "checking for $ac_word... " >&6; } 34671if ${ac_cv_path_GMSGFMT+:} false; then : 34672 $as_echo_n "(cached) " >&6 34673else 34674 case $GMSGFMT in 34675 [\\/]* | ?:[\\/]*) 34676 ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. 34677 ;; 34678 *) 34679 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 34680for as_dir in $PATH 34681do 34682 IFS=$as_save_IFS 34683 test -z "$as_dir" && as_dir=. 34684 for ac_exec_ext in '' $ac_executable_extensions; do 34685 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 34686 ac_cv_path_GMSGFMT="$as_dir/$ac_word$ac_exec_ext" 34687 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 34688 break 2 34689 fi 34690done 34691 done 34692IFS=$as_save_IFS 34693 34694 test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" 34695 ;; 34696esac 34697fi 34698GMSGFMT=$ac_cv_path_GMSGFMT 34699if test -n "$GMSGFMT"; then 34700 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 34701$as_echo "$GMSGFMT" >&6; } 34702else 34703 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 34704$as_echo "no" >&6; } 34705fi 34706 34707 34708 34709 case `$MSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in 34710 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) MSGFMT_015=: ;; 34711 *) MSGFMT_015=$MSGFMT ;; 34712 esac 34713 34714 case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in 34715 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; 34716 *) GMSGFMT_015=$GMSGFMT ;; 34717 esac 34718 34719 34720 34721# Prepare PATH_SEPARATOR. 34722# The user is always right. 34723if test "${PATH_SEPARATOR+set}" != set; then 34724 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which 34725 # contains only /bin. Note that ksh looks also at the FPATH variable, 34726 # so we have to set that as well for the test. 34727 PATH_SEPARATOR=: 34728 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ 34729 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ 34730 || PATH_SEPARATOR=';' 34731 } 34732fi 34733 34734# Find out how to test for executable files. Don't use a zero-byte file, 34735# as systems may use methods other than mode bits to determine executability. 34736cat >conf$$.file <<_ASEOF 34737#! /bin/sh 34738exit 0 34739_ASEOF 34740chmod +x conf$$.file 34741if test -x conf$$.file >/dev/null 2>&1; then 34742 ac_executable_p="test -x" 34743else 34744 ac_executable_p="test -f" 34745fi 34746rm -f conf$$.file 34747 34748# Extract the first word of "xgettext", so it can be a program name with args. 34749set dummy xgettext; ac_word=$2 34750{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 34751$as_echo_n "checking for $ac_word... " >&6; } 34752if ${ac_cv_path_XGETTEXT+:} false; then : 34753 $as_echo_n "(cached) " >&6 34754else 34755 case "$XGETTEXT" in 34756 [\\/]* | ?:[\\/]*) 34757 ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. 34758 ;; 34759 *) 34760 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR 34761 for ac_dir in $PATH; do 34762 IFS="$ac_save_IFS" 34763 test -z "$ac_dir" && ac_dir=. 34764 for ac_exec_ext in '' $ac_executable_extensions; do 34765 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then 34766 echo "$as_me: trying $ac_dir/$ac_word..." >&5 34767 if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && 34768 (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then 34769 ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" 34770 break 2 34771 fi 34772 fi 34773 done 34774 done 34775 IFS="$ac_save_IFS" 34776 test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" 34777 ;; 34778esac 34779fi 34780XGETTEXT="$ac_cv_path_XGETTEXT" 34781if test "$XGETTEXT" != ":"; then 34782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 34783$as_echo "$XGETTEXT" >&6; } 34784else 34785 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 34786$as_echo "no" >&6; } 34787fi 34788 34789 rm -f messages.po 34790 34791 case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in 34792 '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; 34793 *) XGETTEXT_015=$XGETTEXT ;; 34794 esac 34795 34796 34797 34798# Prepare PATH_SEPARATOR. 34799# The user is always right. 34800if test "${PATH_SEPARATOR+set}" != set; then 34801 # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which 34802 # contains only /bin. Note that ksh looks also at the FPATH variable, 34803 # so we have to set that as well for the test. 34804 PATH_SEPARATOR=: 34805 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ 34806 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ 34807 || PATH_SEPARATOR=';' 34808 } 34809fi 34810 34811# Find out how to test for executable files. Don't use a zero-byte file, 34812# as systems may use methods other than mode bits to determine executability. 34813cat >conf$$.file <<_ASEOF 34814#! /bin/sh 34815exit 0 34816_ASEOF 34817chmod +x conf$$.file 34818if test -x conf$$.file >/dev/null 2>&1; then 34819 ac_executable_p="test -x" 34820else 34821 ac_executable_p="test -f" 34822fi 34823rm -f conf$$.file 34824 34825# Extract the first word of "msgmerge", so it can be a program name with args. 34826set dummy msgmerge; ac_word=$2 34827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 34828$as_echo_n "checking for $ac_word... " >&6; } 34829if ${ac_cv_path_MSGMERGE+:} false; then : 34830 $as_echo_n "(cached) " >&6 34831else 34832 case "$MSGMERGE" in 34833 [\\/]* | ?:[\\/]*) 34834 ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. 34835 ;; 34836 *) 34837 ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR 34838 for ac_dir in $PATH; do 34839 IFS="$ac_save_IFS" 34840 test -z "$ac_dir" && ac_dir=. 34841 for ac_exec_ext in '' $ac_executable_extensions; do 34842 if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then 34843 echo "$as_me: trying $ac_dir/$ac_word..." >&5 34844 if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then 34845 ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" 34846 break 2 34847 fi 34848 fi 34849 done 34850 done 34851 IFS="$ac_save_IFS" 34852 test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" 34853 ;; 34854esac 34855fi 34856MSGMERGE="$ac_cv_path_MSGMERGE" 34857if test "$MSGMERGE" != ":"; then 34858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 34859$as_echo "$MSGMERGE" >&6; } 34860else 34861 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 34862$as_echo "no" >&6; } 34863fi 34864 34865 34866 test -n "$localedir" || localedir='${datadir}/locale' 34867 34868 34869 test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= 34870 34871 34872 ac_config_commands="$ac_config_commands po-directories" 34873 34874 34875 34876 34877 34878 34879 34880 34881 34882 34883 34884 34885 34886 use_additional=yes 34887 34888 acl_save_prefix="$prefix" 34889 prefix="$acl_final_prefix" 34890 acl_save_exec_prefix="$exec_prefix" 34891 exec_prefix="$acl_final_exec_prefix" 34892 34893 eval additional_includedir=\"$includedir\" 34894 eval additional_libdir=\"$libdir\" 34895 34896 exec_prefix="$acl_save_exec_prefix" 34897 prefix="$acl_save_prefix" 34898 34899 34900# Check whether --with-libiconv-prefix was given. 34901if test "${with_libiconv_prefix+set}" = set; then : 34902 withval=$with_libiconv_prefix; 34903 if test "X$withval" = "Xno"; then 34904 use_additional=no 34905 else 34906 if test "X$withval" = "X"; then 34907 34908 acl_save_prefix="$prefix" 34909 prefix="$acl_final_prefix" 34910 acl_save_exec_prefix="$exec_prefix" 34911 exec_prefix="$acl_final_exec_prefix" 34912 34913 eval additional_includedir=\"$includedir\" 34914 eval additional_libdir=\"$libdir\" 34915 34916 exec_prefix="$acl_save_exec_prefix" 34917 prefix="$acl_save_prefix" 34918 34919 else 34920 additional_includedir="$withval/include" 34921 additional_libdir="$withval/$acl_libdirstem" 34922 if test "$acl_libdirstem2" != "$acl_libdirstem" \ 34923 && ! test -d "$withval/$acl_libdirstem"; then 34924 additional_libdir="$withval/$acl_libdirstem2" 34925 fi 34926 fi 34927 fi 34928 34929fi 34930 34931 LIBICONV= 34932 LTLIBICONV= 34933 INCICONV= 34934 LIBICONV_PREFIX= 34935 HAVE_LIBICONV= 34936 rpathdirs= 34937 ltrpathdirs= 34938 names_already_handled= 34939 names_next_round='iconv ' 34940 while test -n "$names_next_round"; do 34941 names_this_round="$names_next_round" 34942 names_next_round= 34943 for name in $names_this_round; do 34944 already_handled= 34945 for n in $names_already_handled; do 34946 if test "$n" = "$name"; then 34947 already_handled=yes 34948 break 34949 fi 34950 done 34951 if test -z "$already_handled"; then 34952 names_already_handled="$names_already_handled $name" 34953 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` 34954 eval value=\"\$HAVE_LIB$uppername\" 34955 if test -n "$value"; then 34956 if test "$value" = yes; then 34957 eval value=\"\$LIB$uppername\" 34958 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" 34959 eval value=\"\$LTLIB$uppername\" 34960 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" 34961 else 34962 : 34963 fi 34964 else 34965 found_dir= 34966 found_la= 34967 found_so= 34968 found_a= 34969 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name 34970 if test -n "$acl_shlibext"; then 34971 shrext=".$acl_shlibext" # typically: shrext=.so 34972 else 34973 shrext= 34974 fi 34975 if test $use_additional = yes; then 34976 dir="$additional_libdir" 34977 if test -n "$acl_shlibext"; then 34978 if test -f "$dir/$libname$shrext"; then 34979 found_dir="$dir" 34980 found_so="$dir/$libname$shrext" 34981 else 34982 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then 34983 ver=`(cd "$dir" && \ 34984 for f in "$libname$shrext".*; do echo "$f"; done \ 34985 | sed -e "s,^$libname$shrext\\\\.,," \ 34986 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ 34987 | sed 1q ) 2>/dev/null` 34988 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then 34989 found_dir="$dir" 34990 found_so="$dir/$libname$shrext.$ver" 34991 fi 34992 else 34993 eval library_names=\"$acl_library_names_spec\" 34994 for f in $library_names; do 34995 if test -f "$dir/$f"; then 34996 found_dir="$dir" 34997 found_so="$dir/$f" 34998 break 34999 fi 35000 done 35001 fi 35002 fi 35003 fi 35004 if test "X$found_dir" = "X"; then 35005 if test -f "$dir/$libname.$acl_libext"; then 35006 found_dir="$dir" 35007 found_a="$dir/$libname.$acl_libext" 35008 fi 35009 fi 35010 if test "X$found_dir" != "X"; then 35011 if test -f "$dir/$libname.la"; then 35012 found_la="$dir/$libname.la" 35013 fi 35014 fi 35015 fi 35016 if test "X$found_dir" = "X"; then 35017 for x in $LDFLAGS $LTLIBICONV; do 35018 35019 acl_save_prefix="$prefix" 35020 prefix="$acl_final_prefix" 35021 acl_save_exec_prefix="$exec_prefix" 35022 exec_prefix="$acl_final_exec_prefix" 35023 eval x=\"$x\" 35024 exec_prefix="$acl_save_exec_prefix" 35025 prefix="$acl_save_prefix" 35026 35027 case "$x" in 35028 -L*) 35029 dir=`echo "X$x" | sed -e 's/^X-L//'` 35030 if test -n "$acl_shlibext"; then 35031 if test -f "$dir/$libname$shrext"; then 35032 found_dir="$dir" 35033 found_so="$dir/$libname$shrext" 35034 else 35035 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then 35036 ver=`(cd "$dir" && \ 35037 for f in "$libname$shrext".*; do echo "$f"; done \ 35038 | sed -e "s,^$libname$shrext\\\\.,," \ 35039 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ 35040 | sed 1q ) 2>/dev/null` 35041 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then 35042 found_dir="$dir" 35043 found_so="$dir/$libname$shrext.$ver" 35044 fi 35045 else 35046 eval library_names=\"$acl_library_names_spec\" 35047 for f in $library_names; do 35048 if test -f "$dir/$f"; then 35049 found_dir="$dir" 35050 found_so="$dir/$f" 35051 break 35052 fi 35053 done 35054 fi 35055 fi 35056 fi 35057 if test "X$found_dir" = "X"; then 35058 if test -f "$dir/$libname.$acl_libext"; then 35059 found_dir="$dir" 35060 found_a="$dir/$libname.$acl_libext" 35061 fi 35062 fi 35063 if test "X$found_dir" != "X"; then 35064 if test -f "$dir/$libname.la"; then 35065 found_la="$dir/$libname.la" 35066 fi 35067 fi 35068 ;; 35069 esac 35070 if test "X$found_dir" != "X"; then 35071 break 35072 fi 35073 done 35074 fi 35075 if test "X$found_dir" != "X"; then 35076 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" 35077 if test "X$found_so" != "X"; then 35078 if test "$enable_rpath" = no \ 35079 || test "X$found_dir" = "X/usr/$acl_libdirstem" \ 35080 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then 35081 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" 35082 else 35083 haveit= 35084 for x in $ltrpathdirs; do 35085 if test "X$x" = "X$found_dir"; then 35086 haveit=yes 35087 break 35088 fi 35089 done 35090 if test -z "$haveit"; then 35091 ltrpathdirs="$ltrpathdirs $found_dir" 35092 fi 35093 if test "$acl_hardcode_direct" = yes; then 35094 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" 35095 else 35096 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then 35097 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" 35098 haveit= 35099 for x in $rpathdirs; do 35100 if test "X$x" = "X$found_dir"; then 35101 haveit=yes 35102 break 35103 fi 35104 done 35105 if test -z "$haveit"; then 35106 rpathdirs="$rpathdirs $found_dir" 35107 fi 35108 else 35109 haveit= 35110 for x in $LDFLAGS $LIBICONV; do 35111 35112 acl_save_prefix="$prefix" 35113 prefix="$acl_final_prefix" 35114 acl_save_exec_prefix="$exec_prefix" 35115 exec_prefix="$acl_final_exec_prefix" 35116 eval x=\"$x\" 35117 exec_prefix="$acl_save_exec_prefix" 35118 prefix="$acl_save_prefix" 35119 35120 if test "X$x" = "X-L$found_dir"; then 35121 haveit=yes 35122 break 35123 fi 35124 done 35125 if test -z "$haveit"; then 35126 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" 35127 fi 35128 if test "$acl_hardcode_minus_L" != no; then 35129 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" 35130 else 35131 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" 35132 fi 35133 fi 35134 fi 35135 fi 35136 else 35137 if test "X$found_a" != "X"; then 35138 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" 35139 else 35140 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" 35141 fi 35142 fi 35143 additional_includedir= 35144 case "$found_dir" in 35145 */$acl_libdirstem | */$acl_libdirstem/) 35146 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` 35147 if test "$name" = 'iconv'; then 35148 LIBICONV_PREFIX="$basedir" 35149 fi 35150 additional_includedir="$basedir/include" 35151 ;; 35152 */$acl_libdirstem2 | */$acl_libdirstem2/) 35153 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` 35154 if test "$name" = 'iconv'; then 35155 LIBICONV_PREFIX="$basedir" 35156 fi 35157 additional_includedir="$basedir/include" 35158 ;; 35159 esac 35160 if test "X$additional_includedir" != "X"; then 35161 if test "X$additional_includedir" != "X/usr/include"; then 35162 haveit= 35163 if test "X$additional_includedir" = "X/usr/local/include"; then 35164 if test -n "$GCC"; then 35165 case $host_os in 35166 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 35167 esac 35168 fi 35169 fi 35170 if test -z "$haveit"; then 35171 for x in $CPPFLAGS $INCICONV; do 35172 35173 acl_save_prefix="$prefix" 35174 prefix="$acl_final_prefix" 35175 acl_save_exec_prefix="$exec_prefix" 35176 exec_prefix="$acl_final_exec_prefix" 35177 eval x=\"$x\" 35178 exec_prefix="$acl_save_exec_prefix" 35179 prefix="$acl_save_prefix" 35180 35181 if test "X$x" = "X-I$additional_includedir"; then 35182 haveit=yes 35183 break 35184 fi 35185 done 35186 if test -z "$haveit"; then 35187 if test -d "$additional_includedir"; then 35188 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" 35189 fi 35190 fi 35191 fi 35192 fi 35193 fi 35194 if test -n "$found_la"; then 35195 save_libdir="$libdir" 35196 case "$found_la" in 35197 */* | *\\*) . "$found_la" ;; 35198 *) . "./$found_la" ;; 35199 esac 35200 libdir="$save_libdir" 35201 for dep in $dependency_libs; do 35202 case "$dep" in 35203 -L*) 35204 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` 35205 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ 35206 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then 35207 haveit= 35208 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ 35209 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then 35210 if test -n "$GCC"; then 35211 case $host_os in 35212 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 35213 esac 35214 fi 35215 fi 35216 if test -z "$haveit"; then 35217 haveit= 35218 for x in $LDFLAGS $LIBICONV; do 35219 35220 acl_save_prefix="$prefix" 35221 prefix="$acl_final_prefix" 35222 acl_save_exec_prefix="$exec_prefix" 35223 exec_prefix="$acl_final_exec_prefix" 35224 eval x=\"$x\" 35225 exec_prefix="$acl_save_exec_prefix" 35226 prefix="$acl_save_prefix" 35227 35228 if test "X$x" = "X-L$additional_libdir"; then 35229 haveit=yes 35230 break 35231 fi 35232 done 35233 if test -z "$haveit"; then 35234 if test -d "$additional_libdir"; then 35235 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" 35236 fi 35237 fi 35238 haveit= 35239 for x in $LDFLAGS $LTLIBICONV; do 35240 35241 acl_save_prefix="$prefix" 35242 prefix="$acl_final_prefix" 35243 acl_save_exec_prefix="$exec_prefix" 35244 exec_prefix="$acl_final_exec_prefix" 35245 eval x=\"$x\" 35246 exec_prefix="$acl_save_exec_prefix" 35247 prefix="$acl_save_prefix" 35248 35249 if test "X$x" = "X-L$additional_libdir"; then 35250 haveit=yes 35251 break 35252 fi 35253 done 35254 if test -z "$haveit"; then 35255 if test -d "$additional_libdir"; then 35256 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" 35257 fi 35258 fi 35259 fi 35260 fi 35261 ;; 35262 -R*) 35263 dir=`echo "X$dep" | sed -e 's/^X-R//'` 35264 if test "$enable_rpath" != no; then 35265 haveit= 35266 for x in $rpathdirs; do 35267 if test "X$x" = "X$dir"; then 35268 haveit=yes 35269 break 35270 fi 35271 done 35272 if test -z "$haveit"; then 35273 rpathdirs="$rpathdirs $dir" 35274 fi 35275 haveit= 35276 for x in $ltrpathdirs; do 35277 if test "X$x" = "X$dir"; then 35278 haveit=yes 35279 break 35280 fi 35281 done 35282 if test -z "$haveit"; then 35283 ltrpathdirs="$ltrpathdirs $dir" 35284 fi 35285 fi 35286 ;; 35287 -l*) 35288 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` 35289 ;; 35290 *.la) 35291 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` 35292 ;; 35293 *) 35294 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" 35295 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" 35296 ;; 35297 esac 35298 done 35299 fi 35300 else 35301 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" 35302 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" 35303 fi 35304 fi 35305 fi 35306 done 35307 done 35308 if test "X$rpathdirs" != "X"; then 35309 if test -n "$acl_hardcode_libdir_separator"; then 35310 alldirs= 35311 for found_dir in $rpathdirs; do 35312 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" 35313 done 35314 acl_save_libdir="$libdir" 35315 libdir="$alldirs" 35316 eval flag=\"$acl_hardcode_libdir_flag_spec\" 35317 libdir="$acl_save_libdir" 35318 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" 35319 else 35320 for found_dir in $rpathdirs; do 35321 acl_save_libdir="$libdir" 35322 libdir="$found_dir" 35323 eval flag=\"$acl_hardcode_libdir_flag_spec\" 35324 libdir="$acl_save_libdir" 35325 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" 35326 done 35327 fi 35328 fi 35329 if test "X$ltrpathdirs" != "X"; then 35330 for found_dir in $ltrpathdirs; do 35331 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" 35332 done 35333 fi 35334 35335 35336 35337 35338 35339 35340 35341 35342 35343 35344 35345 35346 35347 35348 35349 35350 35351 35352 35353 35354 35355 35356 35357 35358 35359 35360 35361 35362 35363 35364 35365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 35366$as_echo_n "checking for CFPreferencesCopyAppValue... " >&6; } 35367if ${gt_cv_func_CFPreferencesCopyAppValue+:} false; then : 35368 $as_echo_n "(cached) " >&6 35369else 35370 gt_save_LIBS="$LIBS" 35371 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" 35372 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 35373/* end confdefs.h. */ 35374#include <CoreFoundation/CFPreferences.h> 35375int 35376main () 35377{ 35378CFPreferencesCopyAppValue(NULL, NULL) 35379 ; 35380 return 0; 35381} 35382_ACEOF 35383if ac_fn_c_try_link "$LINENO"; then : 35384 gt_cv_func_CFPreferencesCopyAppValue=yes 35385else 35386 gt_cv_func_CFPreferencesCopyAppValue=no 35387fi 35388rm -f core conftest.err conftest.$ac_objext \ 35389 conftest$ac_exeext conftest.$ac_ext 35390 LIBS="$gt_save_LIBS" 35391fi 35392{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 35393$as_echo "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } 35394 if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then 35395 35396$as_echo "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h 35397 35398 fi 35399 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyCurrent" >&5 35400$as_echo_n "checking for CFLocaleCopyCurrent... " >&6; } 35401if ${gt_cv_func_CFLocaleCopyCurrent+:} false; then : 35402 $as_echo_n "(cached) " >&6 35403else 35404 gt_save_LIBS="$LIBS" 35405 LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" 35406 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 35407/* end confdefs.h. */ 35408#include <CoreFoundation/CFLocale.h> 35409int 35410main () 35411{ 35412CFLocaleCopyCurrent(); 35413 ; 35414 return 0; 35415} 35416_ACEOF 35417if ac_fn_c_try_link "$LINENO"; then : 35418 gt_cv_func_CFLocaleCopyCurrent=yes 35419else 35420 gt_cv_func_CFLocaleCopyCurrent=no 35421fi 35422rm -f core conftest.err conftest.$ac_objext \ 35423 conftest$ac_exeext conftest.$ac_ext 35424 LIBS="$gt_save_LIBS" 35425fi 35426{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyCurrent" >&5 35427$as_echo "$gt_cv_func_CFLocaleCopyCurrent" >&6; } 35428 if test $gt_cv_func_CFLocaleCopyCurrent = yes; then 35429 35430$as_echo "#define HAVE_CFLOCALECOPYCURRENT 1" >>confdefs.h 35431 35432 fi 35433 INTL_MACOSX_LIBS= 35434 if test $gt_cv_func_CFPreferencesCopyAppValue = yes || test $gt_cv_func_CFLocaleCopyCurrent = yes; then 35435 INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" 35436 fi 35437 35438 35439 35440 35441 35442 35443 LIBINTL= 35444 LTLIBINTL= 35445 POSUB= 35446 35447 case " $gt_needs " in 35448 *" need-formatstring-macros "*) gt_api_version=3 ;; 35449 *" need-ngettext "*) gt_api_version=2 ;; 35450 *) gt_api_version=1 ;; 35451 esac 35452 gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" 35453 gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" 35454 35455 if test "$USE_NLS" = "yes"; then 35456 gt_use_preinstalled_gnugettext=no 35457 35458 35459 if test $gt_api_version -ge 3; then 35460 gt_revision_test_code=' 35461#ifndef __GNU_GETTEXT_SUPPORTED_REVISION 35462#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) 35463#endif 35464typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; 35465' 35466 else 35467 gt_revision_test_code= 35468 fi 35469 if test $gt_api_version -ge 2; then 35470 gt_expression_test_code=' + * ngettext ("", "", 0)' 35471 else 35472 gt_expression_test_code= 35473 fi 35474 35475 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 35476$as_echo_n "checking for GNU gettext in libc... " >&6; } 35477if eval \${$gt_func_gnugettext_libc+:} false; then : 35478 $as_echo_n "(cached) " >&6 35479else 35480 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 35481/* end confdefs.h. */ 35482 35483#include <libintl.h> 35484$gt_revision_test_code 35485extern int _nl_msg_cat_cntr; 35486extern int *_nl_domain_bindings; 35487 35488int 35489main () 35490{ 35491 35492bindtextdomain ("", ""); 35493return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_domain_bindings 35494 35495 ; 35496 return 0; 35497} 35498_ACEOF 35499if ac_fn_c_try_link "$LINENO"; then : 35500 eval "$gt_func_gnugettext_libc=yes" 35501else 35502 eval "$gt_func_gnugettext_libc=no" 35503fi 35504rm -f core conftest.err conftest.$ac_objext \ 35505 conftest$ac_exeext conftest.$ac_ext 35506fi 35507eval ac_res=\$$gt_func_gnugettext_libc 35508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 35509$as_echo "$ac_res" >&6; } 35510 35511 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then 35512 35513 35514 35515 35516 35517 am_save_CPPFLAGS="$CPPFLAGS" 35518 35519 for element in $INCICONV; do 35520 haveit= 35521 for x in $CPPFLAGS; do 35522 35523 acl_save_prefix="$prefix" 35524 prefix="$acl_final_prefix" 35525 acl_save_exec_prefix="$exec_prefix" 35526 exec_prefix="$acl_final_exec_prefix" 35527 eval x=\"$x\" 35528 exec_prefix="$acl_save_exec_prefix" 35529 prefix="$acl_save_prefix" 35530 35531 if test "X$x" = "X$element"; then 35532 haveit=yes 35533 break 35534 fi 35535 done 35536 if test -z "$haveit"; then 35537 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" 35538 fi 35539 done 35540 35541 35542 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 35543$as_echo_n "checking for iconv... " >&6; } 35544if ${am_cv_func_iconv+:} false; then : 35545 $as_echo_n "(cached) " >&6 35546else 35547 35548 am_cv_func_iconv="no, consider installing GNU libiconv" 35549 am_cv_lib_iconv=no 35550 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 35551/* end confdefs.h. */ 35552 35553#include <stdlib.h> 35554#include <iconv.h> 35555 35556int 35557main () 35558{ 35559iconv_t cd = iconv_open("",""); 35560 iconv(cd,NULL,NULL,NULL,NULL); 35561 iconv_close(cd); 35562 ; 35563 return 0; 35564} 35565_ACEOF 35566if ac_fn_c_try_link "$LINENO"; then : 35567 am_cv_func_iconv=yes 35568fi 35569rm -f core conftest.err conftest.$ac_objext \ 35570 conftest$ac_exeext conftest.$ac_ext 35571 if test "$am_cv_func_iconv" != yes; then 35572 am_save_LIBS="$LIBS" 35573 LIBS="$LIBS $LIBICONV" 35574 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 35575/* end confdefs.h. */ 35576 35577#include <stdlib.h> 35578#include <iconv.h> 35579 35580int 35581main () 35582{ 35583iconv_t cd = iconv_open("",""); 35584 iconv(cd,NULL,NULL,NULL,NULL); 35585 iconv_close(cd); 35586 ; 35587 return 0; 35588} 35589_ACEOF 35590if ac_fn_c_try_link "$LINENO"; then : 35591 am_cv_lib_iconv=yes 35592 am_cv_func_iconv=yes 35593fi 35594rm -f core conftest.err conftest.$ac_objext \ 35595 conftest$ac_exeext conftest.$ac_ext 35596 LIBS="$am_save_LIBS" 35597 fi 35598 35599fi 35600{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 35601$as_echo "$am_cv_func_iconv" >&6; } 35602 if test "$am_cv_func_iconv" = yes; then 35603 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 35604$as_echo_n "checking for working iconv... " >&6; } 35605if ${am_cv_func_iconv_works+:} false; then : 35606 $as_echo_n "(cached) " >&6 35607else 35608 35609 am_save_LIBS="$LIBS" 35610 if test $am_cv_lib_iconv = yes; then 35611 LIBS="$LIBS $LIBICONV" 35612 fi 35613 if test "$cross_compiling" = yes; then : 35614 35615 case "$host_os" in 35616 aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; 35617 *) am_cv_func_iconv_works="guessing yes" ;; 35618 esac 35619 35620else 35621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 35622/* end confdefs.h. */ 35623 35624#include <iconv.h> 35625#include <string.h> 35626int main () 35627{ 35628 int result = 0; 35629 /* Test against AIX 5.1 bug: Failures are not distinguishable from successful 35630 returns. */ 35631 { 35632 iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); 35633 if (cd_utf8_to_88591 != (iconv_t)(-1)) 35634 { 35635 static const char input[] = "\342\202\254"; /* EURO SIGN */ 35636 char buf[10]; 35637 const char *inptr = input; 35638 size_t inbytesleft = strlen (input); 35639 char *outptr = buf; 35640 size_t outbytesleft = sizeof (buf); 35641 size_t res = iconv (cd_utf8_to_88591, 35642 (char **) &inptr, &inbytesleft, 35643 &outptr, &outbytesleft); 35644 if (res == 0) 35645 result |= 1; 35646 iconv_close (cd_utf8_to_88591); 35647 } 35648 } 35649 /* Test against Solaris 10 bug: Failures are not distinguishable from 35650 successful returns. */ 35651 { 35652 iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); 35653 if (cd_ascii_to_88591 != (iconv_t)(-1)) 35654 { 35655 static const char input[] = "\263"; 35656 char buf[10]; 35657 const char *inptr = input; 35658 size_t inbytesleft = strlen (input); 35659 char *outptr = buf; 35660 size_t outbytesleft = sizeof (buf); 35661 size_t res = iconv (cd_ascii_to_88591, 35662 (char **) &inptr, &inbytesleft, 35663 &outptr, &outbytesleft); 35664 if (res == 0) 35665 result |= 2; 35666 iconv_close (cd_ascii_to_88591); 35667 } 35668 } 35669 /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ 35670 { 35671 iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); 35672 if (cd_88591_to_utf8 != (iconv_t)(-1)) 35673 { 35674 static const char input[] = "\304"; 35675 static char buf[2] = { (char)0xDE, (char)0xAD }; 35676 const char *inptr = input; 35677 size_t inbytesleft = 1; 35678 char *outptr = buf; 35679 size_t outbytesleft = 1; 35680 size_t res = iconv (cd_88591_to_utf8, 35681 (char **) &inptr, &inbytesleft, 35682 &outptr, &outbytesleft); 35683 if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) 35684 result |= 4; 35685 iconv_close (cd_88591_to_utf8); 35686 } 35687 } 35688#if 0 /* This bug could be worked around by the caller. */ 35689 /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ 35690 { 35691 iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); 35692 if (cd_88591_to_utf8 != (iconv_t)(-1)) 35693 { 35694 static const char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; 35695 char buf[50]; 35696 const char *inptr = input; 35697 size_t inbytesleft = strlen (input); 35698 char *outptr = buf; 35699 size_t outbytesleft = sizeof (buf); 35700 size_t res = iconv (cd_88591_to_utf8, 35701 (char **) &inptr, &inbytesleft, 35702 &outptr, &outbytesleft); 35703 if ((int)res > 0) 35704 result |= 8; 35705 iconv_close (cd_88591_to_utf8); 35706 } 35707 } 35708#endif 35709 /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is 35710 provided. */ 35711 if (/* Try standardized names. */ 35712 iconv_open ("UTF-8", "EUC-JP") == (iconv_t)(-1) 35713 /* Try IRIX, OSF/1 names. */ 35714 && iconv_open ("UTF-8", "eucJP") == (iconv_t)(-1) 35715 /* Try AIX names. */ 35716 && iconv_open ("UTF-8", "IBM-eucJP") == (iconv_t)(-1) 35717 /* Try HP-UX names. */ 35718 && iconv_open ("utf8", "eucJP") == (iconv_t)(-1)) 35719 result |= 16; 35720 return result; 35721} 35722_ACEOF 35723if ac_fn_c_try_run "$LINENO"; then : 35724 am_cv_func_iconv_works=yes 35725else 35726 am_cv_func_iconv_works=no 35727fi 35728rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ 35729 conftest.$ac_objext conftest.beam conftest.$ac_ext 35730fi 35731 35732 LIBS="$am_save_LIBS" 35733 35734fi 35735{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 35736$as_echo "$am_cv_func_iconv_works" >&6; } 35737 case "$am_cv_func_iconv_works" in 35738 *no) am_func_iconv=no am_cv_lib_iconv=no ;; 35739 *) am_func_iconv=yes ;; 35740 esac 35741 else 35742 am_func_iconv=no am_cv_lib_iconv=no 35743 fi 35744 if test "$am_func_iconv" = yes; then 35745 35746$as_echo "#define HAVE_ICONV 1" >>confdefs.h 35747 35748 fi 35749 if test "$am_cv_lib_iconv" = yes; then 35750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 35751$as_echo_n "checking how to link with libiconv... " >&6; } 35752 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 35753$as_echo "$LIBICONV" >&6; } 35754 else 35755 CPPFLAGS="$am_save_CPPFLAGS" 35756 LIBICONV= 35757 LTLIBICONV= 35758 fi 35759 35760 35761 35762 35763 35764 35765 35766 35767 35768 35769 35770 use_additional=yes 35771 35772 acl_save_prefix="$prefix" 35773 prefix="$acl_final_prefix" 35774 acl_save_exec_prefix="$exec_prefix" 35775 exec_prefix="$acl_final_exec_prefix" 35776 35777 eval additional_includedir=\"$includedir\" 35778 eval additional_libdir=\"$libdir\" 35779 35780 exec_prefix="$acl_save_exec_prefix" 35781 prefix="$acl_save_prefix" 35782 35783 35784# Check whether --with-libintl-prefix was given. 35785if test "${with_libintl_prefix+set}" = set; then : 35786 withval=$with_libintl_prefix; 35787 if test "X$withval" = "Xno"; then 35788 use_additional=no 35789 else 35790 if test "X$withval" = "X"; then 35791 35792 acl_save_prefix="$prefix" 35793 prefix="$acl_final_prefix" 35794 acl_save_exec_prefix="$exec_prefix" 35795 exec_prefix="$acl_final_exec_prefix" 35796 35797 eval additional_includedir=\"$includedir\" 35798 eval additional_libdir=\"$libdir\" 35799 35800 exec_prefix="$acl_save_exec_prefix" 35801 prefix="$acl_save_prefix" 35802 35803 else 35804 additional_includedir="$withval/include" 35805 additional_libdir="$withval/$acl_libdirstem" 35806 if test "$acl_libdirstem2" != "$acl_libdirstem" \ 35807 && ! test -d "$withval/$acl_libdirstem"; then 35808 additional_libdir="$withval/$acl_libdirstem2" 35809 fi 35810 fi 35811 fi 35812 35813fi 35814 35815 LIBINTL= 35816 LTLIBINTL= 35817 INCINTL= 35818 LIBINTL_PREFIX= 35819 HAVE_LIBINTL= 35820 rpathdirs= 35821 ltrpathdirs= 35822 names_already_handled= 35823 names_next_round='intl ' 35824 while test -n "$names_next_round"; do 35825 names_this_round="$names_next_round" 35826 names_next_round= 35827 for name in $names_this_round; do 35828 already_handled= 35829 for n in $names_already_handled; do 35830 if test "$n" = "$name"; then 35831 already_handled=yes 35832 break 35833 fi 35834 done 35835 if test -z "$already_handled"; then 35836 names_already_handled="$names_already_handled $name" 35837 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` 35838 eval value=\"\$HAVE_LIB$uppername\" 35839 if test -n "$value"; then 35840 if test "$value" = yes; then 35841 eval value=\"\$LIB$uppername\" 35842 test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" 35843 eval value=\"\$LTLIB$uppername\" 35844 test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" 35845 else 35846 : 35847 fi 35848 else 35849 found_dir= 35850 found_la= 35851 found_so= 35852 found_a= 35853 eval libname=\"$acl_libname_spec\" # typically: libname=lib$name 35854 if test -n "$acl_shlibext"; then 35855 shrext=".$acl_shlibext" # typically: shrext=.so 35856 else 35857 shrext= 35858 fi 35859 if test $use_additional = yes; then 35860 dir="$additional_libdir" 35861 if test -n "$acl_shlibext"; then 35862 if test -f "$dir/$libname$shrext"; then 35863 found_dir="$dir" 35864 found_so="$dir/$libname$shrext" 35865 else 35866 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then 35867 ver=`(cd "$dir" && \ 35868 for f in "$libname$shrext".*; do echo "$f"; done \ 35869 | sed -e "s,^$libname$shrext\\\\.,," \ 35870 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ 35871 | sed 1q ) 2>/dev/null` 35872 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then 35873 found_dir="$dir" 35874 found_so="$dir/$libname$shrext.$ver" 35875 fi 35876 else 35877 eval library_names=\"$acl_library_names_spec\" 35878 for f in $library_names; do 35879 if test -f "$dir/$f"; then 35880 found_dir="$dir" 35881 found_so="$dir/$f" 35882 break 35883 fi 35884 done 35885 fi 35886 fi 35887 fi 35888 if test "X$found_dir" = "X"; then 35889 if test -f "$dir/$libname.$acl_libext"; then 35890 found_dir="$dir" 35891 found_a="$dir/$libname.$acl_libext" 35892 fi 35893 fi 35894 if test "X$found_dir" != "X"; then 35895 if test -f "$dir/$libname.la"; then 35896 found_la="$dir/$libname.la" 35897 fi 35898 fi 35899 fi 35900 if test "X$found_dir" = "X"; then 35901 for x in $LDFLAGS $LTLIBINTL; do 35902 35903 acl_save_prefix="$prefix" 35904 prefix="$acl_final_prefix" 35905 acl_save_exec_prefix="$exec_prefix" 35906 exec_prefix="$acl_final_exec_prefix" 35907 eval x=\"$x\" 35908 exec_prefix="$acl_save_exec_prefix" 35909 prefix="$acl_save_prefix" 35910 35911 case "$x" in 35912 -L*) 35913 dir=`echo "X$x" | sed -e 's/^X-L//'` 35914 if test -n "$acl_shlibext"; then 35915 if test -f "$dir/$libname$shrext"; then 35916 found_dir="$dir" 35917 found_so="$dir/$libname$shrext" 35918 else 35919 if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then 35920 ver=`(cd "$dir" && \ 35921 for f in "$libname$shrext".*; do echo "$f"; done \ 35922 | sed -e "s,^$libname$shrext\\\\.,," \ 35923 | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ 35924 | sed 1q ) 2>/dev/null` 35925 if test -n "$ver" && test -f "$dir/$libname$shrext.$ver"; then 35926 found_dir="$dir" 35927 found_so="$dir/$libname$shrext.$ver" 35928 fi 35929 else 35930 eval library_names=\"$acl_library_names_spec\" 35931 for f in $library_names; do 35932 if test -f "$dir/$f"; then 35933 found_dir="$dir" 35934 found_so="$dir/$f" 35935 break 35936 fi 35937 done 35938 fi 35939 fi 35940 fi 35941 if test "X$found_dir" = "X"; then 35942 if test -f "$dir/$libname.$acl_libext"; then 35943 found_dir="$dir" 35944 found_a="$dir/$libname.$acl_libext" 35945 fi 35946 fi 35947 if test "X$found_dir" != "X"; then 35948 if test -f "$dir/$libname.la"; then 35949 found_la="$dir/$libname.la" 35950 fi 35951 fi 35952 ;; 35953 esac 35954 if test "X$found_dir" != "X"; then 35955 break 35956 fi 35957 done 35958 fi 35959 if test "X$found_dir" != "X"; then 35960 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" 35961 if test "X$found_so" != "X"; then 35962 if test "$enable_rpath" = no \ 35963 || test "X$found_dir" = "X/usr/$acl_libdirstem" \ 35964 || test "X$found_dir" = "X/usr/$acl_libdirstem2"; then 35965 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" 35966 else 35967 haveit= 35968 for x in $ltrpathdirs; do 35969 if test "X$x" = "X$found_dir"; then 35970 haveit=yes 35971 break 35972 fi 35973 done 35974 if test -z "$haveit"; then 35975 ltrpathdirs="$ltrpathdirs $found_dir" 35976 fi 35977 if test "$acl_hardcode_direct" = yes; then 35978 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" 35979 else 35980 if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then 35981 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" 35982 haveit= 35983 for x in $rpathdirs; do 35984 if test "X$x" = "X$found_dir"; then 35985 haveit=yes 35986 break 35987 fi 35988 done 35989 if test -z "$haveit"; then 35990 rpathdirs="$rpathdirs $found_dir" 35991 fi 35992 else 35993 haveit= 35994 for x in $LDFLAGS $LIBINTL; do 35995 35996 acl_save_prefix="$prefix" 35997 prefix="$acl_final_prefix" 35998 acl_save_exec_prefix="$exec_prefix" 35999 exec_prefix="$acl_final_exec_prefix" 36000 eval x=\"$x\" 36001 exec_prefix="$acl_save_exec_prefix" 36002 prefix="$acl_save_prefix" 36003 36004 if test "X$x" = "X-L$found_dir"; then 36005 haveit=yes 36006 break 36007 fi 36008 done 36009 if test -z "$haveit"; then 36010 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" 36011 fi 36012 if test "$acl_hardcode_minus_L" != no; then 36013 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" 36014 else 36015 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" 36016 fi 36017 fi 36018 fi 36019 fi 36020 else 36021 if test "X$found_a" != "X"; then 36022 LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" 36023 else 36024 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" 36025 fi 36026 fi 36027 additional_includedir= 36028 case "$found_dir" in 36029 */$acl_libdirstem | */$acl_libdirstem/) 36030 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` 36031 if test "$name" = 'intl'; then 36032 LIBINTL_PREFIX="$basedir" 36033 fi 36034 additional_includedir="$basedir/include" 36035 ;; 36036 */$acl_libdirstem2 | */$acl_libdirstem2/) 36037 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` 36038 if test "$name" = 'intl'; then 36039 LIBINTL_PREFIX="$basedir" 36040 fi 36041 additional_includedir="$basedir/include" 36042 ;; 36043 esac 36044 if test "X$additional_includedir" != "X"; then 36045 if test "X$additional_includedir" != "X/usr/include"; then 36046 haveit= 36047 if test "X$additional_includedir" = "X/usr/local/include"; then 36048 if test -n "$GCC"; then 36049 case $host_os in 36050 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 36051 esac 36052 fi 36053 fi 36054 if test -z "$haveit"; then 36055 for x in $CPPFLAGS $INCINTL; do 36056 36057 acl_save_prefix="$prefix" 36058 prefix="$acl_final_prefix" 36059 acl_save_exec_prefix="$exec_prefix" 36060 exec_prefix="$acl_final_exec_prefix" 36061 eval x=\"$x\" 36062 exec_prefix="$acl_save_exec_prefix" 36063 prefix="$acl_save_prefix" 36064 36065 if test "X$x" = "X-I$additional_includedir"; then 36066 haveit=yes 36067 break 36068 fi 36069 done 36070 if test -z "$haveit"; then 36071 if test -d "$additional_includedir"; then 36072 INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" 36073 fi 36074 fi 36075 fi 36076 fi 36077 fi 36078 if test -n "$found_la"; then 36079 save_libdir="$libdir" 36080 case "$found_la" in 36081 */* | *\\*) . "$found_la" ;; 36082 *) . "./$found_la" ;; 36083 esac 36084 libdir="$save_libdir" 36085 for dep in $dependency_libs; do 36086 case "$dep" in 36087 -L*) 36088 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` 36089 if test "X$additional_libdir" != "X/usr/$acl_libdirstem" \ 36090 && test "X$additional_libdir" != "X/usr/$acl_libdirstem2"; then 36091 haveit= 36092 if test "X$additional_libdir" = "X/usr/local/$acl_libdirstem" \ 36093 || test "X$additional_libdir" = "X/usr/local/$acl_libdirstem2"; then 36094 if test -n "$GCC"; then 36095 case $host_os in 36096 linux* | gnu* | k*bsd*-gnu) haveit=yes;; 36097 esac 36098 fi 36099 fi 36100 if test -z "$haveit"; then 36101 haveit= 36102 for x in $LDFLAGS $LIBINTL; do 36103 36104 acl_save_prefix="$prefix" 36105 prefix="$acl_final_prefix" 36106 acl_save_exec_prefix="$exec_prefix" 36107 exec_prefix="$acl_final_exec_prefix" 36108 eval x=\"$x\" 36109 exec_prefix="$acl_save_exec_prefix" 36110 prefix="$acl_save_prefix" 36111 36112 if test "X$x" = "X-L$additional_libdir"; then 36113 haveit=yes 36114 break 36115 fi 36116 done 36117 if test -z "$haveit"; then 36118 if test -d "$additional_libdir"; then 36119 LIBINTL="${LIBINTL}${LIBINTL:+ }-L$additional_libdir" 36120 fi 36121 fi 36122 haveit= 36123 for x in $LDFLAGS $LTLIBINTL; do 36124 36125 acl_save_prefix="$prefix" 36126 prefix="$acl_final_prefix" 36127 acl_save_exec_prefix="$exec_prefix" 36128 exec_prefix="$acl_final_exec_prefix" 36129 eval x=\"$x\" 36130 exec_prefix="$acl_save_exec_prefix" 36131 prefix="$acl_save_prefix" 36132 36133 if test "X$x" = "X-L$additional_libdir"; then 36134 haveit=yes 36135 break 36136 fi 36137 done 36138 if test -z "$haveit"; then 36139 if test -d "$additional_libdir"; then 36140 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$additional_libdir" 36141 fi 36142 fi 36143 fi 36144 fi 36145 ;; 36146 -R*) 36147 dir=`echo "X$dep" | sed -e 's/^X-R//'` 36148 if test "$enable_rpath" != no; then 36149 haveit= 36150 for x in $rpathdirs; do 36151 if test "X$x" = "X$dir"; then 36152 haveit=yes 36153 break 36154 fi 36155 done 36156 if test -z "$haveit"; then 36157 rpathdirs="$rpathdirs $dir" 36158 fi 36159 haveit= 36160 for x in $ltrpathdirs; do 36161 if test "X$x" = "X$dir"; then 36162 haveit=yes 36163 break 36164 fi 36165 done 36166 if test -z "$haveit"; then 36167 ltrpathdirs="$ltrpathdirs $dir" 36168 fi 36169 fi 36170 ;; 36171 -l*) 36172 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` 36173 ;; 36174 *.la) 36175 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` 36176 ;; 36177 *) 36178 LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" 36179 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" 36180 ;; 36181 esac 36182 done 36183 fi 36184 else 36185 LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" 36186 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" 36187 fi 36188 fi 36189 fi 36190 done 36191 done 36192 if test "X$rpathdirs" != "X"; then 36193 if test -n "$acl_hardcode_libdir_separator"; then 36194 alldirs= 36195 for found_dir in $rpathdirs; do 36196 alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" 36197 done 36198 acl_save_libdir="$libdir" 36199 libdir="$alldirs" 36200 eval flag=\"$acl_hardcode_libdir_flag_spec\" 36201 libdir="$acl_save_libdir" 36202 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" 36203 else 36204 for found_dir in $rpathdirs; do 36205 acl_save_libdir="$libdir" 36206 libdir="$found_dir" 36207 eval flag=\"$acl_hardcode_libdir_flag_spec\" 36208 libdir="$acl_save_libdir" 36209 LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" 36210 done 36211 fi 36212 fi 36213 if test "X$ltrpathdirs" != "X"; then 36214 for found_dir in $ltrpathdirs; do 36215 LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" 36216 done 36217 fi 36218 36219 36220 36221 36222 36223 36224 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 36225$as_echo_n "checking for GNU gettext in libintl... " >&6; } 36226if eval \${$gt_func_gnugettext_libintl+:} false; then : 36227 $as_echo_n "(cached) " >&6 36228else 36229 gt_save_CPPFLAGS="$CPPFLAGS" 36230 CPPFLAGS="$CPPFLAGS $INCINTL" 36231 gt_save_LIBS="$LIBS" 36232 LIBS="$LIBS $LIBINTL" 36233 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 36234/* end confdefs.h. */ 36235 36236#include <libintl.h> 36237$gt_revision_test_code 36238extern int _nl_msg_cat_cntr; 36239extern 36240#ifdef __cplusplus 36241"C" 36242#endif 36243const char *_nl_expand_alias (const char *); 36244 36245int 36246main () 36247{ 36248 36249bindtextdomain ("", ""); 36250return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") 36251 36252 ; 36253 return 0; 36254} 36255_ACEOF 36256if ac_fn_c_try_link "$LINENO"; then : 36257 eval "$gt_func_gnugettext_libintl=yes" 36258else 36259 eval "$gt_func_gnugettext_libintl=no" 36260fi 36261rm -f core conftest.err conftest.$ac_objext \ 36262 conftest$ac_exeext conftest.$ac_ext 36263 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then 36264 LIBS="$LIBS $LIBICONV" 36265 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 36266/* end confdefs.h. */ 36267 36268#include <libintl.h> 36269$gt_revision_test_code 36270extern int _nl_msg_cat_cntr; 36271extern 36272#ifdef __cplusplus 36273"C" 36274#endif 36275const char *_nl_expand_alias (const char *); 36276 36277int 36278main () 36279{ 36280 36281bindtextdomain ("", ""); 36282return * gettext ("")$gt_expression_test_code + _nl_msg_cat_cntr + *_nl_expand_alias ("") 36283 36284 ; 36285 return 0; 36286} 36287_ACEOF 36288if ac_fn_c_try_link "$LINENO"; then : 36289 LIBINTL="$LIBINTL $LIBICONV" 36290 LTLIBINTL="$LTLIBINTL $LTLIBICONV" 36291 eval "$gt_func_gnugettext_libintl=yes" 36292 36293fi 36294rm -f core conftest.err conftest.$ac_objext \ 36295 conftest$ac_exeext conftest.$ac_ext 36296 fi 36297 CPPFLAGS="$gt_save_CPPFLAGS" 36298 LIBS="$gt_save_LIBS" 36299fi 36300eval ac_res=\$$gt_func_gnugettext_libintl 36301 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 36302$as_echo "$ac_res" >&6; } 36303 fi 36304 36305 if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ 36306 || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ 36307 && test "$PACKAGE" != gettext-runtime \ 36308 && test "$PACKAGE" != gettext-tools; }; then 36309 gt_use_preinstalled_gnugettext=yes 36310 else 36311 LIBINTL= 36312 LTLIBINTL= 36313 INCINTL= 36314 fi 36315 36316 36317 36318 if test -n "$INTL_MACOSX_LIBS"; then 36319 if test "$gt_use_preinstalled_gnugettext" = "yes" \ 36320 || test "$nls_cv_use_gnu_gettext" = "yes"; then 36321 LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" 36322 LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" 36323 fi 36324 fi 36325 36326 if test "$gt_use_preinstalled_gnugettext" = "yes" \ 36327 || test "$nls_cv_use_gnu_gettext" = "yes"; then 36328 36329$as_echo "#define ENABLE_NLS 1" >>confdefs.h 36330 36331 else 36332 USE_NLS=no 36333 fi 36334 fi 36335 36336 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 36337$as_echo_n "checking whether to use NLS... " >&6; } 36338 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 36339$as_echo "$USE_NLS" >&6; } 36340 if test "$USE_NLS" = "yes"; then 36341 { $as_echo "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 36342$as_echo_n "checking where the gettext function comes from... " >&6; } 36343 if test "$gt_use_preinstalled_gnugettext" = "yes"; then 36344 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then 36345 gt_source="external libintl" 36346 else 36347 gt_source="libc" 36348 fi 36349 else 36350 gt_source="included intl directory" 36351 fi 36352 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 36353$as_echo "$gt_source" >&6; } 36354 fi 36355 36356 if test "$USE_NLS" = "yes"; then 36357 36358 if test "$gt_use_preinstalled_gnugettext" = "yes"; then 36359 if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then 36360 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 36361$as_echo_n "checking how to link with libintl... " >&6; } 36362 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 36363$as_echo "$LIBINTL" >&6; } 36364 36365 for element in $INCINTL; do 36366 haveit= 36367 for x in $CPPFLAGS; do 36368 36369 acl_save_prefix="$prefix" 36370 prefix="$acl_final_prefix" 36371 acl_save_exec_prefix="$exec_prefix" 36372 exec_prefix="$acl_final_exec_prefix" 36373 eval x=\"$x\" 36374 exec_prefix="$acl_save_exec_prefix" 36375 prefix="$acl_save_prefix" 36376 36377 if test "X$x" = "X$element"; then 36378 haveit=yes 36379 break 36380 fi 36381 done 36382 if test -z "$haveit"; then 36383 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" 36384 fi 36385 done 36386 36387 fi 36388 36389 36390$as_echo "#define HAVE_GETTEXT 1" >>confdefs.h 36391 36392 36393$as_echo "#define HAVE_DCGETTEXT 1" >>confdefs.h 36394 36395 fi 36396 36397 POSUB=po 36398 fi 36399 36400 36401 36402 INTLLIBS="$LIBINTL" 36403 36404 36405 36406 36407 36408 36409 36410 36411 if test -z "$USE_NLS"; then 36412 echo "The BISON-I18N macro is used without being preceded by AM-GNU-GETTEXT." 1>&2 36413 exit 1 36414 fi 36415 BISON_LOCALEDIR= 36416 BISON_USE_NLS=no 36417 if test "$USE_NLS" = yes; then 36418 if (${YACC-${BISON-:}} --print-localedir) >/dev/null 2>&1; then 36419 BISON_LOCALEDIR=`${YACC-${BISON-:}} --print-localedir` 36420 fi 36421 36422 if test -n "$BISON_LOCALEDIR"; then 36423 USER_LINGUAS="${LINGUAS-%UNSET%}" 36424 if test -n "$USER_LINGUAS"; then 36425 BISON_USE_NLS=yes 36426 fi 36427 fi 36428 fi 36429 if test $BISON_USE_NLS = yes; then 36430 36431$as_echo "#define YYENABLE_NLS 1" >>confdefs.h 36432 36433 fi 36434 36435 36436# Internationalized parsers. 36437ac_config_files="$ac_config_files runtime-po/Makefile.in" 36438 36439# Autoconf macros for packages using internationalized parsers. 36440aclocaldir='${datadir}/aclocal' 36441 36442 36443# Create the benchmark script. 36444ac_config_files="$ac_config_files etc/bench.pl" 36445 36446 36447# Initialize the test suite. 36448ac_config_commands="$ac_config_commands tests/atconfig" 36449 36450ac_config_files="$ac_config_files tests/Makefile tests/atlocal" 36451 36452ac_config_files="$ac_config_files tests/bison" 36453 36454for ac_prog in valgrind 36455do 36456 # Extract the first word of "$ac_prog", so it can be a program name with args. 36457set dummy $ac_prog; ac_word=$2 36458{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 36459$as_echo_n "checking for $ac_word... " >&6; } 36460if ${ac_cv_prog_VALGRIND+:} false; then : 36461 $as_echo_n "(cached) " >&6 36462else 36463 if test -n "$VALGRIND"; then 36464 ac_cv_prog_VALGRIND="$VALGRIND" # Let the user override the test. 36465else 36466as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 36467for as_dir in $PATH 36468do 36469 IFS=$as_save_IFS 36470 test -z "$as_dir" && as_dir=. 36471 for ac_exec_ext in '' $ac_executable_extensions; do 36472 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 36473 ac_cv_prog_VALGRIND="$ac_prog" 36474 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 36475 break 2 36476 fi 36477done 36478 done 36479IFS=$as_save_IFS 36480 36481fi 36482fi 36483VALGRIND=$ac_cv_prog_VALGRIND 36484if test -n "$VALGRIND"; then 36485 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VALGRIND" >&5 36486$as_echo "$VALGRIND" >&6; } 36487else 36488 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 36489$as_echo "no" >&6; } 36490fi 36491 36492 36493 test -n "$VALGRIND" && break 36494done 36495 36496case $VALGRIND:$host_os in 36497 '':*) ;; 36498 *:darwin*) 36499 # See README-hacking. 36500 # VALGRIND+=' --suppressions=$(abs_top_srcdir)/build-aux/darwin11.4.0.valgrind' 36501 VALGRIND=;; 36502 *:*) 36503 VALGRIND_PREBISON="$VALGRIND -q" 36504;; 36505esac 36506 36507 36508AUTOM4TE=${AUTOM4TE-"${am_missing_run}autom4te"} 36509 36510# Needed by tests/atlocal.in. 36511 36512 36513 36514 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Java virtual machine" >&5 36515$as_echo_n "checking for Java virtual machine... " >&6; } 36516 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 36517/* end confdefs.h. */ 36518 36519#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ 36520 yes 36521#endif 36522 36523_ACEOF 36524if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 36525 $EGREP "yes" >/dev/null 2>&1; then : 36526 CLASSPATH_SEPARATOR=';' 36527else 36528 CLASSPATH_SEPARATOR=':' 36529fi 36530rm -f conftest* 36531 36532 CONF_JAVA= 36533 HAVE_JAVA_ENVVAR= 36534 HAVE_GIJ= 36535 HAVE_JAVA= 36536 HAVE_JRE= 36537 HAVE_JVIEW= 36538 HAVE_JAVAEXEC=1 36539 if test -n "$JAVA"; then 36540 HAVE_JAVA_ENVVAR=1 36541 CONF_JAVA="$JAVA" 36542 else 36543 # Extract the first word of "gij", so it can be a program name with args. 36544set dummy gij; ac_word=$2 36545: 36546if ${ac_cv_prog_HAVE_GIJ_IN_PATH+:} false; then : 36547 $as_echo_n "(cached) " >&6 36548else 36549 if test -n "$HAVE_GIJ_IN_PATH"; then 36550 ac_cv_prog_HAVE_GIJ_IN_PATH="$HAVE_GIJ_IN_PATH" # Let the user override the test. 36551else 36552as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 36553for as_dir in $PATH 36554do 36555 IFS=$as_save_IFS 36556 test -z "$as_dir" && as_dir=. 36557 for ac_exec_ext in '' $ac_executable_extensions; do 36558 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 36559 ac_cv_prog_HAVE_GIJ_IN_PATH="yes" 36560 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 36561 break 2 36562 fi 36563done 36564 done 36565IFS=$as_save_IFS 36566 36567fi 36568fi 36569HAVE_GIJ_IN_PATH=$ac_cv_prog_HAVE_GIJ_IN_PATH 36570if test -n "$HAVE_GIJ_IN_PATH"; then 36571 : 36572else 36573 : 36574fi 36575 36576 36577 # Extract the first word of "java", so it can be a program name with args. 36578set dummy java; ac_word=$2 36579: 36580if ${ac_cv_prog_HAVE_JAVA_IN_PATH+:} false; then : 36581 $as_echo_n "(cached) " >&6 36582else 36583 if test -n "$HAVE_JAVA_IN_PATH"; then 36584 ac_cv_prog_HAVE_JAVA_IN_PATH="$HAVE_JAVA_IN_PATH" # Let the user override the test. 36585else 36586as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 36587for as_dir in $PATH 36588do 36589 IFS=$as_save_IFS 36590 test -z "$as_dir" && as_dir=. 36591 for ac_exec_ext in '' $ac_executable_extensions; do 36592 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 36593 ac_cv_prog_HAVE_JAVA_IN_PATH="yes" 36594 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 36595 break 2 36596 fi 36597done 36598 done 36599IFS=$as_save_IFS 36600 36601fi 36602fi 36603HAVE_JAVA_IN_PATH=$ac_cv_prog_HAVE_JAVA_IN_PATH 36604if test -n "$HAVE_JAVA_IN_PATH"; then 36605 : 36606else 36607 : 36608fi 36609 36610 36611 # Extract the first word of "jre", so it can be a program name with args. 36612set dummy jre; ac_word=$2 36613: 36614if ${ac_cv_prog_HAVE_JRE_IN_PATH+:} false; then : 36615 $as_echo_n "(cached) " >&6 36616else 36617 if test -n "$HAVE_JRE_IN_PATH"; then 36618 ac_cv_prog_HAVE_JRE_IN_PATH="$HAVE_JRE_IN_PATH" # Let the user override the test. 36619else 36620as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 36621for as_dir in $PATH 36622do 36623 IFS=$as_save_IFS 36624 test -z "$as_dir" && as_dir=. 36625 for ac_exec_ext in '' $ac_executable_extensions; do 36626 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 36627 ac_cv_prog_HAVE_JRE_IN_PATH="yes" 36628 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 36629 break 2 36630 fi 36631done 36632 done 36633IFS=$as_save_IFS 36634 36635fi 36636fi 36637HAVE_JRE_IN_PATH=$ac_cv_prog_HAVE_JRE_IN_PATH 36638if test -n "$HAVE_JRE_IN_PATH"; then 36639 : 36640else 36641 : 36642fi 36643 36644 36645 # Extract the first word of "jview", so it can be a program name with args. 36646set dummy jview; ac_word=$2 36647: 36648if ${ac_cv_prog_HAVE_JVIEW_IN_PATH+:} false; then : 36649 $as_echo_n "(cached) " >&6 36650else 36651 if test -n "$HAVE_JVIEW_IN_PATH"; then 36652 ac_cv_prog_HAVE_JVIEW_IN_PATH="$HAVE_JVIEW_IN_PATH" # Let the user override the test. 36653else 36654as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 36655for as_dir in $PATH 36656do 36657 IFS=$as_save_IFS 36658 test -z "$as_dir" && as_dir=. 36659 for ac_exec_ext in '' $ac_executable_extensions; do 36660 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 36661 ac_cv_prog_HAVE_JVIEW_IN_PATH="yes" 36662 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 36663 break 2 36664 fi 36665done 36666 done 36667IFS=$as_save_IFS 36668 36669fi 36670fi 36671HAVE_JVIEW_IN_PATH=$ac_cv_prog_HAVE_JVIEW_IN_PATH 36672if test -n "$HAVE_JVIEW_IN_PATH"; then 36673 : 36674else 36675 : 36676fi 36677 36678 36679 36680 export CLASSPATH 36681 if test -n "$HAVE_GIJ_IN_PATH" \ 36682 && gij --version >/dev/null 2>/dev/null \ 36683 ; then 36684 HAVE_GIJ=1 36685 CONF_JAVA="gij" 36686 else 36687 if test -n "$HAVE_JAVA_IN_PATH" \ 36688 && java -version >/dev/null 2>/dev/null \ 36689 ; then 36690 HAVE_JAVA=1 36691 CONF_JAVA="java" 36692 else 36693 if test -n "$HAVE_JRE_IN_PATH" \ 36694 && (jre >/dev/null 2>/dev/null || test $? = 1) \ 36695 ; then 36696 HAVE_JRE=1 36697 CONF_JAVA="jre" 36698 else 36699 if test -n "$HAVE_JVIEW_IN_PATH" \ 36700 && (jview -? >/dev/null 2>/dev/null || test $? = 1) \ 36701 ; then 36702 HAVE_JVIEW=1 36703 CONF_JAVA="jview" 36704 else 36705 HAVE_JAVAEXEC= 36706 fi 36707 fi 36708 fi 36709 fi 36710 36711 fi 36712 if test -n "$HAVE_JAVAEXEC"; then 36713 ac_result="$CONF_JAVA" 36714 else 36715 ac_result="no" 36716 fi 36717 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_result" >&5 36718$as_echo "$ac_result" >&6; } 36719 36720 36721 36722 36723 36724 36725 36726 36727 36728 36729 36730 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 36731/* end confdefs.h. */ 36732 36733#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ 36734 yes 36735#endif 36736 36737_ACEOF 36738if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 36739 $EGREP "yes" >/dev/null 2>&1; then : 36740 CLASSPATH_SEPARATOR=';' 36741else 36742 CLASSPATH_SEPARATOR=':' 36743fi 36744rm -f conftest* 36745 36746 source_version=1.3 36747 test -n "$source_version" || { 36748 as_fn_error $? "missing source-version argument to gt_JAVACOMP" "$LINENO" 5 36749 } 36750 if test -n "$HAVE_JAVAEXEC"; then 36751 cat > conftestver.java <<EOF 36752public class conftestver { 36753 public static void main (String[] args) { 36754 System.out.println(System.getProperty("java.specification.version")); 36755 } 36756} 36757EOF 36758 echo 'yzwx!$!I!D,!)!3+!4!5*!6,!4!7,!8!9)!:)!;"!(MeienN"!$FGW"!%Ojab"!2QeibRohZblVYZgb"!%hYei"!9FXQfYpYKgYidKUnleidLGW"!,Ujol_bPegb"!3_jicnbmnpblJfYpY/!*!+)!</!=!>"!=fYpYJmkb_ece_YnejiJpblmeji/!?!@)!A/!B!C"!._jicnbmnpbl"!3fYpYKgYidKSZfb_n"!3fYpYKgYidKUqmnbh"!$jon"!8QfYpYKejKTleinUnlbYhL"!.dbnTljkblnq"!EFQfYpYKgYidKUnleidLGQfYpYKgYidKUnleidL"!6fYpYKejKTleinUnlbYh"!)kleingi"!8FQfYpYKgYidKUnleidLGW!D!(!)!!!!!#!"!*!+!"!,!!!@!"!"!!!&Hu!"r!!!"!.!!!(!"!!!"!+!/!0!"!,!!!F!#!"!!!/s!#5$v!%t!&r!!!"!.!!!,!#!!!$!.!%!"!1!!!#!2' \ 36759 | tr -d '\012\015' \ 36760 | tr '!"#$%&()*+,./0123456789:;<=>?@ABCDEFGHJKLMNOPQRSTUVWXYZ_abcdefghijklmnopqrstuvwxyzI' '\000\001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037\040\041\046\050\051\052\056\057\073\074\076\103\106\114\116\117\120\123\124\126\133\141\142\143\144\145\146\147\151\152\154\155\156\157\160\162\163\164\165\166\171\261\262\266\267\270\272\276\312\376\055' \ 36761 > conftestver.class 36762 target_version=`{ 36763 unset JAVA_HOME 36764 echo "$as_me:36764: CLASSPATH=.${CLASSPATH:+$CLASSPATH_SEPARATOR$CLASSPATH} $CONF_JAVA conftestver" >&5 36765 CLASSPATH=.${CLASSPATH:+$CLASSPATH_SEPARATOR$CLASSPATH} $CONF_JAVA conftestver 2>&5 36766 }` 36767 case "$target_version" in 36768 1.1 | 1.2 | 1.3 | 1.4 | 1.5 | 1.6) ;; 36769 null) 36770 target_version=1.1 ;; 36771 *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unknown target-version $target_version, please update gt_JAVACOMP macro" >&5 36772$as_echo "$as_me: WARNING: unknown target-version $target_version, please update gt_JAVACOMP macro" >&2;} 36773 target_version=1.1 ;; 36774 esac 36775 else 36776 target_version="1.1" 36777 fi 36778 36779 case "$source_version" in 36780 1.3) goodcode='class conftest {}' 36781 failcode='class conftestfail { static { assert(true); } }' ;; 36782 1.4) goodcode='class conftest { static { assert(true); } }' 36783 failcode='class conftestfail<T> { T foo() { return null; } }' ;; 36784 1.5) goodcode='class conftest<T> { T foo() { return null; } }' 36785 failcode='class conftestfail syntax error' ;; 36786 *) as_fn_error $? "invalid source-version argument to gt_JAVACOMP: $source_version" "$LINENO" 5 ;; 36787 esac 36788 case "$target_version" in 36789 1.1) cfversion=45 ;; 36790 1.2) cfversion=46 ;; 36791 1.3) cfversion=47 ;; 36792 1.4) cfversion=48 ;; 36793 1.5) cfversion=49 ;; 36794 1.6) cfversion=50 ;; 36795 *) as_fn_error $? "invalid target-version argument to gt_JAVACOMP: $target_version" "$LINENO" 5 ;; 36796 esac 36797 # Function to output the classfile version of a file (8th byte) in decimal. 36798 if od -A x < /dev/null >/dev/null 2>/dev/null; then 36799 # Use POSIX od. 36800 func_classfile_version () 36801 { 36802 od -A n -t d1 -j 7 -N 1 "$1" 36803 } 36804 else 36805 # Use BSD hexdump. 36806 func_classfile_version () 36807 { 36808 dd if="$1" bs=1 count=1 skip=7 2>/dev/null | hexdump -e '1/1 "%3d "' 36809 echo 36810 } 36811 fi 36812 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Java compiler" >&5 36813$as_echo_n "checking for Java compiler... " >&6; } 36814 CONF_JAVAC= 36815 HAVE_JAVAC_ENVVAR= 36816 HAVE_GCJ_C= 36817 HAVE_JAVAC= 36818 HAVE_JIKES= 36819 HAVE_JAVACOMP= 36820 cat > conftestlib.java <<EOF 36821public class conftestlib { 36822 public static void main (String[] args) { 36823 } 36824} 36825EOF 36826 echo "$goodcode" > conftest.java 36827 echo "$failcode" > conftestfail.java 36828 if test -n "$JAVAC"; then 36829 if $JAVAC --version 2>/dev/null | sed -e 1q | grep gcj > /dev/null; then 36830 if $JAVAC --version 2>/dev/null | sed -e 's,^[^0-9]*,,' -e 1q | sed -e '/^4\.[012]/d' | grep '^[4-9]' >/dev/null; then 36831 rm -f conftest.class 36832 if { echo "$as_me:36832: $JAVAC -d . conftest.java" >&5 36833 $JAVAC -d . conftest.java >&5 2>&1 36834 } \ 36835 && test -f conftest.class \ 36836 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then 36837 rm -f conftest.class 36838 rm -f conftestfail.class 36839 if { echo "$as_me:36839: $JAVAC -fsource=$source_version -d . conftest.java" >&5 36840 $JAVAC -fsource="$source_version" -d . conftest.java >&5 2>&1 36841 } \ 36842 && test -f conftest.class \ 36843 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \ 36844 && { echo "$as_me:36844: $JAVAC -d . conftestfail.java" >&5 36845 $JAVAC -d . conftestfail.java >&5 2>&1 36846 } \ 36847 && test -f conftestfail.class \ 36848 && ! { echo "$as_me:36848: $JAVAC -fsource=$source_version -d . conftestfail.java" >&5 36849 $JAVAC -fsource="$source_version" -d . conftestfail.java >&5 2>&1 36850 }; then 36851 CONF_JAVAC="$JAVAC -fsource=$source_version" 36852 HAVE_JAVAC_ENVVAR=1 36853 HAVE_JAVACOMP=1 36854 else 36855 CONF_JAVAC="$JAVAC" 36856 HAVE_JAVAC_ENVVAR=1 36857 HAVE_JAVACOMP=1 36858 fi 36859 else 36860 rm -f conftest.class 36861 rm -f conftestfail.class 36862 if { echo "$as_me:36862: $JAVAC -fsource=$source_version -ftarget=$target_version -d . conftest.java" >&5 36863 $JAVAC -fsource="$source_version" -ftarget="$target_version" -d . conftest.java >&5 2>&1 36864 } \ 36865 && test -f conftest.class \ 36866 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then 36867 CONF_JAVAC="$JAVAC -fsource=$source_version -ftarget=$target_version" 36868 HAVE_JAVAC_ENVVAR=1 36869 HAVE_JAVACOMP=1 36870 fi 36871 fi 36872 else 36873 if test "$target_version" = 1.4 && test "$source_version" = 1.4; then 36874 rm -f conftest.class 36875 if { echo "$as_me:36875: $JAVAC -d . conftest.java" >&5 36876 $JAVAC -d . conftest.java >&5 2>&1 36877 } \ 36878 && test -f conftest.class; then 36879 CONF_JAVAC="$JAVAC" 36880 HAVE_JAVAC_ENVVAR=1 36881 HAVE_JAVACOMP=1 36882 fi 36883 else 36884 if test "$target_version" = 1.4 && test "$source_version" = 1.3; then 36885 javac_works= 36886 rm -f conftest.class 36887 if { echo "$as_me:36887: $JAVAC -d . conftest.java" >&5 36888 $JAVAC -d . conftest.java >&5 2>&1 36889 } \ 36890 && test -f conftest.class; then 36891 javac_works=1 36892 fi 36893 javac_noassert_works= 36894 rm -f conftest.class 36895 if { echo "$as_me:36895: $JAVAC -fno-assert -d . conftest.java" >&5 36896 $JAVAC -fno-assert -d . conftest.java >&5 2>&1 36897 } \ 36898 && test -f conftest.class; then 36899 javac_noassert_works=1 36900 fi 36901 if test -n "$javac_works" && test -n "$javac_noassert_works"; then 36902 rm -f conftestfail.class 36903 if { echo "$as_me:36903: $JAVAC -d . conftestfail.java" >&5 36904 $JAVAC -d . conftestfail.java >&5 2>&1 36905 } \ 36906 && test -f conftestfail.class \ 36907 && ! { echo "$as_me:36907: $JAVAC -fno-assert -d . conftestfail.java" >&5 36908 $JAVAC -fno-assert -d . conftestfail.java >&5 2>&1 36909 }; then 36910 javac_works= 36911 fi 36912 fi 36913 if test -n "$javac_works"; then 36914 CONF_JAVAC="$JAVAC" 36915 HAVE_JAVAC_ENVVAR=1 36916 HAVE_JAVACOMP=1 36917 else 36918 if test -n "$javac_noassert_works"; then 36919 CONF_JAVAC="$JAVAC -fno-assert" 36920 HAVE_JAVAC_ENVVAR=1 36921 HAVE_JAVACOMP=1 36922 fi 36923 fi 36924 fi 36925 fi 36926 fi 36927 else 36928 rm -f conftest.class 36929 if { echo "$as_me:36929: $JAVAC -d . conftest.java" >&5 36930 $JAVAC -d . conftest.java >&5 2>&1 36931 } \ 36932 && test -f conftest.class \ 36933 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then 36934 rm -f conftest.class 36935 rm -f conftestfail.class 36936 if { echo "$as_me:36936: $JAVAC -source $source_version -d . conftest.java" >&5 36937 $JAVAC -source "$source_version" -d . conftest.java >&5 2>&1 36938 } \ 36939 && test -f conftest.class \ 36940 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \ 36941 && { echo "$as_me:36941: $JAVAC -d . conftestfail.java" >&5 36942 $JAVAC -d . conftestfail.java >&5 2>&1 36943 } \ 36944 && test -f conftestfail.class \ 36945 && ! { echo "$as_me:36945: $JAVAC -source $source_version -d . conftestfail.java" >&5 36946 $JAVAC -source "$source_version" -d . conftestfail.java >&5 2>&1 36947 }; then 36948 CONF_JAVAC="$JAVAC -source $source_version" 36949 HAVE_JAVAC_ENVVAR=1 36950 HAVE_JAVACOMP=1 36951 else 36952 CONF_JAVAC="$JAVAC" 36953 HAVE_JAVAC_ENVVAR=1 36954 HAVE_JAVACOMP=1 36955 fi 36956 else 36957 rm -f conftest.class 36958 if { echo "$as_me:36958: $JAVAC -target $target_version -d . conftest.java" >&5 36959 $JAVAC -target "$target_version" -d . conftest.java >&5 2>&1 36960 } \ 36961 && test -f conftest.class \ 36962 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then 36963 rm -f conftest.class 36964 rm -f conftestfail.class 36965 if { echo "$as_me:36965: $JAVAC -target $target_version -source $source_version -d . conftest.java" >&5 36966 $JAVAC -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1 36967 } \ 36968 && test -f conftest.class \ 36969 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \ 36970 && { echo "$as_me:36970: $JAVAC -target $target_version -d . conftestfail.java" >&5 36971 $JAVAC -target "$target_version" -d . conftestfail.java >&5 2>&1 36972 } \ 36973 && test -f conftestfail.class \ 36974 && ! { echo "$as_me:36974: $JAVAC -target $target_version -source $source_version -d . conftestfail.java" >&5 36975 $JAVAC -target "$target_version" -source "$source_version" -d . conftestfail.java >&5 2>&1 36976 }; then 36977 CONF_JAVAC="$JAVAC -target $target_version -source $source_version" 36978 HAVE_JAVAC_ENVVAR=1 36979 HAVE_JAVACOMP=1 36980 else 36981 CONF_JAVAC="$JAVAC -target $target_version" 36982 HAVE_JAVAC_ENVVAR=1 36983 HAVE_JAVACOMP=1 36984 fi 36985 else 36986 rm -f conftest.class 36987 if { echo "$as_me:36987: $JAVAC -target $target_version -source $source_version -d . conftest.java" >&5 36988 $JAVAC -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1 36989 } \ 36990 && test -f conftest.class \ 36991 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then 36992 CONF_JAVAC="$JAVAC -target $target_version -source $source_version" 36993 HAVE_JAVAC_ENVVAR=1 36994 HAVE_JAVACOMP=1 36995 fi 36996 fi 36997 fi 36998 fi 36999 fi 37000 if test -z "$HAVE_JAVACOMP"; then 37001 # Extract the first word of "gcj", so it can be a program name with args. 37002set dummy gcj; ac_word=$2 37003: 37004if ${ac_cv_prog_HAVE_GCJ_IN_PATH+:} false; then : 37005 $as_echo_n "(cached) " >&6 37006else 37007 if test -n "$HAVE_GCJ_IN_PATH"; then 37008 ac_cv_prog_HAVE_GCJ_IN_PATH="$HAVE_GCJ_IN_PATH" # Let the user override the test. 37009else 37010as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 37011for as_dir in $PATH 37012do 37013 IFS=$as_save_IFS 37014 test -z "$as_dir" && as_dir=. 37015 for ac_exec_ext in '' $ac_executable_extensions; do 37016 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 37017 ac_cv_prog_HAVE_GCJ_IN_PATH="yes" 37018 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 37019 break 2 37020 fi 37021done 37022 done 37023IFS=$as_save_IFS 37024 37025fi 37026fi 37027HAVE_GCJ_IN_PATH=$ac_cv_prog_HAVE_GCJ_IN_PATH 37028if test -n "$HAVE_GCJ_IN_PATH"; then 37029 : 37030else 37031 : 37032fi 37033 37034 37035 # Extract the first word of "javac", so it can be a program name with args. 37036set dummy javac; ac_word=$2 37037: 37038if ${ac_cv_prog_HAVE_JAVAC_IN_PATH+:} false; then : 37039 $as_echo_n "(cached) " >&6 37040else 37041 if test -n "$HAVE_JAVAC_IN_PATH"; then 37042 ac_cv_prog_HAVE_JAVAC_IN_PATH="$HAVE_JAVAC_IN_PATH" # Let the user override the test. 37043else 37044as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 37045for as_dir in $PATH 37046do 37047 IFS=$as_save_IFS 37048 test -z "$as_dir" && as_dir=. 37049 for ac_exec_ext in '' $ac_executable_extensions; do 37050 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 37051 ac_cv_prog_HAVE_JAVAC_IN_PATH="yes" 37052 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 37053 break 2 37054 fi 37055done 37056 done 37057IFS=$as_save_IFS 37058 37059fi 37060fi 37061HAVE_JAVAC_IN_PATH=$ac_cv_prog_HAVE_JAVAC_IN_PATH 37062if test -n "$HAVE_JAVAC_IN_PATH"; then 37063 : 37064else 37065 : 37066fi 37067 37068 37069 # Extract the first word of "jikes", so it can be a program name with args. 37070set dummy jikes; ac_word=$2 37071: 37072if ${ac_cv_prog_HAVE_JIKES_IN_PATH+:} false; then : 37073 $as_echo_n "(cached) " >&6 37074else 37075 if test -n "$HAVE_JIKES_IN_PATH"; then 37076 ac_cv_prog_HAVE_JIKES_IN_PATH="$HAVE_JIKES_IN_PATH" # Let the user override the test. 37077else 37078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 37079for as_dir in $PATH 37080do 37081 IFS=$as_save_IFS 37082 test -z "$as_dir" && as_dir=. 37083 for ac_exec_ext in '' $ac_executable_extensions; do 37084 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 37085 ac_cv_prog_HAVE_JIKES_IN_PATH="yes" 37086 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 37087 break 2 37088 fi 37089done 37090 done 37091IFS=$as_save_IFS 37092 37093fi 37094fi 37095HAVE_JIKES_IN_PATH=$ac_cv_prog_HAVE_JIKES_IN_PATH 37096if test -n "$HAVE_JIKES_IN_PATH"; then 37097 : 37098else 37099 : 37100fi 37101 37102 37103 if test -z "$HAVE_JAVACOMP" && test -n "$HAVE_GCJ_IN_PATH"; then 37104 if gcj --version 2>/dev/null | sed -e 's,^[^0-9]*,,' -e 1q | sed -e '/^3\.[01]/d' | grep '^[3-9]' >/dev/null; then 37105 if { echo "$as_me:37105: gcj -C -d . conftestlib.java" >&5 37106 gcj -C -d . conftestlib.java >&5 2>&1 37107 }; then 37108 if gcj --version 2>/dev/null | sed -e 's,^[^0-9]*,,' -e 1q | sed -e '/^4\.[012]/d' | grep '^[4-9]' >/dev/null; then 37109 rm -f conftest.class 37110 if { echo "$as_me:37110: gcj -C -d . conftest.java" >&5 37111 gcj -C -d . conftest.java >&5 2>&1 37112 } \ 37113 && test -f conftest.class \ 37114 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then 37115 rm -f conftest.class 37116 rm -f conftestfail.class 37117 if { echo "$as_me:37117: gcj -C -fsource=$source_version -d . conftest.java" >&5 37118 gcj -C -fsource="$source_version" -d . conftest.java >&5 2>&1 37119 } \ 37120 && test -f conftest.class \ 37121 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \ 37122 && { echo "$as_me:37122: gcj -C -d . conftestfail.java" >&5 37123 gcj -C -d . conftestfail.java >&5 2>&1 37124 } \ 37125 && test -f conftestfail.class \ 37126 && ! { echo "$as_me:37126: gcj -C -fsource=$source_version -d . conftestfail.java" >&5 37127 gcj -C -fsource="$source_version" -d . conftestfail.java >&5 2>&1 37128 }; then 37129 CONF_JAVAC="gcj -C -fsource=$source_version" 37130 HAVE_JAVAC_ENVVAR=1 37131 HAVE_JAVACOMP=1 37132 else 37133 CONF_JAVAC="gcj -C" 37134 HAVE_JAVAC_ENVVAR=1 37135 HAVE_JAVACOMP=1 37136 fi 37137 else 37138 rm -f conftest.class 37139 rm -f conftestfail.class 37140 if { echo "$as_me:37140: gcj -C -fsource=$source_version -ftarget=$target_version -d . conftest.java" >&5 37141 gcj -C -fsource="$source_version" -ftarget="$target_version" -d . conftest.java >&5 2>&1 37142 } \ 37143 && test -f conftest.class \ 37144 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then 37145 CONF_JAVAC="gcj -C -fsource=$source_version -ftarget=$target_version" 37146 HAVE_JAVAC_ENVVAR=1 37147 HAVE_JAVACOMP=1 37148 fi 37149 fi 37150 else 37151 if test "$target_version" = 1.4 && test "$source_version" = 1.4; then 37152 rm -f conftest.class 37153 if { echo "$as_me:37153: gcj -C -d . conftest.java" >&5 37154 gcj -C -d . conftest.java >&5 2>&1 37155 } \ 37156 && test -f conftest.class; then 37157 CONF_JAVAC="gcj -C" 37158 HAVE_GCJ_C=1 37159 HAVE_JAVACOMP=1 37160 fi 37161 else 37162 if test "$target_version" = 1.4 && test "$source_version" = 1.3; then 37163 rm -f conftest.class 37164 if { echo "$as_me:37164: gcj -C -fno-assert -d . conftest.java" >&5 37165 gcj -C -fno-assert -d . conftest.java >&5 2>&1 37166 } \ 37167 && test -f conftest.class; then 37168 CONF_JAVAC="gcj -C -fno-assert" 37169 HAVE_GCJ_C=1 37170 HAVE_JAVACOMP=1 37171 else 37172 rm -f conftest.class 37173 if { echo "$as_me:37173: gcj -C -d . conftest.java" >&5 37174 gcj -C -d . conftest.java >&5 2>&1 37175 } \ 37176 && test -f conftest.class; then 37177 CONF_JAVAC="gcj -C" 37178 HAVE_GCJ_C=1 37179 HAVE_JAVACOMP=1 37180 fi 37181 fi 37182 fi 37183 fi 37184 fi 37185 fi 37186 fi 37187 fi 37188 if test -z "$HAVE_JAVACOMP" && test -n "$HAVE_JAVAC_IN_PATH"; then 37189 if { javac -version >/dev/null 2>/dev/null || test $? -le 2; } \ 37190 && ( if javac -help 2>&1 >/dev/null | grep at.dms.kjc.Main >/dev/null && javac -help 2>/dev/null | grep 'released.*2000' >/dev/null ; then exit 1; else exit 0; fi ); then 37191 rm -f conftest.class 37192 if { echo "$as_me:37192: javac -d . conftest.java" >&5 37193 javac -d . conftest.java >&5 2>&1 37194 } \ 37195 && test -f conftest.class \ 37196 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then 37197 rm -f conftest.class 37198 rm -f conftestfail.class 37199 if { echo "$as_me:37199: javac -source $source_version -d . conftest.java" >&5 37200 javac -source "$source_version" -d . conftest.java >&5 2>&1 37201 } \ 37202 && test -f conftest.class \ 37203 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \ 37204 && { echo "$as_me:37204: javac -d . conftestfail.java" >&5 37205 javac -d . conftestfail.java >&5 2>&1 37206 } \ 37207 && test -f conftestfail.class \ 37208 && ! { echo "$as_me:37208: javac -source $source_version -d . conftestfail.java" >&5 37209 javac -source "$source_version" -d . conftestfail.java >&5 2>&1 37210 }; then 37211 CONF_JAVAC="javac -source $source_version" 37212 HAVE_JAVAC=1 37213 HAVE_JAVACOMP=1 37214 else 37215 CONF_JAVAC="javac" 37216 HAVE_JAVAC=1 37217 HAVE_JAVACOMP=1 37218 fi 37219 else 37220 rm -f conftest.class 37221 if { echo "$as_me:37221: javac -target $target_version -d . conftest.java" >&5 37222 javac -target "$target_version" -d . conftest.java >&5 2>&1 37223 } \ 37224 && test -f conftest.class \ 37225 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then 37226 rm -f conftest.class 37227 rm -f conftestfail.class 37228 if { echo "$as_me:37228: javac -target $target_version -source $source_version -d . conftest.java" >&5 37229 javac -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1 37230 } \ 37231 && test -f conftest.class \ 37232 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5 \ 37233 && { echo "$as_me:37233: javac -target $target_version -d . conftestfail.java" >&5 37234 javac -target "$target_version" -d . conftestfail.java >&5 2>&1 37235 } \ 37236 && test -f conftestfail.class \ 37237 && ! { echo "$as_me:37237: javac -target $target_version -source $source_version -d . conftestfail.java" >&5 37238 javac -target "$target_version" -source "$source_version" -d . conftestfail.java >&5 2>&1 37239 }; then 37240 CONF_JAVAC="javac -target $target_version -source $source_version" 37241 HAVE_JAVAC=1 37242 HAVE_JAVACOMP=1 37243 else 37244 CONF_JAVAC="javac -target $target_version" 37245 HAVE_JAVAC=1 37246 HAVE_JAVACOMP=1 37247 fi 37248 else 37249 rm -f conftest.class 37250 if { echo "$as_me:37250: javac -target $target_version -source $source_version -d . conftest.java" >&5 37251 javac -target "$target_version" -source "$source_version" -d . conftest.java >&5 2>&1 37252 } \ 37253 && test -f conftest.class \ 37254 && expr `func_classfile_version conftest.class` '<=' $cfversion >/dev/null 2>&5; then 37255 CONF_JAVAC="javac -target $target_version -source $source_version" 37256 HAVE_JAVAC=1 37257 HAVE_JAVACOMP=1 37258 fi 37259 fi 37260 fi 37261 fi 37262 fi 37263 if test -z "$HAVE_JAVACOMP" && test -n "$HAVE_JIKES_IN_PATH"; then 37264 if { jikes >/dev/null 2>/dev/null || test $? = 1; } \ 37265 && ( 37266 # See if the existing CLASSPATH is sufficient to make jikes work. 37267 unset JAVA_HOME 37268 jikes conftestlib.java >&5 2>&1 37269 error=$? 37270 rm -f conftestlib.class 37271 exit $error 37272 ); then 37273 if test "$source_version" = 1.3; then 37274 CONF_JAVAC="jikes" 37275 HAVE_JIKES=1 37276 HAVE_JAVACOMP=1 37277 fi 37278 fi 37279 fi 37280 fi 37281 rm -f conftest*.java conftest*.class 37282 if test -n "$HAVE_JAVACOMP"; then 37283 ac_result="$CONF_JAVAC" 37284 else 37285 ac_result="no" 37286 fi 37287 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_result" >&5 37288$as_echo "$ac_result" >&6; } 37289 37290 37291 37292 37293 37294 37295 37296 37297 37298 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Java virtual machine" >&5 37299$as_echo_n "checking for Java virtual machine... " >&6; } 37300 cat confdefs.h - <<_ACEOF >conftest.$ac_ext 37301/* end confdefs.h. */ 37302 37303#if defined _WIN32 || defined __WIN32__ || defined __CYGWIN__ || defined __EMX__ || defined __DJGPP__ 37304 yes 37305#endif 37306 37307_ACEOF 37308if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | 37309 $EGREP "yes" >/dev/null 2>&1; then : 37310 CLASSPATH_SEPARATOR=';' 37311else 37312 CLASSPATH_SEPARATOR=':' 37313fi 37314rm -f conftest* 37315 37316 CONF_JAVA= 37317 HAVE_JAVA_ENVVAR= 37318 HAVE_GIJ= 37319 HAVE_JAVA= 37320 HAVE_JRE= 37321 HAVE_JVIEW= 37322 HAVE_JAVAEXEC=1 37323 if test -n "$JAVA"; then 37324 HAVE_JAVA_ENVVAR=1 37325 CONF_JAVA="$JAVA" 37326 else 37327 # Extract the first word of "gij", so it can be a program name with args. 37328set dummy gij; ac_word=$2 37329: 37330if ${ac_cv_prog_HAVE_GIJ_IN_PATH+:} false; then : 37331 $as_echo_n "(cached) " >&6 37332else 37333 if test -n "$HAVE_GIJ_IN_PATH"; then 37334 ac_cv_prog_HAVE_GIJ_IN_PATH="$HAVE_GIJ_IN_PATH" # Let the user override the test. 37335else 37336as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 37337for as_dir in $PATH 37338do 37339 IFS=$as_save_IFS 37340 test -z "$as_dir" && as_dir=. 37341 for ac_exec_ext in '' $ac_executable_extensions; do 37342 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 37343 ac_cv_prog_HAVE_GIJ_IN_PATH="yes" 37344 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 37345 break 2 37346 fi 37347done 37348 done 37349IFS=$as_save_IFS 37350 37351fi 37352fi 37353HAVE_GIJ_IN_PATH=$ac_cv_prog_HAVE_GIJ_IN_PATH 37354if test -n "$HAVE_GIJ_IN_PATH"; then 37355 : 37356else 37357 : 37358fi 37359 37360 37361 # Extract the first word of "java", so it can be a program name with args. 37362set dummy java; ac_word=$2 37363: 37364if ${ac_cv_prog_HAVE_JAVA_IN_PATH+:} false; then : 37365 $as_echo_n "(cached) " >&6 37366else 37367 if test -n "$HAVE_JAVA_IN_PATH"; then 37368 ac_cv_prog_HAVE_JAVA_IN_PATH="$HAVE_JAVA_IN_PATH" # Let the user override the test. 37369else 37370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 37371for as_dir in $PATH 37372do 37373 IFS=$as_save_IFS 37374 test -z "$as_dir" && as_dir=. 37375 for ac_exec_ext in '' $ac_executable_extensions; do 37376 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 37377 ac_cv_prog_HAVE_JAVA_IN_PATH="yes" 37378 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 37379 break 2 37380 fi 37381done 37382 done 37383IFS=$as_save_IFS 37384 37385fi 37386fi 37387HAVE_JAVA_IN_PATH=$ac_cv_prog_HAVE_JAVA_IN_PATH 37388if test -n "$HAVE_JAVA_IN_PATH"; then 37389 : 37390else 37391 : 37392fi 37393 37394 37395 # Extract the first word of "jre", so it can be a program name with args. 37396set dummy jre; ac_word=$2 37397: 37398if ${ac_cv_prog_HAVE_JRE_IN_PATH+:} false; then : 37399 $as_echo_n "(cached) " >&6 37400else 37401 if test -n "$HAVE_JRE_IN_PATH"; then 37402 ac_cv_prog_HAVE_JRE_IN_PATH="$HAVE_JRE_IN_PATH" # Let the user override the test. 37403else 37404as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 37405for as_dir in $PATH 37406do 37407 IFS=$as_save_IFS 37408 test -z "$as_dir" && as_dir=. 37409 for ac_exec_ext in '' $ac_executable_extensions; do 37410 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 37411 ac_cv_prog_HAVE_JRE_IN_PATH="yes" 37412 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 37413 break 2 37414 fi 37415done 37416 done 37417IFS=$as_save_IFS 37418 37419fi 37420fi 37421HAVE_JRE_IN_PATH=$ac_cv_prog_HAVE_JRE_IN_PATH 37422if test -n "$HAVE_JRE_IN_PATH"; then 37423 : 37424else 37425 : 37426fi 37427 37428 37429 # Extract the first word of "jview", so it can be a program name with args. 37430set dummy jview; ac_word=$2 37431: 37432if ${ac_cv_prog_HAVE_JVIEW_IN_PATH+:} false; then : 37433 $as_echo_n "(cached) " >&6 37434else 37435 if test -n "$HAVE_JVIEW_IN_PATH"; then 37436 ac_cv_prog_HAVE_JVIEW_IN_PATH="$HAVE_JVIEW_IN_PATH" # Let the user override the test. 37437else 37438as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 37439for as_dir in $PATH 37440do 37441 IFS=$as_save_IFS 37442 test -z "$as_dir" && as_dir=. 37443 for ac_exec_ext in '' $ac_executable_extensions; do 37444 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then 37445 ac_cv_prog_HAVE_JVIEW_IN_PATH="yes" 37446 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 37447 break 2 37448 fi 37449done 37450 done 37451IFS=$as_save_IFS 37452 37453fi 37454fi 37455HAVE_JVIEW_IN_PATH=$ac_cv_prog_HAVE_JVIEW_IN_PATH 37456if test -n "$HAVE_JVIEW_IN_PATH"; then 37457 : 37458else 37459 : 37460fi 37461 37462 37463 37464 export CLASSPATH 37465 if test -n "$HAVE_GIJ_IN_PATH" \ 37466 && gij --version >/dev/null 2>/dev/null \ 37467 ; then 37468 HAVE_GIJ=1 37469 CONF_JAVA="gij" 37470 else 37471 if test -n "$HAVE_JAVA_IN_PATH" \ 37472 && java -version >/dev/null 2>/dev/null \ 37473 ; then 37474 HAVE_JAVA=1 37475 CONF_JAVA="java" 37476 else 37477 if test -n "$HAVE_JRE_IN_PATH" \ 37478 && (jre >/dev/null 2>/dev/null || test $? = 1) \ 37479 ; then 37480 HAVE_JRE=1 37481 CONF_JAVA="jre" 37482 else 37483 if test -n "$HAVE_JVIEW_IN_PATH" \ 37484 && (jview -? >/dev/null 2>/dev/null || test $? = 1) \ 37485 ; then 37486 HAVE_JVIEW=1 37487 CONF_JAVA="jview" 37488 else 37489 HAVE_JAVAEXEC= 37490 fi 37491 fi 37492 fi 37493 fi 37494 37495 fi 37496 if test -n "$HAVE_JAVAEXEC"; then 37497 ac_result="$CONF_JAVA" 37498 else 37499 ac_result="no" 37500 fi 37501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_result" >&5 37502$as_echo "$ac_result" >&6; } 37503 37504 37505 37506 37507 37508 37509 37510 37511 37512 37513ac_config_files="$ac_config_files Makefile build-aux/Makefile po/Makefile.in data/Makefile etc/Makefile examples/Makefile examples/calc++/Makefile lib/Makefile src/Makefile doc/Makefile doc/yacc.1" 37514 37515cat >confcache <<\_ACEOF 37516# This file is a shell script that caches the results of configure 37517# tests run on this system so they can be shared between configure 37518# scripts and configure runs, see configure's option --config-cache. 37519# It is not useful on other systems. If it contains results you don't 37520# want to keep, you may remove or edit it. 37521# 37522# config.status only pays attention to the cache file if you give it 37523# the --recheck option to rerun configure. 37524# 37525# `ac_cv_env_foo' variables (set or unset) will be overridden when 37526# loading this file, other *unset* `ac_cv_foo' will be assigned the 37527# following values. 37528 37529_ACEOF 37530 37531# The following way of writing the cache mishandles newlines in values, 37532# but we know of no workaround that is simple, portable, and efficient. 37533# So, we kill variables containing newlines. 37534# Ultrix sh set writes to stderr and can't be redirected directly, 37535# and sets the high bit in the cache file unless we assign to the vars. 37536( 37537 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do 37538 eval ac_val=\$$ac_var 37539 case $ac_val in #( 37540 *${as_nl}*) 37541 case $ac_var in #( 37542 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 37543$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; 37544 esac 37545 case $ac_var in #( 37546 _ | IFS | as_nl) ;; #( 37547 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( 37548 *) { eval $ac_var=; unset $ac_var;} ;; 37549 esac ;; 37550 esac 37551 done 37552 37553 (set) 2>&1 | 37554 case $as_nl`(ac_space=' '; set) 2>&1` in #( 37555 *${as_nl}ac_space=\ *) 37556 # `set' does not quote correctly, so add quotes: double-quote 37557 # substitution turns \\\\ into \\, and sed turns \\ into \. 37558 sed -n \ 37559 "s/'/'\\\\''/g; 37560 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" 37561 ;; #( 37562 *) 37563 # `set' quotes correctly as required by POSIX, so do not add quotes. 37564 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" 37565 ;; 37566 esac | 37567 sort 37568) | 37569 sed ' 37570 /^ac_cv_env_/b end 37571 t clear 37572 :clear 37573 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ 37574 t end 37575 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ 37576 :end' >>confcache 37577if diff "$cache_file" confcache >/dev/null 2>&1; then :; else 37578 if test -w "$cache_file"; then 37579 if test "x$cache_file" != "x/dev/null"; then 37580 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 37581$as_echo "$as_me: updating cache $cache_file" >&6;} 37582 if test ! -f "$cache_file" || test -h "$cache_file"; then 37583 cat confcache >"$cache_file" 37584 else 37585 case $cache_file in #( 37586 */* | ?:*) 37587 mv -f confcache "$cache_file"$$ && 37588 mv -f "$cache_file"$$ "$cache_file" ;; #( 37589 *) 37590 mv -f confcache "$cache_file" ;; 37591 esac 37592 fi 37593 fi 37594 else 37595 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 37596$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} 37597 fi 37598fi 37599rm -f confcache 37600 37601test "x$prefix" = xNONE && prefix=$ac_default_prefix 37602# Let make expand exec_prefix. 37603test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' 37604 37605DEFS=-DHAVE_CONFIG_H 37606 37607ac_libobjs= 37608ac_ltlibobjs= 37609U= 37610for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue 37611 # 1. Remove the extension, and $U if already installed. 37612 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' 37613 ac_i=`$as_echo "$ac_i" | sed "$ac_script"` 37614 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR 37615 # will be set to the directory where LIBOBJS objects are built. 37616 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" 37617 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' 37618done 37619LIBOBJS=$ac_libobjs 37620 37621LTLIBOBJS=$ac_ltlibobjs 37622 37623 37624{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 37625$as_echo_n "checking that generated files are newer than configure... " >&6; } 37626 if test -n "$am_sleep_pid"; then 37627 # Hide warnings about reused PIDs. 37628 wait $am_sleep_pid 2>/dev/null 37629 fi 37630 { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 37631$as_echo "done" >&6; } 37632 if test -n "$EXEEXT"; then 37633 am__EXEEXT_TRUE= 37634 am__EXEEXT_FALSE='#' 37635else 37636 am__EXEEXT_TRUE='#' 37637 am__EXEEXT_FALSE= 37638fi 37639 37640if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then 37641 as_fn_error $? "conditional \"AMDEP\" was never defined. 37642Usually this means the macro was only invoked conditionally." "$LINENO" 5 37643fi 37644if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then 37645 as_fn_error $? "conditional \"am__fastdepCC\" was never defined. 37646Usually this means the macro was only invoked conditionally." "$LINENO" 5 37647fi 37648if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then 37649 as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. 37650Usually this means the macro was only invoked conditionally." "$LINENO" 5 37651fi 37652if test -z "${BISON_CXX_WORKS_TRUE}" && test -z "${BISON_CXX_WORKS_FALSE}"; then 37653 as_fn_error $? "conditional \"BISON_CXX_WORKS\" was never defined. 37654Usually this means the macro was only invoked conditionally." "$LINENO" 5 37655fi 37656if test -z "${GL_COND_LIBTOOL_TRUE}" && test -z "${GL_COND_LIBTOOL_FALSE}"; then 37657 as_fn_error $? "conditional \"GL_COND_LIBTOOL\" was never defined. 37658Usually this means the macro was only invoked conditionally." "$LINENO" 5 37659fi 37660if test -z "${GL_GENERATE_ALLOCA_H_TRUE}" && test -z "${GL_GENERATE_ALLOCA_H_FALSE}"; then 37661 as_fn_error $? "conditional \"GL_GENERATE_ALLOCA_H\" was never defined. 37662Usually this means the macro was only invoked conditionally." "$LINENO" 5 37663fi 37664test "X$DEFS" = X-DHAVE_CONFIG_H && DEFS= 37665if test -z "${GL_GENERATE_ERRNO_H_TRUE}" && test -z "${GL_GENERATE_ERRNO_H_FALSE}"; then 37666 as_fn_error $? "conditional \"GL_GENERATE_ERRNO_H\" was never defined. 37667Usually this means the macro was only invoked conditionally." "$LINENO" 5 37668fi 37669if test -z "${GL_GENERATE_FLOAT_H_TRUE}" && test -z "${GL_GENERATE_FLOAT_H_FALSE}"; then 37670 as_fn_error $? "conditional \"GL_GENERATE_FLOAT_H\" was never defined. 37671Usually this means the macro was only invoked conditionally." "$LINENO" 5 37672fi 37673 37674 37675if test -z "${GL_GENERATE_STDINT_H_TRUE}" && test -z "${GL_GENERATE_STDINT_H_FALSE}"; then 37676 as_fn_error $? "conditional \"GL_GENERATE_STDINT_H\" was never defined. 37677Usually this means the macro was only invoked conditionally." "$LINENO" 5 37678fi 37679CONFIG_INCLUDE=lib/config.h 37680 37681if test -z "${GL_GENERATE_SCHED_H_TRUE}" && test -z "${GL_GENERATE_SCHED_H_FALSE}"; then 37682 as_fn_error $? "conditional \"GL_GENERATE_SCHED_H\" was never defined. 37683Usually this means the macro was only invoked conditionally." "$LINENO" 5 37684fi 37685if test -z "${GL_GENERATE_STDBOOL_H_TRUE}" && test -z "${GL_GENERATE_STDBOOL_H_FALSE}"; then 37686 as_fn_error $? "conditional \"GL_GENERATE_STDBOOL_H\" was never defined. 37687Usually this means the macro was only invoked conditionally." "$LINENO" 5 37688fi 37689if test -z "${GL_GENERATE_STDDEF_H_TRUE}" && test -z "${GL_GENERATE_STDDEF_H_FALSE}"; then 37690 as_fn_error $? "conditional \"GL_GENERATE_STDDEF_H\" was never defined. 37691Usually this means the macro was only invoked conditionally." "$LINENO" 5 37692fi 37693if test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_TRUE}" && test -z "${LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH_FALSE}"; then 37694 as_fn_error $? "conditional \"LIBUNISTRING_COMPILE_UNIWIDTH_WIDTH\" was never defined. 37695Usually this means the macro was only invoked conditionally." "$LINENO" 5 37696fi 37697 37698 gl_libobjs= 37699 gl_ltlibobjs= 37700 if test -n "$gl_LIBOBJS"; then 37701 # Remove the extension. 37702 sed_drop_objext='s/\.o$//;s/\.obj$//' 37703 for i in `for i in $gl_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do 37704 gl_libobjs="$gl_libobjs $i.$ac_objext" 37705 gl_ltlibobjs="$gl_ltlibobjs $i.lo" 37706 done 37707 fi 37708 gl_LIBOBJS=$gl_libobjs 37709 37710 gl_LTLIBOBJS=$gl_ltlibobjs 37711 37712 37713 37714 gltests_libobjs= 37715 gltests_ltlibobjs= 37716 if test -n "$gltests_LIBOBJS"; then 37717 # Remove the extension. 37718 sed_drop_objext='s/\.o$//;s/\.obj$//' 37719 for i in `for i in $gltests_LIBOBJS; do echo "$i"; done | sed -e "$sed_drop_objext" | sort | uniq`; do 37720 gltests_libobjs="$gltests_libobjs $i.$ac_objext" 37721 gltests_ltlibobjs="$gltests_ltlibobjs $i.lo" 37722 done 37723 fi 37724 gltests_LIBOBJS=$gltests_libobjs 37725 37726 gltests_LTLIBOBJS=$gltests_ltlibobjs 37727 37728 37729 37730: "${CONFIG_STATUS=./config.status}" 37731ac_write_fail=0 37732ac_clean_files_save=$ac_clean_files 37733ac_clean_files="$ac_clean_files $CONFIG_STATUS" 37734{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 37735$as_echo "$as_me: creating $CONFIG_STATUS" >&6;} 37736as_write_fail=0 37737cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 37738#! $SHELL 37739# Generated by $as_me. 37740# Run this file to recreate the current configuration. 37741# Compiler output produced by configure, useful for debugging 37742# configure, is in config.log if it exists. 37743 37744debug=false 37745ac_cs_recheck=false 37746ac_cs_silent=false 37747 37748SHELL=\${CONFIG_SHELL-$SHELL} 37749export SHELL 37750_ASEOF 37751cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 37752## -------------------- ## 37753## M4sh Initialization. ## 37754## -------------------- ## 37755 37756# Be more Bourne compatible 37757DUALCASE=1; export DUALCASE # for MKS sh 37758if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : 37759 emulate sh 37760 NULLCMD=: 37761 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which 37762 # is contrary to our usage. Disable this feature. 37763 alias -g '${1+"$@"}'='"$@"' 37764 setopt NO_GLOB_SUBST 37765else 37766 case `(set -o) 2>/dev/null` in #( 37767 *posix*) : 37768 set -o posix ;; #( 37769 *) : 37770 ;; 37771esac 37772fi 37773 37774 37775as_nl=' 37776' 37777export as_nl 37778# Printing a long string crashes Solaris 7 /usr/bin/printf. 37779as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' 37780as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo 37781as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo 37782# Prefer a ksh shell builtin over an external printf program on Solaris, 37783# but without wasting forks for bash or zsh. 37784if test -z "$BASH_VERSION$ZSH_VERSION" \ 37785 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then 37786 as_echo='print -r --' 37787 as_echo_n='print -rn --' 37788elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then 37789 as_echo='printf %s\n' 37790 as_echo_n='printf %s' 37791else 37792 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then 37793 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' 37794 as_echo_n='/usr/ucb/echo -n' 37795 else 37796 as_echo_body='eval expr "X$1" : "X\\(.*\\)"' 37797 as_echo_n_body='eval 37798 arg=$1; 37799 case $arg in #( 37800 *"$as_nl"*) 37801 expr "X$arg" : "X\\(.*\\)$as_nl"; 37802 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; 37803 esac; 37804 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" 37805 ' 37806 export as_echo_n_body 37807 as_echo_n='sh -c $as_echo_n_body as_echo' 37808 fi 37809 export as_echo_body 37810 as_echo='sh -c $as_echo_body as_echo' 37811fi 37812 37813# The user is always right. 37814if test "${PATH_SEPARATOR+set}" != set; then 37815 PATH_SEPARATOR=: 37816 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { 37817 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || 37818 PATH_SEPARATOR=';' 37819 } 37820fi 37821 37822 37823# IFS 37824# We need space, tab and new line, in precisely that order. Quoting is 37825# there to prevent editors from complaining about space-tab. 37826# (If _AS_PATH_WALK were called with IFS unset, it would disable word 37827# splitting by setting IFS to empty value.) 37828IFS=" "" $as_nl" 37829 37830# Find who we are. Look in the path if we contain no directory separator. 37831as_myself= 37832case $0 in #(( 37833 *[\\/]* ) as_myself=$0 ;; 37834 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR 37835for as_dir in $PATH 37836do 37837 IFS=$as_save_IFS 37838 test -z "$as_dir" && as_dir=. 37839 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break 37840 done 37841IFS=$as_save_IFS 37842 37843 ;; 37844esac 37845# We did not find ourselves, most probably we were run as `sh COMMAND' 37846# in which case we are not to be found in the path. 37847if test "x$as_myself" = x; then 37848 as_myself=$0 37849fi 37850if test ! -f "$as_myself"; then 37851 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 37852 exit 1 37853fi 37854 37855# Unset variables that we do not need and which cause bugs (e.g. in 37856# pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" 37857# suppresses any "Segmentation fault" message there. '((' could 37858# trigger a bug in pdksh 5.2.14. 37859for as_var in BASH_ENV ENV MAIL MAILPATH 37860do eval test x\${$as_var+set} = xset \ 37861 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : 37862done 37863PS1='$ ' 37864PS2='> ' 37865PS4='+ ' 37866 37867# NLS nuisances. 37868LC_ALL=C 37869export LC_ALL 37870LANGUAGE=C 37871export LANGUAGE 37872 37873# CDPATH. 37874(unset CDPATH) >/dev/null 2>&1 && unset CDPATH 37875 37876 37877# as_fn_error STATUS ERROR [LINENO LOG_FD] 37878# ---------------------------------------- 37879# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are 37880# provided, also output the error to LOG_FD, referencing LINENO. Then exit the 37881# script with STATUS, using 1 if that was 0. 37882as_fn_error () 37883{ 37884 as_status=$1; test $as_status -eq 0 && as_status=1 37885 if test "$4"; then 37886 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack 37887 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 37888 fi 37889 $as_echo "$as_me: error: $2" >&2 37890 as_fn_exit $as_status 37891} # as_fn_error 37892 37893 37894# as_fn_set_status STATUS 37895# ----------------------- 37896# Set $? to STATUS, without forking. 37897as_fn_set_status () 37898{ 37899 return $1 37900} # as_fn_set_status 37901 37902# as_fn_exit STATUS 37903# ----------------- 37904# Exit the shell with STATUS, even in a "trap 0" or "set -e" context. 37905as_fn_exit () 37906{ 37907 set +e 37908 as_fn_set_status $1 37909 exit $1 37910} # as_fn_exit 37911 37912# as_fn_unset VAR 37913# --------------- 37914# Portably unset VAR. 37915as_fn_unset () 37916{ 37917 { eval $1=; unset $1;} 37918} 37919as_unset=as_fn_unset 37920# as_fn_append VAR VALUE 37921# ---------------------- 37922# Append the text in VALUE to the end of the definition contained in VAR. Take 37923# advantage of any shell optimizations that allow amortized linear growth over 37924# repeated appends, instead of the typical quadratic growth present in naive 37925# implementations. 37926if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : 37927 eval 'as_fn_append () 37928 { 37929 eval $1+=\$2 37930 }' 37931else 37932 as_fn_append () 37933 { 37934 eval $1=\$$1\$2 37935 } 37936fi # as_fn_append 37937 37938# as_fn_arith ARG... 37939# ------------------ 37940# Perform arithmetic evaluation on the ARGs, and store the result in the 37941# global $as_val. Take advantage of shells that can avoid forks. The arguments 37942# must be portable across $(()) and expr. 37943if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : 37944 eval 'as_fn_arith () 37945 { 37946 as_val=$(( $* )) 37947 }' 37948else 37949 as_fn_arith () 37950 { 37951 as_val=`expr "$@" || test $? -eq 1` 37952 } 37953fi # as_fn_arith 37954 37955 37956if expr a : '\(a\)' >/dev/null 2>&1 && 37957 test "X`expr 00001 : '.*\(...\)'`" = X001; then 37958 as_expr=expr 37959else 37960 as_expr=false 37961fi 37962 37963if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then 37964 as_basename=basename 37965else 37966 as_basename=false 37967fi 37968 37969if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then 37970 as_dirname=dirname 37971else 37972 as_dirname=false 37973fi 37974 37975as_me=`$as_basename -- "$0" || 37976$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ 37977 X"$0" : 'X\(//\)$' \| \ 37978 X"$0" : 'X\(/\)' \| . 2>/dev/null || 37979$as_echo X/"$0" | 37980 sed '/^.*\/\([^/][^/]*\)\/*$/{ 37981 s//\1/ 37982 q 37983 } 37984 /^X\/\(\/\/\)$/{ 37985 s//\1/ 37986 q 37987 } 37988 /^X\/\(\/\).*/{ 37989 s//\1/ 37990 q 37991 } 37992 s/.*/./; q'` 37993 37994# Avoid depending upon Character Ranges. 37995as_cr_letters='abcdefghijklmnopqrstuvwxyz' 37996as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' 37997as_cr_Letters=$as_cr_letters$as_cr_LETTERS 37998as_cr_digits='0123456789' 37999as_cr_alnum=$as_cr_Letters$as_cr_digits 38000 38001ECHO_C= ECHO_N= ECHO_T= 38002case `echo -n x` in #((((( 38003-n*) 38004 case `echo 'xy\c'` in 38005 *c*) ECHO_T=' ';; # ECHO_T is single tab character. 38006 xy) ECHO_C='\c';; 38007 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null 38008 ECHO_T=' ';; 38009 esac;; 38010*) 38011 ECHO_N='-n';; 38012esac 38013 38014rm -f conf$$ conf$$.exe conf$$.file 38015if test -d conf$$.dir; then 38016 rm -f conf$$.dir/conf$$.file 38017else 38018 rm -f conf$$.dir 38019 mkdir conf$$.dir 2>/dev/null 38020fi 38021if (echo >conf$$.file) 2>/dev/null; then 38022 if ln -s conf$$.file conf$$ 2>/dev/null; then 38023 as_ln_s='ln -s' 38024 # ... but there are two gotchas: 38025 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. 38026 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. 38027 # In both cases, we have to default to `cp -pR'. 38028 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || 38029 as_ln_s='cp -pR' 38030 elif ln conf$$.file conf$$ 2>/dev/null; then 38031 as_ln_s=ln 38032 else 38033 as_ln_s='cp -pR' 38034 fi 38035else 38036 as_ln_s='cp -pR' 38037fi 38038rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file 38039rmdir conf$$.dir 2>/dev/null 38040 38041 38042# as_fn_mkdir_p 38043# ------------- 38044# Create "$as_dir" as a directory, including parents if necessary. 38045as_fn_mkdir_p () 38046{ 38047 38048 case $as_dir in #( 38049 -*) as_dir=./$as_dir;; 38050 esac 38051 test -d "$as_dir" || eval $as_mkdir_p || { 38052 as_dirs= 38053 while :; do 38054 case $as_dir in #( 38055 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( 38056 *) as_qdir=$as_dir;; 38057 esac 38058 as_dirs="'$as_qdir' $as_dirs" 38059 as_dir=`$as_dirname -- "$as_dir" || 38060$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 38061 X"$as_dir" : 'X\(//\)[^/]' \| \ 38062 X"$as_dir" : 'X\(//\)$' \| \ 38063 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || 38064$as_echo X"$as_dir" | 38065 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 38066 s//\1/ 38067 q 38068 } 38069 /^X\(\/\/\)[^/].*/{ 38070 s//\1/ 38071 q 38072 } 38073 /^X\(\/\/\)$/{ 38074 s//\1/ 38075 q 38076 } 38077 /^X\(\/\).*/{ 38078 s//\1/ 38079 q 38080 } 38081 s/.*/./; q'` 38082 test -d "$as_dir" && break 38083 done 38084 test -z "$as_dirs" || eval "mkdir $as_dirs" 38085 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" 38086 38087 38088} # as_fn_mkdir_p 38089if mkdir -p . 2>/dev/null; then 38090 as_mkdir_p='mkdir -p "$as_dir"' 38091else 38092 test -d ./-p && rmdir ./-p 38093 as_mkdir_p=false 38094fi 38095 38096 38097# as_fn_executable_p FILE 38098# ----------------------- 38099# Test if FILE is an executable regular file. 38100as_fn_executable_p () 38101{ 38102 test -f "$1" && test -x "$1" 38103} # as_fn_executable_p 38104as_test_x='test -x' 38105as_executable_p=as_fn_executable_p 38106 38107# Sed expression to map a string onto a valid CPP name. 38108as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" 38109 38110# Sed expression to map a string onto a valid variable name. 38111as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" 38112 38113 38114exec 6>&1 38115## ----------------------------------- ## 38116## Main body of $CONFIG_STATUS script. ## 38117## ----------------------------------- ## 38118_ASEOF 38119test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 38120 38121cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 38122# Save the log message, to keep $0 and so on meaningful, and to 38123# report actual input values of CONFIG_FILES etc. instead of their 38124# values after options handling. 38125ac_log=" 38126This file was extended by GNU Bison $as_me 2.7, which was 38127generated by GNU Autoconf 2.69. Invocation command line was 38128 38129 CONFIG_FILES = $CONFIG_FILES 38130 CONFIG_HEADERS = $CONFIG_HEADERS 38131 CONFIG_LINKS = $CONFIG_LINKS 38132 CONFIG_COMMANDS = $CONFIG_COMMANDS 38133 $ $0 $@ 38134 38135on `(hostname || uname -n) 2>/dev/null | sed 1q` 38136" 38137 38138_ACEOF 38139 38140case $ac_config_files in *" 38141"*) set x $ac_config_files; shift; ac_config_files=$*;; 38142esac 38143 38144case $ac_config_headers in *" 38145"*) set x $ac_config_headers; shift; ac_config_headers=$*;; 38146esac 38147 38148 38149cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 38150# Files that config.status was made for. 38151config_files="$ac_config_files" 38152config_headers="$ac_config_headers" 38153config_links="$ac_config_links" 38154config_commands="$ac_config_commands" 38155 38156_ACEOF 38157 38158cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 38159ac_cs_usage="\ 38160\`$as_me' instantiates files and other configuration actions 38161from templates according to the current configuration. Unless the files 38162and actions are specified as TAGs, all are instantiated by default. 38163 38164Usage: $0 [OPTION]... [TAG]... 38165 38166 -h, --help print this help, then exit 38167 -V, --version print version number and configuration settings, then exit 38168 --config print configuration, then exit 38169 -q, --quiet, --silent 38170 do not print progress messages 38171 -d, --debug don't remove temporary files 38172 --recheck update $as_me by reconfiguring in the same conditions 38173 --file=FILE[:TEMPLATE] 38174 instantiate the configuration file FILE 38175 --header=FILE[:TEMPLATE] 38176 instantiate the configuration header FILE 38177 38178Configuration files: 38179$config_files 38180 38181Configuration headers: 38182$config_headers 38183 38184Configuration links: 38185$config_links 38186 38187Configuration commands: 38188$config_commands 38189 38190Report bugs to <bug-bison@gnu.org>. 38191GNU Bison home page: <http://www.gnu.org/software/bison/>. 38192General help using GNU software: <http://www.gnu.org/gethelp/>." 38193 38194_ACEOF 38195cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 38196ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" 38197ac_cs_version="\\ 38198GNU Bison config.status 2.7 38199configured by $0, generated by GNU Autoconf 2.69, 38200 with options \\"\$ac_cs_config\\" 38201 38202Copyright (C) 2012 Free Software Foundation, Inc. 38203This config.status script is free software; the Free Software Foundation 38204gives unlimited permission to copy, distribute and modify it." 38205 38206ac_pwd='$ac_pwd' 38207srcdir='$srcdir' 38208INSTALL='$INSTALL' 38209MKDIR_P='$MKDIR_P' 38210AWK='$AWK' 38211test -n "\$AWK" || AWK=awk 38212_ACEOF 38213 38214cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 38215# The default lists apply if the user does not specify any file. 38216ac_need_defaults=: 38217while test $# != 0 38218do 38219 case $1 in 38220 --*=?*) 38221 ac_option=`expr "X$1" : 'X\([^=]*\)='` 38222 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` 38223 ac_shift=: 38224 ;; 38225 --*=) 38226 ac_option=`expr "X$1" : 'X\([^=]*\)='` 38227 ac_optarg= 38228 ac_shift=: 38229 ;; 38230 *) 38231 ac_option=$1 38232 ac_optarg=$2 38233 ac_shift=shift 38234 ;; 38235 esac 38236 38237 case $ac_option in 38238 # Handling of the options. 38239 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) 38240 ac_cs_recheck=: ;; 38241 --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) 38242 $as_echo "$ac_cs_version"; exit ;; 38243 --config | --confi | --conf | --con | --co | --c ) 38244 $as_echo "$ac_cs_config"; exit ;; 38245 --debug | --debu | --deb | --de | --d | -d ) 38246 debug=: ;; 38247 --file | --fil | --fi | --f ) 38248 $ac_shift 38249 case $ac_optarg in 38250 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 38251 '') as_fn_error $? "missing file argument" ;; 38252 esac 38253 as_fn_append CONFIG_FILES " '$ac_optarg'" 38254 ac_need_defaults=false;; 38255 --header | --heade | --head | --hea ) 38256 $ac_shift 38257 case $ac_optarg in 38258 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; 38259 esac 38260 as_fn_append CONFIG_HEADERS " '$ac_optarg'" 38261 ac_need_defaults=false;; 38262 --he | --h) 38263 # Conflict between --help and --header 38264 as_fn_error $? "ambiguous option: \`$1' 38265Try \`$0 --help' for more information.";; 38266 --help | --hel | -h ) 38267 $as_echo "$ac_cs_usage"; exit ;; 38268 -q | -quiet | --quiet | --quie | --qui | --qu | --q \ 38269 | -silent | --silent | --silen | --sile | --sil | --si | --s) 38270 ac_cs_silent=: ;; 38271 38272 # This is an error. 38273 -*) as_fn_error $? "unrecognized option: \`$1' 38274Try \`$0 --help' for more information." ;; 38275 38276 *) as_fn_append ac_config_targets " $1" 38277 ac_need_defaults=false ;; 38278 38279 esac 38280 shift 38281done 38282 38283ac_configure_extra_args= 38284 38285if $ac_cs_silent; then 38286 exec 6>/dev/null 38287 ac_configure_extra_args="$ac_configure_extra_args --silent" 38288fi 38289 38290_ACEOF 38291cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 38292if \$ac_cs_recheck; then 38293 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion 38294 shift 38295 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 38296 CONFIG_SHELL='$SHELL' 38297 export CONFIG_SHELL 38298 exec "\$@" 38299fi 38300 38301_ACEOF 38302cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 38303exec 5>>config.log 38304{ 38305 echo 38306 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX 38307## Running $as_me. ## 38308_ASBOX 38309 $as_echo "$ac_log" 38310} >&5 38311 38312_ACEOF 38313cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 38314# 38315# INIT-COMMANDS 38316# 38317AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" 38318GNUmakefile=$GNUmakefile 38319# Capture the value of obsolete ALL_LINGUAS because we need it to compute 38320 # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it 38321 # from automake < 1.5. 38322 eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"' 38323 # Capture the value of LINGUAS because we need it to compute CATALOGS. 38324 LINGUAS="${LINGUAS-%UNSET%}" 38325 38326 38327 38328_ACEOF 38329 38330cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 38331 38332# Handling of arguments. 38333for ac_config_target in $ac_config_targets 38334do 38335 case $ac_config_target in 38336 "lib/config.h") CONFIG_HEADERS="$CONFIG_HEADERS lib/config.h:lib/config.in.h" ;; 38337 "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; 38338 "$GNUmakefile") CONFIG_LINKS="$CONFIG_LINKS $GNUmakefile:$GNUmakefile" ;; 38339 "javacomp.sh") CONFIG_FILES="$CONFIG_FILES javacomp.sh:build-aux/javacomp.sh.in" ;; 38340 "javaexec.sh") CONFIG_FILES="$CONFIG_FILES javaexec.sh:build-aux/javaexec.sh.in" ;; 38341 "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; 38342 "runtime-po/Makefile.in") CONFIG_FILES="$CONFIG_FILES runtime-po/Makefile.in" ;; 38343 "etc/bench.pl") CONFIG_FILES="$CONFIG_FILES etc/bench.pl" ;; 38344 "tests/atconfig") CONFIG_COMMANDS="$CONFIG_COMMANDS tests/atconfig" ;; 38345 "tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;; 38346 "tests/atlocal") CONFIG_FILES="$CONFIG_FILES tests/atlocal" ;; 38347 "tests/bison") CONFIG_FILES="$CONFIG_FILES tests/bison" ;; 38348 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; 38349 "build-aux/Makefile") CONFIG_FILES="$CONFIG_FILES build-aux/Makefile" ;; 38350 "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; 38351 "data/Makefile") CONFIG_FILES="$CONFIG_FILES data/Makefile" ;; 38352 "etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;; 38353 "examples/Makefile") CONFIG_FILES="$CONFIG_FILES examples/Makefile" ;; 38354 "examples/calc++/Makefile") CONFIG_FILES="$CONFIG_FILES examples/calc++/Makefile" ;; 38355 "lib/Makefile") CONFIG_FILES="$CONFIG_FILES lib/Makefile" ;; 38356 "src/Makefile") CONFIG_FILES="$CONFIG_FILES src/Makefile" ;; 38357 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; 38358 "doc/yacc.1") CONFIG_FILES="$CONFIG_FILES doc/yacc.1" ;; 38359 38360 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; 38361 esac 38362done 38363 38364 38365# If the user did not use the arguments to specify the items to instantiate, 38366# then the envvar interface is used. Set only those that are not. 38367# We use the long form for the default assignment because of an extremely 38368# bizarre bug on SunOS 4.1.3. 38369if $ac_need_defaults; then 38370 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files 38371 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers 38372 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links 38373 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands 38374fi 38375 38376# Have a temporary directory for convenience. Make it in the build tree 38377# simply because there is no reason against having it here, and in addition, 38378# creating and moving files from /tmp can sometimes cause problems. 38379# Hook for its removal unless debugging. 38380# Note that there is a small window in which the directory will not be cleaned: 38381# after its creation but before its name has been assigned to `$tmp'. 38382$debug || 38383{ 38384 tmp= ac_tmp= 38385 trap 'exit_status=$? 38386 : "${ac_tmp:=$tmp}" 38387 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status 38388' 0 38389 trap 'as_fn_exit 1' 1 2 13 15 38390} 38391# Create a (secure) tmp directory for tmp files. 38392 38393{ 38394 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && 38395 test -d "$tmp" 38396} || 38397{ 38398 tmp=./conf$$-$RANDOM 38399 (umask 077 && mkdir "$tmp") 38400} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 38401ac_tmp=$tmp 38402 38403# Set up the scripts for CONFIG_FILES section. 38404# No need to generate them if there are no CONFIG_FILES. 38405# This happens for instance with `./config.status config.h'. 38406if test -n "$CONFIG_FILES"; then 38407 38408 38409ac_cr=`echo X | tr X '\015'` 38410# On cygwin, bash can eat \r inside `` if the user requested igncr. 38411# But we know of no other shell where ac_cr would be empty at this 38412# point, so we can use a bashism as a fallback. 38413if test "x$ac_cr" = x; then 38414 eval ac_cr=\$\'\\r\' 38415fi 38416ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` 38417if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then 38418 ac_cs_awk_cr='\\r' 38419else 38420 ac_cs_awk_cr=$ac_cr 38421fi 38422 38423echo 'BEGIN {' >"$ac_tmp/subs1.awk" && 38424_ACEOF 38425 38426 38427{ 38428 echo "cat >conf$$subs.awk <<_ACEOF" && 38429 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && 38430 echo "_ACEOF" 38431} >conf$$subs.sh || 38432 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 38433ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` 38434ac_delim='%!_!# ' 38435for ac_last_try in false false false false false :; do 38436 . ./conf$$subs.sh || 38437 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 38438 38439 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` 38440 if test $ac_delim_n = $ac_delim_num; then 38441 break 38442 elif $ac_last_try; then 38443 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 38444 else 38445 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 38446 fi 38447done 38448rm -f conf$$subs.sh 38449 38450cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 38451cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && 38452_ACEOF 38453sed -n ' 38454h 38455s/^/S["/; s/!.*/"]=/ 38456p 38457g 38458s/^[^!]*!// 38459:repl 38460t repl 38461s/'"$ac_delim"'$// 38462t delim 38463:nl 38464h 38465s/\(.\{148\}\)..*/\1/ 38466t more1 38467s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ 38468p 38469n 38470b repl 38471:more1 38472s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 38473p 38474g 38475s/.\{148\}// 38476t nl 38477:delim 38478h 38479s/\(.\{148\}\)..*/\1/ 38480t more2 38481s/["\\]/\\&/g; s/^/"/; s/$/"/ 38482p 38483b 38484:more2 38485s/["\\]/\\&/g; s/^/"/; s/$/"\\/ 38486p 38487g 38488s/.\{148\}// 38489t delim 38490' <conf$$subs.awk | sed ' 38491/^[^""]/{ 38492 N 38493 s/\n// 38494} 38495' >>$CONFIG_STATUS || ac_write_fail=1 38496rm -f conf$$subs.awk 38497cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 38498_ACAWK 38499cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && 38500 for (key in S) S_is_set[key] = 1 38501 FS = "" 38502 38503} 38504{ 38505 line = $ 0 38506 nfields = split(line, field, "@") 38507 substed = 0 38508 len = length(field[1]) 38509 for (i = 2; i < nfields; i++) { 38510 key = field[i] 38511 keylen = length(key) 38512 if (S_is_set[key]) { 38513 value = S[key] 38514 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) 38515 len += length(value) + length(field[++i]) 38516 substed = 1 38517 } else 38518 len += 1 + keylen 38519 } 38520 38521 print line 38522} 38523 38524_ACAWK 38525_ACEOF 38526cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 38527if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then 38528 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" 38529else 38530 cat 38531fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ 38532 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 38533_ACEOF 38534 38535# VPATH may cause trouble with some makes, so we remove sole $(srcdir), 38536# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and 38537# trailing colons and then remove the whole line if VPATH becomes empty 38538# (actually we leave an empty line to preserve line numbers). 38539if test "x$srcdir" = x.; then 38540 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ 38541h 38542s/// 38543s/^/:/ 38544s/[ ]*$/:/ 38545s/:\$(srcdir):/:/g 38546s/:\${srcdir}:/:/g 38547s/:@srcdir@:/:/g 38548s/^:*// 38549s/:*$// 38550x 38551s/\(=[ ]*\).*/\1/ 38552G 38553s/\n// 38554s/^[^=]*=[ ]*$// 38555}' 38556fi 38557 38558cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 38559fi # test -n "$CONFIG_FILES" 38560 38561# Set up the scripts for CONFIG_HEADERS section. 38562# No need to generate them if there are no CONFIG_HEADERS. 38563# This happens for instance with `./config.status Makefile'. 38564if test -n "$CONFIG_HEADERS"; then 38565cat >"$ac_tmp/defines.awk" <<\_ACAWK || 38566BEGIN { 38567_ACEOF 38568 38569# Transform confdefs.h into an awk script `defines.awk', embedded as 38570# here-document in config.status, that substitutes the proper values into 38571# config.h.in to produce config.h. 38572 38573# Create a delimiter string that does not exist in confdefs.h, to ease 38574# handling of long lines. 38575ac_delim='%!_!# ' 38576for ac_last_try in false false :; do 38577 ac_tt=`sed -n "/$ac_delim/p" confdefs.h` 38578 if test -z "$ac_tt"; then 38579 break 38580 elif $ac_last_try; then 38581 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 38582 else 38583 ac_delim="$ac_delim!$ac_delim _$ac_delim!! " 38584 fi 38585done 38586 38587# For the awk script, D is an array of macro values keyed by name, 38588# likewise P contains macro parameters if any. Preserve backslash 38589# newline sequences. 38590 38591ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* 38592sed -n ' 38593s/.\{148\}/&'"$ac_delim"'/g 38594t rset 38595:rset 38596s/^[ ]*#[ ]*define[ ][ ]*/ / 38597t def 38598d 38599:def 38600s/\\$// 38601t bsnl 38602s/["\\]/\\&/g 38603s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 38604D["\1"]=" \3"/p 38605s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p 38606d 38607:bsnl 38608s/["\\]/\\&/g 38609s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ 38610D["\1"]=" \3\\\\\\n"\\/p 38611t cont 38612s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p 38613t cont 38614d 38615:cont 38616n 38617s/.\{148\}/&'"$ac_delim"'/g 38618t clear 38619:clear 38620s/\\$// 38621t bsnlc 38622s/["\\]/\\&/g; s/^/"/; s/$/"/p 38623d 38624:bsnlc 38625s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p 38626b cont 38627' <confdefs.h | sed ' 38628s/'"$ac_delim"'/"\\\ 38629"/g' >>$CONFIG_STATUS || ac_write_fail=1 38630 38631cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 38632 for (key in D) D_is_set[key] = 1 38633 FS = "" 38634} 38635/^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { 38636 line = \$ 0 38637 split(line, arg, " ") 38638 if (arg[1] == "#") { 38639 defundef = arg[2] 38640 mac1 = arg[3] 38641 } else { 38642 defundef = substr(arg[1], 2) 38643 mac1 = arg[2] 38644 } 38645 split(mac1, mac2, "(") #) 38646 macro = mac2[1] 38647 prefix = substr(line, 1, index(line, defundef) - 1) 38648 if (D_is_set[macro]) { 38649 # Preserve the white space surrounding the "#". 38650 print prefix "define", macro P[macro] D[macro] 38651 next 38652 } else { 38653 # Replace #undef with comments. This is necessary, for example, 38654 # in the case of _POSIX_SOURCE, which is predefined and required 38655 # on some systems where configure will not decide to define it. 38656 if (defundef == "undef") { 38657 print "/*", prefix defundef, macro, "*/" 38658 next 38659 } 38660 } 38661} 38662{ print } 38663_ACAWK 38664_ACEOF 38665cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 38666 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 38667fi # test -n "$CONFIG_HEADERS" 38668 38669 38670eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" 38671shift 38672for ac_tag 38673do 38674 case $ac_tag in 38675 :[FHLC]) ac_mode=$ac_tag; continue;; 38676 esac 38677 case $ac_mode$ac_tag in 38678 :[FHL]*:*);; 38679 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; 38680 :[FH]-) ac_tag=-:-;; 38681 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; 38682 esac 38683 ac_save_IFS=$IFS 38684 IFS=: 38685 set x $ac_tag 38686 IFS=$ac_save_IFS 38687 shift 38688 ac_file=$1 38689 shift 38690 38691 case $ac_mode in 38692 :L) ac_source=$1;; 38693 :[FH]) 38694 ac_file_inputs= 38695 for ac_f 38696 do 38697 case $ac_f in 38698 -) ac_f="$ac_tmp/stdin";; 38699 *) # Look for the file first in the build tree, then in the source tree 38700 # (if the path is not absolute). The absolute path cannot be DOS-style, 38701 # because $ac_f cannot contain `:'. 38702 test -f "$ac_f" || 38703 case $ac_f in 38704 [\\/$]*) false;; 38705 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; 38706 esac || 38707 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; 38708 esac 38709 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac 38710 as_fn_append ac_file_inputs " '$ac_f'" 38711 done 38712 38713 # Let's still pretend it is `configure' which instantiates (i.e., don't 38714 # use $as_me), people would be surprised to read: 38715 # /* config.h. Generated by config.status. */ 38716 configure_input='Generated from '` 38717 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' 38718 `' by configure.' 38719 if test x"$ac_file" != x-; then 38720 configure_input="$ac_file. $configure_input" 38721 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 38722$as_echo "$as_me: creating $ac_file" >&6;} 38723 fi 38724 # Neutralize special characters interpreted by sed in replacement strings. 38725 case $configure_input in #( 38726 *\&* | *\|* | *\\* ) 38727 ac_sed_conf_input=`$as_echo "$configure_input" | 38728 sed 's/[\\\\&|]/\\\\&/g'`;; #( 38729 *) ac_sed_conf_input=$configure_input;; 38730 esac 38731 38732 case $ac_tag in 38733 *:-:* | *:-) cat >"$ac_tmp/stdin" \ 38734 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; 38735 esac 38736 ;; 38737 esac 38738 38739 ac_dir=`$as_dirname -- "$ac_file" || 38740$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 38741 X"$ac_file" : 'X\(//\)[^/]' \| \ 38742 X"$ac_file" : 'X\(//\)$' \| \ 38743 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || 38744$as_echo X"$ac_file" | 38745 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 38746 s//\1/ 38747 q 38748 } 38749 /^X\(\/\/\)[^/].*/{ 38750 s//\1/ 38751 q 38752 } 38753 /^X\(\/\/\)$/{ 38754 s//\1/ 38755 q 38756 } 38757 /^X\(\/\).*/{ 38758 s//\1/ 38759 q 38760 } 38761 s/.*/./; q'` 38762 as_dir="$ac_dir"; as_fn_mkdir_p 38763 ac_builddir=. 38764 38765case "$ac_dir" in 38766.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; 38767*) 38768 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` 38769 # A ".." for each directory in $ac_dir_suffix. 38770 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` 38771 case $ac_top_builddir_sub in 38772 "") ac_top_builddir_sub=. ac_top_build_prefix= ;; 38773 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; 38774 esac ;; 38775esac 38776ac_abs_top_builddir=$ac_pwd 38777ac_abs_builddir=$ac_pwd$ac_dir_suffix 38778# for backward compatibility: 38779ac_top_builddir=$ac_top_build_prefix 38780 38781case $srcdir in 38782 .) # We are building in place. 38783 ac_srcdir=. 38784 ac_top_srcdir=$ac_top_builddir_sub 38785 ac_abs_top_srcdir=$ac_pwd ;; 38786 [\\/]* | ?:[\\/]* ) # Absolute name. 38787 ac_srcdir=$srcdir$ac_dir_suffix; 38788 ac_top_srcdir=$srcdir 38789 ac_abs_top_srcdir=$srcdir ;; 38790 *) # Relative name. 38791 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix 38792 ac_top_srcdir=$ac_top_build_prefix$srcdir 38793 ac_abs_top_srcdir=$ac_pwd/$srcdir ;; 38794esac 38795ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix 38796 38797 38798 case $ac_mode in 38799 :F) 38800 # 38801 # CONFIG_FILE 38802 # 38803 38804 case $INSTALL in 38805 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; 38806 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; 38807 esac 38808 ac_MKDIR_P=$MKDIR_P 38809 case $MKDIR_P in 38810 [\\/$]* | ?:[\\/]* ) ;; 38811 */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; 38812 esac 38813_ACEOF 38814 38815cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 38816# If the template does not know about datarootdir, expand it. 38817# FIXME: This hack should be removed a few years after 2.60. 38818ac_datarootdir_hack=; ac_datarootdir_seen= 38819ac_sed_dataroot=' 38820/datarootdir/ { 38821 p 38822 q 38823} 38824/@datadir@/p 38825/@docdir@/p 38826/@infodir@/p 38827/@localedir@/p 38828/@mandir@/p' 38829case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in 38830*datarootdir*) ac_datarootdir_seen=yes;; 38831*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) 38832 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 38833$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} 38834_ACEOF 38835cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 38836 ac_datarootdir_hack=' 38837 s&@datadir@&$datadir&g 38838 s&@docdir@&$docdir&g 38839 s&@infodir@&$infodir&g 38840 s&@localedir@&$localedir&g 38841 s&@mandir@&$mandir&g 38842 s&\\\${datarootdir}&$datarootdir&g' ;; 38843esac 38844_ACEOF 38845 38846# Neutralize VPATH when `$srcdir' = `.'. 38847# Shell code in configure.ac might set extrasub. 38848# FIXME: do we really want to maintain this feature? 38849cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 38850ac_sed_extra="$ac_vpsub 38851$extrasub 38852_ACEOF 38853cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 38854:t 38855/@[a-zA-Z_][a-zA-Z_0-9]*@/!b 38856s|@configure_input@|$ac_sed_conf_input|;t t 38857s&@top_builddir@&$ac_top_builddir_sub&;t t 38858s&@top_build_prefix@&$ac_top_build_prefix&;t t 38859s&@srcdir@&$ac_srcdir&;t t 38860s&@abs_srcdir@&$ac_abs_srcdir&;t t 38861s&@top_srcdir@&$ac_top_srcdir&;t t 38862s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t 38863s&@builddir@&$ac_builddir&;t t 38864s&@abs_builddir@&$ac_abs_builddir&;t t 38865s&@abs_top_builddir@&$ac_abs_top_builddir&;t t 38866s&@INSTALL@&$ac_INSTALL&;t t 38867s&@MKDIR_P@&$ac_MKDIR_P&;t t 38868$ac_datarootdir_hack 38869" 38870eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ 38871 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 38872 38873test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && 38874 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && 38875 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ 38876 "$ac_tmp/out"`; test -z "$ac_out"; } && 38877 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' 38878which seems to be undefined. Please make sure it is defined" >&5 38879$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' 38880which seems to be undefined. Please make sure it is defined" >&2;} 38881 38882 rm -f "$ac_tmp/stdin" 38883 case $ac_file in 38884 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; 38885 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; 38886 esac \ 38887 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 38888 ;; 38889 :H) 38890 # 38891 # CONFIG_HEADER 38892 # 38893 if test x"$ac_file" != x-; then 38894 { 38895 $as_echo "/* $configure_input */" \ 38896 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" 38897 } >"$ac_tmp/config.h" \ 38898 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 38899 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then 38900 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 38901$as_echo "$as_me: $ac_file is unchanged" >&6;} 38902 else 38903 rm -f "$ac_file" 38904 mv "$ac_tmp/config.h" "$ac_file" \ 38905 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 38906 fi 38907 else 38908 $as_echo "/* $configure_input */" \ 38909 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ 38910 || as_fn_error $? "could not create -" "$LINENO" 5 38911 fi 38912# Compute "$ac_file"'s index in $config_headers. 38913_am_arg="$ac_file" 38914_am_stamp_count=1 38915for _am_header in $config_headers :; do 38916 case $_am_header in 38917 $_am_arg | $_am_arg:* ) 38918 break ;; 38919 * ) 38920 _am_stamp_count=`expr $_am_stamp_count + 1` ;; 38921 esac 38922done 38923echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || 38924$as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 38925 X"$_am_arg" : 'X\(//\)[^/]' \| \ 38926 X"$_am_arg" : 'X\(//\)$' \| \ 38927 X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || 38928$as_echo X"$_am_arg" | 38929 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 38930 s//\1/ 38931 q 38932 } 38933 /^X\(\/\/\)[^/].*/{ 38934 s//\1/ 38935 q 38936 } 38937 /^X\(\/\/\)$/{ 38938 s//\1/ 38939 q 38940 } 38941 /^X\(\/\).*/{ 38942 s//\1/ 38943 q 38944 } 38945 s/.*/./; q'`/stamp-h$_am_stamp_count 38946 ;; 38947 :L) 38948 # 38949 # CONFIG_LINK 38950 # 38951 38952 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then 38953 : 38954 else 38955 # Prefer the file from the source tree if names are identical. 38956 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then 38957 ac_source=$srcdir/$ac_source 38958 fi 38959 38960 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 38961$as_echo "$as_me: linking $ac_source to $ac_file" >&6;} 38962 38963 if test ! -r "$ac_source"; then 38964 as_fn_error $? "$ac_source: file not found" "$LINENO" 5 38965 fi 38966 rm -f "$ac_file" 38967 38968 # Try a relative symlink, then a hard link, then a copy. 38969 case $ac_source in 38970 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; 38971 *) ac_rel_source=$ac_top_build_prefix$ac_source ;; 38972 esac 38973 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || 38974 ln "$ac_source" "$ac_file" 2>/dev/null || 38975 cp -p "$ac_source" "$ac_file" || 38976 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 38977 fi 38978 ;; 38979 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 38980$as_echo "$as_me: executing $ac_file commands" >&6;} 38981 ;; 38982 esac 38983 38984 38985 case $ac_file$ac_mode in 38986 "depfiles":C) test x"$AMDEP_TRUE" != x"" || { 38987 # Autoconf 2.62 quotes --file arguments for eval, but not when files 38988 # are listed without --file. Let's play safe and only enable the eval 38989 # if we detect the quoting. 38990 case $CONFIG_FILES in 38991 *\'*) eval set x "$CONFIG_FILES" ;; 38992 *) set x $CONFIG_FILES ;; 38993 esac 38994 shift 38995 for mf 38996 do 38997 # Strip MF so we end up with the name of the file. 38998 mf=`echo "$mf" | sed -e 's/:.*$//'` 38999 # Check whether this is an Automake generated Makefile or not. 39000 # We used to match only the files named 'Makefile.in', but 39001 # some people rename them; so instead we look at the file content. 39002 # Grep'ing the first line is not enough: some people post-process 39003 # each Makefile.in and add a new line on top of each file to say so. 39004 # Grep'ing the whole file is not good either: AIX grep has a line 39005 # limit of 2048, but all sed's we know have understand at least 4000. 39006 if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then 39007 dirpart=`$as_dirname -- "$mf" || 39008$as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 39009 X"$mf" : 'X\(//\)[^/]' \| \ 39010 X"$mf" : 'X\(//\)$' \| \ 39011 X"$mf" : 'X\(/\)' \| . 2>/dev/null || 39012$as_echo X"$mf" | 39013 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 39014 s//\1/ 39015 q 39016 } 39017 /^X\(\/\/\)[^/].*/{ 39018 s//\1/ 39019 q 39020 } 39021 /^X\(\/\/\)$/{ 39022 s//\1/ 39023 q 39024 } 39025 /^X\(\/\).*/{ 39026 s//\1/ 39027 q 39028 } 39029 s/.*/./; q'` 39030 else 39031 continue 39032 fi 39033 # Extract the definition of DEPDIR, am__include, and am__quote 39034 # from the Makefile without running 'make'. 39035 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` 39036 test -z "$DEPDIR" && continue 39037 am__include=`sed -n 's/^am__include = //p' < "$mf"` 39038 test -z "am__include" && continue 39039 am__quote=`sed -n 's/^am__quote = //p' < "$mf"` 39040 # Find all dependency output files, they are included files with 39041 # $(DEPDIR) in their names. We invoke sed twice because it is the 39042 # simplest approach to changing $(DEPDIR) to its actual value in the 39043 # expansion. 39044 for file in `sed -n " 39045 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ 39046 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do 39047 # Make sure the directory exists. 39048 test -f "$dirpart/$file" && continue 39049 fdir=`$as_dirname -- "$file" || 39050$as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ 39051 X"$file" : 'X\(//\)[^/]' \| \ 39052 X"$file" : 'X\(//\)$' \| \ 39053 X"$file" : 'X\(/\)' \| . 2>/dev/null || 39054$as_echo X"$file" | 39055 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ 39056 s//\1/ 39057 q 39058 } 39059 /^X\(\/\/\)[^/].*/{ 39060 s//\1/ 39061 q 39062 } 39063 /^X\(\/\/\)$/{ 39064 s//\1/ 39065 q 39066 } 39067 /^X\(\/\).*/{ 39068 s//\1/ 39069 q 39070 } 39071 s/.*/./; q'` 39072 as_dir=$dirpart/$fdir; as_fn_mkdir_p 39073 # echo "creating $dirpart/$file" 39074 echo '# dummy' > "$dirpart/$file" 39075 done 39076 done 39077} 39078 ;; 39079 "po-directories":C) 39080 for ac_file in $CONFIG_FILES; do 39081 # Support "outfile[:infile[:infile...]]" 39082 case "$ac_file" in 39083 *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; 39084 esac 39085 # PO directories have a Makefile.in generated from Makefile.in.in. 39086 case "$ac_file" in */Makefile.in) 39087 # Adjust a relative srcdir. 39088 ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` 39089 ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`" 39090 ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` 39091 # In autoconf-2.13 it is called $ac_given_srcdir. 39092 # In autoconf-2.50 it is called $srcdir. 39093 test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" 39094 case "$ac_given_srcdir" in 39095 .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; 39096 /*) top_srcdir="$ac_given_srcdir" ;; 39097 *) top_srcdir="$ac_dots$ac_given_srcdir" ;; 39098 esac 39099 # Treat a directory as a PO directory if and only if it has a 39100 # POTFILES.in file. This allows packages to have multiple PO 39101 # directories under different names or in different locations. 39102 if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then 39103 rm -f "$ac_dir/POTFILES" 39104 test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" 39105 gt_tab=`printf '\t'` 39106 cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ${gt_tab}]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES" 39107 POMAKEFILEDEPS="POTFILES.in" 39108 # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend 39109 # on $ac_dir but don't depend on user-specified configuration 39110 # parameters. 39111 if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then 39112 # The LINGUAS file contains the set of available languages. 39113 if test -n "$OBSOLETE_ALL_LINGUAS"; then 39114 test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" 39115 fi 39116 ALL_LINGUAS_=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` 39117 # Hide the ALL_LINGUAS assignment from automake < 1.5. 39118 eval 'ALL_LINGUAS''=$ALL_LINGUAS_' 39119 POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" 39120 else 39121 # The set of available languages was given in configure.in. 39122 # Hide the ALL_LINGUAS assignment from automake < 1.5. 39123 eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS' 39124 fi 39125 # Compute POFILES 39126 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) 39127 # Compute UPDATEPOFILES 39128 # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) 39129 # Compute DUMMYPOFILES 39130 # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) 39131 # Compute GMOFILES 39132 # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) 39133 case "$ac_given_srcdir" in 39134 .) srcdirpre= ;; 39135 *) srcdirpre='$(srcdir)/' ;; 39136 esac 39137 POFILES= 39138 UPDATEPOFILES= 39139 DUMMYPOFILES= 39140 GMOFILES= 39141 for lang in $ALL_LINGUAS; do 39142 POFILES="$POFILES $srcdirpre$lang.po" 39143 UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" 39144 DUMMYPOFILES="$DUMMYPOFILES $lang.nop" 39145 GMOFILES="$GMOFILES $srcdirpre$lang.gmo" 39146 done 39147 # CATALOGS depends on both $ac_dir and the user's LINGUAS 39148 # environment variable. 39149 INST_LINGUAS= 39150 if test -n "$ALL_LINGUAS"; then 39151 for presentlang in $ALL_LINGUAS; do 39152 useit=no 39153 if test "%UNSET%" != "$LINGUAS"; then 39154 desiredlanguages="$LINGUAS" 39155 else 39156 desiredlanguages="$ALL_LINGUAS" 39157 fi 39158 for desiredlang in $desiredlanguages; do 39159 # Use the presentlang catalog if desiredlang is 39160 # a. equal to presentlang, or 39161 # b. a variant of presentlang (because in this case, 39162 # presentlang can be used as a fallback for messages 39163 # which are not translated in the desiredlang catalog). 39164 case "$desiredlang" in 39165 "$presentlang"*) useit=yes;; 39166 esac 39167 done 39168 if test $useit = yes; then 39169 INST_LINGUAS="$INST_LINGUAS $presentlang" 39170 fi 39171 done 39172 fi 39173 CATALOGS= 39174 if test -n "$INST_LINGUAS"; then 39175 for lang in $INST_LINGUAS; do 39176 CATALOGS="$CATALOGS $lang.gmo" 39177 done 39178 fi 39179 test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" 39180 sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile" 39181 for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do 39182 if test -f "$f"; then 39183 case "$f" in 39184 *.orig | *.bak | *~) ;; 39185 *) cat "$f" >> "$ac_dir/Makefile" ;; 39186 esac 39187 fi 39188 done 39189 fi 39190 ;; 39191 esac 39192 done ;; 39193 "etc/bench.pl":F) chmod +x etc/bench.pl ;; 39194 "tests/atconfig":C) cat >tests/atconfig <<ATEOF 39195# Configurable variable values for building test suites. 39196# Generated by $0. 39197# Copyright (C) 2012 Free Software Foundation, Inc. 39198 39199# The test suite will define top_srcdir=$at_top_srcdir/../.. etc. 39200at_testdir='tests' 39201abs_builddir='$ac_abs_builddir' 39202at_srcdir='$ac_srcdir' 39203abs_srcdir='$ac_abs_srcdir' 39204at_top_srcdir='$ac_top_srcdir' 39205abs_top_srcdir='$ac_abs_top_srcdir' 39206at_top_build_prefix='$ac_top_build_prefix' 39207abs_top_builddir='$ac_abs_top_builddir' 39208 39209# Backward compatibility with Autotest <= 2.59b: 39210at_top_builddir=\$at_top_build_prefix 39211 39212AUTOTEST_PATH='tests' 39213 39214SHELL=\${CONFIG_SHELL-'$SHELL'} 39215ATEOF 39216 ;; 39217 "tests/bison":F) chmod +x tests/bison ;; 39218 39219 esac 39220done # for ac_tag 39221 39222 39223as_fn_exit 0 39224_ACEOF 39225ac_clean_files=$ac_clean_files_save 39226 39227test $ac_write_fail = 0 || 39228 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 39229 39230 39231# configure is writing to config.log, and then calls config.status. 39232# config.status does its own redirection, appending to config.log. 39233# Unfortunately, on DOS this fails, as config.log is still kept open 39234# by configure, so config.status won't be able to write to it; its 39235# output is simply discarded. So we exec the FD to /dev/null, 39236# effectively closing config.log, so it can be properly (re)opened and 39237# appended to by config.status. When coming back to configure, we 39238# need to make the FD available again. 39239if test "$no_create" != yes; then 39240 ac_cs_success=: 39241 ac_config_status_args= 39242 test "$silent" = yes && 39243 ac_config_status_args="$ac_config_status_args --quiet" 39244 exec 5>/dev/null 39245 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false 39246 exec 5>>config.log 39247 # Use ||, not &&, to avoid exiting from the if with $? = 1, which 39248 # would make configure fail if this is the last instruction. 39249 $ac_cs_success || as_fn_exit 1 39250fi 39251if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then 39252 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 39253$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} 39254fi 39255 39256