]>
| Commit | Line | Data |
|---|---|---|
| 1 | #! /bin/sh | |
| 2 | # From configure.ac for Bash 5.3, version 5.080. | |
| 3 | # Guess values for system-dependent variables and create Makefiles. | |
| 4 | # Generated by GNU Autoconf 2.72 for bash 5.3-release. | |
| 5 | # | |
| 6 | # Report bugs to <bug-bash@gnu.org>. | |
| 7 | # | |
| 8 | # | |
| 9 | # Copyright (C) 1992-1996, 1998-2017, 2020-2023 Free Software Foundation, | |
| 10 | # Inc. | |
| 11 | # | |
| 12 | # | |
| 13 | # This configure script is free software; the Free Software Foundation | |
| 14 | # gives unlimited permission to copy, distribute and modify it. | |
| 15 | ## -------------------- ## | |
| 16 | ## M4sh Initialization. ## | |
| 17 | ## -------------------- ## | |
| 18 | ||
| 19 | # Be more Bourne compatible | |
| 20 | DUALCASE=1; export DUALCASE # for MKS sh | |
| 21 | if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 | |
| 22 | then : | |
| 23 | emulate sh | |
| 24 | NULLCMD=: | |
| 25 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
| 26 | # is contrary to our usage. Disable this feature. | |
| 27 | alias -g '${1+"$@"}'='"$@"' | |
| 28 | setopt NO_GLOB_SUBST | |
| 29 | else case e in #( | |
| 30 | e) case `(set -o) 2>/dev/null` in #( | |
| 31 | *posix*) : | |
| 32 | set -o posix ;; #( | |
| 33 | *) : | |
| 34 | ;; | |
| 35 | esac ;; | |
| 36 | esac | |
| 37 | fi | |
| 38 | ||
| 39 | ||
| 40 | ||
| 41 | # Reset variables that may have inherited troublesome values from | |
| 42 | # the environment. | |
| 43 | ||
| 44 | # IFS needs to be set, to space, tab, and newline, in precisely that order. | |
| 45 | # (If _AS_PATH_WALK were called with IFS unset, it would have the | |
| 46 | # side effect of setting IFS to empty, thus disabling word splitting.) | |
| 47 | # Quoting is to prevent editors from complaining about space-tab. | |
| 48 | as_nl=' | |
| 49 | ' | |
| 50 | export as_nl | |
| 51 | IFS=" "" $as_nl" | |
| 52 | ||
| 53 | PS1='$ ' | |
| 54 | PS2='> ' | |
| 55 | PS4='+ ' | |
| 56 | ||
| 57 | # Ensure predictable behavior from utilities with locale-dependent output. | |
| 58 | LC_ALL=C | |
| 59 | export LC_ALL | |
| 60 | LANGUAGE=C | |
| 61 | export LANGUAGE | |
| 62 | ||
| 63 | # We cannot yet rely on "unset" to work, but we need these variables | |
| 64 | # to be unset--not just set to an empty or harmless value--now, to | |
| 65 | # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct | |
| 66 | # also avoids known problems related to "unset" and subshell syntax | |
| 67 | # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). | |
| 68 | for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH | |
| 69 | do eval test \${$as_var+y} \ | |
| 70 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
| 71 | done | |
| 72 | ||
| 73 | # Ensure that fds 0, 1, and 2 are open. | |
| 74 | if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi | |
| 75 | if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi | |
| 76 | if (exec 3>&2) ; then :; else exec 2>/dev/null; fi | |
| 77 | ||
| 78 | # The user is always right. | |
| 79 | if ${PATH_SEPARATOR+false} :; then | |
| 80 | PATH_SEPARATOR=: | |
| 81 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
| 82 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
| 83 | PATH_SEPARATOR=';' | |
| 84 | } | |
| 85 | fi | |
| 86 | ||
| 87 | ||
| 88 | # Find who we are. Look in the path if we contain no directory separator. | |
| 89 | as_myself= | |
| 90 | case $0 in #(( | |
| 91 | *[\\/]* ) as_myself=$0 ;; | |
| 92 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 93 | for as_dir in $PATH | |
| 94 | do | |
| 95 | IFS=$as_save_IFS | |
| 96 | case $as_dir in #((( | |
| 97 | '') as_dir=./ ;; | |
| 98 | */) ;; | |
| 99 | *) as_dir=$as_dir/ ;; | |
| 100 | esac | |
| 101 | test -r "$as_dir$0" && as_myself=$as_dir$0 && break | |
| 102 | done | |
| 103 | IFS=$as_save_IFS | |
| 104 | ||
| 105 | ;; | |
| 106 | esac | |
| 107 | # We did not find ourselves, most probably we were run as 'sh COMMAND' | |
| 108 | # in which case we are not to be found in the path. | |
| 109 | if test "x$as_myself" = x; then | |
| 110 | as_myself=$0 | |
| 111 | fi | |
| 112 | if test ! -f "$as_myself"; then | |
| 113 | printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
| 114 | exit 1 | |
| 115 | fi | |
| 116 | ||
| 117 | ||
| 118 | # Use a proper internal environment variable to ensure we don't fall | |
| 119 | # into an infinite loop, continuously re-executing ourselves. | |
| 120 | if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then | |
| 121 | _as_can_reexec=no; export _as_can_reexec; | |
| 122 | # We cannot yet assume a decent shell, so we have to provide a | |
| 123 | # neutralization value for shells without unset; and this also | |
| 124 | # works around shells that cannot unset nonexistent variables. | |
| 125 | # Preserve -v and -x to the replacement shell. | |
| 126 | BASH_ENV=/dev/null | |
| 127 | ENV=/dev/null | |
| 128 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
| 129 | case $- in # (((( | |
| 130 | *v*x* | *x*v* ) as_opts=-vx ;; | |
| 131 | *v* ) as_opts=-v ;; | |
| 132 | *x* ) as_opts=-x ;; | |
| 133 | * ) as_opts= ;; | |
| 134 | esac | |
| 135 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} | |
| 136 | # Admittedly, this is quite paranoid, since all the known shells bail | |
| 137 | # out after a failed 'exec'. | |
| 138 | printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 | |
| 139 | exit 255 | |
| 140 | fi | |
| 141 | # We don't want this to propagate to other subprocesses. | |
| 142 | { _as_can_reexec=; unset _as_can_reexec;} | |
| 143 | if test "x$CONFIG_SHELL" = x; then | |
| 144 | as_bourne_compatible="if test \${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 | |
| 145 | then : | |
| 146 | emulate sh | |
| 147 | NULLCMD=: | |
| 148 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which | |
| 149 | # is contrary to our usage. Disable this feature. | |
| 150 | alias -g '\${1+\"\$@\"}'='\"\$@\"' | |
| 151 | setopt NO_GLOB_SUBST | |
| 152 | else case e in #( | |
| 153 | e) case \`(set -o) 2>/dev/null\` in #( | |
| 154 | *posix*) : | |
| 155 | set -o posix ;; #( | |
| 156 | *) : | |
| 157 | ;; | |
| 158 | esac ;; | |
| 159 | esac | |
| 160 | fi | |
| 161 | " | |
| 162 | as_required="as_fn_return () { (exit \$1); } | |
| 163 | as_fn_success () { as_fn_return 0; } | |
| 164 | as_fn_failure () { as_fn_return 1; } | |
| 165 | as_fn_ret_success () { return 0; } | |
| 166 | as_fn_ret_failure () { return 1; } | |
| 167 | ||
| 168 | exitcode=0 | |
| 169 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } | |
| 170 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } | |
| 171 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } | |
| 172 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } | |
| 173 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ) | |
| 174 | then : | |
| 175 | ||
| 176 | else case e in #( | |
| 177 | e) exitcode=1; echo positional parameters were not saved. ;; | |
| 178 | esac | |
| 179 | fi | |
| 180 | test x\$exitcode = x0 || exit 1 | |
| 181 | blah=\$(echo \$(echo blah)) | |
| 182 | test x\"\$blah\" = xblah || exit 1 | |
| 183 | test -x / || exit 1" | |
| 184 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO | |
| 185 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO | |
| 186 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && | |
| 187 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 | |
| 188 | test \$(( 1 + 1 )) = 2 || exit 1" | |
| 189 | if (eval "$as_required") 2>/dev/null | |
| 190 | then : | |
| 191 | as_have_required=yes | |
| 192 | else case e in #( | |
| 193 | e) as_have_required=no ;; | |
| 194 | esac | |
| 195 | fi | |
| 196 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null | |
| 197 | then : | |
| 198 | ||
| 199 | else case e in #( | |
| 200 | e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 201 | as_found=false | |
| 202 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH | |
| 203 | do | |
| 204 | IFS=$as_save_IFS | |
| 205 | case $as_dir in #((( | |
| 206 | '') as_dir=./ ;; | |
| 207 | */) ;; | |
| 208 | *) as_dir=$as_dir/ ;; | |
| 209 | esac | |
| 210 | as_found=: | |
| 211 | case $as_dir in #( | |
| 212 | /*) | |
| 213 | for as_base in sh bash ksh sh5; do | |
| 214 | # Try only shells that exist, to save several forks. | |
| 215 | as_shell=$as_dir$as_base | |
| 216 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && | |
| 217 | as_run=a "$as_shell" -c "$as_bourne_compatible""$as_required" 2>/dev/null | |
| 218 | then : | |
| 219 | CONFIG_SHELL=$as_shell as_have_required=yes | |
| 220 | if as_run=a "$as_shell" -c "$as_bourne_compatible""$as_suggested" 2>/dev/null | |
| 221 | then : | |
| 222 | break 2 | |
| 223 | fi | |
| 224 | fi | |
| 225 | done;; | |
| 226 | esac | |
| 227 | as_found=false | |
| 228 | done | |
| 229 | IFS=$as_save_IFS | |
| 230 | if $as_found | |
| 231 | then : | |
| 232 | ||
| 233 | else case e in #( | |
| 234 | e) if { test -f "$SHELL" || test -f "$SHELL.exe"; } && | |
| 235 | as_run=a "$SHELL" -c "$as_bourne_compatible""$as_required" 2>/dev/null | |
| 236 | then : | |
| 237 | CONFIG_SHELL=$SHELL as_have_required=yes | |
| 238 | fi ;; | |
| 239 | esac | |
| 240 | fi | |
| 241 | ||
| 242 | ||
| 243 | if test "x$CONFIG_SHELL" != x | |
| 244 | then : | |
| 245 | export CONFIG_SHELL | |
| 246 | # We cannot yet assume a decent shell, so we have to provide a | |
| 247 | # neutralization value for shells without unset; and this also | |
| 248 | # works around shells that cannot unset nonexistent variables. | |
| 249 | # Preserve -v and -x to the replacement shell. | |
| 250 | BASH_ENV=/dev/null | |
| 251 | ENV=/dev/null | |
| 252 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV | |
| 253 | case $- in # (((( | |
| 254 | *v*x* | *x*v* ) as_opts=-vx ;; | |
| 255 | *v* ) as_opts=-v ;; | |
| 256 | *x* ) as_opts=-x ;; | |
| 257 | * ) as_opts= ;; | |
| 258 | esac | |
| 259 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} | |
| 260 | # Admittedly, this is quite paranoid, since all the known shells bail | |
| 261 | # out after a failed 'exec'. | |
| 262 | printf "%s\n" "$0: could not re-execute with $CONFIG_SHELL" >&2 | |
| 263 | exit 255 | |
| 264 | fi | |
| 265 | ||
| 266 | if test x$as_have_required = xno | |
| 267 | then : | |
| 268 | printf "%s\n" "$0: This script requires a shell more modern than all" | |
| 269 | printf "%s\n" "$0: the shells that I found on your system." | |
| 270 | if test ${ZSH_VERSION+y} ; then | |
| 271 | printf "%s\n" "$0: In particular, zsh $ZSH_VERSION has bugs and should" | |
| 272 | printf "%s\n" "$0: be upgraded to zsh 4.3.4 or later." | |
| 273 | else | |
| 274 | printf "%s\n" "$0: Please tell bug-autoconf@gnu.org and bug-bash@gnu.org | |
| 275 | $0: about your system, including any error possibly output | |
| 276 | $0: before this message. Then install a modern shell, or | |
| 277 | $0: manually run the script under such a shell if you do | |
| 278 | $0: have one." | |
| 279 | fi | |
| 280 | exit 1 | |
| 281 | fi ;; | |
| 282 | esac | |
| 283 | fi | |
| 284 | fi | |
| 285 | SHELL=${CONFIG_SHELL-/bin/sh} | |
| 286 | export SHELL | |
| 287 | # Unset more variables known to interfere with behavior of common tools. | |
| 288 | CLICOLOR_FORCE= GREP_OPTIONS= | |
| 289 | unset CLICOLOR_FORCE GREP_OPTIONS | |
| 290 | ||
| 291 | ## --------------------- ## | |
| 292 | ## M4sh Shell Functions. ## | |
| 293 | ## --------------------- ## | |
| 294 | # as_fn_unset VAR | |
| 295 | # --------------- | |
| 296 | # Portably unset VAR. | |
| 297 | as_fn_unset () | |
| 298 | { | |
| 299 | { eval $1=; unset $1;} | |
| 300 | } | |
| 301 | as_unset=as_fn_unset | |
| 302 | ||
| 303 | ||
| 304 | # as_fn_set_status STATUS | |
| 305 | # ----------------------- | |
| 306 | # Set $? to STATUS, without forking. | |
| 307 | as_fn_set_status () | |
| 308 | { | |
| 309 | return $1 | |
| 310 | } # as_fn_set_status | |
| 311 | ||
| 312 | # as_fn_exit STATUS | |
| 313 | # ----------------- | |
| 314 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
| 315 | as_fn_exit () | |
| 316 | { | |
| 317 | set +e | |
| 318 | as_fn_set_status $1 | |
| 319 | exit $1 | |
| 320 | } # as_fn_exit | |
| 321 | ||
| 322 | # as_fn_mkdir_p | |
| 323 | # ------------- | |
| 324 | # Create "$as_dir" as a directory, including parents if necessary. | |
| 325 | as_fn_mkdir_p () | |
| 326 | { | |
| 327 | ||
| 328 | case $as_dir in #( | |
| 329 | -*) as_dir=./$as_dir;; | |
| 330 | esac | |
| 331 | test -d "$as_dir" || eval $as_mkdir_p || { | |
| 332 | as_dirs= | |
| 333 | while :; do | |
| 334 | case $as_dir in #( | |
| 335 | *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
| 336 | *) as_qdir=$as_dir;; | |
| 337 | esac | |
| 338 | as_dirs="'$as_qdir' $as_dirs" | |
| 339 | as_dir=`$as_dirname -- "$as_dir" || | |
| 340 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
| 341 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
| 342 | X"$as_dir" : 'X\(//\)$' \| \ | |
| 343 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
| 344 | printf "%s\n" X"$as_dir" | | |
| 345 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
| 346 | s//\1/ | |
| 347 | q | |
| 348 | } | |
| 349 | /^X\(\/\/\)[^/].*/{ | |
| 350 | s//\1/ | |
| 351 | q | |
| 352 | } | |
| 353 | /^X\(\/\/\)$/{ | |
| 354 | s//\1/ | |
| 355 | q | |
| 356 | } | |
| 357 | /^X\(\/\).*/{ | |
| 358 | s//\1/ | |
| 359 | q | |
| 360 | } | |
| 361 | s/.*/./; q'` | |
| 362 | test -d "$as_dir" && break | |
| 363 | done | |
| 364 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
| 365 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" | |
| 366 | ||
| 367 | ||
| 368 | } # as_fn_mkdir_p | |
| 369 | ||
| 370 | # as_fn_executable_p FILE | |
| 371 | # ----------------------- | |
| 372 | # Test if FILE is an executable regular file. | |
| 373 | as_fn_executable_p () | |
| 374 | { | |
| 375 | test -f "$1" && test -x "$1" | |
| 376 | } # as_fn_executable_p | |
| 377 | # as_fn_append VAR VALUE | |
| 378 | # ---------------------- | |
| 379 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
| 380 | # advantage of any shell optimizations that allow amortized linear growth over | |
| 381 | # repeated appends, instead of the typical quadratic growth present in naive | |
| 382 | # implementations. | |
| 383 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null | |
| 384 | then : | |
| 385 | eval 'as_fn_append () | |
| 386 | { | |
| 387 | eval $1+=\$2 | |
| 388 | }' | |
| 389 | else case e in #( | |
| 390 | e) as_fn_append () | |
| 391 | { | |
| 392 | eval $1=\$$1\$2 | |
| 393 | } ;; | |
| 394 | esac | |
| 395 | fi # as_fn_append | |
| 396 | ||
| 397 | # as_fn_arith ARG... | |
| 398 | # ------------------ | |
| 399 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
| 400 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
| 401 | # must be portable across $(()) and expr. | |
| 402 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null | |
| 403 | then : | |
| 404 | eval 'as_fn_arith () | |
| 405 | { | |
| 406 | as_val=$(( $* )) | |
| 407 | }' | |
| 408 | else case e in #( | |
| 409 | e) as_fn_arith () | |
| 410 | { | |
| 411 | as_val=`expr "$@" || test $? -eq 1` | |
| 412 | } ;; | |
| 413 | esac | |
| 414 | fi # as_fn_arith | |
| 415 | ||
| 416 | ||
| 417 | # as_fn_error STATUS ERROR [LINENO LOG_FD] | |
| 418 | # ---------------------------------------- | |
| 419 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
| 420 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
| 421 | # script with STATUS, using 1 if that was 0. | |
| 422 | as_fn_error () | |
| 423 | { | |
| 424 | as_status=$1; test $as_status -eq 0 && as_status=1 | |
| 425 | if test "$4"; then | |
| 426 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
| 427 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
| 428 | fi | |
| 429 | printf "%s\n" "$as_me: error: $2" >&2 | |
| 430 | as_fn_exit $as_status | |
| 431 | } # as_fn_error | |
| 432 | ||
| 433 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
| 434 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
| 435 | as_expr=expr | |
| 436 | else | |
| 437 | as_expr=false | |
| 438 | fi | |
| 439 | ||
| 440 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
| 441 | as_basename=basename | |
| 442 | else | |
| 443 | as_basename=false | |
| 444 | fi | |
| 445 | ||
| 446 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
| 447 | as_dirname=dirname | |
| 448 | else | |
| 449 | as_dirname=false | |
| 450 | fi | |
| 451 | ||
| 452 | as_me=`$as_basename -- "$0" || | |
| 453 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
| 454 | X"$0" : 'X\(//\)$' \| \ | |
| 455 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
| 456 | printf "%s\n" X/"$0" | | |
| 457 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
| 458 | s//\1/ | |
| 459 | q | |
| 460 | } | |
| 461 | /^X\/\(\/\/\)$/{ | |
| 462 | s//\1/ | |
| 463 | q | |
| 464 | } | |
| 465 | /^X\/\(\/\).*/{ | |
| 466 | s//\1/ | |
| 467 | q | |
| 468 | } | |
| 469 | s/.*/./; q'` | |
| 470 | ||
| 471 | # Avoid depending upon Character Ranges. | |
| 472 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
| 473 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
| 474 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
| 475 | as_cr_digits='0123456789' | |
| 476 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
| 477 | ||
| 478 | ||
| 479 | as_lineno_1=$LINENO as_lineno_1a=$LINENO | |
| 480 | as_lineno_2=$LINENO as_lineno_2a=$LINENO | |
| 481 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && | |
| 482 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { | |
| 483 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) | |
| 484 | sed -n ' | |
| 485 | p | |
| 486 | /[$]LINENO/= | |
| 487 | ' <$as_myself | | |
| 488 | sed ' | |
| 489 | t clear | |
| 490 | :clear | |
| 491 | s/[$]LINENO.*/&-/ | |
| 492 | t lineno | |
| 493 | b | |
| 494 | :lineno | |
| 495 | N | |
| 496 | :loop | |
| 497 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ | |
| 498 | t loop | |
| 499 | s/-\n.*// | |
| 500 | ' >$as_me.lineno && | |
| 501 | chmod +x "$as_me.lineno" || | |
| 502 | { printf "%s\n" "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } | |
| 503 | ||
| 504 | # If we had to re-execute with $CONFIG_SHELL, we're ensured to have | |
| 505 | # already done that, so ensure we don't try to do so again and fall | |
| 506 | # in an infinite loop. This has already happened in practice. | |
| 507 | _as_can_reexec=no; export _as_can_reexec | |
| 508 | # Don't try to exec as it changes $[0], causing all sort of problems | |
| 509 | # (the dirname of $[0] is not the place where we might find the | |
| 510 | # original and so on. Autoconf is especially sensitive to this). | |
| 511 | . "./$as_me.lineno" | |
| 512 | # Exit status is that of the last command. | |
| 513 | exit | |
| 514 | } | |
| 515 | ||
| 516 | ||
| 517 | # Determine whether it's possible to make 'echo' print without a newline. | |
| 518 | # These variables are no longer used directly by Autoconf, but are AC_SUBSTed | |
| 519 | # for compatibility with existing Makefiles. | |
| 520 | ECHO_C= ECHO_N= ECHO_T= | |
| 521 | case `echo -n x` in #((((( | |
| 522 | -n*) | |
| 523 | case `echo 'xy\c'` in | |
| 524 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
| 525 | xy) ECHO_C='\c';; | |
| 526 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
| 527 | ECHO_T=' ';; | |
| 528 | esac;; | |
| 529 | *) | |
| 530 | ECHO_N='-n';; | |
| 531 | esac | |
| 532 | ||
| 533 | # For backward compatibility with old third-party macros, we provide | |
| 534 | # the shell variables $as_echo and $as_echo_n. New code should use | |
| 535 | # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. | |
| 536 | as_echo='printf %s\n' | |
| 537 | as_echo_n='printf %s' | |
| 538 | ||
| 539 | rm -f conf$$ conf$$.exe conf$$.file | |
| 540 | if test -d conf$$.dir; then | |
| 541 | rm -f conf$$.dir/conf$$.file | |
| 542 | else | |
| 543 | rm -f conf$$.dir | |
| 544 | mkdir conf$$.dir 2>/dev/null | |
| 545 | fi | |
| 546 | if (echo >conf$$.file) 2>/dev/null; then | |
| 547 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
| 548 | as_ln_s='ln -s' | |
| 549 | # ... but there are two gotchas: | |
| 550 | # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. | |
| 551 | # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. | |
| 552 | # In both cases, we have to default to 'cp -pR'. | |
| 553 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
| 554 | as_ln_s='cp -pR' | |
| 555 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
| 556 | as_ln_s=ln | |
| 557 | else | |
| 558 | as_ln_s='cp -pR' | |
| 559 | fi | |
| 560 | else | |
| 561 | as_ln_s='cp -pR' | |
| 562 | fi | |
| 563 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
| 564 | rmdir conf$$.dir 2>/dev/null | |
| 565 | ||
| 566 | if mkdir -p . 2>/dev/null; then | |
| 567 | as_mkdir_p='mkdir -p "$as_dir"' | |
| 568 | else | |
| 569 | test -d ./-p && rmdir ./-p | |
| 570 | as_mkdir_p=false | |
| 571 | fi | |
| 572 | ||
| 573 | as_test_x='test -x' | |
| 574 | as_executable_p=as_fn_executable_p | |
| 575 | ||
| 576 | # Sed expression to map a string onto a valid CPP name. | |
| 577 | as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" | |
| 578 | as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated | |
| 579 | ||
| 580 | # Sed expression to map a string onto a valid variable name. | |
| 581 | as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" | |
| 582 | as_tr_sh="eval sed '$as_sed_sh'" # deprecated | |
| 583 | ||
| 584 | ||
| 585 | test -n "$DJDIR" || exec 7<&0 </dev/null | |
| 586 | exec 6>&1 | |
| 587 | ||
| 588 | # Name of the host. | |
| 589 | # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, | |
| 590 | # so uname gets run too. | |
| 591 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` | |
| 592 | ||
| 593 | # | |
| 594 | # Initializations. | |
| 595 | # | |
| 596 | ac_default_prefix=/usr/local | |
| 597 | ac_clean_files= | |
| 598 | ac_config_libobj_dir=. | |
| 599 | LIBOBJS= | |
| 600 | cross_compiling=no | |
| 601 | subdirs= | |
| 602 | MFLAGS= | |
| 603 | MAKEFLAGS= | |
| 604 | ||
| 605 | # Identity of this package. | |
| 606 | PACKAGE_NAME='bash' | |
| 607 | PACKAGE_TARNAME='bash' | |
| 608 | PACKAGE_VERSION='5.3-release' | |
| 609 | PACKAGE_STRING='bash 5.3-release' | |
| 610 | PACKAGE_BUGREPORT='bug-bash@gnu.org' | |
| 611 | PACKAGE_URL='' | |
| 612 | ||
| 613 | ac_unique_file="shell.h" | |
| 614 | # Factoring default headers for most tests. | |
| 615 | ac_includes_default="\ | |
| 616 | #include <stddef.h> | |
| 617 | #ifdef HAVE_STDIO_H | |
| 618 | # include <stdio.h> | |
| 619 | #endif | |
| 620 | #ifdef HAVE_STDLIB_H | |
| 621 | # include <stdlib.h> | |
| 622 | #endif | |
| 623 | #ifdef HAVE_STRING_H | |
| 624 | # include <string.h> | |
| 625 | #endif | |
| 626 | #ifdef HAVE_INTTYPES_H | |
| 627 | # include <inttypes.h> | |
| 628 | #endif | |
| 629 | #ifdef HAVE_STDINT_H | |
| 630 | # include <stdint.h> | |
| 631 | #endif | |
| 632 | #ifdef HAVE_STRINGS_H | |
| 633 | # include <strings.h> | |
| 634 | #endif | |
| 635 | #ifdef HAVE_SYS_TYPES_H | |
| 636 | # include <sys/types.h> | |
| 637 | #endif | |
| 638 | #ifdef HAVE_SYS_STAT_H | |
| 639 | # include <sys/stat.h> | |
| 640 | #endif | |
| 641 | #ifdef HAVE_UNISTD_H | |
| 642 | # include <unistd.h> | |
| 643 | #endif" | |
| 644 | ||
| 645 | ac_header_c_list= | |
| 646 | gt_needs= | |
| 647 | ac_func_c_list= | |
| 648 | gl_use_threads_default= | |
| 649 | gl_use_winpthreads_default= | |
| 650 | enable_year2038=no | |
| 651 | ac_subst_vars='LTLIBOBJS | |
| 652 | STDCKDINT_H | |
| 653 | LOCAL_DEFS | |
| 654 | LOCAL_LDFLAGS | |
| 655 | LOCAL_CFLAGS | |
| 656 | LOCAL_LIBS | |
| 657 | MALLOC_DEBUG | |
| 658 | DEBUG | |
| 659 | RELSTATUS | |
| 660 | BASHVERS | |
| 661 | headersdir | |
| 662 | loadablesdir | |
| 663 | BUILD_DIR | |
| 664 | incdir | |
| 665 | PROFILE_FLAGS | |
| 666 | SHOBJ_STATUS | |
| 667 | SHOBJ_LIBS | |
| 668 | SHOBJ_XLDFLAGS | |
| 669 | SHOBJ_LDFLAGS | |
| 670 | SHOBJ_LD | |
| 671 | SHOBJ_CFLAGS | |
| 672 | SHOBJ_CC | |
| 673 | JOBS_O | |
| 674 | TERMCAP_DEP | |
| 675 | TERMCAP_LIB | |
| 676 | SIGLIST_O | |
| 677 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC | |
| 678 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC | |
| 679 | TIME_H_DEFINES_STRUCT_TIMESPEC | |
| 680 | LIBINTL_H | |
| 681 | INTL_INC | |
| 682 | INTL_DEP | |
| 683 | LIBOBJS | |
| 684 | POSUB | |
| 685 | LTLIBINTL | |
| 686 | LIBINTL | |
| 687 | INTLLIBS | |
| 688 | CATOBJEXT | |
| 689 | USE_INCLUDED_LIBINTL | |
| 690 | BUILD_INCLUDED_LIBINTL | |
| 691 | WINDRES | |
| 692 | WOE32 | |
| 693 | WOE32DLL | |
| 694 | ENHANCE_LOCALE_FUNCS | |
| 695 | HAVE_WPRINTF | |
| 696 | HAVE_SNPRINTF | |
| 697 | HAVE_ASPRINTF | |
| 698 | HAVE_POSIX_PRINTF | |
| 699 | INTL_DEFAULT_VERBOSITY | |
| 700 | ARFLAGS | |
| 701 | INTL_MACOSX_LIBS | |
| 702 | LOCALENAME_ENHANCE_LOCALE_FUNCS | |
| 703 | REPLACE_STRUCT_LCONV | |
| 704 | REPLACE_FREELOCALE | |
| 705 | REPLACE_DUPLOCALE | |
| 706 | REPLACE_NEWLOCALE | |
| 707 | REPLACE_SETLOCALE | |
| 708 | REPLACE_LOCALECONV | |
| 709 | HAVE_FREELOCALE | |
| 710 | HAVE_DUPLOCALE | |
| 711 | HAVE_NEWLOCALE | |
| 712 | GNULIBHEADERS_OVERRIDE_WINT_T | |
| 713 | INTLBISON | |
| 714 | LTLIBICONV | |
| 715 | LIBICONV | |
| 716 | LTLIBMULTITHREAD | |
| 717 | LIBMULTITHREAD | |
| 718 | LTLIBTHREAD | |
| 719 | LIBTHREAD | |
| 720 | LIBSTDTHREAD | |
| 721 | LIB_SCHED_YIELD | |
| 722 | LIBPMULTITHREAD | |
| 723 | LIBPTHREAD | |
| 724 | ALLOCA | |
| 725 | HAVE_VISIBILITY | |
| 726 | CFLAG_VISIBILITY | |
| 727 | GLIBC2 | |
| 728 | CPP | |
| 729 | XGETTEXT_EXTRA_OPTIONS | |
| 730 | MSGMERGE_FOR_MSGFMT_OPTION | |
| 731 | MSGMERGE | |
| 732 | XGETTEXT_015 | |
| 733 | XGETTEXT | |
| 734 | GMSGFMT_015 | |
| 735 | GMSGFMT | |
| 736 | MSGFMT | |
| 737 | GETTEXT_MACRO_VERSION | |
| 738 | USE_NLS | |
| 739 | SED | |
| 740 | MKDIR_P | |
| 741 | SIZE | |
| 742 | MAKE_SHELL | |
| 743 | INSTALL_STRIP_PROGRAM | |
| 744 | STRIP | |
| 745 | install_sh | |
| 746 | SET_MAKE | |
| 747 | YFLAGS | |
| 748 | YACC | |
| 749 | RANLIB | |
| 750 | AR | |
| 751 | INSTALL_DATA | |
| 752 | INSTALL_SCRIPT | |
| 753 | INSTALL_PROGRAM | |
| 754 | TILDE_LIB | |
| 755 | HIST_INCLUDEDIR | |
| 756 | HIST_LIBDIR | |
| 757 | HISTORY_DEP | |
| 758 | HISTORY_LIB | |
| 759 | RL_INCLUDE | |
| 760 | RL_INCLUDEDIR | |
| 761 | RL_LIBDIR | |
| 762 | READLINE_DEP | |
| 763 | READLINE_LIB | |
| 764 | RL_MINOR | |
| 765 | RL_MAJOR | |
| 766 | RL_VERSION | |
| 767 | LIBS_FOR_BUILD | |
| 768 | STYLE_CFLAGS | |
| 769 | STATIC_LD | |
| 770 | SIGNAMES_O | |
| 771 | SIGNAMES_H | |
| 772 | CROSS_COMPILE | |
| 773 | OBJEXT | |
| 774 | EXEEXT | |
| 775 | ac_ct_CC | |
| 776 | CPPFLAGS | |
| 777 | LDFLAGS | |
| 778 | CFLAGS | |
| 779 | CC | |
| 780 | HELPSTRINGS | |
| 781 | HELPFILES_TARGET | |
| 782 | HELPINSTALL | |
| 783 | HELPDIRDEFINE | |
| 784 | HELPDIR | |
| 785 | ARRAY_O | |
| 786 | MALLOC_DEP | |
| 787 | MALLOC_LDFLAGS | |
| 788 | MALLOC_LIBRARY | |
| 789 | MALLOC_LIB | |
| 790 | MALLOC_SRC | |
| 791 | MALLOC_TARGET | |
| 792 | TESTSCRIPT | |
| 793 | CPPFLAGS_FOR_BUILD | |
| 794 | LDFLAGS_FOR_BUILD | |
| 795 | CFLAGS_FOR_BUILD | |
| 796 | CC_FOR_BUILD | |
| 797 | DEBUGGER_START_FILE | |
| 798 | host_os | |
| 799 | host_vendor | |
| 800 | host_cpu | |
| 801 | host | |
| 802 | build_os | |
| 803 | build_vendor | |
| 804 | build_cpu | |
| 805 | build | |
| 806 | target_alias | |
| 807 | host_alias | |
| 808 | build_alias | |
| 809 | LIBS | |
| 810 | ECHO_T | |
| 811 | ECHO_N | |
| 812 | ECHO_C | |
| 813 | DEFS | |
| 814 | mandir | |
| 815 | localedir | |
| 816 | libdir | |
| 817 | psdir | |
| 818 | pdfdir | |
| 819 | dvidir | |
| 820 | htmldir | |
| 821 | infodir | |
| 822 | docdir | |
| 823 | oldincludedir | |
| 824 | includedir | |
| 825 | runstatedir | |
| 826 | localstatedir | |
| 827 | sharedstatedir | |
| 828 | sysconfdir | |
| 829 | datadir | |
| 830 | datarootdir | |
| 831 | libexecdir | |
| 832 | sbindir | |
| 833 | bindir | |
| 834 | program_transform_name | |
| 835 | prefix | |
| 836 | exec_prefix | |
| 837 | PACKAGE_URL | |
| 838 | PACKAGE_BUGREPORT | |
| 839 | PACKAGE_STRING | |
| 840 | PACKAGE_VERSION | |
| 841 | PACKAGE_TARNAME | |
| 842 | PACKAGE_NAME | |
| 843 | PATH_SEPARATOR | |
| 844 | SHELL' | |
| 845 | ac_subst_files='' | |
| 846 | ac_user_opts=' | |
| 847 | enable_option_checking | |
| 848 | with_afs | |
| 849 | with_bash_malloc | |
| 850 | with_curses | |
| 851 | with_gnu_malloc | |
| 852 | with_installed_readline | |
| 853 | enable_minimal_config | |
| 854 | enable_alias | |
| 855 | enable_alt_array_implementation | |
| 856 | enable_arith_for_command | |
| 857 | enable_array_variables | |
| 858 | enable_bang_history | |
| 859 | enable_bash_source_fullpath_default | |
| 860 | enable_brace_expansion | |
| 861 | enable_casemod_attributes | |
| 862 | enable_casemod_expansions | |
| 863 | enable_command_timing | |
| 864 | enable_cond_command | |
| 865 | enable_cond_regexp | |
| 866 | enable_coprocesses | |
| 867 | enable_debugger | |
| 868 | enable_dev_fd_stat_broken | |
| 869 | enable_direxpand_default | |
| 870 | enable_directory_stack | |
| 871 | enable_disabled_builtins | |
| 872 | enable_dparen_arithmetic | |
| 873 | enable_extended_glob | |
| 874 | enable_extended_glob_default | |
| 875 | enable_function_import | |
| 876 | enable_glob_asciiranges_default | |
| 877 | enable_help_builtin | |
| 878 | enable_history | |
| 879 | enable_job_control | |
| 880 | enable_multibyte | |
| 881 | enable_net_redirections | |
| 882 | enable_process_substitution | |
| 883 | enable_progcomp | |
| 884 | enable_prompt_string_decoding | |
| 885 | enable_readline | |
| 886 | enable_restricted | |
| 887 | enable_select | |
| 888 | enable_separate_helpfiles | |
| 889 | enable_single_help_strings | |
| 890 | enable_strict_posix_default | |
| 891 | enable_translatable_strings | |
| 892 | enable_usg_echo_default | |
| 893 | enable_xpg_echo_default | |
| 894 | enable_mem_scramble | |
| 895 | enable_profiling | |
| 896 | enable_static_link | |
| 897 | enable_largefile | |
| 898 | enable_nls | |
| 899 | enable_threads | |
| 900 | with_gnu_ld | |
| 901 | enable_rpath | |
| 902 | with_libiconv_prefix | |
| 903 | with_included_gettext | |
| 904 | with_libintl_prefix | |
| 905 | enable_year2038 | |
| 906 | ' | |
| 907 | ac_precious_vars='build_alias | |
| 908 | host_alias | |
| 909 | target_alias | |
| 910 | DEBUGGER_START_FILE | |
| 911 | CC_FOR_BUILD | |
| 912 | CFLAGS_FOR_BUILD | |
| 913 | LDFLAGS_FOR_BUILD | |
| 914 | CPPFLAGS_FOR_BUILD | |
| 915 | CC | |
| 916 | CFLAGS | |
| 917 | LDFLAGS | |
| 918 | LIBS | |
| 919 | CPPFLAGS | |
| 920 | YACC | |
| 921 | YFLAGS | |
| 922 | CPP' | |
| 923 | ||
| 924 | ||
| 925 | # Initialize some variables set by options. | |
| 926 | ac_init_help= | |
| 927 | ac_init_version=false | |
| 928 | ac_unrecognized_opts= | |
| 929 | ac_unrecognized_sep= | |
| 930 | # The variables have the same names as the options, with | |
| 931 | # dashes changed to underlines. | |
| 932 | cache_file=/dev/null | |
| 933 | exec_prefix=NONE | |
| 934 | no_create= | |
| 935 | no_recursion= | |
| 936 | prefix=NONE | |
| 937 | program_prefix=NONE | |
| 938 | program_suffix=NONE | |
| 939 | program_transform_name=s,x,x, | |
| 940 | silent= | |
| 941 | site= | |
| 942 | srcdir= | |
| 943 | verbose= | |
| 944 | x_includes=NONE | |
| 945 | x_libraries=NONE | |
| 946 | ||
| 947 | # Installation directory options. | |
| 948 | # These are left unexpanded so users can "make install exec_prefix=/foo" | |
| 949 | # and all the variables that are supposed to be based on exec_prefix | |
| 950 | # by default will actually change. | |
| 951 | # Use braces instead of parens because sh, perl, etc. also accept them. | |
| 952 | # (The list follows the same order as the GNU Coding Standards.) | |
| 953 | bindir='${exec_prefix}/bin' | |
| 954 | sbindir='${exec_prefix}/sbin' | |
| 955 | libexecdir='${exec_prefix}/libexec' | |
| 956 | datarootdir='${prefix}/share' | |
| 957 | datadir='${datarootdir}' | |
| 958 | sysconfdir='${prefix}/etc' | |
| 959 | sharedstatedir='${prefix}/com' | |
| 960 | localstatedir='${prefix}/var' | |
| 961 | runstatedir='${localstatedir}/run' | |
| 962 | includedir='${prefix}/include' | |
| 963 | oldincludedir='/usr/include' | |
| 964 | docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' | |
| 965 | infodir='${datarootdir}/info' | |
| 966 | htmldir='${docdir}' | |
| 967 | dvidir='${docdir}' | |
| 968 | pdfdir='${docdir}' | |
| 969 | psdir='${docdir}' | |
| 970 | libdir='${exec_prefix}/lib' | |
| 971 | localedir='${datarootdir}/locale' | |
| 972 | mandir='${datarootdir}/man' | |
| 973 | ||
| 974 | ac_prev= | |
| 975 | ac_dashdash= | |
| 976 | for ac_option | |
| 977 | do | |
| 978 | # If the previous option needs an argument, assign it. | |
| 979 | if test -n "$ac_prev"; then | |
| 980 | eval $ac_prev=\$ac_option | |
| 981 | ac_prev= | |
| 982 | continue | |
| 983 | fi | |
| 984 | ||
| 985 | case $ac_option in | |
| 986 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; | |
| 987 | *=) ac_optarg= ;; | |
| 988 | *) ac_optarg=yes ;; | |
| 989 | esac | |
| 990 | ||
| 991 | case $ac_dashdash$ac_option in | |
| 992 | --) | |
| 993 | ac_dashdash=yes ;; | |
| 994 | ||
| 995 | -bindir | --bindir | --bindi | --bind | --bin | --bi) | |
| 996 | ac_prev=bindir ;; | |
| 997 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) | |
| 998 | bindir=$ac_optarg ;; | |
| 999 | ||
| 1000 | -build | --build | --buil | --bui | --bu) | |
| 1001 | ac_prev=build_alias ;; | |
| 1002 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) | |
| 1003 | build_alias=$ac_optarg ;; | |
| 1004 | ||
| 1005 | -cache-file | --cache-file | --cache-fil | --cache-fi \ | |
| 1006 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) | |
| 1007 | ac_prev=cache_file ;; | |
| 1008 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | |
| 1009 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) | |
| 1010 | cache_file=$ac_optarg ;; | |
| 1011 | ||
| 1012 | --config-cache | -C) | |
| 1013 | cache_file=config.cache ;; | |
| 1014 | ||
| 1015 | -datadir | --datadir | --datadi | --datad) | |
| 1016 | ac_prev=datadir ;; | |
| 1017 | -datadir=* | --datadir=* | --datadi=* | --datad=*) | |
| 1018 | datadir=$ac_optarg ;; | |
| 1019 | ||
| 1020 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | |
| 1021 | | --dataroo | --dataro | --datar) | |
| 1022 | ac_prev=datarootdir ;; | |
| 1023 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | |
| 1024 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) | |
| 1025 | datarootdir=$ac_optarg ;; | |
| 1026 | ||
| 1027 | -disable-* | --disable-*) | |
| 1028 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` | |
| 1029 | # Reject names that are not valid shell variable names. | |
| 1030 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
| 1031 | as_fn_error $? "invalid feature name: '$ac_useropt'" | |
| 1032 | ac_useropt_orig=$ac_useropt | |
| 1033 | ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` | |
| 1034 | case $ac_user_opts in | |
| 1035 | *" | |
| 1036 | "enable_$ac_useropt" | |
| 1037 | "*) ;; | |
| 1038 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" | |
| 1039 | ac_unrecognized_sep=', ';; | |
| 1040 | esac | |
| 1041 | eval enable_$ac_useropt=no ;; | |
| 1042 | ||
| 1043 | -docdir | --docdir | --docdi | --doc | --do) | |
| 1044 | ac_prev=docdir ;; | |
| 1045 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) | |
| 1046 | docdir=$ac_optarg ;; | |
| 1047 | ||
| 1048 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) | |
| 1049 | ac_prev=dvidir ;; | |
| 1050 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) | |
| 1051 | dvidir=$ac_optarg ;; | |
| 1052 | ||
| 1053 | -enable-* | --enable-*) | |
| 1054 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` | |
| 1055 | # Reject names that are not valid shell variable names. | |
| 1056 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
| 1057 | as_fn_error $? "invalid feature name: '$ac_useropt'" | |
| 1058 | ac_useropt_orig=$ac_useropt | |
| 1059 | ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` | |
| 1060 | case $ac_user_opts in | |
| 1061 | *" | |
| 1062 | "enable_$ac_useropt" | |
| 1063 | "*) ;; | |
| 1064 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" | |
| 1065 | ac_unrecognized_sep=', ';; | |
| 1066 | esac | |
| 1067 | eval enable_$ac_useropt=\$ac_optarg ;; | |
| 1068 | ||
| 1069 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | |
| 1070 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | |
| 1071 | | --exec | --exe | --ex) | |
| 1072 | ac_prev=exec_prefix ;; | |
| 1073 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | |
| 1074 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | |
| 1075 | | --exec=* | --exe=* | --ex=*) | |
| 1076 | exec_prefix=$ac_optarg ;; | |
| 1077 | ||
| 1078 | -gas | --gas | --ga | --g) | |
| 1079 | # Obsolete; use --with-gas. | |
| 1080 | with_gas=yes ;; | |
| 1081 | ||
| 1082 | -help | --help | --hel | --he | -h) | |
| 1083 | ac_init_help=long ;; | |
| 1084 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) | |
| 1085 | ac_init_help=recursive ;; | |
| 1086 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) | |
| 1087 | ac_init_help=short ;; | |
| 1088 | ||
| 1089 | -host | --host | --hos | --ho) | |
| 1090 | ac_prev=host_alias ;; | |
| 1091 | -host=* | --host=* | --hos=* | --ho=*) | |
| 1092 | host_alias=$ac_optarg ;; | |
| 1093 | ||
| 1094 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) | |
| 1095 | ac_prev=htmldir ;; | |
| 1096 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | |
| 1097 | | --ht=*) | |
| 1098 | htmldir=$ac_optarg ;; | |
| 1099 | ||
| 1100 | -includedir | --includedir | --includedi | --included | --include \ | |
| 1101 | | --includ | --inclu | --incl | --inc) | |
| 1102 | ac_prev=includedir ;; | |
| 1103 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | |
| 1104 | | --includ=* | --inclu=* | --incl=* | --inc=*) | |
| 1105 | includedir=$ac_optarg ;; | |
| 1106 | ||
| 1107 | -infodir | --infodir | --infodi | --infod | --info | --inf) | |
| 1108 | ac_prev=infodir ;; | |
| 1109 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) | |
| 1110 | infodir=$ac_optarg ;; | |
| 1111 | ||
| 1112 | -libdir | --libdir | --libdi | --libd) | |
| 1113 | ac_prev=libdir ;; | |
| 1114 | -libdir=* | --libdir=* | --libdi=* | --libd=*) | |
| 1115 | libdir=$ac_optarg ;; | |
| 1116 | ||
| 1117 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | |
| 1118 | | --libexe | --libex | --libe) | |
| 1119 | ac_prev=libexecdir ;; | |
| 1120 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | |
| 1121 | | --libexe=* | --libex=* | --libe=*) | |
| 1122 | libexecdir=$ac_optarg ;; | |
| 1123 | ||
| 1124 | -localedir | --localedir | --localedi | --localed | --locale) | |
| 1125 | ac_prev=localedir ;; | |
| 1126 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) | |
| 1127 | localedir=$ac_optarg ;; | |
| 1128 | ||
| 1129 | -localstatedir | --localstatedir | --localstatedi | --localstated \ | |
| 1130 | | --localstate | --localstat | --localsta | --localst | --locals) | |
| 1131 | ac_prev=localstatedir ;; | |
| 1132 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | |
| 1133 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) | |
| 1134 | localstatedir=$ac_optarg ;; | |
| 1135 | ||
| 1136 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) | |
| 1137 | ac_prev=mandir ;; | |
| 1138 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) | |
| 1139 | mandir=$ac_optarg ;; | |
| 1140 | ||
| 1141 | -nfp | --nfp | --nf) | |
| 1142 | # Obsolete; use --without-fp. | |
| 1143 | with_fp=no ;; | |
| 1144 | ||
| 1145 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | |
| 1146 | | --no-cr | --no-c | -n) | |
| 1147 | no_create=yes ;; | |
| 1148 | ||
| 1149 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | |
| 1150 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) | |
| 1151 | no_recursion=yes ;; | |
| 1152 | ||
| 1153 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | |
| 1154 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | |
| 1155 | | --oldin | --oldi | --old | --ol | --o) | |
| 1156 | ac_prev=oldincludedir ;; | |
| 1157 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | |
| 1158 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | |
| 1159 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) | |
| 1160 | oldincludedir=$ac_optarg ;; | |
| 1161 | ||
| 1162 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) | |
| 1163 | ac_prev=prefix ;; | |
| 1164 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) | |
| 1165 | prefix=$ac_optarg ;; | |
| 1166 | ||
| 1167 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ | |
| 1168 | | --program-pre | --program-pr | --program-p) | |
| 1169 | ac_prev=program_prefix ;; | |
| 1170 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ | |
| 1171 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) | |
| 1172 | program_prefix=$ac_optarg ;; | |
| 1173 | ||
| 1174 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ | |
| 1175 | | --program-suf | --program-su | --program-s) | |
| 1176 | ac_prev=program_suffix ;; | |
| 1177 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ | |
| 1178 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) | |
| 1179 | program_suffix=$ac_optarg ;; | |
| 1180 | ||
| 1181 | -program-transform-name | --program-transform-name \ | |
| 1182 | | --program-transform-nam | --program-transform-na \ | |
| 1183 | | --program-transform-n | --program-transform- \ | |
| 1184 | | --program-transform | --program-transfor \ | |
| 1185 | | --program-transfo | --program-transf \ | |
| 1186 | | --program-trans | --program-tran \ | |
| 1187 | | --progr-tra | --program-tr | --program-t) | |
| 1188 | ac_prev=program_transform_name ;; | |
| 1189 | -program-transform-name=* | --program-transform-name=* \ | |
| 1190 | | --program-transform-nam=* | --program-transform-na=* \ | |
| 1191 | | --program-transform-n=* | --program-transform-=* \ | |
| 1192 | | --program-transform=* | --program-transfor=* \ | |
| 1193 | | --program-transfo=* | --program-transf=* \ | |
| 1194 | | --program-trans=* | --program-tran=* \ | |
| 1195 | | --progr-tra=* | --program-tr=* | --program-t=*) | |
| 1196 | program_transform_name=$ac_optarg ;; | |
| 1197 | ||
| 1198 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) | |
| 1199 | ac_prev=pdfdir ;; | |
| 1200 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) | |
| 1201 | pdfdir=$ac_optarg ;; | |
| 1202 | ||
| 1203 | -psdir | --psdir | --psdi | --psd | --ps) | |
| 1204 | ac_prev=psdir ;; | |
| 1205 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) | |
| 1206 | psdir=$ac_optarg ;; | |
| 1207 | ||
| 1208 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
| 1209 | | -silent | --silent | --silen | --sile | --sil) | |
| 1210 | silent=yes ;; | |
| 1211 | ||
| 1212 | -runstatedir | --runstatedir | --runstatedi | --runstated \ | |
| 1213 | | --runstate | --runstat | --runsta | --runst | --runs \ | |
| 1214 | | --run | --ru | --r) | |
| 1215 | ac_prev=runstatedir ;; | |
| 1216 | -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | |
| 1217 | | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | |
| 1218 | | --run=* | --ru=* | --r=*) | |
| 1219 | runstatedir=$ac_optarg ;; | |
| 1220 | ||
| 1221 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) | |
| 1222 | ac_prev=sbindir ;; | |
| 1223 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | |
| 1224 | | --sbi=* | --sb=*) | |
| 1225 | sbindir=$ac_optarg ;; | |
| 1226 | ||
| 1227 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ | |
| 1228 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | |
| 1229 | | --sharedst | --shareds | --shared | --share | --shar \ | |
| 1230 | | --sha | --sh) | |
| 1231 | ac_prev=sharedstatedir ;; | |
| 1232 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | |
| 1233 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | |
| 1234 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | |
| 1235 | | --sha=* | --sh=*) | |
| 1236 | sharedstatedir=$ac_optarg ;; | |
| 1237 | ||
| 1238 | -site | --site | --sit) | |
| 1239 | ac_prev=site ;; | |
| 1240 | -site=* | --site=* | --sit=*) | |
| 1241 | site=$ac_optarg ;; | |
| 1242 | ||
| 1243 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) | |
| 1244 | ac_prev=srcdir ;; | |
| 1245 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) | |
| 1246 | srcdir=$ac_optarg ;; | |
| 1247 | ||
| 1248 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | |
| 1249 | | --syscon | --sysco | --sysc | --sys | --sy) | |
| 1250 | ac_prev=sysconfdir ;; | |
| 1251 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | |
| 1252 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) | |
| 1253 | sysconfdir=$ac_optarg ;; | |
| 1254 | ||
| 1255 | -target | --target | --targe | --targ | --tar | --ta | --t) | |
| 1256 | ac_prev=target_alias ;; | |
| 1257 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) | |
| 1258 | target_alias=$ac_optarg ;; | |
| 1259 | ||
| 1260 | -v | -verbose | --verbose | --verbos | --verbo | --verb) | |
| 1261 | verbose=yes ;; | |
| 1262 | ||
| 1263 | -version | --version | --versio | --versi | --vers | -V) | |
| 1264 | ac_init_version=: ;; | |
| 1265 | ||
| 1266 | -with-* | --with-*) | |
| 1267 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` | |
| 1268 | # Reject names that are not valid shell variable names. | |
| 1269 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
| 1270 | as_fn_error $? "invalid package name: '$ac_useropt'" | |
| 1271 | ac_useropt_orig=$ac_useropt | |
| 1272 | ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` | |
| 1273 | case $ac_user_opts in | |
| 1274 | *" | |
| 1275 | "with_$ac_useropt" | |
| 1276 | "*) ;; | |
| 1277 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" | |
| 1278 | ac_unrecognized_sep=', ';; | |
| 1279 | esac | |
| 1280 | eval with_$ac_useropt=\$ac_optarg ;; | |
| 1281 | ||
| 1282 | -without-* | --without-*) | |
| 1283 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` | |
| 1284 | # Reject names that are not valid shell variable names. | |
| 1285 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && | |
| 1286 | as_fn_error $? "invalid package name: '$ac_useropt'" | |
| 1287 | ac_useropt_orig=$ac_useropt | |
| 1288 | ac_useropt=`printf "%s\n" "$ac_useropt" | sed 's/[-+.]/_/g'` | |
| 1289 | case $ac_user_opts in | |
| 1290 | *" | |
| 1291 | "with_$ac_useropt" | |
| 1292 | "*) ;; | |
| 1293 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" | |
| 1294 | ac_unrecognized_sep=', ';; | |
| 1295 | esac | |
| 1296 | eval with_$ac_useropt=no ;; | |
| 1297 | ||
| 1298 | --x) | |
| 1299 | # Obsolete; use --with-x. | |
| 1300 | with_x=yes ;; | |
| 1301 | ||
| 1302 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | |
| 1303 | | --x-incl | --x-inc | --x-in | --x-i) | |
| 1304 | ac_prev=x_includes ;; | |
| 1305 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | |
| 1306 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) | |
| 1307 | x_includes=$ac_optarg ;; | |
| 1308 | ||
| 1309 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ | |
| 1310 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) | |
| 1311 | ac_prev=x_libraries ;; | |
| 1312 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | |
| 1313 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) | |
| 1314 | x_libraries=$ac_optarg ;; | |
| 1315 | ||
| 1316 | -*) as_fn_error $? "unrecognized option: '$ac_option' | |
| 1317 | Try '$0 --help' for more information" | |
| 1318 | ;; | |
| 1319 | ||
| 1320 | *=*) | |
| 1321 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` | |
| 1322 | # Reject names that are not valid shell variable names. | |
| 1323 | case $ac_envvar in #( | |
| 1324 | '' | [0-9]* | *[!_$as_cr_alnum]* ) | |
| 1325 | as_fn_error $? "invalid variable name: '$ac_envvar'" ;; | |
| 1326 | esac | |
| 1327 | eval $ac_envvar=\$ac_optarg | |
| 1328 | export $ac_envvar ;; | |
| 1329 | ||
| 1330 | *) | |
| 1331 | # FIXME: should be removed in autoconf 3.0. | |
| 1332 | printf "%s\n" "$as_me: WARNING: you should use --build, --host, --target" >&2 | |
| 1333 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && | |
| 1334 | printf "%s\n" "$as_me: WARNING: invalid host type: $ac_option" >&2 | |
| 1335 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" | |
| 1336 | ;; | |
| 1337 | ||
| 1338 | esac | |
| 1339 | done | |
| 1340 | ||
| 1341 | if test -n "$ac_prev"; then | |
| 1342 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` | |
| 1343 | as_fn_error $? "missing argument to $ac_option" | |
| 1344 | fi | |
| 1345 | ||
| 1346 | if test -n "$ac_unrecognized_opts"; then | |
| 1347 | case $enable_option_checking in | |
| 1348 | no) ;; | |
| 1349 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; | |
| 1350 | *) printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; | |
| 1351 | esac | |
| 1352 | fi | |
| 1353 | ||
| 1354 | # Check all directory arguments for consistency. | |
| 1355 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ | |
| 1356 | datadir sysconfdir sharedstatedir localstatedir includedir \ | |
| 1357 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ | |
| 1358 | libdir localedir mandir runstatedir | |
| 1359 | do | |
| 1360 | eval ac_val=\$$ac_var | |
| 1361 | # Remove trailing slashes. | |
| 1362 | case $ac_val in | |
| 1363 | */ ) | |
| 1364 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` | |
| 1365 | eval $ac_var=\$ac_val;; | |
| 1366 | esac | |
| 1367 | # Be sure to have absolute directory names. | |
| 1368 | case $ac_val in | |
| 1369 | [\\/$]* | ?:[\\/]* ) continue;; | |
| 1370 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; | |
| 1371 | esac | |
| 1372 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" | |
| 1373 | done | |
| 1374 | ||
| 1375 | # There might be people who depend on the old broken behavior: '$host' | |
| 1376 | # used to hold the argument of --host etc. | |
| 1377 | # FIXME: To remove some day. | |
| 1378 | build=$build_alias | |
| 1379 | host=$host_alias | |
| 1380 | target=$target_alias | |
| 1381 | ||
| 1382 | # FIXME: To remove some day. | |
| 1383 | if test "x$host_alias" != x; then | |
| 1384 | if test "x$build_alias" = x; then | |
| 1385 | cross_compiling=maybe | |
| 1386 | elif test "x$build_alias" != "x$host_alias"; then | |
| 1387 | cross_compiling=yes | |
| 1388 | fi | |
| 1389 | fi | |
| 1390 | ||
| 1391 | ac_tool_prefix= | |
| 1392 | test -n "$host_alias" && ac_tool_prefix=$host_alias- | |
| 1393 | ||
| 1394 | test "$silent" = yes && exec 6>/dev/null | |
| 1395 | ||
| 1396 | ||
| 1397 | ac_pwd=`pwd` && test -n "$ac_pwd" && | |
| 1398 | ac_ls_di=`ls -di .` && | |
| 1399 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || | |
| 1400 | as_fn_error $? "working directory cannot be determined" | |
| 1401 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || | |
| 1402 | as_fn_error $? "pwd does not report name of working directory" | |
| 1403 | ||
| 1404 | ||
| 1405 | # Find the source files, if location was not specified. | |
| 1406 | if test -z "$srcdir"; then | |
| 1407 | ac_srcdir_defaulted=yes | |
| 1408 | # Try the directory containing this script, then the parent directory. | |
| 1409 | ac_confdir=`$as_dirname -- "$as_myself" || | |
| 1410 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
| 1411 | X"$as_myself" : 'X\(//\)[^/]' \| \ | |
| 1412 | X"$as_myself" : 'X\(//\)$' \| \ | |
| 1413 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || | |
| 1414 | printf "%s\n" X"$as_myself" | | |
| 1415 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
| 1416 | s//\1/ | |
| 1417 | q | |
| 1418 | } | |
| 1419 | /^X\(\/\/\)[^/].*/{ | |
| 1420 | s//\1/ | |
| 1421 | q | |
| 1422 | } | |
| 1423 | /^X\(\/\/\)$/{ | |
| 1424 | s//\1/ | |
| 1425 | q | |
| 1426 | } | |
| 1427 | /^X\(\/\).*/{ | |
| 1428 | s//\1/ | |
| 1429 | q | |
| 1430 | } | |
| 1431 | s/.*/./; q'` | |
| 1432 | srcdir=$ac_confdir | |
| 1433 | if test ! -r "$srcdir/$ac_unique_file"; then | |
| 1434 | srcdir=.. | |
| 1435 | fi | |
| 1436 | else | |
| 1437 | ac_srcdir_defaulted=no | |
| 1438 | fi | |
| 1439 | if test ! -r "$srcdir/$ac_unique_file"; then | |
| 1440 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." | |
| 1441 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" | |
| 1442 | fi | |
| 1443 | ac_msg="sources are in $srcdir, but 'cd $srcdir' does not work" | |
| 1444 | ac_abs_confdir=`( | |
| 1445 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" | |
| 1446 | pwd)` | |
| 1447 | # When building in place, set srcdir=. | |
| 1448 | if test "$ac_abs_confdir" = "$ac_pwd"; then | |
| 1449 | srcdir=. | |
| 1450 | fi | |
| 1451 | # Remove unnecessary trailing slashes from srcdir. | |
| 1452 | # Double slashes in file names in object file debugging info | |
| 1453 | # mess up M-x gdb in Emacs. | |
| 1454 | case $srcdir in | |
| 1455 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; | |
| 1456 | esac | |
| 1457 | for ac_var in $ac_precious_vars; do | |
| 1458 | eval ac_env_${ac_var}_set=\${${ac_var}+set} | |
| 1459 | eval ac_env_${ac_var}_value=\$${ac_var} | |
| 1460 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} | |
| 1461 | eval ac_cv_env_${ac_var}_value=\$${ac_var} | |
| 1462 | done | |
| 1463 | ||
| 1464 | # | |
| 1465 | # Report the --help message. | |
| 1466 | # | |
| 1467 | if test "$ac_init_help" = "long"; then | |
| 1468 | # Omit some internal or obsolete options to make the list less imposing. | |
| 1469 | # This message is too long to be a string in the A/UX 3.1 sh. | |
| 1470 | cat <<_ACEOF | |
| 1471 | 'configure' configures bash 5.3-release to adapt to many kinds of systems. | |
| 1472 | ||
| 1473 | Usage: $0 [OPTION]... [VAR=VALUE]... | |
| 1474 | ||
| 1475 | To assign environment variables (e.g., CC, CFLAGS...), specify them as | |
| 1476 | VAR=VALUE. See below for descriptions of some of the useful variables. | |
| 1477 | ||
| 1478 | Defaults for the options are specified in brackets. | |
| 1479 | ||
| 1480 | Configuration: | |
| 1481 | -h, --help display this help and exit | |
| 1482 | --help=short display options specific to this package | |
| 1483 | --help=recursive display the short help of all the included packages | |
| 1484 | -V, --version display version information and exit | |
| 1485 | -q, --quiet, --silent do not print 'checking ...' messages | |
| 1486 | --cache-file=FILE cache test results in FILE [disabled] | |
| 1487 | -C, --config-cache alias for '--cache-file=config.cache' | |
| 1488 | -n, --no-create do not create output files | |
| 1489 | --srcdir=DIR find the sources in DIR [configure dir or '..'] | |
| 1490 | ||
| 1491 | Installation directories: | |
| 1492 | --prefix=PREFIX install architecture-independent files in PREFIX | |
| 1493 | [$ac_default_prefix] | |
| 1494 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX | |
| 1495 | [PREFIX] | |
| 1496 | ||
| 1497 | By default, 'make install' will install all the files in | |
| 1498 | '$ac_default_prefix/bin', '$ac_default_prefix/lib' etc. You can specify | |
| 1499 | an installation prefix other than '$ac_default_prefix' using '--prefix', | |
| 1500 | for instance '--prefix=\$HOME'. | |
| 1501 | ||
| 1502 | For better control, use the options below. | |
| 1503 | ||
| 1504 | Fine tuning of the installation directories: | |
| 1505 | --bindir=DIR user executables [EPREFIX/bin] | |
| 1506 | --sbindir=DIR system admin executables [EPREFIX/sbin] | |
| 1507 | --libexecdir=DIR program executables [EPREFIX/libexec] | |
| 1508 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] | |
| 1509 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] | |
| 1510 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] | |
| 1511 | --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] | |
| 1512 | --libdir=DIR object code libraries [EPREFIX/lib] | |
| 1513 | --includedir=DIR C header files [PREFIX/include] | |
| 1514 | --oldincludedir=DIR C header files for non-gcc [/usr/include] | |
| 1515 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] | |
| 1516 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] | |
| 1517 | --infodir=DIR info documentation [DATAROOTDIR/info] | |
| 1518 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] | |
| 1519 | --mandir=DIR man documentation [DATAROOTDIR/man] | |
| 1520 | --docdir=DIR documentation root [DATAROOTDIR/doc/bash] | |
| 1521 | --htmldir=DIR html documentation [DOCDIR] | |
| 1522 | --dvidir=DIR dvi documentation [DOCDIR] | |
| 1523 | --pdfdir=DIR pdf documentation [DOCDIR] | |
| 1524 | --psdir=DIR ps documentation [DOCDIR] | |
| 1525 | _ACEOF | |
| 1526 | ||
| 1527 | cat <<\_ACEOF | |
| 1528 | ||
| 1529 | System types: | |
| 1530 | --build=BUILD configure for building on BUILD [guessed] | |
| 1531 | --host=HOST cross-compile to build programs to run on HOST [BUILD] | |
| 1532 | _ACEOF | |
| 1533 | fi | |
| 1534 | ||
| 1535 | if test -n "$ac_init_help"; then | |
| 1536 | case $ac_init_help in | |
| 1537 | short | recursive ) echo "Configuration of bash 5.3-release:";; | |
| 1538 | esac | |
| 1539 | cat <<\_ACEOF | |
| 1540 | ||
| 1541 | Optional Features: | |
| 1542 | --disable-option-checking ignore unrecognized --enable/--with options | |
| 1543 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) | |
| 1544 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] | |
| 1545 | --enable-minimal-config a minimal sh-like configuration | |
| 1546 | --enable-alias enable shell aliases | |
| 1547 | --enable-alt-array-implementation | |
| 1548 | enable an alternate array implementation that | |
| 1549 | optimizes speed at the cost of space | |
| 1550 | --enable-arith-for-command | |
| 1551 | enable arithmetic for command | |
| 1552 | --enable-array-variables | |
| 1553 | include shell array variables | |
| 1554 | --enable-bang-history turn on csh-style history substitution | |
| 1555 | --enable-bash-source-fullpath-default | |
| 1556 | enable the bash_source_fullpath option by default | |
| 1557 | --enable-brace-expansion | |
| 1558 | include brace expansion | |
| 1559 | --enable-casemod-attributes | |
| 1560 | include case-modifying variable attributes | |
| 1561 | --enable-casemod-expansions | |
| 1562 | include case-modifying word expansions | |
| 1563 | --enable-command-timing enable the time reserved word and command timing | |
| 1564 | --enable-cond-command enable the conditional command | |
| 1565 | --enable-cond-regexp enable extended regular expression matching in | |
| 1566 | conditional commands | |
| 1567 | --enable-coprocesses enable coprocess support and the coproc reserved | |
| 1568 | word | |
| 1569 | --enable-debugger enable support for bash debugger | |
| 1570 | --enable-dev-fd-stat-broken | |
| 1571 | enable this option if stat on /dev/fd/N and fstat on | |
| 1572 | file descriptor N don't return the same results | |
| 1573 | --enable-direxpand-default | |
| 1574 | enable the direxpand shell option by default | |
| 1575 | --enable-directory-stack | |
| 1576 | enable builtins pushd/popd/dirs | |
| 1577 | --enable-disabled-builtins | |
| 1578 | allow disabled builtins to still be invoked | |
| 1579 | --enable-dparen-arithmetic | |
| 1580 | include ((...)) command | |
| 1581 | --enable-extended-glob include ksh-style extended pattern matching | |
| 1582 | --enable-extended-glob-default | |
| 1583 | force extended pattern matching to be enabled by | |
| 1584 | default | |
| 1585 | --enable-function-import | |
| 1586 | allow bash to import exported function definitions | |
| 1587 | by default | |
| 1588 | --enable-glob-asciiranges-default | |
| 1589 | force bracket range expressions in pattern matching | |
| 1590 | to use the C locale by default | |
| 1591 | --enable-help-builtin include the help builtin | |
| 1592 | --enable-history turn on command history | |
| 1593 | --enable-job-control enable job control features | |
| 1594 | --enable-multibyte enable multibyte characters if OS supports them | |
| 1595 | --enable-net-redirections | |
| 1596 | enable /dev/tcp/host/port redirection | |
| 1597 | --enable-process-substitution | |
| 1598 | enable process substitution | |
| 1599 | --enable-progcomp enable programmable completion and the complete | |
| 1600 | builtin | |
| 1601 | --enable-prompt-string-decoding | |
| 1602 | turn on escape character decoding in prompts | |
| 1603 | --enable-readline turn on command line editing | |
| 1604 | --enable-restricted enable a restricted shell | |
| 1605 | --enable-select include select command | |
| 1606 | --enable-separate-helpfiles | |
| 1607 | use external files for help builtin documentation | |
| 1608 | --enable-single-help-strings | |
| 1609 | store help documentation as a single string to ease | |
| 1610 | translation | |
| 1611 | --enable-strict-posix-default | |
| 1612 | configure bash to be posix-conformant by default | |
| 1613 | --enable-translatable-strings | |
| 1614 | include support for $"..." translatable strings | |
| 1615 | --enable-usg-echo-default | |
| 1616 | a synonym for --enable-xpg-echo-default | |
| 1617 | --enable-xpg-echo-default | |
| 1618 | make the echo builtin expand escape sequences by | |
| 1619 | default | |
| 1620 | --enable-mem-scramble scramble memory on calls to malloc and free | |
| 1621 | --enable-profiling allow profiling with gprof | |
| 1622 | --enable-static-link link bash statically, for use as a root shell | |
| 1623 | --disable-largefile omit support for large files | |
| 1624 | --disable-nls do not use Native Language Support | |
| 1625 | --enable-threads={isoc|posix|isoc+posix|windows} | |
| 1626 | specify multithreading API | |
| 1627 | --disable-threads build without multithread safety | |
| 1628 | --disable-rpath do not hardcode runtime library paths | |
| 1629 | --enable-year2038 support timestamps after 2038 | |
| 1630 | ||
| 1631 | Optional Packages: | |
| 1632 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] | |
| 1633 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) | |
| 1634 | --with-afs if you are running AFS | |
| 1635 | --with-bash-malloc use the Bash version of malloc | |
| 1636 | --with-curses use the curses library instead of the termcap | |
| 1637 | library | |
| 1638 | --with-gnu-malloc synonym for --with-bash-malloc | |
| 1639 | --with-installed-readline | |
| 1640 | use a version of the readline library that is | |
| 1641 | already installed | |
| 1642 | --with-gnu-ld assume the C compiler uses GNU ld [default=no] | |
| 1643 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib | |
| 1644 | --without-libiconv-prefix don't search for libiconv in includedir and libdir | |
| 1645 | --with-included-gettext use the GNU gettext library included here | |
| 1646 | --with-libintl-prefix[=DIR] search for libintl in DIR/include and DIR/lib | |
| 1647 | --without-libintl-prefix don't search for libintl in includedir and libdir | |
| 1648 | ||
| 1649 | Some influential environment variables: | |
| 1650 | DEBUGGER_START_FILE | |
| 1651 | location of bash debugger initialization file | |
| 1652 | CC_FOR_BUILD | |
| 1653 | C compiler used when compiling binaries used only at build time | |
| 1654 | CFLAGS_FOR_BUILD | |
| 1655 | Compilation options (CFLAGS) used when compiling binaries used | |
| 1656 | only at build time | |
| 1657 | LDFLAGS_FOR_BUILD | |
| 1658 | Linker options (LDFLAGS) used when compiling binaries used only | |
| 1659 | at build time | |
| 1660 | CPPFLAGS_FOR_BUILD | |
| 1661 | C preprocessor options (CPPFLAGS) used when compiling binaries | |
| 1662 | used only at build time | |
| 1663 | CC C compiler command | |
| 1664 | CFLAGS C compiler flags | |
| 1665 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a | |
| 1666 | nonstandard directory <lib dir> | |
| 1667 | LIBS libraries to pass to the linker, e.g. -l<library> | |
| 1668 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if | |
| 1669 | you have headers in a nonstandard directory <include dir> | |
| 1670 | YACC The 'Yet Another Compiler Compiler' implementation to use. | |
| 1671 | Defaults to the first program found out of: 'bison -y', 'byacc', | |
| 1672 | 'yacc'. | |
| 1673 | YFLAGS The list of arguments that will be passed by default to $YACC. | |
| 1674 | This script will default YFLAGS to the empty string to avoid a | |
| 1675 | default value of '-d' given by some make applications. | |
| 1676 | CPP C preprocessor | |
| 1677 | ||
| 1678 | Use these variables to override the choices made by 'configure' or to help | |
| 1679 | it to find libraries and programs with nonstandard names/locations. | |
| 1680 | ||
| 1681 | Report bugs to <bug-bash@gnu.org>. | |
| 1682 | _ACEOF | |
| 1683 | ac_status=$? | |
| 1684 | fi | |
| 1685 | ||
| 1686 | if test "$ac_init_help" = "recursive"; then | |
| 1687 | # If there are subdirs, report their specific --help. | |
| 1688 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue | |
| 1689 | test -d "$ac_dir" || | |
| 1690 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || | |
| 1691 | continue | |
| 1692 | ac_builddir=. | |
| 1693 | ||
| 1694 | case "$ac_dir" in | |
| 1695 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
| 1696 | *) | |
| 1697 | ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` | |
| 1698 | # A ".." for each directory in $ac_dir_suffix. | |
| 1699 | ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
| 1700 | case $ac_top_builddir_sub in | |
| 1701 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
| 1702 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
| 1703 | esac ;; | |
| 1704 | esac | |
| 1705 | ac_abs_top_builddir=$ac_pwd | |
| 1706 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
| 1707 | # for backward compatibility: | |
| 1708 | ac_top_builddir=$ac_top_build_prefix | |
| 1709 | ||
| 1710 | case $srcdir in | |
| 1711 | .) # We are building in place. | |
| 1712 | ac_srcdir=. | |
| 1713 | ac_top_srcdir=$ac_top_builddir_sub | |
| 1714 | ac_abs_top_srcdir=$ac_pwd ;; | |
| 1715 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
| 1716 | ac_srcdir=$srcdir$ac_dir_suffix; | |
| 1717 | ac_top_srcdir=$srcdir | |
| 1718 | ac_abs_top_srcdir=$srcdir ;; | |
| 1719 | *) # Relative name. | |
| 1720 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
| 1721 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
| 1722 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
| 1723 | esac | |
| 1724 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
| 1725 | ||
| 1726 | cd "$ac_dir" || { ac_status=$?; continue; } | |
| 1727 | # Check for configure.gnu first; this name is used for a wrapper for | |
| 1728 | # Metaconfig's "Configure" on case-insensitive file systems. | |
| 1729 | if test -f "$ac_srcdir/configure.gnu"; then | |
| 1730 | echo && | |
| 1731 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive | |
| 1732 | elif test -f "$ac_srcdir/configure"; then | |
| 1733 | echo && | |
| 1734 | $SHELL "$ac_srcdir/configure" --help=recursive | |
| 1735 | else | |
| 1736 | printf "%s\n" "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | |
| 1737 | fi || ac_status=$? | |
| 1738 | cd "$ac_pwd" || { ac_status=$?; break; } | |
| 1739 | done | |
| 1740 | fi | |
| 1741 | ||
| 1742 | test -n "$ac_init_help" && exit $ac_status | |
| 1743 | if $ac_init_version; then | |
| 1744 | cat <<\_ACEOF | |
| 1745 | bash configure 5.3-release | |
| 1746 | generated by GNU Autoconf 2.72 | |
| 1747 | ||
| 1748 | Copyright (C) 2023 Free Software Foundation, Inc. | |
| 1749 | This configure script is free software; the Free Software Foundation | |
| 1750 | gives unlimited permission to copy, distribute and modify it. | |
| 1751 | _ACEOF | |
| 1752 | exit | |
| 1753 | fi | |
| 1754 | ||
| 1755 | ## ------------------------ ## | |
| 1756 | ## Autoconf initialization. ## | |
| 1757 | ## ------------------------ ## | |
| 1758 | ||
| 1759 | # ac_fn_c_try_compile LINENO | |
| 1760 | # -------------------------- | |
| 1761 | # Try to compile conftest.$ac_ext, and return whether this succeeded. | |
| 1762 | ac_fn_c_try_compile () | |
| 1763 | { | |
| 1764 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
| 1765 | rm -f conftest.$ac_objext conftest.beam | |
| 1766 | if { { ac_try="$ac_compile" | |
| 1767 | case "(($ac_try" in | |
| 1768 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
| 1769 | *) ac_try_echo=$ac_try;; | |
| 1770 | esac | |
| 1771 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
| 1772 | printf "%s\n" "$ac_try_echo"; } >&5 | |
| 1773 | (eval "$ac_compile") 2>conftest.err | |
| 1774 | ac_status=$? | |
| 1775 | if test -s conftest.err; then | |
| 1776 | grep -v '^ *+' conftest.err >conftest.er1 | |
| 1777 | cat conftest.er1 >&5 | |
| 1778 | mv -f conftest.er1 conftest.err | |
| 1779 | fi | |
| 1780 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
| 1781 | test $ac_status = 0; } && { | |
| 1782 | test -z "$ac_c_werror_flag" || | |
| 1783 | test ! -s conftest.err | |
| 1784 | } && test -s conftest.$ac_objext | |
| 1785 | then : | |
| 1786 | ac_retval=0 | |
| 1787 | else case e in #( | |
| 1788 | e) printf "%s\n" "$as_me: failed program was:" >&5 | |
| 1789 | sed 's/^/| /' conftest.$ac_ext >&5 | |
| 1790 | ||
| 1791 | ac_retval=1 ;; | |
| 1792 | esac | |
| 1793 | fi | |
| 1794 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
| 1795 | as_fn_set_status $ac_retval | |
| 1796 | ||
| 1797 | } # ac_fn_c_try_compile | |
| 1798 | ||
| 1799 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES | |
| 1800 | # ------------------------------------------------------- | |
| 1801 | # Tests whether HEADER exists and can be compiled using the include files in | |
| 1802 | # INCLUDES, setting the cache variable VAR accordingly. | |
| 1803 | ac_fn_c_check_header_compile () | |
| 1804 | { | |
| 1805 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
| 1806 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
| 1807 | printf %s "checking for $2... " >&6; } | |
| 1808 | if eval test \${$3+y} | |
| 1809 | then : | |
| 1810 | printf %s "(cached) " >&6 | |
| 1811 | else case e in #( | |
| 1812 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 1813 | /* end confdefs.h. */ | |
| 1814 | $4 | |
| 1815 | #include <$2> | |
| 1816 | _ACEOF | |
| 1817 | if ac_fn_c_try_compile "$LINENO" | |
| 1818 | then : | |
| 1819 | eval "$3=yes" | |
| 1820 | else case e in #( | |
| 1821 | e) eval "$3=no" ;; | |
| 1822 | esac | |
| 1823 | fi | |
| 1824 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 1825 | esac | |
| 1826 | fi | |
| 1827 | eval ac_res=\$$3 | |
| 1828 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
| 1829 | printf "%s\n" "$ac_res" >&6; } | |
| 1830 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
| 1831 | ||
| 1832 | } # ac_fn_c_check_header_compile | |
| 1833 | ||
| 1834 | # ac_fn_c_try_link LINENO | |
| 1835 | # ----------------------- | |
| 1836 | # Try to link conftest.$ac_ext, and return whether this succeeded. | |
| 1837 | ac_fn_c_try_link () | |
| 1838 | { | |
| 1839 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
| 1840 | rm -f conftest.$ac_objext conftest.beam conftest$ac_exeext | |
| 1841 | if { { ac_try="$ac_link" | |
| 1842 | case "(($ac_try" in | |
| 1843 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
| 1844 | *) ac_try_echo=$ac_try;; | |
| 1845 | esac | |
| 1846 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
| 1847 | printf "%s\n" "$ac_try_echo"; } >&5 | |
| 1848 | (eval "$ac_link") 2>conftest.err | |
| 1849 | ac_status=$? | |
| 1850 | if test -s conftest.err; then | |
| 1851 | grep -v '^ *+' conftest.err >conftest.er1 | |
| 1852 | cat conftest.er1 >&5 | |
| 1853 | mv -f conftest.er1 conftest.err | |
| 1854 | fi | |
| 1855 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
| 1856 | test $ac_status = 0; } && { | |
| 1857 | test -z "$ac_c_werror_flag" || | |
| 1858 | test ! -s conftest.err | |
| 1859 | } && test -s conftest$ac_exeext && { | |
| 1860 | test "$cross_compiling" = yes || | |
| 1861 | test -x conftest$ac_exeext | |
| 1862 | } | |
| 1863 | then : | |
| 1864 | ac_retval=0 | |
| 1865 | else case e in #( | |
| 1866 | e) printf "%s\n" "$as_me: failed program was:" >&5 | |
| 1867 | sed 's/^/| /' conftest.$ac_ext >&5 | |
| 1868 | ||
| 1869 | ac_retval=1 ;; | |
| 1870 | esac | |
| 1871 | fi | |
| 1872 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information | |
| 1873 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would | |
| 1874 | # interfere with the next link command; also delete a directory that is | |
| 1875 | # left behind by Apple's compiler. We do this before executing the actions. | |
| 1876 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
| 1877 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
| 1878 | as_fn_set_status $ac_retval | |
| 1879 | ||
| 1880 | } # ac_fn_c_try_link | |
| 1881 | ||
| 1882 | # ac_fn_c_check_func LINENO FUNC VAR | |
| 1883 | # ---------------------------------- | |
| 1884 | # Tests whether FUNC exists, setting the cache variable VAR accordingly | |
| 1885 | ac_fn_c_check_func () | |
| 1886 | { | |
| 1887 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
| 1888 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
| 1889 | printf %s "checking for $2... " >&6; } | |
| 1890 | if eval test \${$3+y} | |
| 1891 | then : | |
| 1892 | printf %s "(cached) " >&6 | |
| 1893 | else case e in #( | |
| 1894 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 1895 | /* end confdefs.h. */ | |
| 1896 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. | |
| 1897 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ | |
| 1898 | #define $2 innocuous_$2 | |
| 1899 | ||
| 1900 | /* System header to define __stub macros and hopefully few prototypes, | |
| 1901 | which can conflict with char $2 (void); below. */ | |
| 1902 | ||
| 1903 | #include <limits.h> | |
| 1904 | #undef $2 | |
| 1905 | ||
| 1906 | /* Override any GCC internal prototype to avoid an error. | |
| 1907 | Use char because int might match the return type of a GCC | |
| 1908 | builtin and then its argument prototype would still apply. */ | |
| 1909 | #ifdef __cplusplus | |
| 1910 | extern "C" | |
| 1911 | #endif | |
| 1912 | char $2 (void); | |
| 1913 | /* The GNU C library defines this for functions which it implements | |
| 1914 | to always fail with ENOSYS. Some functions are actually named | |
| 1915 | something starting with __ and the normal name is an alias. */ | |
| 1916 | #if defined __stub_$2 || defined __stub___$2 | |
| 1917 | choke me | |
| 1918 | #endif | |
| 1919 | ||
| 1920 | int | |
| 1921 | main (void) | |
| 1922 | { | |
| 1923 | return $2 (); | |
| 1924 | ; | |
| 1925 | return 0; | |
| 1926 | } | |
| 1927 | _ACEOF | |
| 1928 | if ac_fn_c_try_link "$LINENO" | |
| 1929 | then : | |
| 1930 | eval "$3=yes" | |
| 1931 | else case e in #( | |
| 1932 | e) eval "$3=no" ;; | |
| 1933 | esac | |
| 1934 | fi | |
| 1935 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 1936 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 1937 | esac | |
| 1938 | fi | |
| 1939 | eval ac_res=\$$3 | |
| 1940 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
| 1941 | printf "%s\n" "$ac_res" >&6; } | |
| 1942 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
| 1943 | ||
| 1944 | } # ac_fn_c_check_func | |
| 1945 | ||
| 1946 | # ac_fn_c_try_run LINENO | |
| 1947 | # ---------------------- | |
| 1948 | # Try to run conftest.$ac_ext, and return whether this succeeded. Assumes that | |
| 1949 | # executables *can* be run. | |
| 1950 | ac_fn_c_try_run () | |
| 1951 | { | |
| 1952 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
| 1953 | if { { ac_try="$ac_link" | |
| 1954 | case "(($ac_try" in | |
| 1955 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
| 1956 | *) ac_try_echo=$ac_try;; | |
| 1957 | esac | |
| 1958 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
| 1959 | printf "%s\n" "$ac_try_echo"; } >&5 | |
| 1960 | (eval "$ac_link") 2>&5 | |
| 1961 | ac_status=$? | |
| 1962 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
| 1963 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' | |
| 1964 | { { case "(($ac_try" in | |
| 1965 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
| 1966 | *) ac_try_echo=$ac_try;; | |
| 1967 | esac | |
| 1968 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
| 1969 | printf "%s\n" "$ac_try_echo"; } >&5 | |
| 1970 | (eval "$ac_try") 2>&5 | |
| 1971 | ac_status=$? | |
| 1972 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
| 1973 | test $ac_status = 0; }; } | |
| 1974 | then : | |
| 1975 | ac_retval=0 | |
| 1976 | else case e in #( | |
| 1977 | e) printf "%s\n" "$as_me: program exited with status $ac_status" >&5 | |
| 1978 | printf "%s\n" "$as_me: failed program was:" >&5 | |
| 1979 | sed 's/^/| /' conftest.$ac_ext >&5 | |
| 1980 | ||
| 1981 | ac_retval=$ac_status ;; | |
| 1982 | esac | |
| 1983 | fi | |
| 1984 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo | |
| 1985 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
| 1986 | as_fn_set_status $ac_retval | |
| 1987 | ||
| 1988 | } # ac_fn_c_try_run | |
| 1989 | ||
| 1990 | # ac_fn_c_try_cpp LINENO | |
| 1991 | # ---------------------- | |
| 1992 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. | |
| 1993 | ac_fn_c_try_cpp () | |
| 1994 | { | |
| 1995 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
| 1996 | if { { ac_try="$ac_cpp conftest.$ac_ext" | |
| 1997 | case "(($ac_try" in | |
| 1998 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
| 1999 | *) ac_try_echo=$ac_try;; | |
| 2000 | esac | |
| 2001 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
| 2002 | printf "%s\n" "$ac_try_echo"; } >&5 | |
| 2003 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err | |
| 2004 | ac_status=$? | |
| 2005 | if test -s conftest.err; then | |
| 2006 | grep -v '^ *+' conftest.err >conftest.er1 | |
| 2007 | cat conftest.er1 >&5 | |
| 2008 | mv -f conftest.er1 conftest.err | |
| 2009 | fi | |
| 2010 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
| 2011 | test $ac_status = 0; } > conftest.i && { | |
| 2012 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || | |
| 2013 | test ! -s conftest.err | |
| 2014 | } | |
| 2015 | then : | |
| 2016 | ac_retval=0 | |
| 2017 | else case e in #( | |
| 2018 | e) printf "%s\n" "$as_me: failed program was:" >&5 | |
| 2019 | sed 's/^/| /' conftest.$ac_ext >&5 | |
| 2020 | ||
| 2021 | ac_retval=1 ;; | |
| 2022 | esac | |
| 2023 | fi | |
| 2024 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
| 2025 | as_fn_set_status $ac_retval | |
| 2026 | ||
| 2027 | } # ac_fn_c_try_cpp | |
| 2028 | ||
| 2029 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES | |
| 2030 | # ------------------------------------------- | |
| 2031 | # Tests whether TYPE exists after having included INCLUDES, setting cache | |
| 2032 | # variable VAR accordingly. | |
| 2033 | ac_fn_c_check_type () | |
| 2034 | { | |
| 2035 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
| 2036 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 | |
| 2037 | printf %s "checking for $2... " >&6; } | |
| 2038 | if eval test \${$3+y} | |
| 2039 | then : | |
| 2040 | printf %s "(cached) " >&6 | |
| 2041 | else case e in #( | |
| 2042 | e) eval "$3=no" | |
| 2043 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 2044 | /* end confdefs.h. */ | |
| 2045 | $4 | |
| 2046 | int | |
| 2047 | main (void) | |
| 2048 | { | |
| 2049 | if (sizeof ($2)) | |
| 2050 | return 0; | |
| 2051 | ; | |
| 2052 | return 0; | |
| 2053 | } | |
| 2054 | _ACEOF | |
| 2055 | if ac_fn_c_try_compile "$LINENO" | |
| 2056 | then : | |
| 2057 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 2058 | /* end confdefs.h. */ | |
| 2059 | $4 | |
| 2060 | int | |
| 2061 | main (void) | |
| 2062 | { | |
| 2063 | if (sizeof (($2))) | |
| 2064 | return 0; | |
| 2065 | ; | |
| 2066 | return 0; | |
| 2067 | } | |
| 2068 | _ACEOF | |
| 2069 | if ac_fn_c_try_compile "$LINENO" | |
| 2070 | then : | |
| 2071 | ||
| 2072 | else case e in #( | |
| 2073 | e) eval "$3=yes" ;; | |
| 2074 | esac | |
| 2075 | fi | |
| 2076 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 2077 | fi | |
| 2078 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 2079 | esac | |
| 2080 | fi | |
| 2081 | eval ac_res=\$$3 | |
| 2082 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
| 2083 | printf "%s\n" "$ac_res" >&6; } | |
| 2084 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
| 2085 | ||
| 2086 | } # ac_fn_c_check_type | |
| 2087 | ||
| 2088 | # ac_fn_check_decl LINENO SYMBOL VAR INCLUDES EXTRA-OPTIONS FLAG-VAR | |
| 2089 | # ------------------------------------------------------------------ | |
| 2090 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR | |
| 2091 | # accordingly. Pass EXTRA-OPTIONS to the compiler, using FLAG-VAR. | |
| 2092 | ac_fn_check_decl () | |
| 2093 | { | |
| 2094 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
| 2095 | as_decl_name=`echo $2|sed 's/ *(.*//'` | |
| 2096 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 | |
| 2097 | printf %s "checking whether $as_decl_name is declared... " >&6; } | |
| 2098 | if eval test \${$3+y} | |
| 2099 | then : | |
| 2100 | printf %s "(cached) " >&6 | |
| 2101 | else case e in #( | |
| 2102 | e) as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` | |
| 2103 | eval ac_save_FLAGS=\$$6 | |
| 2104 | as_fn_append $6 " $5" | |
| 2105 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 2106 | /* end confdefs.h. */ | |
| 2107 | $4 | |
| 2108 | int | |
| 2109 | main (void) | |
| 2110 | { | |
| 2111 | #ifndef $as_decl_name | |
| 2112 | #ifdef __cplusplus | |
| 2113 | (void) $as_decl_use; | |
| 2114 | #else | |
| 2115 | (void) $as_decl_name; | |
| 2116 | #endif | |
| 2117 | #endif | |
| 2118 | ||
| 2119 | ; | |
| 2120 | return 0; | |
| 2121 | } | |
| 2122 | _ACEOF | |
| 2123 | if ac_fn_c_try_compile "$LINENO" | |
| 2124 | then : | |
| 2125 | eval "$3=yes" | |
| 2126 | else case e in #( | |
| 2127 | e) eval "$3=no" ;; | |
| 2128 | esac | |
| 2129 | fi | |
| 2130 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 2131 | eval $6=\$ac_save_FLAGS | |
| 2132 | ;; | |
| 2133 | esac | |
| 2134 | fi | |
| 2135 | eval ac_res=\$$3 | |
| 2136 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
| 2137 | printf "%s\n" "$ac_res" >&6; } | |
| 2138 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
| 2139 | ||
| 2140 | } # ac_fn_check_decl | |
| 2141 | ||
| 2142 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES | |
| 2143 | # -------------------------------------------- | |
| 2144 | # Tries to find the compile-time value of EXPR in a program that includes | |
| 2145 | # INCLUDES, setting VAR accordingly. Returns whether the value could be | |
| 2146 | # computed | |
| 2147 | ac_fn_c_compute_int () | |
| 2148 | { | |
| 2149 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
| 2150 | if test "$cross_compiling" = yes; then | |
| 2151 | # Depending upon the size, compute the lo and hi bounds. | |
| 2152 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 2153 | /* end confdefs.h. */ | |
| 2154 | $4 | |
| 2155 | int | |
| 2156 | main (void) | |
| 2157 | { | |
| 2158 | static int test_array [1 - 2 * !(($2) >= 0)]; | |
| 2159 | test_array [0] = 0; | |
| 2160 | return test_array [0]; | |
| 2161 | ||
| 2162 | ; | |
| 2163 | return 0; | |
| 2164 | } | |
| 2165 | _ACEOF | |
| 2166 | if ac_fn_c_try_compile "$LINENO" | |
| 2167 | then : | |
| 2168 | ac_lo=0 ac_mid=0 | |
| 2169 | while :; do | |
| 2170 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 2171 | /* end confdefs.h. */ | |
| 2172 | $4 | |
| 2173 | int | |
| 2174 | main (void) | |
| 2175 | { | |
| 2176 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
| 2177 | test_array [0] = 0; | |
| 2178 | return test_array [0]; | |
| 2179 | ||
| 2180 | ; | |
| 2181 | return 0; | |
| 2182 | } | |
| 2183 | _ACEOF | |
| 2184 | if ac_fn_c_try_compile "$LINENO" | |
| 2185 | then : | |
| 2186 | ac_hi=$ac_mid; break | |
| 2187 | else case e in #( | |
| 2188 | e) as_fn_arith $ac_mid + 1 && ac_lo=$as_val | |
| 2189 | if test $ac_lo -le $ac_mid; then | |
| 2190 | ac_lo= ac_hi= | |
| 2191 | break | |
| 2192 | fi | |
| 2193 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val ;; | |
| 2194 | esac | |
| 2195 | fi | |
| 2196 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 2197 | done | |
| 2198 | else case e in #( | |
| 2199 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 2200 | /* end confdefs.h. */ | |
| 2201 | $4 | |
| 2202 | int | |
| 2203 | main (void) | |
| 2204 | { | |
| 2205 | static int test_array [1 - 2 * !(($2) < 0)]; | |
| 2206 | test_array [0] = 0; | |
| 2207 | return test_array [0]; | |
| 2208 | ||
| 2209 | ; | |
| 2210 | return 0; | |
| 2211 | } | |
| 2212 | _ACEOF | |
| 2213 | if ac_fn_c_try_compile "$LINENO" | |
| 2214 | then : | |
| 2215 | ac_hi=-1 ac_mid=-1 | |
| 2216 | while :; do | |
| 2217 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 2218 | /* end confdefs.h. */ | |
| 2219 | $4 | |
| 2220 | int | |
| 2221 | main (void) | |
| 2222 | { | |
| 2223 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; | |
| 2224 | test_array [0] = 0; | |
| 2225 | return test_array [0]; | |
| 2226 | ||
| 2227 | ; | |
| 2228 | return 0; | |
| 2229 | } | |
| 2230 | _ACEOF | |
| 2231 | if ac_fn_c_try_compile "$LINENO" | |
| 2232 | then : | |
| 2233 | ac_lo=$ac_mid; break | |
| 2234 | else case e in #( | |
| 2235 | e) as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val | |
| 2236 | if test $ac_mid -le $ac_hi; then | |
| 2237 | ac_lo= ac_hi= | |
| 2238 | break | |
| 2239 | fi | |
| 2240 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val ;; | |
| 2241 | esac | |
| 2242 | fi | |
| 2243 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 2244 | done | |
| 2245 | else case e in #( | |
| 2246 | e) ac_lo= ac_hi= ;; | |
| 2247 | esac | |
| 2248 | fi | |
| 2249 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 2250 | esac | |
| 2251 | fi | |
| 2252 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 2253 | # Binary search between lo and hi bounds. | |
| 2254 | while test "x$ac_lo" != "x$ac_hi"; do | |
| 2255 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val | |
| 2256 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 2257 | /* end confdefs.h. */ | |
| 2258 | $4 | |
| 2259 | int | |
| 2260 | main (void) | |
| 2261 | { | |
| 2262 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; | |
| 2263 | test_array [0] = 0; | |
| 2264 | return test_array [0]; | |
| 2265 | ||
| 2266 | ; | |
| 2267 | return 0; | |
| 2268 | } | |
| 2269 | _ACEOF | |
| 2270 | if ac_fn_c_try_compile "$LINENO" | |
| 2271 | then : | |
| 2272 | ac_hi=$ac_mid | |
| 2273 | else case e in #( | |
| 2274 | e) as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val ;; | |
| 2275 | esac | |
| 2276 | fi | |
| 2277 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 2278 | done | |
| 2279 | case $ac_lo in #(( | |
| 2280 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; | |
| 2281 | '') ac_retval=1 ;; | |
| 2282 | esac | |
| 2283 | else | |
| 2284 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 2285 | /* end confdefs.h. */ | |
| 2286 | $4 | |
| 2287 | static long int longval (void) { return $2; } | |
| 2288 | static unsigned long int ulongval (void) { return $2; } | |
| 2289 | #include <stdio.h> | |
| 2290 | #include <stdlib.h> | |
| 2291 | int | |
| 2292 | main (void) | |
| 2293 | { | |
| 2294 | ||
| 2295 | FILE *f = fopen ("conftest.val", "w"); | |
| 2296 | if (! f) | |
| 2297 | return 1; | |
| 2298 | if (($2) < 0) | |
| 2299 | { | |
| 2300 | long int i = longval (); | |
| 2301 | if (i != ($2)) | |
| 2302 | return 1; | |
| 2303 | fprintf (f, "%ld", i); | |
| 2304 | } | |
| 2305 | else | |
| 2306 | { | |
| 2307 | unsigned long int i = ulongval (); | |
| 2308 | if (i != ($2)) | |
| 2309 | return 1; | |
| 2310 | fprintf (f, "%lu", i); | |
| 2311 | } | |
| 2312 | /* Do not output a trailing newline, as this causes \r\n confusion | |
| 2313 | on some platforms. */ | |
| 2314 | return ferror (f) || fclose (f) != 0; | |
| 2315 | ||
| 2316 | ; | |
| 2317 | return 0; | |
| 2318 | } | |
| 2319 | _ACEOF | |
| 2320 | if ac_fn_c_try_run "$LINENO" | |
| 2321 | then : | |
| 2322 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 | |
| 2323 | else case e in #( | |
| 2324 | e) ac_retval=1 ;; | |
| 2325 | esac | |
| 2326 | fi | |
| 2327 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 2328 | conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 2329 | rm -f conftest.val | |
| 2330 | ||
| 2331 | fi | |
| 2332 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
| 2333 | as_fn_set_status $ac_retval | |
| 2334 | ||
| 2335 | } # ac_fn_c_compute_int | |
| 2336 | ||
| 2337 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES | |
| 2338 | # ---------------------------------------------------- | |
| 2339 | # Tries to find if the field MEMBER exists in type AGGR, after including | |
| 2340 | # INCLUDES, setting cache variable VAR accordingly. | |
| 2341 | ac_fn_c_check_member () | |
| 2342 | { | |
| 2343 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
| 2344 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 | |
| 2345 | printf %s "checking for $2.$3... " >&6; } | |
| 2346 | if eval test \${$4+y} | |
| 2347 | then : | |
| 2348 | printf %s "(cached) " >&6 | |
| 2349 | else case e in #( | |
| 2350 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 2351 | /* end confdefs.h. */ | |
| 2352 | $5 | |
| 2353 | int | |
| 2354 | main (void) | |
| 2355 | { | |
| 2356 | static $2 ac_aggr; | |
| 2357 | if (ac_aggr.$3) | |
| 2358 | return 0; | |
| 2359 | ; | |
| 2360 | return 0; | |
| 2361 | } | |
| 2362 | _ACEOF | |
| 2363 | if ac_fn_c_try_compile "$LINENO" | |
| 2364 | then : | |
| 2365 | eval "$4=yes" | |
| 2366 | else case e in #( | |
| 2367 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 2368 | /* end confdefs.h. */ | |
| 2369 | $5 | |
| 2370 | int | |
| 2371 | main (void) | |
| 2372 | { | |
| 2373 | static $2 ac_aggr; | |
| 2374 | if (sizeof ac_aggr.$3) | |
| 2375 | return 0; | |
| 2376 | ; | |
| 2377 | return 0; | |
| 2378 | } | |
| 2379 | _ACEOF | |
| 2380 | if ac_fn_c_try_compile "$LINENO" | |
| 2381 | then : | |
| 2382 | eval "$4=yes" | |
| 2383 | else case e in #( | |
| 2384 | e) eval "$4=no" ;; | |
| 2385 | esac | |
| 2386 | fi | |
| 2387 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 2388 | esac | |
| 2389 | fi | |
| 2390 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 2391 | esac | |
| 2392 | fi | |
| 2393 | eval ac_res=\$$4 | |
| 2394 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
| 2395 | printf "%s\n" "$ac_res" >&6; } | |
| 2396 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno | |
| 2397 | ||
| 2398 | } # ac_fn_c_check_member | |
| 2399 | ac_configure_args_raw= | |
| 2400 | for ac_arg | |
| 2401 | do | |
| 2402 | case $ac_arg in | |
| 2403 | *\'*) | |
| 2404 | ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
| 2405 | esac | |
| 2406 | as_fn_append ac_configure_args_raw " '$ac_arg'" | |
| 2407 | done | |
| 2408 | ||
| 2409 | case $ac_configure_args_raw in | |
| 2410 | *$as_nl*) | |
| 2411 | ac_safe_unquote= ;; | |
| 2412 | *) | |
| 2413 | ac_unsafe_z='|&;<>()$`\\"*?[ '' ' # This string ends in space, tab. | |
| 2414 | ac_unsafe_a="$ac_unsafe_z#~" | |
| 2415 | ac_safe_unquote="s/ '\\([^$ac_unsafe_a][^$ac_unsafe_z]*\\)'/ \\1/g" | |
| 2416 | ac_configure_args_raw=` printf "%s\n" "$ac_configure_args_raw" | sed "$ac_safe_unquote"`;; | |
| 2417 | esac | |
| 2418 | ||
| 2419 | cat >config.log <<_ACEOF | |
| 2420 | This file contains any messages produced by compilers while | |
| 2421 | running configure, to aid debugging if configure makes a mistake. | |
| 2422 | ||
| 2423 | It was created by bash $as_me 5.3-release, which was | |
| 2424 | generated by GNU Autoconf 2.72. Invocation command line was | |
| 2425 | ||
| 2426 | $ $0$ac_configure_args_raw | |
| 2427 | ||
| 2428 | _ACEOF | |
| 2429 | exec 5>>config.log | |
| 2430 | { | |
| 2431 | cat <<_ASUNAME | |
| 2432 | ## --------- ## | |
| 2433 | ## Platform. ## | |
| 2434 | ## --------- ## | |
| 2435 | ||
| 2436 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` | |
| 2437 | uname -m = `(uname -m) 2>/dev/null || echo unknown` | |
| 2438 | uname -r = `(uname -r) 2>/dev/null || echo unknown` | |
| 2439 | uname -s = `(uname -s) 2>/dev/null || echo unknown` | |
| 2440 | uname -v = `(uname -v) 2>/dev/null || echo unknown` | |
| 2441 | ||
| 2442 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` | |
| 2443 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` | |
| 2444 | ||
| 2445 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` | |
| 2446 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` | |
| 2447 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` | |
| 2448 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` | |
| 2449 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` | |
| 2450 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` | |
| 2451 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` | |
| 2452 | ||
| 2453 | _ASUNAME | |
| 2454 | ||
| 2455 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 2456 | for as_dir in $PATH | |
| 2457 | do | |
| 2458 | IFS=$as_save_IFS | |
| 2459 | case $as_dir in #((( | |
| 2460 | '') as_dir=./ ;; | |
| 2461 | */) ;; | |
| 2462 | *) as_dir=$as_dir/ ;; | |
| 2463 | esac | |
| 2464 | printf "%s\n" "PATH: $as_dir" | |
| 2465 | done | |
| 2466 | IFS=$as_save_IFS | |
| 2467 | ||
| 2468 | } >&5 | |
| 2469 | ||
| 2470 | cat >&5 <<_ACEOF | |
| 2471 | ||
| 2472 | ||
| 2473 | ## ----------- ## | |
| 2474 | ## Core tests. ## | |
| 2475 | ## ----------- ## | |
| 2476 | ||
| 2477 | _ACEOF | |
| 2478 | ||
| 2479 | ||
| 2480 | # Keep a trace of the command line. | |
| 2481 | # Strip out --no-create and --no-recursion so they do not pile up. | |
| 2482 | # Strip out --silent because we don't want to record it for future runs. | |
| 2483 | # Also quote any args containing shell meta-characters. | |
| 2484 | # Make two passes to allow for proper duplicate-argument suppression. | |
| 2485 | ac_configure_args= | |
| 2486 | ac_configure_args0= | |
| 2487 | ac_configure_args1= | |
| 2488 | ac_must_keep_next=false | |
| 2489 | for ac_pass in 1 2 | |
| 2490 | do | |
| 2491 | for ac_arg | |
| 2492 | do | |
| 2493 | case $ac_arg in | |
| 2494 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; | |
| 2495 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
| 2496 | | -silent | --silent | --silen | --sile | --sil) | |
| 2497 | continue ;; | |
| 2498 | *\'*) | |
| 2499 | ac_arg=`printf "%s\n" "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
| 2500 | esac | |
| 2501 | case $ac_pass in | |
| 2502 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; | |
| 2503 | 2) | |
| 2504 | as_fn_append ac_configure_args1 " '$ac_arg'" | |
| 2505 | if test $ac_must_keep_next = true; then | |
| 2506 | ac_must_keep_next=false # Got value, back to normal. | |
| 2507 | else | |
| 2508 | case $ac_arg in | |
| 2509 | *=* | --config-cache | -C | -disable-* | --disable-* \ | |
| 2510 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | |
| 2511 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | |
| 2512 | | -with-* | --with-* | -without-* | --without-* | --x) | |
| 2513 | case "$ac_configure_args0 " in | |
| 2514 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; | |
| 2515 | esac | |
| 2516 | ;; | |
| 2517 | -* ) ac_must_keep_next=true ;; | |
| 2518 | esac | |
| 2519 | fi | |
| 2520 | as_fn_append ac_configure_args " '$ac_arg'" | |
| 2521 | ;; | |
| 2522 | esac | |
| 2523 | done | |
| 2524 | done | |
| 2525 | { ac_configure_args0=; unset ac_configure_args0;} | |
| 2526 | { ac_configure_args1=; unset ac_configure_args1;} | |
| 2527 | ||
| 2528 | # When interrupted or exit'd, cleanup temporary files, and complete | |
| 2529 | # config.log. We remove comments because anyway the quotes in there | |
| 2530 | # would cause problems or look ugly. | |
| 2531 | # WARNING: Use '\'' to represent an apostrophe within the trap. | |
| 2532 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. | |
| 2533 | trap 'exit_status=$? | |
| 2534 | # Sanitize IFS. | |
| 2535 | IFS=" "" $as_nl" | |
| 2536 | # Save into config.log some information that might help in debugging. | |
| 2537 | { | |
| 2538 | echo | |
| 2539 | ||
| 2540 | printf "%s\n" "## ---------------- ## | |
| 2541 | ## Cache variables. ## | |
| 2542 | ## ---------------- ##" | |
| 2543 | echo | |
| 2544 | # The following way of writing the cache mishandles newlines in values, | |
| 2545 | ( | |
| 2546 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do | |
| 2547 | eval ac_val=\$$ac_var | |
| 2548 | case $ac_val in #( | |
| 2549 | *${as_nl}*) | |
| 2550 | case $ac_var in #( | |
| 2551 | *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
| 2552 | printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
| 2553 | esac | |
| 2554 | case $ac_var in #( | |
| 2555 | _ | IFS | as_nl) ;; #( | |
| 2556 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
| 2557 | *) { eval $ac_var=; unset $ac_var;} ;; | |
| 2558 | esac ;; | |
| 2559 | esac | |
| 2560 | done | |
| 2561 | (set) 2>&1 | | |
| 2562 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( | |
| 2563 | *${as_nl}ac_space=\ *) | |
| 2564 | sed -n \ | |
| 2565 | "s/'\''/'\''\\\\'\'''\''/g; | |
| 2566 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" | |
| 2567 | ;; #( | |
| 2568 | *) | |
| 2569 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
| 2570 | ;; | |
| 2571 | esac | | |
| 2572 | sort | |
| 2573 | ) | |
| 2574 | echo | |
| 2575 | ||
| 2576 | printf "%s\n" "## ----------------- ## | |
| 2577 | ## Output variables. ## | |
| 2578 | ## ----------------- ##" | |
| 2579 | echo | |
| 2580 | for ac_var in $ac_subst_vars | |
| 2581 | do | |
| 2582 | eval ac_val=\$$ac_var | |
| 2583 | case $ac_val in | |
| 2584 | *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
| 2585 | esac | |
| 2586 | printf "%s\n" "$ac_var='\''$ac_val'\''" | |
| 2587 | done | sort | |
| 2588 | echo | |
| 2589 | ||
| 2590 | if test -n "$ac_subst_files"; then | |
| 2591 | printf "%s\n" "## ------------------- ## | |
| 2592 | ## File substitutions. ## | |
| 2593 | ## ------------------- ##" | |
| 2594 | echo | |
| 2595 | for ac_var in $ac_subst_files | |
| 2596 | do | |
| 2597 | eval ac_val=\$$ac_var | |
| 2598 | case $ac_val in | |
| 2599 | *\'\''*) ac_val=`printf "%s\n" "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; | |
| 2600 | esac | |
| 2601 | printf "%s\n" "$ac_var='\''$ac_val'\''" | |
| 2602 | done | sort | |
| 2603 | echo | |
| 2604 | fi | |
| 2605 | ||
| 2606 | if test -s confdefs.h; then | |
| 2607 | printf "%s\n" "## ----------- ## | |
| 2608 | ## confdefs.h. ## | |
| 2609 | ## ----------- ##" | |
| 2610 | echo | |
| 2611 | cat confdefs.h | |
| 2612 | echo | |
| 2613 | fi | |
| 2614 | test "$ac_signal" != 0 && | |
| 2615 | printf "%s\n" "$as_me: caught signal $ac_signal" | |
| 2616 | printf "%s\n" "$as_me: exit $exit_status" | |
| 2617 | } >&5 | |
| 2618 | rm -f core *.core core.conftest.* && | |
| 2619 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && | |
| 2620 | exit $exit_status | |
| 2621 | ' 0 | |
| 2622 | for ac_signal in 1 2 13 15; do | |
| 2623 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal | |
| 2624 | done | |
| 2625 | ac_signal=0 | |
| 2626 | ||
| 2627 | # confdefs.h avoids OS command line length limits that DEFS can exceed. | |
| 2628 | rm -f -r conftest* confdefs.h | |
| 2629 | ||
| 2630 | printf "%s\n" "/* confdefs.h */" > confdefs.h | |
| 2631 | ||
| 2632 | # Predefined preprocessor variables. | |
| 2633 | ||
| 2634 | printf "%s\n" "#define PACKAGE_NAME \"$PACKAGE_NAME\"" >>confdefs.h | |
| 2635 | ||
| 2636 | printf "%s\n" "#define PACKAGE_TARNAME \"$PACKAGE_TARNAME\"" >>confdefs.h | |
| 2637 | ||
| 2638 | printf "%s\n" "#define PACKAGE_VERSION \"$PACKAGE_VERSION\"" >>confdefs.h | |
| 2639 | ||
| 2640 | printf "%s\n" "#define PACKAGE_STRING \"$PACKAGE_STRING\"" >>confdefs.h | |
| 2641 | ||
| 2642 | printf "%s\n" "#define PACKAGE_BUGREPORT \"$PACKAGE_BUGREPORT\"" >>confdefs.h | |
| 2643 | ||
| 2644 | printf "%s\n" "#define PACKAGE_URL \"$PACKAGE_URL\"" >>confdefs.h | |
| 2645 | ||
| 2646 | ||
| 2647 | # Let the site file select an alternate cache file if it wants to. | |
| 2648 | # Prefer an explicitly selected file to automatically selected ones. | |
| 2649 | if test -n "$CONFIG_SITE"; then | |
| 2650 | ac_site_files="$CONFIG_SITE" | |
| 2651 | elif test "x$prefix" != xNONE; then | |
| 2652 | ac_site_files="$prefix/share/config.site $prefix/etc/config.site" | |
| 2653 | else | |
| 2654 | ac_site_files="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site" | |
| 2655 | fi | |
| 2656 | ||
| 2657 | for ac_site_file in $ac_site_files | |
| 2658 | do | |
| 2659 | case $ac_site_file in #( | |
| 2660 | */*) : | |
| 2661 | ;; #( | |
| 2662 | *) : | |
| 2663 | ac_site_file=./$ac_site_file ;; | |
| 2664 | esac | |
| 2665 | if test -f "$ac_site_file" && test -r "$ac_site_file"; then | |
| 2666 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 | |
| 2667 | printf "%s\n" "$as_me: loading site script $ac_site_file" >&6;} | |
| 2668 | sed 's/^/| /' "$ac_site_file" >&5 | |
| 2669 | . "$ac_site_file" \ | |
| 2670 | || { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 2671 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 2672 | as_fn_error $? "failed to load site script $ac_site_file | |
| 2673 | See 'config.log' for more details" "$LINENO" 5; } | |
| 2674 | fi | |
| 2675 | done | |
| 2676 | ||
| 2677 | if test -r "$cache_file"; then | |
| 2678 | # Some versions of bash will fail to source /dev/null (special files | |
| 2679 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. | |
| 2680 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then | |
| 2681 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 | |
| 2682 | printf "%s\n" "$as_me: loading cache $cache_file" >&6;} | |
| 2683 | case $cache_file in | |
| 2684 | [\\/]* | ?:[\\/]* ) . "$cache_file";; | |
| 2685 | *) . "./$cache_file";; | |
| 2686 | esac | |
| 2687 | fi | |
| 2688 | else | |
| 2689 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 | |
| 2690 | printf "%s\n" "$as_me: creating cache $cache_file" >&6;} | |
| 2691 | >$cache_file | |
| 2692 | fi | |
| 2693 | ||
| 2694 | # Test code for whether the C compiler supports C89 (global declarations) | |
| 2695 | ac_c_conftest_c89_globals=' | |
| 2696 | /* Does the compiler advertise C89 conformance? | |
| 2697 | Do not test the value of __STDC__, because some compilers set it to 0 | |
| 2698 | while being otherwise adequately conformant. */ | |
| 2699 | #if !defined __STDC__ | |
| 2700 | # error "Compiler does not advertise C89 conformance" | |
| 2701 | #endif | |
| 2702 | ||
| 2703 | #include <stddef.h> | |
| 2704 | #include <stdarg.h> | |
| 2705 | struct stat; | |
| 2706 | /* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */ | |
| 2707 | struct buf { int x; }; | |
| 2708 | struct buf * (*rcsopen) (struct buf *, struct stat *, int); | |
| 2709 | static char *e (char **p, int i) | |
| 2710 | { | |
| 2711 | return p[i]; | |
| 2712 | } | |
| 2713 | static char *f (char * (*g) (char **, int), char **p, ...) | |
| 2714 | { | |
| 2715 | char *s; | |
| 2716 | va_list v; | |
| 2717 | va_start (v,p); | |
| 2718 | s = g (p, va_arg (v,int)); | |
| 2719 | va_end (v); | |
| 2720 | return s; | |
| 2721 | } | |
| 2722 | ||
| 2723 | /* C89 style stringification. */ | |
| 2724 | #define noexpand_stringify(a) #a | |
| 2725 | const char *stringified = noexpand_stringify(arbitrary+token=sequence); | |
| 2726 | ||
| 2727 | /* C89 style token pasting. Exercises some of the corner cases that | |
| 2728 | e.g. old MSVC gets wrong, but not very hard. */ | |
| 2729 | #define noexpand_concat(a,b) a##b | |
| 2730 | #define expand_concat(a,b) noexpand_concat(a,b) | |
| 2731 | extern int vA; | |
| 2732 | extern int vbee; | |
| 2733 | #define aye A | |
| 2734 | #define bee B | |
| 2735 | int *pvA = &expand_concat(v,aye); | |
| 2736 | int *pvbee = &noexpand_concat(v,bee); | |
| 2737 | ||
| 2738 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has | |
| 2739 | function prototypes and stuff, but not \xHH hex character constants. | |
| 2740 | These do not provoke an error unfortunately, instead are silently treated | |
| 2741 | as an "x". The following induces an error, until -std is added to get | |
| 2742 | proper ANSI mode. Curiously \x00 != x always comes out true, for an | |
| 2743 | array size at least. It is necessary to write \x00 == 0 to get something | |
| 2744 | that is true only with -std. */ | |
| 2745 | int osf4_cc_array ['\''\x00'\'' == 0 ? 1 : -1]; | |
| 2746 | ||
| 2747 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters | |
| 2748 | inside strings and character constants. */ | |
| 2749 | #define FOO(x) '\''x'\'' | |
| 2750 | int xlc6_cc_array[FOO(a) == '\''x'\'' ? 1 : -1]; | |
| 2751 | ||
| 2752 | int test (int i, double x); | |
| 2753 | struct s1 {int (*f) (int a);}; | |
| 2754 | struct s2 {int (*f) (double a);}; | |
| 2755 | int pairnames (int, char **, int *(*)(struct buf *, struct stat *, int), | |
| 2756 | int, int);' | |
| 2757 | ||
| 2758 | # Test code for whether the C compiler supports C89 (body of main). | |
| 2759 | ac_c_conftest_c89_main=' | |
| 2760 | ok |= (argc == 0 || f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]); | |
| 2761 | ' | |
| 2762 | ||
| 2763 | # Test code for whether the C compiler supports C99 (global declarations) | |
| 2764 | ac_c_conftest_c99_globals=' | |
| 2765 | /* Does the compiler advertise C99 conformance? */ | |
| 2766 | #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 199901L | |
| 2767 | # error "Compiler does not advertise C99 conformance" | |
| 2768 | #endif | |
| 2769 | ||
| 2770 | // See if C++-style comments work. | |
| 2771 | ||
| 2772 | #include <stdbool.h> | |
| 2773 | extern int puts (const char *); | |
| 2774 | extern int printf (const char *, ...); | |
| 2775 | extern int dprintf (int, const char *, ...); | |
| 2776 | extern void *malloc (size_t); | |
| 2777 | extern void free (void *); | |
| 2778 | ||
| 2779 | // Check varargs macros. These examples are taken from C99 6.10.3.5. | |
| 2780 | // dprintf is used instead of fprintf to avoid needing to declare | |
| 2781 | // FILE and stderr. | |
| 2782 | #define debug(...) dprintf (2, __VA_ARGS__) | |
| 2783 | #define showlist(...) puts (#__VA_ARGS__) | |
| 2784 | #define report(test,...) ((test) ? puts (#test) : printf (__VA_ARGS__)) | |
| 2785 | static void | |
| 2786 | test_varargs_macros (void) | |
| 2787 | { | |
| 2788 | int x = 1234; | |
| 2789 | int y = 5678; | |
| 2790 | debug ("Flag"); | |
| 2791 | debug ("X = %d\n", x); | |
| 2792 | showlist (The first, second, and third items.); | |
| 2793 | report (x>y, "x is %d but y is %d", x, y); | |
| 2794 | } | |
| 2795 | ||
| 2796 | // Check long long types. | |
| 2797 | #define BIG64 18446744073709551615ull | |
| 2798 | #define BIG32 4294967295ul | |
| 2799 | #define BIG_OK (BIG64 / BIG32 == 4294967297ull && BIG64 % BIG32 == 0) | |
| 2800 | #if !BIG_OK | |
| 2801 | #error "your preprocessor is broken" | |
| 2802 | #endif | |
| 2803 | #if BIG_OK | |
| 2804 | #else | |
| 2805 | #error "your preprocessor is broken" | |
| 2806 | #endif | |
| 2807 | static long long int bignum = -9223372036854775807LL; | |
| 2808 | static unsigned long long int ubignum = BIG64; | |
| 2809 | ||
| 2810 | struct incomplete_array | |
| 2811 | { | |
| 2812 | int datasize; | |
| 2813 | double data[]; | |
| 2814 | }; | |
| 2815 | ||
| 2816 | struct named_init { | |
| 2817 | int number; | |
| 2818 | const wchar_t *name; | |
| 2819 | double average; | |
| 2820 | }; | |
| 2821 | ||
| 2822 | typedef const char *ccp; | |
| 2823 | ||
| 2824 | static inline int | |
| 2825 | test_restrict (ccp restrict text) | |
| 2826 | { | |
| 2827 | // Iterate through items via the restricted pointer. | |
| 2828 | // Also check for declarations in for loops. | |
| 2829 | for (unsigned int i = 0; *(text+i) != '\''\0'\''; ++i) | |
| 2830 | continue; | |
| 2831 | return 0; | |
| 2832 | } | |
| 2833 | ||
| 2834 | // Check varargs and va_copy. | |
| 2835 | static bool | |
| 2836 | test_varargs (const char *format, ...) | |
| 2837 | { | |
| 2838 | va_list args; | |
| 2839 | va_start (args, format); | |
| 2840 | va_list args_copy; | |
| 2841 | va_copy (args_copy, args); | |
| 2842 | ||
| 2843 | const char *str = ""; | |
| 2844 | int number = 0; | |
| 2845 | float fnumber = 0; | |
| 2846 | ||
| 2847 | while (*format) | |
| 2848 | { | |
| 2849 | switch (*format++) | |
| 2850 | { | |
| 2851 | case '\''s'\'': // string | |
| 2852 | str = va_arg (args_copy, const char *); | |
| 2853 | break; | |
| 2854 | case '\''d'\'': // int | |
| 2855 | number = va_arg (args_copy, int); | |
| 2856 | break; | |
| 2857 | case '\''f'\'': // float | |
| 2858 | fnumber = va_arg (args_copy, double); | |
| 2859 | break; | |
| 2860 | default: | |
| 2861 | break; | |
| 2862 | } | |
| 2863 | } | |
| 2864 | va_end (args_copy); | |
| 2865 | va_end (args); | |
| 2866 | ||
| 2867 | return *str && number && fnumber; | |
| 2868 | } | |
| 2869 | ' | |
| 2870 | ||
| 2871 | # Test code for whether the C compiler supports C99 (body of main). | |
| 2872 | ac_c_conftest_c99_main=' | |
| 2873 | // Check bool. | |
| 2874 | _Bool success = false; | |
| 2875 | success |= (argc != 0); | |
| 2876 | ||
| 2877 | // Check restrict. | |
| 2878 | if (test_restrict ("String literal") == 0) | |
| 2879 | success = true; | |
| 2880 | char *restrict newvar = "Another string"; | |
| 2881 | ||
| 2882 | // Check varargs. | |
| 2883 | success &= test_varargs ("s, d'\'' f .", "string", 65, 34.234); | |
| 2884 | test_varargs_macros (); | |
| 2885 | ||
| 2886 | // Check flexible array members. | |
| 2887 | struct incomplete_array *ia = | |
| 2888 | malloc (sizeof (struct incomplete_array) + (sizeof (double) * 10)); | |
| 2889 | ia->datasize = 10; | |
| 2890 | for (int i = 0; i < ia->datasize; ++i) | |
| 2891 | ia->data[i] = i * 1.234; | |
| 2892 | // Work around memory leak warnings. | |
| 2893 | free (ia); | |
| 2894 | ||
| 2895 | // Check named initializers. | |
| 2896 | struct named_init ni = { | |
| 2897 | .number = 34, | |
| 2898 | .name = L"Test wide string", | |
| 2899 | .average = 543.34343, | |
| 2900 | }; | |
| 2901 | ||
| 2902 | ni.number = 58; | |
| 2903 | ||
| 2904 | int dynamic_array[ni.number]; | |
| 2905 | dynamic_array[0] = argv[0][0]; | |
| 2906 | dynamic_array[ni.number - 1] = 543; | |
| 2907 | ||
| 2908 | // work around unused variable warnings | |
| 2909 | ok |= (!success || bignum == 0LL || ubignum == 0uLL || newvar[0] == '\''x'\'' | |
| 2910 | || dynamic_array[ni.number - 1] != 543); | |
| 2911 | ' | |
| 2912 | ||
| 2913 | # Test code for whether the C compiler supports C11 (global declarations) | |
| 2914 | ac_c_conftest_c11_globals=' | |
| 2915 | /* Does the compiler advertise C11 conformance? */ | |
| 2916 | #if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112L | |
| 2917 | # error "Compiler does not advertise C11 conformance" | |
| 2918 | #endif | |
| 2919 | ||
| 2920 | // Check _Alignas. | |
| 2921 | char _Alignas (double) aligned_as_double; | |
| 2922 | char _Alignas (0) no_special_alignment; | |
| 2923 | extern char aligned_as_int; | |
| 2924 | char _Alignas (0) _Alignas (int) aligned_as_int; | |
| 2925 | ||
| 2926 | // Check _Alignof. | |
| 2927 | enum | |
| 2928 | { | |
| 2929 | int_alignment = _Alignof (int), | |
| 2930 | int_array_alignment = _Alignof (int[100]), | |
| 2931 | char_alignment = _Alignof (char) | |
| 2932 | }; | |
| 2933 | _Static_assert (0 < -_Alignof (int), "_Alignof is signed"); | |
| 2934 | ||
| 2935 | // Check _Noreturn. | |
| 2936 | int _Noreturn does_not_return (void) { for (;;) continue; } | |
| 2937 | ||
| 2938 | // Check _Static_assert. | |
| 2939 | struct test_static_assert | |
| 2940 | { | |
| 2941 | int x; | |
| 2942 | _Static_assert (sizeof (int) <= sizeof (long int), | |
| 2943 | "_Static_assert does not work in struct"); | |
| 2944 | long int y; | |
| 2945 | }; | |
| 2946 | ||
| 2947 | // Check UTF-8 literals. | |
| 2948 | #define u8 syntax error! | |
| 2949 | char const utf8_literal[] = u8"happens to be ASCII" "another string"; | |
| 2950 | ||
| 2951 | // Check duplicate typedefs. | |
| 2952 | typedef long *long_ptr; | |
| 2953 | typedef long int *long_ptr; | |
| 2954 | typedef long_ptr long_ptr; | |
| 2955 | ||
| 2956 | // Anonymous structures and unions -- taken from C11 6.7.2.1 Example 1. | |
| 2957 | struct anonymous | |
| 2958 | { | |
| 2959 | union { | |
| 2960 | struct { int i; int j; }; | |
| 2961 | struct { int k; long int l; } w; | |
| 2962 | }; | |
| 2963 | int m; | |
| 2964 | } v1; | |
| 2965 | ' | |
| 2966 | ||
| 2967 | # Test code for whether the C compiler supports C11 (body of main). | |
| 2968 | ac_c_conftest_c11_main=' | |
| 2969 | _Static_assert ((offsetof (struct anonymous, i) | |
| 2970 | == offsetof (struct anonymous, w.k)), | |
| 2971 | "Anonymous union alignment botch"); | |
| 2972 | v1.i = 2; | |
| 2973 | v1.w.k = 5; | |
| 2974 | ok |= v1.i != 5; | |
| 2975 | ' | |
| 2976 | ||
| 2977 | # Test code for whether the C compiler supports C11 (complete). | |
| 2978 | ac_c_conftest_c11_program="${ac_c_conftest_c89_globals} | |
| 2979 | ${ac_c_conftest_c99_globals} | |
| 2980 | ${ac_c_conftest_c11_globals} | |
| 2981 | ||
| 2982 | int | |
| 2983 | main (int argc, char **argv) | |
| 2984 | { | |
| 2985 | int ok = 0; | |
| 2986 | ${ac_c_conftest_c89_main} | |
| 2987 | ${ac_c_conftest_c99_main} | |
| 2988 | ${ac_c_conftest_c11_main} | |
| 2989 | return ok; | |
| 2990 | } | |
| 2991 | " | |
| 2992 | ||
| 2993 | # Test code for whether the C compiler supports C99 (complete). | |
| 2994 | ac_c_conftest_c99_program="${ac_c_conftest_c89_globals} | |
| 2995 | ${ac_c_conftest_c99_globals} | |
| 2996 | ||
| 2997 | int | |
| 2998 | main (int argc, char **argv) | |
| 2999 | { | |
| 3000 | int ok = 0; | |
| 3001 | ${ac_c_conftest_c89_main} | |
| 3002 | ${ac_c_conftest_c99_main} | |
| 3003 | return ok; | |
| 3004 | } | |
| 3005 | " | |
| 3006 | ||
| 3007 | # Test code for whether the C compiler supports C89 (complete). | |
| 3008 | ac_c_conftest_c89_program="${ac_c_conftest_c89_globals} | |
| 3009 | ||
| 3010 | int | |
| 3011 | main (int argc, char **argv) | |
| 3012 | { | |
| 3013 | int ok = 0; | |
| 3014 | ${ac_c_conftest_c89_main} | |
| 3015 | return ok; | |
| 3016 | } | |
| 3017 | " | |
| 3018 | ||
| 3019 | as_fn_append ac_header_c_list " stdio.h stdio_h HAVE_STDIO_H" | |
| 3020 | as_fn_append ac_header_c_list " stdlib.h stdlib_h HAVE_STDLIB_H" | |
| 3021 | as_fn_append ac_header_c_list " string.h string_h HAVE_STRING_H" | |
| 3022 | as_fn_append ac_header_c_list " inttypes.h inttypes_h HAVE_INTTYPES_H" | |
| 3023 | as_fn_append ac_header_c_list " stdint.h stdint_h HAVE_STDINT_H" | |
| 3024 | as_fn_append ac_header_c_list " strings.h strings_h HAVE_STRINGS_H" | |
| 3025 | as_fn_append ac_header_c_list " sys/stat.h sys_stat_h HAVE_SYS_STAT_H" | |
| 3026 | as_fn_append ac_header_c_list " sys/types.h sys_types_h HAVE_SYS_TYPES_H" | |
| 3027 | as_fn_append ac_header_c_list " unistd.h unistd_h HAVE_UNISTD_H" | |
| 3028 | as_fn_append ac_header_c_list " wchar.h wchar_h HAVE_WCHAR_H" | |
| 3029 | as_fn_append ac_header_c_list " minix/config.h minix_config_h HAVE_MINIX_CONFIG_H" | |
| 3030 | as_fn_append ac_header_c_list " stdbool.h stdbool_h HAVE_STDBOOL_H" | |
| 3031 | gt_needs="$gt_needs need-ngettext" | |
| 3032 | as_fn_append ac_header_c_list " sys/param.h sys_param_h HAVE_SYS_PARAM_H" | |
| 3033 | as_fn_append ac_func_c_list " getpagesize HAVE_GETPAGESIZE" | |
| 3034 | as_fn_append ac_header_c_list " threads.h threads_h HAVE_THREADS_H" | |
| 3035 | as_fn_append ac_func_c_list " symlink HAVE_SYMLINK" | |
| 3036 | as_fn_append ac_func_c_list " uselocale HAVE_USELOCALE" | |
| 3037 | as_fn_append ac_header_c_list " xlocale.h xlocale_h HAVE_XLOCALE_H" | |
| 3038 | as_fn_append ac_func_c_list " vprintf HAVE_VPRINTF" | |
| 3039 | as_fn_append ac_header_c_list " sys/time.h sys_time_h HAVE_SYS_TIME_H" | |
| 3040 | as_fn_append ac_func_c_list " alarm HAVE_ALARM" | |
| 3041 | as_fn_append ac_func_c_list " fpurge HAVE_FPURGE" | |
| 3042 | as_fn_append ac_func_c_list " __fpurge HAVE___FPURGE" | |
| 3043 | as_fn_append ac_func_c_list " snprintf HAVE_SNPRINTF" | |
| 3044 | as_fn_append ac_func_c_list " vsnprintf HAVE_VSNPRINTF" | |
| 3045 | ||
| 3046 | # Auxiliary files required by this configure script. | |
| 3047 | ac_aux_files="config.rpath install-sh config.guess config.sub" | |
| 3048 | ||
| 3049 | # Locations in which to look for auxiliary files. | |
| 3050 | ac_aux_dir_candidates="${srcdir}/./support" | |
| 3051 | ||
| 3052 | # Search for a directory containing all of the required auxiliary files, | |
| 3053 | # $ac_aux_files, from the $PATH-style list $ac_aux_dir_candidates. | |
| 3054 | # If we don't find one directory that contains all the files we need, | |
| 3055 | # we report the set of missing files from the *first* directory in | |
| 3056 | # $ac_aux_dir_candidates and give up. | |
| 3057 | ac_missing_aux_files="" | |
| 3058 | ac_first_candidate=: | |
| 3059 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: looking for aux files: $ac_aux_files" >&5 | |
| 3060 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 3061 | as_found=false | |
| 3062 | for as_dir in $ac_aux_dir_candidates | |
| 3063 | do | |
| 3064 | IFS=$as_save_IFS | |
| 3065 | case $as_dir in #((( | |
| 3066 | '') as_dir=./ ;; | |
| 3067 | */) ;; | |
| 3068 | *) as_dir=$as_dir/ ;; | |
| 3069 | esac | |
| 3070 | as_found=: | |
| 3071 | ||
| 3072 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: trying $as_dir" >&5 | |
| 3073 | ac_aux_dir_found=yes | |
| 3074 | ac_install_sh= | |
| 3075 | for ac_aux in $ac_aux_files | |
| 3076 | do | |
| 3077 | # As a special case, if "install-sh" is required, that requirement | |
| 3078 | # can be satisfied by any of "install-sh", "install.sh", or "shtool", | |
| 3079 | # and $ac_install_sh is set appropriately for whichever one is found. | |
| 3080 | if test x"$ac_aux" = x"install-sh" | |
| 3081 | then | |
| 3082 | if test -f "${as_dir}install-sh"; then | |
| 3083 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install-sh found" >&5 | |
| 3084 | ac_install_sh="${as_dir}install-sh -c" | |
| 3085 | elif test -f "${as_dir}install.sh"; then | |
| 3086 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}install.sh found" >&5 | |
| 3087 | ac_install_sh="${as_dir}install.sh -c" | |
| 3088 | elif test -f "${as_dir}shtool"; then | |
| 3089 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}shtool found" >&5 | |
| 3090 | ac_install_sh="${as_dir}shtool install -c" | |
| 3091 | else | |
| 3092 | ac_aux_dir_found=no | |
| 3093 | if $ac_first_candidate; then | |
| 3094 | ac_missing_aux_files="${ac_missing_aux_files} install-sh" | |
| 3095 | else | |
| 3096 | break | |
| 3097 | fi | |
| 3098 | fi | |
| 3099 | else | |
| 3100 | if test -f "${as_dir}${ac_aux}"; then | |
| 3101 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: ${as_dir}${ac_aux} found" >&5 | |
| 3102 | else | |
| 3103 | ac_aux_dir_found=no | |
| 3104 | if $ac_first_candidate; then | |
| 3105 | ac_missing_aux_files="${ac_missing_aux_files} ${ac_aux}" | |
| 3106 | else | |
| 3107 | break | |
| 3108 | fi | |
| 3109 | fi | |
| 3110 | fi | |
| 3111 | done | |
| 3112 | if test "$ac_aux_dir_found" = yes; then | |
| 3113 | ac_aux_dir="$as_dir" | |
| 3114 | break | |
| 3115 | fi | |
| 3116 | ac_first_candidate=false | |
| 3117 | ||
| 3118 | as_found=false | |
| 3119 | done | |
| 3120 | IFS=$as_save_IFS | |
| 3121 | if $as_found | |
| 3122 | then : | |
| 3123 | ||
| 3124 | else case e in #( | |
| 3125 | e) as_fn_error $? "cannot find required auxiliary files:$ac_missing_aux_files" "$LINENO" 5 ;; | |
| 3126 | esac | |
| 3127 | fi | |
| 3128 | ||
| 3129 | ||
| 3130 | # These three variables are undocumented and unsupported, | |
| 3131 | # and are intended to be withdrawn in a future Autoconf release. | |
| 3132 | # They can cause serious problems if a builder's source tree is in a directory | |
| 3133 | # whose full name contains unusual characters. | |
| 3134 | if test -f "${ac_aux_dir}config.guess"; then | |
| 3135 | ac_config_guess="$SHELL ${ac_aux_dir}config.guess" | |
| 3136 | fi | |
| 3137 | if test -f "${ac_aux_dir}config.sub"; then | |
| 3138 | ac_config_sub="$SHELL ${ac_aux_dir}config.sub" | |
| 3139 | fi | |
| 3140 | if test -f "$ac_aux_dir/configure"; then | |
| 3141 | ac_configure="$SHELL ${ac_aux_dir}configure" | |
| 3142 | fi | |
| 3143 | ||
| 3144 | # Check that the precious variables saved in the cache have kept the same | |
| 3145 | # value. | |
| 3146 | ac_cache_corrupted=false | |
| 3147 | for ac_var in $ac_precious_vars; do | |
| 3148 | eval ac_old_set=\$ac_cv_env_${ac_var}_set | |
| 3149 | eval ac_new_set=\$ac_env_${ac_var}_set | |
| 3150 | eval ac_old_val=\$ac_cv_env_${ac_var}_value | |
| 3151 | eval ac_new_val=\$ac_env_${ac_var}_value | |
| 3152 | case $ac_old_set,$ac_new_set in | |
| 3153 | set,) | |
| 3154 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&5 | |
| 3155 | printf "%s\n" "$as_me: error: '$ac_var' was set to '$ac_old_val' in the previous run" >&2;} | |
| 3156 | ac_cache_corrupted=: ;; | |
| 3157 | ,set) | |
| 3158 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' was not set in the previous run" >&5 | |
| 3159 | printf "%s\n" "$as_me: error: '$ac_var' was not set in the previous run" >&2;} | |
| 3160 | ac_cache_corrupted=: ;; | |
| 3161 | ,);; | |
| 3162 | *) | |
| 3163 | if test "x$ac_old_val" != "x$ac_new_val"; then | |
| 3164 | # differences in whitespace do not lead to failure. | |
| 3165 | ac_old_val_w=`echo x $ac_old_val` | |
| 3166 | ac_new_val_w=`echo x $ac_new_val` | |
| 3167 | if test "$ac_old_val_w" != "$ac_new_val_w"; then | |
| 3168 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: '$ac_var' has changed since the previous run:" >&5 | |
| 3169 | printf "%s\n" "$as_me: error: '$ac_var' has changed since the previous run:" >&2;} | |
| 3170 | ac_cache_corrupted=: | |
| 3171 | else | |
| 3172 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&5 | |
| 3173 | printf "%s\n" "$as_me: warning: ignoring whitespace changes in '$ac_var' since the previous run:" >&2;} | |
| 3174 | eval $ac_var=\$ac_old_val | |
| 3175 | fi | |
| 3176 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: former value: '$ac_old_val'" >&5 | |
| 3177 | printf "%s\n" "$as_me: former value: '$ac_old_val'" >&2;} | |
| 3178 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: current value: '$ac_new_val'" >&5 | |
| 3179 | printf "%s\n" "$as_me: current value: '$ac_new_val'" >&2;} | |
| 3180 | fi;; | |
| 3181 | esac | |
| 3182 | # Pass precious variables to config.status. | |
| 3183 | if test "$ac_new_set" = set; then | |
| 3184 | case $ac_new_val in | |
| 3185 | *\'*) ac_arg=$ac_var=`printf "%s\n" "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; | |
| 3186 | *) ac_arg=$ac_var=$ac_new_val ;; | |
| 3187 | esac | |
| 3188 | case " $ac_configure_args " in | |
| 3189 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. | |
| 3190 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; | |
| 3191 | esac | |
| 3192 | fi | |
| 3193 | done | |
| 3194 | if $ac_cache_corrupted; then | |
| 3195 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 3196 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 3197 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 | |
| 3198 | printf "%s\n" "$as_me: error: changes in the environment can compromise the build" >&2;} | |
| 3199 | as_fn_error $? "run '${MAKE-make} distclean' and/or 'rm $cache_file' | |
| 3200 | and start over" "$LINENO" 5 | |
| 3201 | fi | |
| 3202 | ## -------------------- ## | |
| 3203 | ## Main body of script. ## | |
| 3204 | ## -------------------- ## | |
| 3205 | ||
| 3206 | ac_ext=c | |
| 3207 | ac_cpp='$CPP $CPPFLAGS' | |
| 3208 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
| 3209 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
| 3210 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
| 3211 | ||
| 3212 | ||
| 3213 | ||
| 3214 | ||
| 3215 | ||
| 3216 | ||
| 3217 | ||
| 3218 | ac_config_headers="$ac_config_headers config.h buildconf.h" | |
| 3219 | ||
| 3220 | ||
| 3221 | BASHVERS=5.3 | |
| 3222 | RELSTATUS=release | |
| 3223 | ||
| 3224 | case "$RELSTATUS" in | |
| 3225 | alp*|bet*|dev*|rc*|releng*|maint*) DEBUG='-DDEBUG' MALLOC_DEBUG='-DMALLOC_DEBUG' ;; | |
| 3226 | *) DEBUG= MALLOC_DEBUG= ;; | |
| 3227 | esac | |
| 3228 | ||
| 3229 | ||
| 3230 | ||
| 3231 | ||
| 3232 | # Make sure we can run config.sub. | |
| 3233 | $SHELL "${ac_aux_dir}config.sub" sun4 >/dev/null 2>&1 || | |
| 3234 | as_fn_error $? "cannot run $SHELL ${ac_aux_dir}config.sub" "$LINENO" 5 | |
| 3235 | ||
| 3236 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 | |
| 3237 | printf %s "checking build system type... " >&6; } | |
| 3238 | if test ${ac_cv_build+y} | |
| 3239 | then : | |
| 3240 | printf %s "(cached) " >&6 | |
| 3241 | else case e in #( | |
| 3242 | e) ac_build_alias=$build_alias | |
| 3243 | test "x$ac_build_alias" = x && | |
| 3244 | ac_build_alias=`$SHELL "${ac_aux_dir}config.guess"` | |
| 3245 | test "x$ac_build_alias" = x && | |
| 3246 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 | |
| 3247 | ac_cv_build=`$SHELL "${ac_aux_dir}config.sub" $ac_build_alias` || | |
| 3248 | as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $ac_build_alias failed" "$LINENO" 5 | |
| 3249 | ;; | |
| 3250 | esac | |
| 3251 | fi | |
| 3252 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 | |
| 3253 | printf "%s\n" "$ac_cv_build" >&6; } | |
| 3254 | case $ac_cv_build in | |
| 3255 | *-*-*) ;; | |
| 3256 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; | |
| 3257 | esac | |
| 3258 | build=$ac_cv_build | |
| 3259 | ac_save_IFS=$IFS; IFS='-' | |
| 3260 | set x $ac_cv_build | |
| 3261 | shift | |
| 3262 | build_cpu=$1 | |
| 3263 | build_vendor=$2 | |
| 3264 | shift; shift | |
| 3265 | # Remember, the first character of IFS is used to create $*, | |
| 3266 | # except with old shells: | |
| 3267 | build_os=$* | |
| 3268 | IFS=$ac_save_IFS | |
| 3269 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac | |
| 3270 | ||
| 3271 | ||
| 3272 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 | |
| 3273 | printf %s "checking host system type... " >&6; } | |
| 3274 | if test ${ac_cv_host+y} | |
| 3275 | then : | |
| 3276 | printf %s "(cached) " >&6 | |
| 3277 | else case e in #( | |
| 3278 | e) if test "x$host_alias" = x; then | |
| 3279 | ac_cv_host=$ac_cv_build | |
| 3280 | else | |
| 3281 | ac_cv_host=`$SHELL "${ac_aux_dir}config.sub" $host_alias` || | |
| 3282 | as_fn_error $? "$SHELL ${ac_aux_dir}config.sub $host_alias failed" "$LINENO" 5 | |
| 3283 | fi | |
| 3284 | ;; | |
| 3285 | esac | |
| 3286 | fi | |
| 3287 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 | |
| 3288 | printf "%s\n" "$ac_cv_host" >&6; } | |
| 3289 | case $ac_cv_host in | |
| 3290 | *-*-*) ;; | |
| 3291 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; | |
| 3292 | esac | |
| 3293 | host=$ac_cv_host | |
| 3294 | ac_save_IFS=$IFS; IFS='-' | |
| 3295 | set x $ac_cv_host | |
| 3296 | shift | |
| 3297 | host_cpu=$1 | |
| 3298 | host_vendor=$2 | |
| 3299 | shift; shift | |
| 3300 | # Remember, the first character of IFS is used to create $*, | |
| 3301 | # except with old shells: | |
| 3302 | host_os=$* | |
| 3303 | IFS=$ac_save_IFS | |
| 3304 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac | |
| 3305 | ||
| 3306 | ||
| 3307 | ||
| 3308 | ||
| 3309 | opt_bash_malloc=yes | |
| 3310 | opt_afs=no | |
| 3311 | opt_curses=no | |
| 3312 | opt_with_installed_readline=no | |
| 3313 | ||
| 3314 | #htmldir= | |
| 3315 | ||
| 3316 | case "${host_cpu}-${host_os}" in | |
| 3317 | # mostly obsolete platforms | |
| 3318 | alpha*-*) opt_bash_malloc=no ;; # alpha running osf/1 or linux | |
| 3319 | *[Cc]ray*-*) opt_bash_malloc=no ;; # Crays | |
| 3320 | *-osf1*) opt_bash_malloc=no ;; # other osf/1 machines | |
| 3321 | *-dgux*) opt_bash_malloc=no ;; # DG/UX machines | |
| 3322 | sparc-svr4*) opt_bash_malloc=no ;; # sparc SVR4, SVR4.2 | |
| 3323 | m68k-sysv) opt_bash_malloc=no ;; # fixes file descriptor leak in closedir | |
| 3324 | *-bsdi2.1|*-bsdi3.?) opt_bash_malloc=no ; : ${CC:=shlicc2} ;; # for loadable builtins | |
| 3325 | *-opennt*|*-interix*) opt_bash_malloc=no ;; # Interix, now owned by Microsoft | |
| 3326 | *-beos*) opt_bash_malloc=no ;; # they say it's suitable | |
| 3327 | # These need additional investigation | |
| 3328 | sparc-linux*) opt_bash_malloc=no ;; # sparc running linux; requires ELF | |
| 3329 | *-aix*) opt_bash_malloc=no ;; # AIX machines | |
| 3330 | *-cygwin*|msys*) opt_bash_malloc=no ;; # Cygnus's CYGWIN environment | |
| 3331 | # These lack a working sbrk(2) | |
| 3332 | aarch64-freebsd*) opt_bash_malloc=no ;; | |
| 3333 | riscv*-freebsd*) opt_bash_malloc=no ;; | |
| 3334 | # Mach-derived systems have a ton of extra malloc functions and lack sbrk(2) | |
| 3335 | *-nextstep*) opt_bash_malloc=no ;; # NeXT machines running NeXTstep | |
| 3336 | *-openstep*) opt_bash_malloc=no ;; # i386/Sparc/HP machines running Openstep | |
| 3337 | *-macos*) opt_bash_malloc=no ;; # Apple MacOS X | |
| 3338 | *-rhapsody*) opt_bash_malloc=no ;; # Apple Rhapsody (MacOS X) | |
| 3339 | *-darwin*) opt_bash_malloc=no ;; # Apple Darwin (MacOS X) | |
| 3340 | *-machten4) opt_bash_malloc=no ;; # MachTen 4.x | |
| 3341 | # Niche or non-mainstream-shell-user systems | |
| 3342 | *-qnx*) opt_bash_malloc=no ;; # QNX 4.2, QNX [67].x | |
| 3343 | *-nsk*) opt_bash_malloc=no ;; # HP NonStop | |
| 3344 | *-haiku*) opt_bash_malloc=no ;; # Haiku OS | |
| 3345 | *-genode*) opt_bash_malloc=no ;; # Genode has no sbrk | |
| 3346 | i370-openedition*) opt_bash_malloc=no LOCAL_LIBS=-lzoslib LIBS_FOR_BUILD=-lzoslib ;; # IBM z/OS machines | |
| 3347 | i370-*) opt_bash_malloc=no ;; # generic (?) IBM 370 machines | |
| 3348 | esac | |
| 3349 | ||
| 3350 | # memory scrambling on free() | |
| 3351 | case "${host_os}" in | |
| 3352 | sco3.2v5*|sco3.2v4*) opt_memscramble=no ;; | |
| 3353 | *) opt_memscramble=yes ;; | |
| 3354 | esac | |
| 3355 | ||
| 3356 | ||
| 3357 | ||
| 3358 | ||
| 3359 | # Check whether --with-afs was given. | |
| 3360 | if test ${with_afs+y} | |
| 3361 | then : | |
| 3362 | withval=$with_afs; opt_afs=$withval | |
| 3363 | fi | |
| 3364 | ||
| 3365 | ||
| 3366 | # Check whether --with-bash-malloc was given. | |
| 3367 | if test ${with_bash_malloc+y} | |
| 3368 | then : | |
| 3369 | withval=$with_bash_malloc; opt_bash_malloc=$withval | |
| 3370 | fi | |
| 3371 | ||
| 3372 | ||
| 3373 | # Check whether --with-curses was given. | |
| 3374 | if test ${with_curses+y} | |
| 3375 | then : | |
| 3376 | withval=$with_curses; opt_curses=$withval | |
| 3377 | fi | |
| 3378 | ||
| 3379 | ||
| 3380 | # Check whether --with-gnu-malloc was given. | |
| 3381 | if test ${with_gnu_malloc+y} | |
| 3382 | then : | |
| 3383 | withval=$with_gnu_malloc; opt_bash_malloc=$withval | |
| 3384 | fi | |
| 3385 | ||
| 3386 | ||
| 3387 | # Check whether --with-installed-readline was given. | |
| 3388 | if test ${with_installed_readline+y} | |
| 3389 | then : | |
| 3390 | withval=$with_installed_readline; opt_with_installed_readline=$withval | |
| 3391 | fi | |
| 3392 | ||
| 3393 | ||
| 3394 | if test "$opt_bash_malloc" = yes; then | |
| 3395 | MALLOC_TARGET=malloc | |
| 3396 | MALLOC_SRC=malloc.c | |
| 3397 | ||
| 3398 | MALLOC_LIB='-lmalloc' | |
| 3399 | MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a' | |
| 3400 | MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)' | |
| 3401 | MALLOC_DEP='$(MALLOC_LIBRARY)' | |
| 3402 | ||
| 3403 | printf "%s\n" "#define USING_BASH_MALLOC 1" >>confdefs.h | |
| 3404 | ||
| 3405 | else | |
| 3406 | MALLOC_LIB= | |
| 3407 | MALLOC_LIBRARY= | |
| 3408 | MALLOC_LDFLAGS= | |
| 3409 | MALLOC_DEP= | |
| 3410 | fi | |
| 3411 | ||
| 3412 | if test "$opt_afs" = yes; then | |
| 3413 | printf "%s\n" "#define AFS 1" >>confdefs.h | |
| 3414 | ||
| 3415 | fi | |
| 3416 | ||
| 3417 | if test "$opt_curses" = yes; then | |
| 3418 | prefer_curses=yes | |
| 3419 | fi | |
| 3420 | ||
| 3421 | if test -z "${DEBUGGER_START_FILE}"; then | |
| 3422 | DEBUGGER_START_FILE='${datadir}/bashdb/bashdb-main.inc' | |
| 3423 | fi | |
| 3424 | ||
| 3425 | opt_minimal_config=no | |
| 3426 | ||
| 3427 | opt_job_control=yes | |
| 3428 | opt_alias=yes | |
| 3429 | opt_readline=yes | |
| 3430 | opt_history=yes | |
| 3431 | opt_bang_history=yes | |
| 3432 | opt_dirstack=yes | |
| 3433 | opt_restricted=yes | |
| 3434 | opt_process_subst=yes | |
| 3435 | opt_prompt_decoding=yes | |
| 3436 | opt_select=yes | |
| 3437 | opt_help=yes | |
| 3438 | opt_array_variables=yes | |
| 3439 | opt_dparen_arith=yes | |
| 3440 | opt_extended_glob=yes | |
| 3441 | opt_brace_expansion=yes | |
| 3442 | opt_disabled_builtins=no | |
| 3443 | opt_command_timing=yes | |
| 3444 | opt_xpg_echo=no | |
| 3445 | opt_strict_posix=no | |
| 3446 | opt_cond_command=yes | |
| 3447 | opt_cond_regexp=yes | |
| 3448 | opt_coproc=yes | |
| 3449 | opt_arith_for_command=yes | |
| 3450 | opt_net_redirs=yes | |
| 3451 | opt_progcomp=yes | |
| 3452 | opt_separate_help=no | |
| 3453 | opt_multibyte=yes | |
| 3454 | opt_debugger=yes | |
| 3455 | opt_single_longdoc_strings=yes | |
| 3456 | opt_casemod_attrs=yes | |
| 3457 | opt_casemod_expansions=yes | |
| 3458 | opt_extglob_default=no | |
| 3459 | opt_dircomplete_expand_default=no | |
| 3460 | opt_globascii_default=yes | |
| 3461 | opt_function_import=yes | |
| 3462 | opt_dev_fd_stat_broken=no | |
| 3463 | opt_alt_array_impl=no | |
| 3464 | opt_translatable_strings=yes | |
| 3465 | opt_bash_source_fullpath_default=no | |
| 3466 | ||
| 3467 | ARRAY_O=array.o | |
| 3468 | ||
| 3469 | opt_static_link=no | |
| 3470 | opt_profiling=no | |
| 3471 | ||
| 3472 | # Check whether --enable-minimal-config was given. | |
| 3473 | if test ${enable_minimal_config+y} | |
| 3474 | then : | |
| 3475 | enableval=$enable_minimal_config; opt_minimal_config=$enableval | |
| 3476 | fi | |
| 3477 | ||
| 3478 | ||
| 3479 | if test $opt_minimal_config = yes; then | |
| 3480 | opt_job_control=no opt_alias=no opt_readline=no | |
| 3481 | opt_history=no opt_bang_history=no opt_dirstack=no | |
| 3482 | opt_restricted=no opt_process_subst=no opt_prompt_decoding=no | |
| 3483 | opt_select=no opt_help=no opt_array_variables=no opt_dparen_arith=no | |
| 3484 | opt_brace_expansion=no opt_disabled_builtins=no opt_command_timing=no | |
| 3485 | opt_extended_glob=no opt_cond_command=no opt_arith_for_command=no | |
| 3486 | opt_net_redirs=no opt_progcomp=no opt_separate_help=no | |
| 3487 | opt_multibyte=yes opt_cond_regexp=no opt_coproc=no | |
| 3488 | opt_casemod_attrs=no opt_casemod_expansions=no opt_extglob_default=no | |
| 3489 | opt_translatable_strings=no | |
| 3490 | opt_globascii_default=yes | |
| 3491 | opt_bash_source_fullpath_default=no | |
| 3492 | fi | |
| 3493 | ||
| 3494 | # Check whether --enable-alias was given. | |
| 3495 | if test ${enable_alias+y} | |
| 3496 | then : | |
| 3497 | enableval=$enable_alias; opt_alias=$enableval | |
| 3498 | fi | |
| 3499 | ||
| 3500 | # Check whether --enable-alt-array-implementation was given. | |
| 3501 | if test ${enable_alt_array_implementation+y} | |
| 3502 | then : | |
| 3503 | enableval=$enable_alt_array_implementation; opt_alt_array_impl=$enableval | |
| 3504 | fi | |
| 3505 | ||
| 3506 | # Check whether --enable-arith-for-command was given. | |
| 3507 | if test ${enable_arith_for_command+y} | |
| 3508 | then : | |
| 3509 | enableval=$enable_arith_for_command; opt_arith_for_command=$enableval | |
| 3510 | fi | |
| 3511 | ||
| 3512 | # Check whether --enable-array-variables was given. | |
| 3513 | if test ${enable_array_variables+y} | |
| 3514 | then : | |
| 3515 | enableval=$enable_array_variables; opt_array_variables=$enableval | |
| 3516 | fi | |
| 3517 | ||
| 3518 | # Check whether --enable-bang-history was given. | |
| 3519 | if test ${enable_bang_history+y} | |
| 3520 | then : | |
| 3521 | enableval=$enable_bang_history; opt_bang_history=$enableval | |
| 3522 | fi | |
| 3523 | ||
| 3524 | # Check whether --enable-bash-source-fullpath-default was given. | |
| 3525 | if test ${enable_bash_source_fullpath_default+y} | |
| 3526 | then : | |
| 3527 | enableval=$enable_bash_source_fullpath_default; opt_bash_source_fullpath_default=$enableval | |
| 3528 | fi | |
| 3529 | ||
| 3530 | # Check whether --enable-brace-expansion was given. | |
| 3531 | if test ${enable_brace_expansion+y} | |
| 3532 | then : | |
| 3533 | enableval=$enable_brace_expansion; opt_brace_expansion=$enableval | |
| 3534 | fi | |
| 3535 | ||
| 3536 | # Check whether --enable-casemod-attributes was given. | |
| 3537 | if test ${enable_casemod_attributes+y} | |
| 3538 | then : | |
| 3539 | enableval=$enable_casemod_attributes; opt_casemod_attrs=$enableval | |
| 3540 | fi | |
| 3541 | ||
| 3542 | # Check whether --enable-casemod-expansions was given. | |
| 3543 | if test ${enable_casemod_expansions+y} | |
| 3544 | then : | |
| 3545 | enableval=$enable_casemod_expansions; opt_casemod_expansions=$enableval | |
| 3546 | fi | |
| 3547 | ||
| 3548 | # Check whether --enable-command-timing was given. | |
| 3549 | if test ${enable_command_timing+y} | |
| 3550 | then : | |
| 3551 | enableval=$enable_command_timing; opt_command_timing=$enableval | |
| 3552 | fi | |
| 3553 | ||
| 3554 | # Check whether --enable-cond-command was given. | |
| 3555 | if test ${enable_cond_command+y} | |
| 3556 | then : | |
| 3557 | enableval=$enable_cond_command; opt_cond_command=$enableval | |
| 3558 | fi | |
| 3559 | ||
| 3560 | # Check whether --enable-cond-regexp was given. | |
| 3561 | if test ${enable_cond_regexp+y} | |
| 3562 | then : | |
| 3563 | enableval=$enable_cond_regexp; opt_cond_regexp=$enableval | |
| 3564 | fi | |
| 3565 | ||
| 3566 | # Check whether --enable-coprocesses was given. | |
| 3567 | if test ${enable_coprocesses+y} | |
| 3568 | then : | |
| 3569 | enableval=$enable_coprocesses; opt_coproc=$enableval | |
| 3570 | fi | |
| 3571 | ||
| 3572 | # Check whether --enable-debugger was given. | |
| 3573 | if test ${enable_debugger+y} | |
| 3574 | then : | |
| 3575 | enableval=$enable_debugger; opt_debugger=$enableval | |
| 3576 | fi | |
| 3577 | ||
| 3578 | # Check whether --enable-dev-fd-stat-broken was given. | |
| 3579 | if test ${enable_dev_fd_stat_broken+y} | |
| 3580 | then : | |
| 3581 | enableval=$enable_dev_fd_stat_broken; opt_dev_fd_stat_broken=$enableval | |
| 3582 | fi | |
| 3583 | ||
| 3584 | # Check whether --enable-direxpand-default was given. | |
| 3585 | if test ${enable_direxpand_default+y} | |
| 3586 | then : | |
| 3587 | enableval=$enable_direxpand_default; opt_dircomplete_expand_default=$enableval | |
| 3588 | fi | |
| 3589 | ||
| 3590 | # Check whether --enable-directory-stack was given. | |
| 3591 | if test ${enable_directory_stack+y} | |
| 3592 | then : | |
| 3593 | enableval=$enable_directory_stack; opt_dirstack=$enableval | |
| 3594 | fi | |
| 3595 | ||
| 3596 | # Check whether --enable-disabled-builtins was given. | |
| 3597 | if test ${enable_disabled_builtins+y} | |
| 3598 | then : | |
| 3599 | enableval=$enable_disabled_builtins; opt_disabled_builtins=$enableval | |
| 3600 | fi | |
| 3601 | ||
| 3602 | # Check whether --enable-dparen-arithmetic was given. | |
| 3603 | if test ${enable_dparen_arithmetic+y} | |
| 3604 | then : | |
| 3605 | enableval=$enable_dparen_arithmetic; opt_dparen_arith=$enableval | |
| 3606 | fi | |
| 3607 | ||
| 3608 | # Check whether --enable-extended-glob was given. | |
| 3609 | if test ${enable_extended_glob+y} | |
| 3610 | then : | |
| 3611 | enableval=$enable_extended_glob; opt_extended_glob=$enableval | |
| 3612 | fi | |
| 3613 | ||
| 3614 | # Check whether --enable-extended-glob-default was given. | |
| 3615 | if test ${enable_extended_glob_default+y} | |
| 3616 | then : | |
| 3617 | enableval=$enable_extended_glob_default; opt_extglob_default=$enableval | |
| 3618 | fi | |
| 3619 | ||
| 3620 | # Check whether --enable-function-import was given. | |
| 3621 | if test ${enable_function_import+y} | |
| 3622 | then : | |
| 3623 | enableval=$enable_function_import; opt_function_import=$enableval | |
| 3624 | fi | |
| 3625 | ||
| 3626 | # Check whether --enable-glob-asciiranges-default was given. | |
| 3627 | if test ${enable_glob_asciiranges_default+y} | |
| 3628 | then : | |
| 3629 | enableval=$enable_glob_asciiranges_default; opt_globascii_default=$enableval | |
| 3630 | fi | |
| 3631 | ||
| 3632 | # Check whether --enable-help-builtin was given. | |
| 3633 | if test ${enable_help_builtin+y} | |
| 3634 | then : | |
| 3635 | enableval=$enable_help_builtin; opt_help=$enableval | |
| 3636 | fi | |
| 3637 | ||
| 3638 | # Check whether --enable-history was given. | |
| 3639 | if test ${enable_history+y} | |
| 3640 | then : | |
| 3641 | enableval=$enable_history; opt_history=$enableval | |
| 3642 | fi | |
| 3643 | ||
| 3644 | # Check whether --enable-job-control was given. | |
| 3645 | if test ${enable_job_control+y} | |
| 3646 | then : | |
| 3647 | enableval=$enable_job_control; opt_job_control=$enableval | |
| 3648 | fi | |
| 3649 | ||
| 3650 | # Check whether --enable-multibyte was given. | |
| 3651 | if test ${enable_multibyte+y} | |
| 3652 | then : | |
| 3653 | enableval=$enable_multibyte; opt_multibyte=$enableval | |
| 3654 | fi | |
| 3655 | ||
| 3656 | # Check whether --enable-net-redirections was given. | |
| 3657 | if test ${enable_net_redirections+y} | |
| 3658 | then : | |
| 3659 | enableval=$enable_net_redirections; opt_net_redirs=$enableval | |
| 3660 | fi | |
| 3661 | ||
| 3662 | # Check whether --enable-process-substitution was given. | |
| 3663 | if test ${enable_process_substitution+y} | |
| 3664 | then : | |
| 3665 | enableval=$enable_process_substitution; opt_process_subst=$enableval | |
| 3666 | fi | |
| 3667 | ||
| 3668 | # Check whether --enable-progcomp was given. | |
| 3669 | if test ${enable_progcomp+y} | |
| 3670 | then : | |
| 3671 | enableval=$enable_progcomp; opt_progcomp=$enableval | |
| 3672 | fi | |
| 3673 | ||
| 3674 | # Check whether --enable-prompt-string-decoding was given. | |
| 3675 | if test ${enable_prompt_string_decoding+y} | |
| 3676 | then : | |
| 3677 | enableval=$enable_prompt_string_decoding; opt_prompt_decoding=$enableval | |
| 3678 | fi | |
| 3679 | ||
| 3680 | # Check whether --enable-readline was given. | |
| 3681 | if test ${enable_readline+y} | |
| 3682 | then : | |
| 3683 | enableval=$enable_readline; opt_readline=$enableval | |
| 3684 | fi | |
| 3685 | ||
| 3686 | # Check whether --enable-restricted was given. | |
| 3687 | if test ${enable_restricted+y} | |
| 3688 | then : | |
| 3689 | enableval=$enable_restricted; opt_restricted=$enableval | |
| 3690 | fi | |
| 3691 | ||
| 3692 | # Check whether --enable-select was given. | |
| 3693 | if test ${enable_select+y} | |
| 3694 | then : | |
| 3695 | enableval=$enable_select; opt_select=$enableval | |
| 3696 | fi | |
| 3697 | ||
| 3698 | # Check whether --enable-separate-helpfiles was given. | |
| 3699 | if test ${enable_separate_helpfiles+y} | |
| 3700 | then : | |
| 3701 | enableval=$enable_separate_helpfiles; opt_separate_help=$enableval | |
| 3702 | fi | |
| 3703 | ||
| 3704 | # Check whether --enable-single-help-strings was given. | |
| 3705 | if test ${enable_single_help_strings+y} | |
| 3706 | then : | |
| 3707 | enableval=$enable_single_help_strings; opt_single_longdoc_strings=$enableval | |
| 3708 | fi | |
| 3709 | ||
| 3710 | # Check whether --enable-strict-posix-default was given. | |
| 3711 | if test ${enable_strict_posix_default+y} | |
| 3712 | then : | |
| 3713 | enableval=$enable_strict_posix_default; opt_strict_posix=$enableval | |
| 3714 | fi | |
| 3715 | ||
| 3716 | # Check whether --enable-translatable-strings was given. | |
| 3717 | if test ${enable_translatable_strings+y} | |
| 3718 | then : | |
| 3719 | enableval=$enable_translatable_strings; opt_translatable_strings=$enableval | |
| 3720 | fi | |
| 3721 | ||
| 3722 | # Check whether --enable-usg-echo-default was given. | |
| 3723 | if test ${enable_usg_echo_default+y} | |
| 3724 | then : | |
| 3725 | enableval=$enable_usg_echo_default; opt_xpg_echo=$enableval | |
| 3726 | fi | |
| 3727 | ||
| 3728 | # Check whether --enable-xpg-echo-default was given. | |
| 3729 | if test ${enable_xpg_echo_default+y} | |
| 3730 | then : | |
| 3731 | enableval=$enable_xpg_echo_default; opt_xpg_echo=$enableval | |
| 3732 | fi | |
| 3733 | ||
| 3734 | ||
| 3735 | # Check whether --enable-mem-scramble was given. | |
| 3736 | if test ${enable_mem_scramble+y} | |
| 3737 | then : | |
| 3738 | enableval=$enable_mem_scramble; opt_memscramble=$enableval | |
| 3739 | fi | |
| 3740 | ||
| 3741 | # Check whether --enable-profiling was given. | |
| 3742 | if test ${enable_profiling+y} | |
| 3743 | then : | |
| 3744 | enableval=$enable_profiling; opt_profiling=$enableval | |
| 3745 | fi | |
| 3746 | ||
| 3747 | # Check whether --enable-static-link was given. | |
| 3748 | if test ${enable_static_link+y} | |
| 3749 | then : | |
| 3750 | enableval=$enable_static_link; opt_static_link=$enableval | |
| 3751 | fi | |
| 3752 | ||
| 3753 | ||
| 3754 | ||
| 3755 | ||
| 3756 | ||
| 3757 | ||
| 3758 | ||
| 3759 | ||
| 3760 | ||
| 3761 | if test $opt_alias = yes; then | |
| 3762 | printf "%s\n" "#define ALIAS 1" >>confdefs.h | |
| 3763 | ||
| 3764 | fi | |
| 3765 | if test $opt_dirstack = yes; then | |
| 3766 | printf "%s\n" "#define PUSHD_AND_POPD 1" >>confdefs.h | |
| 3767 | ||
| 3768 | fi | |
| 3769 | if test $opt_restricted = yes; then | |
| 3770 | printf "%s\n" "#define RESTRICTED_SHELL 1" >>confdefs.h | |
| 3771 | ||
| 3772 | fi | |
| 3773 | if test $opt_process_subst = yes; then | |
| 3774 | printf "%s\n" "#define PROCESS_SUBSTITUTION 1" >>confdefs.h | |
| 3775 | ||
| 3776 | fi | |
| 3777 | if test $opt_prompt_decoding = yes; then | |
| 3778 | printf "%s\n" "#define PROMPT_STRING_DECODE 1" >>confdefs.h | |
| 3779 | ||
| 3780 | fi | |
| 3781 | if test $opt_select = yes; then | |
| 3782 | printf "%s\n" "#define SELECT_COMMAND 1" >>confdefs.h | |
| 3783 | ||
| 3784 | fi | |
| 3785 | if test $opt_help = yes; then | |
| 3786 | printf "%s\n" "#define HELP_BUILTIN 1" >>confdefs.h | |
| 3787 | ||
| 3788 | fi | |
| 3789 | if test $opt_array_variables = yes; then | |
| 3790 | printf "%s\n" "#define ARRAY_VARS 1" >>confdefs.h | |
| 3791 | ||
| 3792 | fi | |
| 3793 | if test $opt_dparen_arith = yes; then | |
| 3794 | printf "%s\n" "#define DPAREN_ARITHMETIC 1" >>confdefs.h | |
| 3795 | ||
| 3796 | fi | |
| 3797 | if test $opt_brace_expansion = yes; then | |
| 3798 | printf "%s\n" "#define BRACE_EXPANSION 1" >>confdefs.h | |
| 3799 | ||
| 3800 | fi | |
| 3801 | if test $opt_disabled_builtins = yes; then | |
| 3802 | printf "%s\n" "#define DISABLED_BUILTINS 1" >>confdefs.h | |
| 3803 | ||
| 3804 | fi | |
| 3805 | if test $opt_command_timing = yes; then | |
| 3806 | printf "%s\n" "#define COMMAND_TIMING 1" >>confdefs.h | |
| 3807 | ||
| 3808 | fi | |
| 3809 | if test $opt_xpg_echo = yes ; then | |
| 3810 | printf "%s\n" "#define DEFAULT_ECHO_TO_XPG 1" >>confdefs.h | |
| 3811 | ||
| 3812 | fi | |
| 3813 | if test $opt_strict_posix = yes; then | |
| 3814 | printf "%s\n" "#define STRICT_POSIX 1" >>confdefs.h | |
| 3815 | ||
| 3816 | fi | |
| 3817 | if test $opt_extended_glob = yes ; then | |
| 3818 | printf "%s\n" "#define EXTENDED_GLOB 1" >>confdefs.h | |
| 3819 | ||
| 3820 | fi | |
| 3821 | if test $opt_extglob_default = yes; then | |
| 3822 | printf "%s\n" "#define EXTGLOB_DEFAULT 1" >>confdefs.h | |
| 3823 | ||
| 3824 | else | |
| 3825 | printf "%s\n" "#define EXTGLOB_DEFAULT 0" >>confdefs.h | |
| 3826 | ||
| 3827 | fi | |
| 3828 | if test $opt_cond_command = yes ; then | |
| 3829 | printf "%s\n" "#define COND_COMMAND 1" >>confdefs.h | |
| 3830 | ||
| 3831 | fi | |
| 3832 | if test $opt_cond_regexp = yes ; then | |
| 3833 | printf "%s\n" "#define COND_REGEXP 1" >>confdefs.h | |
| 3834 | ||
| 3835 | fi | |
| 3836 | if test $opt_coproc = yes; then | |
| 3837 | printf "%s\n" "#define COPROCESS_SUPPORT 1" >>confdefs.h | |
| 3838 | ||
| 3839 | fi | |
| 3840 | if test $opt_arith_for_command = yes; then | |
| 3841 | printf "%s\n" "#define ARITH_FOR_COMMAND 1" >>confdefs.h | |
| 3842 | ||
| 3843 | fi | |
| 3844 | if test $opt_net_redirs = yes; then | |
| 3845 | printf "%s\n" "#define NETWORK_REDIRECTIONS 1" >>confdefs.h | |
| 3846 | ||
| 3847 | fi | |
| 3848 | if test $opt_progcomp = yes; then | |
| 3849 | printf "%s\n" "#define PROGRAMMABLE_COMPLETION 1" >>confdefs.h | |
| 3850 | ||
| 3851 | fi | |
| 3852 | if test $opt_multibyte = no; then | |
| 3853 | printf "%s\n" "#define NO_MULTIBYTE_SUPPORT 1" >>confdefs.h | |
| 3854 | ||
| 3855 | fi | |
| 3856 | if test $opt_debugger = yes; then | |
| 3857 | printf "%s\n" "#define DEBUGGER 1" >>confdefs.h | |
| 3858 | ||
| 3859 | fi | |
| 3860 | if test $opt_casemod_attrs = yes; then | |
| 3861 | printf "%s\n" "#define CASEMOD_ATTRS 1" >>confdefs.h | |
| 3862 | ||
| 3863 | fi | |
| 3864 | if test $opt_casemod_expansions = yes; then | |
| 3865 | printf "%s\n" "#define CASEMOD_EXPANSIONS 1" >>confdefs.h | |
| 3866 | ||
| 3867 | fi | |
| 3868 | if test $opt_dircomplete_expand_default = yes; then | |
| 3869 | printf "%s\n" "#define DIRCOMPLETE_EXPAND_DEFAULT 1" >>confdefs.h | |
| 3870 | ||
| 3871 | fi | |
| 3872 | if test $opt_globascii_default = yes; then | |
| 3873 | printf "%s\n" "#define GLOBASCII_DEFAULT 1" >>confdefs.h | |
| 3874 | ||
| 3875 | else | |
| 3876 | printf "%s\n" "#define GLOBASCII_DEFAULT 0" >>confdefs.h | |
| 3877 | ||
| 3878 | fi | |
| 3879 | if test $opt_function_import = yes; then | |
| 3880 | printf "%s\n" "#define FUNCTION_IMPORT 1" >>confdefs.h | |
| 3881 | ||
| 3882 | fi | |
| 3883 | if test $opt_dev_fd_stat_broken = yes; then | |
| 3884 | printf "%s\n" "#define DEV_FD_STAT_BROKEN 1" >>confdefs.h | |
| 3885 | ||
| 3886 | fi | |
| 3887 | if test $opt_alt_array_impl = yes; then | |
| 3888 | printf "%s\n" "#define ALT_ARRAY_IMPLEMENTATION 1" >>confdefs.h | |
| 3889 | ||
| 3890 | ARRAY_O=array2.o | |
| 3891 | fi | |
| 3892 | if test $opt_translatable_strings = yes; then | |
| 3893 | printf "%s\n" "#define TRANSLATABLE_STRINGS 1" >>confdefs.h | |
| 3894 | ||
| 3895 | fi | |
| 3896 | if test $opt_bash_source_fullpath_default = yes; then | |
| 3897 | printf "%s\n" "#define BASH_SOURCE_FULLPATH_DEFAULT 1" >>confdefs.h | |
| 3898 | ||
| 3899 | else | |
| 3900 | printf "%s\n" "#define BASH_SOURCE_FULLPATH_DEFAULT 0" >>confdefs.h | |
| 3901 | ||
| 3902 | fi | |
| 3903 | ||
| 3904 | if test $opt_memscramble = yes; then | |
| 3905 | printf "%s\n" "#define MEMSCRAMBLE 1" >>confdefs.h | |
| 3906 | ||
| 3907 | fi | |
| 3908 | ||
| 3909 | if test "$opt_minimal_config" = yes; then | |
| 3910 | TESTSCRIPT=run-minimal | |
| 3911 | else | |
| 3912 | TESTSCRIPT=run-all | |
| 3913 | fi | |
| 3914 | ||
| 3915 | HELPDIR= HELPDIRDEFINE= HELPINSTALL= HELPFILES_TARGET= | |
| 3916 | if test "$opt_separate_help" != no; then | |
| 3917 | if test "$opt_separate_help" = "yes" ; then | |
| 3918 | HELPDIR='${datadir}/bash/helpfiles' | |
| 3919 | else | |
| 3920 | HELPDIR=$opt_separate_help | |
| 3921 | fi | |
| 3922 | HELPDIRDEFINE='-H ${HELPDIR}' | |
| 3923 | HELPINSTALL='install-help' | |
| 3924 | HELPFILES_TARGET='helpdoc' | |
| 3925 | fi | |
| 3926 | HELPSTRINGS= | |
| 3927 | if test "$opt_single_longdoc_strings" != "yes"; then | |
| 3928 | HELPSTRINGS='-S' | |
| 3929 | fi | |
| 3930 | ||
| 3931 | ||
| 3932 | ||
| 3933 | ||
| 3934 | ||
| 3935 | ||
| 3936 | ||
| 3937 | ||
| 3938 | ||
| 3939 | ||
| 3940 | ||
| 3941 | ||
| 3942 | ||
| 3943 | ||
| 3944 | ||
| 3945 | ||
| 3946 | ||
| 3947 | ||
| 3948 | ||
| 3949 | ||
| 3950 | if test -z "$CFLAGS"; then | |
| 3951 | want_auto_cflags=1 | |
| 3952 | fi | |
| 3953 | ||
| 3954 | echo "" | |
| 3955 | echo "Beginning configuration for bash-$BASHVERS-$RELSTATUS for ${host_cpu}-${host_vendor}-${host_os}" | |
| 3956 | echo "" | |
| 3957 | ||
| 3958 | ||
| 3959 | ||
| 3960 | ||
| 3961 | ||
| 3962 | ||
| 3963 | ||
| 3964 | ||
| 3965 | ||
| 3966 | ||
| 3967 | ac_ext=c | |
| 3968 | ac_cpp='$CPP $CPPFLAGS' | |
| 3969 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
| 3970 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
| 3971 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
| 3972 | if test -n "$ac_tool_prefix"; then | |
| 3973 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. | |
| 3974 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 | |
| 3975 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 3976 | printf %s "checking for $ac_word... " >&6; } | |
| 3977 | if test ${ac_cv_prog_CC+y} | |
| 3978 | then : | |
| 3979 | printf %s "(cached) " >&6 | |
| 3980 | else case e in #( | |
| 3981 | e) if test -n "$CC"; then | |
| 3982 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
| 3983 | else | |
| 3984 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 3985 | for as_dir in $PATH | |
| 3986 | do | |
| 3987 | IFS=$as_save_IFS | |
| 3988 | case $as_dir in #((( | |
| 3989 | '') as_dir=./ ;; | |
| 3990 | */) ;; | |
| 3991 | *) as_dir=$as_dir/ ;; | |
| 3992 | esac | |
| 3993 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 3994 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 3995 | ac_cv_prog_CC="${ac_tool_prefix}gcc" | |
| 3996 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 3997 | break 2 | |
| 3998 | fi | |
| 3999 | done | |
| 4000 | done | |
| 4001 | IFS=$as_save_IFS | |
| 4002 | ||
| 4003 | fi ;; | |
| 4004 | esac | |
| 4005 | fi | |
| 4006 | CC=$ac_cv_prog_CC | |
| 4007 | if test -n "$CC"; then | |
| 4008 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
| 4009 | printf "%s\n" "$CC" >&6; } | |
| 4010 | else | |
| 4011 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 4012 | printf "%s\n" "no" >&6; } | |
| 4013 | fi | |
| 4014 | ||
| 4015 | ||
| 4016 | fi | |
| 4017 | if test -z "$ac_cv_prog_CC"; then | |
| 4018 | ac_ct_CC=$CC | |
| 4019 | # Extract the first word of "gcc", so it can be a program name with args. | |
| 4020 | set dummy gcc; ac_word=$2 | |
| 4021 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 4022 | printf %s "checking for $ac_word... " >&6; } | |
| 4023 | if test ${ac_cv_prog_ac_ct_CC+y} | |
| 4024 | then : | |
| 4025 | printf %s "(cached) " >&6 | |
| 4026 | else case e in #( | |
| 4027 | e) if test -n "$ac_ct_CC"; then | |
| 4028 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
| 4029 | else | |
| 4030 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 4031 | for as_dir in $PATH | |
| 4032 | do | |
| 4033 | IFS=$as_save_IFS | |
| 4034 | case $as_dir in #((( | |
| 4035 | '') as_dir=./ ;; | |
| 4036 | */) ;; | |
| 4037 | *) as_dir=$as_dir/ ;; | |
| 4038 | esac | |
| 4039 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 4040 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 4041 | ac_cv_prog_ac_ct_CC="gcc" | |
| 4042 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 4043 | break 2 | |
| 4044 | fi | |
| 4045 | done | |
| 4046 | done | |
| 4047 | IFS=$as_save_IFS | |
| 4048 | ||
| 4049 | fi ;; | |
| 4050 | esac | |
| 4051 | fi | |
| 4052 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
| 4053 | if test -n "$ac_ct_CC"; then | |
| 4054 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
| 4055 | printf "%s\n" "$ac_ct_CC" >&6; } | |
| 4056 | else | |
| 4057 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 4058 | printf "%s\n" "no" >&6; } | |
| 4059 | fi | |
| 4060 | ||
| 4061 | if test "x$ac_ct_CC" = x; then | |
| 4062 | CC="" | |
| 4063 | else | |
| 4064 | case $cross_compiling:$ac_tool_warned in | |
| 4065 | yes:) | |
| 4066 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
| 4067 | printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
| 4068 | ac_tool_warned=yes ;; | |
| 4069 | esac | |
| 4070 | CC=$ac_ct_CC | |
| 4071 | fi | |
| 4072 | else | |
| 4073 | CC="$ac_cv_prog_CC" | |
| 4074 | fi | |
| 4075 | ||
| 4076 | if test -z "$CC"; then | |
| 4077 | if test -n "$ac_tool_prefix"; then | |
| 4078 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. | |
| 4079 | set dummy ${ac_tool_prefix}cc; ac_word=$2 | |
| 4080 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 4081 | printf %s "checking for $ac_word... " >&6; } | |
| 4082 | if test ${ac_cv_prog_CC+y} | |
| 4083 | then : | |
| 4084 | printf %s "(cached) " >&6 | |
| 4085 | else case e in #( | |
| 4086 | e) if test -n "$CC"; then | |
| 4087 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
| 4088 | else | |
| 4089 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 4090 | for as_dir in $PATH | |
| 4091 | do | |
| 4092 | IFS=$as_save_IFS | |
| 4093 | case $as_dir in #((( | |
| 4094 | '') as_dir=./ ;; | |
| 4095 | */) ;; | |
| 4096 | *) as_dir=$as_dir/ ;; | |
| 4097 | esac | |
| 4098 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 4099 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 4100 | ac_cv_prog_CC="${ac_tool_prefix}cc" | |
| 4101 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 4102 | break 2 | |
| 4103 | fi | |
| 4104 | done | |
| 4105 | done | |
| 4106 | IFS=$as_save_IFS | |
| 4107 | ||
| 4108 | fi ;; | |
| 4109 | esac | |
| 4110 | fi | |
| 4111 | CC=$ac_cv_prog_CC | |
| 4112 | if test -n "$CC"; then | |
| 4113 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
| 4114 | printf "%s\n" "$CC" >&6; } | |
| 4115 | else | |
| 4116 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 4117 | printf "%s\n" "no" >&6; } | |
| 4118 | fi | |
| 4119 | ||
| 4120 | ||
| 4121 | fi | |
| 4122 | fi | |
| 4123 | if test -z "$CC"; then | |
| 4124 | # Extract the first word of "cc", so it can be a program name with args. | |
| 4125 | set dummy cc; ac_word=$2 | |
| 4126 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 4127 | printf %s "checking for $ac_word... " >&6; } | |
| 4128 | if test ${ac_cv_prog_CC+y} | |
| 4129 | then : | |
| 4130 | printf %s "(cached) " >&6 | |
| 4131 | else case e in #( | |
| 4132 | e) if test -n "$CC"; then | |
| 4133 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
| 4134 | else | |
| 4135 | ac_prog_rejected=no | |
| 4136 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 4137 | for as_dir in $PATH | |
| 4138 | do | |
| 4139 | IFS=$as_save_IFS | |
| 4140 | case $as_dir in #((( | |
| 4141 | '') as_dir=./ ;; | |
| 4142 | */) ;; | |
| 4143 | *) as_dir=$as_dir/ ;; | |
| 4144 | esac | |
| 4145 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 4146 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 4147 | if test "$as_dir$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then | |
| 4148 | ac_prog_rejected=yes | |
| 4149 | continue | |
| 4150 | fi | |
| 4151 | ac_cv_prog_CC="cc" | |
| 4152 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 4153 | break 2 | |
| 4154 | fi | |
| 4155 | done | |
| 4156 | done | |
| 4157 | IFS=$as_save_IFS | |
| 4158 | ||
| 4159 | if test $ac_prog_rejected = yes; then | |
| 4160 | # We found a bogon in the path, so make sure we never use it. | |
| 4161 | set dummy $ac_cv_prog_CC | |
| 4162 | shift | |
| 4163 | if test $# != 0; then | |
| 4164 | # We chose a different compiler from the bogus one. | |
| 4165 | # However, it has the same basename, so the bogon will be chosen | |
| 4166 | # first if we set CC to just the basename; use the full file name. | |
| 4167 | shift | |
| 4168 | ac_cv_prog_CC="$as_dir$ac_word${1+' '}$@" | |
| 4169 | fi | |
| 4170 | fi | |
| 4171 | fi ;; | |
| 4172 | esac | |
| 4173 | fi | |
| 4174 | CC=$ac_cv_prog_CC | |
| 4175 | if test -n "$CC"; then | |
| 4176 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
| 4177 | printf "%s\n" "$CC" >&6; } | |
| 4178 | else | |
| 4179 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 4180 | printf "%s\n" "no" >&6; } | |
| 4181 | fi | |
| 4182 | ||
| 4183 | ||
| 4184 | fi | |
| 4185 | if test -z "$CC"; then | |
| 4186 | if test -n "$ac_tool_prefix"; then | |
| 4187 | for ac_prog in cl.exe | |
| 4188 | do | |
| 4189 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. | |
| 4190 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 | |
| 4191 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 4192 | printf %s "checking for $ac_word... " >&6; } | |
| 4193 | if test ${ac_cv_prog_CC+y} | |
| 4194 | then : | |
| 4195 | printf %s "(cached) " >&6 | |
| 4196 | else case e in #( | |
| 4197 | e) if test -n "$CC"; then | |
| 4198 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
| 4199 | else | |
| 4200 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 4201 | for as_dir in $PATH | |
| 4202 | do | |
| 4203 | IFS=$as_save_IFS | |
| 4204 | case $as_dir in #((( | |
| 4205 | '') as_dir=./ ;; | |
| 4206 | */) ;; | |
| 4207 | *) as_dir=$as_dir/ ;; | |
| 4208 | esac | |
| 4209 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 4210 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 4211 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" | |
| 4212 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 4213 | break 2 | |
| 4214 | fi | |
| 4215 | done | |
| 4216 | done | |
| 4217 | IFS=$as_save_IFS | |
| 4218 | ||
| 4219 | fi ;; | |
| 4220 | esac | |
| 4221 | fi | |
| 4222 | CC=$ac_cv_prog_CC | |
| 4223 | if test -n "$CC"; then | |
| 4224 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
| 4225 | printf "%s\n" "$CC" >&6; } | |
| 4226 | else | |
| 4227 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 4228 | printf "%s\n" "no" >&6; } | |
| 4229 | fi | |
| 4230 | ||
| 4231 | ||
| 4232 | test -n "$CC" && break | |
| 4233 | done | |
| 4234 | fi | |
| 4235 | if test -z "$CC"; then | |
| 4236 | ac_ct_CC=$CC | |
| 4237 | for ac_prog in cl.exe | |
| 4238 | do | |
| 4239 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
| 4240 | set dummy $ac_prog; ac_word=$2 | |
| 4241 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 4242 | printf %s "checking for $ac_word... " >&6; } | |
| 4243 | if test ${ac_cv_prog_ac_ct_CC+y} | |
| 4244 | then : | |
| 4245 | printf %s "(cached) " >&6 | |
| 4246 | else case e in #( | |
| 4247 | e) if test -n "$ac_ct_CC"; then | |
| 4248 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
| 4249 | else | |
| 4250 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 4251 | for as_dir in $PATH | |
| 4252 | do | |
| 4253 | IFS=$as_save_IFS | |
| 4254 | case $as_dir in #((( | |
| 4255 | '') as_dir=./ ;; | |
| 4256 | */) ;; | |
| 4257 | *) as_dir=$as_dir/ ;; | |
| 4258 | esac | |
| 4259 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 4260 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 4261 | ac_cv_prog_ac_ct_CC="$ac_prog" | |
| 4262 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 4263 | break 2 | |
| 4264 | fi | |
| 4265 | done | |
| 4266 | done | |
| 4267 | IFS=$as_save_IFS | |
| 4268 | ||
| 4269 | fi ;; | |
| 4270 | esac | |
| 4271 | fi | |
| 4272 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
| 4273 | if test -n "$ac_ct_CC"; then | |
| 4274 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
| 4275 | printf "%s\n" "$ac_ct_CC" >&6; } | |
| 4276 | else | |
| 4277 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 4278 | printf "%s\n" "no" >&6; } | |
| 4279 | fi | |
| 4280 | ||
| 4281 | ||
| 4282 | test -n "$ac_ct_CC" && break | |
| 4283 | done | |
| 4284 | ||
| 4285 | if test "x$ac_ct_CC" = x; then | |
| 4286 | CC="" | |
| 4287 | else | |
| 4288 | case $cross_compiling:$ac_tool_warned in | |
| 4289 | yes:) | |
| 4290 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
| 4291 | printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
| 4292 | ac_tool_warned=yes ;; | |
| 4293 | esac | |
| 4294 | CC=$ac_ct_CC | |
| 4295 | fi | |
| 4296 | fi | |
| 4297 | ||
| 4298 | fi | |
| 4299 | if test -z "$CC"; then | |
| 4300 | if test -n "$ac_tool_prefix"; then | |
| 4301 | # Extract the first word of "${ac_tool_prefix}clang", so it can be a program name with args. | |
| 4302 | set dummy ${ac_tool_prefix}clang; ac_word=$2 | |
| 4303 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 4304 | printf %s "checking for $ac_word... " >&6; } | |
| 4305 | if test ${ac_cv_prog_CC+y} | |
| 4306 | then : | |
| 4307 | printf %s "(cached) " >&6 | |
| 4308 | else case e in #( | |
| 4309 | e) if test -n "$CC"; then | |
| 4310 | ac_cv_prog_CC="$CC" # Let the user override the test. | |
| 4311 | else | |
| 4312 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 4313 | for as_dir in $PATH | |
| 4314 | do | |
| 4315 | IFS=$as_save_IFS | |
| 4316 | case $as_dir in #((( | |
| 4317 | '') as_dir=./ ;; | |
| 4318 | */) ;; | |
| 4319 | *) as_dir=$as_dir/ ;; | |
| 4320 | esac | |
| 4321 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 4322 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 4323 | ac_cv_prog_CC="${ac_tool_prefix}clang" | |
| 4324 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 4325 | break 2 | |
| 4326 | fi | |
| 4327 | done | |
| 4328 | done | |
| 4329 | IFS=$as_save_IFS | |
| 4330 | ||
| 4331 | fi ;; | |
| 4332 | esac | |
| 4333 | fi | |
| 4334 | CC=$ac_cv_prog_CC | |
| 4335 | if test -n "$CC"; then | |
| 4336 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 | |
| 4337 | printf "%s\n" "$CC" >&6; } | |
| 4338 | else | |
| 4339 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 4340 | printf "%s\n" "no" >&6; } | |
| 4341 | fi | |
| 4342 | ||
| 4343 | ||
| 4344 | fi | |
| 4345 | if test -z "$ac_cv_prog_CC"; then | |
| 4346 | ac_ct_CC=$CC | |
| 4347 | # Extract the first word of "clang", so it can be a program name with args. | |
| 4348 | set dummy clang; ac_word=$2 | |
| 4349 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 4350 | printf %s "checking for $ac_word... " >&6; } | |
| 4351 | if test ${ac_cv_prog_ac_ct_CC+y} | |
| 4352 | then : | |
| 4353 | printf %s "(cached) " >&6 | |
| 4354 | else case e in #( | |
| 4355 | e) if test -n "$ac_ct_CC"; then | |
| 4356 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. | |
| 4357 | else | |
| 4358 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 4359 | for as_dir in $PATH | |
| 4360 | do | |
| 4361 | IFS=$as_save_IFS | |
| 4362 | case $as_dir in #((( | |
| 4363 | '') as_dir=./ ;; | |
| 4364 | */) ;; | |
| 4365 | *) as_dir=$as_dir/ ;; | |
| 4366 | esac | |
| 4367 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 4368 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 4369 | ac_cv_prog_ac_ct_CC="clang" | |
| 4370 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 4371 | break 2 | |
| 4372 | fi | |
| 4373 | done | |
| 4374 | done | |
| 4375 | IFS=$as_save_IFS | |
| 4376 | ||
| 4377 | fi ;; | |
| 4378 | esac | |
| 4379 | fi | |
| 4380 | ac_ct_CC=$ac_cv_prog_ac_ct_CC | |
| 4381 | if test -n "$ac_ct_CC"; then | |
| 4382 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 | |
| 4383 | printf "%s\n" "$ac_ct_CC" >&6; } | |
| 4384 | else | |
| 4385 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 4386 | printf "%s\n" "no" >&6; } | |
| 4387 | fi | |
| 4388 | ||
| 4389 | if test "x$ac_ct_CC" = x; then | |
| 4390 | CC="" | |
| 4391 | else | |
| 4392 | case $cross_compiling:$ac_tool_warned in | |
| 4393 | yes:) | |
| 4394 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
| 4395 | printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
| 4396 | ac_tool_warned=yes ;; | |
| 4397 | esac | |
| 4398 | CC=$ac_ct_CC | |
| 4399 | fi | |
| 4400 | else | |
| 4401 | CC="$ac_cv_prog_CC" | |
| 4402 | fi | |
| 4403 | ||
| 4404 | fi | |
| 4405 | ||
| 4406 | ||
| 4407 | test -z "$CC" && { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 4408 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 4409 | as_fn_error $? "no acceptable C compiler found in \$PATH | |
| 4410 | See 'config.log' for more details" "$LINENO" 5; } | |
| 4411 | ||
| 4412 | # Provide some information about the compiler. | |
| 4413 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 | |
| 4414 | set X $ac_compile | |
| 4415 | ac_compiler=$2 | |
| 4416 | for ac_option in --version -v -V -qversion -version; do | |
| 4417 | { { ac_try="$ac_compiler $ac_option >&5" | |
| 4418 | case "(($ac_try" in | |
| 4419 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
| 4420 | *) ac_try_echo=$ac_try;; | |
| 4421 | esac | |
| 4422 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
| 4423 | printf "%s\n" "$ac_try_echo"; } >&5 | |
| 4424 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err | |
| 4425 | ac_status=$? | |
| 4426 | if test -s conftest.err; then | |
| 4427 | sed '10a\ | |
| 4428 | ... rest of stderr output deleted ... | |
| 4429 | 10q' conftest.err >conftest.er1 | |
| 4430 | cat conftest.er1 >&5 | |
| 4431 | fi | |
| 4432 | rm -f conftest.er1 conftest.err | |
| 4433 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
| 4434 | test $ac_status = 0; } | |
| 4435 | done | |
| 4436 | ||
| 4437 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 4438 | /* end confdefs.h. */ | |
| 4439 | ||
| 4440 | int | |
| 4441 | main (void) | |
| 4442 | { | |
| 4443 | ||
| 4444 | ; | |
| 4445 | return 0; | |
| 4446 | } | |
| 4447 | _ACEOF | |
| 4448 | ac_clean_files_save=$ac_clean_files | |
| 4449 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" | |
| 4450 | # Try to create an executable without -o first, disregard a.out. | |
| 4451 | # It will help us diagnose broken compilers, and finding out an intuition | |
| 4452 | # of exeext. | |
| 4453 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 | |
| 4454 | printf %s "checking whether the C compiler works... " >&6; } | |
| 4455 | ac_link_default=`printf "%s\n" "$ac_link" | sed 's/ -o *conftest[^ ]*//'` | |
| 4456 | ||
| 4457 | # The possible output files: | |
| 4458 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" | |
| 4459 | ||
| 4460 | ac_rmfiles= | |
| 4461 | for ac_file in $ac_files | |
| 4462 | do | |
| 4463 | case $ac_file in | |
| 4464 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
| 4465 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; | |
| 4466 | esac | |
| 4467 | done | |
| 4468 | rm -f $ac_rmfiles | |
| 4469 | ||
| 4470 | if { { ac_try="$ac_link_default" | |
| 4471 | case "(($ac_try" in | |
| 4472 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
| 4473 | *) ac_try_echo=$ac_try;; | |
| 4474 | esac | |
| 4475 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
| 4476 | printf "%s\n" "$ac_try_echo"; } >&5 | |
| 4477 | (eval "$ac_link_default") 2>&5 | |
| 4478 | ac_status=$? | |
| 4479 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
| 4480 | test $ac_status = 0; } | |
| 4481 | then : | |
| 4482 | # Autoconf-2.13 could set the ac_cv_exeext variable to 'no'. | |
| 4483 | # So ignore a value of 'no', otherwise this would lead to 'EXEEXT = no' | |
| 4484 | # in a Makefile. We should not override ac_cv_exeext if it was cached, | |
| 4485 | # so that the user can short-circuit this test for compilers unknown to | |
| 4486 | # Autoconf. | |
| 4487 | for ac_file in $ac_files '' | |
| 4488 | do | |
| 4489 | test -f "$ac_file" || continue | |
| 4490 | case $ac_file in | |
| 4491 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) | |
| 4492 | ;; | |
| 4493 | [ab].out ) | |
| 4494 | # We found the default executable, but exeext='' is most | |
| 4495 | # certainly right. | |
| 4496 | break;; | |
| 4497 | *.* ) | |
| 4498 | if test ${ac_cv_exeext+y} && test "$ac_cv_exeext" != no; | |
| 4499 | then :; else | |
| 4500 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
| 4501 | fi | |
| 4502 | # We set ac_cv_exeext here because the later test for it is not | |
| 4503 | # safe: cross compilers may not add the suffix if given an '-o' | |
| 4504 | # argument, so we may need to know it at that point already. | |
| 4505 | # Even if this section looks crufty: it has the advantage of | |
| 4506 | # actually working. | |
| 4507 | break;; | |
| 4508 | * ) | |
| 4509 | break;; | |
| 4510 | esac | |
| 4511 | done | |
| 4512 | test "$ac_cv_exeext" = no && ac_cv_exeext= | |
| 4513 | ||
| 4514 | else case e in #( | |
| 4515 | e) ac_file='' ;; | |
| 4516 | esac | |
| 4517 | fi | |
| 4518 | if test -z "$ac_file" | |
| 4519 | then : | |
| 4520 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 4521 | printf "%s\n" "no" >&6; } | |
| 4522 | printf "%s\n" "$as_me: failed program was:" >&5 | |
| 4523 | sed 's/^/| /' conftest.$ac_ext >&5 | |
| 4524 | ||
| 4525 | { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 4526 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 4527 | as_fn_error 77 "C compiler cannot create executables | |
| 4528 | See 'config.log' for more details" "$LINENO" 5; } | |
| 4529 | else case e in #( | |
| 4530 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
| 4531 | printf "%s\n" "yes" >&6; } ;; | |
| 4532 | esac | |
| 4533 | fi | |
| 4534 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 | |
| 4535 | printf %s "checking for C compiler default output file name... " >&6; } | |
| 4536 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 | |
| 4537 | printf "%s\n" "$ac_file" >&6; } | |
| 4538 | ac_exeext=$ac_cv_exeext | |
| 4539 | ||
| 4540 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out | |
| 4541 | ac_clean_files=$ac_clean_files_save | |
| 4542 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 | |
| 4543 | printf %s "checking for suffix of executables... " >&6; } | |
| 4544 | if { { ac_try="$ac_link" | |
| 4545 | case "(($ac_try" in | |
| 4546 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
| 4547 | *) ac_try_echo=$ac_try;; | |
| 4548 | esac | |
| 4549 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
| 4550 | printf "%s\n" "$ac_try_echo"; } >&5 | |
| 4551 | (eval "$ac_link") 2>&5 | |
| 4552 | ac_status=$? | |
| 4553 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
| 4554 | test $ac_status = 0; } | |
| 4555 | then : | |
| 4556 | # If both 'conftest.exe' and 'conftest' are 'present' (well, observable) | |
| 4557 | # catch 'conftest.exe'. For instance with Cygwin, 'ls conftest' will | |
| 4558 | # work properly (i.e., refer to 'conftest.exe'), while it won't with | |
| 4559 | # 'rm'. | |
| 4560 | for ac_file in conftest.exe conftest conftest.*; do | |
| 4561 | test -f "$ac_file" || continue | |
| 4562 | case $ac_file in | |
| 4563 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; | |
| 4564 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` | |
| 4565 | break;; | |
| 4566 | * ) break;; | |
| 4567 | esac | |
| 4568 | done | |
| 4569 | else case e in #( | |
| 4570 | e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 4571 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 4572 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link | |
| 4573 | See 'config.log' for more details" "$LINENO" 5; } ;; | |
| 4574 | esac | |
| 4575 | fi | |
| 4576 | rm -f conftest conftest$ac_cv_exeext | |
| 4577 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 | |
| 4578 | printf "%s\n" "$ac_cv_exeext" >&6; } | |
| 4579 | ||
| 4580 | rm -f conftest.$ac_ext | |
| 4581 | EXEEXT=$ac_cv_exeext | |
| 4582 | ac_exeext=$EXEEXT | |
| 4583 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 4584 | /* end confdefs.h. */ | |
| 4585 | #include <stdio.h> | |
| 4586 | int | |
| 4587 | main (void) | |
| 4588 | { | |
| 4589 | FILE *f = fopen ("conftest.out", "w"); | |
| 4590 | if (!f) | |
| 4591 | return 1; | |
| 4592 | return ferror (f) || fclose (f) != 0; | |
| 4593 | ||
| 4594 | ; | |
| 4595 | return 0; | |
| 4596 | } | |
| 4597 | _ACEOF | |
| 4598 | ac_clean_files="$ac_clean_files conftest.out" | |
| 4599 | # Check that the compiler produces executables we can run. If not, either | |
| 4600 | # the compiler is broken, or we cross compile. | |
| 4601 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 | |
| 4602 | printf %s "checking whether we are cross compiling... " >&6; } | |
| 4603 | if test "$cross_compiling" != yes; then | |
| 4604 | { { ac_try="$ac_link" | |
| 4605 | case "(($ac_try" in | |
| 4606 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
| 4607 | *) ac_try_echo=$ac_try;; | |
| 4608 | esac | |
| 4609 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
| 4610 | printf "%s\n" "$ac_try_echo"; } >&5 | |
| 4611 | (eval "$ac_link") 2>&5 | |
| 4612 | ac_status=$? | |
| 4613 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
| 4614 | test $ac_status = 0; } | |
| 4615 | if { ac_try='./conftest$ac_cv_exeext' | |
| 4616 | { { case "(($ac_try" in | |
| 4617 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
| 4618 | *) ac_try_echo=$ac_try;; | |
| 4619 | esac | |
| 4620 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
| 4621 | printf "%s\n" "$ac_try_echo"; } >&5 | |
| 4622 | (eval "$ac_try") 2>&5 | |
| 4623 | ac_status=$? | |
| 4624 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
| 4625 | test $ac_status = 0; }; }; then | |
| 4626 | cross_compiling=no | |
| 4627 | else | |
| 4628 | if test "$cross_compiling" = maybe; then | |
| 4629 | cross_compiling=yes | |
| 4630 | else | |
| 4631 | { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 4632 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 4633 | as_fn_error 77 "cannot run C compiled programs. | |
| 4634 | If you meant to cross compile, use '--host'. | |
| 4635 | See 'config.log' for more details" "$LINENO" 5; } | |
| 4636 | fi | |
| 4637 | fi | |
| 4638 | fi | |
| 4639 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 | |
| 4640 | printf "%s\n" "$cross_compiling" >&6; } | |
| 4641 | ||
| 4642 | rm -f conftest.$ac_ext conftest$ac_cv_exeext \ | |
| 4643 | conftest.o conftest.obj conftest.out | |
| 4644 | ac_clean_files=$ac_clean_files_save | |
| 4645 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 | |
| 4646 | printf %s "checking for suffix of object files... " >&6; } | |
| 4647 | if test ${ac_cv_objext+y} | |
| 4648 | then : | |
| 4649 | printf %s "(cached) " >&6 | |
| 4650 | else case e in #( | |
| 4651 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 4652 | /* end confdefs.h. */ | |
| 4653 | ||
| 4654 | int | |
| 4655 | main (void) | |
| 4656 | { | |
| 4657 | ||
| 4658 | ; | |
| 4659 | return 0; | |
| 4660 | } | |
| 4661 | _ACEOF | |
| 4662 | rm -f conftest.o conftest.obj | |
| 4663 | if { { ac_try="$ac_compile" | |
| 4664 | case "(($ac_try" in | |
| 4665 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; | |
| 4666 | *) ac_try_echo=$ac_try;; | |
| 4667 | esac | |
| 4668 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" | |
| 4669 | printf "%s\n" "$ac_try_echo"; } >&5 | |
| 4670 | (eval "$ac_compile") 2>&5 | |
| 4671 | ac_status=$? | |
| 4672 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 | |
| 4673 | test $ac_status = 0; } | |
| 4674 | then : | |
| 4675 | for ac_file in conftest.o conftest.obj conftest.*; do | |
| 4676 | test -f "$ac_file" || continue; | |
| 4677 | case $ac_file in | |
| 4678 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; | |
| 4679 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` | |
| 4680 | break;; | |
| 4681 | esac | |
| 4682 | done | |
| 4683 | else case e in #( | |
| 4684 | e) printf "%s\n" "$as_me: failed program was:" >&5 | |
| 4685 | sed 's/^/| /' conftest.$ac_ext >&5 | |
| 4686 | ||
| 4687 | { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 4688 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 4689 | as_fn_error $? "cannot compute suffix of object files: cannot compile | |
| 4690 | See 'config.log' for more details" "$LINENO" 5; } ;; | |
| 4691 | esac | |
| 4692 | fi | |
| 4693 | rm -f conftest.$ac_cv_objext conftest.$ac_ext ;; | |
| 4694 | esac | |
| 4695 | fi | |
| 4696 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 | |
| 4697 | printf "%s\n" "$ac_cv_objext" >&6; } | |
| 4698 | OBJEXT=$ac_cv_objext | |
| 4699 | ac_objext=$OBJEXT | |
| 4700 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the compiler supports GNU C" >&5 | |
| 4701 | printf %s "checking whether the compiler supports GNU C... " >&6; } | |
| 4702 | if test ${ac_cv_c_compiler_gnu+y} | |
| 4703 | then : | |
| 4704 | printf %s "(cached) " >&6 | |
| 4705 | else case e in #( | |
| 4706 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 4707 | /* end confdefs.h. */ | |
| 4708 | ||
| 4709 | int | |
| 4710 | main (void) | |
| 4711 | { | |
| 4712 | #ifndef __GNUC__ | |
| 4713 | choke me | |
| 4714 | #endif | |
| 4715 | ||
| 4716 | ; | |
| 4717 | return 0; | |
| 4718 | } | |
| 4719 | _ACEOF | |
| 4720 | if ac_fn_c_try_compile "$LINENO" | |
| 4721 | then : | |
| 4722 | ac_compiler_gnu=yes | |
| 4723 | else case e in #( | |
| 4724 | e) ac_compiler_gnu=no ;; | |
| 4725 | esac | |
| 4726 | fi | |
| 4727 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 4728 | ac_cv_c_compiler_gnu=$ac_compiler_gnu | |
| 4729 | ;; | |
| 4730 | esac | |
| 4731 | fi | |
| 4732 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 | |
| 4733 | printf "%s\n" "$ac_cv_c_compiler_gnu" >&6; } | |
| 4734 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
| 4735 | ||
| 4736 | if test $ac_compiler_gnu = yes; then | |
| 4737 | GCC=yes | |
| 4738 | else | |
| 4739 | GCC= | |
| 4740 | fi | |
| 4741 | ac_test_CFLAGS=${CFLAGS+y} | |
| 4742 | ac_save_CFLAGS=$CFLAGS | |
| 4743 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 | |
| 4744 | printf %s "checking whether $CC accepts -g... " >&6; } | |
| 4745 | if test ${ac_cv_prog_cc_g+y} | |
| 4746 | then : | |
| 4747 | printf %s "(cached) " >&6 | |
| 4748 | else case e in #( | |
| 4749 | e) ac_save_c_werror_flag=$ac_c_werror_flag | |
| 4750 | ac_c_werror_flag=yes | |
| 4751 | ac_cv_prog_cc_g=no | |
| 4752 | CFLAGS="-g" | |
| 4753 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 4754 | /* end confdefs.h. */ | |
| 4755 | ||
| 4756 | int | |
| 4757 | main (void) | |
| 4758 | { | |
| 4759 | ||
| 4760 | ; | |
| 4761 | return 0; | |
| 4762 | } | |
| 4763 | _ACEOF | |
| 4764 | if ac_fn_c_try_compile "$LINENO" | |
| 4765 | then : | |
| 4766 | ac_cv_prog_cc_g=yes | |
| 4767 | else case e in #( | |
| 4768 | e) CFLAGS="" | |
| 4769 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 4770 | /* end confdefs.h. */ | |
| 4771 | ||
| 4772 | int | |
| 4773 | main (void) | |
| 4774 | { | |
| 4775 | ||
| 4776 | ; | |
| 4777 | return 0; | |
| 4778 | } | |
| 4779 | _ACEOF | |
| 4780 | if ac_fn_c_try_compile "$LINENO" | |
| 4781 | then : | |
| 4782 | ||
| 4783 | else case e in #( | |
| 4784 | e) ac_c_werror_flag=$ac_save_c_werror_flag | |
| 4785 | CFLAGS="-g" | |
| 4786 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 4787 | /* end confdefs.h. */ | |
| 4788 | ||
| 4789 | int | |
| 4790 | main (void) | |
| 4791 | { | |
| 4792 | ||
| 4793 | ; | |
| 4794 | return 0; | |
| 4795 | } | |
| 4796 | _ACEOF | |
| 4797 | if ac_fn_c_try_compile "$LINENO" | |
| 4798 | then : | |
| 4799 | ac_cv_prog_cc_g=yes | |
| 4800 | fi | |
| 4801 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 4802 | esac | |
| 4803 | fi | |
| 4804 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 4805 | esac | |
| 4806 | fi | |
| 4807 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 4808 | ac_c_werror_flag=$ac_save_c_werror_flag ;; | |
| 4809 | esac | |
| 4810 | fi | |
| 4811 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 | |
| 4812 | printf "%s\n" "$ac_cv_prog_cc_g" >&6; } | |
| 4813 | if test $ac_test_CFLAGS; then | |
| 4814 | CFLAGS=$ac_save_CFLAGS | |
| 4815 | elif test $ac_cv_prog_cc_g = yes; then | |
| 4816 | if test "$GCC" = yes; then | |
| 4817 | CFLAGS="-g -O2" | |
| 4818 | else | |
| 4819 | CFLAGS="-g" | |
| 4820 | fi | |
| 4821 | else | |
| 4822 | if test "$GCC" = yes; then | |
| 4823 | CFLAGS="-O2" | |
| 4824 | else | |
| 4825 | CFLAGS= | |
| 4826 | fi | |
| 4827 | fi | |
| 4828 | ac_prog_cc_stdc=no | |
| 4829 | if test x$ac_prog_cc_stdc = xno | |
| 4830 | then : | |
| 4831 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C11 features" >&5 | |
| 4832 | printf %s "checking for $CC option to enable C11 features... " >&6; } | |
| 4833 | if test ${ac_cv_prog_cc_c11+y} | |
| 4834 | then : | |
| 4835 | printf %s "(cached) " >&6 | |
| 4836 | else case e in #( | |
| 4837 | e) ac_cv_prog_cc_c11=no | |
| 4838 | ac_save_CC=$CC | |
| 4839 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 4840 | /* end confdefs.h. */ | |
| 4841 | $ac_c_conftest_c11_program | |
| 4842 | _ACEOF | |
| 4843 | for ac_arg in '' -std=gnu11 | |
| 4844 | do | |
| 4845 | CC="$ac_save_CC $ac_arg" | |
| 4846 | if ac_fn_c_try_compile "$LINENO" | |
| 4847 | then : | |
| 4848 | ac_cv_prog_cc_c11=$ac_arg | |
| 4849 | fi | |
| 4850 | rm -f core conftest.err conftest.$ac_objext conftest.beam | |
| 4851 | test "x$ac_cv_prog_cc_c11" != "xno" && break | |
| 4852 | done | |
| 4853 | rm -f conftest.$ac_ext | |
| 4854 | CC=$ac_save_CC ;; | |
| 4855 | esac | |
| 4856 | fi | |
| 4857 | ||
| 4858 | if test "x$ac_cv_prog_cc_c11" = xno | |
| 4859 | then : | |
| 4860 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
| 4861 | printf "%s\n" "unsupported" >&6; } | |
| 4862 | else case e in #( | |
| 4863 | e) if test "x$ac_cv_prog_cc_c11" = x | |
| 4864 | then : | |
| 4865 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
| 4866 | printf "%s\n" "none needed" >&6; } | |
| 4867 | else case e in #( | |
| 4868 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c11" >&5 | |
| 4869 | printf "%s\n" "$ac_cv_prog_cc_c11" >&6; } | |
| 4870 | CC="$CC $ac_cv_prog_cc_c11" ;; | |
| 4871 | esac | |
| 4872 | fi | |
| 4873 | ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c11 | |
| 4874 | ac_prog_cc_stdc=c11 ;; | |
| 4875 | esac | |
| 4876 | fi | |
| 4877 | fi | |
| 4878 | if test x$ac_prog_cc_stdc = xno | |
| 4879 | then : | |
| 4880 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C99 features" >&5 | |
| 4881 | printf %s "checking for $CC option to enable C99 features... " >&6; } | |
| 4882 | if test ${ac_cv_prog_cc_c99+y} | |
| 4883 | then : | |
| 4884 | printf %s "(cached) " >&6 | |
| 4885 | else case e in #( | |
| 4886 | e) ac_cv_prog_cc_c99=no | |
| 4887 | ac_save_CC=$CC | |
| 4888 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 4889 | /* end confdefs.h. */ | |
| 4890 | $ac_c_conftest_c99_program | |
| 4891 | _ACEOF | |
| 4892 | for ac_arg in '' -std=gnu99 -std=c99 -c99 -qlanglvl=extc1x -qlanglvl=extc99 -AC99 -D_STDC_C99= | |
| 4893 | do | |
| 4894 | CC="$ac_save_CC $ac_arg" | |
| 4895 | if ac_fn_c_try_compile "$LINENO" | |
| 4896 | then : | |
| 4897 | ac_cv_prog_cc_c99=$ac_arg | |
| 4898 | fi | |
| 4899 | rm -f core conftest.err conftest.$ac_objext conftest.beam | |
| 4900 | test "x$ac_cv_prog_cc_c99" != "xno" && break | |
| 4901 | done | |
| 4902 | rm -f conftest.$ac_ext | |
| 4903 | CC=$ac_save_CC ;; | |
| 4904 | esac | |
| 4905 | fi | |
| 4906 | ||
| 4907 | if test "x$ac_cv_prog_cc_c99" = xno | |
| 4908 | then : | |
| 4909 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
| 4910 | printf "%s\n" "unsupported" >&6; } | |
| 4911 | else case e in #( | |
| 4912 | e) if test "x$ac_cv_prog_cc_c99" = x | |
| 4913 | then : | |
| 4914 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
| 4915 | printf "%s\n" "none needed" >&6; } | |
| 4916 | else case e in #( | |
| 4917 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c99" >&5 | |
| 4918 | printf "%s\n" "$ac_cv_prog_cc_c99" >&6; } | |
| 4919 | CC="$CC $ac_cv_prog_cc_c99" ;; | |
| 4920 | esac | |
| 4921 | fi | |
| 4922 | ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c99 | |
| 4923 | ac_prog_cc_stdc=c99 ;; | |
| 4924 | esac | |
| 4925 | fi | |
| 4926 | fi | |
| 4927 | if test x$ac_prog_cc_stdc = xno | |
| 4928 | then : | |
| 4929 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable C89 features" >&5 | |
| 4930 | printf %s "checking for $CC option to enable C89 features... " >&6; } | |
| 4931 | if test ${ac_cv_prog_cc_c89+y} | |
| 4932 | then : | |
| 4933 | printf %s "(cached) " >&6 | |
| 4934 | else case e in #( | |
| 4935 | e) ac_cv_prog_cc_c89=no | |
| 4936 | ac_save_CC=$CC | |
| 4937 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 4938 | /* end confdefs.h. */ | |
| 4939 | $ac_c_conftest_c89_program | |
| 4940 | _ACEOF | |
| 4941 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" | |
| 4942 | do | |
| 4943 | CC="$ac_save_CC $ac_arg" | |
| 4944 | if ac_fn_c_try_compile "$LINENO" | |
| 4945 | then : | |
| 4946 | ac_cv_prog_cc_c89=$ac_arg | |
| 4947 | fi | |
| 4948 | rm -f core conftest.err conftest.$ac_objext conftest.beam | |
| 4949 | test "x$ac_cv_prog_cc_c89" != "xno" && break | |
| 4950 | done | |
| 4951 | rm -f conftest.$ac_ext | |
| 4952 | CC=$ac_save_CC ;; | |
| 4953 | esac | |
| 4954 | fi | |
| 4955 | ||
| 4956 | if test "x$ac_cv_prog_cc_c89" = xno | |
| 4957 | then : | |
| 4958 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 | |
| 4959 | printf "%s\n" "unsupported" >&6; } | |
| 4960 | else case e in #( | |
| 4961 | e) if test "x$ac_cv_prog_cc_c89" = x | |
| 4962 | then : | |
| 4963 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 | |
| 4964 | printf "%s\n" "none needed" >&6; } | |
| 4965 | else case e in #( | |
| 4966 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 | |
| 4967 | printf "%s\n" "$ac_cv_prog_cc_c89" >&6; } | |
| 4968 | CC="$CC $ac_cv_prog_cc_c89" ;; | |
| 4969 | esac | |
| 4970 | fi | |
| 4971 | ac_cv_prog_cc_stdc=$ac_cv_prog_cc_c89 | |
| 4972 | ac_prog_cc_stdc=c89 ;; | |
| 4973 | esac | |
| 4974 | fi | |
| 4975 | fi | |
| 4976 | ||
| 4977 | ac_ext=c | |
| 4978 | ac_cpp='$CPP $CPPFLAGS' | |
| 4979 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
| 4980 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
| 4981 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
| 4982 | ||
| 4983 | ||
| 4984 | if test -n "$want_auto_cflags"; then | |
| 4985 | AUTO_CFLAGS="-g ${GCC:+-O2}" | |
| 4986 | AUTO_LDFLAGS="-g ${GCC:+-O2}" | |
| 4987 | # STYLE_CFLAGS="${GCC:+-Wno-parentheses} ${GCC:+-Wno-format-security} ${GCC:+-Wno-tautological-constant-out-of-range-compare}" | |
| 4988 | STYLE_CFLAGS="${GCC:+-Wno-parentheses} ${GCC:+-Wno-format-security}" | |
| 4989 | else | |
| 4990 | AUTO_CFLAGS= AUTO_LDFLAGS= STYLE_CFLAGS= | |
| 4991 | fi | |
| 4992 | ||
| 4993 | ||
| 4994 | ac_header= ac_cache= | |
| 4995 | for ac_item in $ac_header_c_list | |
| 4996 | do | |
| 4997 | if test $ac_cache; then | |
| 4998 | ac_fn_c_check_header_compile "$LINENO" $ac_header ac_cv_header_$ac_cache "$ac_includes_default" | |
| 4999 | if eval test \"x\$ac_cv_header_$ac_cache\" = xyes; then | |
| 5000 | printf "%s\n" "#define $ac_item 1" >> confdefs.h | |
| 5001 | fi | |
| 5002 | ac_header= ac_cache= | |
| 5003 | elif test $ac_header; then | |
| 5004 | ac_cache=$ac_item | |
| 5005 | else | |
| 5006 | ac_header=$ac_item | |
| 5007 | fi | |
| 5008 | done | |
| 5009 | ||
| 5010 | ||
| 5011 | ||
| 5012 | ||
| 5013 | ||
| 5014 | ||
| 5015 | ||
| 5016 | ||
| 5017 | if test $ac_cv_header_stdlib_h = yes && test $ac_cv_header_string_h = yes | |
| 5018 | then : | |
| 5019 | ||
| 5020 | printf "%s\n" "#define STDC_HEADERS 1" >>confdefs.h | |
| 5021 | ||
| 5022 | fi | |
| 5023 | ||
| 5024 | ||
| 5025 | ||
| 5026 | ||
| 5027 | ||
| 5028 | ||
| 5029 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 | |
| 5030 | printf %s "checking whether it is safe to define __EXTENSIONS__... " >&6; } | |
| 5031 | if test ${ac_cv_safe_to_define___extensions__+y} | |
| 5032 | then : | |
| 5033 | printf %s "(cached) " >&6 | |
| 5034 | else case e in #( | |
| 5035 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 5036 | /* end confdefs.h. */ | |
| 5037 | ||
| 5038 | # define __EXTENSIONS__ 1 | |
| 5039 | $ac_includes_default | |
| 5040 | int | |
| 5041 | main (void) | |
| 5042 | { | |
| 5043 | ||
| 5044 | ; | |
| 5045 | return 0; | |
| 5046 | } | |
| 5047 | _ACEOF | |
| 5048 | if ac_fn_c_try_compile "$LINENO" | |
| 5049 | then : | |
| 5050 | ac_cv_safe_to_define___extensions__=yes | |
| 5051 | else case e in #( | |
| 5052 | e) ac_cv_safe_to_define___extensions__=no ;; | |
| 5053 | esac | |
| 5054 | fi | |
| 5055 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 5056 | esac | |
| 5057 | fi | |
| 5058 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 | |
| 5059 | printf "%s\n" "$ac_cv_safe_to_define___extensions__" >&6; } | |
| 5060 | ||
| 5061 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether _XOPEN_SOURCE should be defined" >&5 | |
| 5062 | printf %s "checking whether _XOPEN_SOURCE should be defined... " >&6; } | |
| 5063 | if test ${ac_cv_should_define__xopen_source+y} | |
| 5064 | then : | |
| 5065 | printf %s "(cached) " >&6 | |
| 5066 | else case e in #( | |
| 5067 | e) ac_cv_should_define__xopen_source=no | |
| 5068 | if test $ac_cv_header_wchar_h = yes | |
| 5069 | then : | |
| 5070 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 5071 | /* end confdefs.h. */ | |
| 5072 | ||
| 5073 | #include <wchar.h> | |
| 5074 | mbstate_t x; | |
| 5075 | int | |
| 5076 | main (void) | |
| 5077 | { | |
| 5078 | ||
| 5079 | ; | |
| 5080 | return 0; | |
| 5081 | } | |
| 5082 | _ACEOF | |
| 5083 | if ac_fn_c_try_compile "$LINENO" | |
| 5084 | then : | |
| 5085 | ||
| 5086 | else case e in #( | |
| 5087 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 5088 | /* end confdefs.h. */ | |
| 5089 | ||
| 5090 | #define _XOPEN_SOURCE 500 | |
| 5091 | #include <wchar.h> | |
| 5092 | mbstate_t x; | |
| 5093 | int | |
| 5094 | main (void) | |
| 5095 | { | |
| 5096 | ||
| 5097 | ; | |
| 5098 | return 0; | |
| 5099 | } | |
| 5100 | _ACEOF | |
| 5101 | if ac_fn_c_try_compile "$LINENO" | |
| 5102 | then : | |
| 5103 | ac_cv_should_define__xopen_source=yes | |
| 5104 | fi | |
| 5105 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 5106 | esac | |
| 5107 | fi | |
| 5108 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 5109 | fi ;; | |
| 5110 | esac | |
| 5111 | fi | |
| 5112 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_should_define__xopen_source" >&5 | |
| 5113 | printf "%s\n" "$ac_cv_should_define__xopen_source" >&6; } | |
| 5114 | ||
| 5115 | printf "%s\n" "#define _ALL_SOURCE 1" >>confdefs.h | |
| 5116 | ||
| 5117 | printf "%s\n" "#define _DARWIN_C_SOURCE 1" >>confdefs.h | |
| 5118 | ||
| 5119 | printf "%s\n" "#define _GNU_SOURCE 1" >>confdefs.h | |
| 5120 | ||
| 5121 | printf "%s\n" "#define _HPUX_ALT_XOPEN_SOCKET_API 1" >>confdefs.h | |
| 5122 | ||
| 5123 | printf "%s\n" "#define _NETBSD_SOURCE 1" >>confdefs.h | |
| 5124 | ||
| 5125 | printf "%s\n" "#define _OPENBSD_SOURCE 1" >>confdefs.h | |
| 5126 | ||
| 5127 | printf "%s\n" "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h | |
| 5128 | ||
| 5129 | printf "%s\n" "#define __STDC_WANT_IEC_60559_ATTRIBS_EXT__ 1" >>confdefs.h | |
| 5130 | ||
| 5131 | printf "%s\n" "#define __STDC_WANT_IEC_60559_BFP_EXT__ 1" >>confdefs.h | |
| 5132 | ||
| 5133 | printf "%s\n" "#define __STDC_WANT_IEC_60559_DFP_EXT__ 1" >>confdefs.h | |
| 5134 | ||
| 5135 | printf "%s\n" "#define __STDC_WANT_IEC_60559_EXT__ 1" >>confdefs.h | |
| 5136 | ||
| 5137 | printf "%s\n" "#define __STDC_WANT_IEC_60559_FUNCS_EXT__ 1" >>confdefs.h | |
| 5138 | ||
| 5139 | printf "%s\n" "#define __STDC_WANT_IEC_60559_TYPES_EXT__ 1" >>confdefs.h | |
| 5140 | ||
| 5141 | printf "%s\n" "#define __STDC_WANT_LIB_EXT2__ 1" >>confdefs.h | |
| 5142 | ||
| 5143 | printf "%s\n" "#define __STDC_WANT_MATH_SPEC_FUNCS__ 1" >>confdefs.h | |
| 5144 | ||
| 5145 | printf "%s\n" "#define _TANDEM_SOURCE 1" >>confdefs.h | |
| 5146 | ||
| 5147 | if test $ac_cv_header_minix_config_h = yes | |
| 5148 | then : | |
| 5149 | MINIX=yes | |
| 5150 | printf "%s\n" "#define _MINIX 1" >>confdefs.h | |
| 5151 | ||
| 5152 | printf "%s\n" "#define _POSIX_SOURCE 1" >>confdefs.h | |
| 5153 | ||
| 5154 | printf "%s\n" "#define _POSIX_1_SOURCE 2" >>confdefs.h | |
| 5155 | ||
| 5156 | else case e in #( | |
| 5157 | e) MINIX= ;; | |
| 5158 | esac | |
| 5159 | fi | |
| 5160 | if test $ac_cv_safe_to_define___extensions__ = yes | |
| 5161 | then : | |
| 5162 | printf "%s\n" "#define __EXTENSIONS__ 1" >>confdefs.h | |
| 5163 | ||
| 5164 | fi | |
| 5165 | if test $ac_cv_should_define__xopen_source = yes | |
| 5166 | then : | |
| 5167 | printf "%s\n" "#define _XOPEN_SOURCE 500" >>confdefs.h | |
| 5168 | ||
| 5169 | fi | |
| 5170 | ||
| 5171 | # Check whether --enable-largefile was given. | |
| 5172 | if test ${enable_largefile+y} | |
| 5173 | then : | |
| 5174 | enableval=$enable_largefile; | |
| 5175 | fi | |
| 5176 | if test "$enable_largefile,$enable_year2038" != no,no | |
| 5177 | then : | |
| 5178 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option to enable large file support" >&5 | |
| 5179 | printf %s "checking for $CC option to enable large file support... " >&6; } | |
| 5180 | if test ${ac_cv_sys_largefile_opts+y} | |
| 5181 | then : | |
| 5182 | printf %s "(cached) " >&6 | |
| 5183 | else case e in #( | |
| 5184 | e) ac_save_CC="$CC" | |
| 5185 | ac_opt_found=no | |
| 5186 | for ac_opt in "none needed" "-D_FILE_OFFSET_BITS=64" "-D_LARGE_FILES=1" "-n32"; do | |
| 5187 | if test x"$ac_opt" != x"none needed" | |
| 5188 | then : | |
| 5189 | CC="$ac_save_CC $ac_opt" | |
| 5190 | fi | |
| 5191 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 5192 | /* end confdefs.h. */ | |
| 5193 | #include <sys/types.h> | |
| 5194 | #ifndef FTYPE | |
| 5195 | # define FTYPE off_t | |
| 5196 | #endif | |
| 5197 | /* Check that FTYPE can represent 2**63 - 1 correctly. | |
| 5198 | We can't simply define LARGE_FTYPE to be 9223372036854775807, | |
| 5199 | since some C++ compilers masquerading as C compilers | |
| 5200 | incorrectly reject 9223372036854775807. */ | |
| 5201 | #define LARGE_FTYPE (((FTYPE) 1 << 31 << 31) - 1 + ((FTYPE) 1 << 31 << 31)) | |
| 5202 | int FTYPE_is_large[(LARGE_FTYPE % 2147483629 == 721 | |
| 5203 | && LARGE_FTYPE % 2147483647 == 1) | |
| 5204 | ? 1 : -1]; | |
| 5205 | int | |
| 5206 | main (void) | |
| 5207 | { | |
| 5208 | ||
| 5209 | ; | |
| 5210 | return 0; | |
| 5211 | } | |
| 5212 | _ACEOF | |
| 5213 | if ac_fn_c_try_compile "$LINENO" | |
| 5214 | then : | |
| 5215 | if test x"$ac_opt" = x"none needed" | |
| 5216 | then : | |
| 5217 | # GNU/Linux s390x and alpha need _FILE_OFFSET_BITS=64 for wide ino_t. | |
| 5218 | CC="$CC -DFTYPE=ino_t" | |
| 5219 | if ac_fn_c_try_compile "$LINENO" | |
| 5220 | then : | |
| 5221 | ||
| 5222 | else case e in #( | |
| 5223 | e) CC="$CC -D_FILE_OFFSET_BITS=64" | |
| 5224 | if ac_fn_c_try_compile "$LINENO" | |
| 5225 | then : | |
| 5226 | ac_opt='-D_FILE_OFFSET_BITS=64' | |
| 5227 | fi | |
| 5228 | rm -f core conftest.err conftest.$ac_objext conftest.beam ;; | |
| 5229 | esac | |
| 5230 | fi | |
| 5231 | rm -f core conftest.err conftest.$ac_objext conftest.beam | |
| 5232 | fi | |
| 5233 | ac_cv_sys_largefile_opts=$ac_opt | |
| 5234 | ac_opt_found=yes | |
| 5235 | fi | |
| 5236 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 5237 | test $ac_opt_found = no || break | |
| 5238 | done | |
| 5239 | CC="$ac_save_CC" | |
| 5240 | ||
| 5241 | test $ac_opt_found = yes || ac_cv_sys_largefile_opts="support not detected" ;; | |
| 5242 | esac | |
| 5243 | fi | |
| 5244 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_opts" >&5 | |
| 5245 | printf "%s\n" "$ac_cv_sys_largefile_opts" >&6; } | |
| 5246 | ||
| 5247 | ac_have_largefile=yes | |
| 5248 | case $ac_cv_sys_largefile_opts in #( | |
| 5249 | "none needed") : | |
| 5250 | ;; #( | |
| 5251 | "supported through gnulib") : | |
| 5252 | ;; #( | |
| 5253 | "support not detected") : | |
| 5254 | ac_have_largefile=no ;; #( | |
| 5255 | "-D_FILE_OFFSET_BITS=64") : | |
| 5256 | ||
| 5257 | printf "%s\n" "#define _FILE_OFFSET_BITS 64" >>confdefs.h | |
| 5258 | ;; #( | |
| 5259 | "-D_LARGE_FILES=1") : | |
| 5260 | ||
| 5261 | printf "%s\n" "#define _LARGE_FILES 1" >>confdefs.h | |
| 5262 | ;; #( | |
| 5263 | "-n32") : | |
| 5264 | CC="$CC -n32" ;; #( | |
| 5265 | *) : | |
| 5266 | as_fn_error $? "internal error: bad value for \$ac_cv_sys_largefile_opts" "$LINENO" 5 ;; | |
| 5267 | esac | |
| 5268 | ||
| 5269 | if test "$enable_year2038" != no | |
| 5270 | then : | |
| 5271 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC option for timestamps after 2038" >&5 | |
| 5272 | printf %s "checking for $CC option for timestamps after 2038... " >&6; } | |
| 5273 | if test ${ac_cv_sys_year2038_opts+y} | |
| 5274 | then : | |
| 5275 | printf %s "(cached) " >&6 | |
| 5276 | else case e in #( | |
| 5277 | e) ac_save_CPPFLAGS="$CPPFLAGS" | |
| 5278 | ac_opt_found=no | |
| 5279 | for ac_opt in "none needed" "-D_TIME_BITS=64" "-D__MINGW_USE_VC2005_COMPAT" "-U_USE_32_BIT_TIME_T -D__MINGW_USE_VC2005_COMPAT"; do | |
| 5280 | if test x"$ac_opt" != x"none needed" | |
| 5281 | then : | |
| 5282 | CPPFLAGS="$ac_save_CPPFLAGS $ac_opt" | |
| 5283 | fi | |
| 5284 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 5285 | /* end confdefs.h. */ | |
| 5286 | ||
| 5287 | #include <time.h> | |
| 5288 | /* Check that time_t can represent 2**32 - 1 correctly. */ | |
| 5289 | #define LARGE_TIME_T \\ | |
| 5290 | ((time_t) (((time_t) 1 << 30) - 1 + 3 * ((time_t) 1 << 30))) | |
| 5291 | int verify_time_t_range[(LARGE_TIME_T / 65537 == 65535 | |
| 5292 | && LARGE_TIME_T % 65537 == 0) | |
| 5293 | ? 1 : -1]; | |
| 5294 | ||
| 5295 | int | |
| 5296 | main (void) | |
| 5297 | { | |
| 5298 | ||
| 5299 | ; | |
| 5300 | return 0; | |
| 5301 | } | |
| 5302 | _ACEOF | |
| 5303 | if ac_fn_c_try_compile "$LINENO" | |
| 5304 | then : | |
| 5305 | ac_cv_sys_year2038_opts="$ac_opt" | |
| 5306 | ac_opt_found=yes | |
| 5307 | fi | |
| 5308 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 5309 | test $ac_opt_found = no || break | |
| 5310 | done | |
| 5311 | CPPFLAGS="$ac_save_CPPFLAGS" | |
| 5312 | test $ac_opt_found = yes || ac_cv_sys_year2038_opts="support not detected" ;; | |
| 5313 | esac | |
| 5314 | fi | |
| 5315 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_year2038_opts" >&5 | |
| 5316 | printf "%s\n" "$ac_cv_sys_year2038_opts" >&6; } | |
| 5317 | ||
| 5318 | ac_have_year2038=yes | |
| 5319 | case $ac_cv_sys_year2038_opts in #( | |
| 5320 | "none needed") : | |
| 5321 | ;; #( | |
| 5322 | "support not detected") : | |
| 5323 | ac_have_year2038=no ;; #( | |
| 5324 | "-D_TIME_BITS=64") : | |
| 5325 | ||
| 5326 | printf "%s\n" "#define _TIME_BITS 64" >>confdefs.h | |
| 5327 | ;; #( | |
| 5328 | "-D__MINGW_USE_VC2005_COMPAT") : | |
| 5329 | ||
| 5330 | printf "%s\n" "#define __MINGW_USE_VC2005_COMPAT 1" >>confdefs.h | |
| 5331 | ;; #( | |
| 5332 | "-U_USE_32_BIT_TIME_T"*) : | |
| 5333 | { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 5334 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 5335 | as_fn_error $? "the 'time_t' type is currently forced to be 32-bit. It | |
| 5336 | will stop working after mid-January 2038. Remove | |
| 5337 | _USE_32BIT_TIME_T from the compiler flags. | |
| 5338 | See 'config.log' for more details" "$LINENO" 5; } ;; #( | |
| 5339 | *) : | |
| 5340 | as_fn_error $? "internal error: bad value for \$ac_cv_sys_year2038_opts" "$LINENO" 5 ;; | |
| 5341 | esac | |
| 5342 | ||
| 5343 | fi | |
| 5344 | ||
| 5345 | fi | |
| 5346 | ||
| 5347 | ||
| 5348 | SIGNAMES_O= | |
| 5349 | SIGNAMES_H=lsignames.h | |
| 5350 | ||
| 5351 | ||
| 5352 | ||
| 5353 | CROSS_COMPILE= | |
| 5354 | if test "x$cross_compiling" = "xyes"; then | |
| 5355 | # case "${host}" in | |
| 5356 | # *-cygwin*) | |
| 5357 | # cross_cache=${srcdir}/cross-build/cygwin32.cache | |
| 5358 | # ;; | |
| 5359 | # *-msys*) | |
| 5360 | # cross_cache=${srcdir}/cross-build/msys32.cache | |
| 5361 | # ;; | |
| 5362 | # *-mingw*) | |
| 5363 | # cross_cache=${srcdir}/cross-build/cygwin32.cache | |
| 5364 | # ;; | |
| 5365 | # i[[3456]]86-*-beos*) | |
| 5366 | # cross_cache=${srcdir}/cross-build/x86-beos.cache | |
| 5367 | # ;; | |
| 5368 | # *-qnx*) | |
| 5369 | # cross_cache=${srcdir}/cross-build/qnx.cache | |
| 5370 | # ;; | |
| 5371 | # *) echo "configure: cross-compiling for $host is not supported" >&2 | |
| 5372 | # ;; | |
| 5373 | # esac | |
| 5374 | # if test -n "${cross_cache}" && test -r "${cross_cache}"; then | |
| 5375 | # echo "loading cross-build cache file ${cross_cache}" | |
| 5376 | # . ${cross_cache} | |
| 5377 | # fi | |
| 5378 | # unset cross_cache | |
| 5379 | SIGNAMES_O='signames.o' | |
| 5380 | CROSS_COMPILE='-DCROSS_COMPILING' | |
| 5381 | ||
| 5382 | fi | |
| 5383 | ||
| 5384 | ||
| 5385 | ||
| 5386 | ||
| 5387 | CFLAGS=${CFLAGS-"$AUTO_CFLAGS"} | |
| 5388 | # LDFLAGS=${LDFLAGS="$AUTO_LDFLAGS"} # XXX | |
| 5389 | ||
| 5390 | if test "$opt_profiling" = "yes"; then | |
| 5391 | PROFILE_FLAGS=-pg | |
| 5392 | case "$host_os" in | |
| 5393 | solaris2*|linux*|darwin*) ;; | |
| 5394 | *) opt_static_link=yes ;; | |
| 5395 | esac | |
| 5396 | DEBUG= MALLOC_DEBUG= | |
| 5397 | fi | |
| 5398 | ||
| 5399 | prefer_shared=yes | |
| 5400 | prefer_static=no | |
| 5401 | ||
| 5402 | if test "$opt_static_link" = yes; then | |
| 5403 | prefer_static=yes | |
| 5404 | prefer_shared=no | |
| 5405 | # if we're using gcc, add `-static' to LDFLAGS, except on Solaris >= 2 | |
| 5406 | if test "$GCC" = "yes"; then | |
| 5407 | STATIC_LD="-static" | |
| 5408 | case "$host_os" in | |
| 5409 | solaris2*) ;; | |
| 5410 | linux*) test "$opt_profiling" = "no" && LDFLAGS="$LDFLAGS -static" ;; | |
| 5411 | *) LDFLAGS="$LDFLAGS -static" ;; # XXX experimental | |
| 5412 | esac | |
| 5413 | fi | |
| 5414 | fi | |
| 5415 | ||
| 5416 | # set the appropriate make variables for building the "build tools" | |
| 5417 | # modify defaults based on whether or not we are cross compiling, since the | |
| 5418 | # options for the target host may not be appropriate for the build host | |
| 5419 | if test "X$cross_compiling" = "Xno"; then | |
| 5420 | CC_FOR_BUILD=${CC_FOR_BUILD-'$(CC)'} | |
| 5421 | CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-"$CPPFLAGS"} # XXX - should it be '$(CPPFLAGS)' | |
| 5422 | if test X"$opt_profiling" = Xyes; then | |
| 5423 | LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(BASE_LDFLAGS)'} | |
| 5424 | else | |
| 5425 | LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-'$(LDFLAGS)'} | |
| 5426 | fi | |
| 5427 | # CFLAGS set above to default value if not passed in environment | |
| 5428 | if test -n "$want_auto_cflags" ; then | |
| 5429 | CFLAGS_FOR_BUILD="${CFLAGS}" | |
| 5430 | else | |
| 5431 | # passed in environment | |
| 5432 | CFLAGS_FOR_BUILD=${CFLAGS-'$(CFLAGS)'} | |
| 5433 | fi | |
| 5434 | LIBS_FOR_BUILD=${LIBS_FOR_BUILD-'$(LIBS)'} | |
| 5435 | else | |
| 5436 | CC_FOR_BUILD=${CC_FOR_BUILD-"gcc"} | |
| 5437 | CPPFLAGS_FOR_BUILD=${CPPFLAGS_FOR_BUILD-""} | |
| 5438 | LDFLAGS_FOR_BUILD=${LDFLAGS_FOR_BUILD-""} | |
| 5439 | CFLAGS_FOR_BUILD=${CFLAGS_FOR_BUILD="-g"} | |
| 5440 | LIBS_FOR_BUILD=${LIBS_FOR_BUILD-""} | |
| 5441 | fi | |
| 5442 | ||
| 5443 | ||
| 5444 | ||
| 5445 | ||
| 5446 | ||
| 5447 | ||
| 5448 | ||
| 5449 | ||
| 5450 | ||
| 5451 | ||
| 5452 | ||
| 5453 | ||
| 5454 | ||
| 5455 | ||
| 5456 | ||
| 5457 | if test "$opt_readline" = yes && test "$opt_with_installed_readline" != "no" | |
| 5458 | then | |
| 5459 | # If the user specified --with-installed-readline=PREFIX and PREFIX | |
| 5460 | # is not `yes', set ac_cv_rl_prefix to PREFIX | |
| 5461 | test $opt_with_installed_readline != "yes" && ac_cv_rl_prefix=$opt_with_installed_readline | |
| 5462 | ||
| 5463 | ||
| 5464 | if test "X$bash_cv_termcap_lib" = "X"; then | |
| 5465 | _bash_needmsg=yes | |
| 5466 | else | |
| 5467 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 | |
| 5468 | printf %s "checking which library has the termcap functions... " >&6; } | |
| 5469 | _bash_needmsg= | |
| 5470 | fi | |
| 5471 | if test ${bash_cv_termcap_lib+y} | |
| 5472 | then : | |
| 5473 | printf %s "(cached) " >&6 | |
| 5474 | else case e in #( | |
| 5475 | e) ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent" | |
| 5476 | if test "x$ac_cv_func_tgetent" = xyes | |
| 5477 | then : | |
| 5478 | bash_cv_termcap_lib=libc | |
| 5479 | else case e in #( | |
| 5480 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5 | |
| 5481 | printf %s "checking for tgetent in -ltermcap... " >&6; } | |
| 5482 | if test ${ac_cv_lib_termcap_tgetent+y} | |
| 5483 | then : | |
| 5484 | printf %s "(cached) " >&6 | |
| 5485 | else case e in #( | |
| 5486 | e) ac_check_lib_save_LIBS=$LIBS | |
| 5487 | LIBS="-ltermcap $LIBS" | |
| 5488 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 5489 | /* end confdefs.h. */ | |
| 5490 | ||
| 5491 | /* Override any GCC internal prototype to avoid an error. | |
| 5492 | Use char because int might match the return type of a GCC | |
| 5493 | builtin and then its argument prototype would still apply. | |
| 5494 | The 'extern "C"' is for builds by C++ compilers; | |
| 5495 | although this is not generally supported in C code supporting it here | |
| 5496 | has little cost and some practical benefit (sr 110532). */ | |
| 5497 | #ifdef __cplusplus | |
| 5498 | extern "C" | |
| 5499 | #endif | |
| 5500 | char tgetent (void); | |
| 5501 | int | |
| 5502 | main (void) | |
| 5503 | { | |
| 5504 | return tgetent (); | |
| 5505 | ; | |
| 5506 | return 0; | |
| 5507 | } | |
| 5508 | _ACEOF | |
| 5509 | if ac_fn_c_try_link "$LINENO" | |
| 5510 | then : | |
| 5511 | ac_cv_lib_termcap_tgetent=yes | |
| 5512 | else case e in #( | |
| 5513 | e) ac_cv_lib_termcap_tgetent=no ;; | |
| 5514 | esac | |
| 5515 | fi | |
| 5516 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 5517 | conftest$ac_exeext conftest.$ac_ext | |
| 5518 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 5519 | esac | |
| 5520 | fi | |
| 5521 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5 | |
| 5522 | printf "%s\n" "$ac_cv_lib_termcap_tgetent" >&6; } | |
| 5523 | if test "x$ac_cv_lib_termcap_tgetent" = xyes | |
| 5524 | then : | |
| 5525 | bash_cv_termcap_lib=libtermcap | |
| 5526 | else case e in #( | |
| 5527 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5 | |
| 5528 | printf %s "checking for tgetent in -ltinfo... " >&6; } | |
| 5529 | if test ${ac_cv_lib_tinfo_tgetent+y} | |
| 5530 | then : | |
| 5531 | printf %s "(cached) " >&6 | |
| 5532 | else case e in #( | |
| 5533 | e) ac_check_lib_save_LIBS=$LIBS | |
| 5534 | LIBS="-ltinfo $LIBS" | |
| 5535 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 5536 | /* end confdefs.h. */ | |
| 5537 | ||
| 5538 | /* Override any GCC internal prototype to avoid an error. | |
| 5539 | Use char because int might match the return type of a GCC | |
| 5540 | builtin and then its argument prototype would still apply. | |
| 5541 | The 'extern "C"' is for builds by C++ compilers; | |
| 5542 | although this is not generally supported in C code supporting it here | |
| 5543 | has little cost and some practical benefit (sr 110532). */ | |
| 5544 | #ifdef __cplusplus | |
| 5545 | extern "C" | |
| 5546 | #endif | |
| 5547 | char tgetent (void); | |
| 5548 | int | |
| 5549 | main (void) | |
| 5550 | { | |
| 5551 | return tgetent (); | |
| 5552 | ; | |
| 5553 | return 0; | |
| 5554 | } | |
| 5555 | _ACEOF | |
| 5556 | if ac_fn_c_try_link "$LINENO" | |
| 5557 | then : | |
| 5558 | ac_cv_lib_tinfo_tgetent=yes | |
| 5559 | else case e in #( | |
| 5560 | e) ac_cv_lib_tinfo_tgetent=no ;; | |
| 5561 | esac | |
| 5562 | fi | |
| 5563 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 5564 | conftest$ac_exeext conftest.$ac_ext | |
| 5565 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 5566 | esac | |
| 5567 | fi | |
| 5568 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5 | |
| 5569 | printf "%s\n" "$ac_cv_lib_tinfo_tgetent" >&6; } | |
| 5570 | if test "x$ac_cv_lib_tinfo_tgetent" = xyes | |
| 5571 | then : | |
| 5572 | bash_cv_termcap_lib=libtinfo | |
| 5573 | else case e in #( | |
| 5574 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5 | |
| 5575 | printf %s "checking for tgetent in -lcurses... " >&6; } | |
| 5576 | if test ${ac_cv_lib_curses_tgetent+y} | |
| 5577 | then : | |
| 5578 | printf %s "(cached) " >&6 | |
| 5579 | else case e in #( | |
| 5580 | e) ac_check_lib_save_LIBS=$LIBS | |
| 5581 | LIBS="-lcurses $LIBS" | |
| 5582 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 5583 | /* end confdefs.h. */ | |
| 5584 | ||
| 5585 | /* Override any GCC internal prototype to avoid an error. | |
| 5586 | Use char because int might match the return type of a GCC | |
| 5587 | builtin and then its argument prototype would still apply. | |
| 5588 | The 'extern "C"' is for builds by C++ compilers; | |
| 5589 | although this is not generally supported in C code supporting it here | |
| 5590 | has little cost and some practical benefit (sr 110532). */ | |
| 5591 | #ifdef __cplusplus | |
| 5592 | extern "C" | |
| 5593 | #endif | |
| 5594 | char tgetent (void); | |
| 5595 | int | |
| 5596 | main (void) | |
| 5597 | { | |
| 5598 | return tgetent (); | |
| 5599 | ; | |
| 5600 | return 0; | |
| 5601 | } | |
| 5602 | _ACEOF | |
| 5603 | if ac_fn_c_try_link "$LINENO" | |
| 5604 | then : | |
| 5605 | ac_cv_lib_curses_tgetent=yes | |
| 5606 | else case e in #( | |
| 5607 | e) ac_cv_lib_curses_tgetent=no ;; | |
| 5608 | esac | |
| 5609 | fi | |
| 5610 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 5611 | conftest$ac_exeext conftest.$ac_ext | |
| 5612 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 5613 | esac | |
| 5614 | fi | |
| 5615 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5 | |
| 5616 | printf "%s\n" "$ac_cv_lib_curses_tgetent" >&6; } | |
| 5617 | if test "x$ac_cv_lib_curses_tgetent" = xyes | |
| 5618 | then : | |
| 5619 | bash_cv_termcap_lib=libcurses | |
| 5620 | else case e in #( | |
| 5621 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncursesw" >&5 | |
| 5622 | printf %s "checking for tgetent in -lncursesw... " >&6; } | |
| 5623 | if test ${ac_cv_lib_ncursesw_tgetent+y} | |
| 5624 | then : | |
| 5625 | printf %s "(cached) " >&6 | |
| 5626 | else case e in #( | |
| 5627 | e) ac_check_lib_save_LIBS=$LIBS | |
| 5628 | LIBS="-lncursesw $LIBS" | |
| 5629 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 5630 | /* end confdefs.h. */ | |
| 5631 | ||
| 5632 | /* Override any GCC internal prototype to avoid an error. | |
| 5633 | Use char because int might match the return type of a GCC | |
| 5634 | builtin and then its argument prototype would still apply. | |
| 5635 | The 'extern "C"' is for builds by C++ compilers; | |
| 5636 | although this is not generally supported in C code supporting it here | |
| 5637 | has little cost and some practical benefit (sr 110532). */ | |
| 5638 | #ifdef __cplusplus | |
| 5639 | extern "C" | |
| 5640 | #endif | |
| 5641 | char tgetent (void); | |
| 5642 | int | |
| 5643 | main (void) | |
| 5644 | { | |
| 5645 | return tgetent (); | |
| 5646 | ; | |
| 5647 | return 0; | |
| 5648 | } | |
| 5649 | _ACEOF | |
| 5650 | if ac_fn_c_try_link "$LINENO" | |
| 5651 | then : | |
| 5652 | ac_cv_lib_ncursesw_tgetent=yes | |
| 5653 | else case e in #( | |
| 5654 | e) ac_cv_lib_ncursesw_tgetent=no ;; | |
| 5655 | esac | |
| 5656 | fi | |
| 5657 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 5658 | conftest$ac_exeext conftest.$ac_ext | |
| 5659 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 5660 | esac | |
| 5661 | fi | |
| 5662 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_tgetent" >&5 | |
| 5663 | printf "%s\n" "$ac_cv_lib_ncursesw_tgetent" >&6; } | |
| 5664 | if test "x$ac_cv_lib_ncursesw_tgetent" = xyes | |
| 5665 | then : | |
| 5666 | bash_cv_termcap_lib=libncursesw | |
| 5667 | else case e in #( | |
| 5668 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5 | |
| 5669 | printf %s "checking for tgetent in -lncurses... " >&6; } | |
| 5670 | if test ${ac_cv_lib_ncurses_tgetent+y} | |
| 5671 | then : | |
| 5672 | printf %s "(cached) " >&6 | |
| 5673 | else case e in #( | |
| 5674 | e) ac_check_lib_save_LIBS=$LIBS | |
| 5675 | LIBS="-lncurses $LIBS" | |
| 5676 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 5677 | /* end confdefs.h. */ | |
| 5678 | ||
| 5679 | /* Override any GCC internal prototype to avoid an error. | |
| 5680 | Use char because int might match the return type of a GCC | |
| 5681 | builtin and then its argument prototype would still apply. | |
| 5682 | The 'extern "C"' is for builds by C++ compilers; | |
| 5683 | although this is not generally supported in C code supporting it here | |
| 5684 | has little cost and some practical benefit (sr 110532). */ | |
| 5685 | #ifdef __cplusplus | |
| 5686 | extern "C" | |
| 5687 | #endif | |
| 5688 | char tgetent (void); | |
| 5689 | int | |
| 5690 | main (void) | |
| 5691 | { | |
| 5692 | return tgetent (); | |
| 5693 | ; | |
| 5694 | return 0; | |
| 5695 | } | |
| 5696 | _ACEOF | |
| 5697 | if ac_fn_c_try_link "$LINENO" | |
| 5698 | then : | |
| 5699 | ac_cv_lib_ncurses_tgetent=yes | |
| 5700 | else case e in #( | |
| 5701 | e) ac_cv_lib_ncurses_tgetent=no ;; | |
| 5702 | esac | |
| 5703 | fi | |
| 5704 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 5705 | conftest$ac_exeext conftest.$ac_ext | |
| 5706 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 5707 | esac | |
| 5708 | fi | |
| 5709 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5 | |
| 5710 | printf "%s\n" "$ac_cv_lib_ncurses_tgetent" >&6; } | |
| 5711 | if test "x$ac_cv_lib_ncurses_tgetent" = xyes | |
| 5712 | then : | |
| 5713 | bash_cv_termcap_lib=libncurses | |
| 5714 | else case e in #( | |
| 5715 | e) bash_cv_termcap_lib=gnutermcap ;; | |
| 5716 | esac | |
| 5717 | fi | |
| 5718 | ;; | |
| 5719 | esac | |
| 5720 | fi | |
| 5721 | ;; | |
| 5722 | esac | |
| 5723 | fi | |
| 5724 | ;; | |
| 5725 | esac | |
| 5726 | fi | |
| 5727 | ;; | |
| 5728 | esac | |
| 5729 | fi | |
| 5730 | ;; | |
| 5731 | esac | |
| 5732 | fi | |
| 5733 | ;; | |
| 5734 | esac | |
| 5735 | fi | |
| 5736 | ||
| 5737 | if test "X$_bash_needmsg" = "Xyes"; then | |
| 5738 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 | |
| 5739 | printf %s "checking which library has the termcap functions... " >&6; } | |
| 5740 | fi | |
| 5741 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5 | |
| 5742 | printf "%s\n" "using $bash_cv_termcap_lib" >&6; } | |
| 5743 | if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then | |
| 5744 | LDFLAGS="$LDFLAGS -L./lib/termcap" | |
| 5745 | TERMCAP_LIB="./lib/termcap/libtermcap.a" | |
| 5746 | TERMCAP_DEP="./lib/termcap/libtermcap.a" | |
| 5747 | elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then | |
| 5748 | TERMCAP_LIB=-ltermcap | |
| 5749 | TERMCAP_DEP= | |
| 5750 | elif test $bash_cv_termcap_lib = libtinfo; then | |
| 5751 | TERMCAP_LIB=-ltinfo | |
| 5752 | TERMCAP_DEP= | |
| 5753 | elif test $bash_cv_termcap_lib = libncursesw; then | |
| 5754 | TERMCAP_LIB=-lncursesw | |
| 5755 | TERMCAP_DEP= | |
| 5756 | elif test $bash_cv_termcap_lib = libncurses; then | |
| 5757 | TERMCAP_LIB=-lncurses | |
| 5758 | TERMCAP_DEP= | |
| 5759 | elif test $bash_cv_termcap_lib = libcurses; then | |
| 5760 | TERMCAP_LIB=-lcurses | |
| 5761 | TERMCAP_DEP= | |
| 5762 | elif test $bash_cv_termcap_lib = libc; then | |
| 5763 | TERMCAP_LIB= | |
| 5764 | TERMCAP_DEP= | |
| 5765 | else | |
| 5766 | # we assume ncurses is installed somewhere the linker can find it | |
| 5767 | TERMCAP_LIB=-lncurses | |
| 5768 | TERMCAP_DEP= | |
| 5769 | fi | |
| 5770 | ||
| 5771 | ||
| 5772 | ||
| 5773 | ||
| 5774 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking version of installed readline library" >&5 | |
| 5775 | printf %s "checking version of installed readline library... " >&6; } | |
| 5776 | ||
| 5777 | # What a pain in the ass this is. | |
| 5778 | ||
| 5779 | # save cpp and ld options | |
| 5780 | _save_CFLAGS="$CFLAGS" | |
| 5781 | _save_LDFLAGS="$LDFLAGS" | |
| 5782 | _save_LIBS="$LIBS" | |
| 5783 | ||
| 5784 | # Don't set ac_cv_rl_prefix if the caller has already assigned a value. This | |
| 5785 | # allows the caller to do something like $_rl_prefix=$withval if the user | |
| 5786 | # specifies --with-installed-readline=PREFIX as an argument to configure | |
| 5787 | ||
| 5788 | if test -z "$ac_cv_rl_prefix"; then | |
| 5789 | test "x$prefix" = xNONE && ac_cv_rl_prefix=$ac_default_prefix || ac_cv_rl_prefix=${prefix} | |
| 5790 | fi | |
| 5791 | ||
| 5792 | eval ac_cv_rl_includedir=${ac_cv_rl_prefix}/include | |
| 5793 | eval ac_cv_rl_libdir=${ac_cv_rl_prefix}/lib | |
| 5794 | ||
| 5795 | LIBS="$LIBS -lreadline ${TERMCAP_LIB}" | |
| 5796 | CFLAGS="$CFLAGS -I${ac_cv_rl_includedir}" | |
| 5797 | LDFLAGS="$LDFLAGS -L${ac_cv_rl_libdir}" | |
| 5798 | ||
| 5799 | if test ${ac_cv_rl_version+y} | |
| 5800 | then : | |
| 5801 | printf %s "(cached) " >&6 | |
| 5802 | else case e in #( | |
| 5803 | e) if test "$cross_compiling" = yes | |
| 5804 | then : | |
| 5805 | ac_cv_rl_version='8.0' | |
| 5806 | ||
| 5807 | else case e in #( | |
| 5808 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 5809 | /* end confdefs.h. */ | |
| 5810 | ||
| 5811 | #include <stdio.h> | |
| 5812 | #include <readline/readline.h> | |
| 5813 | #include <stdlib.h> | |
| 5814 | ||
| 5815 | extern int rl_gnu_readline_p; | |
| 5816 | ||
| 5817 | int | |
| 5818 | main() | |
| 5819 | { | |
| 5820 | FILE *fp; | |
| 5821 | fp = fopen("conftest.rlv", "w"); | |
| 5822 | if (fp == 0) | |
| 5823 | exit(1); | |
| 5824 | if (rl_gnu_readline_p != 1) | |
| 5825 | fprintf(fp, "0.0\n"); | |
| 5826 | else | |
| 5827 | fprintf(fp, "%s\n", rl_library_version ? rl_library_version : "0.0"); | |
| 5828 | fclose(fp); | |
| 5829 | exit(0); | |
| 5830 | } | |
| 5831 | ||
| 5832 | _ACEOF | |
| 5833 | if ac_fn_c_try_run "$LINENO" | |
| 5834 | then : | |
| 5835 | ac_cv_rl_version=`cat conftest.rlv` | |
| 5836 | else case e in #( | |
| 5837 | e) ac_cv_rl_version='0.0' ;; | |
| 5838 | esac | |
| 5839 | fi | |
| 5840 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 5841 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 5842 | esac | |
| 5843 | fi | |
| 5844 | ;; | |
| 5845 | esac | |
| 5846 | fi | |
| 5847 | ||
| 5848 | ||
| 5849 | CFLAGS="$_save_CFLAGS" | |
| 5850 | LDFLAGS="$_save_LDFLAGS" | |
| 5851 | LIBS="$_save_LIBS" | |
| 5852 | ||
| 5853 | RL_MAJOR=0 | |
| 5854 | RL_MINOR=0 | |
| 5855 | ||
| 5856 | # ( | |
| 5857 | case "$ac_cv_rl_version" in | |
| 5858 | 2*|3*|4*|5*|6*|7*|8*|9*) | |
| 5859 | RL_MAJOR=`echo $ac_cv_rl_version | sed 's:\..*$::'` | |
| 5860 | RL_MINOR=`echo $ac_cv_rl_version | sed -e 's:^.*\.::' -e 's:[a-zA-Z]*$::'` | |
| 5861 | ;; | |
| 5862 | esac | |
| 5863 | ||
| 5864 | # ((( | |
| 5865 | case $RL_MAJOR in | |
| 5866 | [0-9][0-9]) _RL_MAJOR=$RL_MAJOR ;; | |
| 5867 | [0-9]) _RL_MAJOR=0$RL_MAJOR ;; | |
| 5868 | *) _RL_MAJOR=00 ;; | |
| 5869 | esac | |
| 5870 | ||
| 5871 | # ((( | |
| 5872 | case $RL_MINOR in | |
| 5873 | [0-9][0-9]) _RL_MINOR=$RL_MINOR ;; | |
| 5874 | [0-9]) _RL_MINOR=0$RL_MINOR ;; | |
| 5875 | *) _RL_MINOR=00 ;; | |
| 5876 | esac | |
| 5877 | ||
| 5878 | RL_VERSION="0x${_RL_MAJOR}${_RL_MINOR}" | |
| 5879 | ||
| 5880 | # Readline versions greater than 4.2 have these defines in readline.h | |
| 5881 | ||
| 5882 | if test $ac_cv_rl_version = '0.0' ; then | |
| 5883 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: Could not test version of installed readline library." >&5 | |
| 5884 | printf "%s\n" "$as_me: WARNING: Could not test version of installed readline library." >&2;} | |
| 5885 | elif test $RL_MAJOR -gt 4 || { test $RL_MAJOR = 4 && test $RL_MINOR -gt 2 ; } ; then | |
| 5886 | # set these for use by the caller | |
| 5887 | RL_PREFIX=$ac_cv_rl_prefix | |
| 5888 | RL_LIBDIR=$ac_cv_rl_libdir | |
| 5889 | RL_INCLUDEDIR=$ac_cv_rl_includedir | |
| 5890 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5 | |
| 5891 | printf "%s\n" "$ac_cv_rl_version" >&6; } | |
| 5892 | else | |
| 5893 | ||
| 5894 | ||
| 5895 | printf "%s\n" "#define RL_READLINE_VERSION $RL_VERSION" >>confdefs.h | |
| 5896 | ||
| 5897 | ||
| 5898 | printf "%s\n" "#define RL_VERSION_MAJOR $RL_MAJOR" >>confdefs.h | |
| 5899 | ||
| 5900 | ||
| 5901 | printf "%s\n" "#define RL_VERSION_MINOR $RL_MINOR" >>confdefs.h | |
| 5902 | ||
| 5903 | ||
| 5904 | ||
| 5905 | ||
| 5906 | ||
| 5907 | ||
| 5908 | # set these for use by the caller | |
| 5909 | RL_PREFIX=$ac_cv_rl_prefix | |
| 5910 | RL_LIBDIR=$ac_cv_rl_libdir | |
| 5911 | RL_INCLUDEDIR=$ac_cv_rl_includedir | |
| 5912 | ||
| 5913 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rl_version" >&5 | |
| 5914 | printf "%s\n" "$ac_cv_rl_version" >&6; } | |
| 5915 | ||
| 5916 | fi | |
| 5917 | ||
| 5918 | ||
| 5919 | case "$ac_cv_rl_version" in | |
| 5920 | 8*|9*) ;; | |
| 5921 | *) opt_with_installed_readline=no | |
| 5922 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: installed readline library is too old to be linked with bash" >&5 | |
| 5923 | printf "%s\n" "$as_me: WARNING: installed readline library is too old to be linked with bash" >&2;} | |
| 5924 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using private bash version" >&5 | |
| 5925 | printf "%s\n" "$as_me: WARNING: using private bash version" >&2;} | |
| 5926 | ;; | |
| 5927 | esac | |
| 5928 | fi | |
| 5929 | ||
| 5930 | TILDE_LIB=-ltilde | |
| 5931 | if test $opt_readline = yes; then | |
| 5932 | printf "%s\n" "#define READLINE 1" >>confdefs.h | |
| 5933 | ||
| 5934 | if test "$opt_with_installed_readline" != "no" ; then | |
| 5935 | case "$opt_with_installed_readline" in | |
| 5936 | yes) RL_INCLUDE= ;; | |
| 5937 | *) case "$RL_INCLUDEDIR" in | |
| 5938 | /usr/include) ;; | |
| 5939 | *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;; | |
| 5940 | esac | |
| 5941 | ;; | |
| 5942 | esac | |
| 5943 | READLINE_DEP= | |
| 5944 | READLINE_LIB=-lreadline | |
| 5945 | # section for OS versions that don't allow unresolved symbols | |
| 5946 | # to be compiled into dynamic libraries. | |
| 5947 | case "$host_os" in | |
| 5948 | cygwin*|msys*) TILDE_LIB= ;; | |
| 5949 | esac | |
| 5950 | else | |
| 5951 | RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' | |
| 5952 | READLINE_DEP='$(READLINE_LIBRARY)' | |
| 5953 | # for dependencies | |
| 5954 | RL_INCLUDEDIR='$(RL_LIBDIR)' | |
| 5955 | # section for OS versions that ship an older/broken version of | |
| 5956 | # readline as a standard dynamic library and don't allow a | |
| 5957 | # static version specified as -llibname to override the | |
| 5958 | # dynamic version | |
| 5959 | case "${host_os}" in | |
| 5960 | darwin[89]*|darwin10*) READLINE_LIB='${READLINE_LIBRARY}' ;; | |
| 5961 | *) READLINE_LIB=-lreadline ;; | |
| 5962 | esac | |
| 5963 | fi | |
| 5964 | else | |
| 5965 | RL_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' | |
| 5966 | READLINE_LIB= READLINE_DEP= | |
| 5967 | RL_INCLUDEDIR= | |
| 5968 | fi | |
| 5969 | if test $opt_history = yes || test $opt_bang_history = yes; then | |
| 5970 | if test $opt_history = yes; then | |
| 5971 | printf "%s\n" "#define HISTORY 1" >>confdefs.h | |
| 5972 | ||
| 5973 | fi | |
| 5974 | if test $opt_bang_history = yes; then | |
| 5975 | printf "%s\n" "#define BANG_HISTORY 1" >>confdefs.h | |
| 5976 | ||
| 5977 | fi | |
| 5978 | if test "$opt_with_installed_readline" != "no"; then | |
| 5979 | HIST_LIBDIR=$RL_LIBDIR | |
| 5980 | HISTORY_DEP= | |
| 5981 | HISTORY_LIB=-lhistory | |
| 5982 | case "$opt_with_installed_readline" in | |
| 5983 | yes) RL_INCLUDE= ;; | |
| 5984 | *) case "$RL_INCLUDEDIR" in | |
| 5985 | /usr/include) ;; | |
| 5986 | *) RL_INCLUDE='-I${RL_INCLUDEDIR}' ;; | |
| 5987 | esac | |
| 5988 | ;; | |
| 5989 | esac | |
| 5990 | else | |
| 5991 | HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' | |
| 5992 | HISTORY_DEP='$(HISTORY_LIBRARY)' | |
| 5993 | # for dependencies | |
| 5994 | HIST_INCLUDEDIR='$(HIST_LIBDIR)' | |
| 5995 | # section for OS versions that ship an older version of | |
| 5996 | # readline as a standard dynamic library and don't allow a | |
| 5997 | # static version specified as -llibname to override the | |
| 5998 | # dynamic version | |
| 5999 | case "${host_os}" in | |
| 6000 | darwin[89]*|darwin10*) HISTORY_LIB='${HISTORY_LIBRARY}' ;; | |
| 6001 | *) HISTORY_LIB=-lhistory ;; | |
| 6002 | esac | |
| 6003 | fi | |
| 6004 | else | |
| 6005 | HIST_LIBDIR='$(dot)/$(LIBSUBDIR)/readline' | |
| 6006 | HISTORY_LIB= HISTORY_DEP= | |
| 6007 | HIST_INCLUDEDIR= | |
| 6008 | fi | |
| 6009 | ||
| 6010 | ||
| 6011 | ||
| 6012 | ||
| 6013 | ||
| 6014 | ||
| 6015 | ||
| 6016 | ||
| 6017 | ||
| 6018 | ||
| 6019 | ||
| 6020 | ||
| 6021 | ||
| 6022 | # Find a good install program. We prefer a C program (faster), | |
| 6023 | # so one script is as good as another. But avoid the broken or | |
| 6024 | # incompatible versions: | |
| 6025 | # SysV /etc/install, /usr/sbin/install | |
| 6026 | # SunOS /usr/etc/install | |
| 6027 | # IRIX /sbin/install | |
| 6028 | # AIX /bin/install | |
| 6029 | # AmigaOS /C/install, which installs bootblocks on floppy discs | |
| 6030 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag | |
| 6031 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args | |
| 6032 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" | |
| 6033 | # OS/2's system install, which has a completely different semantic | |
| 6034 | # ./install, which can be erroneously created by make from ./install.sh. | |
| 6035 | # Reject install programs that cannot install multiple files. | |
| 6036 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 | |
| 6037 | printf %s "checking for a BSD-compatible install... " >&6; } | |
| 6038 | if test -z "$INSTALL"; then | |
| 6039 | if test ${ac_cv_path_install+y} | |
| 6040 | then : | |
| 6041 | printf %s "(cached) " >&6 | |
| 6042 | else case e in #( | |
| 6043 | e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 6044 | for as_dir in $PATH | |
| 6045 | do | |
| 6046 | IFS=$as_save_IFS | |
| 6047 | case $as_dir in #((( | |
| 6048 | '') as_dir=./ ;; | |
| 6049 | */) ;; | |
| 6050 | *) as_dir=$as_dir/ ;; | |
| 6051 | esac | |
| 6052 | # Account for fact that we put trailing slashes in our PATH walk. | |
| 6053 | case $as_dir in #(( | |
| 6054 | ./ | /[cC]/* | \ | |
| 6055 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ | |
| 6056 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ | |
| 6057 | /usr/ucb/* ) ;; | |
| 6058 | *) | |
| 6059 | # OSF1 and SCO ODT 3.0 have their own names for install. | |
| 6060 | # Don't use installbsd from OSF since it installs stuff as root | |
| 6061 | # by default. | |
| 6062 | for ac_prog in ginstall scoinst install; do | |
| 6063 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 6064 | if as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext"; then | |
| 6065 | if test $ac_prog = install && | |
| 6066 | grep dspmsg "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
| 6067 | # AIX install. It has an incompatible calling convention. | |
| 6068 | : | |
| 6069 | elif test $ac_prog = install && | |
| 6070 | grep pwplus "$as_dir$ac_prog$ac_exec_ext" >/dev/null 2>&1; then | |
| 6071 | # program-specific install script used by HP pwplus--don't use. | |
| 6072 | : | |
| 6073 | else | |
| 6074 | rm -rf conftest.one conftest.two conftest.dir | |
| 6075 | echo one > conftest.one | |
| 6076 | echo two > conftest.two | |
| 6077 | mkdir conftest.dir | |
| 6078 | if "$as_dir$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir/" && | |
| 6079 | test -s conftest.one && test -s conftest.two && | |
| 6080 | test -s conftest.dir/conftest.one && | |
| 6081 | test -s conftest.dir/conftest.two | |
| 6082 | then | |
| 6083 | ac_cv_path_install="$as_dir$ac_prog$ac_exec_ext -c" | |
| 6084 | break 3 | |
| 6085 | fi | |
| 6086 | fi | |
| 6087 | fi | |
| 6088 | done | |
| 6089 | done | |
| 6090 | ;; | |
| 6091 | esac | |
| 6092 | ||
| 6093 | done | |
| 6094 | IFS=$as_save_IFS | |
| 6095 | ||
| 6096 | rm -rf conftest.one conftest.two conftest.dir | |
| 6097 | ;; | |
| 6098 | esac | |
| 6099 | fi | |
| 6100 | if test ${ac_cv_path_install+y}; then | |
| 6101 | INSTALL=$ac_cv_path_install | |
| 6102 | else | |
| 6103 | # As a last resort, use the slow shell script. Don't cache a | |
| 6104 | # value for INSTALL within a source directory, because that will | |
| 6105 | # break other packages using the cache if that directory is | |
| 6106 | # removed, or if the value is a relative name. | |
| 6107 | INSTALL=$ac_install_sh | |
| 6108 | fi | |
| 6109 | fi | |
| 6110 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 | |
| 6111 | printf "%s\n" "$INSTALL" >&6; } | |
| 6112 | ||
| 6113 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. | |
| 6114 | # It thinks the first close brace ends the variable substitution. | |
| 6115 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' | |
| 6116 | ||
| 6117 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' | |
| 6118 | ||
| 6119 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' | |
| 6120 | ||
| 6121 | if test -n "$ac_tool_prefix"; then | |
| 6122 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
| 6123 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
| 6124 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 6125 | printf %s "checking for $ac_word... " >&6; } | |
| 6126 | if test ${ac_cv_prog_AR+y} | |
| 6127 | then : | |
| 6128 | printf %s "(cached) " >&6 | |
| 6129 | else case e in #( | |
| 6130 | e) if test -n "$AR"; then | |
| 6131 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
| 6132 | else | |
| 6133 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 6134 | for as_dir in $PATH | |
| 6135 | do | |
| 6136 | IFS=$as_save_IFS | |
| 6137 | case $as_dir in #((( | |
| 6138 | '') as_dir=./ ;; | |
| 6139 | */) ;; | |
| 6140 | *) as_dir=$as_dir/ ;; | |
| 6141 | esac | |
| 6142 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 6143 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 6144 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
| 6145 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 6146 | break 2 | |
| 6147 | fi | |
| 6148 | done | |
| 6149 | done | |
| 6150 | IFS=$as_save_IFS | |
| 6151 | ||
| 6152 | fi ;; | |
| 6153 | esac | |
| 6154 | fi | |
| 6155 | AR=$ac_cv_prog_AR | |
| 6156 | if test -n "$AR"; then | |
| 6157 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 | |
| 6158 | printf "%s\n" "$AR" >&6; } | |
| 6159 | else | |
| 6160 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 6161 | printf "%s\n" "no" >&6; } | |
| 6162 | fi | |
| 6163 | ||
| 6164 | ||
| 6165 | fi | |
| 6166 | if test -z "$ac_cv_prog_AR"; then | |
| 6167 | ac_ct_AR=$AR | |
| 6168 | # Extract the first word of "ar", so it can be a program name with args. | |
| 6169 | set dummy ar; ac_word=$2 | |
| 6170 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 6171 | printf %s "checking for $ac_word... " >&6; } | |
| 6172 | if test ${ac_cv_prog_ac_ct_AR+y} | |
| 6173 | then : | |
| 6174 | printf %s "(cached) " >&6 | |
| 6175 | else case e in #( | |
| 6176 | e) if test -n "$ac_ct_AR"; then | |
| 6177 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
| 6178 | else | |
| 6179 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 6180 | for as_dir in $PATH | |
| 6181 | do | |
| 6182 | IFS=$as_save_IFS | |
| 6183 | case $as_dir in #((( | |
| 6184 | '') as_dir=./ ;; | |
| 6185 | */) ;; | |
| 6186 | *) as_dir=$as_dir/ ;; | |
| 6187 | esac | |
| 6188 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 6189 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 6190 | ac_cv_prog_ac_ct_AR="ar" | |
| 6191 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 6192 | break 2 | |
| 6193 | fi | |
| 6194 | done | |
| 6195 | done | |
| 6196 | IFS=$as_save_IFS | |
| 6197 | ||
| 6198 | fi ;; | |
| 6199 | esac | |
| 6200 | fi | |
| 6201 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
| 6202 | if test -n "$ac_ct_AR"; then | |
| 6203 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 | |
| 6204 | printf "%s\n" "$ac_ct_AR" >&6; } | |
| 6205 | else | |
| 6206 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 6207 | printf "%s\n" "no" >&6; } | |
| 6208 | fi | |
| 6209 | ||
| 6210 | if test "x$ac_ct_AR" = x; then | |
| 6211 | AR="" | |
| 6212 | else | |
| 6213 | case $cross_compiling:$ac_tool_warned in | |
| 6214 | yes:) | |
| 6215 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
| 6216 | printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
| 6217 | ac_tool_warned=yes ;; | |
| 6218 | esac | |
| 6219 | AR=$ac_ct_AR | |
| 6220 | fi | |
| 6221 | else | |
| 6222 | AR="$ac_cv_prog_AR" | |
| 6223 | fi | |
| 6224 | ||
| 6225 | test -n "$ARFLAGS" || ARFLAGS="cr" | |
| 6226 | if test -n "$ac_tool_prefix"; then | |
| 6227 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. | |
| 6228 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 | |
| 6229 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 6230 | printf %s "checking for $ac_word... " >&6; } | |
| 6231 | if test ${ac_cv_prog_RANLIB+y} | |
| 6232 | then : | |
| 6233 | printf %s "(cached) " >&6 | |
| 6234 | else case e in #( | |
| 6235 | e) if test -n "$RANLIB"; then | |
| 6236 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. | |
| 6237 | else | |
| 6238 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 6239 | for as_dir in $PATH | |
| 6240 | do | |
| 6241 | IFS=$as_save_IFS | |
| 6242 | case $as_dir in #((( | |
| 6243 | '') as_dir=./ ;; | |
| 6244 | */) ;; | |
| 6245 | *) as_dir=$as_dir/ ;; | |
| 6246 | esac | |
| 6247 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 6248 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 6249 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" | |
| 6250 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 6251 | break 2 | |
| 6252 | fi | |
| 6253 | done | |
| 6254 | done | |
| 6255 | IFS=$as_save_IFS | |
| 6256 | ||
| 6257 | fi ;; | |
| 6258 | esac | |
| 6259 | fi | |
| 6260 | RANLIB=$ac_cv_prog_RANLIB | |
| 6261 | if test -n "$RANLIB"; then | |
| 6262 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 | |
| 6263 | printf "%s\n" "$RANLIB" >&6; } | |
| 6264 | else | |
| 6265 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 6266 | printf "%s\n" "no" >&6; } | |
| 6267 | fi | |
| 6268 | ||
| 6269 | ||
| 6270 | fi | |
| 6271 | if test -z "$ac_cv_prog_RANLIB"; then | |
| 6272 | ac_ct_RANLIB=$RANLIB | |
| 6273 | # Extract the first word of "ranlib", so it can be a program name with args. | |
| 6274 | set dummy ranlib; ac_word=$2 | |
| 6275 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 6276 | printf %s "checking for $ac_word... " >&6; } | |
| 6277 | if test ${ac_cv_prog_ac_ct_RANLIB+y} | |
| 6278 | then : | |
| 6279 | printf %s "(cached) " >&6 | |
| 6280 | else case e in #( | |
| 6281 | e) if test -n "$ac_ct_RANLIB"; then | |
| 6282 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. | |
| 6283 | else | |
| 6284 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 6285 | for as_dir in $PATH | |
| 6286 | do | |
| 6287 | IFS=$as_save_IFS | |
| 6288 | case $as_dir in #((( | |
| 6289 | '') as_dir=./ ;; | |
| 6290 | */) ;; | |
| 6291 | *) as_dir=$as_dir/ ;; | |
| 6292 | esac | |
| 6293 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 6294 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 6295 | ac_cv_prog_ac_ct_RANLIB="ranlib" | |
| 6296 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 6297 | break 2 | |
| 6298 | fi | |
| 6299 | done | |
| 6300 | done | |
| 6301 | IFS=$as_save_IFS | |
| 6302 | ||
| 6303 | fi ;; | |
| 6304 | esac | |
| 6305 | fi | |
| 6306 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB | |
| 6307 | if test -n "$ac_ct_RANLIB"; then | |
| 6308 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 | |
| 6309 | printf "%s\n" "$ac_ct_RANLIB" >&6; } | |
| 6310 | else | |
| 6311 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 6312 | printf "%s\n" "no" >&6; } | |
| 6313 | fi | |
| 6314 | ||
| 6315 | if test "x$ac_ct_RANLIB" = x; then | |
| 6316 | RANLIB=":" | |
| 6317 | else | |
| 6318 | case $cross_compiling:$ac_tool_warned in | |
| 6319 | yes:) | |
| 6320 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
| 6321 | printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
| 6322 | ac_tool_warned=yes ;; | |
| 6323 | esac | |
| 6324 | RANLIB=$ac_ct_RANLIB | |
| 6325 | fi | |
| 6326 | else | |
| 6327 | RANLIB="$ac_cv_prog_RANLIB" | |
| 6328 | fi | |
| 6329 | ||
| 6330 | for ac_prog in 'bison -y' byacc | |
| 6331 | do | |
| 6332 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
| 6333 | set dummy $ac_prog; ac_word=$2 | |
| 6334 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 6335 | printf %s "checking for $ac_word... " >&6; } | |
| 6336 | if test ${ac_cv_prog_YACC+y} | |
| 6337 | then : | |
| 6338 | printf %s "(cached) " >&6 | |
| 6339 | else case e in #( | |
| 6340 | e) if test -n "$YACC"; then | |
| 6341 | ac_cv_prog_YACC="$YACC" # Let the user override the test. | |
| 6342 | else | |
| 6343 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 6344 | for as_dir in $PATH | |
| 6345 | do | |
| 6346 | IFS=$as_save_IFS | |
| 6347 | case $as_dir in #((( | |
| 6348 | '') as_dir=./ ;; | |
| 6349 | */) ;; | |
| 6350 | *) as_dir=$as_dir/ ;; | |
| 6351 | esac | |
| 6352 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 6353 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 6354 | ac_cv_prog_YACC="$ac_prog" | |
| 6355 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 6356 | break 2 | |
| 6357 | fi | |
| 6358 | done | |
| 6359 | done | |
| 6360 | IFS=$as_save_IFS | |
| 6361 | ||
| 6362 | fi ;; | |
| 6363 | esac | |
| 6364 | fi | |
| 6365 | YACC=$ac_cv_prog_YACC | |
| 6366 | if test -n "$YACC"; then | |
| 6367 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 | |
| 6368 | printf "%s\n" "$YACC" >&6; } | |
| 6369 | else | |
| 6370 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 6371 | printf "%s\n" "no" >&6; } | |
| 6372 | fi | |
| 6373 | ||
| 6374 | ||
| 6375 | test -n "$YACC" && break | |
| 6376 | done | |
| 6377 | test -n "$YACC" || YACC="yacc" | |
| 6378 | ||
| 6379 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 | |
| 6380 | printf %s "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } | |
| 6381 | set x ${MAKE-make} | |
| 6382 | ac_make=`printf "%s\n" "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` | |
| 6383 | if eval test \${ac_cv_prog_make_${ac_make}_set+y} | |
| 6384 | then : | |
| 6385 | printf %s "(cached) " >&6 | |
| 6386 | else case e in #( | |
| 6387 | e) cat >conftest.make <<\_ACEOF | |
| 6388 | SHELL = /bin/sh | |
| 6389 | all: | |
| 6390 | @echo '@@@%%%=$(MAKE)=@@@%%%' | |
| 6391 | _ACEOF | |
| 6392 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. | |
| 6393 | case `${MAKE-make} -f conftest.make 2>/dev/null` in | |
| 6394 | *@@@%%%=?*=@@@%%%*) | |
| 6395 | eval ac_cv_prog_make_${ac_make}_set=yes;; | |
| 6396 | *) | |
| 6397 | eval ac_cv_prog_make_${ac_make}_set=no;; | |
| 6398 | esac | |
| 6399 | rm -f conftest.make ;; | |
| 6400 | esac | |
| 6401 | fi | |
| 6402 | if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then | |
| 6403 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 | |
| 6404 | printf "%s\n" "yes" >&6; } | |
| 6405 | SET_MAKE= | |
| 6406 | else | |
| 6407 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 6408 | printf "%s\n" "no" >&6; } | |
| 6409 | SET_MAKE="MAKE=${MAKE-make}" | |
| 6410 | fi | |
| 6411 | ||
| 6412 | ||
| 6413 | ||
| 6414 | # Expand $ac_aux_dir to an absolute path. | |
| 6415 | am_aux_dir=`cd "$ac_aux_dir" && pwd` | |
| 6416 | ||
| 6417 | if test x"${install_sh+set}" != xset; then | |
| 6418 | case $am_aux_dir in | |
| 6419 | *\ * | *\ *) | |
| 6420 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; | |
| 6421 | *) | |
| 6422 | install_sh="\${SHELL} $am_aux_dir/install-sh" | |
| 6423 | esac | |
| 6424 | fi | |
| 6425 | ||
| 6426 | # Installed binaries are usually stripped using 'strip' when the user | |
| 6427 | # run "make install-strip". However 'strip' might not be the right | |
| 6428 | # tool to use in cross-compilation environments, therefore Automake | |
| 6429 | # will honor the 'STRIP' environment variable to overrule this program. | |
| 6430 | #if test "$cross_compiling" != no; then | |
| 6431 | if test -n "$ac_tool_prefix"; then | |
| 6432 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. | |
| 6433 | set dummy ${ac_tool_prefix}strip; ac_word=$2 | |
| 6434 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 6435 | printf %s "checking for $ac_word... " >&6; } | |
| 6436 | if test ${ac_cv_prog_STRIP+y} | |
| 6437 | then : | |
| 6438 | printf %s "(cached) " >&6 | |
| 6439 | else case e in #( | |
| 6440 | e) if test -n "$STRIP"; then | |
| 6441 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. | |
| 6442 | else | |
| 6443 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 6444 | for as_dir in $PATH | |
| 6445 | do | |
| 6446 | IFS=$as_save_IFS | |
| 6447 | case $as_dir in #((( | |
| 6448 | '') as_dir=./ ;; | |
| 6449 | */) ;; | |
| 6450 | *) as_dir=$as_dir/ ;; | |
| 6451 | esac | |
| 6452 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 6453 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 6454 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" | |
| 6455 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 6456 | break 2 | |
| 6457 | fi | |
| 6458 | done | |
| 6459 | done | |
| 6460 | IFS=$as_save_IFS | |
| 6461 | ||
| 6462 | fi ;; | |
| 6463 | esac | |
| 6464 | fi | |
| 6465 | STRIP=$ac_cv_prog_STRIP | |
| 6466 | if test -n "$STRIP"; then | |
| 6467 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 | |
| 6468 | printf "%s\n" "$STRIP" >&6; } | |
| 6469 | else | |
| 6470 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 6471 | printf "%s\n" "no" >&6; } | |
| 6472 | fi | |
| 6473 | ||
| 6474 | ||
| 6475 | fi | |
| 6476 | if test -z "$ac_cv_prog_STRIP"; then | |
| 6477 | ac_ct_STRIP=$STRIP | |
| 6478 | # Extract the first word of "strip", so it can be a program name with args. | |
| 6479 | set dummy strip; ac_word=$2 | |
| 6480 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 6481 | printf %s "checking for $ac_word... " >&6; } | |
| 6482 | if test ${ac_cv_prog_ac_ct_STRIP+y} | |
| 6483 | then : | |
| 6484 | printf %s "(cached) " >&6 | |
| 6485 | else case e in #( | |
| 6486 | e) if test -n "$ac_ct_STRIP"; then | |
| 6487 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. | |
| 6488 | else | |
| 6489 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 6490 | for as_dir in $PATH | |
| 6491 | do | |
| 6492 | IFS=$as_save_IFS | |
| 6493 | case $as_dir in #((( | |
| 6494 | '') as_dir=./ ;; | |
| 6495 | */) ;; | |
| 6496 | *) as_dir=$as_dir/ ;; | |
| 6497 | esac | |
| 6498 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 6499 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 6500 | ac_cv_prog_ac_ct_STRIP="strip" | |
| 6501 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 6502 | break 2 | |
| 6503 | fi | |
| 6504 | done | |
| 6505 | done | |
| 6506 | IFS=$as_save_IFS | |
| 6507 | ||
| 6508 | fi ;; | |
| 6509 | esac | |
| 6510 | fi | |
| 6511 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP | |
| 6512 | if test -n "$ac_ct_STRIP"; then | |
| 6513 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 | |
| 6514 | printf "%s\n" "$ac_ct_STRIP" >&6; } | |
| 6515 | else | |
| 6516 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 6517 | printf "%s\n" "no" >&6; } | |
| 6518 | fi | |
| 6519 | ||
| 6520 | if test "x$ac_ct_STRIP" = x; then | |
| 6521 | STRIP=":" | |
| 6522 | else | |
| 6523 | case $cross_compiling:$ac_tool_warned in | |
| 6524 | yes:) | |
| 6525 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
| 6526 | printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
| 6527 | ac_tool_warned=yes ;; | |
| 6528 | esac | |
| 6529 | STRIP=$ac_ct_STRIP | |
| 6530 | fi | |
| 6531 | else | |
| 6532 | STRIP="$ac_cv_prog_STRIP" | |
| 6533 | fi | |
| 6534 | ||
| 6535 | #fi | |
| 6536 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" | |
| 6537 | ||
| 6538 | ||
| 6539 | case "$ac_cv_prog_YACC" in | |
| 6540 | *bison*) ;; | |
| 6541 | *) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: bison not available; needed to process parse.y" >&5 | |
| 6542 | printf "%s\n" "$as_me: WARNING: bison not available; needed to process parse.y" >&2;} ;; | |
| 6543 | esac | |
| 6544 | ||
| 6545 | case "$host_os" in | |
| 6546 | opennt*|interix*) MAKE_SHELL="$INTERIX_ROOT/bin/sh" ;; | |
| 6547 | *) MAKE_SHELL=/bin/sh ;; | |
| 6548 | esac | |
| 6549 | ||
| 6550 | ||
| 6551 | if test x$SIZE = x; then | |
| 6552 | if test x$ac_tool_prefix = x; then | |
| 6553 | SIZE=size | |
| 6554 | else | |
| 6555 | SIZE=${ac_tool_prefix}size | |
| 6556 | save_IFS=$IFS ; IFS=: | |
| 6557 | size_found=0 | |
| 6558 | for dir in $PATH; do | |
| 6559 | if test -x $dir/$SIZE ; then | |
| 6560 | size_found=1 | |
| 6561 | break | |
| 6562 | fi | |
| 6563 | done | |
| 6564 | if test $size_found -eq 0; then | |
| 6565 | SIZE=: | |
| 6566 | fi | |
| 6567 | IFS=$save_IFS | |
| 6568 | fi | |
| 6569 | fi | |
| 6570 | ||
| 6571 | ||
| 6572 | # Checks for stat-related time functions. | |
| 6573 | ||
| 6574 | # Copyright (C) 1998-1999, 2001, 2003, 2005-2007, 2009-2012 Free Software | |
| 6575 | # Foundation, Inc. | |
| 6576 | ||
| 6577 | # This file is free software; the Free Software Foundation | |
| 6578 | # gives unlimited permission to copy and/or distribute it, | |
| 6579 | # with or without modifications, as long as this notice is preserved. | |
| 6580 | ||
| 6581 | ||
| 6582 | # st_atim.tv_nsec - Linux, Solaris, Cygwin | |
| 6583 | # st_atimespec.tv_nsec - FreeBSD, NetBSD, if ! defined _POSIX_SOURCE | |
| 6584 | # st_atimensec - FreeBSD, NetBSD, if defined _POSIX_SOURCE | |
| 6585 | # st_atim.st__tim.tv_nsec - UnixWare (at least 2.1.2 through 7.1) | |
| 6586 | ||
| 6587 | # st_birthtimespec - FreeBSD, NetBSD (hidden on OpenBSD 3.9, anyway) | |
| 6588 | # st_birthtim - Cygwin 1.7.0+ | |
| 6589 | ||
| 6590 | ||
| 6591 | ||
| 6592 | # Configure checks for struct timespec | |
| 6593 | ||
| 6594 | # Copyright (C) 2000-2001, 2003-2007, 2009-2011, 2012 Free Software Foundation, Inc. | |
| 6595 | ||
| 6596 | # This file is free software; the Free Software Foundation | |
| 6597 | # gives unlimited permission to copy and/or distribute it, | |
| 6598 | # with or without modifications, as long as this notice is preserved. | |
| 6599 | ||
| 6600 | # Original written by Paul Eggert and Jim Meyering. | |
| 6601 | # Modified by Chet Ramey for bash | |
| 6602 | ||
| 6603 | ||
| 6604 | ||
| 6605 | ||
| 6606 | ||
| 6607 | ||
| 6608 | ||
| 6609 | ||
| 6610 | ||
| 6611 | # unlocked-io.m4 serial 16 | |
| 6612 | ||
| 6613 | # Copyright (C) 1998-2006, 2009-2024 Free Software Foundation, Inc. | |
| 6614 | # | |
| 6615 | # This file is free software; the Free Software Foundation | |
| 6616 | # gives unlimited permission to copy and/or distribute it, | |
| 6617 | # with or without modifications, as long as this notice is preserved. | |
| 6618 | ||
| 6619 | ||
| 6620 | ||
| 6621 | ||
| 6622 | ||
| 6623 | # codeset.m4 serial 5 (gettext-0.18.2) | |
| 6624 | ||
| 6625 | ||
| 6626 | ||
| 6627 | ||
| 6628 | ||
| 6629 | ||
| 6630 | ||
| 6631 | ||
| 6632 | ||
| 6633 | # serial 10 | |
| 6634 | ||
| 6635 | # Copyright (C) 2002-2006, 2008-2022 Free Software Foundation, Inc. | |
| 6636 | # This file is free software; the Free Software Foundation | |
| 6637 | # gives unlimited permission to copy and/or distribute it, | |
| 6638 | # with or without modifications, as long as this notice is preserved. | |
| 6639 | ||
| 6640 | # There are two types of parser skeletons: | |
| 6641 | # | |
| 6642 | # * Those that can be used with any Yacc implementation, including bison. | |
| 6643 | # For these, in the configure.ac, up to Autoconf 2.69, you could use | |
| 6644 | # AC_PROG_YACC | |
| 6645 | # In newer Autoconf versions, however, this macro is broken. See | |
| 6646 | # https://lists.gnu.org/archive/html/autoconf-patches/2013-03/msg00000.html | |
| 6647 | # https://lists.gnu.org/archive/html/bug-autoconf/2018-12/msg00001.html | |
| 6648 | # In the Makefile.am you could use | |
| 6649 | # $(SHELL) $(YLWRAP) $(srcdir)/foo.y \ | |
| 6650 | # y.tab.c foo.c \ | |
| 6651 | # y.tab.h foo.h \ | |
| 6652 | # y.output foo.output \ | |
| 6653 | # -- $(YACC) $(YFLAGS) $(AM_YFLAGS) | |
| 6654 | # or similar. | |
| 6655 | # | |
| 6656 | # * Those that make use of Bison extensions. For example, | |
| 6657 | # - %define api.pure requires bison 2.7 or newer, | |
| 6658 | # - %precedence requires bison 3.0 or newer. | |
| 6659 | # For these, in the configure.ac you will need an invocation of | |
| 6660 | # gl_PROG_BISON([VARIABLE], [MIN_BISON_VERSION]) | |
| 6661 | # Example: | |
| 6662 | # gl_PROG_BISON([PARSE_DATETIME_BISON], [2.4]) | |
| 6663 | # With this preparation, in the Makefile.am there are two ways to formulate | |
| 6664 | # the invocation. Both are direct, without use of 'ylwrap'. | |
| 6665 | # (a) You can invoke | |
| 6666 | # $(VARIABLE) -d $(SOME_BISON_OPTIONS) --output foo.c $(srcdir)/foo.y | |
| 6667 | # or similar. | |
| 6668 | # (b) If you want the invocation to honor an YFLAGS=... parameter passed to | |
| 6669 | # 'configure' or an YFLAGS environment variable present at 'configure' | |
| 6670 | # time, add an invocation of gl_BISON to the configure.ac, and write | |
| 6671 | # $(VARIABLE) -d $(YFLAGS) $(AM_YFLAGS) $(srcdir)/foo.y | |
| 6672 | # or similar. | |
| 6673 | ||
| 6674 | # This macro defines the autoconf variable VARIABLE to 'bison' if the specified | |
| 6675 | # minimum version of bison is found in $PATH, or to ':' otherwise. | |
| 6676 | ||
| 6677 | ||
| 6678 | # This macro sets the autoconf variables YACC (for old-style yacc Makefile | |
| 6679 | # rules) and YFLAGS (to allow options to be passed as 'configure' time). | |
| 6680 | ||
| 6681 | ||
| 6682 | # fcntl-o.m4 serial 7 | |
| 6683 | ||
| 6684 | ||
| 6685 | ||
| 6686 | ||
| 6687 | # Test whether the flags O_NOATIME and O_NOFOLLOW actually work. | |
| 6688 | # Define HAVE_WORKING_O_NOATIME to 1 if O_NOATIME works, or to 0 otherwise. | |
| 6689 | # Define HAVE_WORKING_O_NOFOLLOW to 1 if O_NOFOLLOW works, or to 0 otherwise. | |
| 6690 | ||
| 6691 | ||
| 6692 | # serial 5 | |
| 6693 | # Check for flexible array member support. | |
| 6694 | ||
| 6695 | # Copyright (C) 2006, 2009-2022 Free Software Foundation, Inc. | |
| 6696 | # This file is free software; the Free Software Foundation | |
| 6697 | # gives unlimited permission to copy and/or distribute it, | |
| 6698 | # with or without modifications, as long as this notice is preserved. | |
| 6699 | ||
| 6700 | # Written by Paul Eggert. | |
| 6701 | ||
| 6702 | ||
| 6703 | ||
| 6704 | # gettext.m4 serial 72 (gettext-0.21.1) | |
| 6705 | ||
| 6706 | ||
| 6707 | ||
| 6708 | ||
| 6709 | ||
| 6710 | ||
| 6711 | ||
| 6712 | ||
| 6713 | ||
| 6714 | ||
| 6715 | ||
| 6716 | ||
| 6717 | ||
| 6718 | ||
| 6719 | ||
| 6720 | ||
| 6721 | ||
| 6722 | ||
| 6723 | # glibc2.m4 serial 3 | |
| 6724 | ||
| 6725 | # Test for the GNU C Library, version 2.0 or newer. | |
| 6726 | # From Bruno Haible. | |
| 6727 | ||
| 6728 | ||
| 6729 | ||
| 6730 | # iconv.m4 serial 24 | |
| 6731 | ||
| 6732 | ||
| 6733 | ||
| 6734 | ||
| 6735 | ||
| 6736 | ||
| 6737 | ||
| 6738 | ||
| 6739 | ||
| 6740 | ||
| 6741 | ||
| 6742 | # intdiv0.m4 serial 9 (gettext-0.21.1) | |
| 6743 | ||
| 6744 | ||
| 6745 | ||
| 6746 | ||
| 6747 | # intl.m4 serial 51 (gettext-0.21.1) | |
| 6748 | ||
| 6749 | ||
| 6750 | ||
| 6751 | ||
| 6752 | ||
| 6753 | ||
| 6754 | ||
| 6755 | ||
| 6756 | ||
| 6757 | ||
| 6758 | ||
| 6759 | # intlmacosx.m4 serial 8 (gettext-0.20.2) | |
| 6760 | ||
| 6761 | ||
| 6762 | ||
| 6763 | # intl-thread-locale.m4 serial 9 | |
| 6764 | ||
| 6765 | ||
| 6766 | ||
| 6767 | ||
| 6768 | ||
| 6769 | # intmax.m4 serial 6 (gettext-0.18.2) | |
| 6770 | ||
| 6771 | ||
| 6772 | ||
| 6773 | ||
| 6774 | # inttypes-pri.m4 serial 7 (gettext-0.18.2) | |
| 6775 | ||
| 6776 | ||
| 6777 | ||
| 6778 | ||
| 6779 | # Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI* | |
| 6780 | # macros to non-string values. This is the case on AIX 4.3.3. | |
| 6781 | ||
| 6782 | ||
| 6783 | ||
| 6784 | # inttypes.m4 serial 36 | |
| 6785 | ||
| 6786 | ||
| 6787 | ||
| 6788 | ||
| 6789 | ||
| 6790 | ||
| 6791 | # Ensure that the PRI* and SCN* macros are defined appropriately. | |
| 6792 | ||
| 6793 | ||
| 6794 | # Define the symbol $1 to be 1 if the condition is true, 0 otherwise. | |
| 6795 | # If $2 is true, the condition is $3; otherwise if long long int is supported | |
| 6796 | # approximate the condition with $4; otherwise, assume the condition is false. | |
| 6797 | # The condition should work on all C99 platforms; the approximations should be | |
| 6798 | # good enough to work on all practical pre-C99 platforms. | |
| 6799 | # $2 is evaluated by the C preprocessor, $3 and $4 as compile-time constants. | |
| 6800 | ||
| 6801 | ||
| 6802 | # gl_INTTYPES_MODULE_INDICATOR([modulename]) | |
| 6803 | # sets the shell variable that indicates the presence of the given module | |
| 6804 | # to a C preprocessor expression that will evaluate to 1. | |
| 6805 | # This macro invocation must not occur in macros that are AC_REQUIREd. | |
| 6806 | ||
| 6807 | ||
| 6808 | # Initializes the default values for AC_SUBSTed shell variables. | |
| 6809 | # This macro must not be AC_REQUIREd. It must only be invoked, and only | |
| 6810 | # outside of macros or in macros that are not AC_REQUIREd. | |
| 6811 | ||
| 6812 | ||
| 6813 | ||
| 6814 | ||
| 6815 | # inttypes_h.m4 serial 10 | |
| 6816 | ||
| 6817 | ||
| 6818 | # Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists, | |
| 6819 | # doesn't clash with <sys/types.h>, and declares uintmax_t. | |
| 6820 | ||
| 6821 | ||
| 6822 | ||
| 6823 | # lcmessage.m4 serial 8 | |
| 6824 | ||
| 6825 | ||
| 6826 | # Check whether LC_MESSAGES is available in <locale.h>. | |
| 6827 | ||
| 6828 | ||
| 6829 | ||
| 6830 | # lib-ld.m4 serial 10 | |
| 6831 | ||
| 6832 | ||
| 6833 | ||
| 6834 | ||
| 6835 | ||
| 6836 | ||
| 6837 | # lib-link.m4 serial 33 | |
| 6838 | ||
| 6839 | ||
| 6840 | ||
| 6841 | ||
| 6842 | ||
| 6843 | ||
| 6844 | ||
| 6845 | ||
| 6846 | ||
| 6847 | ||
| 6848 | ||
| 6849 | ||
| 6850 | ||
| 6851 | ||
| 6852 | ||
| 6853 | ||
| 6854 | ||
| 6855 | ||
| 6856 | # lib-prefix.m4 serial 20 | |
| 6857 | ||
| 6858 | ||
| 6859 | ||
| 6860 | ||
| 6861 | ||
| 6862 | ||
| 6863 | ||
| 6864 | ||
| 6865 | ||
| 6866 | ||
| 6867 | # locale_h.m4 serial 28 | |
| 6868 | ||
| 6869 | ||
| 6870 | ||
| 6871 | ||
| 6872 | ||
| 6873 | # gl_LOCALE_MODULE_INDICATOR([modulename]) | |
| 6874 | # sets the shell variable that indicates the presence of the given module | |
| 6875 | # to a C preprocessor expression that will evaluate to 1. | |
| 6876 | # This macro invocation must not occur in macros that are AC_REQUIREd. | |
| 6877 | ||
| 6878 | ||
| 6879 | # Initializes the default values for AC_SUBSTed shell variables. | |
| 6880 | # This macro must not be AC_REQUIREd. It must only be invoked, and only | |
| 6881 | # outside of macros or in macros that are not AC_REQUIREd. | |
| 6882 | ||
| 6883 | ||
| 6884 | ||
| 6885 | ||
| 6886 | # lock.m4 serial 14 | |
| 6887 | ||
| 6888 | ||
| 6889 | ||
| 6890 | ||
| 6891 | # Prerequisites of lib/glthread/lock.c. | |
| 6892 | ||
| 6893 | ||
| 6894 | # nls.m4 serial 6 (gettext-0.20.2) | |
| 6895 | ||
| 6896 | ||
| 6897 | ||
| 6898 | ||
| 6899 | ||
| 6900 | ||
| 6901 | # po.m4 serial 32 (gettext-0.21.1) | |
| 6902 | ||
| 6903 | ||
| 6904 | ||
| 6905 | ||
| 6906 | ||
| 6907 | ||
| 6908 | ||
| 6909 | ||
| 6910 | ||
| 6911 | ||
| 6912 | ||
| 6913 | ||
| 6914 | # printf-posix.m4 serial 7 (gettext-0.21.1) | |
| 6915 | ||
| 6916 | ||
| 6917 | ||
| 6918 | ||
| 6919 | # progtest.m4 serial 9 (gettext-0.21.1) | |
| 6920 | ||
| 6921 | ||
| 6922 | ||
| 6923 | ||
| 6924 | # Search path for a program which passes the given test. | |
| 6925 | ||
| 6926 | ||
| 6927 | ||
| 6928 | # pthread_rwlock_rdlock.m4 serial 4 | |
| 6929 | ||
| 6930 | ||
| 6931 | ||
| 6932 | ||
| 6933 | # size_max.m4 serial 12 | |
| 6934 | ||
| 6935 | ||
| 6936 | ||
| 6937 | ||
| 6938 | ||
| 6939 | ||
| 6940 | # stdint_h.m4 serial 9 | |
| 6941 | ||
| 6942 | ||
| 6943 | # Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists, | |
| 6944 | # doesn't clash with <sys/types.h>, and declares uintmax_t. | |
| 6945 | ||
| 6946 | ||
| 6947 | ||
| 6948 | # threadlib.m4 serial 32 | |
| 6949 | ||
| 6950 | ||
| 6951 | ||
| 6952 | ||
| 6953 | ||
| 6954 | ||
| 6955 | ||
| 6956 | ||
| 6957 | ||
| 6958 | ||
| 6959 | ||
| 6960 | ||
| 6961 | ||
| 6962 | ||
| 6963 | ||
| 6964 | ||
| 6965 | ||
| 6966 | ||
| 6967 | ||
| 6968 | ||
| 6969 | ||
| 6970 | ||
| 6971 | ||
| 6972 | ||
| 6973 | ||
| 6974 | ||
| 6975 | ||
| 6976 | ||
| 6977 | ||
| 6978 | ||
| 6979 | ||
| 6980 | ||
| 6981 | ||
| 6982 | ||
| 6983 | ||
| 6984 | ||
| 6985 | ||
| 6986 | ||
| 6987 | ||
| 6988 | ||
| 6989 | ||
| 6990 | ||
| 6991 | ||
| 6992 | ||
| 6993 | ||
| 6994 | ||
| 6995 | ||
| 6996 | ||
| 6997 | ||
| 6998 | # uintmax_t.m4 serial 12 | |
| 6999 | ||
| 7000 | ||
| 7001 | ||
| 7002 | ||
| 7003 | # Define uintmax_t to 'unsigned long' or 'unsigned long long' | |
| 7004 | # if it is not already defined in <stdint.h> or <inttypes.h>. | |
| 7005 | ||
| 7006 | ||
| 7007 | ||
| 7008 | # ulonglong.m4 serial 10 | |
| 7009 | ||
| 7010 | # visibility.m4 serial 6 | |
| 7011 | ||
| 7012 | ||
| 7013 | ||
| 7014 | ||
| 7015 | ||
| 7016 | # wchar_t.m4 serial 4 (gettext-0.18.2) | |
| 7017 | ||
| 7018 | ||
| 7019 | ||
| 7020 | ||
| 7021 | # wint_t.m4 serial 11 | |
| 7022 | ||
| 7023 | ||
| 7024 | ||
| 7025 | ||
| 7026 | ||
| 7027 | ||
| 7028 | # xsize.m4 serial 5 | |
| 7029 | ||
| 7030 | ||
| 7031 | ||
| 7032 | ||
| 7033 | # glibc21.m4 serial 5 | |
| 7034 | ||
| 7035 | # Test for the GNU C Library, version 2.1 or newer, or uClibc. | |
| 7036 | # From Bruno Haible. | |
| 7037 | ||
| 7038 | ||
| 7039 | ||
| 7040 | # host-cpu-c-abi.m4 serial 15 | |
| 7041 | ||
| 7042 | ||
| 7043 | ||
| 7044 | ||
| 7045 | ||
| 7046 | ||
| 7047 | ||
| 7048 | ||
| 7049 | # Check for bool that conforms to C2023. | |
| 7050 | ||
| 7051 | ||
| 7052 | ||
| 7053 | ||
| 7054 | # d-type.m4 | |
| 7055 | # serial 12 | |
| 7056 | ||
| 7057 | ||
| 7058 | ||
| 7059 | ||
| 7060 | ||
| 7061 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 | |
| 7062 | printf %s "checking for an ANSI C-conforming const... " >&6; } | |
| 7063 | if test ${ac_cv_c_const+y} | |
| 7064 | then : | |
| 7065 | printf %s "(cached) " >&6 | |
| 7066 | else case e in #( | |
| 7067 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 7068 | /* end confdefs.h. */ | |
| 7069 | ||
| 7070 | int | |
| 7071 | main (void) | |
| 7072 | { | |
| 7073 | ||
| 7074 | #ifndef __cplusplus | |
| 7075 | /* Ultrix mips cc rejects this sort of thing. */ | |
| 7076 | typedef int charset[2]; | |
| 7077 | const charset cs = { 0, 0 }; | |
| 7078 | /* SunOS 4.1.1 cc rejects this. */ | |
| 7079 | char const *const *pcpcc; | |
| 7080 | char **ppc; | |
| 7081 | /* NEC SVR4.0.2 mips cc rejects this. */ | |
| 7082 | struct point {int x, y;}; | |
| 7083 | static struct point const zero = {0,0}; | |
| 7084 | /* IBM XL C 1.02.0.0 rejects this. | |
| 7085 | It does not let you subtract one const X* pointer from another in | |
| 7086 | an arm of an if-expression whose if-part is not a constant | |
| 7087 | expression */ | |
| 7088 | const char *g = "string"; | |
| 7089 | pcpcc = &g + (g ? g-g : 0); | |
| 7090 | /* HPUX 7.0 cc rejects these. */ | |
| 7091 | ++pcpcc; | |
| 7092 | ppc = (char**) pcpcc; | |
| 7093 | pcpcc = (char const *const *) ppc; | |
| 7094 | { /* SCO 3.2v4 cc rejects this sort of thing. */ | |
| 7095 | char tx; | |
| 7096 | char *t = &tx; | |
| 7097 | char const *s = 0 ? (char *) 0 : (char const *) 0; | |
| 7098 | ||
| 7099 | *t++ = 0; | |
| 7100 | if (s) return 0; | |
| 7101 | } | |
| 7102 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ | |
| 7103 | int x[] = {25, 17}; | |
| 7104 | const int *foo = &x[0]; | |
| 7105 | ++foo; | |
| 7106 | } | |
| 7107 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ | |
| 7108 | typedef const int *iptr; | |
| 7109 | iptr p = 0; | |
| 7110 | ++p; | |
| 7111 | } | |
| 7112 | { /* IBM XL C 1.02.0.0 rejects this sort of thing, saying | |
| 7113 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ | |
| 7114 | struct s { int j; const int *ap[3]; } bx; | |
| 7115 | struct s *b = &bx; b->j = 5; | |
| 7116 | } | |
| 7117 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ | |
| 7118 | const int foo = 10; | |
| 7119 | if (!foo) return 0; | |
| 7120 | } | |
| 7121 | return !cs[0] && !zero.x; | |
| 7122 | #endif | |
| 7123 | ||
| 7124 | ; | |
| 7125 | return 0; | |
| 7126 | } | |
| 7127 | _ACEOF | |
| 7128 | if ac_fn_c_try_compile "$LINENO" | |
| 7129 | then : | |
| 7130 | ac_cv_c_const=yes | |
| 7131 | else case e in #( | |
| 7132 | e) ac_cv_c_const=no ;; | |
| 7133 | esac | |
| 7134 | fi | |
| 7135 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 7136 | esac | |
| 7137 | fi | |
| 7138 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 | |
| 7139 | printf "%s\n" "$ac_cv_c_const" >&6; } | |
| 7140 | if test $ac_cv_c_const = no; then | |
| 7141 | ||
| 7142 | printf "%s\n" "#define const /**/" >>confdefs.h | |
| 7143 | ||
| 7144 | fi | |
| 7145 | ||
| 7146 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 | |
| 7147 | printf %s "checking for inline... " >&6; } | |
| 7148 | if test ${ac_cv_c_inline+y} | |
| 7149 | then : | |
| 7150 | printf %s "(cached) " >&6 | |
| 7151 | else case e in #( | |
| 7152 | e) ac_cv_c_inline=no | |
| 7153 | for ac_kw in inline __inline__ __inline; do | |
| 7154 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 7155 | /* end confdefs.h. */ | |
| 7156 | #ifndef __cplusplus | |
| 7157 | typedef int foo_t; | |
| 7158 | static $ac_kw foo_t static_foo (void) {return 0; } | |
| 7159 | $ac_kw foo_t foo (void) {return 0; } | |
| 7160 | #endif | |
| 7161 | ||
| 7162 | _ACEOF | |
| 7163 | if ac_fn_c_try_compile "$LINENO" | |
| 7164 | then : | |
| 7165 | ac_cv_c_inline=$ac_kw | |
| 7166 | fi | |
| 7167 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 7168 | test "$ac_cv_c_inline" != no && break | |
| 7169 | done | |
| 7170 | ;; | |
| 7171 | esac | |
| 7172 | fi | |
| 7173 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 | |
| 7174 | printf "%s\n" "$ac_cv_c_inline" >&6; } | |
| 7175 | ||
| 7176 | case $ac_cv_c_inline in | |
| 7177 | inline | yes) ;; | |
| 7178 | *) | |
| 7179 | case $ac_cv_c_inline in | |
| 7180 | no) ac_val=;; | |
| 7181 | *) ac_val=$ac_cv_c_inline;; | |
| 7182 | esac | |
| 7183 | cat >>confdefs.h <<_ACEOF | |
| 7184 | #ifndef __cplusplus | |
| 7185 | #define inline $ac_val | |
| 7186 | #endif | |
| 7187 | _ACEOF | |
| 7188 | ;; | |
| 7189 | esac | |
| 7190 | ||
| 7191 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 | |
| 7192 | printf %s "checking whether byte ordering is bigendian... " >&6; } | |
| 7193 | if test ${ac_cv_c_bigendian+y} | |
| 7194 | then : | |
| 7195 | printf %s "(cached) " >&6 | |
| 7196 | else case e in #( | |
| 7197 | e) ac_cv_c_bigendian=unknown | |
| 7198 | # See if we're dealing with a universal compiler. | |
| 7199 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 7200 | /* end confdefs.h. */ | |
| 7201 | #ifndef __APPLE_CC__ | |
| 7202 | not a universal capable compiler | |
| 7203 | #endif | |
| 7204 | typedef int dummy; | |
| 7205 | ||
| 7206 | _ACEOF | |
| 7207 | if ac_fn_c_try_compile "$LINENO" | |
| 7208 | then : | |
| 7209 | ||
| 7210 | # Check for potential -arch flags. It is not universal unless | |
| 7211 | # there are at least two -arch flags with different values. | |
| 7212 | ac_arch= | |
| 7213 | ac_prev= | |
| 7214 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do | |
| 7215 | if test -n "$ac_prev"; then | |
| 7216 | case $ac_word in | |
| 7217 | i?86 | x86_64 | ppc | ppc64) | |
| 7218 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then | |
| 7219 | ac_arch=$ac_word | |
| 7220 | else | |
| 7221 | ac_cv_c_bigendian=universal | |
| 7222 | break | |
| 7223 | fi | |
| 7224 | ;; | |
| 7225 | esac | |
| 7226 | ac_prev= | |
| 7227 | elif test "x$ac_word" = "x-arch"; then | |
| 7228 | ac_prev=arch | |
| 7229 | fi | |
| 7230 | done | |
| 7231 | fi | |
| 7232 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 7233 | if test $ac_cv_c_bigendian = unknown; then | |
| 7234 | # See if sys/param.h defines the BYTE_ORDER macro. | |
| 7235 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 7236 | /* end confdefs.h. */ | |
| 7237 | #include <sys/types.h> | |
| 7238 | #include <sys/param.h> | |
| 7239 | ||
| 7240 | int | |
| 7241 | main (void) | |
| 7242 | { | |
| 7243 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \\ | |
| 7244 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \\ | |
| 7245 | && LITTLE_ENDIAN) | |
| 7246 | bogus endian macros | |
| 7247 | #endif | |
| 7248 | ||
| 7249 | ; | |
| 7250 | return 0; | |
| 7251 | } | |
| 7252 | _ACEOF | |
| 7253 | if ac_fn_c_try_compile "$LINENO" | |
| 7254 | then : | |
| 7255 | # It does; now see whether it defined to BIG_ENDIAN or not. | |
| 7256 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 7257 | /* end confdefs.h. */ | |
| 7258 | #include <sys/types.h> | |
| 7259 | #include <sys/param.h> | |
| 7260 | ||
| 7261 | int | |
| 7262 | main (void) | |
| 7263 | { | |
| 7264 | #if BYTE_ORDER != BIG_ENDIAN | |
| 7265 | not big endian | |
| 7266 | #endif | |
| 7267 | ||
| 7268 | ; | |
| 7269 | return 0; | |
| 7270 | } | |
| 7271 | _ACEOF | |
| 7272 | if ac_fn_c_try_compile "$LINENO" | |
| 7273 | then : | |
| 7274 | ac_cv_c_bigendian=yes | |
| 7275 | else case e in #( | |
| 7276 | e) ac_cv_c_bigendian=no ;; | |
| 7277 | esac | |
| 7278 | fi | |
| 7279 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 7280 | fi | |
| 7281 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 7282 | fi | |
| 7283 | if test $ac_cv_c_bigendian = unknown; then | |
| 7284 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). | |
| 7285 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 7286 | /* end confdefs.h. */ | |
| 7287 | #include <limits.h> | |
| 7288 | ||
| 7289 | int | |
| 7290 | main (void) | |
| 7291 | { | |
| 7292 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) | |
| 7293 | bogus endian macros | |
| 7294 | #endif | |
| 7295 | ||
| 7296 | ; | |
| 7297 | return 0; | |
| 7298 | } | |
| 7299 | _ACEOF | |
| 7300 | if ac_fn_c_try_compile "$LINENO" | |
| 7301 | then : | |
| 7302 | # It does; now see whether it defined to _BIG_ENDIAN or not. | |
| 7303 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 7304 | /* end confdefs.h. */ | |
| 7305 | #include <limits.h> | |
| 7306 | ||
| 7307 | int | |
| 7308 | main (void) | |
| 7309 | { | |
| 7310 | #ifndef _BIG_ENDIAN | |
| 7311 | not big endian | |
| 7312 | #endif | |
| 7313 | ||
| 7314 | ; | |
| 7315 | return 0; | |
| 7316 | } | |
| 7317 | _ACEOF | |
| 7318 | if ac_fn_c_try_compile "$LINENO" | |
| 7319 | then : | |
| 7320 | ac_cv_c_bigendian=yes | |
| 7321 | else case e in #( | |
| 7322 | e) ac_cv_c_bigendian=no ;; | |
| 7323 | esac | |
| 7324 | fi | |
| 7325 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 7326 | fi | |
| 7327 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 7328 | fi | |
| 7329 | if test $ac_cv_c_bigendian = unknown; then | |
| 7330 | # Compile a test program. | |
| 7331 | if test "$cross_compiling" = yes | |
| 7332 | then : | |
| 7333 | # Try to guess by grepping values from an object file. | |
| 7334 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 7335 | /* end confdefs.h. */ | |
| 7336 | unsigned short int ascii_mm[] = | |
| 7337 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; | |
| 7338 | unsigned short int ascii_ii[] = | |
| 7339 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; | |
| 7340 | int use_ascii (int i) { | |
| 7341 | return ascii_mm[i] + ascii_ii[i]; | |
| 7342 | } | |
| 7343 | unsigned short int ebcdic_ii[] = | |
| 7344 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; | |
| 7345 | unsigned short int ebcdic_mm[] = | |
| 7346 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; | |
| 7347 | int use_ebcdic (int i) { | |
| 7348 | return ebcdic_mm[i] + ebcdic_ii[i]; | |
| 7349 | } | |
| 7350 | int | |
| 7351 | main (int argc, char **argv) | |
| 7352 | { | |
| 7353 | /* Intimidate the compiler so that it does not | |
| 7354 | optimize the arrays away. */ | |
| 7355 | char *p = argv[0]; | |
| 7356 | ascii_mm[1] = *p++; ebcdic_mm[1] = *p++; | |
| 7357 | ascii_ii[1] = *p++; ebcdic_ii[1] = *p++; | |
| 7358 | return use_ascii (argc) == use_ebcdic (*p); | |
| 7359 | } | |
| 7360 | _ACEOF | |
| 7361 | if ac_fn_c_try_link "$LINENO" | |
| 7362 | then : | |
| 7363 | if grep BIGenDianSyS conftest$ac_exeext >/dev/null; then | |
| 7364 | ac_cv_c_bigendian=yes | |
| 7365 | fi | |
| 7366 | if grep LiTTleEnDian conftest$ac_exeext >/dev/null ; then | |
| 7367 | if test "$ac_cv_c_bigendian" = unknown; then | |
| 7368 | ac_cv_c_bigendian=no | |
| 7369 | else | |
| 7370 | # finding both strings is unlikely to happen, but who knows? | |
| 7371 | ac_cv_c_bigendian=unknown | |
| 7372 | fi | |
| 7373 | fi | |
| 7374 | fi | |
| 7375 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 7376 | conftest$ac_exeext conftest.$ac_ext | |
| 7377 | else case e in #( | |
| 7378 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 7379 | /* end confdefs.h. */ | |
| 7380 | $ac_includes_default | |
| 7381 | int | |
| 7382 | main (void) | |
| 7383 | { | |
| 7384 | ||
| 7385 | /* Are we little or big endian? From Harbison&Steele. */ | |
| 7386 | union | |
| 7387 | { | |
| 7388 | long int l; | |
| 7389 | char c[sizeof (long int)]; | |
| 7390 | } u; | |
| 7391 | u.l = 1; | |
| 7392 | return u.c[sizeof (long int) - 1] == 1; | |
| 7393 | ||
| 7394 | ; | |
| 7395 | return 0; | |
| 7396 | } | |
| 7397 | _ACEOF | |
| 7398 | if ac_fn_c_try_run "$LINENO" | |
| 7399 | then : | |
| 7400 | ac_cv_c_bigendian=no | |
| 7401 | else case e in #( | |
| 7402 | e) ac_cv_c_bigendian=yes ;; | |
| 7403 | esac | |
| 7404 | fi | |
| 7405 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 7406 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 7407 | esac | |
| 7408 | fi | |
| 7409 | ||
| 7410 | fi ;; | |
| 7411 | esac | |
| 7412 | fi | |
| 7413 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 | |
| 7414 | printf "%s\n" "$ac_cv_c_bigendian" >&6; } | |
| 7415 | case $ac_cv_c_bigendian in #( | |
| 7416 | yes) | |
| 7417 | printf "%s\n" "#define WORDS_BIGENDIAN 1" >>confdefs.h | |
| 7418 | ;; #( | |
| 7419 | no) | |
| 7420 | ;; #( | |
| 7421 | universal) | |
| 7422 | ||
| 7423 | printf "%s\n" "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h | |
| 7424 | ||
| 7425 | ;; #( | |
| 7426 | *) | |
| 7427 | as_fn_error $? "unknown endianness | |
| 7428 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; | |
| 7429 | esac | |
| 7430 | ||
| 7431 | ||
| 7432 | if test "$ac_prog_cc_stdc" != no; then | |
| 7433 | ||
| 7434 | printf "%s\n" "#define HAVE_STRINGIZE 1" >>confdefs.h | |
| 7435 | ||
| 7436 | fi | |
| 7437 | ||
| 7438 | ||
| 7439 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long double" >&5 | |
| 7440 | printf %s "checking for long double... " >&6; } | |
| 7441 | if test ${ac_cv_type_long_double+y} | |
| 7442 | then : | |
| 7443 | printf %s "(cached) " >&6 | |
| 7444 | else case e in #( | |
| 7445 | e) if test "$GCC" = yes; then | |
| 7446 | ac_cv_type_long_double=yes | |
| 7447 | else | |
| 7448 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 7449 | /* end confdefs.h. */ | |
| 7450 | /* The Stardent Vistra knows sizeof (long double), but does | |
| 7451 | not support it. */ | |
| 7452 | long double foo = 0.0L; | |
| 7453 | int | |
| 7454 | main (void) | |
| 7455 | { | |
| 7456 | static int test_array [1 - 2 * !(/* On Ultrix 4.3 cc, long double is 4 and double is 8. */ | |
| 7457 | sizeof (double) <= sizeof (long double))]; | |
| 7458 | test_array [0] = 0; | |
| 7459 | return test_array [0]; | |
| 7460 | ||
| 7461 | ; | |
| 7462 | return 0; | |
| 7463 | } | |
| 7464 | _ACEOF | |
| 7465 | if ac_fn_c_try_compile "$LINENO" | |
| 7466 | then : | |
| 7467 | ac_cv_type_long_double=yes | |
| 7468 | else case e in #( | |
| 7469 | e) ac_cv_type_long_double=no ;; | |
| 7470 | esac | |
| 7471 | fi | |
| 7472 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 7473 | fi ;; | |
| 7474 | esac | |
| 7475 | fi | |
| 7476 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_double" >&5 | |
| 7477 | printf "%s\n" "$ac_cv_type_long_double" >&6; } | |
| 7478 | if test $ac_cv_type_long_double = yes; then | |
| 7479 | ||
| 7480 | printf "%s\n" "#define HAVE_LONG_DOUBLE 1" >>confdefs.h | |
| 7481 | ||
| 7482 | fi | |
| 7483 | ||
| 7484 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether char is unsigned" >&5 | |
| 7485 | printf %s "checking whether char is unsigned... " >&6; } | |
| 7486 | if test ${ac_cv_c_char_unsigned+y} | |
| 7487 | then : | |
| 7488 | printf %s "(cached) " >&6 | |
| 7489 | else case e in #( | |
| 7490 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 7491 | /* end confdefs.h. */ | |
| 7492 | $ac_includes_default | |
| 7493 | int | |
| 7494 | main (void) | |
| 7495 | { | |
| 7496 | static int test_array [1 - 2 * !(((char) -1) < 0)]; | |
| 7497 | test_array [0] = 0; | |
| 7498 | return test_array [0]; | |
| 7499 | ||
| 7500 | ; | |
| 7501 | return 0; | |
| 7502 | } | |
| 7503 | _ACEOF | |
| 7504 | if ac_fn_c_try_compile "$LINENO" | |
| 7505 | then : | |
| 7506 | ac_cv_c_char_unsigned=no | |
| 7507 | else case e in #( | |
| 7508 | e) ac_cv_c_char_unsigned=yes ;; | |
| 7509 | esac | |
| 7510 | fi | |
| 7511 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 7512 | esac | |
| 7513 | fi | |
| 7514 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_char_unsigned" >&5 | |
| 7515 | printf "%s\n" "$ac_cv_c_char_unsigned" >&6; } | |
| 7516 | if test $ac_cv_c_char_unsigned = yes; then | |
| 7517 | printf "%s\n" "#define __CHAR_UNSIGNED__ 1" >>confdefs.h | |
| 7518 | ||
| 7519 | fi | |
| 7520 | ||
| 7521 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working volatile" >&5 | |
| 7522 | printf %s "checking for working volatile... " >&6; } | |
| 7523 | if test ${ac_cv_c_volatile+y} | |
| 7524 | then : | |
| 7525 | printf %s "(cached) " >&6 | |
| 7526 | else case e in #( | |
| 7527 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 7528 | /* end confdefs.h. */ | |
| 7529 | ||
| 7530 | int | |
| 7531 | main (void) | |
| 7532 | { | |
| 7533 | ||
| 7534 | volatile int x; | |
| 7535 | int * volatile y = (int *) 0; | |
| 7536 | return !x && !y; | |
| 7537 | ; | |
| 7538 | return 0; | |
| 7539 | } | |
| 7540 | _ACEOF | |
| 7541 | if ac_fn_c_try_compile "$LINENO" | |
| 7542 | then : | |
| 7543 | ac_cv_c_volatile=yes | |
| 7544 | else case e in #( | |
| 7545 | e) ac_cv_c_volatile=no ;; | |
| 7546 | esac | |
| 7547 | fi | |
| 7548 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 7549 | esac | |
| 7550 | fi | |
| 7551 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_volatile" >&5 | |
| 7552 | printf "%s\n" "$ac_cv_c_volatile" >&6; } | |
| 7553 | if test $ac_cv_c_volatile = no; then | |
| 7554 | ||
| 7555 | printf "%s\n" "#define volatile /**/" >>confdefs.h | |
| 7556 | ||
| 7557 | fi | |
| 7558 | ||
| 7559 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 | |
| 7560 | printf %s "checking for C/C++ restrict keyword... " >&6; } | |
| 7561 | if test ${ac_cv_c_restrict+y} | |
| 7562 | then : | |
| 7563 | printf %s "(cached) " >&6 | |
| 7564 | else case e in #( | |
| 7565 | e) ac_cv_c_restrict=no | |
| 7566 | # Put '__restrict__' first, to avoid problems with glibc and non-GCC; see: | |
| 7567 | # https://lists.gnu.org/archive/html/bug-autoconf/2016-02/msg00006.html | |
| 7568 | # Put 'restrict' last, because C++ lacks it. | |
| 7569 | for ac_kw in __restrict__ __restrict _Restrict restrict; do | |
| 7570 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 7571 | /* end confdefs.h. */ | |
| 7572 | typedef int *int_ptr; | |
| 7573 | int foo (int_ptr $ac_kw ip) { return ip[0]; } | |
| 7574 | int bar (int [$ac_kw]); /* Catch GCC bug 14050. */ | |
| 7575 | int bar (int ip[$ac_kw]) { return ip[0]; } | |
| 7576 | ||
| 7577 | int | |
| 7578 | main (void) | |
| 7579 | { | |
| 7580 | int s[1]; | |
| 7581 | int *$ac_kw t = s; | |
| 7582 | t[0] = 0; | |
| 7583 | return foo (t) + bar (t); | |
| 7584 | ||
| 7585 | ; | |
| 7586 | return 0; | |
| 7587 | } | |
| 7588 | _ACEOF | |
| 7589 | if ac_fn_c_try_compile "$LINENO" | |
| 7590 | then : | |
| 7591 | ac_cv_c_restrict=$ac_kw | |
| 7592 | fi | |
| 7593 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 7594 | test "$ac_cv_c_restrict" != no && break | |
| 7595 | done | |
| 7596 | ;; | |
| 7597 | esac | |
| 7598 | fi | |
| 7599 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 | |
| 7600 | printf "%s\n" "$ac_cv_c_restrict" >&6; } | |
| 7601 | ||
| 7602 | case $ac_cv_c_restrict in | |
| 7603 | restrict) ;; | |
| 7604 | no) printf "%s\n" "#define restrict /**/" >>confdefs.h | |
| 7605 | ;; | |
| 7606 | *) printf "%s\n" "#define restrict $ac_cv_c_restrict" >>confdefs.h | |
| 7607 | ;; | |
| 7608 | esac | |
| 7609 | ||
| 7610 | ||
| 7611 | ||
| 7612 | ||
| 7613 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bool, true, false" >&5 | |
| 7614 | printf %s "checking for bool, true, false... " >&6; } | |
| 7615 | if test ${gl_cv_c_bool+y} | |
| 7616 | then : | |
| 7617 | printf %s "(cached) " >&6 | |
| 7618 | else case e in #( | |
| 7619 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 7620 | /* end confdefs.h. */ | |
| 7621 | ||
| 7622 | #if true == false | |
| 7623 | #error "true == false" | |
| 7624 | #endif | |
| 7625 | extern bool b; | |
| 7626 | bool b = true == false; | |
| 7627 | _ACEOF | |
| 7628 | if ac_fn_c_try_compile "$LINENO" | |
| 7629 | then : | |
| 7630 | gl_cv_c_bool=yes | |
| 7631 | else case e in #( | |
| 7632 | e) gl_cv_c_bool=no ;; | |
| 7633 | esac | |
| 7634 | fi | |
| 7635 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 7636 | esac | |
| 7637 | fi | |
| 7638 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_c_bool" >&5 | |
| 7639 | printf "%s\n" "$gl_cv_c_bool" >&6; } | |
| 7640 | if test "$gl_cv_c_bool" = yes; then | |
| 7641 | ||
| 7642 | printf "%s\n" "#define HAVE_C_BOOL 1" >>confdefs.h | |
| 7643 | ||
| 7644 | fi | |
| 7645 | ||
| 7646 | ||
| 7647 | ||
| 7648 | ||
| 7649 | ||
| 7650 | ||
| 7651 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a race-free mkdir -p" >&5 | |
| 7652 | printf %s "checking for a race-free mkdir -p... " >&6; } | |
| 7653 | if test -z "$MKDIR_P"; then | |
| 7654 | if test ${ac_cv_path_mkdir+y} | |
| 7655 | then : | |
| 7656 | printf %s "(cached) " >&6 | |
| 7657 | else case e in #( | |
| 7658 | e) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 7659 | for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin | |
| 7660 | do | |
| 7661 | IFS=$as_save_IFS | |
| 7662 | case $as_dir in #((( | |
| 7663 | '') as_dir=./ ;; | |
| 7664 | */) ;; | |
| 7665 | *) as_dir=$as_dir/ ;; | |
| 7666 | esac | |
| 7667 | for ac_prog in mkdir gmkdir; do | |
| 7668 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 7669 | as_fn_executable_p "$as_dir$ac_prog$ac_exec_ext" || continue | |
| 7670 | case `"$as_dir$ac_prog$ac_exec_ext" --version 2>&1` in #( | |
| 7671 | 'mkdir ('*'coreutils) '* | \ | |
| 7672 | *'BusyBox '* | \ | |
| 7673 | 'mkdir (fileutils) '4.1*) | |
| 7674 | ac_cv_path_mkdir=$as_dir$ac_prog$ac_exec_ext | |
| 7675 | break 3;; | |
| 7676 | esac | |
| 7677 | done | |
| 7678 | done | |
| 7679 | done | |
| 7680 | IFS=$as_save_IFS | |
| 7681 | ;; | |
| 7682 | esac | |
| 7683 | fi | |
| 7684 | ||
| 7685 | test -d ./--version && rmdir ./--version | |
| 7686 | if test ${ac_cv_path_mkdir+y}; then | |
| 7687 | MKDIR_P="$ac_cv_path_mkdir -p" | |
| 7688 | else | |
| 7689 | # As a last resort, use plain mkdir -p, | |
| 7690 | # in the hope it doesn't have the bugs of ancient mkdir. | |
| 7691 | MKDIR_P='mkdir -p' | |
| 7692 | fi | |
| 7693 | fi | |
| 7694 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 | |
| 7695 | printf "%s\n" "$MKDIR_P" >&6; } | |
| 7696 | ||
| 7697 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 | |
| 7698 | printf %s "checking for a sed that does not truncate output... " >&6; } | |
| 7699 | if test ${ac_cv_path_SED+y} | |
| 7700 | then : | |
| 7701 | printf %s "(cached) " >&6 | |
| 7702 | else case e in #( | |
| 7703 | e) ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ | |
| 7704 | for ac_i in 1 2 3 4 5 6 7; do | |
| 7705 | ac_script="$ac_script$as_nl$ac_script" | |
| 7706 | done | |
| 7707 | echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed | |
| 7708 | { ac_script=; unset ac_script;} | |
| 7709 | if test -z "$SED"; then | |
| 7710 | ac_path_SED_found=false | |
| 7711 | # Loop through the user's path and test for each of PROGNAME-LIST | |
| 7712 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 7713 | for as_dir in $PATH | |
| 7714 | do | |
| 7715 | IFS=$as_save_IFS | |
| 7716 | case $as_dir in #((( | |
| 7717 | '') as_dir=./ ;; | |
| 7718 | */) ;; | |
| 7719 | *) as_dir=$as_dir/ ;; | |
| 7720 | esac | |
| 7721 | for ac_prog in sed gsed | |
| 7722 | do | |
| 7723 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 7724 | ac_path_SED="$as_dir$ac_prog$ac_exec_ext" | |
| 7725 | as_fn_executable_p "$ac_path_SED" || continue | |
| 7726 | # Check for GNU ac_path_SED and select it if it is found. | |
| 7727 | # Check for GNU $ac_path_SED | |
| 7728 | case `"$ac_path_SED" --version 2>&1` in #( | |
| 7729 | *GNU*) | |
| 7730 | ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; | |
| 7731 | #( | |
| 7732 | *) | |
| 7733 | ac_count=0 | |
| 7734 | printf %s 0123456789 >"conftest.in" | |
| 7735 | while : | |
| 7736 | do | |
| 7737 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
| 7738 | mv "conftest.tmp" "conftest.in" | |
| 7739 | cp "conftest.in" "conftest.nl" | |
| 7740 | printf "%s\n" '' >> "conftest.nl" | |
| 7741 | "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
| 7742 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
| 7743 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
| 7744 | if test $ac_count -gt ${ac_path_SED_max-0}; then | |
| 7745 | # Best one so far, save it but keep looking for a better one | |
| 7746 | ac_cv_path_SED="$ac_path_SED" | |
| 7747 | ac_path_SED_max=$ac_count | |
| 7748 | fi | |
| 7749 | # 10*(2^10) chars as input seems more than enough | |
| 7750 | test $ac_count -gt 10 && break | |
| 7751 | done | |
| 7752 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
| 7753 | esac | |
| 7754 | ||
| 7755 | $ac_path_SED_found && break 3 | |
| 7756 | done | |
| 7757 | done | |
| 7758 | done | |
| 7759 | IFS=$as_save_IFS | |
| 7760 | if test -z "$ac_cv_path_SED"; then | |
| 7761 | as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 | |
| 7762 | fi | |
| 7763 | else | |
| 7764 | ac_cv_path_SED=$SED | |
| 7765 | fi | |
| 7766 | ;; | |
| 7767 | esac | |
| 7768 | fi | |
| 7769 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 | |
| 7770 | printf "%s\n" "$ac_cv_path_SED" >&6; } | |
| 7771 | SED="$ac_cv_path_SED" | |
| 7772 | rm -f conftest.sed | |
| 7773 | ||
| 7774 | ||
| 7775 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 | |
| 7776 | printf %s "checking whether NLS is requested... " >&6; } | |
| 7777 | # Check whether --enable-nls was given. | |
| 7778 | if test ${enable_nls+y} | |
| 7779 | then : | |
| 7780 | enableval=$enable_nls; USE_NLS=$enableval | |
| 7781 | else case e in #( | |
| 7782 | e) USE_NLS=yes ;; | |
| 7783 | esac | |
| 7784 | fi | |
| 7785 | ||
| 7786 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 | |
| 7787 | printf "%s\n" "$USE_NLS" >&6; } | |
| 7788 | ||
| 7789 | ||
| 7790 | ||
| 7791 | ||
| 7792 | GETTEXT_MACRO_VERSION=0.20 | |
| 7793 | ||
| 7794 | ||
| 7795 | ||
| 7796 | ||
| 7797 | # Prepare PATH_SEPARATOR. | |
| 7798 | # The user is always right. | |
| 7799 | if test "${PATH_SEPARATOR+set}" != set; then | |
| 7800 | # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which | |
| 7801 | # contains only /bin. Note that ksh looks also at the FPATH variable, | |
| 7802 | # so we have to set that as well for the test. | |
| 7803 | PATH_SEPARATOR=: | |
| 7804 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ | |
| 7805 | && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ | |
| 7806 | || PATH_SEPARATOR=';' | |
| 7807 | } | |
| 7808 | fi | |
| 7809 | ||
| 7810 | # Find out how to test for executable files. Don't use a zero-byte file, | |
| 7811 | # as systems may use methods other than mode bits to determine executability. | |
| 7812 | cat >conf$$.file <<_ASEOF | |
| 7813 | #! /bin/sh | |
| 7814 | exit 0 | |
| 7815 | _ASEOF | |
| 7816 | chmod +x conf$$.file | |
| 7817 | if test -x conf$$.file >/dev/null 2>&1; then | |
| 7818 | ac_executable_p="test -x" | |
| 7819 | else | |
| 7820 | ac_executable_p="test -f" | |
| 7821 | fi | |
| 7822 | rm -f conf$$.file | |
| 7823 | ||
| 7824 | # Extract the first word of "msgfmt", so it can be a program name with args. | |
| 7825 | set dummy msgfmt; ac_word=$2 | |
| 7826 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 7827 | printf %s "checking for $ac_word... " >&6; } | |
| 7828 | if test ${ac_cv_path_MSGFMT+y} | |
| 7829 | then : | |
| 7830 | printf %s "(cached) " >&6 | |
| 7831 | else case e in #( | |
| 7832 | e) case "$MSGFMT" in | |
| 7833 | [\\/]* | ?:[\\/]*) | |
| 7834 | ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path. | |
| 7835 | ;; | |
| 7836 | *) | |
| 7837 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR | |
| 7838 | for ac_dir in $PATH; do | |
| 7839 | IFS="$ac_save_IFS" | |
| 7840 | test -z "$ac_dir" && ac_dir=. | |
| 7841 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 7842 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
| 7843 | echo "$as_me: trying $ac_dir/$ac_word..." >&5 | |
| 7844 | if $ac_dir/$ac_word --statistics /dev/null >&5 2>&1 && | |
| 7845 | (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then | |
| 7846 | ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exec_ext" | |
| 7847 | break 2 | |
| 7848 | fi | |
| 7849 | fi | |
| 7850 | done | |
| 7851 | done | |
| 7852 | IFS="$ac_save_IFS" | |
| 7853 | test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":" | |
| 7854 | ;; | |
| 7855 | esac ;; | |
| 7856 | esac | |
| 7857 | fi | |
| 7858 | MSGFMT="$ac_cv_path_MSGFMT" | |
| 7859 | if test "$MSGFMT" != ":"; then | |
| 7860 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGFMT" >&5 | |
| 7861 | printf "%s\n" "$MSGFMT" >&6; } | |
| 7862 | else | |
| 7863 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 7864 | printf "%s\n" "no" >&6; } | |
| 7865 | fi | |
| 7866 | ||
| 7867 | # Extract the first word of "gmsgfmt", so it can be a program name with args. | |
| 7868 | set dummy gmsgfmt; ac_word=$2 | |
| 7869 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 7870 | printf %s "checking for $ac_word... " >&6; } | |
| 7871 | if test ${ac_cv_path_GMSGFMT+y} | |
| 7872 | then : | |
| 7873 | printf %s "(cached) " >&6 | |
| 7874 | else case e in #( | |
| 7875 | e) case $GMSGFMT in | |
| 7876 | [\\/]* | ?:[\\/]*) | |
| 7877 | ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path. | |
| 7878 | ;; | |
| 7879 | *) | |
| 7880 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 7881 | for as_dir in $PATH | |
| 7882 | do | |
| 7883 | IFS=$as_save_IFS | |
| 7884 | case $as_dir in #((( | |
| 7885 | '') as_dir=./ ;; | |
| 7886 | */) ;; | |
| 7887 | *) as_dir=$as_dir/ ;; | |
| 7888 | esac | |
| 7889 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 7890 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 7891 | ac_cv_path_GMSGFMT="$as_dir$ac_word$ac_exec_ext" | |
| 7892 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 7893 | break 2 | |
| 7894 | fi | |
| 7895 | done | |
| 7896 | done | |
| 7897 | IFS=$as_save_IFS | |
| 7898 | ||
| 7899 | test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT" | |
| 7900 | ;; | |
| 7901 | esac ;; | |
| 7902 | esac | |
| 7903 | fi | |
| 7904 | GMSGFMT=$ac_cv_path_GMSGFMT | |
| 7905 | if test -n "$GMSGFMT"; then | |
| 7906 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $GMSGFMT" >&5 | |
| 7907 | printf "%s\n" "$GMSGFMT" >&6; } | |
| 7908 | else | |
| 7909 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 7910 | printf "%s\n" "no" >&6; } | |
| 7911 | fi | |
| 7912 | ||
| 7913 | ||
| 7914 | ||
| 7915 | case `$GMSGFMT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in | |
| 7916 | '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) GMSGFMT_015=: ;; | |
| 7917 | *) GMSGFMT_015=$GMSGFMT ;; | |
| 7918 | esac | |
| 7919 | ||
| 7920 | ||
| 7921 | ||
| 7922 | # Prepare PATH_SEPARATOR. | |
| 7923 | # The user is always right. | |
| 7924 | if test "${PATH_SEPARATOR+set}" != set; then | |
| 7925 | # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which | |
| 7926 | # contains only /bin. Note that ksh looks also at the FPATH variable, | |
| 7927 | # so we have to set that as well for the test. | |
| 7928 | PATH_SEPARATOR=: | |
| 7929 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ | |
| 7930 | && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ | |
| 7931 | || PATH_SEPARATOR=';' | |
| 7932 | } | |
| 7933 | fi | |
| 7934 | ||
| 7935 | # Find out how to test for executable files. Don't use a zero-byte file, | |
| 7936 | # as systems may use methods other than mode bits to determine executability. | |
| 7937 | cat >conf$$.file <<_ASEOF | |
| 7938 | #! /bin/sh | |
| 7939 | exit 0 | |
| 7940 | _ASEOF | |
| 7941 | chmod +x conf$$.file | |
| 7942 | if test -x conf$$.file >/dev/null 2>&1; then | |
| 7943 | ac_executable_p="test -x" | |
| 7944 | else | |
| 7945 | ac_executable_p="test -f" | |
| 7946 | fi | |
| 7947 | rm -f conf$$.file | |
| 7948 | ||
| 7949 | # Extract the first word of "xgettext", so it can be a program name with args. | |
| 7950 | set dummy xgettext; ac_word=$2 | |
| 7951 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 7952 | printf %s "checking for $ac_word... " >&6; } | |
| 7953 | if test ${ac_cv_path_XGETTEXT+y} | |
| 7954 | then : | |
| 7955 | printf %s "(cached) " >&6 | |
| 7956 | else case e in #( | |
| 7957 | e) case "$XGETTEXT" in | |
| 7958 | [\\/]* | ?:[\\/]*) | |
| 7959 | ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path. | |
| 7960 | ;; | |
| 7961 | *) | |
| 7962 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR | |
| 7963 | for ac_dir in $PATH; do | |
| 7964 | IFS="$ac_save_IFS" | |
| 7965 | test -z "$ac_dir" && ac_dir=. | |
| 7966 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 7967 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
| 7968 | echo "$as_me: trying $ac_dir/$ac_word..." >&5 | |
| 7969 | if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >&5 2>&1 && | |
| 7970 | (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 | |
| 7971 | ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exec_ext" | |
| 7972 | break 2 | |
| 7973 | fi | |
| 7974 | fi | |
| 7975 | done | |
| 7976 | done | |
| 7977 | IFS="$ac_save_IFS" | |
| 7978 | test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":" | |
| 7979 | ;; | |
| 7980 | esac ;; | |
| 7981 | esac | |
| 7982 | fi | |
| 7983 | XGETTEXT="$ac_cv_path_XGETTEXT" | |
| 7984 | if test "$XGETTEXT" != ":"; then | |
| 7985 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $XGETTEXT" >&5 | |
| 7986 | printf "%s\n" "$XGETTEXT" >&6; } | |
| 7987 | else | |
| 7988 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 7989 | printf "%s\n" "no" >&6; } | |
| 7990 | fi | |
| 7991 | ||
| 7992 | rm -f messages.po | |
| 7993 | ||
| 7994 | case `$XGETTEXT --version | sed 1q | sed -e 's,^[^0-9]*,,'` in | |
| 7995 | '' | 0.[0-9] | 0.[0-9].* | 0.1[0-4] | 0.1[0-4].*) XGETTEXT_015=: ;; | |
| 7996 | *) XGETTEXT_015=$XGETTEXT ;; | |
| 7997 | esac | |
| 7998 | ||
| 7999 | ||
| 8000 | ||
| 8001 | # Prepare PATH_SEPARATOR. | |
| 8002 | # The user is always right. | |
| 8003 | if test "${PATH_SEPARATOR+set}" != set; then | |
| 8004 | # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which | |
| 8005 | # contains only /bin. Note that ksh looks also at the FPATH variable, | |
| 8006 | # so we have to set that as well for the test. | |
| 8007 | PATH_SEPARATOR=: | |
| 8008 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ | |
| 8009 | && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ | |
| 8010 | || PATH_SEPARATOR=';' | |
| 8011 | } | |
| 8012 | fi | |
| 8013 | ||
| 8014 | # Find out how to test for executable files. Don't use a zero-byte file, | |
| 8015 | # as systems may use methods other than mode bits to determine executability. | |
| 8016 | cat >conf$$.file <<_ASEOF | |
| 8017 | #! /bin/sh | |
| 8018 | exit 0 | |
| 8019 | _ASEOF | |
| 8020 | chmod +x conf$$.file | |
| 8021 | if test -x conf$$.file >/dev/null 2>&1; then | |
| 8022 | ac_executable_p="test -x" | |
| 8023 | else | |
| 8024 | ac_executable_p="test -f" | |
| 8025 | fi | |
| 8026 | rm -f conf$$.file | |
| 8027 | ||
| 8028 | # Extract the first word of "msgmerge", so it can be a program name with args. | |
| 8029 | set dummy msgmerge; ac_word=$2 | |
| 8030 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 8031 | printf %s "checking for $ac_word... " >&6; } | |
| 8032 | if test ${ac_cv_path_MSGMERGE+y} | |
| 8033 | then : | |
| 8034 | printf %s "(cached) " >&6 | |
| 8035 | else case e in #( | |
| 8036 | e) case "$MSGMERGE" in | |
| 8037 | [\\/]* | ?:[\\/]*) | |
| 8038 | ac_cv_path_MSGMERGE="$MSGMERGE" # Let the user override the test with a path. | |
| 8039 | ;; | |
| 8040 | *) | |
| 8041 | ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR | |
| 8042 | for ac_dir in $PATH; do | |
| 8043 | IFS="$ac_save_IFS" | |
| 8044 | test -z "$ac_dir" && ac_dir=. | |
| 8045 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 8046 | if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then | |
| 8047 | echo "$as_me: trying $ac_dir/$ac_word..." >&5 | |
| 8048 | if $ac_dir/$ac_word --update -q /dev/null /dev/null >&5 2>&1; then | |
| 8049 | ac_cv_path_MSGMERGE="$ac_dir/$ac_word$ac_exec_ext" | |
| 8050 | break 2 | |
| 8051 | fi | |
| 8052 | fi | |
| 8053 | done | |
| 8054 | done | |
| 8055 | IFS="$ac_save_IFS" | |
| 8056 | test -z "$ac_cv_path_MSGMERGE" && ac_cv_path_MSGMERGE=":" | |
| 8057 | ;; | |
| 8058 | esac ;; | |
| 8059 | esac | |
| 8060 | fi | |
| 8061 | MSGMERGE="$ac_cv_path_MSGMERGE" | |
| 8062 | if test "$MSGMERGE" != ":"; then | |
| 8063 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $MSGMERGE" >&5 | |
| 8064 | printf "%s\n" "$MSGMERGE" >&6; } | |
| 8065 | else | |
| 8066 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 8067 | printf "%s\n" "no" >&6; } | |
| 8068 | fi | |
| 8069 | ||
| 8070 | ||
| 8071 | if LC_ALL=C $MSGMERGE --help | grep ' --for-msgfmt ' >/dev/null; then | |
| 8072 | MSGMERGE_FOR_MSGFMT_OPTION='--for-msgfmt' | |
| 8073 | else | |
| 8074 | if LC_ALL=C $MSGMERGE --help | grep ' --no-fuzzy-matching ' >/dev/null; then | |
| 8075 | MSGMERGE_FOR_MSGFMT_OPTION='--no-fuzzy-matching --no-location --quiet' | |
| 8076 | else | |
| 8077 | MSGMERGE_FOR_MSGFMT_OPTION='--no-location --quiet' | |
| 8078 | fi | |
| 8079 | fi | |
| 8080 | ||
| 8081 | ||
| 8082 | test -n "${XGETTEXT_EXTRA_OPTIONS+set}" || XGETTEXT_EXTRA_OPTIONS= | |
| 8083 | ||
| 8084 | ||
| 8085 | ac_config_commands="$ac_config_commands po-directories" | |
| 8086 | ||
| 8087 | ||
| 8088 | ac_ext=c | |
| 8089 | ac_cpp='$CPP $CPPFLAGS' | |
| 8090 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
| 8091 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
| 8092 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
| 8093 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 | |
| 8094 | printf %s "checking how to run the C preprocessor... " >&6; } | |
| 8095 | # On Suns, sometimes $CPP names a directory. | |
| 8096 | if test -n "$CPP" && test -d "$CPP"; then | |
| 8097 | CPP= | |
| 8098 | fi | |
| 8099 | if test -z "$CPP"; then | |
| 8100 | if test ${ac_cv_prog_CPP+y} | |
| 8101 | then : | |
| 8102 | printf %s "(cached) " >&6 | |
| 8103 | else case e in #( | |
| 8104 | e) # Double quotes because $CC needs to be expanded | |
| 8105 | for CPP in "$CC -E" "$CC -E -traditional-cpp" cpp /lib/cpp | |
| 8106 | do | |
| 8107 | ac_preproc_ok=false | |
| 8108 | for ac_c_preproc_warn_flag in '' yes | |
| 8109 | do | |
| 8110 | # Use a header file that comes with gcc, so configuring glibc | |
| 8111 | # with a fresh cross-compiler works. | |
| 8112 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
| 8113 | # not just through cpp. "Syntax error" is here to catch this case. | |
| 8114 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 8115 | /* end confdefs.h. */ | |
| 8116 | #include <limits.h> | |
| 8117 | Syntax error | |
| 8118 | _ACEOF | |
| 8119 | if ac_fn_c_try_cpp "$LINENO" | |
| 8120 | then : | |
| 8121 | ||
| 8122 | else case e in #( | |
| 8123 | e) # Broken: fails on valid input. | |
| 8124 | continue ;; | |
| 8125 | esac | |
| 8126 | fi | |
| 8127 | rm -f conftest.err conftest.i conftest.$ac_ext | |
| 8128 | ||
| 8129 | # OK, works on sane cases. Now check whether nonexistent headers | |
| 8130 | # can be detected and how. | |
| 8131 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 8132 | /* end confdefs.h. */ | |
| 8133 | #include <ac_nonexistent.h> | |
| 8134 | _ACEOF | |
| 8135 | if ac_fn_c_try_cpp "$LINENO" | |
| 8136 | then : | |
| 8137 | # Broken: success on invalid input. | |
| 8138 | continue | |
| 8139 | else case e in #( | |
| 8140 | e) # Passes both tests. | |
| 8141 | ac_preproc_ok=: | |
| 8142 | break ;; | |
| 8143 | esac | |
| 8144 | fi | |
| 8145 | rm -f conftest.err conftest.i conftest.$ac_ext | |
| 8146 | ||
| 8147 | done | |
| 8148 | # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
| 8149 | rm -f conftest.i conftest.err conftest.$ac_ext | |
| 8150 | if $ac_preproc_ok | |
| 8151 | then : | |
| 8152 | break | |
| 8153 | fi | |
| 8154 | ||
| 8155 | done | |
| 8156 | ac_cv_prog_CPP=$CPP | |
| 8157 | ;; | |
| 8158 | esac | |
| 8159 | fi | |
| 8160 | CPP=$ac_cv_prog_CPP | |
| 8161 | else | |
| 8162 | ac_cv_prog_CPP=$CPP | |
| 8163 | fi | |
| 8164 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 | |
| 8165 | printf "%s\n" "$CPP" >&6; } | |
| 8166 | ac_preproc_ok=false | |
| 8167 | for ac_c_preproc_warn_flag in '' yes | |
| 8168 | do | |
| 8169 | # Use a header file that comes with gcc, so configuring glibc | |
| 8170 | # with a fresh cross-compiler works. | |
| 8171 | # On the NeXT, cc -E runs the code through the compiler's parser, | |
| 8172 | # not just through cpp. "Syntax error" is here to catch this case. | |
| 8173 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 8174 | /* end confdefs.h. */ | |
| 8175 | #include <limits.h> | |
| 8176 | Syntax error | |
| 8177 | _ACEOF | |
| 8178 | if ac_fn_c_try_cpp "$LINENO" | |
| 8179 | then : | |
| 8180 | ||
| 8181 | else case e in #( | |
| 8182 | e) # Broken: fails on valid input. | |
| 8183 | continue ;; | |
| 8184 | esac | |
| 8185 | fi | |
| 8186 | rm -f conftest.err conftest.i conftest.$ac_ext | |
| 8187 | ||
| 8188 | # OK, works on sane cases. Now check whether nonexistent headers | |
| 8189 | # can be detected and how. | |
| 8190 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 8191 | /* end confdefs.h. */ | |
| 8192 | #include <ac_nonexistent.h> | |
| 8193 | _ACEOF | |
| 8194 | if ac_fn_c_try_cpp "$LINENO" | |
| 8195 | then : | |
| 8196 | # Broken: success on invalid input. | |
| 8197 | continue | |
| 8198 | else case e in #( | |
| 8199 | e) # Passes both tests. | |
| 8200 | ac_preproc_ok=: | |
| 8201 | break ;; | |
| 8202 | esac | |
| 8203 | fi | |
| 8204 | rm -f conftest.err conftest.i conftest.$ac_ext | |
| 8205 | ||
| 8206 | done | |
| 8207 | # Because of 'break', _AC_PREPROC_IFELSE's cleaning code was skipped. | |
| 8208 | rm -f conftest.i conftest.err conftest.$ac_ext | |
| 8209 | if $ac_preproc_ok | |
| 8210 | then : | |
| 8211 | ||
| 8212 | else case e in #( | |
| 8213 | e) { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 8214 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 8215 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check | |
| 8216 | See 'config.log' for more details" "$LINENO" 5; } ;; | |
| 8217 | esac | |
| 8218 | fi | |
| 8219 | ||
| 8220 | ac_ext=c | |
| 8221 | ac_cpp='$CPP $CPPFLAGS' | |
| 8222 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' | |
| 8223 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' | |
| 8224 | ac_compiler_gnu=$ac_cv_c_compiler_gnu | |
| 8225 | ||
| 8226 | ||
| 8227 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for egrep -e" >&5 | |
| 8228 | printf %s "checking for egrep -e... " >&6; } | |
| 8229 | if test ${ac_cv_path_EGREP_TRADITIONAL+y} | |
| 8230 | then : | |
| 8231 | printf %s "(cached) " >&6 | |
| 8232 | else case e in #( | |
| 8233 | e) if test -z "$EGREP_TRADITIONAL"; then | |
| 8234 | ac_path_EGREP_TRADITIONAL_found=false | |
| 8235 | # Loop through the user's path and test for each of PROGNAME-LIST | |
| 8236 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 8237 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
| 8238 | do | |
| 8239 | IFS=$as_save_IFS | |
| 8240 | case $as_dir in #((( | |
| 8241 | '') as_dir=./ ;; | |
| 8242 | */) ;; | |
| 8243 | *) as_dir=$as_dir/ ;; | |
| 8244 | esac | |
| 8245 | for ac_prog in grep ggrep | |
| 8246 | do | |
| 8247 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 8248 | ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" | |
| 8249 | as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue | |
| 8250 | # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. | |
| 8251 | # Check for GNU $ac_path_EGREP_TRADITIONAL | |
| 8252 | case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( | |
| 8253 | *GNU*) | |
| 8254 | ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; | |
| 8255 | #( | |
| 8256 | *) | |
| 8257 | ac_count=0 | |
| 8258 | printf %s 0123456789 >"conftest.in" | |
| 8259 | while : | |
| 8260 | do | |
| 8261 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
| 8262 | mv "conftest.tmp" "conftest.in" | |
| 8263 | cp "conftest.in" "conftest.nl" | |
| 8264 | printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl" | |
| 8265 | "$ac_path_EGREP_TRADITIONAL" -E 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
| 8266 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
| 8267 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
| 8268 | if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then | |
| 8269 | # Best one so far, save it but keep looking for a better one | |
| 8270 | ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" | |
| 8271 | ac_path_EGREP_TRADITIONAL_max=$ac_count | |
| 8272 | fi | |
| 8273 | # 10*(2^10) chars as input seems more than enough | |
| 8274 | test $ac_count -gt 10 && break | |
| 8275 | done | |
| 8276 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
| 8277 | esac | |
| 8278 | ||
| 8279 | $ac_path_EGREP_TRADITIONAL_found && break 3 | |
| 8280 | done | |
| 8281 | done | |
| 8282 | done | |
| 8283 | IFS=$as_save_IFS | |
| 8284 | if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then | |
| 8285 | : | |
| 8286 | fi | |
| 8287 | else | |
| 8288 | ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL | |
| 8289 | fi | |
| 8290 | ||
| 8291 | if test "$ac_cv_path_EGREP_TRADITIONAL" | |
| 8292 | then : | |
| 8293 | ac_cv_path_EGREP_TRADITIONAL="$ac_cv_path_EGREP_TRADITIONAL -E" | |
| 8294 | else case e in #( | |
| 8295 | e) if test -z "$EGREP_TRADITIONAL"; then | |
| 8296 | ac_path_EGREP_TRADITIONAL_found=false | |
| 8297 | # Loop through the user's path and test for each of PROGNAME-LIST | |
| 8298 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 8299 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin | |
| 8300 | do | |
| 8301 | IFS=$as_save_IFS | |
| 8302 | case $as_dir in #((( | |
| 8303 | '') as_dir=./ ;; | |
| 8304 | */) ;; | |
| 8305 | *) as_dir=$as_dir/ ;; | |
| 8306 | esac | |
| 8307 | for ac_prog in egrep | |
| 8308 | do | |
| 8309 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 8310 | ac_path_EGREP_TRADITIONAL="$as_dir$ac_prog$ac_exec_ext" | |
| 8311 | as_fn_executable_p "$ac_path_EGREP_TRADITIONAL" || continue | |
| 8312 | # Check for GNU ac_path_EGREP_TRADITIONAL and select it if it is found. | |
| 8313 | # Check for GNU $ac_path_EGREP_TRADITIONAL | |
| 8314 | case `"$ac_path_EGREP_TRADITIONAL" --version 2>&1` in #( | |
| 8315 | *GNU*) | |
| 8316 | ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" ac_path_EGREP_TRADITIONAL_found=:;; | |
| 8317 | #( | |
| 8318 | *) | |
| 8319 | ac_count=0 | |
| 8320 | printf %s 0123456789 >"conftest.in" | |
| 8321 | while : | |
| 8322 | do | |
| 8323 | cat "conftest.in" "conftest.in" >"conftest.tmp" | |
| 8324 | mv "conftest.tmp" "conftest.in" | |
| 8325 | cp "conftest.in" "conftest.nl" | |
| 8326 | printf "%s\n" 'EGREP_TRADITIONAL' >> "conftest.nl" | |
| 8327 | "$ac_path_EGREP_TRADITIONAL" 'EGR(EP|AC)_TRADITIONAL$' < "conftest.nl" >"conftest.out" 2>/dev/null || break | |
| 8328 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break | |
| 8329 | as_fn_arith $ac_count + 1 && ac_count=$as_val | |
| 8330 | if test $ac_count -gt ${ac_path_EGREP_TRADITIONAL_max-0}; then | |
| 8331 | # Best one so far, save it but keep looking for a better one | |
| 8332 | ac_cv_path_EGREP_TRADITIONAL="$ac_path_EGREP_TRADITIONAL" | |
| 8333 | ac_path_EGREP_TRADITIONAL_max=$ac_count | |
| 8334 | fi | |
| 8335 | # 10*(2^10) chars as input seems more than enough | |
| 8336 | test $ac_count -gt 10 && break | |
| 8337 | done | |
| 8338 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; | |
| 8339 | esac | |
| 8340 | ||
| 8341 | $ac_path_EGREP_TRADITIONAL_found && break 3 | |
| 8342 | done | |
| 8343 | done | |
| 8344 | done | |
| 8345 | IFS=$as_save_IFS | |
| 8346 | if test -z "$ac_cv_path_EGREP_TRADITIONAL"; then | |
| 8347 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 | |
| 8348 | fi | |
| 8349 | else | |
| 8350 | ac_cv_path_EGREP_TRADITIONAL=$EGREP_TRADITIONAL | |
| 8351 | fi | |
| 8352 | ;; | |
| 8353 | esac | |
| 8354 | fi ;; | |
| 8355 | esac | |
| 8356 | fi | |
| 8357 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP_TRADITIONAL" >&5 | |
| 8358 | printf "%s\n" "$ac_cv_path_EGREP_TRADITIONAL" >&6; } | |
| 8359 | EGREP_TRADITIONAL=$ac_cv_path_EGREP_TRADITIONAL | |
| 8360 | ||
| 8361 | ||
| 8362 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C Library 2 or newer" >&5 | |
| 8363 | printf %s "checking whether we are using the GNU C Library 2 or newer... " >&6; } | |
| 8364 | if test ${ac_cv_gnu_library_2+y} | |
| 8365 | then : | |
| 8366 | printf %s "(cached) " >&6 | |
| 8367 | else case e in #( | |
| 8368 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 8369 | /* end confdefs.h. */ | |
| 8370 | ||
| 8371 | #include <features.h> | |
| 8372 | #ifdef __GNU_LIBRARY__ | |
| 8373 | #if (__GLIBC__ >= 2) && !defined __UCLIBC__ | |
| 8374 | Lucky GNU user | |
| 8375 | #endif | |
| 8376 | #endif | |
| 8377 | ||
| 8378 | _ACEOF | |
| 8379 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
| 8380 | $EGREP_TRADITIONAL "Lucky GNU user" >/dev/null 2>&1 | |
| 8381 | then : | |
| 8382 | ac_cv_gnu_library_2=yes | |
| 8383 | else case e in #( | |
| 8384 | e) ac_cv_gnu_library_2=no ;; | |
| 8385 | esac | |
| 8386 | fi | |
| 8387 | rm -rf conftest* | |
| 8388 | ||
| 8389 | ||
| 8390 | ;; | |
| 8391 | esac | |
| 8392 | fi | |
| 8393 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_library_2" >&5 | |
| 8394 | printf "%s\n" "$ac_cv_gnu_library_2" >&6; } | |
| 8395 | ||
| 8396 | GLIBC2="$ac_cv_gnu_library_2" | |
| 8397 | ||
| 8398 | ||
| 8399 | ||
| 8400 | ||
| 8401 | CFLAG_VISIBILITY= | |
| 8402 | HAVE_VISIBILITY=0 | |
| 8403 | if test -n "$GCC"; then | |
| 8404 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether the -Werror option is usable" >&5 | |
| 8405 | printf %s "checking whether the -Werror option is usable... " >&6; } | |
| 8406 | if test ${gl_cv_cc_vis_werror+y} | |
| 8407 | then : | |
| 8408 | printf %s "(cached) " >&6 | |
| 8409 | else case e in #( | |
| 8410 | e) gl_save_CFLAGS="$CFLAGS" | |
| 8411 | CFLAGS="$CFLAGS -Werror" | |
| 8412 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 8413 | /* end confdefs.h. */ | |
| 8414 | ||
| 8415 | int | |
| 8416 | main (void) | |
| 8417 | { | |
| 8418 | ||
| 8419 | ; | |
| 8420 | return 0; | |
| 8421 | } | |
| 8422 | _ACEOF | |
| 8423 | if ac_fn_c_try_compile "$LINENO" | |
| 8424 | then : | |
| 8425 | gl_cv_cc_vis_werror=yes | |
| 8426 | else case e in #( | |
| 8427 | e) gl_cv_cc_vis_werror=no ;; | |
| 8428 | esac | |
| 8429 | fi | |
| 8430 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 8431 | CFLAGS="$gl_save_CFLAGS" | |
| 8432 | ;; | |
| 8433 | esac | |
| 8434 | fi | |
| 8435 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_vis_werror" >&5 | |
| 8436 | printf "%s\n" "$gl_cv_cc_vis_werror" >&6; } | |
| 8437 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for simple visibility declarations" >&5 | |
| 8438 | printf %s "checking for simple visibility declarations... " >&6; } | |
| 8439 | if test ${gl_cv_cc_visibility+y} | |
| 8440 | then : | |
| 8441 | printf %s "(cached) " >&6 | |
| 8442 | else case e in #( | |
| 8443 | e) gl_save_CFLAGS="$CFLAGS" | |
| 8444 | CFLAGS="$CFLAGS -fvisibility=hidden" | |
| 8445 | if test $gl_cv_cc_vis_werror = yes; then | |
| 8446 | CFLAGS="$CFLAGS -Werror" | |
| 8447 | fi | |
| 8448 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 8449 | /* end confdefs.h. */ | |
| 8450 | extern __attribute__((__visibility__("hidden"))) int hiddenvar; | |
| 8451 | extern __attribute__((__visibility__("default"))) int exportedvar; | |
| 8452 | extern __attribute__((__visibility__("hidden"))) int hiddenfunc (void); | |
| 8453 | extern __attribute__((__visibility__("default"))) int exportedfunc (void); | |
| 8454 | void dummyfunc (void) {} | |
| 8455 | ||
| 8456 | int | |
| 8457 | main (void) | |
| 8458 | { | |
| 8459 | ||
| 8460 | ; | |
| 8461 | return 0; | |
| 8462 | } | |
| 8463 | _ACEOF | |
| 8464 | if ac_fn_c_try_compile "$LINENO" | |
| 8465 | then : | |
| 8466 | gl_cv_cc_visibility=yes | |
| 8467 | else case e in #( | |
| 8468 | e) gl_cv_cc_visibility=no ;; | |
| 8469 | esac | |
| 8470 | fi | |
| 8471 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 8472 | CFLAGS="$gl_save_CFLAGS" | |
| 8473 | ;; | |
| 8474 | esac | |
| 8475 | fi | |
| 8476 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_cc_visibility" >&5 | |
| 8477 | printf "%s\n" "$gl_cv_cc_visibility" >&6; } | |
| 8478 | if test $gl_cv_cc_visibility = yes; then | |
| 8479 | CFLAG_VISIBILITY="-fvisibility=hidden" | |
| 8480 | HAVE_VISIBILITY=1 | |
| 8481 | fi | |
| 8482 | fi | |
| 8483 | ||
| 8484 | ||
| 8485 | ||
| 8486 | printf "%s\n" "#define HAVE_VISIBILITY $HAVE_VISIBILITY" >>confdefs.h | |
| 8487 | ||
| 8488 | ||
| 8489 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" | |
| 8490 | if test "x$ac_cv_type_size_t" = xyes | |
| 8491 | then : | |
| 8492 | ||
| 8493 | else case e in #( | |
| 8494 | e) | |
| 8495 | printf "%s\n" "#define size_t unsigned int" >>confdefs.h | |
| 8496 | ;; | |
| 8497 | esac | |
| 8498 | fi | |
| 8499 | ||
| 8500 | ||
| 8501 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for stdint.h" >&5 | |
| 8502 | printf %s "checking for stdint.h... " >&6; } | |
| 8503 | if test ${gl_cv_header_stdint_h+y} | |
| 8504 | then : | |
| 8505 | printf %s "(cached) " >&6 | |
| 8506 | else case e in #( | |
| 8507 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 8508 | /* end confdefs.h. */ | |
| 8509 | #include <sys/types.h> | |
| 8510 | #include <stdint.h> | |
| 8511 | int | |
| 8512 | main (void) | |
| 8513 | { | |
| 8514 | uintmax_t i = (uintmax_t) -1; return !i; | |
| 8515 | ; | |
| 8516 | return 0; | |
| 8517 | } | |
| 8518 | _ACEOF | |
| 8519 | if ac_fn_c_try_compile "$LINENO" | |
| 8520 | then : | |
| 8521 | gl_cv_header_stdint_h=yes | |
| 8522 | else case e in #( | |
| 8523 | e) gl_cv_header_stdint_h=no ;; | |
| 8524 | esac | |
| 8525 | fi | |
| 8526 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 8527 | esac | |
| 8528 | fi | |
| 8529 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_stdint_h" >&5 | |
| 8530 | printf "%s\n" "$gl_cv_header_stdint_h" >&6; } | |
| 8531 | if test $gl_cv_header_stdint_h = yes; then | |
| 8532 | ||
| 8533 | printf "%s\n" "#define HAVE_STDINT_H_WITH_UINTMAX 1" >>confdefs.h | |
| 8534 | ||
| 8535 | fi | |
| 8536 | ||
| 8537 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
| 8538 | # for constant arguments. Useless! | |
| 8539 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
| 8540 | printf %s "checking for working alloca.h... " >&6; } | |
| 8541 | if test ${ac_cv_working_alloca_h+y} | |
| 8542 | then : | |
| 8543 | printf %s "(cached) " >&6 | |
| 8544 | else case e in #( | |
| 8545 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 8546 | /* end confdefs.h. */ | |
| 8547 | #include <alloca.h> | |
| 8548 | int | |
| 8549 | main (void) | |
| 8550 | { | |
| 8551 | char *p = (char *) alloca (2 * sizeof (int)); | |
| 8552 | if (p) return 0; | |
| 8553 | ; | |
| 8554 | return 0; | |
| 8555 | } | |
| 8556 | _ACEOF | |
| 8557 | if ac_fn_c_try_link "$LINENO" | |
| 8558 | then : | |
| 8559 | ac_cv_working_alloca_h=yes | |
| 8560 | else case e in #( | |
| 8561 | e) ac_cv_working_alloca_h=no ;; | |
| 8562 | esac | |
| 8563 | fi | |
| 8564 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 8565 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 8566 | esac | |
| 8567 | fi | |
| 8568 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
| 8569 | printf "%s\n" "$ac_cv_working_alloca_h" >&6; } | |
| 8570 | if test $ac_cv_working_alloca_h = yes; then | |
| 8571 | ||
| 8572 | printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
| 8573 | ||
| 8574 | fi | |
| 8575 | ||
| 8576 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
| 8577 | printf %s "checking for alloca... " >&6; } | |
| 8578 | if test ${ac_cv_func_alloca_works+y} | |
| 8579 | then : | |
| 8580 | printf %s "(cached) " >&6 | |
| 8581 | else case e in #( | |
| 8582 | e) ac_cv_func_alloca_works=$ac_cv_working_alloca_h | |
| 8583 | if test "$ac_cv_func_alloca_works" != yes | |
| 8584 | then : | |
| 8585 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 8586 | /* end confdefs.h. */ | |
| 8587 | #include <stdlib.h> | |
| 8588 | #include <stddef.h> | |
| 8589 | #ifndef alloca | |
| 8590 | # ifdef __GNUC__ | |
| 8591 | # define alloca __builtin_alloca | |
| 8592 | # elif defined _MSC_VER | |
| 8593 | # include <malloc.h> | |
| 8594 | # define alloca _alloca | |
| 8595 | # else | |
| 8596 | # ifdef __cplusplus | |
| 8597 | extern "C" | |
| 8598 | # endif | |
| 8599 | void *alloca (size_t); | |
| 8600 | # endif | |
| 8601 | #endif | |
| 8602 | ||
| 8603 | int | |
| 8604 | main (void) | |
| 8605 | { | |
| 8606 | char *p = (char *) alloca (1); | |
| 8607 | if (p) return 0; | |
| 8608 | ; | |
| 8609 | return 0; | |
| 8610 | } | |
| 8611 | _ACEOF | |
| 8612 | if ac_fn_c_try_link "$LINENO" | |
| 8613 | then : | |
| 8614 | ac_cv_func_alloca_works=yes | |
| 8615 | fi | |
| 8616 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 8617 | conftest$ac_exeext conftest.$ac_ext | |
| 8618 | fi ;; | |
| 8619 | esac | |
| 8620 | fi | |
| 8621 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
| 8622 | printf "%s\n" "$ac_cv_func_alloca_works" >&6; } | |
| 8623 | ||
| 8624 | if test $ac_cv_func_alloca_works = yes; then | |
| 8625 | ||
| 8626 | printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h | |
| 8627 | ||
| 8628 | else | |
| 8629 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
| 8630 | # that cause trouble. Some versions do not even contain alloca or | |
| 8631 | # contain a buggy version. If you still want to use their alloca, | |
| 8632 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
| 8633 | ||
| 8634 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
| 8635 | ||
| 8636 | printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h | |
| 8637 | ||
| 8638 | ||
| 8639 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
| 8640 | printf %s "checking stack direction for C alloca... " >&6; } | |
| 8641 | if test ${ac_cv_c_stack_direction+y} | |
| 8642 | then : | |
| 8643 | printf %s "(cached) " >&6 | |
| 8644 | else case e in #( | |
| 8645 | e) if test "$cross_compiling" = yes | |
| 8646 | then : | |
| 8647 | ac_cv_c_stack_direction=0 | |
| 8648 | else case e in #( | |
| 8649 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 8650 | /* end confdefs.h. */ | |
| 8651 | $ac_includes_default | |
| 8652 | int | |
| 8653 | find_stack_direction (int *addr, int depth) | |
| 8654 | { | |
| 8655 | int dir, dummy = 0; | |
| 8656 | if (! addr) | |
| 8657 | addr = &dummy; | |
| 8658 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
| 8659 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
| 8660 | return dir + dummy; | |
| 8661 | } | |
| 8662 | ||
| 8663 | int | |
| 8664 | main (int argc, char **argv) | |
| 8665 | { | |
| 8666 | return find_stack_direction (0, argc + !argv + 20) < 0; | |
| 8667 | } | |
| 8668 | _ACEOF | |
| 8669 | if ac_fn_c_try_run "$LINENO" | |
| 8670 | then : | |
| 8671 | ac_cv_c_stack_direction=1 | |
| 8672 | else case e in #( | |
| 8673 | e) ac_cv_c_stack_direction=-1 ;; | |
| 8674 | esac | |
| 8675 | fi | |
| 8676 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 8677 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 8678 | esac | |
| 8679 | fi | |
| 8680 | ;; | |
| 8681 | esac | |
| 8682 | fi | |
| 8683 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
| 8684 | printf "%s\n" "$ac_cv_c_stack_direction" >&6; } | |
| 8685 | printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h | |
| 8686 | ||
| 8687 | ||
| 8688 | fi | |
| 8689 | ||
| 8690 | ||
| 8691 | ac_func= | |
| 8692 | for ac_item in $ac_func_c_list | |
| 8693 | do | |
| 8694 | if test $ac_func; then | |
| 8695 | ac_fn_c_check_func "$LINENO" $ac_func ac_cv_func_$ac_func | |
| 8696 | if eval test \"x\$ac_cv_func_$ac_func\" = xyes; then | |
| 8697 | echo "#define $ac_item 1" >> confdefs.h | |
| 8698 | fi | |
| 8699 | ac_func= | |
| 8700 | else | |
| 8701 | ac_func=$ac_item | |
| 8702 | fi | |
| 8703 | done | |
| 8704 | ||
| 8705 | ||
| 8706 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 | |
| 8707 | printf %s "checking for working mmap... " >&6; } | |
| 8708 | if test ${ac_cv_func_mmap_fixed_mapped+y} | |
| 8709 | then : | |
| 8710 | printf %s "(cached) " >&6 | |
| 8711 | else case e in #( | |
| 8712 | e) if test "$cross_compiling" = yes | |
| 8713 | then : | |
| 8714 | case "$host_os" in # (( | |
| 8715 | # Guess yes on platforms where we know the result. | |
| 8716 | linux*) ac_cv_func_mmap_fixed_mapped=yes ;; | |
| 8717 | # If we don't know, assume the worst. | |
| 8718 | *) ac_cv_func_mmap_fixed_mapped=no ;; | |
| 8719 | esac | |
| 8720 | else case e in #( | |
| 8721 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 8722 | /* end confdefs.h. */ | |
| 8723 | $ac_includes_default | |
| 8724 | /* malloc might have been renamed as rpl_malloc. */ | |
| 8725 | #undef malloc | |
| 8726 | ||
| 8727 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
| 8728 | Here is a matrix of mmap possibilities: | |
| 8729 | mmap private not fixed | |
| 8730 | mmap private fixed at somewhere currently unmapped | |
| 8731 | mmap private fixed at somewhere already mapped | |
| 8732 | mmap shared not fixed | |
| 8733 | mmap shared fixed at somewhere currently unmapped | |
| 8734 | mmap shared fixed at somewhere already mapped | |
| 8735 | For private mappings, we should verify that changes cannot be read() | |
| 8736 | back from the file, nor mmap's back from the file at a different | |
| 8737 | address. (There have been systems where private was not correctly | |
| 8738 | implemented like the infamous i386 svr4.0, and systems where the | |
| 8739 | VM page cache was not coherent with the file system buffer cache | |
| 8740 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
| 8741 | For shared mappings, we should conversely verify that changes get | |
| 8742 | propagated back to all the places they're supposed to be. */ | |
| 8743 | ||
| 8744 | #include <fcntl.h> | |
| 8745 | #include <sys/mman.h> | |
| 8746 | ||
| 8747 | #ifndef getpagesize | |
| 8748 | /* Prefer sysconf to the legacy getpagesize function, as getpagesize has | |
| 8749 | been removed from POSIX and is limited to page sizes that fit in 'int'. */ | |
| 8750 | # ifdef _SC_PAGESIZE | |
| 8751 | # define getpagesize() sysconf (_SC_PAGESIZE) | |
| 8752 | # elif defined _SC_PAGE_SIZE | |
| 8753 | # define getpagesize() sysconf (_SC_PAGE_SIZE) | |
| 8754 | # elif HAVE_GETPAGESIZE | |
| 8755 | int getpagesize (); | |
| 8756 | # else | |
| 8757 | # ifdef HAVE_SYS_PARAM_H | |
| 8758 | # include <sys/param.h> | |
| 8759 | # ifdef EXEC_PAGESIZE | |
| 8760 | # define getpagesize() EXEC_PAGESIZE | |
| 8761 | # else /* no EXEC_PAGESIZE */ | |
| 8762 | # ifdef NBPG | |
| 8763 | # define getpagesize() NBPG * CLSIZE | |
| 8764 | # ifndef CLSIZE | |
| 8765 | # define CLSIZE 1 | |
| 8766 | # endif /* no CLSIZE */ | |
| 8767 | # else /* no NBPG */ | |
| 8768 | # ifdef NBPC | |
| 8769 | # define getpagesize() NBPC | |
| 8770 | # else /* no NBPC */ | |
| 8771 | # ifdef PAGESIZE | |
| 8772 | # define getpagesize() PAGESIZE | |
| 8773 | # endif /* PAGESIZE */ | |
| 8774 | # endif /* no NBPC */ | |
| 8775 | # endif /* no NBPG */ | |
| 8776 | # endif /* no EXEC_PAGESIZE */ | |
| 8777 | # else /* no HAVE_SYS_PARAM_H */ | |
| 8778 | # define getpagesize() 8192 /* punt totally */ | |
| 8779 | # endif /* no HAVE_SYS_PARAM_H */ | |
| 8780 | # endif | |
| 8781 | #endif | |
| 8782 | ||
| 8783 | int | |
| 8784 | main (void) | |
| 8785 | { | |
| 8786 | char *data, *data2, *data3; | |
| 8787 | const char *cdata2; | |
| 8788 | long i, pagesize; | |
| 8789 | int fd, fd2; | |
| 8790 | ||
| 8791 | pagesize = getpagesize (); | |
| 8792 | ||
| 8793 | /* First, make a file with some known garbage in it. */ | |
| 8794 | data = (char *) malloc (pagesize); | |
| 8795 | if (!data) | |
| 8796 | return 1; | |
| 8797 | for (i = 0; i < pagesize; ++i) | |
| 8798 | *(data + i) = rand (); | |
| 8799 | umask (0); | |
| 8800 | fd = creat ("conftest.mmap", 0600); | |
| 8801 | if (fd < 0) | |
| 8802 | return 2; | |
| 8803 | if (write (fd, data, pagesize) != pagesize) | |
| 8804 | return 3; | |
| 8805 | close (fd); | |
| 8806 | ||
| 8807 | /* Next, check that the tail of a page is zero-filled. File must have | |
| 8808 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
| 8809 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
| 8810 | if (fd2 < 0) | |
| 8811 | return 4; | |
| 8812 | cdata2 = ""; | |
| 8813 | if (write (fd2, cdata2, 1) != 1) | |
| 8814 | return 5; | |
| 8815 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
| 8816 | if (data2 == MAP_FAILED) | |
| 8817 | return 6; | |
| 8818 | for (i = 0; i < pagesize; ++i) | |
| 8819 | if (*(data2 + i)) | |
| 8820 | return 7; | |
| 8821 | close (fd2); | |
| 8822 | /* 'return 8;' not currently used. */ | |
| 8823 | ||
| 8824 | /* Next, try to mmap the file at a fixed address which already has | |
| 8825 | something else allocated at it. If we can, also make sure that | |
| 8826 | we see the same garbage. */ | |
| 8827 | fd = open ("conftest.mmap", O_RDWR); | |
| 8828 | if (fd < 0) | |
| 8829 | return 9; | |
| 8830 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, | |
| 8831 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
| 8832 | return 10; | |
| 8833 | for (i = 0; i < pagesize; ++i) | |
| 8834 | if (*(data + i) != *(data2 + i)) | |
| 8835 | return 11; | |
| 8836 | ||
| 8837 | /* Finally, make sure that changes to the mapped area do not | |
| 8838 | percolate back to the file as seen by read(). (This is a bug on | |
| 8839 | some variants of i386 svr4.0.) */ | |
| 8840 | for (i = 0; i < pagesize; ++i) | |
| 8841 | *(data2 + i) = *(data2 + i) + 1; | |
| 8842 | data3 = (char *) malloc (pagesize); | |
| 8843 | if (!data3) | |
| 8844 | return 12; | |
| 8845 | if (read (fd, data3, pagesize) != pagesize) | |
| 8846 | return 13; | |
| 8847 | for (i = 0; i < pagesize; ++i) | |
| 8848 | if (*(data + i) != *(data3 + i)) | |
| 8849 | return 14; | |
| 8850 | close (fd); | |
| 8851 | free (data); | |
| 8852 | free (data3); | |
| 8853 | return 0; | |
| 8854 | } | |
| 8855 | _ACEOF | |
| 8856 | if ac_fn_c_try_run "$LINENO" | |
| 8857 | then : | |
| 8858 | ac_cv_func_mmap_fixed_mapped=yes | |
| 8859 | else case e in #( | |
| 8860 | e) ac_cv_func_mmap_fixed_mapped=no ;; | |
| 8861 | esac | |
| 8862 | fi | |
| 8863 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 8864 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 8865 | esac | |
| 8866 | fi | |
| 8867 | ;; | |
| 8868 | esac | |
| 8869 | fi | |
| 8870 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 | |
| 8871 | printf "%s\n" "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
| 8872 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
| 8873 | ||
| 8874 | printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h | |
| 8875 | ||
| 8876 | fi | |
| 8877 | rm -f conftest.mmap conftest.txt | |
| 8878 | ||
| 8879 | ||
| 8880 | ||
| 8881 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether integer division by zero raises SIGFPE" >&5 | |
| 8882 | printf %s "checking whether integer division by zero raises SIGFPE... " >&6; } | |
| 8883 | if test ${gt_cv_int_divbyzero_sigfpe+y} | |
| 8884 | then : | |
| 8885 | printf %s "(cached) " >&6 | |
| 8886 | else case e in #( | |
| 8887 | e) | |
| 8888 | gt_cv_int_divbyzero_sigfpe= | |
| 8889 | case "$host_os" in | |
| 8890 | macos* | darwin[6-9]* | darwin[1-9][0-9]*) | |
| 8891 | # On Mac OS X 10.2 or newer, just assume the same as when cross- | |
| 8892 | # compiling. If we were to perform the real test, 1 Crash Report | |
| 8893 | # dialog window would pop up. | |
| 8894 | case "$host_cpu" in | |
| 8895 | i[34567]86 | x86_64) | |
| 8896 | gt_cv_int_divbyzero_sigfpe="guessing yes" ;; | |
| 8897 | esac | |
| 8898 | ;; | |
| 8899 | esac | |
| 8900 | if test -z "$gt_cv_int_divbyzero_sigfpe"; then | |
| 8901 | if test "$cross_compiling" = yes | |
| 8902 | then : | |
| 8903 | ||
| 8904 | # Guess based on the CPU. | |
| 8905 | case "$host_cpu" in | |
| 8906 | alpha* | i[34567]86 | x86_64 | m68k | s390*) | |
| 8907 | gt_cv_int_divbyzero_sigfpe="guessing yes";; | |
| 8908 | *) | |
| 8909 | gt_cv_int_divbyzero_sigfpe="guessing no";; | |
| 8910 | esac | |
| 8911 | ||
| 8912 | else case e in #( | |
| 8913 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 8914 | /* end confdefs.h. */ | |
| 8915 | ||
| 8916 | #include <stdlib.h> /* for exit() */ | |
| 8917 | #include <signal.h> | |
| 8918 | #if !(defined _WIN32 && !defined __CYGWIN__) | |
| 8919 | #include <unistd.h> /* for _exit() */ | |
| 8920 | #endif | |
| 8921 | ||
| 8922 | static void | |
| 8923 | sigfpe_handler (int sig) | |
| 8924 | { | |
| 8925 | /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */ | |
| 8926 | _exit (sig != SIGFPE); | |
| 8927 | } | |
| 8928 | ||
| 8929 | int x = 1; | |
| 8930 | int y = 0; | |
| 8931 | int z; | |
| 8932 | int inan; | |
| 8933 | ||
| 8934 | int main () | |
| 8935 | { | |
| 8936 | signal (SIGFPE, sigfpe_handler); | |
| 8937 | /* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */ | |
| 8938 | #if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP) | |
| 8939 | signal (SIGTRAP, sigfpe_handler); | |
| 8940 | #endif | |
| 8941 | /* Linux/SPARC yields signal SIGILL. */ | |
| 8942 | #if defined (__sparc__) && defined (__linux__) | |
| 8943 | signal (SIGILL, sigfpe_handler); | |
| 8944 | #endif | |
| 8945 | ||
| 8946 | z = x / y; | |
| 8947 | inan = y / y; | |
| 8948 | exit (2); | |
| 8949 | } | |
| 8950 | ||
| 8951 | _ACEOF | |
| 8952 | if ac_fn_c_try_run "$LINENO" | |
| 8953 | then : | |
| 8954 | gt_cv_int_divbyzero_sigfpe=yes | |
| 8955 | else case e in #( | |
| 8956 | e) gt_cv_int_divbyzero_sigfpe=no ;; | |
| 8957 | esac | |
| 8958 | fi | |
| 8959 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 8960 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 8961 | esac | |
| 8962 | fi | |
| 8963 | ||
| 8964 | fi | |
| 8965 | ;; | |
| 8966 | esac | |
| 8967 | fi | |
| 8968 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_int_divbyzero_sigfpe" >&5 | |
| 8969 | printf "%s\n" "$gt_cv_int_divbyzero_sigfpe" >&6; } | |
| 8970 | case "$gt_cv_int_divbyzero_sigfpe" in | |
| 8971 | *yes) value=1 ;; | |
| 8972 | *) value=0 ;; | |
| 8973 | esac | |
| 8974 | ||
| 8975 | printf "%s\n" "#define INTDIV0_RAISES_SIGFPE $value" >>confdefs.h | |
| 8976 | ||
| 8977 | ||
| 8978 | ||
| 8979 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inttypes.h" >&5 | |
| 8980 | printf %s "checking for inttypes.h... " >&6; } | |
| 8981 | if test ${gl_cv_header_inttypes_h+y} | |
| 8982 | then : | |
| 8983 | printf %s "(cached) " >&6 | |
| 8984 | else case e in #( | |
| 8985 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 8986 | /* end confdefs.h. */ | |
| 8987 | ||
| 8988 | #include <sys/types.h> | |
| 8989 | #include <inttypes.h> | |
| 8990 | ||
| 8991 | int | |
| 8992 | main (void) | |
| 8993 | { | |
| 8994 | uintmax_t i = (uintmax_t) -1; return !i; | |
| 8995 | ; | |
| 8996 | return 0; | |
| 8997 | } | |
| 8998 | _ACEOF | |
| 8999 | if ac_fn_c_try_compile "$LINENO" | |
| 9000 | then : | |
| 9001 | gl_cv_header_inttypes_h=yes | |
| 9002 | else case e in #( | |
| 9003 | e) gl_cv_header_inttypes_h=no ;; | |
| 9004 | esac | |
| 9005 | fi | |
| 9006 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 9007 | esac | |
| 9008 | fi | |
| 9009 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_inttypes_h" >&5 | |
| 9010 | printf "%s\n" "$gl_cv_header_inttypes_h" >&6; } | |
| 9011 | if test $gl_cv_header_inttypes_h = yes; then | |
| 9012 | ||
| 9013 | printf "%s\n" "#define HAVE_INTTYPES_H_WITH_UINTMAX 1" >>confdefs.h | |
| 9014 | ||
| 9015 | fi | |
| 9016 | ||
| 9017 | ||
| 9018 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 | |
| 9019 | printf %s "checking for unsigned long long int... " >&6; } | |
| 9020 | if test ${ac_cv_type_unsigned_long_long_int+y} | |
| 9021 | then : | |
| 9022 | printf %s "(cached) " >&6 | |
| 9023 | else case e in #( | |
| 9024 | e) ac_cv_type_unsigned_long_long_int=yes | |
| 9025 | case $ac_prog_cc_stdc in | |
| 9026 | no | c89) ;; | |
| 9027 | *) | |
| 9028 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 9029 | /* end confdefs.h. */ | |
| 9030 | ||
| 9031 | /* For now, do not test the preprocessor; as of 2007 there are too many | |
| 9032 | implementations with broken preprocessors. Perhaps this can | |
| 9033 | be revisited in 2012. In the meantime, code should not expect | |
| 9034 | #if to work with literals wider than 32 bits. */ | |
| 9035 | /* Test literals. */ | |
| 9036 | long long int ll = 9223372036854775807ll; | |
| 9037 | long long int nll = -9223372036854775807LL; | |
| 9038 | unsigned long long int ull = 18446744073709551615ULL; | |
| 9039 | /* Test constant expressions. */ | |
| 9040 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
| 9041 | ? 1 : -1)]; | |
| 9042 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | |
| 9043 | ? 1 : -1)]; | |
| 9044 | int i = 63; | |
| 9045 | int | |
| 9046 | main (void) | |
| 9047 | { | |
| 9048 | /* Test availability of runtime routines for shift and division. */ | |
| 9049 | long long int llmax = 9223372036854775807ll; | |
| 9050 | unsigned long long int ullmax = 18446744073709551615ull; | |
| 9051 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
| 9052 | | (llmax / ll) | (llmax % ll) | |
| 9053 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
| 9054 | | (ullmax / ull) | (ullmax % ull)); | |
| 9055 | ; | |
| 9056 | return 0; | |
| 9057 | } | |
| 9058 | ||
| 9059 | _ACEOF | |
| 9060 | if ac_fn_c_try_link "$LINENO" | |
| 9061 | then : | |
| 9062 | ||
| 9063 | else case e in #( | |
| 9064 | e) ac_cv_type_unsigned_long_long_int=no ;; | |
| 9065 | esac | |
| 9066 | fi | |
| 9067 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 9068 | conftest$ac_exeext conftest.$ac_ext;; | |
| 9069 | esac ;; | |
| 9070 | esac | |
| 9071 | fi | |
| 9072 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 | |
| 9073 | printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; } | |
| 9074 | if test $ac_cv_type_unsigned_long_long_int = yes; then | |
| 9075 | ||
| 9076 | printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h | |
| 9077 | ||
| 9078 | fi | |
| 9079 | ||
| 9080 | ||
| 9081 | ||
| 9082 | ||
| 9083 | if test $gl_cv_header_inttypes_h = no && test $gl_cv_header_stdint_h = no; then | |
| 9084 | ||
| 9085 | test $ac_cv_type_unsigned_long_long_int = yes \ | |
| 9086 | && ac_type='unsigned long long' \ | |
| 9087 | || ac_type='unsigned long' | |
| 9088 | ||
| 9089 | printf "%s\n" "#define uintmax_t $ac_type" >>confdefs.h | |
| 9090 | ||
| 9091 | else | |
| 9092 | ||
| 9093 | printf "%s\n" "#define HAVE_UINTMAX_T 1" >>confdefs.h | |
| 9094 | ||
| 9095 | fi | |
| 9096 | ||
| 9097 | ||
| 9098 | ||
| 9099 | ||
| 9100 | ||
| 9101 | ||
| 9102 | ||
| 9103 | # Check whether --enable-threads was given. | |
| 9104 | if test ${enable_threads+y} | |
| 9105 | then : | |
| 9106 | enableval=$enable_threads; gl_use_threads=$enableval | |
| 9107 | else case e in #( | |
| 9108 | e) if test -n "$gl_use_threads_default"; then | |
| 9109 | gl_use_threads="$gl_use_threads_default" | |
| 9110 | else | |
| 9111 | case "$host_os" in | |
| 9112 | osf*) gl_use_threads=no ;; | |
| 9113 | cygwin*) | |
| 9114 | case `uname -r` in | |
| 9115 | 1.[0-5].*) gl_use_threads=no ;; | |
| 9116 | *) gl_use_threads=yes ;; | |
| 9117 | esac | |
| 9118 | ;; | |
| 9119 | mingw*) | |
| 9120 | case "$gl_use_winpthreads_default" in | |
| 9121 | yes) gl_use_threads=posix ;; | |
| 9122 | no) gl_use_threads=windows ;; | |
| 9123 | *) gl_use_threads=yes ;; | |
| 9124 | esac | |
| 9125 | ;; | |
| 9126 | *) gl_use_threads=yes ;; | |
| 9127 | esac | |
| 9128 | fi | |
| 9129 | ;; | |
| 9130 | esac | |
| 9131 | fi | |
| 9132 | ||
| 9133 | if test "$gl_use_threads" = yes \ | |
| 9134 | || test "$gl_use_threads" = isoc \ | |
| 9135 | || test "$gl_use_threads" = posix \ | |
| 9136 | || test "$gl_use_threads" = isoc+posix; then | |
| 9137 | # For using <threads.h> or <pthread.h>: | |
| 9138 | ||
| 9139 | ||
| 9140 | if test -z "$gl_anythreadlib_early_done"; then | |
| 9141 | case "$host_os" in | |
| 9142 | osf*) | |
| 9143 | # On OSF/1, the compiler needs the flag -D_REENTRANT so that it | |
| 9144 | # groks <pthread.h>. cc also understands the flag -pthread, but | |
| 9145 | # we don't use it because 1. gcc-2.95 doesn't understand -pthread, | |
| 9146 | # 2. putting a flag into CPPFLAGS that has an effect on the linker | |
| 9147 | # causes the AC_LINK_IFELSE test below to succeed unexpectedly, | |
| 9148 | # leading to wrong values of LIBTHREAD and LTLIBTHREAD. | |
| 9149 | CPPFLAGS="$CPPFLAGS -D_REENTRANT" | |
| 9150 | ;; | |
| 9151 | esac | |
| 9152 | # Some systems optimize for single-threaded programs by default, and | |
| 9153 | # need special flags to disable these optimizations. For example, the | |
| 9154 | # definition of 'errno' in <errno.h>. | |
| 9155 | case "$host_os" in | |
| 9156 | aix* | freebsd*) CPPFLAGS="$CPPFLAGS -D_THREAD_SAFE" ;; | |
| 9157 | solaris*) CPPFLAGS="$CPPFLAGS -D_REENTRANT" ;; | |
| 9158 | esac | |
| 9159 | gl_anythreadlib_early_done=done | |
| 9160 | fi | |
| 9161 | ||
| 9162 | fi | |
| 9163 | ||
| 9164 | ||
| 9165 | ||
| 9166 | ||
| 9167 | ||
| 9168 | ||
| 9169 | ||
| 9170 | gl_threads_api=none | |
| 9171 | LIBTHREAD= | |
| 9172 | LTLIBTHREAD= | |
| 9173 | LIBMULTITHREAD= | |
| 9174 | LTLIBMULTITHREAD= | |
| 9175 | if test "$gl_use_threads" != no; then | |
| 9176 | ||
| 9177 | ||
| 9178 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether imported symbols can be declared weak" >&5 | |
| 9179 | printf %s "checking whether imported symbols can be declared weak... " >&6; } | |
| 9180 | if test ${gl_cv_have_weak+y} | |
| 9181 | then : | |
| 9182 | printf %s "(cached) " >&6 | |
| 9183 | else case e in #( | |
| 9184 | e) case "$host_os" in | |
| 9185 | cygwin*) | |
| 9186 | gl_cv_have_weak="guessing no" | |
| 9187 | ;; | |
| 9188 | *) | |
| 9189 | gl_cv_have_weak=no | |
| 9190 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 9191 | /* end confdefs.h. */ | |
| 9192 | extern void xyzzy (); | |
| 9193 | #pragma weak xyzzy | |
| 9194 | int | |
| 9195 | main (void) | |
| 9196 | { | |
| 9197 | xyzzy(); | |
| 9198 | ; | |
| 9199 | return 0; | |
| 9200 | } | |
| 9201 | _ACEOF | |
| 9202 | if ac_fn_c_try_link "$LINENO" | |
| 9203 | then : | |
| 9204 | gl_cv_have_weak=maybe | |
| 9205 | fi | |
| 9206 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 9207 | conftest$ac_exeext conftest.$ac_ext | |
| 9208 | if test $gl_cv_have_weak = maybe; then | |
| 9209 | if test "$cross_compiling" = yes | |
| 9210 | then : | |
| 9211 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 9212 | /* end confdefs.h. */ | |
| 9213 | #ifdef __ELF__ | |
| 9214 | Extensible Linking Format | |
| 9215 | #endif | |
| 9216 | ||
| 9217 | _ACEOF | |
| 9218 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
| 9219 | $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1 | |
| 9220 | then : | |
| 9221 | gl_cv_have_weak="guessing yes" | |
| 9222 | else case e in #( | |
| 9223 | e) gl_cv_have_weak="guessing no" ;; | |
| 9224 | esac | |
| 9225 | fi | |
| 9226 | rm -rf conftest* | |
| 9227 | ||
| 9228 | ||
| 9229 | else case e in #( | |
| 9230 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 9231 | /* end confdefs.h. */ | |
| 9232 | ||
| 9233 | #include <stdio.h> | |
| 9234 | #pragma weak fputs | |
| 9235 | int main () | |
| 9236 | { | |
| 9237 | return (fputs == NULL); | |
| 9238 | } | |
| 9239 | _ACEOF | |
| 9240 | if ac_fn_c_try_run "$LINENO" | |
| 9241 | then : | |
| 9242 | gl_cv_have_weak=yes | |
| 9243 | else case e in #( | |
| 9244 | e) gl_cv_have_weak=no ;; | |
| 9245 | esac | |
| 9246 | fi | |
| 9247 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 9248 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 9249 | esac | |
| 9250 | fi | |
| 9251 | ||
| 9252 | fi | |
| 9253 | ;; | |
| 9254 | esac | |
| 9255 | case " $LDFLAGS " in | |
| 9256 | *" -static "*) gl_cv_have_weak=no ;; | |
| 9257 | esac | |
| 9258 | case "$gl_cv_have_weak" in | |
| 9259 | *yes) | |
| 9260 | case "$host_os" in | |
| 9261 | freebsd* | dragonfly* | midnightbsd*) | |
| 9262 | : > conftest1.c | |
| 9263 | $CC $CPPFLAGS $CFLAGS $LDFLAGS -fPIC -shared -o libempty.so conftest1.c -lpthread >&5 2>&1 | |
| 9264 | cat <<EOF > conftest2.c | |
| 9265 | #include <pthread.h> | |
| 9266 | #pragma weak pthread_mutexattr_gettype | |
| 9267 | int main () | |
| 9268 | { | |
| 9269 | return (pthread_mutexattr_gettype != NULL); | |
| 9270 | } | |
| 9271 | EOF | |
| 9272 | $CC $CPPFLAGS $CFLAGS $LDFLAGS -o conftest conftest2.c libempty.so >&5 2>&1 \ | |
| 9273 | || gl_cv_have_weak=no | |
| 9274 | rm -f conftest1.c libempty.so conftest2.c conftest | |
| 9275 | ;; | |
| 9276 | esac | |
| 9277 | ;; | |
| 9278 | esac | |
| 9279 | ;; | |
| 9280 | esac | |
| 9281 | fi | |
| 9282 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_have_weak" >&5 | |
| 9283 | printf "%s\n" "$gl_cv_have_weak" >&6; } | |
| 9284 | case "$gl_cv_have_weak" in | |
| 9285 | *yes) | |
| 9286 | ||
| 9287 | printf "%s\n" "#define HAVE_WEAK_SYMBOLS 1" >>confdefs.h | |
| 9288 | ||
| 9289 | ;; | |
| 9290 | esac | |
| 9291 | ||
| 9292 | if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then | |
| 9293 | ||
| 9294 | : | |
| 9295 | fi | |
| 9296 | if test "$gl_use_threads" = isoc || test "$gl_use_threads" = isoc+posix; then | |
| 9297 | ||
| 9298 | gl_have_isoc_threads="$ac_cv_header_threads_h" | |
| 9299 | fi | |
| 9300 | if test "$gl_use_threads" = yes \ | |
| 9301 | || test "$gl_use_threads" = posix \ | |
| 9302 | || test "$gl_use_threads" = isoc+posix; then | |
| 9303 | ||
| 9304 | ||
| 9305 | if test -z "$gl_pthreadlib_body_done"; then | |
| 9306 | gl_pthread_api=no | |
| 9307 | LIBPTHREAD= | |
| 9308 | LIBPMULTITHREAD= | |
| 9309 | # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that | |
| 9310 | # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY. | |
| 9311 | ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" | |
| 9312 | if test "x$ac_cv_header_pthread_h" = xyes | |
| 9313 | then : | |
| 9314 | gl_have_pthread_h=yes | |
| 9315 | else case e in #( | |
| 9316 | e) gl_have_pthread_h=no ;; | |
| 9317 | esac | |
| 9318 | fi | |
| 9319 | ||
| 9320 | if test "$gl_have_pthread_h" = yes; then | |
| 9321 | # Other possible tests: | |
| 9322 | # -lpthreads (FSU threads, PCthreads) | |
| 9323 | # -lgthreads | |
| 9324 | # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist | |
| 9325 | # in libc. IRIX 6.5 has the first one in both libc and libpthread, but | |
| 9326 | # the second one only in libpthread, and lock.c needs it. | |
| 9327 | # | |
| 9328 | # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 | |
| 9329 | # needs -pthread for some reason. See: | |
| 9330 | # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html | |
| 9331 | save_LIBS=$LIBS | |
| 9332 | for gl_pthread in '' '-pthread'; do | |
| 9333 | LIBS="$LIBS $gl_pthread" | |
| 9334 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 9335 | /* end confdefs.h. */ | |
| 9336 | #include <pthread.h> | |
| 9337 | pthread_mutex_t m; | |
| 9338 | pthread_mutexattr_t ma; | |
| 9339 | ||
| 9340 | int | |
| 9341 | main (void) | |
| 9342 | { | |
| 9343 | pthread_mutex_lock (&m); | |
| 9344 | pthread_mutexattr_init (&ma); | |
| 9345 | ; | |
| 9346 | return 0; | |
| 9347 | } | |
| 9348 | _ACEOF | |
| 9349 | if ac_fn_c_try_link "$LINENO" | |
| 9350 | then : | |
| 9351 | gl_pthread_api=yes | |
| 9352 | LIBPTHREAD=$gl_pthread | |
| 9353 | LIBPMULTITHREAD=$gl_pthread | |
| 9354 | fi | |
| 9355 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 9356 | conftest$ac_exeext conftest.$ac_ext | |
| 9357 | LIBS=$save_LIBS | |
| 9358 | test $gl_pthread_api = yes && break | |
| 9359 | done | |
| 9360 | echo "$as_me:9360: gl_pthread_api=$gl_pthread_api" >&5 | |
| 9361 | echo "$as_me:9361: LIBPTHREAD=$LIBPTHREAD" >&5 | |
| 9362 | ||
| 9363 | gl_pthread_in_glibc=no | |
| 9364 | # On Linux with glibc >= 2.34, libc contains the fully functional | |
| 9365 | # pthread functions. | |
| 9366 | case "$host_os" in | |
| 9367 | linux*) | |
| 9368 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 9369 | /* end confdefs.h. */ | |
| 9370 | #include <features.h> | |
| 9371 | #ifdef __GNU_LIBRARY__ | |
| 9372 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2) | |
| 9373 | Lucky user | |
| 9374 | #endif | |
| 9375 | #endif | |
| 9376 | ||
| 9377 | _ACEOF | |
| 9378 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
| 9379 | $EGREP_TRADITIONAL "Lucky user" >/dev/null 2>&1 | |
| 9380 | then : | |
| 9381 | gl_pthread_in_glibc=yes | |
| 9382 | fi | |
| 9383 | rm -rf conftest* | |
| 9384 | ||
| 9385 | ;; | |
| 9386 | esac | |
| 9387 | echo "$as_me:9387: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5 | |
| 9388 | ||
| 9389 | # Test for libpthread by looking for pthread_kill. (Not pthread_self, | |
| 9390 | # since it is defined as a macro on OSF/1.) | |
| 9391 | if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then | |
| 9392 | # The program links fine without libpthread. But it may actually | |
| 9393 | # need to link with libpthread in order to create multiple threads. | |
| 9394 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 | |
| 9395 | printf %s "checking for pthread_kill in -lpthread... " >&6; } | |
| 9396 | if test ${ac_cv_lib_pthread_pthread_kill+y} | |
| 9397 | then : | |
| 9398 | printf %s "(cached) " >&6 | |
| 9399 | else case e in #( | |
| 9400 | e) ac_check_lib_save_LIBS=$LIBS | |
| 9401 | LIBS="-lpthread $LIBS" | |
| 9402 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 9403 | /* end confdefs.h. */ | |
| 9404 | ||
| 9405 | /* Override any GCC internal prototype to avoid an error. | |
| 9406 | Use char because int might match the return type of a GCC | |
| 9407 | builtin and then its argument prototype would still apply. | |
| 9408 | The 'extern "C"' is for builds by C++ compilers; | |
| 9409 | although this is not generally supported in C code supporting it here | |
| 9410 | has little cost and some practical benefit (sr 110532). */ | |
| 9411 | #ifdef __cplusplus | |
| 9412 | extern "C" | |
| 9413 | #endif | |
| 9414 | char pthread_kill (void); | |
| 9415 | int | |
| 9416 | main (void) | |
| 9417 | { | |
| 9418 | return pthread_kill (); | |
| 9419 | ; | |
| 9420 | return 0; | |
| 9421 | } | |
| 9422 | _ACEOF | |
| 9423 | if ac_fn_c_try_link "$LINENO" | |
| 9424 | then : | |
| 9425 | ac_cv_lib_pthread_pthread_kill=yes | |
| 9426 | else case e in #( | |
| 9427 | e) ac_cv_lib_pthread_pthread_kill=no ;; | |
| 9428 | esac | |
| 9429 | fi | |
| 9430 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 9431 | conftest$ac_exeext conftest.$ac_ext | |
| 9432 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 9433 | esac | |
| 9434 | fi | |
| 9435 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 | |
| 9436 | printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; } | |
| 9437 | if test "x$ac_cv_lib_pthread_pthread_kill" = xyes | |
| 9438 | then : | |
| 9439 | if test $gl_pthread_in_glibc = yes; then | |
| 9440 | LIBPMULTITHREAD= | |
| 9441 | else | |
| 9442 | LIBPMULTITHREAD=-lpthread | |
| 9443 | # On Solaris and HP-UX, most pthread functions exist also in libc. | |
| 9444 | # Therefore pthread_in_use() needs to actually try to create a | |
| 9445 | # thread: pthread_create from libc will fail, whereas | |
| 9446 | # pthread_create will actually create a thread. | |
| 9447 | # On Solaris 10 or newer, this test is no longer needed, because | |
| 9448 | # libc contains the fully functional pthread functions. | |
| 9449 | case "$host_os" in | |
| 9450 | solaris | solaris2.1-9 | solaris2.1-9.* | hpux*) | |
| 9451 | ||
| 9452 | printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h | |
| 9453 | ||
| 9454 | esac | |
| 9455 | fi | |
| 9456 | ||
| 9457 | fi | |
| 9458 | ||
| 9459 | elif test $gl_pthread_api != yes; then | |
| 9460 | # Some library is needed. Try libpthread and libc_r. | |
| 9461 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 | |
| 9462 | printf %s "checking for pthread_kill in -lpthread... " >&6; } | |
| 9463 | if test ${ac_cv_lib_pthread_pthread_kill+y} | |
| 9464 | then : | |
| 9465 | printf %s "(cached) " >&6 | |
| 9466 | else case e in #( | |
| 9467 | e) ac_check_lib_save_LIBS=$LIBS | |
| 9468 | LIBS="-lpthread $LIBS" | |
| 9469 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 9470 | /* end confdefs.h. */ | |
| 9471 | ||
| 9472 | /* Override any GCC internal prototype to avoid an error. | |
| 9473 | Use char because int might match the return type of a GCC | |
| 9474 | builtin and then its argument prototype would still apply. | |
| 9475 | The 'extern "C"' is for builds by C++ compilers; | |
| 9476 | although this is not generally supported in C code supporting it here | |
| 9477 | has little cost and some practical benefit (sr 110532). */ | |
| 9478 | #ifdef __cplusplus | |
| 9479 | extern "C" | |
| 9480 | #endif | |
| 9481 | char pthread_kill (void); | |
| 9482 | int | |
| 9483 | main (void) | |
| 9484 | { | |
| 9485 | return pthread_kill (); | |
| 9486 | ; | |
| 9487 | return 0; | |
| 9488 | } | |
| 9489 | _ACEOF | |
| 9490 | if ac_fn_c_try_link "$LINENO" | |
| 9491 | then : | |
| 9492 | ac_cv_lib_pthread_pthread_kill=yes | |
| 9493 | else case e in #( | |
| 9494 | e) ac_cv_lib_pthread_pthread_kill=no ;; | |
| 9495 | esac | |
| 9496 | fi | |
| 9497 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 9498 | conftest$ac_exeext conftest.$ac_ext | |
| 9499 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 9500 | esac | |
| 9501 | fi | |
| 9502 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 | |
| 9503 | printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; } | |
| 9504 | if test "x$ac_cv_lib_pthread_pthread_kill" = xyes | |
| 9505 | then : | |
| 9506 | gl_pthread_api=yes | |
| 9507 | LIBPTHREAD=-lpthread | |
| 9508 | LIBPMULTITHREAD=-lpthread | |
| 9509 | fi | |
| 9510 | ||
| 9511 | if test $gl_pthread_api != yes; then | |
| 9512 | # For FreeBSD 4. | |
| 9513 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 | |
| 9514 | printf %s "checking for pthread_kill in -lc_r... " >&6; } | |
| 9515 | if test ${ac_cv_lib_c_r_pthread_kill+y} | |
| 9516 | then : | |
| 9517 | printf %s "(cached) " >&6 | |
| 9518 | else case e in #( | |
| 9519 | e) ac_check_lib_save_LIBS=$LIBS | |
| 9520 | LIBS="-lc_r $LIBS" | |
| 9521 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 9522 | /* end confdefs.h. */ | |
| 9523 | ||
| 9524 | /* Override any GCC internal prototype to avoid an error. | |
| 9525 | Use char because int might match the return type of a GCC | |
| 9526 | builtin and then its argument prototype would still apply. | |
| 9527 | The 'extern "C"' is for builds by C++ compilers; | |
| 9528 | although this is not generally supported in C code supporting it here | |
| 9529 | has little cost and some practical benefit (sr 110532). */ | |
| 9530 | #ifdef __cplusplus | |
| 9531 | extern "C" | |
| 9532 | #endif | |
| 9533 | char pthread_kill (void); | |
| 9534 | int | |
| 9535 | main (void) | |
| 9536 | { | |
| 9537 | return pthread_kill (); | |
| 9538 | ; | |
| 9539 | return 0; | |
| 9540 | } | |
| 9541 | _ACEOF | |
| 9542 | if ac_fn_c_try_link "$LINENO" | |
| 9543 | then : | |
| 9544 | ac_cv_lib_c_r_pthread_kill=yes | |
| 9545 | else case e in #( | |
| 9546 | e) ac_cv_lib_c_r_pthread_kill=no ;; | |
| 9547 | esac | |
| 9548 | fi | |
| 9549 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 9550 | conftest$ac_exeext conftest.$ac_ext | |
| 9551 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 9552 | esac | |
| 9553 | fi | |
| 9554 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 | |
| 9555 | printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; } | |
| 9556 | if test "x$ac_cv_lib_c_r_pthread_kill" = xyes | |
| 9557 | then : | |
| 9558 | gl_pthread_api=yes | |
| 9559 | LIBPTHREAD=-lc_r | |
| 9560 | LIBPMULTITHREAD=-lc_r | |
| 9561 | fi | |
| 9562 | ||
| 9563 | fi | |
| 9564 | fi | |
| 9565 | echo "$as_me:9565: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5 | |
| 9566 | fi | |
| 9567 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5 | |
| 9568 | printf %s "checking whether POSIX threads API is available... " >&6; } | |
| 9569 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5 | |
| 9570 | printf "%s\n" "$gl_pthread_api" >&6; } | |
| 9571 | ||
| 9572 | ||
| 9573 | if test $gl_pthread_api = yes; then | |
| 9574 | ||
| 9575 | printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h | |
| 9576 | ||
| 9577 | fi | |
| 9578 | ||
| 9579 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 9580 | /* end confdefs.h. */ | |
| 9581 | #include <sched.h> | |
| 9582 | int | |
| 9583 | main (void) | |
| 9584 | { | |
| 9585 | sched_yield (); | |
| 9586 | ; | |
| 9587 | return 0; | |
| 9588 | } | |
| 9589 | _ACEOF | |
| 9590 | if ac_fn_c_try_link "$LINENO" | |
| 9591 | then : | |
| 9592 | LIB_SCHED_YIELD= | |
| 9593 | ||
| 9594 | else case e in #( | |
| 9595 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5 | |
| 9596 | printf %s "checking for sched_yield in -lrt... " >&6; } | |
| 9597 | if test ${ac_cv_lib_rt_sched_yield+y} | |
| 9598 | then : | |
| 9599 | printf %s "(cached) " >&6 | |
| 9600 | else case e in #( | |
| 9601 | e) ac_check_lib_save_LIBS=$LIBS | |
| 9602 | LIBS="-lrt $LIBS" | |
| 9603 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 9604 | /* end confdefs.h. */ | |
| 9605 | ||
| 9606 | /* Override any GCC internal prototype to avoid an error. | |
| 9607 | Use char because int might match the return type of a GCC | |
| 9608 | builtin and then its argument prototype would still apply. | |
| 9609 | The 'extern "C"' is for builds by C++ compilers; | |
| 9610 | although this is not generally supported in C code supporting it here | |
| 9611 | has little cost and some practical benefit (sr 110532). */ | |
| 9612 | #ifdef __cplusplus | |
| 9613 | extern "C" | |
| 9614 | #endif | |
| 9615 | char sched_yield (void); | |
| 9616 | int | |
| 9617 | main (void) | |
| 9618 | { | |
| 9619 | return sched_yield (); | |
| 9620 | ; | |
| 9621 | return 0; | |
| 9622 | } | |
| 9623 | _ACEOF | |
| 9624 | if ac_fn_c_try_link "$LINENO" | |
| 9625 | then : | |
| 9626 | ac_cv_lib_rt_sched_yield=yes | |
| 9627 | else case e in #( | |
| 9628 | e) ac_cv_lib_rt_sched_yield=no ;; | |
| 9629 | esac | |
| 9630 | fi | |
| 9631 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 9632 | conftest$ac_exeext conftest.$ac_ext | |
| 9633 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 9634 | esac | |
| 9635 | fi | |
| 9636 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5 | |
| 9637 | printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; } | |
| 9638 | if test "x$ac_cv_lib_rt_sched_yield" = xyes | |
| 9639 | then : | |
| 9640 | LIB_SCHED_YIELD=-lrt | |
| 9641 | else case e in #( | |
| 9642 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5 | |
| 9643 | printf %s "checking for sched_yield in -lposix4... " >&6; } | |
| 9644 | if test ${ac_cv_lib_posix4_sched_yield+y} | |
| 9645 | then : | |
| 9646 | printf %s "(cached) " >&6 | |
| 9647 | else case e in #( | |
| 9648 | e) ac_check_lib_save_LIBS=$LIBS | |
| 9649 | LIBS="-lposix4 $LIBS" | |
| 9650 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 9651 | /* end confdefs.h. */ | |
| 9652 | ||
| 9653 | /* Override any GCC internal prototype to avoid an error. | |
| 9654 | Use char because int might match the return type of a GCC | |
| 9655 | builtin and then its argument prototype would still apply. | |
| 9656 | The 'extern "C"' is for builds by C++ compilers; | |
| 9657 | although this is not generally supported in C code supporting it here | |
| 9658 | has little cost and some practical benefit (sr 110532). */ | |
| 9659 | #ifdef __cplusplus | |
| 9660 | extern "C" | |
| 9661 | #endif | |
| 9662 | char sched_yield (void); | |
| 9663 | int | |
| 9664 | main (void) | |
| 9665 | { | |
| 9666 | return sched_yield (); | |
| 9667 | ; | |
| 9668 | return 0; | |
| 9669 | } | |
| 9670 | _ACEOF | |
| 9671 | if ac_fn_c_try_link "$LINENO" | |
| 9672 | then : | |
| 9673 | ac_cv_lib_posix4_sched_yield=yes | |
| 9674 | else case e in #( | |
| 9675 | e) ac_cv_lib_posix4_sched_yield=no ;; | |
| 9676 | esac | |
| 9677 | fi | |
| 9678 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 9679 | conftest$ac_exeext conftest.$ac_ext | |
| 9680 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 9681 | esac | |
| 9682 | fi | |
| 9683 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5 | |
| 9684 | printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; } | |
| 9685 | if test "x$ac_cv_lib_posix4_sched_yield" = xyes | |
| 9686 | then : | |
| 9687 | LIB_SCHED_YIELD=-lposix4 | |
| 9688 | fi | |
| 9689 | ;; | |
| 9690 | esac | |
| 9691 | fi | |
| 9692 | ||
| 9693 | ;; | |
| 9694 | esac | |
| 9695 | fi | |
| 9696 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 9697 | conftest$ac_exeext conftest.$ac_ext | |
| 9698 | ||
| 9699 | ||
| 9700 | gl_pthreadlib_body_done=done | |
| 9701 | fi | |
| 9702 | ||
| 9703 | LIBTHREAD=$LIBPTHREAD LTLIBTHREAD=$LIBPTHREAD | |
| 9704 | LIBMULTITHREAD=$LIBPMULTITHREAD LTLIBMULTITHREAD=$LIBPMULTITHREAD | |
| 9705 | if test $gl_pthread_api = yes; then | |
| 9706 | if test "$gl_use_threads" = isoc+posix && test "$gl_have_isoc_threads" = yes; then | |
| 9707 | gl_threads_api='isoc+posix' | |
| 9708 | ||
| 9709 | printf "%s\n" "#define USE_ISOC_AND_POSIX_THREADS 1" >>confdefs.h | |
| 9710 | ||
| 9711 | LIBTHREAD= LTLIBTHREAD= | |
| 9712 | else | |
| 9713 | gl_threads_api=posix | |
| 9714 | ||
| 9715 | printf "%s\n" "#define USE_POSIX_THREADS 1" >>confdefs.h | |
| 9716 | ||
| 9717 | if test -z "$LIBMULTITHREAD" && test -z "$LTLIBMULTITHREAD"; then | |
| 9718 | ||
| 9719 | printf "%s\n" "#define USE_POSIX_THREADS_FROM_LIBC 1" >>confdefs.h | |
| 9720 | ||
| 9721 | else | |
| 9722 | if case "$gl_cv_have_weak" in *yes) true;; *) false;; esac; then | |
| 9723 | ||
| 9724 | printf "%s\n" "#define USE_POSIX_THREADS_WEAK 1" >>confdefs.h | |
| 9725 | ||
| 9726 | LIBTHREAD= LTLIBTHREAD= | |
| 9727 | else | |
| 9728 | case "$host_os" in | |
| 9729 | freebsd* | dragonfly* | midnightbsd*) | |
| 9730 | if test "x$LIBTHREAD" != "x$LIBMULTITHREAD"; then | |
| 9731 | ||
| 9732 | printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h | |
| 9733 | ||
| 9734 | fi | |
| 9735 | ;; | |
| 9736 | esac | |
| 9737 | fi | |
| 9738 | fi | |
| 9739 | fi | |
| 9740 | fi | |
| 9741 | fi | |
| 9742 | if test $gl_threads_api = none; then | |
| 9743 | if test "$gl_use_threads" = isoc && test "$gl_have_isoc_threads" = yes; then | |
| 9744 | ||
| 9745 | ||
| 9746 | ||
| 9747 | if test -z "$gl_stdthreadlib_body_done"; then | |
| 9748 | ||
| 9749 | ||
| 9750 | case "$host_os" in | |
| 9751 | mingw*) | |
| 9752 | LIBSTDTHREAD= | |
| 9753 | ;; | |
| 9754 | *) | |
| 9755 | ||
| 9756 | ||
| 9757 | if test -z "$gl_pthreadlib_body_done"; then | |
| 9758 | gl_pthread_api=no | |
| 9759 | LIBPTHREAD= | |
| 9760 | LIBPMULTITHREAD= | |
| 9761 | # On OSF/1, the compiler needs the flag -pthread or -D_REENTRANT so that | |
| 9762 | # it groks <pthread.h>. It's added above, in gl_ANYTHREADLIB_EARLY. | |
| 9763 | ac_fn_c_check_header_compile "$LINENO" "pthread.h" "ac_cv_header_pthread_h" "$ac_includes_default" | |
| 9764 | if test "x$ac_cv_header_pthread_h" = xyes | |
| 9765 | then : | |
| 9766 | gl_have_pthread_h=yes | |
| 9767 | else case e in #( | |
| 9768 | e) gl_have_pthread_h=no ;; | |
| 9769 | esac | |
| 9770 | fi | |
| 9771 | ||
| 9772 | if test "$gl_have_pthread_h" = yes; then | |
| 9773 | # Other possible tests: | |
| 9774 | # -lpthreads (FSU threads, PCthreads) | |
| 9775 | # -lgthreads | |
| 9776 | # Test whether both pthread_mutex_lock and pthread_mutexattr_init exist | |
| 9777 | # in libc. IRIX 6.5 has the first one in both libc and libpthread, but | |
| 9778 | # the second one only in libpthread, and lock.c needs it. | |
| 9779 | # | |
| 9780 | # If -pthread works, prefer it to -lpthread, since Ubuntu 14.04 | |
| 9781 | # needs -pthread for some reason. See: | |
| 9782 | # https://lists.gnu.org/r/bug-gnulib/2014-09/msg00023.html | |
| 9783 | save_LIBS=$LIBS | |
| 9784 | for gl_pthread in '' '-pthread'; do | |
| 9785 | LIBS="$LIBS $gl_pthread" | |
| 9786 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 9787 | /* end confdefs.h. */ | |
| 9788 | #include <pthread.h> | |
| 9789 | pthread_mutex_t m; | |
| 9790 | pthread_mutexattr_t ma; | |
| 9791 | ||
| 9792 | int | |
| 9793 | main (void) | |
| 9794 | { | |
| 9795 | pthread_mutex_lock (&m); | |
| 9796 | pthread_mutexattr_init (&ma); | |
| 9797 | ; | |
| 9798 | return 0; | |
| 9799 | } | |
| 9800 | _ACEOF | |
| 9801 | if ac_fn_c_try_link "$LINENO" | |
| 9802 | then : | |
| 9803 | gl_pthread_api=yes | |
| 9804 | LIBPTHREAD=$gl_pthread | |
| 9805 | LIBPMULTITHREAD=$gl_pthread | |
| 9806 | fi | |
| 9807 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 9808 | conftest$ac_exeext conftest.$ac_ext | |
| 9809 | LIBS=$save_LIBS | |
| 9810 | test $gl_pthread_api = yes && break | |
| 9811 | done | |
| 9812 | echo "$as_me:9812: gl_pthread_api=$gl_pthread_api" >&5 | |
| 9813 | echo "$as_me:9813: LIBPTHREAD=$LIBPTHREAD" >&5 | |
| 9814 | ||
| 9815 | gl_pthread_in_glibc=no | |
| 9816 | # On Linux with glibc >= 2.34, libc contains the fully functional | |
| 9817 | # pthread functions. | |
| 9818 | case "$host_os" in | |
| 9819 | linux*) | |
| 9820 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 9821 | /* end confdefs.h. */ | |
| 9822 | #include <features.h> | |
| 9823 | #ifdef __GNU_LIBRARY__ | |
| 9824 | #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 34) || (__GLIBC__ > 2) | |
| 9825 | Lucky user | |
| 9826 | #endif | |
| 9827 | #endif | |
| 9828 | ||
| 9829 | _ACEOF | |
| 9830 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
| 9831 | $EGREP_TRADITIONAL "Lucky user" >/dev/null 2>&1 | |
| 9832 | then : | |
| 9833 | gl_pthread_in_glibc=yes | |
| 9834 | fi | |
| 9835 | rm -rf conftest* | |
| 9836 | ||
| 9837 | ;; | |
| 9838 | esac | |
| 9839 | echo "$as_me:9839: gl_pthread_in_glibc=$gl_pthread_in_glibc" >&5 | |
| 9840 | ||
| 9841 | # Test for libpthread by looking for pthread_kill. (Not pthread_self, | |
| 9842 | # since it is defined as a macro on OSF/1.) | |
| 9843 | if test $gl_pthread_api = yes && test -z "$LIBPTHREAD"; then | |
| 9844 | # The program links fine without libpthread. But it may actually | |
| 9845 | # need to link with libpthread in order to create multiple threads. | |
| 9846 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 | |
| 9847 | printf %s "checking for pthread_kill in -lpthread... " >&6; } | |
| 9848 | if test ${ac_cv_lib_pthread_pthread_kill+y} | |
| 9849 | then : | |
| 9850 | printf %s "(cached) " >&6 | |
| 9851 | else case e in #( | |
| 9852 | e) ac_check_lib_save_LIBS=$LIBS | |
| 9853 | LIBS="-lpthread $LIBS" | |
| 9854 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 9855 | /* end confdefs.h. */ | |
| 9856 | ||
| 9857 | /* Override any GCC internal prototype to avoid an error. | |
| 9858 | Use char because int might match the return type of a GCC | |
| 9859 | builtin and then its argument prototype would still apply. | |
| 9860 | The 'extern "C"' is for builds by C++ compilers; | |
| 9861 | although this is not generally supported in C code supporting it here | |
| 9862 | has little cost and some practical benefit (sr 110532). */ | |
| 9863 | #ifdef __cplusplus | |
| 9864 | extern "C" | |
| 9865 | #endif | |
| 9866 | char pthread_kill (void); | |
| 9867 | int | |
| 9868 | main (void) | |
| 9869 | { | |
| 9870 | return pthread_kill (); | |
| 9871 | ; | |
| 9872 | return 0; | |
| 9873 | } | |
| 9874 | _ACEOF | |
| 9875 | if ac_fn_c_try_link "$LINENO" | |
| 9876 | then : | |
| 9877 | ac_cv_lib_pthread_pthread_kill=yes | |
| 9878 | else case e in #( | |
| 9879 | e) ac_cv_lib_pthread_pthread_kill=no ;; | |
| 9880 | esac | |
| 9881 | fi | |
| 9882 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 9883 | conftest$ac_exeext conftest.$ac_ext | |
| 9884 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 9885 | esac | |
| 9886 | fi | |
| 9887 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 | |
| 9888 | printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; } | |
| 9889 | if test "x$ac_cv_lib_pthread_pthread_kill" = xyes | |
| 9890 | then : | |
| 9891 | if test $gl_pthread_in_glibc = yes; then | |
| 9892 | LIBPMULTITHREAD= | |
| 9893 | else | |
| 9894 | LIBPMULTITHREAD=-lpthread | |
| 9895 | # On Solaris and HP-UX, most pthread functions exist also in libc. | |
| 9896 | # Therefore pthread_in_use() needs to actually try to create a | |
| 9897 | # thread: pthread_create from libc will fail, whereas | |
| 9898 | # pthread_create will actually create a thread. | |
| 9899 | # On Solaris 10 or newer, this test is no longer needed, because | |
| 9900 | # libc contains the fully functional pthread functions. | |
| 9901 | case "$host_os" in | |
| 9902 | solaris | solaris2.1-9 | solaris2.1-9.* | hpux*) | |
| 9903 | ||
| 9904 | printf "%s\n" "#define PTHREAD_IN_USE_DETECTION_HARD 1" >>confdefs.h | |
| 9905 | ||
| 9906 | esac | |
| 9907 | fi | |
| 9908 | ||
| 9909 | fi | |
| 9910 | ||
| 9911 | elif test $gl_pthread_api != yes; then | |
| 9912 | # Some library is needed. Try libpthread and libc_r. | |
| 9913 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lpthread" >&5 | |
| 9914 | printf %s "checking for pthread_kill in -lpthread... " >&6; } | |
| 9915 | if test ${ac_cv_lib_pthread_pthread_kill+y} | |
| 9916 | then : | |
| 9917 | printf %s "(cached) " >&6 | |
| 9918 | else case e in #( | |
| 9919 | e) ac_check_lib_save_LIBS=$LIBS | |
| 9920 | LIBS="-lpthread $LIBS" | |
| 9921 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 9922 | /* end confdefs.h. */ | |
| 9923 | ||
| 9924 | /* Override any GCC internal prototype to avoid an error. | |
| 9925 | Use char because int might match the return type of a GCC | |
| 9926 | builtin and then its argument prototype would still apply. | |
| 9927 | The 'extern "C"' is for builds by C++ compilers; | |
| 9928 | although this is not generally supported in C code supporting it here | |
| 9929 | has little cost and some practical benefit (sr 110532). */ | |
| 9930 | #ifdef __cplusplus | |
| 9931 | extern "C" | |
| 9932 | #endif | |
| 9933 | char pthread_kill (void); | |
| 9934 | int | |
| 9935 | main (void) | |
| 9936 | { | |
| 9937 | return pthread_kill (); | |
| 9938 | ; | |
| 9939 | return 0; | |
| 9940 | } | |
| 9941 | _ACEOF | |
| 9942 | if ac_fn_c_try_link "$LINENO" | |
| 9943 | then : | |
| 9944 | ac_cv_lib_pthread_pthread_kill=yes | |
| 9945 | else case e in #( | |
| 9946 | e) ac_cv_lib_pthread_pthread_kill=no ;; | |
| 9947 | esac | |
| 9948 | fi | |
| 9949 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 9950 | conftest$ac_exeext conftest.$ac_ext | |
| 9951 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 9952 | esac | |
| 9953 | fi | |
| 9954 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_pthread_pthread_kill" >&5 | |
| 9955 | printf "%s\n" "$ac_cv_lib_pthread_pthread_kill" >&6; } | |
| 9956 | if test "x$ac_cv_lib_pthread_pthread_kill" = xyes | |
| 9957 | then : | |
| 9958 | gl_pthread_api=yes | |
| 9959 | LIBPTHREAD=-lpthread | |
| 9960 | LIBPMULTITHREAD=-lpthread | |
| 9961 | fi | |
| 9962 | ||
| 9963 | if test $gl_pthread_api != yes; then | |
| 9964 | # For FreeBSD 4. | |
| 9965 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for pthread_kill in -lc_r" >&5 | |
| 9966 | printf %s "checking for pthread_kill in -lc_r... " >&6; } | |
| 9967 | if test ${ac_cv_lib_c_r_pthread_kill+y} | |
| 9968 | then : | |
| 9969 | printf %s "(cached) " >&6 | |
| 9970 | else case e in #( | |
| 9971 | e) ac_check_lib_save_LIBS=$LIBS | |
| 9972 | LIBS="-lc_r $LIBS" | |
| 9973 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 9974 | /* end confdefs.h. */ | |
| 9975 | ||
| 9976 | /* Override any GCC internal prototype to avoid an error. | |
| 9977 | Use char because int might match the return type of a GCC | |
| 9978 | builtin and then its argument prototype would still apply. | |
| 9979 | The 'extern "C"' is for builds by C++ compilers; | |
| 9980 | although this is not generally supported in C code supporting it here | |
| 9981 | has little cost and some practical benefit (sr 110532). */ | |
| 9982 | #ifdef __cplusplus | |
| 9983 | extern "C" | |
| 9984 | #endif | |
| 9985 | char pthread_kill (void); | |
| 9986 | int | |
| 9987 | main (void) | |
| 9988 | { | |
| 9989 | return pthread_kill (); | |
| 9990 | ; | |
| 9991 | return 0; | |
| 9992 | } | |
| 9993 | _ACEOF | |
| 9994 | if ac_fn_c_try_link "$LINENO" | |
| 9995 | then : | |
| 9996 | ac_cv_lib_c_r_pthread_kill=yes | |
| 9997 | else case e in #( | |
| 9998 | e) ac_cv_lib_c_r_pthread_kill=no ;; | |
| 9999 | esac | |
| 10000 | fi | |
| 10001 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 10002 | conftest$ac_exeext conftest.$ac_ext | |
| 10003 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 10004 | esac | |
| 10005 | fi | |
| 10006 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_c_r_pthread_kill" >&5 | |
| 10007 | printf "%s\n" "$ac_cv_lib_c_r_pthread_kill" >&6; } | |
| 10008 | if test "x$ac_cv_lib_c_r_pthread_kill" = xyes | |
| 10009 | then : | |
| 10010 | gl_pthread_api=yes | |
| 10011 | LIBPTHREAD=-lc_r | |
| 10012 | LIBPMULTITHREAD=-lc_r | |
| 10013 | fi | |
| 10014 | ||
| 10015 | fi | |
| 10016 | fi | |
| 10017 | echo "$as_me:10017: LIBPMULTITHREAD=$LIBPMULTITHREAD" >&5 | |
| 10018 | fi | |
| 10019 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether POSIX threads API is available" >&5 | |
| 10020 | printf %s "checking whether POSIX threads API is available... " >&6; } | |
| 10021 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_pthread_api" >&5 | |
| 10022 | printf "%s\n" "$gl_pthread_api" >&6; } | |
| 10023 | ||
| 10024 | ||
| 10025 | if test $gl_pthread_api = yes; then | |
| 10026 | ||
| 10027 | printf "%s\n" "#define HAVE_PTHREAD_API 1" >>confdefs.h | |
| 10028 | ||
| 10029 | fi | |
| 10030 | ||
| 10031 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 10032 | /* end confdefs.h. */ | |
| 10033 | #include <sched.h> | |
| 10034 | int | |
| 10035 | main (void) | |
| 10036 | { | |
| 10037 | sched_yield (); | |
| 10038 | ; | |
| 10039 | return 0; | |
| 10040 | } | |
| 10041 | _ACEOF | |
| 10042 | if ac_fn_c_try_link "$LINENO" | |
| 10043 | then : | |
| 10044 | LIB_SCHED_YIELD= | |
| 10045 | ||
| 10046 | else case e in #( | |
| 10047 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lrt" >&5 | |
| 10048 | printf %s "checking for sched_yield in -lrt... " >&6; } | |
| 10049 | if test ${ac_cv_lib_rt_sched_yield+y} | |
| 10050 | then : | |
| 10051 | printf %s "(cached) " >&6 | |
| 10052 | else case e in #( | |
| 10053 | e) ac_check_lib_save_LIBS=$LIBS | |
| 10054 | LIBS="-lrt $LIBS" | |
| 10055 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 10056 | /* end confdefs.h. */ | |
| 10057 | ||
| 10058 | /* Override any GCC internal prototype to avoid an error. | |
| 10059 | Use char because int might match the return type of a GCC | |
| 10060 | builtin and then its argument prototype would still apply. | |
| 10061 | The 'extern "C"' is for builds by C++ compilers; | |
| 10062 | although this is not generally supported in C code supporting it here | |
| 10063 | has little cost and some practical benefit (sr 110532). */ | |
| 10064 | #ifdef __cplusplus | |
| 10065 | extern "C" | |
| 10066 | #endif | |
| 10067 | char sched_yield (void); | |
| 10068 | int | |
| 10069 | main (void) | |
| 10070 | { | |
| 10071 | return sched_yield (); | |
| 10072 | ; | |
| 10073 | return 0; | |
| 10074 | } | |
| 10075 | _ACEOF | |
| 10076 | if ac_fn_c_try_link "$LINENO" | |
| 10077 | then : | |
| 10078 | ac_cv_lib_rt_sched_yield=yes | |
| 10079 | else case e in #( | |
| 10080 | e) ac_cv_lib_rt_sched_yield=no ;; | |
| 10081 | esac | |
| 10082 | fi | |
| 10083 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 10084 | conftest$ac_exeext conftest.$ac_ext | |
| 10085 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 10086 | esac | |
| 10087 | fi | |
| 10088 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_rt_sched_yield" >&5 | |
| 10089 | printf "%s\n" "$ac_cv_lib_rt_sched_yield" >&6; } | |
| 10090 | if test "x$ac_cv_lib_rt_sched_yield" = xyes | |
| 10091 | then : | |
| 10092 | LIB_SCHED_YIELD=-lrt | |
| 10093 | else case e in #( | |
| 10094 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sched_yield in -lposix4" >&5 | |
| 10095 | printf %s "checking for sched_yield in -lposix4... " >&6; } | |
| 10096 | if test ${ac_cv_lib_posix4_sched_yield+y} | |
| 10097 | then : | |
| 10098 | printf %s "(cached) " >&6 | |
| 10099 | else case e in #( | |
| 10100 | e) ac_check_lib_save_LIBS=$LIBS | |
| 10101 | LIBS="-lposix4 $LIBS" | |
| 10102 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 10103 | /* end confdefs.h. */ | |
| 10104 | ||
| 10105 | /* Override any GCC internal prototype to avoid an error. | |
| 10106 | Use char because int might match the return type of a GCC | |
| 10107 | builtin and then its argument prototype would still apply. | |
| 10108 | The 'extern "C"' is for builds by C++ compilers; | |
| 10109 | although this is not generally supported in C code supporting it here | |
| 10110 | has little cost and some practical benefit (sr 110532). */ | |
| 10111 | #ifdef __cplusplus | |
| 10112 | extern "C" | |
| 10113 | #endif | |
| 10114 | char sched_yield (void); | |
| 10115 | int | |
| 10116 | main (void) | |
| 10117 | { | |
| 10118 | return sched_yield (); | |
| 10119 | ; | |
| 10120 | return 0; | |
| 10121 | } | |
| 10122 | _ACEOF | |
| 10123 | if ac_fn_c_try_link "$LINENO" | |
| 10124 | then : | |
| 10125 | ac_cv_lib_posix4_sched_yield=yes | |
| 10126 | else case e in #( | |
| 10127 | e) ac_cv_lib_posix4_sched_yield=no ;; | |
| 10128 | esac | |
| 10129 | fi | |
| 10130 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 10131 | conftest$ac_exeext conftest.$ac_ext | |
| 10132 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 10133 | esac | |
| 10134 | fi | |
| 10135 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix4_sched_yield" >&5 | |
| 10136 | printf "%s\n" "$ac_cv_lib_posix4_sched_yield" >&6; } | |
| 10137 | if test "x$ac_cv_lib_posix4_sched_yield" = xyes | |
| 10138 | then : | |
| 10139 | LIB_SCHED_YIELD=-lposix4 | |
| 10140 | fi | |
| 10141 | ;; | |
| 10142 | esac | |
| 10143 | fi | |
| 10144 | ||
| 10145 | ;; | |
| 10146 | esac | |
| 10147 | fi | |
| 10148 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 10149 | conftest$ac_exeext conftest.$ac_ext | |
| 10150 | ||
| 10151 | ||
| 10152 | gl_pthreadlib_body_done=done | |
| 10153 | fi | |
| 10154 | ||
| 10155 | if test $ac_cv_header_threads_h = yes; then | |
| 10156 | ac_fn_c_check_func "$LINENO" "thrd_create" "ac_cv_func_thrd_create" | |
| 10157 | if test "x$ac_cv_func_thrd_create" = xyes | |
| 10158 | then : | |
| 10159 | printf "%s\n" "#define HAVE_THRD_CREATE 1" >>confdefs.h | |
| 10160 | ||
| 10161 | fi | |
| 10162 | ||
| 10163 | if test $ac_cv_func_thrd_create = yes; then | |
| 10164 | LIBSTDTHREAD= | |
| 10165 | else | |
| 10166 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for thrd_create in -lstdthreads" >&5 | |
| 10167 | printf %s "checking for thrd_create in -lstdthreads... " >&6; } | |
| 10168 | if test ${ac_cv_lib_stdthreads_thrd_create+y} | |
| 10169 | then : | |
| 10170 | printf %s "(cached) " >&6 | |
| 10171 | else case e in #( | |
| 10172 | e) ac_check_lib_save_LIBS=$LIBS | |
| 10173 | LIBS="-lstdthreads $LIBS" | |
| 10174 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 10175 | /* end confdefs.h. */ | |
| 10176 | ||
| 10177 | /* Override any GCC internal prototype to avoid an error. | |
| 10178 | Use char because int might match the return type of a GCC | |
| 10179 | builtin and then its argument prototype would still apply. | |
| 10180 | The 'extern "C"' is for builds by C++ compilers; | |
| 10181 | although this is not generally supported in C code supporting it here | |
| 10182 | has little cost and some practical benefit (sr 110532). */ | |
| 10183 | #ifdef __cplusplus | |
| 10184 | extern "C" | |
| 10185 | #endif | |
| 10186 | char thrd_create (void); | |
| 10187 | int | |
| 10188 | main (void) | |
| 10189 | { | |
| 10190 | return thrd_create (); | |
| 10191 | ; | |
| 10192 | return 0; | |
| 10193 | } | |
| 10194 | _ACEOF | |
| 10195 | if ac_fn_c_try_link "$LINENO" | |
| 10196 | then : | |
| 10197 | ac_cv_lib_stdthreads_thrd_create=yes | |
| 10198 | else case e in #( | |
| 10199 | e) ac_cv_lib_stdthreads_thrd_create=no ;; | |
| 10200 | esac | |
| 10201 | fi | |
| 10202 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 10203 | conftest$ac_exeext conftest.$ac_ext | |
| 10204 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 10205 | esac | |
| 10206 | fi | |
| 10207 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_stdthreads_thrd_create" >&5 | |
| 10208 | printf "%s\n" "$ac_cv_lib_stdthreads_thrd_create" >&6; } | |
| 10209 | if test "x$ac_cv_lib_stdthreads_thrd_create" = xyes | |
| 10210 | then : | |
| 10211 | ||
| 10212 | LIBSTDTHREAD='-lstdthreads -lpthread' | |
| 10213 | ||
| 10214 | else case e in #( | |
| 10215 | e) | |
| 10216 | LIBSTDTHREAD="$LIBPMULTITHREAD" | |
| 10217 | ;; | |
| 10218 | esac | |
| 10219 | fi | |
| 10220 | ||
| 10221 | fi | |
| 10222 | else | |
| 10223 | LIBSTDTHREAD="$LIBPMULTITHREAD $LIB_SCHED_YIELD" | |
| 10224 | fi | |
| 10225 | ;; | |
| 10226 | esac | |
| 10227 | ||
| 10228 | ||
| 10229 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ISO C threads API is available" >&5 | |
| 10230 | printf %s "checking whether ISO C threads API is available... " >&6; } | |
| 10231 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_threads_h" >&5 | |
| 10232 | printf "%s\n" "$ac_cv_header_threads_h" >&6; } | |
| 10233 | gl_stdthreadlib_body_done=done | |
| 10234 | fi | |
| 10235 | ||
| 10236 | LIBTHREAD=$LIBSTDTHREAD LTLIBTHREAD=$LIBSTDTHREAD | |
| 10237 | LIBMULTITHREAD=$LIBSTDTHREAD LTLIBMULTITHREAD=$LIBSTDTHREAD | |
| 10238 | gl_threads_api=isoc | |
| 10239 | ||
| 10240 | printf "%s\n" "#define USE_ISOC_THREADS 1" >>confdefs.h | |
| 10241 | ||
| 10242 | fi | |
| 10243 | fi | |
| 10244 | if test $gl_threads_api = none; then | |
| 10245 | case "$gl_use_threads" in | |
| 10246 | yes | windows | win32) # The 'win32' is for backward compatibility. | |
| 10247 | if { case "$host_os" in | |
| 10248 | mingw*) true;; | |
| 10249 | *) false;; | |
| 10250 | esac | |
| 10251 | }; then | |
| 10252 | gl_threads_api=windows | |
| 10253 | ||
| 10254 | printf "%s\n" "#define USE_WINDOWS_THREADS 1" >>confdefs.h | |
| 10255 | ||
| 10256 | fi | |
| 10257 | ;; | |
| 10258 | esac | |
| 10259 | fi | |
| 10260 | fi | |
| 10261 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for multithread API to use" >&5 | |
| 10262 | printf %s "checking for multithread API to use... " >&6; } | |
| 10263 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_threads_api" >&5 | |
| 10264 | printf "%s\n" "$gl_threads_api" >&6; } | |
| 10265 | ||
| 10266 | ||
| 10267 | ||
| 10268 | ||
| 10269 | ||
| 10270 | ||
| 10271 | ||
| 10272 | ||
| 10273 | ||
| 10274 | ||
| 10275 | ||
| 10276 | if test "$gl_threads_api" = posix; then | |
| 10277 | # OSF/1 4.0 and Mac OS X 10.1 lack the pthread_rwlock_t type and the | |
| 10278 | # pthread_rwlock_* functions. | |
| 10279 | has_rwlock=false | |
| 10280 | ac_fn_c_check_type "$LINENO" "pthread_rwlock_t" "ac_cv_type_pthread_rwlock_t" "#include <pthread.h> | |
| 10281 | " | |
| 10282 | if test "x$ac_cv_type_pthread_rwlock_t" = xyes | |
| 10283 | then : | |
| 10284 | has_rwlock=true | |
| 10285 | ||
| 10286 | printf "%s\n" "#define HAVE_PTHREAD_RWLOCK 1" >>confdefs.h | |
| 10287 | ||
| 10288 | fi | |
| 10289 | ||
| 10290 | if $has_rwlock; then | |
| 10291 | ||
| 10292 | ||
| 10293 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pthread_rwlock_rdlock prefers a writer to a reader" >&5 | |
| 10294 | printf %s "checking whether pthread_rwlock_rdlock prefers a writer to a reader... " >&6; } | |
| 10295 | if test ${gl_cv_pthread_rwlock_rdlock_prefer_writer+y} | |
| 10296 | then : | |
| 10297 | printf %s "(cached) " >&6 | |
| 10298 | else case e in #( | |
| 10299 | e) save_LIBS="$LIBS" | |
| 10300 | LIBS="$LIBS $LIBMULTITHREAD" | |
| 10301 | if test "$cross_compiling" = yes | |
| 10302 | then : | |
| 10303 | case "$host_os" in | |
| 10304 | # Guess no on glibc systems. | |
| 10305 | *-gnu* | gnu*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; | |
| 10306 | # Guess no on musl systems. | |
| 10307 | *-musl*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; | |
| 10308 | # Guess no on bionic systems. | |
| 10309 | *-android*) gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" ;; | |
| 10310 | # Guess yes on native Windows with the mingw-w64 winpthreads library. | |
| 10311 | # Guess no on native Windows with the gnulib windows-rwlock module. | |
| 10312 | mingw*) if test "$gl_use_threads" = yes || test "$gl_use_threads" = posix; then | |
| 10313 | gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing yes" | |
| 10314 | else | |
| 10315 | gl_cv_pthread_rwlock_rdlock_prefer_writer="guessing no" | |
| 10316 | fi | |
| 10317 | ;; | |
| 10318 | # If we don't know, obey --enable-cross-guesses. | |
| 10319 | *) gl_cv_pthread_rwlock_rdlock_prefer_writer="$gl_cross_guess_normal" ;; | |
| 10320 | esac | |
| 10321 | ||
| 10322 | else case e in #( | |
| 10323 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 10324 | /* end confdefs.h. */ | |
| 10325 | ||
| 10326 | #include <errno.h> | |
| 10327 | #include <pthread.h> | |
| 10328 | #include <stdlib.h> | |
| 10329 | #include <unistd.h> | |
| 10330 | ||
| 10331 | #define SUCCEED() exit (0) | |
| 10332 | #define FAILURE() exit (1) | |
| 10333 | #define UNEXPECTED(n) (exit (10 + (n))) | |
| 10334 | ||
| 10335 | /* The main thread creates the waiting writer and the requesting reader threads | |
| 10336 | in the default way; this guarantees that they have the same priority. | |
| 10337 | We can reuse the main thread as first reader thread. */ | |
| 10338 | ||
| 10339 | static pthread_rwlock_t lock; | |
| 10340 | static pthread_t reader1; | |
| 10341 | static pthread_t writer; | |
| 10342 | static pthread_t reader2; | |
| 10343 | static pthread_t timer; | |
| 10344 | /* Used to pass control from writer to reader2 and from reader2 to timer, | |
| 10345 | as in a relay race. | |
| 10346 | Passing control from one running thread to another running thread | |
| 10347 | is most likely faster than to create the second thread. */ | |
| 10348 | static pthread_mutex_t baton; | |
| 10349 | ||
| 10350 | static void * | |
| 10351 | timer_func (void *ignored) | |
| 10352 | { | |
| 10353 | /* Step 13 (can be before or after step 12): | |
| 10354 | The timer thread takes the baton, then waits a moment to make sure | |
| 10355 | it can tell whether the second reader thread is blocked at step 12. */ | |
| 10356 | if (pthread_mutex_lock (&baton)) | |
| 10357 | UNEXPECTED (13); | |
| 10358 | usleep (100000); | |
| 10359 | /* By the time we get here, it's clear that the second reader thread is | |
| 10360 | blocked at step 12. This is the desired behaviour. */ | |
| 10361 | SUCCEED (); | |
| 10362 | } | |
| 10363 | ||
| 10364 | static void * | |
| 10365 | reader2_func (void *ignored) | |
| 10366 | { | |
| 10367 | int err; | |
| 10368 | ||
| 10369 | /* Step 8 (can be before or after step 7): | |
| 10370 | The second reader thread takes the baton, then waits a moment to make sure | |
| 10371 | the writer thread has reached step 7. */ | |
| 10372 | if (pthread_mutex_lock (&baton)) | |
| 10373 | UNEXPECTED (8); | |
| 10374 | usleep (100000); | |
| 10375 | /* Step 9: The second reader thread requests the lock. */ | |
| 10376 | err = pthread_rwlock_tryrdlock (&lock); | |
| 10377 | if (err == 0) | |
| 10378 | FAILURE (); | |
| 10379 | else if (err != EBUSY) | |
| 10380 | UNEXPECTED (9); | |
| 10381 | /* Step 10: Launch a timer, to test whether the next call blocks. */ | |
| 10382 | if (pthread_create (&timer, NULL, timer_func, NULL)) | |
| 10383 | UNEXPECTED (10); | |
| 10384 | /* Step 11: Release the baton. */ | |
| 10385 | if (pthread_mutex_unlock (&baton)) | |
| 10386 | UNEXPECTED (11); | |
| 10387 | /* Step 12: The second reader thread requests the lock. */ | |
| 10388 | err = pthread_rwlock_rdlock (&lock); | |
| 10389 | if (err == 0) | |
| 10390 | FAILURE (); | |
| 10391 | else | |
| 10392 | UNEXPECTED (12); | |
| 10393 | } | |
| 10394 | ||
| 10395 | static void * | |
| 10396 | writer_func (void *ignored) | |
| 10397 | { | |
| 10398 | /* Step 4: Take the baton, so that the second reader thread does not go ahead | |
| 10399 | too early. */ | |
| 10400 | if (pthread_mutex_lock (&baton)) | |
| 10401 | UNEXPECTED (4); | |
| 10402 | /* Step 5: Create the second reader thread. */ | |
| 10403 | if (pthread_create (&reader2, NULL, reader2_func, NULL)) | |
| 10404 | UNEXPECTED (5); | |
| 10405 | /* Step 6: Release the baton. */ | |
| 10406 | if (pthread_mutex_unlock (&baton)) | |
| 10407 | UNEXPECTED (6); | |
| 10408 | /* Step 7: The writer thread requests the lock. */ | |
| 10409 | if (pthread_rwlock_wrlock (&lock)) | |
| 10410 | UNEXPECTED (7); | |
| 10411 | return NULL; | |
| 10412 | } | |
| 10413 | ||
| 10414 | int | |
| 10415 | main () | |
| 10416 | { | |
| 10417 | reader1 = pthread_self (); | |
| 10418 | ||
| 10419 | /* Step 1: The main thread initializes the lock and the baton. */ | |
| 10420 | if (pthread_rwlock_init (&lock, NULL)) | |
| 10421 | UNEXPECTED (1); | |
| 10422 | if (pthread_mutex_init (&baton, NULL)) | |
| 10423 | UNEXPECTED (1); | |
| 10424 | /* Step 2: The main thread acquires the lock as a reader. */ | |
| 10425 | if (pthread_rwlock_rdlock (&lock)) | |
| 10426 | UNEXPECTED (2); | |
| 10427 | /* Step 3: Create the writer thread. */ | |
| 10428 | if (pthread_create (&writer, NULL, writer_func, NULL)) | |
| 10429 | UNEXPECTED (3); | |
| 10430 | /* Job done. Go to sleep. */ | |
| 10431 | for (;;) | |
| 10432 | { | |
| 10433 | sleep (1); | |
| 10434 | } | |
| 10435 | } | |
| 10436 | ||
| 10437 | _ACEOF | |
| 10438 | if ac_fn_c_try_run "$LINENO" | |
| 10439 | then : | |
| 10440 | gl_cv_pthread_rwlock_rdlock_prefer_writer=yes | |
| 10441 | else case e in #( | |
| 10442 | e) gl_cv_pthread_rwlock_rdlock_prefer_writer=no ;; | |
| 10443 | esac | |
| 10444 | fi | |
| 10445 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 10446 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 10447 | esac | |
| 10448 | fi | |
| 10449 | ||
| 10450 | LIBS="$save_LIBS" | |
| 10451 | ;; | |
| 10452 | esac | |
| 10453 | fi | |
| 10454 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_pthread_rwlock_rdlock_prefer_writer" >&5 | |
| 10455 | printf "%s\n" "$gl_cv_pthread_rwlock_rdlock_prefer_writer" >&6; } | |
| 10456 | case "$gl_cv_pthread_rwlock_rdlock_prefer_writer" in | |
| 10457 | *yes) | |
| 10458 | ||
| 10459 | printf "%s\n" "#define HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER 1" >>confdefs.h | |
| 10460 | ||
| 10461 | ;; | |
| 10462 | esac | |
| 10463 | ||
| 10464 | fi | |
| 10465 | # glibc defines PTHREAD_MUTEX_RECURSIVE as enum, not as a macro. | |
| 10466 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 10467 | /* end confdefs.h. */ | |
| 10468 | ||
| 10469 | #include <pthread.h> | |
| 10470 | int | |
| 10471 | main (void) | |
| 10472 | { | |
| 10473 | ||
| 10474 | #if __FreeBSD__ == 4 | |
| 10475 | error "No, in FreeBSD 4.0 recursive mutexes actually don't work." | |
| 10476 | #elif (defined __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ \ | |
| 10477 | && __ENVIRONMENT_MAC_OS_X_VERSION_MIN_REQUIRED__ < 1070) | |
| 10478 | error "No, in Mac OS X < 10.7 recursive mutexes actually don't work." | |
| 10479 | #else | |
| 10480 | int x = (int)PTHREAD_MUTEX_RECURSIVE; | |
| 10481 | return !x; | |
| 10482 | #endif | |
| 10483 | ||
| 10484 | ; | |
| 10485 | return 0; | |
| 10486 | } | |
| 10487 | _ACEOF | |
| 10488 | if ac_fn_c_try_compile "$LINENO" | |
| 10489 | then : | |
| 10490 | ||
| 10491 | printf "%s\n" "#define HAVE_PTHREAD_MUTEX_RECURSIVE 1" >>confdefs.h | |
| 10492 | ||
| 10493 | fi | |
| 10494 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 10495 | fi | |
| 10496 | : | |
| 10497 | ||
| 10498 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $CC options needed to detect all undeclared functions" >&5 | |
| 10499 | printf %s "checking for $CC options needed to detect all undeclared functions... " >&6; } | |
| 10500 | if test ${ac_cv_c_undeclared_builtin_options+y} | |
| 10501 | then : | |
| 10502 | printf %s "(cached) " >&6 | |
| 10503 | else case e in #( | |
| 10504 | e) ac_save_CFLAGS=$CFLAGS | |
| 10505 | ac_cv_c_undeclared_builtin_options='cannot detect' | |
| 10506 | for ac_arg in '' -fno-builtin; do | |
| 10507 | CFLAGS="$ac_save_CFLAGS $ac_arg" | |
| 10508 | # This test program should *not* compile successfully. | |
| 10509 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 10510 | /* end confdefs.h. */ | |
| 10511 | ||
| 10512 | int | |
| 10513 | main (void) | |
| 10514 | { | |
| 10515 | (void) strchr; | |
| 10516 | ; | |
| 10517 | return 0; | |
| 10518 | } | |
| 10519 | _ACEOF | |
| 10520 | if ac_fn_c_try_compile "$LINENO" | |
| 10521 | then : | |
| 10522 | ||
| 10523 | else case e in #( | |
| 10524 | e) # This test program should compile successfully. | |
| 10525 | # No library function is consistently available on | |
| 10526 | # freestanding implementations, so test against a dummy | |
| 10527 | # declaration. Include always-available headers on the | |
| 10528 | # off chance that they somehow elicit warnings. | |
| 10529 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 10530 | /* end confdefs.h. */ | |
| 10531 | #include <float.h> | |
| 10532 | #include <limits.h> | |
| 10533 | #include <stdarg.h> | |
| 10534 | #include <stddef.h> | |
| 10535 | extern void ac_decl (int, char *); | |
| 10536 | ||
| 10537 | int | |
| 10538 | main (void) | |
| 10539 | { | |
| 10540 | (void) ac_decl (0, (char *) 0); | |
| 10541 | (void) ac_decl; | |
| 10542 | ||
| 10543 | ; | |
| 10544 | return 0; | |
| 10545 | } | |
| 10546 | _ACEOF | |
| 10547 | if ac_fn_c_try_compile "$LINENO" | |
| 10548 | then : | |
| 10549 | if test x"$ac_arg" = x | |
| 10550 | then : | |
| 10551 | ac_cv_c_undeclared_builtin_options='none needed' | |
| 10552 | else case e in #( | |
| 10553 | e) ac_cv_c_undeclared_builtin_options=$ac_arg ;; | |
| 10554 | esac | |
| 10555 | fi | |
| 10556 | break | |
| 10557 | fi | |
| 10558 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 10559 | esac | |
| 10560 | fi | |
| 10561 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 10562 | done | |
| 10563 | CFLAGS=$ac_save_CFLAGS | |
| 10564 | ;; | |
| 10565 | esac | |
| 10566 | fi | |
| 10567 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_undeclared_builtin_options" >&5 | |
| 10568 | printf "%s\n" "$ac_cv_c_undeclared_builtin_options" >&6; } | |
| 10569 | case $ac_cv_c_undeclared_builtin_options in #( | |
| 10570 | 'cannot detect') : | |
| 10571 | { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 10572 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 10573 | as_fn_error $? "cannot make $CC report undeclared builtins | |
| 10574 | See 'config.log' for more details" "$LINENO" 5; } ;; #( | |
| 10575 | 'none needed') : | |
| 10576 | ac_c_undeclared_builtin_options='' ;; #( | |
| 10577 | *) : | |
| 10578 | ac_c_undeclared_builtin_options=$ac_cv_c_undeclared_builtin_options ;; | |
| 10579 | esac | |
| 10580 | ||
| 10581 | ||
| 10582 | if test "X$prefix" = "XNONE"; then | |
| 10583 | acl_final_prefix="$ac_default_prefix" | |
| 10584 | else | |
| 10585 | acl_final_prefix="$prefix" | |
| 10586 | fi | |
| 10587 | if test "X$exec_prefix" = "XNONE"; then | |
| 10588 | acl_final_exec_prefix='${prefix}' | |
| 10589 | else | |
| 10590 | acl_final_exec_prefix="$exec_prefix" | |
| 10591 | fi | |
| 10592 | acl_save_prefix="$prefix" | |
| 10593 | prefix="$acl_final_prefix" | |
| 10594 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" | |
| 10595 | prefix="$acl_save_prefix" | |
| 10596 | ||
| 10597 | ||
| 10598 | ||
| 10599 | # Check whether --with-gnu-ld was given. | |
| 10600 | if test ${with_gnu_ld+y} | |
| 10601 | then : | |
| 10602 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes | |
| 10603 | else case e in #( | |
| 10604 | e) with_gnu_ld=no ;; | |
| 10605 | esac | |
| 10606 | fi | |
| 10607 | ||
| 10608 | # Prepare PATH_SEPARATOR. | |
| 10609 | # The user is always right. | |
| 10610 | if test "${PATH_SEPARATOR+set}" != set; then | |
| 10611 | # Determine PATH_SEPARATOR by trying to find /bin/sh in a PATH which | |
| 10612 | # contains only /bin. Note that ksh looks also at the FPATH variable, | |
| 10613 | # so we have to set that as well for the test. | |
| 10614 | PATH_SEPARATOR=: | |
| 10615 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ | |
| 10616 | && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 \ | |
| 10617 | || PATH_SEPARATOR=';' | |
| 10618 | } | |
| 10619 | fi | |
| 10620 | ||
| 10621 | if test -n "$LD"; then | |
| 10622 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld" >&5 | |
| 10623 | printf %s "checking for ld... " >&6; } | |
| 10624 | elif test "$GCC" = yes; then | |
| 10625 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 | |
| 10626 | printf %s "checking for ld used by $CC... " >&6; } | |
| 10627 | elif test "$with_gnu_ld" = yes; then | |
| 10628 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 | |
| 10629 | printf %s "checking for GNU ld... " >&6; } | |
| 10630 | else | |
| 10631 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 | |
| 10632 | printf %s "checking for non-GNU ld... " >&6; } | |
| 10633 | fi | |
| 10634 | if test -n "$LD"; then | |
| 10635 | # Let the user override the test with a path. | |
| 10636 | : | |
| 10637 | else | |
| 10638 | if test ${acl_cv_path_LD+y} | |
| 10639 | then : | |
| 10640 | printf %s "(cached) " >&6 | |
| 10641 | else case e in #( | |
| 10642 | e) | |
| 10643 | acl_cv_path_LD= # Final result of this test | |
| 10644 | ac_prog=ld # Program to search in $PATH | |
| 10645 | if test "$GCC" = yes; then | |
| 10646 | # Check if gcc -print-prog-name=ld gives a path. | |
| 10647 | case $host in | |
| 10648 | *-*-mingw*) | |
| 10649 | # gcc leaves a trailing carriage return which upsets mingw | |
| 10650 | acl_output=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; | |
| 10651 | *) | |
| 10652 | acl_output=`($CC -print-prog-name=ld) 2>&5` ;; | |
| 10653 | esac | |
| 10654 | case $acl_output in | |
| 10655 | # Accept absolute paths. | |
| 10656 | [\\/]* | ?:[\\/]*) | |
| 10657 | re_direlt='/[^/][^/]*/\.\./' | |
| 10658 | # Canonicalize the pathname of ld | |
| 10659 | acl_output=`echo "$acl_output" | sed 's%\\\\%/%g'` | |
| 10660 | while echo "$acl_output" | grep "$re_direlt" > /dev/null 2>&1; do | |
| 10661 | acl_output=`echo $acl_output | sed "s%$re_direlt%/%"` | |
| 10662 | done | |
| 10663 | # Got the pathname. No search in PATH is needed. | |
| 10664 | acl_cv_path_LD="$acl_output" | |
| 10665 | ac_prog= | |
| 10666 | ;; | |
| 10667 | "") | |
| 10668 | # If it fails, then pretend we aren't using GCC. | |
| 10669 | ;; | |
| 10670 | *) | |
| 10671 | # If it is relative, then search for the first ld in PATH. | |
| 10672 | with_gnu_ld=unknown | |
| 10673 | ;; | |
| 10674 | esac | |
| 10675 | fi | |
| 10676 | if test -n "$ac_prog"; then | |
| 10677 | # Search for $ac_prog in $PATH. | |
| 10678 | acl_save_ifs="$IFS"; IFS=$PATH_SEPARATOR | |
| 10679 | for ac_dir in $PATH; do | |
| 10680 | IFS="$acl_save_ifs" | |
| 10681 | test -z "$ac_dir" && ac_dir=. | |
| 10682 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then | |
| 10683 | acl_cv_path_LD="$ac_dir/$ac_prog" | |
| 10684 | # Check to see if the program is GNU ld. I'd rather use --version, | |
| 10685 | # but apparently some variants of GNU ld only accept -v. | |
| 10686 | # Break only if it was the GNU/non-GNU ld that we prefer. | |
| 10687 | case `"$acl_cv_path_LD" -v 2>&1 </dev/null` in | |
| 10688 | *GNU* | *'with BFD'*) | |
| 10689 | test "$with_gnu_ld" != no && break | |
| 10690 | ;; | |
| 10691 | *) | |
| 10692 | test "$with_gnu_ld" != yes && break | |
| 10693 | ;; | |
| 10694 | esac | |
| 10695 | fi | |
| 10696 | done | |
| 10697 | IFS="$acl_save_ifs" | |
| 10698 | fi | |
| 10699 | case $host in | |
| 10700 | *-*-aix*) | |
| 10701 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 10702 | /* end confdefs.h. */ | |
| 10703 | #if defined __powerpc64__ || defined __LP64__ | |
| 10704 | int ok; | |
| 10705 | #else | |
| 10706 | error fail | |
| 10707 | #endif | |
| 10708 | ||
| 10709 | _ACEOF | |
| 10710 | if ac_fn_c_try_compile "$LINENO" | |
| 10711 | then : | |
| 10712 | # The compiler produces 64-bit code. Add option '-b64' so that the | |
| 10713 | # linker groks 64-bit object files. | |
| 10714 | case "$acl_cv_path_LD " in | |
| 10715 | *" -b64 "*) ;; | |
| 10716 | *) acl_cv_path_LD="$acl_cv_path_LD -b64" ;; | |
| 10717 | esac | |
| 10718 | ||
| 10719 | fi | |
| 10720 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 10721 | ;; | |
| 10722 | sparc64-*-netbsd*) | |
| 10723 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 10724 | /* end confdefs.h. */ | |
| 10725 | #if defined __sparcv9 || defined __arch64__ | |
| 10726 | int ok; | |
| 10727 | #else | |
| 10728 | error fail | |
| 10729 | #endif | |
| 10730 | ||
| 10731 | _ACEOF | |
| 10732 | if ac_fn_c_try_compile "$LINENO" | |
| 10733 | then : | |
| 10734 | ||
| 10735 | else case e in #( | |
| 10736 | e) # The compiler produces 32-bit code. Add option '-m elf32_sparc' | |
| 10737 | # so that the linker groks 32-bit object files. | |
| 10738 | case "$acl_cv_path_LD " in | |
| 10739 | *" -m elf32_sparc "*) ;; | |
| 10740 | *) acl_cv_path_LD="$acl_cv_path_LD -m elf32_sparc" ;; | |
| 10741 | esac | |
| 10742 | ;; | |
| 10743 | esac | |
| 10744 | fi | |
| 10745 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 10746 | ;; | |
| 10747 | esac | |
| 10748 | ;; | |
| 10749 | esac | |
| 10750 | fi | |
| 10751 | ||
| 10752 | LD="$acl_cv_path_LD" | |
| 10753 | fi | |
| 10754 | if test -n "$LD"; then | |
| 10755 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 | |
| 10756 | printf "%s\n" "$LD" >&6; } | |
| 10757 | else | |
| 10758 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 10759 | printf "%s\n" "no" >&6; } | |
| 10760 | as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 | |
| 10761 | fi | |
| 10762 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 | |
| 10763 | printf %s "checking if the linker ($LD) is GNU ld... " >&6; } | |
| 10764 | if test ${acl_cv_prog_gnu_ld+y} | |
| 10765 | then : | |
| 10766 | printf %s "(cached) " >&6 | |
| 10767 | else case e in #( | |
| 10768 | e) # I'd rather use --version here, but apparently some GNU lds only accept -v. | |
| 10769 | case `$LD -v 2>&1 </dev/null` in | |
| 10770 | *GNU* | *'with BFD'*) | |
| 10771 | acl_cv_prog_gnu_ld=yes | |
| 10772 | ;; | |
| 10773 | *) | |
| 10774 | acl_cv_prog_gnu_ld=no | |
| 10775 | ;; | |
| 10776 | esac ;; | |
| 10777 | esac | |
| 10778 | fi | |
| 10779 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 | |
| 10780 | printf "%s\n" "$acl_cv_prog_gnu_ld" >&6; } | |
| 10781 | with_gnu_ld=$acl_cv_prog_gnu_ld | |
| 10782 | ||
| 10783 | ||
| 10784 | ||
| 10785 | ||
| 10786 | ||
| 10787 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 | |
| 10788 | printf %s "checking for shared library run path origin... " >&6; } | |
| 10789 | if test ${acl_cv_rpath+y} | |
| 10790 | then : | |
| 10791 | printf %s "(cached) " >&6 | |
| 10792 | else case e in #( | |
| 10793 | e) | |
| 10794 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ | |
| 10795 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh | |
| 10796 | . ./conftest.sh | |
| 10797 | rm -f ./conftest.sh | |
| 10798 | acl_cv_rpath=done | |
| 10799 | ;; | |
| 10800 | esac | |
| 10801 | fi | |
| 10802 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 | |
| 10803 | printf "%s\n" "$acl_cv_rpath" >&6; } | |
| 10804 | wl="$acl_cv_wl" | |
| 10805 | acl_libext="$acl_cv_libext" | |
| 10806 | acl_shlibext="$acl_cv_shlibext" | |
| 10807 | acl_libname_spec="$acl_cv_libname_spec" | |
| 10808 | acl_library_names_spec="$acl_cv_library_names_spec" | |
| 10809 | acl_hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" | |
| 10810 | acl_hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" | |
| 10811 | acl_hardcode_direct="$acl_cv_hardcode_direct" | |
| 10812 | acl_hardcode_minus_L="$acl_cv_hardcode_minus_L" | |
| 10813 | # Check whether --enable-rpath was given. | |
| 10814 | if test ${enable_rpath+y} | |
| 10815 | then : | |
| 10816 | enableval=$enable_rpath; : | |
| 10817 | else case e in #( | |
| 10818 | e) enable_rpath=yes ;; | |
| 10819 | esac | |
| 10820 | fi | |
| 10821 | ||
| 10822 | ||
| 10823 | ||
| 10824 | ||
| 10825 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking 32-bit host C ABI" >&5 | |
| 10826 | printf %s "checking 32-bit host C ABI... " >&6; } | |
| 10827 | if test ${gl_cv_host_cpu_c_abi_32bit+y} | |
| 10828 | then : | |
| 10829 | printf %s "(cached) " >&6 | |
| 10830 | else case e in #( | |
| 10831 | e) if test -n "$gl_cv_host_cpu_c_abi"; then | |
| 10832 | case "$gl_cv_host_cpu_c_abi" in | |
| 10833 | i386 | x86_64-x32 | arm | armhf | arm64-ilp32 | hppa | ia64-ilp32 | mips | mipsn32 | powerpc | riscv*-ilp32* | s390 | sparc) | |
| 10834 | gl_cv_host_cpu_c_abi_32bit=yes ;; | |
| 10835 | x86_64 | alpha | arm64 | hppa64 | ia64 | mips64 | powerpc64 | powerpc64-elfv2 | riscv*-lp64* | s390x | sparc64 ) | |
| 10836 | gl_cv_host_cpu_c_abi_32bit=no ;; | |
| 10837 | *) | |
| 10838 | gl_cv_host_cpu_c_abi_32bit=unknown ;; | |
| 10839 | esac | |
| 10840 | else | |
| 10841 | case "$host_cpu" in | |
| 10842 | ||
| 10843 | # CPUs that only support a 32-bit ABI. | |
| 10844 | arc \ | |
| 10845 | | bfin \ | |
| 10846 | | cris* \ | |
| 10847 | | csky \ | |
| 10848 | | epiphany \ | |
| 10849 | | ft32 \ | |
| 10850 | | h8300 \ | |
| 10851 | | m68k \ | |
| 10852 | | microblaze | microblazeel \ | |
| 10853 | | nds32 | nds32le | nds32be \ | |
| 10854 | | nios2 | nios2eb | nios2el \ | |
| 10855 | | or1k* \ | |
| 10856 | | or32 \ | |
| 10857 | | sh | sh1234 | sh1234elb \ | |
| 10858 | | tic6x \ | |
| 10859 | | xtensa* ) | |
| 10860 | gl_cv_host_cpu_c_abi_32bit=yes | |
| 10861 | ;; | |
| 10862 | ||
| 10863 | # CPUs that only support a 64-bit ABI. | |
| 10864 | alpha | alphaev[4-8] | alphaev56 | alphapca5[67] | alphaev6[78] \ | |
| 10865 | | mmix ) | |
| 10866 | gl_cv_host_cpu_c_abi_32bit=no | |
| 10867 | ;; | |
| 10868 | ||
| 10869 | i[34567]86 ) | |
| 10870 | gl_cv_host_cpu_c_abi_32bit=yes | |
| 10871 | ;; | |
| 10872 | ||
| 10873 | x86_64 ) | |
| 10874 | # On x86_64 systems, the C compiler may be generating code in one of | |
| 10875 | # these ABIs: | |
| 10876 | # - 64-bit instruction set, 64-bit pointers, 64-bit 'long': x86_64. | |
| 10877 | # - 64-bit instruction set, 64-bit pointers, 32-bit 'long': x86_64 | |
| 10878 | # with native Windows (mingw, MSVC). | |
| 10879 | # - 64-bit instruction set, 32-bit pointers, 32-bit 'long': x86_64-x32. | |
| 10880 | # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': i386. | |
| 10881 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 10882 | /* end confdefs.h. */ | |
| 10883 | #if (defined __x86_64__ || defined __amd64__ \ | |
| 10884 | || defined _M_X64 || defined _M_AMD64) \ | |
| 10885 | && !(defined __ILP32__ || defined _ILP32) | |
| 10886 | int ok; | |
| 10887 | #else | |
| 10888 | error fail | |
| 10889 | #endif | |
| 10890 | ||
| 10891 | _ACEOF | |
| 10892 | if ac_fn_c_try_compile "$LINENO" | |
| 10893 | then : | |
| 10894 | gl_cv_host_cpu_c_abi_32bit=no | |
| 10895 | else case e in #( | |
| 10896 | e) gl_cv_host_cpu_c_abi_32bit=yes ;; | |
| 10897 | esac | |
| 10898 | fi | |
| 10899 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 10900 | ;; | |
| 10901 | ||
| 10902 | arm* | aarch64 ) | |
| 10903 | # Assume arm with EABI. | |
| 10904 | # On arm64 systems, the C compiler may be generating code in one of | |
| 10905 | # these ABIs: | |
| 10906 | # - aarch64 instruction set, 64-bit pointers, 64-bit 'long': arm64. | |
| 10907 | # - aarch64 instruction set, 32-bit pointers, 32-bit 'long': arm64-ilp32. | |
| 10908 | # - 32-bit instruction set, 32-bit pointers, 32-bit 'long': arm or armhf. | |
| 10909 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 10910 | /* end confdefs.h. */ | |
| 10911 | #if defined __aarch64__ && !(defined __ILP32__ || defined _ILP32) | |
| 10912 | int ok; | |
| 10913 | #else | |
| 10914 | error fail | |
| 10915 | #endif | |
| 10916 | ||
| 10917 | _ACEOF | |
| 10918 | if ac_fn_c_try_compile "$LINENO" | |
| 10919 | then : | |
| 10920 | gl_cv_host_cpu_c_abi_32bit=no | |
| 10921 | else case e in #( | |
| 10922 | e) gl_cv_host_cpu_c_abi_32bit=yes ;; | |
| 10923 | esac | |
| 10924 | fi | |
| 10925 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 10926 | ;; | |
| 10927 | ||
| 10928 | hppa1.0 | hppa1.1 | hppa2.0* | hppa64 ) | |
| 10929 | # On hppa, the C compiler may be generating 32-bit code or 64-bit | |
| 10930 | # code. In the latter case, it defines _LP64 and __LP64__. | |
| 10931 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 10932 | /* end confdefs.h. */ | |
| 10933 | #ifdef __LP64__ | |
| 10934 | int ok; | |
| 10935 | #else | |
| 10936 | error fail | |
| 10937 | #endif | |
| 10938 | ||
| 10939 | _ACEOF | |
| 10940 | if ac_fn_c_try_compile "$LINENO" | |
| 10941 | then : | |
| 10942 | gl_cv_host_cpu_c_abi_32bit=no | |
| 10943 | else case e in #( | |
| 10944 | e) gl_cv_host_cpu_c_abi_32bit=yes ;; | |
| 10945 | esac | |
| 10946 | fi | |
| 10947 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 10948 | ;; | |
| 10949 | ||
| 10950 | ia64* ) | |
| 10951 | # On ia64 on HP-UX, the C compiler may be generating 64-bit code or | |
| 10952 | # 32-bit code. In the latter case, it defines _ILP32. | |
| 10953 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 10954 | /* end confdefs.h. */ | |
| 10955 | #ifdef _ILP32 | |
| 10956 | int ok; | |
| 10957 | #else | |
| 10958 | error fail | |
| 10959 | #endif | |
| 10960 | ||
| 10961 | _ACEOF | |
| 10962 | if ac_fn_c_try_compile "$LINENO" | |
| 10963 | then : | |
| 10964 | gl_cv_host_cpu_c_abi_32bit=yes | |
| 10965 | else case e in #( | |
| 10966 | e) gl_cv_host_cpu_c_abi_32bit=no ;; | |
| 10967 | esac | |
| 10968 | fi | |
| 10969 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 10970 | ;; | |
| 10971 | ||
| 10972 | mips* ) | |
| 10973 | # We should also check for (_MIPS_SZPTR == 64), but gcc keeps this | |
| 10974 | # at 32. | |
| 10975 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 10976 | /* end confdefs.h. */ | |
| 10977 | #if defined _MIPS_SZLONG && (_MIPS_SZLONG == 64) | |
| 10978 | int ok; | |
| 10979 | #else | |
| 10980 | error fail | |
| 10981 | #endif | |
| 10982 | ||
| 10983 | _ACEOF | |
| 10984 | if ac_fn_c_try_compile "$LINENO" | |
| 10985 | then : | |
| 10986 | gl_cv_host_cpu_c_abi_32bit=no | |
| 10987 | else case e in #( | |
| 10988 | e) gl_cv_host_cpu_c_abi_32bit=yes ;; | |
| 10989 | esac | |
| 10990 | fi | |
| 10991 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 10992 | ;; | |
| 10993 | ||
| 10994 | powerpc* ) | |
| 10995 | # Different ABIs are in use on AIX vs. Mac OS X vs. Linux,*BSD. | |
| 10996 | # No need to distinguish them here; the caller may distinguish | |
| 10997 | # them based on the OS. | |
| 10998 | # On powerpc64 systems, the C compiler may still be generating | |
| 10999 | # 32-bit code. And on powerpc-ibm-aix systems, the C compiler may | |
| 11000 | # be generating 64-bit code. | |
| 11001 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 11002 | /* end confdefs.h. */ | |
| 11003 | #if defined __powerpc64__ || defined __LP64__ | |
| 11004 | int ok; | |
| 11005 | #else | |
| 11006 | error fail | |
| 11007 | #endif | |
| 11008 | ||
| 11009 | _ACEOF | |
| 11010 | if ac_fn_c_try_compile "$LINENO" | |
| 11011 | then : | |
| 11012 | gl_cv_host_cpu_c_abi_32bit=no | |
| 11013 | else case e in #( | |
| 11014 | e) gl_cv_host_cpu_c_abi_32bit=yes ;; | |
| 11015 | esac | |
| 11016 | fi | |
| 11017 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 11018 | ;; | |
| 11019 | ||
| 11020 | rs6000 ) | |
| 11021 | gl_cv_host_cpu_c_abi_32bit=yes | |
| 11022 | ;; | |
| 11023 | ||
| 11024 | riscv32 | riscv64 ) | |
| 11025 | # There are 6 ABIs: ilp32, ilp32f, ilp32d, lp64, lp64f, lp64d. | |
| 11026 | # Size of 'long' and 'void *': | |
| 11027 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 11028 | /* end confdefs.h. */ | |
| 11029 | #if defined __LP64__ | |
| 11030 | int ok; | |
| 11031 | #else | |
| 11032 | error fail | |
| 11033 | #endif | |
| 11034 | ||
| 11035 | _ACEOF | |
| 11036 | if ac_fn_c_try_compile "$LINENO" | |
| 11037 | then : | |
| 11038 | gl_cv_host_cpu_c_abi_32bit=no | |
| 11039 | else case e in #( | |
| 11040 | e) gl_cv_host_cpu_c_abi_32bit=yes ;; | |
| 11041 | esac | |
| 11042 | fi | |
| 11043 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 11044 | ;; | |
| 11045 | ||
| 11046 | s390* ) | |
| 11047 | # On s390x, the C compiler may be generating 64-bit (= s390x) code | |
| 11048 | # or 31-bit (= s390) code. | |
| 11049 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 11050 | /* end confdefs.h. */ | |
| 11051 | #if defined __LP64__ || defined __s390x__ | |
| 11052 | int ok; | |
| 11053 | #else | |
| 11054 | error fail | |
| 11055 | #endif | |
| 11056 | ||
| 11057 | _ACEOF | |
| 11058 | if ac_fn_c_try_compile "$LINENO" | |
| 11059 | then : | |
| 11060 | gl_cv_host_cpu_c_abi_32bit=no | |
| 11061 | else case e in #( | |
| 11062 | e) gl_cv_host_cpu_c_abi_32bit=yes ;; | |
| 11063 | esac | |
| 11064 | fi | |
| 11065 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 11066 | ;; | |
| 11067 | ||
| 11068 | sparc | sparc64 ) | |
| 11069 | # UltraSPARCs running Linux have `uname -m` = "sparc64", but the | |
| 11070 | # C compiler still generates 32-bit code. | |
| 11071 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 11072 | /* end confdefs.h. */ | |
| 11073 | #if defined __sparcv9 || defined __arch64__ | |
| 11074 | int ok; | |
| 11075 | #else | |
| 11076 | error fail | |
| 11077 | #endif | |
| 11078 | ||
| 11079 | _ACEOF | |
| 11080 | if ac_fn_c_try_compile "$LINENO" | |
| 11081 | then : | |
| 11082 | gl_cv_host_cpu_c_abi_32bit=no | |
| 11083 | else case e in #( | |
| 11084 | e) gl_cv_host_cpu_c_abi_32bit=yes ;; | |
| 11085 | esac | |
| 11086 | fi | |
| 11087 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 11088 | ;; | |
| 11089 | ||
| 11090 | *) | |
| 11091 | gl_cv_host_cpu_c_abi_32bit=unknown | |
| 11092 | ;; | |
| 11093 | esac | |
| 11094 | fi | |
| 11095 | ;; | |
| 11096 | esac | |
| 11097 | fi | |
| 11098 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_host_cpu_c_abi_32bit" >&5 | |
| 11099 | printf "%s\n" "$gl_cv_host_cpu_c_abi_32bit" >&6; } | |
| 11100 | ||
| 11101 | HOST_CPU_C_ABI_32BIT="$gl_cv_host_cpu_c_abi_32bit" | |
| 11102 | ||
| 11103 | ||
| 11104 | ||
| 11105 | ||
| 11106 | ||
| 11107 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for ELF binary format" >&5 | |
| 11108 | printf %s "checking for ELF binary format... " >&6; } | |
| 11109 | if test ${gl_cv_elf+y} | |
| 11110 | then : | |
| 11111 | printf %s "(cached) " >&6 | |
| 11112 | else case e in #( | |
| 11113 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 11114 | /* end confdefs.h. */ | |
| 11115 | #if defined __ELF__ || (defined __linux__ && defined __EDG__) | |
| 11116 | Extensible Linking Format | |
| 11117 | #endif | |
| 11118 | ||
| 11119 | _ACEOF | |
| 11120 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
| 11121 | $EGREP_TRADITIONAL "Extensible Linking Format" >/dev/null 2>&1 | |
| 11122 | then : | |
| 11123 | gl_cv_elf=yes | |
| 11124 | else case e in #( | |
| 11125 | e) gl_cv_elf=no ;; | |
| 11126 | esac | |
| 11127 | fi | |
| 11128 | rm -rf conftest* | |
| 11129 | ||
| 11130 | ;; | |
| 11131 | esac | |
| 11132 | fi | |
| 11133 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_elf" >&5 | |
| 11134 | printf "%s\n" "$gl_cv_elf" >&6; } | |
| 11135 | if test $gl_cv_elf = yes; then | |
| 11136 | # Extract the ELF class of a file (5th byte) in decimal. | |
| 11137 | # Cf. https://en.wikipedia.org/wiki/Executable_and_Linkable_Format#File_header | |
| 11138 | if od -A x < /dev/null >/dev/null 2>/dev/null; then | |
| 11139 | # Use POSIX od. | |
| 11140 | func_elfclass () | |
| 11141 | { | |
| 11142 | od -A n -t d1 -j 4 -N 1 | |
| 11143 | } | |
| 11144 | else | |
| 11145 | # Use BSD hexdump. | |
| 11146 | func_elfclass () | |
| 11147 | { | |
| 11148 | dd bs=1 count=1 skip=4 2>/dev/null | hexdump -e '1/1 "%3d "' | |
| 11149 | echo | |
| 11150 | } | |
| 11151 | fi | |
| 11152 | # Use 'expr', not 'test', to compare the values of func_elfclass, because on | |
| 11153 | # Solaris 11 OpenIndiana and Solaris 11 OmniOS, the result is 001 or 002, | |
| 11154 | # not 1 or 2. | |
| 11155 | case $HOST_CPU_C_ABI_32BIT in | |
| 11156 | yes) | |
| 11157 | # 32-bit ABI. | |
| 11158 | acl_is_expected_elfclass () | |
| 11159 | { | |
| 11160 | expr "`func_elfclass | sed -e 's/[ ]//g'`" = 1 > /dev/null | |
| 11161 | } | |
| 11162 | ;; | |
| 11163 | no) | |
| 11164 | # 64-bit ABI. | |
| 11165 | acl_is_expected_elfclass () | |
| 11166 | { | |
| 11167 | expr "`func_elfclass | sed -e 's/[ ]//g'`" = 2 > /dev/null | |
| 11168 | } | |
| 11169 | ;; | |
| 11170 | *) | |
| 11171 | # Unknown. | |
| 11172 | acl_is_expected_elfclass () | |
| 11173 | { | |
| 11174 | : | |
| 11175 | } | |
| 11176 | ;; | |
| 11177 | esac | |
| 11178 | else | |
| 11179 | acl_is_expected_elfclass () | |
| 11180 | { | |
| 11181 | : | |
| 11182 | } | |
| 11183 | fi | |
| 11184 | ||
| 11185 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the common suffixes of directories in the library search path" >&5 | |
| 11186 | printf %s "checking for the common suffixes of directories in the library search path... " >&6; } | |
| 11187 | if test ${acl_cv_libdirstems+y} | |
| 11188 | then : | |
| 11189 | printf %s "(cached) " >&6 | |
| 11190 | else case e in #( | |
| 11191 | e) acl_libdirstem=lib | |
| 11192 | acl_libdirstem2= | |
| 11193 | acl_libdirstem3= | |
| 11194 | case "$host_os" in | |
| 11195 | solaris*) | |
| 11196 | if test $HOST_CPU_C_ABI_32BIT = no; then | |
| 11197 | acl_libdirstem2=lib/64 | |
| 11198 | case "$host_cpu" in | |
| 11199 | sparc*) acl_libdirstem3=lib/sparcv9 ;; | |
| 11200 | i*86 | x86_64) acl_libdirstem3=lib/amd64 ;; | |
| 11201 | esac | |
| 11202 | fi | |
| 11203 | ;; | |
| 11204 | *) | |
| 11205 | searchpath=`(LC_ALL=C $CC $CPPFLAGS $CFLAGS -print-search-dirs) 2>/dev/null \ | |
| 11206 | | sed -n -e 's,^libraries: ,,p' | sed -e 's,^=,,'` | |
| 11207 | if test $HOST_CPU_C_ABI_32BIT != no; then | |
| 11208 | # 32-bit or unknown ABI. | |
| 11209 | if test -d /usr/lib32; then | |
| 11210 | acl_libdirstem2=lib32 | |
| 11211 | fi | |
| 11212 | fi | |
| 11213 | if test $HOST_CPU_C_ABI_32BIT != yes; then | |
| 11214 | # 64-bit or unknown ABI. | |
| 11215 | if test -d /usr/lib64; then | |
| 11216 | acl_libdirstem3=lib64 | |
| 11217 | fi | |
| 11218 | fi | |
| 11219 | if test -n "$searchpath"; then | |
| 11220 | acl_save_IFS="${IFS= }"; IFS=":" | |
| 11221 | for searchdir in $searchpath; do | |
| 11222 | if test -d "$searchdir"; then | |
| 11223 | case "$searchdir" in | |
| 11224 | */lib32/ | */lib32 ) acl_libdirstem2=lib32 ;; | |
| 11225 | */lib64/ | */lib64 ) acl_libdirstem3=lib64 ;; | |
| 11226 | */../ | */.. ) | |
| 11227 | # Better ignore directories of this form. They are misleading. | |
| 11228 | ;; | |
| 11229 | *) searchdir=`cd "$searchdir" && pwd` | |
| 11230 | case "$searchdir" in | |
| 11231 | */lib32 ) acl_libdirstem2=lib32 ;; | |
| 11232 | */lib64 ) acl_libdirstem3=lib64 ;; | |
| 11233 | esac ;; | |
| 11234 | esac | |
| 11235 | fi | |
| 11236 | done | |
| 11237 | IFS="$acl_save_IFS" | |
| 11238 | if test $HOST_CPU_C_ABI_32BIT = yes; then | |
| 11239 | # 32-bit ABI. | |
| 11240 | acl_libdirstem3= | |
| 11241 | fi | |
| 11242 | if test $HOST_CPU_C_ABI_32BIT = no; then | |
| 11243 | # 64-bit ABI. | |
| 11244 | acl_libdirstem2= | |
| 11245 | fi | |
| 11246 | fi | |
| 11247 | ;; | |
| 11248 | esac | |
| 11249 | test -n "$acl_libdirstem2" || acl_libdirstem2="$acl_libdirstem" | |
| 11250 | test -n "$acl_libdirstem3" || acl_libdirstem3="$acl_libdirstem" | |
| 11251 | acl_cv_libdirstems="$acl_libdirstem,$acl_libdirstem2,$acl_libdirstem3" | |
| 11252 | ;; | |
| 11253 | esac | |
| 11254 | fi | |
| 11255 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $acl_cv_libdirstems" >&5 | |
| 11256 | printf "%s\n" "$acl_cv_libdirstems" >&6; } | |
| 11257 | acl_libdirstem=`echo "$acl_cv_libdirstems" | sed -e 's/,.*//'` | |
| 11258 | acl_libdirstem2=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,//' -e 's/,.*//'` | |
| 11259 | acl_libdirstem3=`echo "$acl_cv_libdirstems" | sed -e 's/^[^,]*,[^,]*,//' -e 's/,.*//'` | |
| 11260 | ||
| 11261 | ||
| 11262 | ||
| 11263 | ||
| 11264 | ||
| 11265 | ||
| 11266 | ||
| 11267 | ||
| 11268 | ||
| 11269 | ||
| 11270 | ||
| 11271 | use_additional=yes | |
| 11272 | ||
| 11273 | acl_save_prefix="$prefix" | |
| 11274 | prefix="$acl_final_prefix" | |
| 11275 | acl_save_exec_prefix="$exec_prefix" | |
| 11276 | exec_prefix="$acl_final_exec_prefix" | |
| 11277 | ||
| 11278 | eval additional_includedir=\"$includedir\" | |
| 11279 | eval additional_libdir=\"$libdir\" | |
| 11280 | eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" | |
| 11281 | eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" | |
| 11282 | ||
| 11283 | exec_prefix="$acl_save_exec_prefix" | |
| 11284 | prefix="$acl_save_prefix" | |
| 11285 | ||
| 11286 | ||
| 11287 | # Check whether --with-libiconv-prefix was given. | |
| 11288 | if test ${with_libiconv_prefix+y} | |
| 11289 | then : | |
| 11290 | withval=$with_libiconv_prefix; | |
| 11291 | if test "X$withval" = "Xno"; then | |
| 11292 | use_additional=no | |
| 11293 | else | |
| 11294 | if test "X$withval" = "X"; then | |
| 11295 | ||
| 11296 | acl_save_prefix="$prefix" | |
| 11297 | prefix="$acl_final_prefix" | |
| 11298 | acl_save_exec_prefix="$exec_prefix" | |
| 11299 | exec_prefix="$acl_final_exec_prefix" | |
| 11300 | ||
| 11301 | eval additional_includedir=\"$includedir\" | |
| 11302 | eval additional_libdir=\"$libdir\" | |
| 11303 | eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" | |
| 11304 | eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" | |
| 11305 | ||
| 11306 | exec_prefix="$acl_save_exec_prefix" | |
| 11307 | prefix="$acl_save_prefix" | |
| 11308 | ||
| 11309 | else | |
| 11310 | additional_includedir="$withval/include" | |
| 11311 | additional_libdir="$withval/$acl_libdirstem" | |
| 11312 | additional_libdir2="$withval/$acl_libdirstem2" | |
| 11313 | additional_libdir3="$withval/$acl_libdirstem3" | |
| 11314 | fi | |
| 11315 | fi | |
| 11316 | ||
| 11317 | fi | |
| 11318 | ||
| 11319 | if test "X$additional_libdir2" = "X$additional_libdir"; then | |
| 11320 | additional_libdir2= | |
| 11321 | fi | |
| 11322 | if test "X$additional_libdir3" = "X$additional_libdir"; then | |
| 11323 | additional_libdir3= | |
| 11324 | fi | |
| 11325 | LIBICONV= | |
| 11326 | LTLIBICONV= | |
| 11327 | INCICONV= | |
| 11328 | LIBICONV_PREFIX= | |
| 11329 | HAVE_LIBICONV= | |
| 11330 | rpathdirs= | |
| 11331 | ltrpathdirs= | |
| 11332 | names_already_handled= | |
| 11333 | names_next_round='iconv ' | |
| 11334 | while test -n "$names_next_round"; do | |
| 11335 | names_this_round="$names_next_round" | |
| 11336 | names_next_round= | |
| 11337 | for name in $names_this_round; do | |
| 11338 | already_handled= | |
| 11339 | for n in $names_already_handled; do | |
| 11340 | if test "$n" = "$name"; then | |
| 11341 | already_handled=yes | |
| 11342 | break | |
| 11343 | fi | |
| 11344 | done | |
| 11345 | if test -z "$already_handled"; then | |
| 11346 | names_already_handled="$names_already_handled $name" | |
| 11347 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` | |
| 11348 | eval value=\"\$HAVE_LIB$uppername\" | |
| 11349 | if test -n "$value"; then | |
| 11350 | if test "$value" = yes; then | |
| 11351 | eval value=\"\$LIB$uppername\" | |
| 11352 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" | |
| 11353 | eval value=\"\$LTLIB$uppername\" | |
| 11354 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" | |
| 11355 | else | |
| 11356 | : | |
| 11357 | fi | |
| 11358 | else | |
| 11359 | found_dir= | |
| 11360 | found_la= | |
| 11361 | found_so= | |
| 11362 | found_a= | |
| 11363 | eval libname=\"$acl_libname_spec\" # typically: libname=lib$name | |
| 11364 | if test -n "$acl_shlibext"; then | |
| 11365 | shrext=".$acl_shlibext" # typically: shrext=.so | |
| 11366 | else | |
| 11367 | shrext= | |
| 11368 | fi | |
| 11369 | if test $use_additional = yes; then | |
| 11370 | for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do | |
| 11371 | if test "X$found_dir" = "X"; then | |
| 11372 | eval dir=\$$additional_libdir_variable | |
| 11373 | if test -n "$dir"; then | |
| 11374 | if test -n "$acl_shlibext"; then | |
| 11375 | if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then | |
| 11376 | found_dir="$dir" | |
| 11377 | found_so="$dir/$libname$shrext" | |
| 11378 | else | |
| 11379 | if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then | |
| 11380 | ver=`(cd "$dir" && \ | |
| 11381 | for f in "$libname$shrext".*; do echo "$f"; done \ | |
| 11382 | | sed -e "s,^$libname$shrext\\\\.,," \ | |
| 11383 | | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | |
| 11384 | | sed 1q ) 2>/dev/null` | |
| 11385 | if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then | |
| 11386 | found_dir="$dir" | |
| 11387 | found_so="$dir/$libname$shrext.$ver" | |
| 11388 | fi | |
| 11389 | else | |
| 11390 | eval library_names=\"$acl_library_names_spec\" | |
| 11391 | for f in $library_names; do | |
| 11392 | if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then | |
| 11393 | found_dir="$dir" | |
| 11394 | found_so="$dir/$f" | |
| 11395 | break | |
| 11396 | fi | |
| 11397 | done | |
| 11398 | fi | |
| 11399 | fi | |
| 11400 | fi | |
| 11401 | if test "X$found_dir" = "X"; then | |
| 11402 | if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then | |
| 11403 | found_dir="$dir" | |
| 11404 | found_a="$dir/$libname.$acl_libext" | |
| 11405 | fi | |
| 11406 | fi | |
| 11407 | if test "X$found_dir" != "X"; then | |
| 11408 | if test -f "$dir/$libname.la"; then | |
| 11409 | found_la="$dir/$libname.la" | |
| 11410 | fi | |
| 11411 | fi | |
| 11412 | fi | |
| 11413 | fi | |
| 11414 | done | |
| 11415 | fi | |
| 11416 | if test "X$found_dir" = "X"; then | |
| 11417 | for x in $LDFLAGS $LTLIBICONV; do | |
| 11418 | ||
| 11419 | acl_save_prefix="$prefix" | |
| 11420 | prefix="$acl_final_prefix" | |
| 11421 | acl_save_exec_prefix="$exec_prefix" | |
| 11422 | exec_prefix="$acl_final_exec_prefix" | |
| 11423 | eval x=\"$x\" | |
| 11424 | exec_prefix="$acl_save_exec_prefix" | |
| 11425 | prefix="$acl_save_prefix" | |
| 11426 | ||
| 11427 | case "$x" in | |
| 11428 | -L*) | |
| 11429 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
| 11430 | if test -n "$acl_shlibext"; then | |
| 11431 | if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then | |
| 11432 | found_dir="$dir" | |
| 11433 | found_so="$dir/$libname$shrext" | |
| 11434 | else | |
| 11435 | if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then | |
| 11436 | ver=`(cd "$dir" && \ | |
| 11437 | for f in "$libname$shrext".*; do echo "$f"; done \ | |
| 11438 | | sed -e "s,^$libname$shrext\\\\.,," \ | |
| 11439 | | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | |
| 11440 | | sed 1q ) 2>/dev/null` | |
| 11441 | if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then | |
| 11442 | found_dir="$dir" | |
| 11443 | found_so="$dir/$libname$shrext.$ver" | |
| 11444 | fi | |
| 11445 | else | |
| 11446 | eval library_names=\"$acl_library_names_spec\" | |
| 11447 | for f in $library_names; do | |
| 11448 | if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then | |
| 11449 | found_dir="$dir" | |
| 11450 | found_so="$dir/$f" | |
| 11451 | break | |
| 11452 | fi | |
| 11453 | done | |
| 11454 | fi | |
| 11455 | fi | |
| 11456 | fi | |
| 11457 | if test "X$found_dir" = "X"; then | |
| 11458 | if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then | |
| 11459 | found_dir="$dir" | |
| 11460 | found_a="$dir/$libname.$acl_libext" | |
| 11461 | fi | |
| 11462 | fi | |
| 11463 | if test "X$found_dir" != "X"; then | |
| 11464 | if test -f "$dir/$libname.la"; then | |
| 11465 | found_la="$dir/$libname.la" | |
| 11466 | fi | |
| 11467 | fi | |
| 11468 | ;; | |
| 11469 | esac | |
| 11470 | if test "X$found_dir" != "X"; then | |
| 11471 | break | |
| 11472 | fi | |
| 11473 | done | |
| 11474 | fi | |
| 11475 | if test "X$found_dir" != "X"; then | |
| 11476 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" | |
| 11477 | if test "X$found_so" != "X"; then | |
| 11478 | if test "$enable_rpath" = no \ | |
| 11479 | || test "X$found_dir" = "X/usr/$acl_libdirstem" \ | |
| 11480 | || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ | |
| 11481 | || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then | |
| 11482 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
| 11483 | else | |
| 11484 | haveit= | |
| 11485 | for x in $ltrpathdirs; do | |
| 11486 | if test "X$x" = "X$found_dir"; then | |
| 11487 | haveit=yes | |
| 11488 | break | |
| 11489 | fi | |
| 11490 | done | |
| 11491 | if test -z "$haveit"; then | |
| 11492 | ltrpathdirs="$ltrpathdirs $found_dir" | |
| 11493 | fi | |
| 11494 | if test "$acl_hardcode_direct" = yes; then | |
| 11495 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
| 11496 | else | |
| 11497 | if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then | |
| 11498 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
| 11499 | haveit= | |
| 11500 | for x in $rpathdirs; do | |
| 11501 | if test "X$x" = "X$found_dir"; then | |
| 11502 | haveit=yes | |
| 11503 | break | |
| 11504 | fi | |
| 11505 | done | |
| 11506 | if test -z "$haveit"; then | |
| 11507 | rpathdirs="$rpathdirs $found_dir" | |
| 11508 | fi | |
| 11509 | else | |
| 11510 | haveit= | |
| 11511 | for x in $LDFLAGS $LIBICONV; do | |
| 11512 | ||
| 11513 | acl_save_prefix="$prefix" | |
| 11514 | prefix="$acl_final_prefix" | |
| 11515 | acl_save_exec_prefix="$exec_prefix" | |
| 11516 | exec_prefix="$acl_final_exec_prefix" | |
| 11517 | eval x=\"$x\" | |
| 11518 | exec_prefix="$acl_save_exec_prefix" | |
| 11519 | prefix="$acl_save_prefix" | |
| 11520 | ||
| 11521 | if test "X$x" = "X-L$found_dir"; then | |
| 11522 | haveit=yes | |
| 11523 | break | |
| 11524 | fi | |
| 11525 | done | |
| 11526 | if test -z "$haveit"; then | |
| 11527 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" | |
| 11528 | fi | |
| 11529 | if test "$acl_hardcode_minus_L" != no; then | |
| 11530 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" | |
| 11531 | else | |
| 11532 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
| 11533 | fi | |
| 11534 | fi | |
| 11535 | fi | |
| 11536 | fi | |
| 11537 | else | |
| 11538 | if test "X$found_a" != "X"; then | |
| 11539 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" | |
| 11540 | else | |
| 11541 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" | |
| 11542 | fi | |
| 11543 | fi | |
| 11544 | additional_includedir= | |
| 11545 | case "$found_dir" in | |
| 11546 | */$acl_libdirstem | */$acl_libdirstem/) | |
| 11547 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` | |
| 11548 | if test "$name" = 'iconv'; then | |
| 11549 | LIBICONV_PREFIX="$basedir" | |
| 11550 | fi | |
| 11551 | additional_includedir="$basedir/include" | |
| 11552 | ;; | |
| 11553 | */$acl_libdirstem2 | */$acl_libdirstem2/) | |
| 11554 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` | |
| 11555 | if test "$name" = 'iconv'; then | |
| 11556 | LIBICONV_PREFIX="$basedir" | |
| 11557 | fi | |
| 11558 | additional_includedir="$basedir/include" | |
| 11559 | ;; | |
| 11560 | */$acl_libdirstem3 | */$acl_libdirstem3/) | |
| 11561 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` | |
| 11562 | if test "$name" = 'iconv'; then | |
| 11563 | LIBICONV_PREFIX="$basedir" | |
| 11564 | fi | |
| 11565 | additional_includedir="$basedir/include" | |
| 11566 | ;; | |
| 11567 | esac | |
| 11568 | if test "X$additional_includedir" != "X"; then | |
| 11569 | if test "X$additional_includedir" != "X/usr/include"; then | |
| 11570 | haveit= | |
| 11571 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
| 11572 | if test -n "$GCC"; then | |
| 11573 | case $host_os in | |
| 11574 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; | |
| 11575 | esac | |
| 11576 | fi | |
| 11577 | fi | |
| 11578 | if test -z "$haveit"; then | |
| 11579 | for x in $CPPFLAGS $INCICONV; do | |
| 11580 | ||
| 11581 | acl_save_prefix="$prefix" | |
| 11582 | prefix="$acl_final_prefix" | |
| 11583 | acl_save_exec_prefix="$exec_prefix" | |
| 11584 | exec_prefix="$acl_final_exec_prefix" | |
| 11585 | eval x=\"$x\" | |
| 11586 | exec_prefix="$acl_save_exec_prefix" | |
| 11587 | prefix="$acl_save_prefix" | |
| 11588 | ||
| 11589 | if test "X$x" = "X-I$additional_includedir"; then | |
| 11590 | haveit=yes | |
| 11591 | break | |
| 11592 | fi | |
| 11593 | done | |
| 11594 | if test -z "$haveit"; then | |
| 11595 | if test -d "$additional_includedir"; then | |
| 11596 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" | |
| 11597 | fi | |
| 11598 | fi | |
| 11599 | fi | |
| 11600 | fi | |
| 11601 | fi | |
| 11602 | if test -n "$found_la"; then | |
| 11603 | save_libdir="$libdir" | |
| 11604 | case "$found_la" in | |
| 11605 | */* | *\\*) . "$found_la" ;; | |
| 11606 | *) . "./$found_la" ;; | |
| 11607 | esac | |
| 11608 | libdir="$save_libdir" | |
| 11609 | for dep in $dependency_libs; do | |
| 11610 | case "$dep" in | |
| 11611 | -L*) | |
| 11612 | dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
| 11613 | if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ | |
| 11614 | && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ | |
| 11615 | && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then | |
| 11616 | haveit= | |
| 11617 | if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ | |
| 11618 | || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ | |
| 11619 | || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then | |
| 11620 | if test -n "$GCC"; then | |
| 11621 | case $host_os in | |
| 11622 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; | |
| 11623 | esac | |
| 11624 | fi | |
| 11625 | fi | |
| 11626 | if test -z "$haveit"; then | |
| 11627 | haveit= | |
| 11628 | for x in $LDFLAGS $LIBICONV; do | |
| 11629 | ||
| 11630 | acl_save_prefix="$prefix" | |
| 11631 | prefix="$acl_final_prefix" | |
| 11632 | acl_save_exec_prefix="$exec_prefix" | |
| 11633 | exec_prefix="$acl_final_exec_prefix" | |
| 11634 | eval x=\"$x\" | |
| 11635 | exec_prefix="$acl_save_exec_prefix" | |
| 11636 | prefix="$acl_save_prefix" | |
| 11637 | ||
| 11638 | if test "X$x" = "X-L$dependency_libdir"; then | |
| 11639 | haveit=yes | |
| 11640 | break | |
| 11641 | fi | |
| 11642 | done | |
| 11643 | if test -z "$haveit"; then | |
| 11644 | if test -d "$dependency_libdir"; then | |
| 11645 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$dependency_libdir" | |
| 11646 | fi | |
| 11647 | fi | |
| 11648 | haveit= | |
| 11649 | for x in $LDFLAGS $LTLIBICONV; do | |
| 11650 | ||
| 11651 | acl_save_prefix="$prefix" | |
| 11652 | prefix="$acl_final_prefix" | |
| 11653 | acl_save_exec_prefix="$exec_prefix" | |
| 11654 | exec_prefix="$acl_final_exec_prefix" | |
| 11655 | eval x=\"$x\" | |
| 11656 | exec_prefix="$acl_save_exec_prefix" | |
| 11657 | prefix="$acl_save_prefix" | |
| 11658 | ||
| 11659 | if test "X$x" = "X-L$dependency_libdir"; then | |
| 11660 | haveit=yes | |
| 11661 | break | |
| 11662 | fi | |
| 11663 | done | |
| 11664 | if test -z "$haveit"; then | |
| 11665 | if test -d "$dependency_libdir"; then | |
| 11666 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$dependency_libdir" | |
| 11667 | fi | |
| 11668 | fi | |
| 11669 | fi | |
| 11670 | fi | |
| 11671 | ;; | |
| 11672 | -R*) | |
| 11673 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
| 11674 | if test "$enable_rpath" != no; then | |
| 11675 | haveit= | |
| 11676 | for x in $rpathdirs; do | |
| 11677 | if test "X$x" = "X$dir"; then | |
| 11678 | haveit=yes | |
| 11679 | break | |
| 11680 | fi | |
| 11681 | done | |
| 11682 | if test -z "$haveit"; then | |
| 11683 | rpathdirs="$rpathdirs $dir" | |
| 11684 | fi | |
| 11685 | haveit= | |
| 11686 | for x in $ltrpathdirs; do | |
| 11687 | if test "X$x" = "X$dir"; then | |
| 11688 | haveit=yes | |
| 11689 | break | |
| 11690 | fi | |
| 11691 | done | |
| 11692 | if test -z "$haveit"; then | |
| 11693 | ltrpathdirs="$ltrpathdirs $dir" | |
| 11694 | fi | |
| 11695 | fi | |
| 11696 | ;; | |
| 11697 | -l*) | |
| 11698 | dep=`echo "X$dep" | sed -e 's/^X-l//'` | |
| 11699 | if test "X$dep" != Xc \ | |
| 11700 | || case $host_os in | |
| 11701 | linux* | gnu* | k*bsd*-gnu) false ;; | |
| 11702 | *) true ;; | |
| 11703 | esac; then | |
| 11704 | names_next_round="$names_next_round $dep" | |
| 11705 | fi | |
| 11706 | ;; | |
| 11707 | *.la) | |
| 11708 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
| 11709 | ;; | |
| 11710 | *) | |
| 11711 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" | |
| 11712 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" | |
| 11713 | ;; | |
| 11714 | esac | |
| 11715 | done | |
| 11716 | fi | |
| 11717 | else | |
| 11718 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" | |
| 11719 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" | |
| 11720 | fi | |
| 11721 | fi | |
| 11722 | fi | |
| 11723 | done | |
| 11724 | done | |
| 11725 | if test "X$rpathdirs" != "X"; then | |
| 11726 | if test -n "$acl_hardcode_libdir_separator"; then | |
| 11727 | alldirs= | |
| 11728 | for found_dir in $rpathdirs; do | |
| 11729 | alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" | |
| 11730 | done | |
| 11731 | acl_save_libdir="$libdir" | |
| 11732 | libdir="$alldirs" | |
| 11733 | eval flag=\"$acl_hardcode_libdir_flag_spec\" | |
| 11734 | libdir="$acl_save_libdir" | |
| 11735 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
| 11736 | else | |
| 11737 | for found_dir in $rpathdirs; do | |
| 11738 | acl_save_libdir="$libdir" | |
| 11739 | libdir="$found_dir" | |
| 11740 | eval flag=\"$acl_hardcode_libdir_flag_spec\" | |
| 11741 | libdir="$acl_save_libdir" | |
| 11742 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" | |
| 11743 | done | |
| 11744 | fi | |
| 11745 | fi | |
| 11746 | if test "X$ltrpathdirs" != "X"; then | |
| 11747 | for found_dir in $ltrpathdirs; do | |
| 11748 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" | |
| 11749 | done | |
| 11750 | fi | |
| 11751 | ||
| 11752 | ||
| 11753 | ||
| 11754 | ||
| 11755 | ||
| 11756 | ||
| 11757 | ||
| 11758 | ||
| 11759 | ||
| 11760 | ||
| 11761 | ||
| 11762 | am_save_CPPFLAGS="$CPPFLAGS" | |
| 11763 | ||
| 11764 | for element in $INCICONV; do | |
| 11765 | haveit= | |
| 11766 | for x in $CPPFLAGS; do | |
| 11767 | ||
| 11768 | acl_save_prefix="$prefix" | |
| 11769 | prefix="$acl_final_prefix" | |
| 11770 | acl_save_exec_prefix="$exec_prefix" | |
| 11771 | exec_prefix="$acl_final_exec_prefix" | |
| 11772 | eval x=\"$x\" | |
| 11773 | exec_prefix="$acl_save_exec_prefix" | |
| 11774 | prefix="$acl_save_prefix" | |
| 11775 | ||
| 11776 | if test "X$x" = "X$element"; then | |
| 11777 | haveit=yes | |
| 11778 | break | |
| 11779 | fi | |
| 11780 | done | |
| 11781 | if test -z "$haveit"; then | |
| 11782 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
| 11783 | fi | |
| 11784 | done | |
| 11785 | ||
| 11786 | ||
| 11787 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 | |
| 11788 | printf %s "checking for iconv... " >&6; } | |
| 11789 | if test ${am_cv_func_iconv+y} | |
| 11790 | then : | |
| 11791 | printf %s "(cached) " >&6 | |
| 11792 | else case e in #( | |
| 11793 | e) | |
| 11794 | am_cv_func_iconv="no, consider installing GNU libiconv" | |
| 11795 | am_cv_lib_iconv=no | |
| 11796 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 11797 | /* end confdefs.h. */ | |
| 11798 | ||
| 11799 | #include <stdlib.h> | |
| 11800 | #include <iconv.h> | |
| 11801 | ||
| 11802 | int | |
| 11803 | main (void) | |
| 11804 | { | |
| 11805 | iconv_t cd = iconv_open("",""); | |
| 11806 | iconv(cd,NULL,NULL,NULL,NULL); | |
| 11807 | iconv_close(cd); | |
| 11808 | ; | |
| 11809 | return 0; | |
| 11810 | } | |
| 11811 | _ACEOF | |
| 11812 | if ac_fn_c_try_link "$LINENO" | |
| 11813 | then : | |
| 11814 | am_cv_func_iconv=yes | |
| 11815 | fi | |
| 11816 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 11817 | conftest$ac_exeext conftest.$ac_ext | |
| 11818 | if test "$am_cv_func_iconv" != yes; then | |
| 11819 | am_save_LIBS="$LIBS" | |
| 11820 | LIBS="$LIBS $LIBICONV" | |
| 11821 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 11822 | /* end confdefs.h. */ | |
| 11823 | ||
| 11824 | #include <stdlib.h> | |
| 11825 | #include <iconv.h> | |
| 11826 | ||
| 11827 | int | |
| 11828 | main (void) | |
| 11829 | { | |
| 11830 | iconv_t cd = iconv_open("",""); | |
| 11831 | iconv(cd,NULL,NULL,NULL,NULL); | |
| 11832 | iconv_close(cd); | |
| 11833 | ; | |
| 11834 | return 0; | |
| 11835 | } | |
| 11836 | _ACEOF | |
| 11837 | if ac_fn_c_try_link "$LINENO" | |
| 11838 | then : | |
| 11839 | am_cv_lib_iconv=yes | |
| 11840 | am_cv_func_iconv=yes | |
| 11841 | fi | |
| 11842 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 11843 | conftest$ac_exeext conftest.$ac_ext | |
| 11844 | LIBS="$am_save_LIBS" | |
| 11845 | fi | |
| 11846 | ;; | |
| 11847 | esac | |
| 11848 | fi | |
| 11849 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 | |
| 11850 | printf "%s\n" "$am_cv_func_iconv" >&6; } | |
| 11851 | if test "$am_cv_func_iconv" = yes; then | |
| 11852 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working iconv" >&5 | |
| 11853 | printf %s "checking for working iconv... " >&6; } | |
| 11854 | if test ${am_cv_func_iconv_works+y} | |
| 11855 | then : | |
| 11856 | printf %s "(cached) " >&6 | |
| 11857 | else case e in #( | |
| 11858 | e) | |
| 11859 | am_save_LIBS="$LIBS" | |
| 11860 | if test $am_cv_lib_iconv = yes; then | |
| 11861 | LIBS="$LIBS $LIBICONV" | |
| 11862 | fi | |
| 11863 | am_cv_func_iconv_works=no | |
| 11864 | for ac_iconv_const in '' 'const'; do | |
| 11865 | if test "$cross_compiling" = yes | |
| 11866 | then : | |
| 11867 | case "$host_os" in | |
| 11868 | aix* | hpux*) am_cv_func_iconv_works="guessing no" ;; | |
| 11869 | *) am_cv_func_iconv_works="guessing yes" ;; | |
| 11870 | esac | |
| 11871 | else case e in #( | |
| 11872 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 11873 | /* end confdefs.h. */ | |
| 11874 | ||
| 11875 | #include <iconv.h> | |
| 11876 | #include <string.h> | |
| 11877 | ||
| 11878 | #ifndef ICONV_CONST | |
| 11879 | # define ICONV_CONST $ac_iconv_const | |
| 11880 | #endif | |
| 11881 | ||
| 11882 | int | |
| 11883 | main (void) | |
| 11884 | { | |
| 11885 | int result = 0; | |
| 11886 | /* Test against AIX 5.1...7.2 bug: Failures are not distinguishable from | |
| 11887 | successful returns. This is even documented in | |
| 11888 | <https://www.ibm.com/support/knowledgecenter/ssw_aix_72/i_bostechref/iconv.html> */ | |
| 11889 | { | |
| 11890 | iconv_t cd_utf8_to_88591 = iconv_open ("ISO8859-1", "UTF-8"); | |
| 11891 | if (cd_utf8_to_88591 != (iconv_t)(-1)) | |
| 11892 | { | |
| 11893 | static ICONV_CONST char input[] = "\342\202\254"; /* EURO SIGN */ | |
| 11894 | char buf[10]; | |
| 11895 | ICONV_CONST char *inptr = input; | |
| 11896 | size_t inbytesleft = strlen (input); | |
| 11897 | char *outptr = buf; | |
| 11898 | size_t outbytesleft = sizeof (buf); | |
| 11899 | size_t res = iconv (cd_utf8_to_88591, | |
| 11900 | &inptr, &inbytesleft, | |
| 11901 | &outptr, &outbytesleft); | |
| 11902 | if (res == 0) | |
| 11903 | result |= 1; | |
| 11904 | iconv_close (cd_utf8_to_88591); | |
| 11905 | } | |
| 11906 | } | |
| 11907 | /* Test against Solaris 10 bug: Failures are not distinguishable from | |
| 11908 | successful returns. */ | |
| 11909 | { | |
| 11910 | iconv_t cd_ascii_to_88591 = iconv_open ("ISO8859-1", "646"); | |
| 11911 | if (cd_ascii_to_88591 != (iconv_t)(-1)) | |
| 11912 | { | |
| 11913 | static ICONV_CONST char input[] = "\263"; | |
| 11914 | char buf[10]; | |
| 11915 | ICONV_CONST char *inptr = input; | |
| 11916 | size_t inbytesleft = strlen (input); | |
| 11917 | char *outptr = buf; | |
| 11918 | size_t outbytesleft = sizeof (buf); | |
| 11919 | size_t res = iconv (cd_ascii_to_88591, | |
| 11920 | &inptr, &inbytesleft, | |
| 11921 | &outptr, &outbytesleft); | |
| 11922 | if (res == 0) | |
| 11923 | result |= 2; | |
| 11924 | iconv_close (cd_ascii_to_88591); | |
| 11925 | } | |
| 11926 | } | |
| 11927 | /* Test against AIX 6.1..7.1 bug: Buffer overrun. */ | |
| 11928 | { | |
| 11929 | iconv_t cd_88591_to_utf8 = iconv_open ("UTF-8", "ISO-8859-1"); | |
| 11930 | if (cd_88591_to_utf8 != (iconv_t)(-1)) | |
| 11931 | { | |
| 11932 | static ICONV_CONST char input[] = "\304"; | |
| 11933 | static char buf[2] = { (char)0xDE, (char)0xAD }; | |
| 11934 | ICONV_CONST char *inptr = input; | |
| 11935 | size_t inbytesleft = 1; | |
| 11936 | char *outptr = buf; | |
| 11937 | size_t outbytesleft = 1; | |
| 11938 | size_t res = iconv (cd_88591_to_utf8, | |
| 11939 | &inptr, &inbytesleft, | |
| 11940 | &outptr, &outbytesleft); | |
| 11941 | if (res != (size_t)(-1) || outptr - buf > 1 || buf[1] != (char)0xAD) | |
| 11942 | result |= 4; | |
| 11943 | iconv_close (cd_88591_to_utf8); | |
| 11944 | } | |
| 11945 | } | |
| 11946 | #if 0 /* This bug could be worked around by the caller. */ | |
| 11947 | /* Test against HP-UX 11.11 bug: Positive return value instead of 0. */ | |
| 11948 | { | |
| 11949 | iconv_t cd_88591_to_utf8 = iconv_open ("utf8", "iso88591"); | |
| 11950 | if (cd_88591_to_utf8 != (iconv_t)(-1)) | |
| 11951 | { | |
| 11952 | static ICONV_CONST char input[] = "\304rger mit b\366sen B\374bchen ohne Augenma\337"; | |
| 11953 | char buf[50]; | |
| 11954 | ICONV_CONST char *inptr = input; | |
| 11955 | size_t inbytesleft = strlen (input); | |
| 11956 | char *outptr = buf; | |
| 11957 | size_t outbytesleft = sizeof (buf); | |
| 11958 | size_t res = iconv (cd_88591_to_utf8, | |
| 11959 | &inptr, &inbytesleft, | |
| 11960 | &outptr, &outbytesleft); | |
| 11961 | if ((int)res > 0) | |
| 11962 | result |= 8; | |
| 11963 | iconv_close (cd_88591_to_utf8); | |
| 11964 | } | |
| 11965 | } | |
| 11966 | #endif | |
| 11967 | /* Test against HP-UX 11.11 bug: No converter from EUC-JP to UTF-8 is | |
| 11968 | provided. */ | |
| 11969 | { | |
| 11970 | /* Try standardized names. */ | |
| 11971 | iconv_t cd1 = iconv_open ("UTF-8", "EUC-JP"); | |
| 11972 | /* Try IRIX, OSF/1 names. */ | |
| 11973 | iconv_t cd2 = iconv_open ("UTF-8", "eucJP"); | |
| 11974 | /* Try AIX names. */ | |
| 11975 | iconv_t cd3 = iconv_open ("UTF-8", "IBM-eucJP"); | |
| 11976 | /* Try HP-UX names. */ | |
| 11977 | iconv_t cd4 = iconv_open ("utf8", "eucJP"); | |
| 11978 | if (cd1 == (iconv_t)(-1) && cd2 == (iconv_t)(-1) | |
| 11979 | && cd3 == (iconv_t)(-1) && cd4 == (iconv_t)(-1)) | |
| 11980 | result |= 16; | |
| 11981 | if (cd1 != (iconv_t)(-1)) | |
| 11982 | iconv_close (cd1); | |
| 11983 | if (cd2 != (iconv_t)(-1)) | |
| 11984 | iconv_close (cd2); | |
| 11985 | if (cd3 != (iconv_t)(-1)) | |
| 11986 | iconv_close (cd3); | |
| 11987 | if (cd4 != (iconv_t)(-1)) | |
| 11988 | iconv_close (cd4); | |
| 11989 | } | |
| 11990 | return result; | |
| 11991 | ||
| 11992 | ; | |
| 11993 | return 0; | |
| 11994 | } | |
| 11995 | _ACEOF | |
| 11996 | if ac_fn_c_try_run "$LINENO" | |
| 11997 | then : | |
| 11998 | am_cv_func_iconv_works=yes | |
| 11999 | fi | |
| 12000 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 12001 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 12002 | esac | |
| 12003 | fi | |
| 12004 | ||
| 12005 | test "$am_cv_func_iconv_works" = no || break | |
| 12006 | done | |
| 12007 | LIBS="$am_save_LIBS" | |
| 12008 | ;; | |
| 12009 | esac | |
| 12010 | fi | |
| 12011 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv_works" >&5 | |
| 12012 | printf "%s\n" "$am_cv_func_iconv_works" >&6; } | |
| 12013 | case "$am_cv_func_iconv_works" in | |
| 12014 | *no) am_func_iconv=no am_cv_lib_iconv=no ;; | |
| 12015 | *) am_func_iconv=yes ;; | |
| 12016 | esac | |
| 12017 | else | |
| 12018 | am_func_iconv=no am_cv_lib_iconv=no | |
| 12019 | fi | |
| 12020 | if test "$am_func_iconv" = yes; then | |
| 12021 | ||
| 12022 | printf "%s\n" "#define HAVE_ICONV 1" >>confdefs.h | |
| 12023 | ||
| 12024 | fi | |
| 12025 | if test "$am_cv_lib_iconv" = yes; then | |
| 12026 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 | |
| 12027 | printf %s "checking how to link with libiconv... " >&6; } | |
| 12028 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 | |
| 12029 | printf "%s\n" "$LIBICONV" >&6; } | |
| 12030 | else | |
| 12031 | CPPFLAGS="$am_save_CPPFLAGS" | |
| 12032 | LIBICONV= | |
| 12033 | LTLIBICONV= | |
| 12034 | fi | |
| 12035 | ||
| 12036 | ||
| 12037 | ||
| 12038 | if test "$am_cv_func_iconv" = yes; then | |
| 12039 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether iconv is compatible with its POSIX signature" >&5 | |
| 12040 | printf %s "checking whether iconv is compatible with its POSIX signature... " >&6; } | |
| 12041 | if test ${gl_cv_iconv_nonconst+y} | |
| 12042 | then : | |
| 12043 | printf %s "(cached) " >&6 | |
| 12044 | else case e in #( | |
| 12045 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 12046 | /* end confdefs.h. */ | |
| 12047 | ||
| 12048 | #include <stdlib.h> | |
| 12049 | #include <iconv.h> | |
| 12050 | extern | |
| 12051 | #ifdef __cplusplus | |
| 12052 | "C" | |
| 12053 | #endif | |
| 12054 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); | |
| 12055 | ||
| 12056 | int | |
| 12057 | main (void) | |
| 12058 | { | |
| 12059 | ||
| 12060 | ; | |
| 12061 | return 0; | |
| 12062 | } | |
| 12063 | _ACEOF | |
| 12064 | if ac_fn_c_try_compile "$LINENO" | |
| 12065 | then : | |
| 12066 | gl_cv_iconv_nonconst=yes | |
| 12067 | else case e in #( | |
| 12068 | e) gl_cv_iconv_nonconst=no ;; | |
| 12069 | esac | |
| 12070 | fi | |
| 12071 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 12072 | ;; | |
| 12073 | esac | |
| 12074 | fi | |
| 12075 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_iconv_nonconst" >&5 | |
| 12076 | printf "%s\n" "$gl_cv_iconv_nonconst" >&6; } | |
| 12077 | else | |
| 12078 | gl_cv_iconv_nonconst=yes | |
| 12079 | fi | |
| 12080 | if test $gl_cv_iconv_nonconst = yes; then | |
| 12081 | iconv_arg1="" | |
| 12082 | else | |
| 12083 | iconv_arg1="const" | |
| 12084 | fi | |
| 12085 | ||
| 12086 | printf "%s\n" "#define ICONV_CONST $iconv_arg1" >>confdefs.h | |
| 12087 | ||
| 12088 | ||
| 12089 | ||
| 12090 | ||
| 12091 | ||
| 12092 | ||
| 12093 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 12094 | /* end confdefs.h. */ | |
| 12095 | int foo (int a) { a = __builtin_expect (a, 10); return a == 10 ? 0 : 1; } | |
| 12096 | int | |
| 12097 | main (void) | |
| 12098 | { | |
| 12099 | ||
| 12100 | ; | |
| 12101 | return 0; | |
| 12102 | } | |
| 12103 | _ACEOF | |
| 12104 | if ac_fn_c_try_link "$LINENO" | |
| 12105 | then : | |
| 12106 | ||
| 12107 | printf "%s\n" "#define HAVE_BUILTIN_EXPECT 1" >>confdefs.h | |
| 12108 | ||
| 12109 | fi | |
| 12110 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 12111 | conftest$ac_exeext conftest.$ac_ext | |
| 12112 | ||
| 12113 | ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" | |
| 12114 | if test "x$ac_cv_header_inttypes_h" = xyes | |
| 12115 | then : | |
| 12116 | printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h | |
| 12117 | ||
| 12118 | fi | |
| 12119 | ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" | |
| 12120 | if test "x$ac_cv_header_unistd_h" = xyes | |
| 12121 | then : | |
| 12122 | printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h | |
| 12123 | ||
| 12124 | fi | |
| 12125 | ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" | |
| 12126 | if test "x$ac_cv_header_sys_param_h" = xyes | |
| 12127 | then : | |
| 12128 | printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h | |
| 12129 | ||
| 12130 | fi | |
| 12131 | ||
| 12132 | ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" | |
| 12133 | if test "x$ac_cv_func_getcwd" = xyes | |
| 12134 | then : | |
| 12135 | printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h | |
| 12136 | ||
| 12137 | fi | |
| 12138 | ac_fn_c_check_func "$LINENO" "getegid" "ac_cv_func_getegid" | |
| 12139 | if test "x$ac_cv_func_getegid" = xyes | |
| 12140 | then : | |
| 12141 | printf "%s\n" "#define HAVE_GETEGID 1" >>confdefs.h | |
| 12142 | ||
| 12143 | fi | |
| 12144 | ac_fn_c_check_func "$LINENO" "geteuid" "ac_cv_func_geteuid" | |
| 12145 | if test "x$ac_cv_func_geteuid" = xyes | |
| 12146 | then : | |
| 12147 | printf "%s\n" "#define HAVE_GETEUID 1" >>confdefs.h | |
| 12148 | ||
| 12149 | fi | |
| 12150 | ac_fn_c_check_func "$LINENO" "getgid" "ac_cv_func_getgid" | |
| 12151 | if test "x$ac_cv_func_getgid" = xyes | |
| 12152 | then : | |
| 12153 | printf "%s\n" "#define HAVE_GETGID 1" >>confdefs.h | |
| 12154 | ||
| 12155 | fi | |
| 12156 | ac_fn_c_check_func "$LINENO" "getuid" "ac_cv_func_getuid" | |
| 12157 | if test "x$ac_cv_func_getuid" = xyes | |
| 12158 | then : | |
| 12159 | printf "%s\n" "#define HAVE_GETUID 1" >>confdefs.h | |
| 12160 | ||
| 12161 | fi | |
| 12162 | ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy" | |
| 12163 | if test "x$ac_cv_func_mempcpy" = xyes | |
| 12164 | then : | |
| 12165 | printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h | |
| 12166 | ||
| 12167 | fi | |
| 12168 | ac_fn_c_check_func "$LINENO" "munmap" "ac_cv_func_munmap" | |
| 12169 | if test "x$ac_cv_func_munmap" = xyes | |
| 12170 | then : | |
| 12171 | printf "%s\n" "#define HAVE_MUNMAP 1" >>confdefs.h | |
| 12172 | ||
| 12173 | fi | |
| 12174 | ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy" | |
| 12175 | if test "x$ac_cv_func_stpcpy" = xyes | |
| 12176 | then : | |
| 12177 | printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h | |
| 12178 | ||
| 12179 | fi | |
| 12180 | ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" | |
| 12181 | if test "x$ac_cv_func_strcasecmp" = xyes | |
| 12182 | then : | |
| 12183 | printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h | |
| 12184 | ||
| 12185 | fi | |
| 12186 | ac_fn_c_check_func "$LINENO" "tsearch" "ac_cv_func_tsearch" | |
| 12187 | if test "x$ac_cv_func_tsearch" = xyes | |
| 12188 | then : | |
| 12189 | printf "%s\n" "#define HAVE_TSEARCH 1" >>confdefs.h | |
| 12190 | ||
| 12191 | fi | |
| 12192 | ac_fn_c_check_func "$LINENO" "__fsetlocking" "ac_cv_func___fsetlocking" | |
| 12193 | if test "x$ac_cv_func___fsetlocking" = xyes | |
| 12194 | then : | |
| 12195 | printf "%s\n" "#define HAVE___FSETLOCKING 1" >>confdefs.h | |
| 12196 | ||
| 12197 | fi | |
| 12198 | ||
| 12199 | ||
| 12200 | ac_fn_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "#include <stdio.h> | |
| 12201 | " "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 12202 | if test "x$ac_cv_have_decl_feof_unlocked" = xyes | |
| 12203 | then : | |
| 12204 | ac_have_decl=1 | |
| 12205 | else case e in #( | |
| 12206 | e) ac_have_decl=0 ;; | |
| 12207 | esac | |
| 12208 | fi | |
| 12209 | printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h | |
| 12210 | ac_fn_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "#include <stdio.h> | |
| 12211 | " "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 12212 | if test "x$ac_cv_have_decl_fgets_unlocked" = xyes | |
| 12213 | then : | |
| 12214 | ac_have_decl=1 | |
| 12215 | else case e in #( | |
| 12216 | e) ac_have_decl=0 ;; | |
| 12217 | esac | |
| 12218 | fi | |
| 12219 | printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h | |
| 12220 | ||
| 12221 | ||
| 12222 | ||
| 12223 | ||
| 12224 | ac_fn_c_check_func "$LINENO" "localeconv" "ac_cv_func_localeconv" | |
| 12225 | if test "x$ac_cv_func_localeconv" = xyes | |
| 12226 | then : | |
| 12227 | printf "%s\n" "#define HAVE_LOCALECONV 1" >>confdefs.h | |
| 12228 | ||
| 12229 | fi | |
| 12230 | ||
| 12231 | ||
| 12232 | ||
| 12233 | for ac_prog in bison | |
| 12234 | do | |
| 12235 | # Extract the first word of "$ac_prog", so it can be a program name with args. | |
| 12236 | set dummy $ac_prog; ac_word=$2 | |
| 12237 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 12238 | printf %s "checking for $ac_word... " >&6; } | |
| 12239 | if test ${ac_cv_prog_INTLBISON+y} | |
| 12240 | then : | |
| 12241 | printf %s "(cached) " >&6 | |
| 12242 | else case e in #( | |
| 12243 | e) if test -n "$INTLBISON"; then | |
| 12244 | ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test. | |
| 12245 | else | |
| 12246 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 12247 | for as_dir in $PATH | |
| 12248 | do | |
| 12249 | IFS=$as_save_IFS | |
| 12250 | case $as_dir in #((( | |
| 12251 | '') as_dir=./ ;; | |
| 12252 | */) ;; | |
| 12253 | *) as_dir=$as_dir/ ;; | |
| 12254 | esac | |
| 12255 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 12256 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 12257 | ac_cv_prog_INTLBISON="$ac_prog" | |
| 12258 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 12259 | break 2 | |
| 12260 | fi | |
| 12261 | done | |
| 12262 | done | |
| 12263 | IFS=$as_save_IFS | |
| 12264 | ||
| 12265 | fi ;; | |
| 12266 | esac | |
| 12267 | fi | |
| 12268 | INTLBISON=$ac_cv_prog_INTLBISON | |
| 12269 | if test -n "$INTLBISON"; then | |
| 12270 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $INTLBISON" >&5 | |
| 12271 | printf "%s\n" "$INTLBISON" >&6; } | |
| 12272 | else | |
| 12273 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 12274 | printf "%s\n" "no" >&6; } | |
| 12275 | fi | |
| 12276 | ||
| 12277 | ||
| 12278 | test -n "$INTLBISON" && break | |
| 12279 | done | |
| 12280 | ||
| 12281 | if test -z "$INTLBISON"; then | |
| 12282 | ac_verc_fail=yes | |
| 12283 | else | |
| 12284 | cat >conftest.y <<_ACEOF | |
| 12285 | %require "3.0" | |
| 12286 | %% | |
| 12287 | exp: | |
| 12288 | _ACEOF | |
| 12289 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for bison 3.0 or newer" >&5 | |
| 12290 | printf %s "checking for bison 3.0 or newer... " >&6; } | |
| 12291 | ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'` | |
| 12292 | : ${ac_prog_version:='v. ?.??'} | |
| 12293 | if $INTLBISON conftest.y -o conftest.c 2>/dev/null; then | |
| 12294 | ac_prog_version="$ac_prog_version, ok" | |
| 12295 | ac_verc_fail=no | |
| 12296 | else | |
| 12297 | ac_prog_version="$ac_prog_version, bad" | |
| 12298 | ac_verc_fail=yes | |
| 12299 | fi | |
| 12300 | rm -f conftest.y conftest.c | |
| 12301 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_prog_version" >&5 | |
| 12302 | printf "%s\n" "$ac_prog_version" >&6; } | |
| 12303 | fi | |
| 12304 | if test $ac_verc_fail = yes; then | |
| 12305 | INTLBISON=: | |
| 12306 | fi | |
| 12307 | ||
| 12308 | ||
| 12309 | ||
| 12310 | ||
| 12311 | ||
| 12312 | ||
| 12313 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 | |
| 12314 | printf %s "checking for long long int... " >&6; } | |
| 12315 | if test ${ac_cv_type_long_long_int+y} | |
| 12316 | then : | |
| 12317 | printf %s "(cached) " >&6 | |
| 12318 | else case e in #( | |
| 12319 | e) ac_cv_type_long_long_int=yes | |
| 12320 | case $ac_prog_cc_stdc in | |
| 12321 | no | c89) ;; | |
| 12322 | *) | |
| 12323 | ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int | |
| 12324 | if test $ac_cv_type_long_long_int = yes; then | |
| 12325 | if test "$cross_compiling" = yes | |
| 12326 | then : | |
| 12327 | : | |
| 12328 | else case e in #( | |
| 12329 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 12330 | /* end confdefs.h. */ | |
| 12331 | #include <limits.h> | |
| 12332 | #ifndef LLONG_MAX | |
| 12333 | # define HALF \\ | |
| 12334 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) | |
| 12335 | # define LLONG_MAX (HALF - 1 + HALF) | |
| 12336 | #endif | |
| 12337 | int | |
| 12338 | main (void) | |
| 12339 | { | |
| 12340 | long long int n = 1; | |
| 12341 | int i; | |
| 12342 | for (i = 0; ; i++) | |
| 12343 | { | |
| 12344 | long long int m = n << i; | |
| 12345 | if (m >> i != n) | |
| 12346 | return 1; | |
| 12347 | if (LLONG_MAX / 2 < m) | |
| 12348 | break; | |
| 12349 | } | |
| 12350 | return 0; | |
| 12351 | ; | |
| 12352 | return 0; | |
| 12353 | } | |
| 12354 | _ACEOF | |
| 12355 | if ac_fn_c_try_run "$LINENO" | |
| 12356 | then : | |
| 12357 | ||
| 12358 | else case e in #( | |
| 12359 | e) ac_cv_type_long_long_int=no ;; | |
| 12360 | esac | |
| 12361 | fi | |
| 12362 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 12363 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 12364 | esac | |
| 12365 | fi | |
| 12366 | ||
| 12367 | fi;; | |
| 12368 | esac ;; | |
| 12369 | esac | |
| 12370 | fi | |
| 12371 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 | |
| 12372 | printf "%s\n" "$ac_cv_type_long_long_int" >&6; } | |
| 12373 | if test $ac_cv_type_long_long_int = yes; then | |
| 12374 | ||
| 12375 | printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h | |
| 12376 | ||
| 12377 | fi | |
| 12378 | ||
| 12379 | ||
| 12380 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t" >&5 | |
| 12381 | printf %s "checking for wchar_t... " >&6; } | |
| 12382 | if test ${gt_cv_c_wchar_t+y} | |
| 12383 | then : | |
| 12384 | printf %s "(cached) " >&6 | |
| 12385 | else case e in #( | |
| 12386 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 12387 | /* end confdefs.h. */ | |
| 12388 | #include <stddef.h> | |
| 12389 | wchar_t foo = (wchar_t)'\0'; | |
| 12390 | int | |
| 12391 | main (void) | |
| 12392 | { | |
| 12393 | ||
| 12394 | ; | |
| 12395 | return 0; | |
| 12396 | } | |
| 12397 | _ACEOF | |
| 12398 | if ac_fn_c_try_compile "$LINENO" | |
| 12399 | then : | |
| 12400 | gt_cv_c_wchar_t=yes | |
| 12401 | else case e in #( | |
| 12402 | e) gt_cv_c_wchar_t=no ;; | |
| 12403 | esac | |
| 12404 | fi | |
| 12405 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 12406 | esac | |
| 12407 | fi | |
| 12408 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wchar_t" >&5 | |
| 12409 | printf "%s\n" "$gt_cv_c_wchar_t" >&6; } | |
| 12410 | if test $gt_cv_c_wchar_t = yes; then | |
| 12411 | ||
| 12412 | printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h | |
| 12413 | ||
| 12414 | fi | |
| 12415 | ||
| 12416 | ||
| 12417 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t" >&5 | |
| 12418 | printf %s "checking for wint_t... " >&6; } | |
| 12419 | if test ${gt_cv_c_wint_t+y} | |
| 12420 | then : | |
| 12421 | printf %s "(cached) " >&6 | |
| 12422 | else case e in #( | |
| 12423 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 12424 | /* end confdefs.h. */ | |
| 12425 | #include <wchar.h> | |
| 12426 | wint_t foo = (wchar_t)'\0'; | |
| 12427 | int | |
| 12428 | main (void) | |
| 12429 | { | |
| 12430 | ||
| 12431 | ; | |
| 12432 | return 0; | |
| 12433 | } | |
| 12434 | _ACEOF | |
| 12435 | if ac_fn_c_try_compile "$LINENO" | |
| 12436 | then : | |
| 12437 | gt_cv_c_wint_t=yes | |
| 12438 | else case e in #( | |
| 12439 | e) gt_cv_c_wint_t=no ;; | |
| 12440 | esac | |
| 12441 | fi | |
| 12442 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 12443 | esac | |
| 12444 | fi | |
| 12445 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_wint_t" >&5 | |
| 12446 | printf "%s\n" "$gt_cv_c_wint_t" >&6; } | |
| 12447 | if test $gt_cv_c_wint_t = yes; then | |
| 12448 | ||
| 12449 | printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h | |
| 12450 | ||
| 12451 | ||
| 12452 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether wint_t is large enough" >&5 | |
| 12453 | printf %s "checking whether wint_t is large enough... " >&6; } | |
| 12454 | if test ${gl_cv_type_wint_t_large_enough+y} | |
| 12455 | then : | |
| 12456 | printf %s "(cached) " >&6 | |
| 12457 | else case e in #( | |
| 12458 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 12459 | /* end confdefs.h. */ | |
| 12460 | #include <wchar.h> | |
| 12461 | int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1]; | |
| 12462 | ||
| 12463 | int | |
| 12464 | main (void) | |
| 12465 | { | |
| 12466 | ||
| 12467 | ; | |
| 12468 | return 0; | |
| 12469 | } | |
| 12470 | _ACEOF | |
| 12471 | if ac_fn_c_try_compile "$LINENO" | |
| 12472 | then : | |
| 12473 | gl_cv_type_wint_t_large_enough=yes | |
| 12474 | else case e in #( | |
| 12475 | e) gl_cv_type_wint_t_large_enough=no ;; | |
| 12476 | esac | |
| 12477 | fi | |
| 12478 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 12479 | esac | |
| 12480 | fi | |
| 12481 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_type_wint_t_large_enough" >&5 | |
| 12482 | printf "%s\n" "$gl_cv_type_wint_t_large_enough" >&6; } | |
| 12483 | if test $gl_cv_type_wint_t_large_enough = no; then | |
| 12484 | GNULIBHEADERS_OVERRIDE_WINT_T=1 | |
| 12485 | else | |
| 12486 | GNULIBHEADERS_OVERRIDE_WINT_T=0 | |
| 12487 | fi | |
| 12488 | else | |
| 12489 | GNULIBHEADERS_OVERRIDE_WINT_T=0 | |
| 12490 | fi | |
| 12491 | ||
| 12492 | ||
| 12493 | ||
| 12494 | ||
| 12495 | ||
| 12496 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for intmax_t" >&5 | |
| 12497 | printf %s "checking for intmax_t... " >&6; } | |
| 12498 | if test ${gt_cv_c_intmax_t+y} | |
| 12499 | then : | |
| 12500 | printf %s "(cached) " >&6 | |
| 12501 | else case e in #( | |
| 12502 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 12503 | /* end confdefs.h. */ | |
| 12504 | ||
| 12505 | #include <stddef.h> | |
| 12506 | #include <stdlib.h> | |
| 12507 | #if HAVE_STDINT_H_WITH_UINTMAX | |
| 12508 | #include <stdint.h> | |
| 12509 | #endif | |
| 12510 | #if HAVE_INTTYPES_H_WITH_UINTMAX | |
| 12511 | #include <inttypes.h> | |
| 12512 | #endif | |
| 12513 | ||
| 12514 | int | |
| 12515 | main (void) | |
| 12516 | { | |
| 12517 | intmax_t x = -1; | |
| 12518 | return !x; | |
| 12519 | ; | |
| 12520 | return 0; | |
| 12521 | } | |
| 12522 | _ACEOF | |
| 12523 | if ac_fn_c_try_compile "$LINENO" | |
| 12524 | then : | |
| 12525 | gt_cv_c_intmax_t=yes | |
| 12526 | else case e in #( | |
| 12527 | e) gt_cv_c_intmax_t=no ;; | |
| 12528 | esac | |
| 12529 | fi | |
| 12530 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 12531 | esac | |
| 12532 | fi | |
| 12533 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_c_intmax_t" >&5 | |
| 12534 | printf "%s\n" "$gt_cv_c_intmax_t" >&6; } | |
| 12535 | if test $gt_cv_c_intmax_t = yes; then | |
| 12536 | ||
| 12537 | printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h | |
| 12538 | ||
| 12539 | fi | |
| 12540 | ||
| 12541 | ||
| 12542 | ||
| 12543 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether printf() supports POSIX/XSI format strings" >&5 | |
| 12544 | printf %s "checking whether printf() supports POSIX/XSI format strings... " >&6; } | |
| 12545 | if test ${gt_cv_func_printf_posix+y} | |
| 12546 | then : | |
| 12547 | printf %s "(cached) " >&6 | |
| 12548 | else case e in #( | |
| 12549 | e) | |
| 12550 | if test "$cross_compiling" = yes | |
| 12551 | then : | |
| 12552 | ||
| 12553 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 12554 | /* end confdefs.h. */ | |
| 12555 | ||
| 12556 | #if defined __NetBSD__ || defined __BEOS__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__ | |
| 12557 | notposix | |
| 12558 | #endif | |
| 12559 | ||
| 12560 | _ACEOF | |
| 12561 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
| 12562 | $EGREP_TRADITIONAL "notposix" >/dev/null 2>&1 | |
| 12563 | then : | |
| 12564 | gt_cv_func_printf_posix="guessing no" | |
| 12565 | else case e in #( | |
| 12566 | e) gt_cv_func_printf_posix="guessing yes" ;; | |
| 12567 | esac | |
| 12568 | fi | |
| 12569 | rm -rf conftest* | |
| 12570 | ||
| 12571 | ||
| 12572 | else case e in #( | |
| 12573 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 12574 | /* end confdefs.h. */ | |
| 12575 | ||
| 12576 | #include <stdio.h> | |
| 12577 | #include <string.h> | |
| 12578 | /* The string "%2$d %1$d", with dollar characters protected from the shell's | |
| 12579 | dollar expansion (possibly an autoconf bug). */ | |
| 12580 | static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' }; | |
| 12581 | static char buf[100]; | |
| 12582 | int main () | |
| 12583 | { | |
| 12584 | sprintf (buf, format, 33, 55); | |
| 12585 | return (strcmp (buf, "55 33") != 0); | |
| 12586 | } | |
| 12587 | _ACEOF | |
| 12588 | if ac_fn_c_try_run "$LINENO" | |
| 12589 | then : | |
| 12590 | gt_cv_func_printf_posix=yes | |
| 12591 | else case e in #( | |
| 12592 | e) gt_cv_func_printf_posix=no ;; | |
| 12593 | esac | |
| 12594 | fi | |
| 12595 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 12596 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 12597 | esac | |
| 12598 | fi | |
| 12599 | ||
| 12600 | ;; | |
| 12601 | esac | |
| 12602 | fi | |
| 12603 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_printf_posix" >&5 | |
| 12604 | printf "%s\n" "$gt_cv_func_printf_posix" >&6; } | |
| 12605 | case $gt_cv_func_printf_posix in | |
| 12606 | *yes) | |
| 12607 | ||
| 12608 | printf "%s\n" "#define HAVE_POSIX_PRINTF 1" >>confdefs.h | |
| 12609 | ||
| 12610 | ;; | |
| 12611 | esac | |
| 12612 | ||
| 12613 | ||
| 12614 | ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" | |
| 12615 | if test "x$ac_cv_header_stdint_h" = xyes | |
| 12616 | then : | |
| 12617 | printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h | |
| 12618 | ||
| 12619 | fi | |
| 12620 | ||
| 12621 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for SIZE_MAX" >&5 | |
| 12622 | printf %s "checking for SIZE_MAX... " >&6; } | |
| 12623 | if test ${gl_cv_size_max+y} | |
| 12624 | then : | |
| 12625 | printf %s "(cached) " >&6 | |
| 12626 | else case e in #( | |
| 12627 | e) | |
| 12628 | gl_cv_size_max=no | |
| 12629 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 12630 | /* end confdefs.h. */ | |
| 12631 | ||
| 12632 | #include <limits.h> | |
| 12633 | #if HAVE_STDINT_H | |
| 12634 | #include <stdint.h> | |
| 12635 | #endif | |
| 12636 | #ifdef SIZE_MAX | |
| 12637 | Found it | |
| 12638 | #endif | |
| 12639 | ||
| 12640 | _ACEOF | |
| 12641 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
| 12642 | $EGREP_TRADITIONAL "Found it" >/dev/null 2>&1 | |
| 12643 | then : | |
| 12644 | gl_cv_size_max=yes | |
| 12645 | fi | |
| 12646 | rm -rf conftest* | |
| 12647 | ||
| 12648 | if test $gl_cv_size_max != yes; then | |
| 12649 | if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) * CHAR_BIT - 1" "size_t_bits_minus_1" "#include <stddef.h> | |
| 12650 | #include <limits.h>" | |
| 12651 | then : | |
| 12652 | ||
| 12653 | else case e in #( | |
| 12654 | e) size_t_bits_minus_1= ;; | |
| 12655 | esac | |
| 12656 | fi | |
| 12657 | ||
| 12658 | if ac_fn_c_compute_int "$LINENO" "sizeof (size_t) <= sizeof (unsigned int)" "fits_in_uint" "#include <stddef.h>" | |
| 12659 | then : | |
| 12660 | ||
| 12661 | else case e in #( | |
| 12662 | e) fits_in_uint= ;; | |
| 12663 | esac | |
| 12664 | fi | |
| 12665 | ||
| 12666 | if test -n "$size_t_bits_minus_1" && test -n "$fits_in_uint"; then | |
| 12667 | if test $fits_in_uint = 1; then | |
| 12668 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 12669 | /* end confdefs.h. */ | |
| 12670 | #include <stddef.h> | |
| 12671 | extern size_t foo; | |
| 12672 | extern unsigned long foo; | |
| 12673 | ||
| 12674 | int | |
| 12675 | main (void) | |
| 12676 | { | |
| 12677 | ||
| 12678 | ; | |
| 12679 | return 0; | |
| 12680 | } | |
| 12681 | _ACEOF | |
| 12682 | if ac_fn_c_try_compile "$LINENO" | |
| 12683 | then : | |
| 12684 | fits_in_uint=0 | |
| 12685 | fi | |
| 12686 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 12687 | fi | |
| 12688 | if test $fits_in_uint = 1; then | |
| 12689 | gl_cv_size_max="(((1U << $size_t_bits_minus_1) - 1) * 2 + 1)" | |
| 12690 | else | |
| 12691 | gl_cv_size_max="(((1UL << $size_t_bits_minus_1) - 1) * 2 + 1)" | |
| 12692 | fi | |
| 12693 | else | |
| 12694 | gl_cv_size_max='((size_t)~(size_t)0)' | |
| 12695 | fi | |
| 12696 | fi | |
| 12697 | ;; | |
| 12698 | esac | |
| 12699 | fi | |
| 12700 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_size_max" >&5 | |
| 12701 | printf "%s\n" "$gl_cv_size_max" >&6; } | |
| 12702 | if test "$gl_cv_size_max" != yes; then | |
| 12703 | ||
| 12704 | printf "%s\n" "#define SIZE_MAX $gl_cv_size_max" >>confdefs.h | |
| 12705 | ||
| 12706 | fi | |
| 12707 | ||
| 12708 | ||
| 12709 | ||
| 12710 | ||
| 12711 | ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" | |
| 12712 | if test "x$ac_cv_header_stdint_h" = xyes | |
| 12713 | then : | |
| 12714 | printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h | |
| 12715 | ||
| 12716 | fi | |
| 12717 | ||
| 12718 | ||
| 12719 | ||
| 12720 | ||
| 12721 | ||
| 12722 | ||
| 12723 | ||
| 12724 | ||
| 12725 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working fcntl.h" >&5 | |
| 12726 | printf %s "checking for working fcntl.h... " >&6; } | |
| 12727 | if test ${gl_cv_header_working_fcntl_h+y} | |
| 12728 | then : | |
| 12729 | printf %s "(cached) " >&6 | |
| 12730 | else case e in #( | |
| 12731 | e) if test "$cross_compiling" = yes | |
| 12732 | then : | |
| 12733 | case "$host_os" in | |
| 12734 | # Guess 'no' on native Windows. | |
| 12735 | mingw*) gl_cv_header_working_fcntl_h='no' ;; | |
| 12736 | *) gl_cv_header_working_fcntl_h=cross-compiling ;; | |
| 12737 | esac | |
| 12738 | ||
| 12739 | else case e in #( | |
| 12740 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 12741 | /* end confdefs.h. */ | |
| 12742 | #include <sys/types.h> | |
| 12743 | #include <sys/stat.h> | |
| 12744 | #if HAVE_UNISTD_H | |
| 12745 | # include <unistd.h> | |
| 12746 | #else /* on Windows with MSVC */ | |
| 12747 | # include <io.h> | |
| 12748 | # include <stdlib.h> | |
| 12749 | # defined sleep(n) _sleep ((n) * 1000) | |
| 12750 | #endif | |
| 12751 | #include <fcntl.h> | |
| 12752 | GL_MDA_DEFINES | |
| 12753 | #ifndef O_NOATIME | |
| 12754 | #define O_NOATIME 0 | |
| 12755 | #endif | |
| 12756 | #ifndef O_NOFOLLOW | |
| 12757 | #define O_NOFOLLOW 0 | |
| 12758 | #endif | |
| 12759 | static int const constants[] = | |
| 12760 | { | |
| 12761 | O_CREAT, O_EXCL, O_NOCTTY, O_TRUNC, O_APPEND, | |
| 12762 | O_NONBLOCK, O_SYNC, O_ACCMODE, O_RDONLY, O_RDWR, O_WRONLY | |
| 12763 | }; | |
| 12764 | ||
| 12765 | int | |
| 12766 | main (void) | |
| 12767 | { | |
| 12768 | ||
| 12769 | int result = !constants; | |
| 12770 | #if HAVE_SYMLINK | |
| 12771 | { | |
| 12772 | static char const sym[] = "conftest.sym"; | |
| 12773 | if (symlink ("/dev/null", sym) != 0) | |
| 12774 | result |= 2; | |
| 12775 | else | |
| 12776 | { | |
| 12777 | int fd = open (sym, O_WRONLY | O_NOFOLLOW | O_CREAT, 0); | |
| 12778 | if (fd >= 0) | |
| 12779 | { | |
| 12780 | close (fd); | |
| 12781 | result |= 4; | |
| 12782 | } | |
| 12783 | } | |
| 12784 | if (unlink (sym) != 0 || symlink (".", sym) != 0) | |
| 12785 | result |= 2; | |
| 12786 | else | |
| 12787 | { | |
| 12788 | int fd = open (sym, O_RDONLY | O_NOFOLLOW); | |
| 12789 | if (fd >= 0) | |
| 12790 | { | |
| 12791 | close (fd); | |
| 12792 | result |= 4; | |
| 12793 | } | |
| 12794 | } | |
| 12795 | unlink (sym); | |
| 12796 | } | |
| 12797 | #endif | |
| 12798 | { | |
| 12799 | static char const file[] = "confdefs.h"; | |
| 12800 | int fd = open (file, O_RDONLY | O_NOATIME); | |
| 12801 | if (fd < 0) | |
| 12802 | result |= 8; | |
| 12803 | else | |
| 12804 | { | |
| 12805 | struct stat st0; | |
| 12806 | if (fstat (fd, &st0) != 0) | |
| 12807 | result |= 16; | |
| 12808 | else | |
| 12809 | { | |
| 12810 | char c; | |
| 12811 | sleep (1); | |
| 12812 | if (read (fd, &c, 1) != 1) | |
| 12813 | result |= 24; | |
| 12814 | else | |
| 12815 | { | |
| 12816 | if (close (fd) != 0) | |
| 12817 | result |= 32; | |
| 12818 | else | |
| 12819 | { | |
| 12820 | struct stat st1; | |
| 12821 | if (stat (file, &st1) != 0) | |
| 12822 | result |= 40; | |
| 12823 | else | |
| 12824 | if (st0.st_atime != st1.st_atime) | |
| 12825 | result |= 64; | |
| 12826 | } | |
| 12827 | } | |
| 12828 | } | |
| 12829 | } | |
| 12830 | } | |
| 12831 | return result; | |
| 12832 | ; | |
| 12833 | return 0; | |
| 12834 | } | |
| 12835 | _ACEOF | |
| 12836 | if ac_fn_c_try_run "$LINENO" | |
| 12837 | then : | |
| 12838 | gl_cv_header_working_fcntl_h=yes | |
| 12839 | else case e in #( | |
| 12840 | e) case $? in #( | |
| 12841 | 4) gl_cv_header_working_fcntl_h='no (bad O_NOFOLLOW)';; #( | |
| 12842 | 64) gl_cv_header_working_fcntl_h='no (bad O_NOATIME)';; #( | |
| 12843 | 68) gl_cv_header_working_fcntl_h='no (bad O_NOATIME, O_NOFOLLOW)';; #( | |
| 12844 | *) gl_cv_header_working_fcntl_h='no';; | |
| 12845 | esac ;; | |
| 12846 | esac | |
| 12847 | fi | |
| 12848 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 12849 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 12850 | esac | |
| 12851 | fi | |
| 12852 | ||
| 12853 | ;; | |
| 12854 | esac | |
| 12855 | fi | |
| 12856 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_header_working_fcntl_h" >&5 | |
| 12857 | printf "%s\n" "$gl_cv_header_working_fcntl_h" >&6; } | |
| 12858 | ||
| 12859 | case $gl_cv_header_working_fcntl_h in #( | |
| 12860 | *O_NOATIME* | no | cross-compiling) ac_val=0;; #( | |
| 12861 | *) ac_val=1;; | |
| 12862 | esac | |
| 12863 | ||
| 12864 | printf "%s\n" "#define HAVE_WORKING_O_NOATIME $ac_val" >>confdefs.h | |
| 12865 | ||
| 12866 | ||
| 12867 | case $gl_cv_header_working_fcntl_h in #( | |
| 12868 | *O_NOFOLLOW* | no | cross-compiling) ac_val=0;; #( | |
| 12869 | *) ac_val=1;; | |
| 12870 | esac | |
| 12871 | ||
| 12872 | printf "%s\n" "#define HAVE_WORKING_O_NOFOLLOW $ac_val" >>confdefs.h | |
| 12873 | ||
| 12874 | ||
| 12875 | ||
| 12876 | HAVE_NEWLOCALE=1; | |
| 12877 | HAVE_DUPLOCALE=1; | |
| 12878 | HAVE_FREELOCALE=1; | |
| 12879 | REPLACE_LOCALECONV=0; | |
| 12880 | REPLACE_SETLOCALE=0; | |
| 12881 | REPLACE_NEWLOCALE=0; | |
| 12882 | REPLACE_DUPLOCALE=0; | |
| 12883 | REPLACE_FREELOCALE=0; | |
| 12884 | REPLACE_STRUCT_LCONV=0; | |
| 12885 | LOCALENAME_ENHANCE_LOCALE_FUNCS=0; | |
| 12886 | ||
| 12887 | ||
| 12888 | ||
| 12889 | ||
| 12890 | ||
| 12891 | ||
| 12892 | ||
| 12893 | ||
| 12894 | ||
| 12895 | ||
| 12896 | ||
| 12897 | ||
| 12898 | ||
| 12899 | ||
| 12900 | if test $ac_cv_func_uselocale = yes; then | |
| 12901 | ||
| 12902 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether uselocale works" >&5 | |
| 12903 | printf %s "checking whether uselocale works... " >&6; } | |
| 12904 | if test ${gt_cv_func_uselocale_works+y} | |
| 12905 | then : | |
| 12906 | printf %s "(cached) " >&6 | |
| 12907 | else case e in #( | |
| 12908 | e) if test "$cross_compiling" = yes | |
| 12909 | then : | |
| 12910 | # Guess no on AIX and z/OS, yes otherwise. | |
| 12911 | case "$host_os" in | |
| 12912 | aix* | openedition*) gt_cv_func_uselocale_works="guessing no" ;; | |
| 12913 | *) gt_cv_func_uselocale_works="guessing yes" ;; | |
| 12914 | esac | |
| 12915 | ||
| 12916 | else case e in #( | |
| 12917 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 12918 | /* end confdefs.h. */ | |
| 12919 | ||
| 12920 | #include <locale.h> | |
| 12921 | #if HAVE_XLOCALE_H | |
| 12922 | # include <xlocale.h> | |
| 12923 | #endif | |
| 12924 | locale_t loc1; | |
| 12925 | int main () | |
| 12926 | { | |
| 12927 | uselocale (NULL); | |
| 12928 | setlocale (LC_ALL, "en_US.UTF-8"); | |
| 12929 | return 0; | |
| 12930 | } | |
| 12931 | _ACEOF | |
| 12932 | if ac_fn_c_try_run "$LINENO" | |
| 12933 | then : | |
| 12934 | gt_cv_func_uselocale_works=yes | |
| 12935 | else case e in #( | |
| 12936 | e) gt_cv_func_uselocale_works=no ;; | |
| 12937 | esac | |
| 12938 | fi | |
| 12939 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 12940 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 12941 | esac | |
| 12942 | fi | |
| 12943 | ||
| 12944 | ;; | |
| 12945 | esac | |
| 12946 | fi | |
| 12947 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_uselocale_works" >&5 | |
| 12948 | printf "%s\n" "$gt_cv_func_uselocale_works" >&6; } | |
| 12949 | else | |
| 12950 | gt_cv_func_uselocale_works=no | |
| 12951 | fi | |
| 12952 | case "$gt_cv_func_uselocale_works" in | |
| 12953 | *yes) | |
| 12954 | gt_working_uselocale=yes | |
| 12955 | ||
| 12956 | printf "%s\n" "#define HAVE_WORKING_USELOCALE 1" >>confdefs.h | |
| 12957 | ||
| 12958 | ;; | |
| 12959 | *) | |
| 12960 | gt_working_uselocale=no | |
| 12961 | ;; | |
| 12962 | esac | |
| 12963 | ||
| 12964 | ||
| 12965 | case "$gt_cv_func_uselocale_works" in | |
| 12966 | *yes) | |
| 12967 | ||
| 12968 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for fake locale system (OpenBSD)" >&5 | |
| 12969 | printf %s "checking for fake locale system (OpenBSD)... " >&6; } | |
| 12970 | if test ${gt_cv_locale_fake+y} | |
| 12971 | then : | |
| 12972 | printf %s "(cached) " >&6 | |
| 12973 | else case e in #( | |
| 12974 | e) if test "$cross_compiling" = yes | |
| 12975 | then : | |
| 12976 | case "$host_os" in | |
| 12977 | openbsd*) gt_cv_locale_fake="guessing yes" ;; | |
| 12978 | *) gt_cv_locale_fake="guessing no" ;; | |
| 12979 | esac | |
| 12980 | ||
| 12981 | else case e in #( | |
| 12982 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 12983 | /* end confdefs.h. */ | |
| 12984 | ||
| 12985 | #include <locale.h> | |
| 12986 | #if HAVE_XLOCALE_H | |
| 12987 | # include <xlocale.h> | |
| 12988 | #endif | |
| 12989 | int main () | |
| 12990 | { | |
| 12991 | locale_t loc1, loc2; | |
| 12992 | if (setlocale (LC_ALL, "de_DE.UTF-8") == NULL) return 1; | |
| 12993 | if (setlocale (LC_ALL, "fr_FR.UTF-8") == NULL) return 1; | |
| 12994 | loc1 = newlocale (LC_ALL_MASK, "de_DE.UTF-8", (locale_t)0); | |
| 12995 | loc2 = newlocale (LC_ALL_MASK, "fr_FR.UTF-8", (locale_t)0); | |
| 12996 | return !(loc1 == loc2); | |
| 12997 | } | |
| 12998 | _ACEOF | |
| 12999 | if ac_fn_c_try_run "$LINENO" | |
| 13000 | then : | |
| 13001 | gt_cv_locale_fake=yes | |
| 13002 | else case e in #( | |
| 13003 | e) gt_cv_locale_fake=no ;; | |
| 13004 | esac | |
| 13005 | fi | |
| 13006 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 13007 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 13008 | esac | |
| 13009 | fi | |
| 13010 | ||
| 13011 | ;; | |
| 13012 | esac | |
| 13013 | fi | |
| 13014 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_fake" >&5 | |
| 13015 | printf "%s\n" "$gt_cv_locale_fake" >&6; } | |
| 13016 | ;; | |
| 13017 | *) gt_cv_locale_fake=no ;; | |
| 13018 | esac | |
| 13019 | case "$gt_cv_locale_fake" in | |
| 13020 | *yes) | |
| 13021 | gt_fake_locales=yes | |
| 13022 | ||
| 13023 | printf "%s\n" "#define HAVE_FAKE_LOCALES 1" >>confdefs.h | |
| 13024 | ||
| 13025 | ;; | |
| 13026 | *) | |
| 13027 | gt_fake_locales=no | |
| 13028 | ;; | |
| 13029 | esac | |
| 13030 | ||
| 13031 | case "$gt_cv_func_uselocale_works" in | |
| 13032 | *yes) | |
| 13033 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for Solaris 11.4 locale system" >&5 | |
| 13034 | printf %s "checking for Solaris 11.4 locale system... " >&6; } | |
| 13035 | if test ${gt_cv_locale_solaris114+y} | |
| 13036 | then : | |
| 13037 | printf %s "(cached) " >&6 | |
| 13038 | else case e in #( | |
| 13039 | e) case "$host_os" in | |
| 13040 | solaris*) | |
| 13041 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 13042 | /* end confdefs.h. */ | |
| 13043 | ||
| 13044 | #include <locale.h> | |
| 13045 | struct _LC_locale_t *x; | |
| 13046 | locale_t y; | |
| 13047 | ||
| 13048 | int | |
| 13049 | main (void) | |
| 13050 | { | |
| 13051 | *y = x; | |
| 13052 | ; | |
| 13053 | return 0; | |
| 13054 | } | |
| 13055 | _ACEOF | |
| 13056 | if ac_fn_c_try_compile "$LINENO" | |
| 13057 | then : | |
| 13058 | gt_cv_locale_solaris114=yes | |
| 13059 | else case e in #( | |
| 13060 | e) gt_cv_locale_solaris114=no ;; | |
| 13061 | esac | |
| 13062 | fi | |
| 13063 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 13064 | ;; | |
| 13065 | *) gt_cv_locale_solaris114=no ;; | |
| 13066 | esac | |
| 13067 | ;; | |
| 13068 | esac | |
| 13069 | fi | |
| 13070 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_locale_solaris114" >&5 | |
| 13071 | printf "%s\n" "$gt_cv_locale_solaris114" >&6; } | |
| 13072 | ;; | |
| 13073 | *) gt_cv_locale_solaris114=no ;; | |
| 13074 | esac | |
| 13075 | if test $gt_cv_locale_solaris114 = yes; then | |
| 13076 | ||
| 13077 | printf "%s\n" "#define HAVE_SOLARIS114_LOCALES 1" >>confdefs.h | |
| 13078 | ||
| 13079 | fi | |
| 13080 | ||
| 13081 | case "$gt_cv_func_uselocale_works" in | |
| 13082 | *yes) | |
| 13083 | ac_fn_c_check_func "$LINENO" "getlocalename_l" "ac_cv_func_getlocalename_l" | |
| 13084 | if test "x$ac_cv_func_getlocalename_l" = xyes | |
| 13085 | then : | |
| 13086 | printf "%s\n" "#define HAVE_GETLOCALENAME_L 1" >>confdefs.h | |
| 13087 | ||
| 13088 | fi | |
| 13089 | ||
| 13090 | ;; | |
| 13091 | esac | |
| 13092 | ||
| 13093 | gt_nameless_locales=no | |
| 13094 | case "$host_os" in | |
| 13095 | aix*) | |
| 13096 | gt_nameless_locales=yes | |
| 13097 | ||
| 13098 | printf "%s\n" "#define HAVE_NAMELESS_LOCALES 1" >>confdefs.h | |
| 13099 | ||
| 13100 | ;; | |
| 13101 | esac | |
| 13102 | ||
| 13103 | if test $gt_working_uselocale = yes && test $gt_fake_locales = no; then | |
| 13104 | gt_good_uselocale=yes | |
| 13105 | ||
| 13106 | printf "%s\n" "#define HAVE_GOOD_USELOCALE 1" >>confdefs.h | |
| 13107 | ||
| 13108 | else | |
| 13109 | gt_good_uselocale=no | |
| 13110 | fi | |
| 13111 | ||
| 13112 | if test $gt_good_uselocale = yes && test $gt_nameless_locales = yes; then | |
| 13113 | gt_localename_enhances_locale_funcs=yes | |
| 13114 | LOCALENAME_ENHANCE_LOCALE_FUNCS=1 | |
| 13115 | ||
| 13116 | printf "%s\n" "#define LOCALENAME_ENHANCE_LOCALE_FUNCS 1" >>confdefs.h | |
| 13117 | ||
| 13118 | else | |
| 13119 | gt_localename_enhances_locale_funcs=no | |
| 13120 | fi | |
| 13121 | ||
| 13122 | ||
| 13123 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 | |
| 13124 | printf %s "checking for CFPreferencesCopyAppValue... " >&6; } | |
| 13125 | if test ${gt_cv_func_CFPreferencesCopyAppValue+y} | |
| 13126 | then : | |
| 13127 | printf %s "(cached) " >&6 | |
| 13128 | else case e in #( | |
| 13129 | e) gt_save_LIBS="$LIBS" | |
| 13130 | LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" | |
| 13131 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 13132 | /* end confdefs.h. */ | |
| 13133 | #include <CoreFoundation/CFPreferences.h> | |
| 13134 | int | |
| 13135 | main (void) | |
| 13136 | { | |
| 13137 | CFPreferencesCopyAppValue(NULL, NULL) | |
| 13138 | ; | |
| 13139 | return 0; | |
| 13140 | } | |
| 13141 | _ACEOF | |
| 13142 | if ac_fn_c_try_link "$LINENO" | |
| 13143 | then : | |
| 13144 | gt_cv_func_CFPreferencesCopyAppValue=yes | |
| 13145 | else case e in #( | |
| 13146 | e) gt_cv_func_CFPreferencesCopyAppValue=no ;; | |
| 13147 | esac | |
| 13148 | fi | |
| 13149 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 13150 | conftest$ac_exeext conftest.$ac_ext | |
| 13151 | LIBS="$gt_save_LIBS" ;; | |
| 13152 | esac | |
| 13153 | fi | |
| 13154 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 | |
| 13155 | printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } | |
| 13156 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then | |
| 13157 | ||
| 13158 | printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h | |
| 13159 | ||
| 13160 | fi | |
| 13161 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 | |
| 13162 | printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; } | |
| 13163 | if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y} | |
| 13164 | then : | |
| 13165 | printf %s "(cached) " >&6 | |
| 13166 | else case e in #( | |
| 13167 | e) gt_save_LIBS="$LIBS" | |
| 13168 | LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" | |
| 13169 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 13170 | /* end confdefs.h. */ | |
| 13171 | #include <CoreFoundation/CFLocale.h> | |
| 13172 | int | |
| 13173 | main (void) | |
| 13174 | { | |
| 13175 | CFLocaleCopyPreferredLanguages(); | |
| 13176 | ; | |
| 13177 | return 0; | |
| 13178 | } | |
| 13179 | _ACEOF | |
| 13180 | if ac_fn_c_try_link "$LINENO" | |
| 13181 | then : | |
| 13182 | gt_cv_func_CFLocaleCopyPreferredLanguages=yes | |
| 13183 | else case e in #( | |
| 13184 | e) gt_cv_func_CFLocaleCopyPreferredLanguages=no ;; | |
| 13185 | esac | |
| 13186 | fi | |
| 13187 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 13188 | conftest$ac_exeext conftest.$ac_ext | |
| 13189 | LIBS="$gt_save_LIBS" ;; | |
| 13190 | esac | |
| 13191 | fi | |
| 13192 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 | |
| 13193 | printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } | |
| 13194 | if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then | |
| 13195 | ||
| 13196 | printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h | |
| 13197 | ||
| 13198 | fi | |
| 13199 | INTL_MACOSX_LIBS= | |
| 13200 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ | |
| 13201 | || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then | |
| 13202 | INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" | |
| 13203 | fi | |
| 13204 | ||
| 13205 | ||
| 13206 | ||
| 13207 | ||
| 13208 | ||
| 13209 | ||
| 13210 | ||
| 13211 | ||
| 13212 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for flexible array member" >&5 | |
| 13213 | printf %s "checking for flexible array member... " >&6; } | |
| 13214 | if test ${ac_cv_c_flexmember+y} | |
| 13215 | then : | |
| 13216 | printf %s "(cached) " >&6 | |
| 13217 | else case e in #( | |
| 13218 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 13219 | /* end confdefs.h. */ | |
| 13220 | #include <stdlib.h> | |
| 13221 | #include <stdio.h> | |
| 13222 | #include <stddef.h> | |
| 13223 | struct m { struct m *next, **list; char name[]; }; | |
| 13224 | struct s { struct s *p; struct m *m; int n; double d[]; }; | |
| 13225 | int | |
| 13226 | main (void) | |
| 13227 | { | |
| 13228 | int m = getchar (); | |
| 13229 | size_t nbytes = offsetof (struct s, d) + m * sizeof (double); | |
| 13230 | nbytes += sizeof (struct s) - 1; | |
| 13231 | nbytes -= nbytes % sizeof (struct s); | |
| 13232 | struct s *p = malloc (nbytes); | |
| 13233 | p->p = p; | |
| 13234 | p->m = NULL; | |
| 13235 | p->d[0] = 0.0; | |
| 13236 | return p->d != (double *) NULL; | |
| 13237 | ; | |
| 13238 | return 0; | |
| 13239 | } | |
| 13240 | _ACEOF | |
| 13241 | if ac_fn_c_try_compile "$LINENO" | |
| 13242 | then : | |
| 13243 | ac_cv_c_flexmember=yes | |
| 13244 | else case e in #( | |
| 13245 | e) ac_cv_c_flexmember=no ;; | |
| 13246 | esac | |
| 13247 | fi | |
| 13248 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 13249 | esac | |
| 13250 | fi | |
| 13251 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_flexmember" >&5 | |
| 13252 | printf "%s\n" "$ac_cv_c_flexmember" >&6; } | |
| 13253 | if test $ac_cv_c_flexmember = yes; then | |
| 13254 | ||
| 13255 | printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER /**/" >>confdefs.h | |
| 13256 | ||
| 13257 | else | |
| 13258 | printf "%s\n" "#define FLEXIBLE_ARRAY_MEMBER 1" >>confdefs.h | |
| 13259 | ||
| 13260 | fi | |
| 13261 | ||
| 13262 | ||
| 13263 | ||
| 13264 | ||
| 13265 | ||
| 13266 | ||
| 13267 | ||
| 13268 | ||
| 13269 | ||
| 13270 | ||
| 13271 | ||
| 13272 | if test -n "$ac_tool_prefix"; then | |
| 13273 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. | |
| 13274 | set dummy ${ac_tool_prefix}ar; ac_word=$2 | |
| 13275 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 13276 | printf %s "checking for $ac_word... " >&6; } | |
| 13277 | if test ${ac_cv_prog_AR+y} | |
| 13278 | then : | |
| 13279 | printf %s "(cached) " >&6 | |
| 13280 | else case e in #( | |
| 13281 | e) if test -n "$AR"; then | |
| 13282 | ac_cv_prog_AR="$AR" # Let the user override the test. | |
| 13283 | else | |
| 13284 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 13285 | for as_dir in $PATH | |
| 13286 | do | |
| 13287 | IFS=$as_save_IFS | |
| 13288 | case $as_dir in #((( | |
| 13289 | '') as_dir=./ ;; | |
| 13290 | */) ;; | |
| 13291 | *) as_dir=$as_dir/ ;; | |
| 13292 | esac | |
| 13293 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 13294 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 13295 | ac_cv_prog_AR="${ac_tool_prefix}ar" | |
| 13296 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 13297 | break 2 | |
| 13298 | fi | |
| 13299 | done | |
| 13300 | done | |
| 13301 | IFS=$as_save_IFS | |
| 13302 | ||
| 13303 | fi ;; | |
| 13304 | esac | |
| 13305 | fi | |
| 13306 | AR=$ac_cv_prog_AR | |
| 13307 | if test -n "$AR"; then | |
| 13308 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 | |
| 13309 | printf "%s\n" "$AR" >&6; } | |
| 13310 | else | |
| 13311 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 13312 | printf "%s\n" "no" >&6; } | |
| 13313 | fi | |
| 13314 | ||
| 13315 | ||
| 13316 | fi | |
| 13317 | if test -z "$ac_cv_prog_AR"; then | |
| 13318 | ac_ct_AR=$AR | |
| 13319 | # Extract the first word of "ar", so it can be a program name with args. | |
| 13320 | set dummy ar; ac_word=$2 | |
| 13321 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 13322 | printf %s "checking for $ac_word... " >&6; } | |
| 13323 | if test ${ac_cv_prog_ac_ct_AR+y} | |
| 13324 | then : | |
| 13325 | printf %s "(cached) " >&6 | |
| 13326 | else case e in #( | |
| 13327 | e) if test -n "$ac_ct_AR"; then | |
| 13328 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. | |
| 13329 | else | |
| 13330 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 13331 | for as_dir in $PATH | |
| 13332 | do | |
| 13333 | IFS=$as_save_IFS | |
| 13334 | case $as_dir in #((( | |
| 13335 | '') as_dir=./ ;; | |
| 13336 | */) ;; | |
| 13337 | *) as_dir=$as_dir/ ;; | |
| 13338 | esac | |
| 13339 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 13340 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 13341 | ac_cv_prog_ac_ct_AR="ar" | |
| 13342 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 13343 | break 2 | |
| 13344 | fi | |
| 13345 | done | |
| 13346 | done | |
| 13347 | IFS=$as_save_IFS | |
| 13348 | ||
| 13349 | fi ;; | |
| 13350 | esac | |
| 13351 | fi | |
| 13352 | ac_ct_AR=$ac_cv_prog_ac_ct_AR | |
| 13353 | if test -n "$ac_ct_AR"; then | |
| 13354 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 | |
| 13355 | printf "%s\n" "$ac_ct_AR" >&6; } | |
| 13356 | else | |
| 13357 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 13358 | printf "%s\n" "no" >&6; } | |
| 13359 | fi | |
| 13360 | ||
| 13361 | if test "x$ac_ct_AR" = x; then | |
| 13362 | AR="ar" | |
| 13363 | else | |
| 13364 | case $cross_compiling:$ac_tool_warned in | |
| 13365 | yes:) | |
| 13366 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
| 13367 | printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
| 13368 | ac_tool_warned=yes ;; | |
| 13369 | esac | |
| 13370 | AR=$ac_ct_AR | |
| 13371 | fi | |
| 13372 | else | |
| 13373 | AR="$ac_cv_prog_AR" | |
| 13374 | fi | |
| 13375 | ||
| 13376 | if test -z "$ARFLAGS"; then | |
| 13377 | ARFLAGS='cr' | |
| 13378 | fi | |
| 13379 | ||
| 13380 | ||
| 13381 | ||
| 13382 | ||
| 13383 | case "$enable_silent_rules" in | |
| 13384 | yes) INTL_DEFAULT_VERBOSITY=0;; | |
| 13385 | no) INTL_DEFAULT_VERBOSITY=1;; | |
| 13386 | *) INTL_DEFAULT_VERBOSITY=1;; | |
| 13387 | esac | |
| 13388 | ||
| 13389 | ||
| 13390 | ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" | |
| 13391 | if test "x$ac_cv_type_ptrdiff_t" = xyes | |
| 13392 | then : | |
| 13393 | ||
| 13394 | else case e in #( | |
| 13395 | e) | |
| 13396 | printf "%s\n" "#define ptrdiff_t long" >>confdefs.h | |
| 13397 | ||
| 13398 | ;; | |
| 13399 | esac | |
| 13400 | fi | |
| 13401 | ||
| 13402 | ac_fn_c_check_header_compile "$LINENO" "features.h" "ac_cv_header_features_h" "$ac_includes_default" | |
| 13403 | if test "x$ac_cv_header_features_h" = xyes | |
| 13404 | then : | |
| 13405 | printf "%s\n" "#define HAVE_FEATURES_H 1" >>confdefs.h | |
| 13406 | ||
| 13407 | fi | |
| 13408 | ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" | |
| 13409 | if test "x$ac_cv_header_stddef_h" = xyes | |
| 13410 | then : | |
| 13411 | printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h | |
| 13412 | ||
| 13413 | fi | |
| 13414 | ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" | |
| 13415 | if test "x$ac_cv_header_stdlib_h" = xyes | |
| 13416 | then : | |
| 13417 | printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h | |
| 13418 | ||
| 13419 | fi | |
| 13420 | ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" | |
| 13421 | if test "x$ac_cv_header_string_h" = xyes | |
| 13422 | then : | |
| 13423 | printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h | |
| 13424 | ||
| 13425 | fi | |
| 13426 | ||
| 13427 | ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf" | |
| 13428 | if test "x$ac_cv_func_asprintf" = xyes | |
| 13429 | then : | |
| 13430 | printf "%s\n" "#define HAVE_ASPRINTF 1" >>confdefs.h | |
| 13431 | ||
| 13432 | fi | |
| 13433 | ac_fn_c_check_func "$LINENO" "wprintf" "ac_cv_func_wprintf" | |
| 13434 | if test "x$ac_cv_func_wprintf" = xyes | |
| 13435 | then : | |
| 13436 | printf "%s\n" "#define HAVE_WPRINTF 1" >>confdefs.h | |
| 13437 | ||
| 13438 | fi | |
| 13439 | ac_fn_c_check_func "$LINENO" "newlocale" "ac_cv_func_newlocale" | |
| 13440 | if test "x$ac_cv_func_newlocale" = xyes | |
| 13441 | then : | |
| 13442 | printf "%s\n" "#define HAVE_NEWLOCALE 1" >>confdefs.h | |
| 13443 | ||
| 13444 | fi | |
| 13445 | ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv" | |
| 13446 | if test "x$ac_cv_func_putenv" = xyes | |
| 13447 | then : | |
| 13448 | printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h | |
| 13449 | ||
| 13450 | fi | |
| 13451 | ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" | |
| 13452 | if test "x$ac_cv_func_setenv" = xyes | |
| 13453 | then : | |
| 13454 | printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h | |
| 13455 | ||
| 13456 | fi | |
| 13457 | ac_fn_c_check_func "$LINENO" "snprintf" "ac_cv_func_snprintf" | |
| 13458 | if test "x$ac_cv_func_snprintf" = xyes | |
| 13459 | then : | |
| 13460 | printf "%s\n" "#define HAVE_SNPRINTF 1" >>confdefs.h | |
| 13461 | ||
| 13462 | fi | |
| 13463 | ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen" | |
| 13464 | if test "x$ac_cv_func_strnlen" = xyes | |
| 13465 | then : | |
| 13466 | printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h | |
| 13467 | ||
| 13468 | fi | |
| 13469 | ac_fn_c_check_func "$LINENO" "uselocale" "ac_cv_func_uselocale" | |
| 13470 | if test "x$ac_cv_func_uselocale" = xyes | |
| 13471 | then : | |
| 13472 | printf "%s\n" "#define HAVE_USELOCALE 1" >>confdefs.h | |
| 13473 | ||
| 13474 | fi | |
| 13475 | ac_fn_c_check_func "$LINENO" "wcslen" "ac_cv_func_wcslen" | |
| 13476 | if test "x$ac_cv_func_wcslen" = xyes | |
| 13477 | then : | |
| 13478 | printf "%s\n" "#define HAVE_WCSLEN 1" >>confdefs.h | |
| 13479 | ||
| 13480 | fi | |
| 13481 | ac_fn_c_check_func "$LINENO" "wcsnlen" "ac_cv_func_wcsnlen" | |
| 13482 | if test "x$ac_cv_func_wcsnlen" = xyes | |
| 13483 | then : | |
| 13484 | printf "%s\n" "#define HAVE_WCSNLEN 1" >>confdefs.h | |
| 13485 | ||
| 13486 | fi | |
| 13487 | ac_fn_c_check_func "$LINENO" "mbrtowc" "ac_cv_func_mbrtowc" | |
| 13488 | if test "x$ac_cv_func_mbrtowc" = xyes | |
| 13489 | then : | |
| 13490 | printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h | |
| 13491 | ||
| 13492 | fi | |
| 13493 | ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb" | |
| 13494 | if test "x$ac_cv_func_wcrtomb" = xyes | |
| 13495 | then : | |
| 13496 | printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h | |
| 13497 | ||
| 13498 | fi | |
| 13499 | ||
| 13500 | ||
| 13501 | ac_fn_check_decl "$LINENO" "_snprintf" "ac_cv_have_decl__snprintf" "#include <stdio.h> | |
| 13502 | " "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 13503 | if test "x$ac_cv_have_decl__snprintf" = xyes | |
| 13504 | then : | |
| 13505 | ac_have_decl=1 | |
| 13506 | else case e in #( | |
| 13507 | e) ac_have_decl=0 ;; | |
| 13508 | esac | |
| 13509 | fi | |
| 13510 | printf "%s\n" "#define HAVE_DECL__SNPRINTF $ac_have_decl" >>confdefs.h | |
| 13511 | ac_fn_check_decl "$LINENO" "_snwprintf" "ac_cv_have_decl__snwprintf" "#include <stdio.h> | |
| 13512 | " "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 13513 | if test "x$ac_cv_have_decl__snwprintf" = xyes | |
| 13514 | then : | |
| 13515 | ac_have_decl=1 | |
| 13516 | else case e in #( | |
| 13517 | e) ac_have_decl=0 ;; | |
| 13518 | esac | |
| 13519 | fi | |
| 13520 | printf "%s\n" "#define HAVE_DECL__SNWPRINTF $ac_have_decl" >>confdefs.h | |
| 13521 | ||
| 13522 | ||
| 13523 | ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "#include <stdio.h> | |
| 13524 | " "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 13525 | if test "x$ac_cv_have_decl_getc_unlocked" = xyes | |
| 13526 | then : | |
| 13527 | ac_have_decl=1 | |
| 13528 | else case e in #( | |
| 13529 | e) ac_have_decl=0 ;; | |
| 13530 | esac | |
| 13531 | fi | |
| 13532 | printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h | |
| 13533 | ||
| 13534 | ||
| 13535 | case $gt_cv_func_printf_posix in | |
| 13536 | *yes) HAVE_POSIX_PRINTF=1 ;; | |
| 13537 | *) HAVE_POSIX_PRINTF=0 ;; | |
| 13538 | esac | |
| 13539 | ||
| 13540 | if test "$ac_cv_func_asprintf" = yes; then | |
| 13541 | HAVE_ASPRINTF=1 | |
| 13542 | else | |
| 13543 | HAVE_ASPRINTF=0 | |
| 13544 | fi | |
| 13545 | ||
| 13546 | if test "$ac_cv_func_snprintf" = yes; then | |
| 13547 | HAVE_SNPRINTF=1 | |
| 13548 | else | |
| 13549 | HAVE_SNPRINTF=0 | |
| 13550 | fi | |
| 13551 | ||
| 13552 | if test "$ac_cv_func_newlocale" = yes; then | |
| 13553 | HAVE_NEWLOCALE=1 | |
| 13554 | else | |
| 13555 | HAVE_NEWLOCALE=0 | |
| 13556 | fi | |
| 13557 | ||
| 13558 | if test "$ac_cv_func_wprintf" = yes; then | |
| 13559 | HAVE_WPRINTF=1 | |
| 13560 | else | |
| 13561 | HAVE_WPRINTF=0 | |
| 13562 | fi | |
| 13563 | ||
| 13564 | ||
| 13565 | ||
| 13566 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 | |
| 13567 | printf %s "checking for nl_langinfo and CODESET... " >&6; } | |
| 13568 | if test ${am_cv_langinfo_codeset+y} | |
| 13569 | then : | |
| 13570 | printf %s "(cached) " >&6 | |
| 13571 | else case e in #( | |
| 13572 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 13573 | /* end confdefs.h. */ | |
| 13574 | #include <langinfo.h> | |
| 13575 | int | |
| 13576 | main (void) | |
| 13577 | { | |
| 13578 | char* cs = nl_langinfo(CODESET); return !cs; | |
| 13579 | ; | |
| 13580 | return 0; | |
| 13581 | } | |
| 13582 | _ACEOF | |
| 13583 | if ac_fn_c_try_link "$LINENO" | |
| 13584 | then : | |
| 13585 | am_cv_langinfo_codeset=yes | |
| 13586 | else case e in #( | |
| 13587 | e) am_cv_langinfo_codeset=no ;; | |
| 13588 | esac | |
| 13589 | fi | |
| 13590 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 13591 | conftest$ac_exeext conftest.$ac_ext | |
| 13592 | ;; | |
| 13593 | esac | |
| 13594 | fi | |
| 13595 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 | |
| 13596 | printf "%s\n" "$am_cv_langinfo_codeset" >&6; } | |
| 13597 | if test $am_cv_langinfo_codeset = yes; then | |
| 13598 | printf "%s\n" "#define HAVE_NL_LANGINFO 1" >>confdefs.h | |
| 13599 | ||
| 13600 | ||
| 13601 | printf "%s\n" "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h | |
| 13602 | ||
| 13603 | fi | |
| 13604 | ||
| 13605 | ||
| 13606 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 | |
| 13607 | printf %s "checking for LC_MESSAGES... " >&6; } | |
| 13608 | if test ${gt_cv_val_LC_MESSAGES+y} | |
| 13609 | then : | |
| 13610 | printf %s "(cached) " >&6 | |
| 13611 | else case e in #( | |
| 13612 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 13613 | /* end confdefs.h. */ | |
| 13614 | #include <locale.h> | |
| 13615 | int | |
| 13616 | main (void) | |
| 13617 | { | |
| 13618 | return LC_MESSAGES | |
| 13619 | ; | |
| 13620 | return 0; | |
| 13621 | } | |
| 13622 | _ACEOF | |
| 13623 | if ac_fn_c_try_link "$LINENO" | |
| 13624 | then : | |
| 13625 | gt_cv_val_LC_MESSAGES=yes | |
| 13626 | else case e in #( | |
| 13627 | e) gt_cv_val_LC_MESSAGES=no ;; | |
| 13628 | esac | |
| 13629 | fi | |
| 13630 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 13631 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 13632 | esac | |
| 13633 | fi | |
| 13634 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_val_LC_MESSAGES" >&5 | |
| 13635 | printf "%s\n" "$gt_cv_val_LC_MESSAGES" >&6; } | |
| 13636 | if test $gt_cv_val_LC_MESSAGES = yes; then | |
| 13637 | ||
| 13638 | printf "%s\n" "#define HAVE_LC_MESSAGES 1" >>confdefs.h | |
| 13639 | ||
| 13640 | fi | |
| 13641 | ||
| 13642 | ||
| 13643 | if test $gt_localename_enhances_locale_funcs = yes; then | |
| 13644 | ENHANCE_LOCALE_FUNCS=1 | |
| 13645 | else | |
| 13646 | ENHANCE_LOCALE_FUNCS=0 | |
| 13647 | fi | |
| 13648 | ||
| 13649 | ||
| 13650 | if test "$enable_shared" = yes; then | |
| 13651 | case "$host_os" in | |
| 13652 | mingw* | cygwin*) is_woe32dll=yes ;; | |
| 13653 | *) is_woe32dll=no ;; | |
| 13654 | esac | |
| 13655 | else | |
| 13656 | is_woe32dll=no | |
| 13657 | fi | |
| 13658 | WOE32DLL=$is_woe32dll | |
| 13659 | ||
| 13660 | ||
| 13661 | case "$host_os" in | |
| 13662 | mingw* | cygwin*) is_woe32=yes ;; | |
| 13663 | *) is_woe32=no ;; | |
| 13664 | esac | |
| 13665 | WOE32=$is_woe32 | |
| 13666 | ||
| 13667 | if test $WOE32 = yes; then | |
| 13668 | if test -n "$ac_tool_prefix"; then | |
| 13669 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. | |
| 13670 | set dummy ${ac_tool_prefix}windres; ac_word=$2 | |
| 13671 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 13672 | printf %s "checking for $ac_word... " >&6; } | |
| 13673 | if test ${ac_cv_prog_WINDRES+y} | |
| 13674 | then : | |
| 13675 | printf %s "(cached) " >&6 | |
| 13676 | else case e in #( | |
| 13677 | e) if test -n "$WINDRES"; then | |
| 13678 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. | |
| 13679 | else | |
| 13680 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 13681 | for as_dir in $PATH | |
| 13682 | do | |
| 13683 | IFS=$as_save_IFS | |
| 13684 | case $as_dir in #((( | |
| 13685 | '') as_dir=./ ;; | |
| 13686 | */) ;; | |
| 13687 | *) as_dir=$as_dir/ ;; | |
| 13688 | esac | |
| 13689 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 13690 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 13691 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" | |
| 13692 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 13693 | break 2 | |
| 13694 | fi | |
| 13695 | done | |
| 13696 | done | |
| 13697 | IFS=$as_save_IFS | |
| 13698 | ||
| 13699 | fi ;; | |
| 13700 | esac | |
| 13701 | fi | |
| 13702 | WINDRES=$ac_cv_prog_WINDRES | |
| 13703 | if test -n "$WINDRES"; then | |
| 13704 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 | |
| 13705 | printf "%s\n" "$WINDRES" >&6; } | |
| 13706 | else | |
| 13707 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 13708 | printf "%s\n" "no" >&6; } | |
| 13709 | fi | |
| 13710 | ||
| 13711 | ||
| 13712 | fi | |
| 13713 | if test -z "$ac_cv_prog_WINDRES"; then | |
| 13714 | ac_ct_WINDRES=$WINDRES | |
| 13715 | # Extract the first word of "windres", so it can be a program name with args. | |
| 13716 | set dummy windres; ac_word=$2 | |
| 13717 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 | |
| 13718 | printf %s "checking for $ac_word... " >&6; } | |
| 13719 | if test ${ac_cv_prog_ac_ct_WINDRES+y} | |
| 13720 | then : | |
| 13721 | printf %s "(cached) " >&6 | |
| 13722 | else case e in #( | |
| 13723 | e) if test -n "$ac_ct_WINDRES"; then | |
| 13724 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. | |
| 13725 | else | |
| 13726 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 13727 | for as_dir in $PATH | |
| 13728 | do | |
| 13729 | IFS=$as_save_IFS | |
| 13730 | case $as_dir in #((( | |
| 13731 | '') as_dir=./ ;; | |
| 13732 | */) ;; | |
| 13733 | *) as_dir=$as_dir/ ;; | |
| 13734 | esac | |
| 13735 | for ac_exec_ext in '' $ac_executable_extensions; do | |
| 13736 | if as_fn_executable_p "$as_dir$ac_word$ac_exec_ext"; then | |
| 13737 | ac_cv_prog_ac_ct_WINDRES="windres" | |
| 13738 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: found $as_dir$ac_word$ac_exec_ext" >&5 | |
| 13739 | break 2 | |
| 13740 | fi | |
| 13741 | done | |
| 13742 | done | |
| 13743 | IFS=$as_save_IFS | |
| 13744 | ||
| 13745 | fi ;; | |
| 13746 | esac | |
| 13747 | fi | |
| 13748 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES | |
| 13749 | if test -n "$ac_ct_WINDRES"; then | |
| 13750 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 | |
| 13751 | printf "%s\n" "$ac_ct_WINDRES" >&6; } | |
| 13752 | else | |
| 13753 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 | |
| 13754 | printf "%s\n" "no" >&6; } | |
| 13755 | fi | |
| 13756 | ||
| 13757 | if test "x$ac_ct_WINDRES" = x; then | |
| 13758 | WINDRES="" | |
| 13759 | else | |
| 13760 | case $cross_compiling:$ac_tool_warned in | |
| 13761 | yes:) | |
| 13762 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 | |
| 13763 | printf "%s\n" "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} | |
| 13764 | ac_tool_warned=yes ;; | |
| 13765 | esac | |
| 13766 | WINDRES=$ac_ct_WINDRES | |
| 13767 | fi | |
| 13768 | else | |
| 13769 | WINDRES="$ac_cv_prog_WINDRES" | |
| 13770 | fi | |
| 13771 | ||
| 13772 | fi | |
| 13773 | ||
| 13774 | ||
| 13775 | ||
| 13776 | ||
| 13777 | ||
| 13778 | ||
| 13779 | ||
| 13780 | ||
| 13781 | ||
| 13782 | ||
| 13783 | ||
| 13784 | ||
| 13785 | ||
| 13786 | ||
| 13787 | ||
| 13788 | ||
| 13789 | ||
| 13790 | ||
| 13791 | ||
| 13792 | ||
| 13793 | ||
| 13794 | ||
| 13795 | ||
| 13796 | ||
| 13797 | ||
| 13798 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFPreferencesCopyAppValue" >&5 | |
| 13799 | printf %s "checking for CFPreferencesCopyAppValue... " >&6; } | |
| 13800 | if test ${gt_cv_func_CFPreferencesCopyAppValue+y} | |
| 13801 | then : | |
| 13802 | printf %s "(cached) " >&6 | |
| 13803 | else case e in #( | |
| 13804 | e) gt_save_LIBS="$LIBS" | |
| 13805 | LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" | |
| 13806 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 13807 | /* end confdefs.h. */ | |
| 13808 | #include <CoreFoundation/CFPreferences.h> | |
| 13809 | int | |
| 13810 | main (void) | |
| 13811 | { | |
| 13812 | CFPreferencesCopyAppValue(NULL, NULL) | |
| 13813 | ; | |
| 13814 | return 0; | |
| 13815 | } | |
| 13816 | _ACEOF | |
| 13817 | if ac_fn_c_try_link "$LINENO" | |
| 13818 | then : | |
| 13819 | gt_cv_func_CFPreferencesCopyAppValue=yes | |
| 13820 | else case e in #( | |
| 13821 | e) gt_cv_func_CFPreferencesCopyAppValue=no ;; | |
| 13822 | esac | |
| 13823 | fi | |
| 13824 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 13825 | conftest$ac_exeext conftest.$ac_ext | |
| 13826 | LIBS="$gt_save_LIBS" ;; | |
| 13827 | esac | |
| 13828 | fi | |
| 13829 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFPreferencesCopyAppValue" >&5 | |
| 13830 | printf "%s\n" "$gt_cv_func_CFPreferencesCopyAppValue" >&6; } | |
| 13831 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes; then | |
| 13832 | ||
| 13833 | printf "%s\n" "#define HAVE_CFPREFERENCESCOPYAPPVALUE 1" >>confdefs.h | |
| 13834 | ||
| 13835 | fi | |
| 13836 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for CFLocaleCopyPreferredLanguages" >&5 | |
| 13837 | printf %s "checking for CFLocaleCopyPreferredLanguages... " >&6; } | |
| 13838 | if test ${gt_cv_func_CFLocaleCopyPreferredLanguages+y} | |
| 13839 | then : | |
| 13840 | printf %s "(cached) " >&6 | |
| 13841 | else case e in #( | |
| 13842 | e) gt_save_LIBS="$LIBS" | |
| 13843 | LIBS="$LIBS -Wl,-framework -Wl,CoreFoundation" | |
| 13844 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 13845 | /* end confdefs.h. */ | |
| 13846 | #include <CoreFoundation/CFLocale.h> | |
| 13847 | int | |
| 13848 | main (void) | |
| 13849 | { | |
| 13850 | CFLocaleCopyPreferredLanguages(); | |
| 13851 | ; | |
| 13852 | return 0; | |
| 13853 | } | |
| 13854 | _ACEOF | |
| 13855 | if ac_fn_c_try_link "$LINENO" | |
| 13856 | then : | |
| 13857 | gt_cv_func_CFLocaleCopyPreferredLanguages=yes | |
| 13858 | else case e in #( | |
| 13859 | e) gt_cv_func_CFLocaleCopyPreferredLanguages=no ;; | |
| 13860 | esac | |
| 13861 | fi | |
| 13862 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 13863 | conftest$ac_exeext conftest.$ac_ext | |
| 13864 | LIBS="$gt_save_LIBS" ;; | |
| 13865 | esac | |
| 13866 | fi | |
| 13867 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_cv_func_CFLocaleCopyPreferredLanguages" >&5 | |
| 13868 | printf "%s\n" "$gt_cv_func_CFLocaleCopyPreferredLanguages" >&6; } | |
| 13869 | if test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then | |
| 13870 | ||
| 13871 | printf "%s\n" "#define HAVE_CFLOCALECOPYPREFERREDLANGUAGES 1" >>confdefs.h | |
| 13872 | ||
| 13873 | fi | |
| 13874 | INTL_MACOSX_LIBS= | |
| 13875 | if test $gt_cv_func_CFPreferencesCopyAppValue = yes \ | |
| 13876 | || test $gt_cv_func_CFLocaleCopyPreferredLanguages = yes; then | |
| 13877 | INTL_MACOSX_LIBS="-Wl,-framework -Wl,CoreFoundation" | |
| 13878 | fi | |
| 13879 | ||
| 13880 | ||
| 13881 | ||
| 13882 | ||
| 13883 | ||
| 13884 | ||
| 13885 | BUILD_INCLUDED_LIBINTL=no | |
| 13886 | USE_INCLUDED_LIBINTL=no | |
| 13887 | ||
| 13888 | LIBINTL= | |
| 13889 | LTLIBINTL= | |
| 13890 | POSUB= | |
| 13891 | ||
| 13892 | case " $gt_needs " in | |
| 13893 | *" need-formatstring-macros "*) gt_api_version=3 ;; | |
| 13894 | *" need-ngettext "*) gt_api_version=2 ;; | |
| 13895 | *) gt_api_version=1 ;; | |
| 13896 | esac | |
| 13897 | gt_func_gnugettext_libc="gt_cv_func_gnugettext${gt_api_version}_libc" | |
| 13898 | gt_func_gnugettext_libintl="gt_cv_func_gnugettext${gt_api_version}_libintl" | |
| 13899 | ||
| 13900 | if test "$USE_NLS" = "yes"; then | |
| 13901 | gt_use_preinstalled_gnugettext=no | |
| 13902 | ||
| 13903 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether included gettext is requested" >&5 | |
| 13904 | printf %s "checking whether included gettext is requested... " >&6; } | |
| 13905 | ||
| 13906 | # Check whether --with-included-gettext was given. | |
| 13907 | if test ${with_included_gettext+y} | |
| 13908 | then : | |
| 13909 | withval=$with_included_gettext; nls_cv_force_use_gnu_gettext=$withval | |
| 13910 | else case e in #( | |
| 13911 | e) nls_cv_force_use_gnu_gettext=no ;; | |
| 13912 | esac | |
| 13913 | fi | |
| 13914 | ||
| 13915 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $nls_cv_force_use_gnu_gettext" >&5 | |
| 13916 | printf "%s\n" "$nls_cv_force_use_gnu_gettext" >&6; } | |
| 13917 | ||
| 13918 | nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext" | |
| 13919 | if test "$nls_cv_force_use_gnu_gettext" != "yes"; then | |
| 13920 | ||
| 13921 | ||
| 13922 | if test $gt_api_version -ge 3; then | |
| 13923 | gt_revision_test_code=' | |
| 13924 | #ifndef __GNU_GETTEXT_SUPPORTED_REVISION | |
| 13925 | #define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1) | |
| 13926 | #endif | |
| 13927 | typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1]; | |
| 13928 | ' | |
| 13929 | else | |
| 13930 | gt_revision_test_code= | |
| 13931 | fi | |
| 13932 | if test $gt_api_version -ge 2; then | |
| 13933 | gt_expression_test_code=' + * ngettext ("", "", 0)' | |
| 13934 | else | |
| 13935 | gt_expression_test_code= | |
| 13936 | fi | |
| 13937 | ||
| 13938 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libc" >&5 | |
| 13939 | printf %s "checking for GNU gettext in libc... " >&6; } | |
| 13940 | if eval test \${$gt_func_gnugettext_libc+y} | |
| 13941 | then : | |
| 13942 | printf %s "(cached) " >&6 | |
| 13943 | else case e in #( | |
| 13944 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 13945 | /* end confdefs.h. */ | |
| 13946 | ||
| 13947 | #include <libintl.h> | |
| 13948 | #ifndef __GNU_GETTEXT_SUPPORTED_REVISION | |
| 13949 | extern int _nl_msg_cat_cntr; | |
| 13950 | extern int *_nl_domain_bindings; | |
| 13951 | #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_domain_bindings) | |
| 13952 | #else | |
| 13953 | #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 | |
| 13954 | #endif | |
| 13955 | $gt_revision_test_code | |
| 13956 | ||
| 13957 | int | |
| 13958 | main (void) | |
| 13959 | { | |
| 13960 | ||
| 13961 | bindtextdomain ("", ""); | |
| 13962 | return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION | |
| 13963 | ||
| 13964 | ; | |
| 13965 | return 0; | |
| 13966 | } | |
| 13967 | _ACEOF | |
| 13968 | if ac_fn_c_try_link "$LINENO" | |
| 13969 | then : | |
| 13970 | eval "$gt_func_gnugettext_libc=yes" | |
| 13971 | else case e in #( | |
| 13972 | e) eval "$gt_func_gnugettext_libc=no" ;; | |
| 13973 | esac | |
| 13974 | fi | |
| 13975 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 13976 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 13977 | esac | |
| 13978 | fi | |
| 13979 | eval ac_res=\$$gt_func_gnugettext_libc | |
| 13980 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
| 13981 | printf "%s\n" "$ac_res" >&6; } | |
| 13982 | ||
| 13983 | if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" != "yes"; }; then | |
| 13984 | ||
| 13985 | ||
| 13986 | ||
| 13987 | ||
| 13988 | ||
| 13989 | ||
| 13990 | ||
| 13991 | use_additional=yes | |
| 13992 | ||
| 13993 | acl_save_prefix="$prefix" | |
| 13994 | prefix="$acl_final_prefix" | |
| 13995 | acl_save_exec_prefix="$exec_prefix" | |
| 13996 | exec_prefix="$acl_final_exec_prefix" | |
| 13997 | ||
| 13998 | eval additional_includedir=\"$includedir\" | |
| 13999 | eval additional_libdir=\"$libdir\" | |
| 14000 | eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" | |
| 14001 | eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" | |
| 14002 | ||
| 14003 | exec_prefix="$acl_save_exec_prefix" | |
| 14004 | prefix="$acl_save_prefix" | |
| 14005 | ||
| 14006 | ||
| 14007 | # Check whether --with-libintl-prefix was given. | |
| 14008 | if test ${with_libintl_prefix+y} | |
| 14009 | then : | |
| 14010 | withval=$with_libintl_prefix; | |
| 14011 | if test "X$withval" = "Xno"; then | |
| 14012 | use_additional=no | |
| 14013 | else | |
| 14014 | if test "X$withval" = "X"; then | |
| 14015 | ||
| 14016 | acl_save_prefix="$prefix" | |
| 14017 | prefix="$acl_final_prefix" | |
| 14018 | acl_save_exec_prefix="$exec_prefix" | |
| 14019 | exec_prefix="$acl_final_exec_prefix" | |
| 14020 | ||
| 14021 | eval additional_includedir=\"$includedir\" | |
| 14022 | eval additional_libdir=\"$libdir\" | |
| 14023 | eval additional_libdir2=\"$exec_prefix/$acl_libdirstem2\" | |
| 14024 | eval additional_libdir3=\"$exec_prefix/$acl_libdirstem3\" | |
| 14025 | ||
| 14026 | exec_prefix="$acl_save_exec_prefix" | |
| 14027 | prefix="$acl_save_prefix" | |
| 14028 | ||
| 14029 | else | |
| 14030 | additional_includedir="$withval/include" | |
| 14031 | additional_libdir="$withval/$acl_libdirstem" | |
| 14032 | additional_libdir2="$withval/$acl_libdirstem2" | |
| 14033 | additional_libdir3="$withval/$acl_libdirstem3" | |
| 14034 | fi | |
| 14035 | fi | |
| 14036 | ||
| 14037 | fi | |
| 14038 | ||
| 14039 | if test "X$additional_libdir2" = "X$additional_libdir"; then | |
| 14040 | additional_libdir2= | |
| 14041 | fi | |
| 14042 | if test "X$additional_libdir3" = "X$additional_libdir"; then | |
| 14043 | additional_libdir3= | |
| 14044 | fi | |
| 14045 | LIBINTL= | |
| 14046 | LTLIBINTL= | |
| 14047 | INCINTL= | |
| 14048 | LIBINTL_PREFIX= | |
| 14049 | HAVE_LIBINTL= | |
| 14050 | rpathdirs= | |
| 14051 | ltrpathdirs= | |
| 14052 | names_already_handled= | |
| 14053 | names_next_round='intl ' | |
| 14054 | while test -n "$names_next_round"; do | |
| 14055 | names_this_round="$names_next_round" | |
| 14056 | names_next_round= | |
| 14057 | for name in $names_this_round; do | |
| 14058 | already_handled= | |
| 14059 | for n in $names_already_handled; do | |
| 14060 | if test "$n" = "$name"; then | |
| 14061 | already_handled=yes | |
| 14062 | break | |
| 14063 | fi | |
| 14064 | done | |
| 14065 | if test -z "$already_handled"; then | |
| 14066 | names_already_handled="$names_already_handled $name" | |
| 14067 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./+-|ABCDEFGHIJKLMNOPQRSTUVWXYZ____|'` | |
| 14068 | eval value=\"\$HAVE_LIB$uppername\" | |
| 14069 | if test -n "$value"; then | |
| 14070 | if test "$value" = yes; then | |
| 14071 | eval value=\"\$LIB$uppername\" | |
| 14072 | test -z "$value" || LIBINTL="${LIBINTL}${LIBINTL:+ }$value" | |
| 14073 | eval value=\"\$LTLIB$uppername\" | |
| 14074 | test -z "$value" || LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$value" | |
| 14075 | else | |
| 14076 | : | |
| 14077 | fi | |
| 14078 | else | |
| 14079 | found_dir= | |
| 14080 | found_la= | |
| 14081 | found_so= | |
| 14082 | found_a= | |
| 14083 | eval libname=\"$acl_libname_spec\" # typically: libname=lib$name | |
| 14084 | if test -n "$acl_shlibext"; then | |
| 14085 | shrext=".$acl_shlibext" # typically: shrext=.so | |
| 14086 | else | |
| 14087 | shrext= | |
| 14088 | fi | |
| 14089 | if test $use_additional = yes; then | |
| 14090 | for additional_libdir_variable in additional_libdir additional_libdir2 additional_libdir3; do | |
| 14091 | if test "X$found_dir" = "X"; then | |
| 14092 | eval dir=\$$additional_libdir_variable | |
| 14093 | if test -n "$dir"; then | |
| 14094 | if test -n "$acl_shlibext"; then | |
| 14095 | if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then | |
| 14096 | found_dir="$dir" | |
| 14097 | found_so="$dir/$libname$shrext" | |
| 14098 | else | |
| 14099 | if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then | |
| 14100 | ver=`(cd "$dir" && \ | |
| 14101 | for f in "$libname$shrext".*; do echo "$f"; done \ | |
| 14102 | | sed -e "s,^$libname$shrext\\\\.,," \ | |
| 14103 | | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | |
| 14104 | | sed 1q ) 2>/dev/null` | |
| 14105 | if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then | |
| 14106 | found_dir="$dir" | |
| 14107 | found_so="$dir/$libname$shrext.$ver" | |
| 14108 | fi | |
| 14109 | else | |
| 14110 | eval library_names=\"$acl_library_names_spec\" | |
| 14111 | for f in $library_names; do | |
| 14112 | if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then | |
| 14113 | found_dir="$dir" | |
| 14114 | found_so="$dir/$f" | |
| 14115 | break | |
| 14116 | fi | |
| 14117 | done | |
| 14118 | fi | |
| 14119 | fi | |
| 14120 | fi | |
| 14121 | if test "X$found_dir" = "X"; then | |
| 14122 | if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then | |
| 14123 | found_dir="$dir" | |
| 14124 | found_a="$dir/$libname.$acl_libext" | |
| 14125 | fi | |
| 14126 | fi | |
| 14127 | if test "X$found_dir" != "X"; then | |
| 14128 | if test -f "$dir/$libname.la"; then | |
| 14129 | found_la="$dir/$libname.la" | |
| 14130 | fi | |
| 14131 | fi | |
| 14132 | fi | |
| 14133 | fi | |
| 14134 | done | |
| 14135 | fi | |
| 14136 | if test "X$found_dir" = "X"; then | |
| 14137 | for x in $LDFLAGS $LTLIBINTL; do | |
| 14138 | ||
| 14139 | acl_save_prefix="$prefix" | |
| 14140 | prefix="$acl_final_prefix" | |
| 14141 | acl_save_exec_prefix="$exec_prefix" | |
| 14142 | exec_prefix="$acl_final_exec_prefix" | |
| 14143 | eval x=\"$x\" | |
| 14144 | exec_prefix="$acl_save_exec_prefix" | |
| 14145 | prefix="$acl_save_prefix" | |
| 14146 | ||
| 14147 | case "$x" in | |
| 14148 | -L*) | |
| 14149 | dir=`echo "X$x" | sed -e 's/^X-L//'` | |
| 14150 | if test -n "$acl_shlibext"; then | |
| 14151 | if test -f "$dir/$libname$shrext" && acl_is_expected_elfclass < "$dir/$libname$shrext"; then | |
| 14152 | found_dir="$dir" | |
| 14153 | found_so="$dir/$libname$shrext" | |
| 14154 | else | |
| 14155 | if test "$acl_library_names_spec" = '$libname$shrext$versuffix'; then | |
| 14156 | ver=`(cd "$dir" && \ | |
| 14157 | for f in "$libname$shrext".*; do echo "$f"; done \ | |
| 14158 | | sed -e "s,^$libname$shrext\\\\.,," \ | |
| 14159 | | sort -t '.' -n -r -k1,1 -k2,2 -k3,3 -k4,4 -k5,5 \ | |
| 14160 | | sed 1q ) 2>/dev/null` | |
| 14161 | if test -n "$ver" && test -f "$dir/$libname$shrext.$ver" && acl_is_expected_elfclass < "$dir/$libname$shrext.$ver"; then | |
| 14162 | found_dir="$dir" | |
| 14163 | found_so="$dir/$libname$shrext.$ver" | |
| 14164 | fi | |
| 14165 | else | |
| 14166 | eval library_names=\"$acl_library_names_spec\" | |
| 14167 | for f in $library_names; do | |
| 14168 | if test -f "$dir/$f" && acl_is_expected_elfclass < "$dir/$f"; then | |
| 14169 | found_dir="$dir" | |
| 14170 | found_so="$dir/$f" | |
| 14171 | break | |
| 14172 | fi | |
| 14173 | done | |
| 14174 | fi | |
| 14175 | fi | |
| 14176 | fi | |
| 14177 | if test "X$found_dir" = "X"; then | |
| 14178 | if test -f "$dir/$libname.$acl_libext" && ${AR-ar} -p "$dir/$libname.$acl_libext" | acl_is_expected_elfclass; then | |
| 14179 | found_dir="$dir" | |
| 14180 | found_a="$dir/$libname.$acl_libext" | |
| 14181 | fi | |
| 14182 | fi | |
| 14183 | if test "X$found_dir" != "X"; then | |
| 14184 | if test -f "$dir/$libname.la"; then | |
| 14185 | found_la="$dir/$libname.la" | |
| 14186 | fi | |
| 14187 | fi | |
| 14188 | ;; | |
| 14189 | esac | |
| 14190 | if test "X$found_dir" != "X"; then | |
| 14191 | break | |
| 14192 | fi | |
| 14193 | done | |
| 14194 | fi | |
| 14195 | if test "X$found_dir" != "X"; then | |
| 14196 | LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$found_dir -l$name" | |
| 14197 | if test "X$found_so" != "X"; then | |
| 14198 | if test "$enable_rpath" = no \ | |
| 14199 | || test "X$found_dir" = "X/usr/$acl_libdirstem" \ | |
| 14200 | || test "X$found_dir" = "X/usr/$acl_libdirstem2" \ | |
| 14201 | || test "X$found_dir" = "X/usr/$acl_libdirstem3"; then | |
| 14202 | LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" | |
| 14203 | else | |
| 14204 | haveit= | |
| 14205 | for x in $ltrpathdirs; do | |
| 14206 | if test "X$x" = "X$found_dir"; then | |
| 14207 | haveit=yes | |
| 14208 | break | |
| 14209 | fi | |
| 14210 | done | |
| 14211 | if test -z "$haveit"; then | |
| 14212 | ltrpathdirs="$ltrpathdirs $found_dir" | |
| 14213 | fi | |
| 14214 | if test "$acl_hardcode_direct" = yes; then | |
| 14215 | LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" | |
| 14216 | else | |
| 14217 | if test -n "$acl_hardcode_libdir_flag_spec" && test "$acl_hardcode_minus_L" = no; then | |
| 14218 | LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" | |
| 14219 | haveit= | |
| 14220 | for x in $rpathdirs; do | |
| 14221 | if test "X$x" = "X$found_dir"; then | |
| 14222 | haveit=yes | |
| 14223 | break | |
| 14224 | fi | |
| 14225 | done | |
| 14226 | if test -z "$haveit"; then | |
| 14227 | rpathdirs="$rpathdirs $found_dir" | |
| 14228 | fi | |
| 14229 | else | |
| 14230 | haveit= | |
| 14231 | for x in $LDFLAGS $LIBINTL; do | |
| 14232 | ||
| 14233 | acl_save_prefix="$prefix" | |
| 14234 | prefix="$acl_final_prefix" | |
| 14235 | acl_save_exec_prefix="$exec_prefix" | |
| 14236 | exec_prefix="$acl_final_exec_prefix" | |
| 14237 | eval x=\"$x\" | |
| 14238 | exec_prefix="$acl_save_exec_prefix" | |
| 14239 | prefix="$acl_save_prefix" | |
| 14240 | ||
| 14241 | if test "X$x" = "X-L$found_dir"; then | |
| 14242 | haveit=yes | |
| 14243 | break | |
| 14244 | fi | |
| 14245 | done | |
| 14246 | if test -z "$haveit"; then | |
| 14247 | LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir" | |
| 14248 | fi | |
| 14249 | if test "$acl_hardcode_minus_L" != no; then | |
| 14250 | LIBINTL="${LIBINTL}${LIBINTL:+ }$found_so" | |
| 14251 | else | |
| 14252 | LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" | |
| 14253 | fi | |
| 14254 | fi | |
| 14255 | fi | |
| 14256 | fi | |
| 14257 | else | |
| 14258 | if test "X$found_a" != "X"; then | |
| 14259 | LIBINTL="${LIBINTL}${LIBINTL:+ }$found_a" | |
| 14260 | else | |
| 14261 | LIBINTL="${LIBINTL}${LIBINTL:+ }-L$found_dir -l$name" | |
| 14262 | fi | |
| 14263 | fi | |
| 14264 | additional_includedir= | |
| 14265 | case "$found_dir" in | |
| 14266 | */$acl_libdirstem | */$acl_libdirstem/) | |
| 14267 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem/"'*$,,'` | |
| 14268 | if test "$name" = 'intl'; then | |
| 14269 | LIBINTL_PREFIX="$basedir" | |
| 14270 | fi | |
| 14271 | additional_includedir="$basedir/include" | |
| 14272 | ;; | |
| 14273 | */$acl_libdirstem2 | */$acl_libdirstem2/) | |
| 14274 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem2/"'*$,,'` | |
| 14275 | if test "$name" = 'intl'; then | |
| 14276 | LIBINTL_PREFIX="$basedir" | |
| 14277 | fi | |
| 14278 | additional_includedir="$basedir/include" | |
| 14279 | ;; | |
| 14280 | */$acl_libdirstem3 | */$acl_libdirstem3/) | |
| 14281 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e "s,/$acl_libdirstem3/"'*$,,'` | |
| 14282 | if test "$name" = 'intl'; then | |
| 14283 | LIBINTL_PREFIX="$basedir" | |
| 14284 | fi | |
| 14285 | additional_includedir="$basedir/include" | |
| 14286 | ;; | |
| 14287 | esac | |
| 14288 | if test "X$additional_includedir" != "X"; then | |
| 14289 | if test "X$additional_includedir" != "X/usr/include"; then | |
| 14290 | haveit= | |
| 14291 | if test "X$additional_includedir" = "X/usr/local/include"; then | |
| 14292 | if test -n "$GCC"; then | |
| 14293 | case $host_os in | |
| 14294 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; | |
| 14295 | esac | |
| 14296 | fi | |
| 14297 | fi | |
| 14298 | if test -z "$haveit"; then | |
| 14299 | for x in $CPPFLAGS $INCINTL; do | |
| 14300 | ||
| 14301 | acl_save_prefix="$prefix" | |
| 14302 | prefix="$acl_final_prefix" | |
| 14303 | acl_save_exec_prefix="$exec_prefix" | |
| 14304 | exec_prefix="$acl_final_exec_prefix" | |
| 14305 | eval x=\"$x\" | |
| 14306 | exec_prefix="$acl_save_exec_prefix" | |
| 14307 | prefix="$acl_save_prefix" | |
| 14308 | ||
| 14309 | if test "X$x" = "X-I$additional_includedir"; then | |
| 14310 | haveit=yes | |
| 14311 | break | |
| 14312 | fi | |
| 14313 | done | |
| 14314 | if test -z "$haveit"; then | |
| 14315 | if test -d "$additional_includedir"; then | |
| 14316 | INCINTL="${INCINTL}${INCINTL:+ }-I$additional_includedir" | |
| 14317 | fi | |
| 14318 | fi | |
| 14319 | fi | |
| 14320 | fi | |
| 14321 | fi | |
| 14322 | if test -n "$found_la"; then | |
| 14323 | save_libdir="$libdir" | |
| 14324 | case "$found_la" in | |
| 14325 | */* | *\\*) . "$found_la" ;; | |
| 14326 | *) . "./$found_la" ;; | |
| 14327 | esac | |
| 14328 | libdir="$save_libdir" | |
| 14329 | for dep in $dependency_libs; do | |
| 14330 | case "$dep" in | |
| 14331 | -L*) | |
| 14332 | dependency_libdir=`echo "X$dep" | sed -e 's/^X-L//'` | |
| 14333 | if test "X$dependency_libdir" != "X/usr/$acl_libdirstem" \ | |
| 14334 | && test "X$dependency_libdir" != "X/usr/$acl_libdirstem2" \ | |
| 14335 | && test "X$dependency_libdir" != "X/usr/$acl_libdirstem3"; then | |
| 14336 | haveit= | |
| 14337 | if test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem" \ | |
| 14338 | || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem2" \ | |
| 14339 | || test "X$dependency_libdir" = "X/usr/local/$acl_libdirstem3"; then | |
| 14340 | if test -n "$GCC"; then | |
| 14341 | case $host_os in | |
| 14342 | linux* | gnu* | k*bsd*-gnu) haveit=yes;; | |
| 14343 | esac | |
| 14344 | fi | |
| 14345 | fi | |
| 14346 | if test -z "$haveit"; then | |
| 14347 | haveit= | |
| 14348 | for x in $LDFLAGS $LIBINTL; do | |
| 14349 | ||
| 14350 | acl_save_prefix="$prefix" | |
| 14351 | prefix="$acl_final_prefix" | |
| 14352 | acl_save_exec_prefix="$exec_prefix" | |
| 14353 | exec_prefix="$acl_final_exec_prefix" | |
| 14354 | eval x=\"$x\" | |
| 14355 | exec_prefix="$acl_save_exec_prefix" | |
| 14356 | prefix="$acl_save_prefix" | |
| 14357 | ||
| 14358 | if test "X$x" = "X-L$dependency_libdir"; then | |
| 14359 | haveit=yes | |
| 14360 | break | |
| 14361 | fi | |
| 14362 | done | |
| 14363 | if test -z "$haveit"; then | |
| 14364 | if test -d "$dependency_libdir"; then | |
| 14365 | LIBINTL="${LIBINTL}${LIBINTL:+ }-L$dependency_libdir" | |
| 14366 | fi | |
| 14367 | fi | |
| 14368 | haveit= | |
| 14369 | for x in $LDFLAGS $LTLIBINTL; do | |
| 14370 | ||
| 14371 | acl_save_prefix="$prefix" | |
| 14372 | prefix="$acl_final_prefix" | |
| 14373 | acl_save_exec_prefix="$exec_prefix" | |
| 14374 | exec_prefix="$acl_final_exec_prefix" | |
| 14375 | eval x=\"$x\" | |
| 14376 | exec_prefix="$acl_save_exec_prefix" | |
| 14377 | prefix="$acl_save_prefix" | |
| 14378 | ||
| 14379 | if test "X$x" = "X-L$dependency_libdir"; then | |
| 14380 | haveit=yes | |
| 14381 | break | |
| 14382 | fi | |
| 14383 | done | |
| 14384 | if test -z "$haveit"; then | |
| 14385 | if test -d "$dependency_libdir"; then | |
| 14386 | LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-L$dependency_libdir" | |
| 14387 | fi | |
| 14388 | fi | |
| 14389 | fi | |
| 14390 | fi | |
| 14391 | ;; | |
| 14392 | -R*) | |
| 14393 | dir=`echo "X$dep" | sed -e 's/^X-R//'` | |
| 14394 | if test "$enable_rpath" != no; then | |
| 14395 | haveit= | |
| 14396 | for x in $rpathdirs; do | |
| 14397 | if test "X$x" = "X$dir"; then | |
| 14398 | haveit=yes | |
| 14399 | break | |
| 14400 | fi | |
| 14401 | done | |
| 14402 | if test -z "$haveit"; then | |
| 14403 | rpathdirs="$rpathdirs $dir" | |
| 14404 | fi | |
| 14405 | haveit= | |
| 14406 | for x in $ltrpathdirs; do | |
| 14407 | if test "X$x" = "X$dir"; then | |
| 14408 | haveit=yes | |
| 14409 | break | |
| 14410 | fi | |
| 14411 | done | |
| 14412 | if test -z "$haveit"; then | |
| 14413 | ltrpathdirs="$ltrpathdirs $dir" | |
| 14414 | fi | |
| 14415 | fi | |
| 14416 | ;; | |
| 14417 | -l*) | |
| 14418 | dep=`echo "X$dep" | sed -e 's/^X-l//'` | |
| 14419 | if test "X$dep" != Xc \ | |
| 14420 | || case $host_os in | |
| 14421 | linux* | gnu* | k*bsd*-gnu) false ;; | |
| 14422 | *) true ;; | |
| 14423 | esac; then | |
| 14424 | names_next_round="$names_next_round $dep" | |
| 14425 | fi | |
| 14426 | ;; | |
| 14427 | *.la) | |
| 14428 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` | |
| 14429 | ;; | |
| 14430 | *) | |
| 14431 | LIBINTL="${LIBINTL}${LIBINTL:+ }$dep" | |
| 14432 | LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }$dep" | |
| 14433 | ;; | |
| 14434 | esac | |
| 14435 | done | |
| 14436 | fi | |
| 14437 | else | |
| 14438 | LIBINTL="${LIBINTL}${LIBINTL:+ }-l$name" | |
| 14439 | LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-l$name" | |
| 14440 | fi | |
| 14441 | fi | |
| 14442 | fi | |
| 14443 | done | |
| 14444 | done | |
| 14445 | if test "X$rpathdirs" != "X"; then | |
| 14446 | if test -n "$acl_hardcode_libdir_separator"; then | |
| 14447 | alldirs= | |
| 14448 | for found_dir in $rpathdirs; do | |
| 14449 | alldirs="${alldirs}${alldirs:+$acl_hardcode_libdir_separator}$found_dir" | |
| 14450 | done | |
| 14451 | acl_save_libdir="$libdir" | |
| 14452 | libdir="$alldirs" | |
| 14453 | eval flag=\"$acl_hardcode_libdir_flag_spec\" | |
| 14454 | libdir="$acl_save_libdir" | |
| 14455 | LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" | |
| 14456 | else | |
| 14457 | for found_dir in $rpathdirs; do | |
| 14458 | acl_save_libdir="$libdir" | |
| 14459 | libdir="$found_dir" | |
| 14460 | eval flag=\"$acl_hardcode_libdir_flag_spec\" | |
| 14461 | libdir="$acl_save_libdir" | |
| 14462 | LIBINTL="${LIBINTL}${LIBINTL:+ }$flag" | |
| 14463 | done | |
| 14464 | fi | |
| 14465 | fi | |
| 14466 | if test "X$ltrpathdirs" != "X"; then | |
| 14467 | for found_dir in $ltrpathdirs; do | |
| 14468 | LTLIBINTL="${LTLIBINTL}${LTLIBINTL:+ }-R$found_dir" | |
| 14469 | done | |
| 14470 | fi | |
| 14471 | ||
| 14472 | ||
| 14473 | ||
| 14474 | ||
| 14475 | ||
| 14476 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for GNU gettext in libintl" >&5 | |
| 14477 | printf %s "checking for GNU gettext in libintl... " >&6; } | |
| 14478 | if eval test \${$gt_func_gnugettext_libintl+y} | |
| 14479 | then : | |
| 14480 | printf %s "(cached) " >&6 | |
| 14481 | else case e in #( | |
| 14482 | e) gt_save_CPPFLAGS="$CPPFLAGS" | |
| 14483 | CPPFLAGS="$CPPFLAGS $INCINTL" | |
| 14484 | gt_save_LIBS="$LIBS" | |
| 14485 | LIBS="$LIBS $LIBINTL" | |
| 14486 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 14487 | /* end confdefs.h. */ | |
| 14488 | ||
| 14489 | #include <libintl.h> | |
| 14490 | #ifndef __GNU_GETTEXT_SUPPORTED_REVISION | |
| 14491 | extern int _nl_msg_cat_cntr; | |
| 14492 | extern | |
| 14493 | #ifdef __cplusplus | |
| 14494 | "C" | |
| 14495 | #endif | |
| 14496 | const char *_nl_expand_alias (const char *); | |
| 14497 | #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) | |
| 14498 | #else | |
| 14499 | #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 | |
| 14500 | #endif | |
| 14501 | $gt_revision_test_code | |
| 14502 | ||
| 14503 | int | |
| 14504 | main (void) | |
| 14505 | { | |
| 14506 | ||
| 14507 | bindtextdomain ("", ""); | |
| 14508 | return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION | |
| 14509 | ||
| 14510 | ; | |
| 14511 | return 0; | |
| 14512 | } | |
| 14513 | _ACEOF | |
| 14514 | if ac_fn_c_try_link "$LINENO" | |
| 14515 | then : | |
| 14516 | eval "$gt_func_gnugettext_libintl=yes" | |
| 14517 | else case e in #( | |
| 14518 | e) eval "$gt_func_gnugettext_libintl=no" ;; | |
| 14519 | esac | |
| 14520 | fi | |
| 14521 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 14522 | conftest$ac_exeext conftest.$ac_ext | |
| 14523 | if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" != yes; } && test -n "$LIBICONV"; then | |
| 14524 | LIBS="$LIBS $LIBICONV" | |
| 14525 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 14526 | /* end confdefs.h. */ | |
| 14527 | ||
| 14528 | #include <libintl.h> | |
| 14529 | #ifndef __GNU_GETTEXT_SUPPORTED_REVISION | |
| 14530 | extern int _nl_msg_cat_cntr; | |
| 14531 | extern | |
| 14532 | #ifdef __cplusplus | |
| 14533 | "C" | |
| 14534 | #endif | |
| 14535 | const char *_nl_expand_alias (const char *); | |
| 14536 | #define __GNU_GETTEXT_SYMBOL_EXPRESSION (_nl_msg_cat_cntr + *_nl_expand_alias ("")) | |
| 14537 | #else | |
| 14538 | #define __GNU_GETTEXT_SYMBOL_EXPRESSION 0 | |
| 14539 | #endif | |
| 14540 | $gt_revision_test_code | |
| 14541 | ||
| 14542 | int | |
| 14543 | main (void) | |
| 14544 | { | |
| 14545 | ||
| 14546 | bindtextdomain ("", ""); | |
| 14547 | return * gettext ("")$gt_expression_test_code + __GNU_GETTEXT_SYMBOL_EXPRESSION | |
| 14548 | ||
| 14549 | ; | |
| 14550 | return 0; | |
| 14551 | } | |
| 14552 | _ACEOF | |
| 14553 | if ac_fn_c_try_link "$LINENO" | |
| 14554 | then : | |
| 14555 | LIBINTL="$LIBINTL $LIBICONV" | |
| 14556 | LTLIBINTL="$LTLIBINTL $LTLIBICONV" | |
| 14557 | eval "$gt_func_gnugettext_libintl=yes" | |
| 14558 | ||
| 14559 | fi | |
| 14560 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 14561 | conftest$ac_exeext conftest.$ac_ext | |
| 14562 | fi | |
| 14563 | CPPFLAGS="$gt_save_CPPFLAGS" | |
| 14564 | LIBS="$gt_save_LIBS" ;; | |
| 14565 | esac | |
| 14566 | fi | |
| 14567 | eval ac_res=\$$gt_func_gnugettext_libintl | |
| 14568 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
| 14569 | printf "%s\n" "$ac_res" >&6; } | |
| 14570 | fi | |
| 14571 | ||
| 14572 | if { eval "gt_val=\$$gt_func_gnugettext_libc"; test "$gt_val" = "yes"; } \ | |
| 14573 | || { { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; } \ | |
| 14574 | && test "$PACKAGE" != gettext-runtime \ | |
| 14575 | && test "$PACKAGE" != gettext-tools; }; then | |
| 14576 | gt_use_preinstalled_gnugettext=yes | |
| 14577 | else | |
| 14578 | LIBINTL= | |
| 14579 | LTLIBINTL= | |
| 14580 | INCINTL= | |
| 14581 | fi | |
| 14582 | ||
| 14583 | ||
| 14584 | if test "$gt_use_preinstalled_gnugettext" != "yes"; then | |
| 14585 | nls_cv_use_gnu_gettext=yes | |
| 14586 | fi | |
| 14587 | fi | |
| 14588 | ||
| 14589 | if test "$nls_cv_use_gnu_gettext" = "yes"; then | |
| 14590 | BUILD_INCLUDED_LIBINTL=yes | |
| 14591 | USE_INCLUDED_LIBINTL=yes | |
| 14592 | # LIBINTL="m4_if([lib/intl],[],\${top_builddir}/intl,[lib/intl])/libintl.la $LIBICONV $LIBTHREAD" | |
| 14593 | # we don't build with libtool | |
| 14594 | LIBINTL="lib/intl/libintl.a $LIBICONV $LIBTHREAD" | |
| 14595 | LTLIBINTL="lib/intl/libintl.la $LTLIBICONV $LTLIBTHREAD" | |
| 14596 | LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'` | |
| 14597 | fi | |
| 14598 | ||
| 14599 | CATOBJEXT= | |
| 14600 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | |
| 14601 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | |
| 14602 | CATOBJEXT=.gmo | |
| 14603 | fi | |
| 14604 | ||
| 14605 | ||
| 14606 | if test -n "$INTL_MACOSX_LIBS"; then | |
| 14607 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | |
| 14608 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | |
| 14609 | LIBINTL="$LIBINTL $INTL_MACOSX_LIBS" | |
| 14610 | LTLIBINTL="$LTLIBINTL $INTL_MACOSX_LIBS" | |
| 14611 | fi | |
| 14612 | fi | |
| 14613 | ||
| 14614 | if test "$gt_use_preinstalled_gnugettext" = "yes" \ | |
| 14615 | || test "$nls_cv_use_gnu_gettext" = "yes"; then | |
| 14616 | ||
| 14617 | printf "%s\n" "#define ENABLE_NLS 1" >>confdefs.h | |
| 14618 | ||
| 14619 | else | |
| 14620 | USE_NLS=no | |
| 14621 | fi | |
| 14622 | fi | |
| 14623 | ||
| 14624 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether to use NLS" >&5 | |
| 14625 | printf %s "checking whether to use NLS... " >&6; } | |
| 14626 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $USE_NLS" >&5 | |
| 14627 | printf "%s\n" "$USE_NLS" >&6; } | |
| 14628 | if test "$USE_NLS" = "yes"; then | |
| 14629 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking where the gettext function comes from" >&5 | |
| 14630 | printf %s "checking where the gettext function comes from... " >&6; } | |
| 14631 | if test "$gt_use_preinstalled_gnugettext" = "yes"; then | |
| 14632 | if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then | |
| 14633 | gt_source="external libintl" | |
| 14634 | else | |
| 14635 | gt_source="libc" | |
| 14636 | fi | |
| 14637 | else | |
| 14638 | gt_source="included intl directory" | |
| 14639 | fi | |
| 14640 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gt_source" >&5 | |
| 14641 | printf "%s\n" "$gt_source" >&6; } | |
| 14642 | fi | |
| 14643 | ||
| 14644 | if test "$USE_NLS" = "yes"; then | |
| 14645 | ||
| 14646 | if test "$gt_use_preinstalled_gnugettext" = "yes"; then | |
| 14647 | if { eval "gt_val=\$$gt_func_gnugettext_libintl"; test "$gt_val" = "yes"; }; then | |
| 14648 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking how to link with libintl" >&5 | |
| 14649 | printf %s "checking how to link with libintl... " >&6; } | |
| 14650 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $LIBINTL" >&5 | |
| 14651 | printf "%s\n" "$LIBINTL" >&6; } | |
| 14652 | ||
| 14653 | for element in $INCINTL; do | |
| 14654 | haveit= | |
| 14655 | for x in $CPPFLAGS; do | |
| 14656 | ||
| 14657 | acl_save_prefix="$prefix" | |
| 14658 | prefix="$acl_final_prefix" | |
| 14659 | acl_save_exec_prefix="$exec_prefix" | |
| 14660 | exec_prefix="$acl_final_exec_prefix" | |
| 14661 | eval x=\"$x\" | |
| 14662 | exec_prefix="$acl_save_exec_prefix" | |
| 14663 | prefix="$acl_save_prefix" | |
| 14664 | ||
| 14665 | if test "X$x" = "X$element"; then | |
| 14666 | haveit=yes | |
| 14667 | break | |
| 14668 | fi | |
| 14669 | done | |
| 14670 | if test -z "$haveit"; then | |
| 14671 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" | |
| 14672 | fi | |
| 14673 | done | |
| 14674 | ||
| 14675 | fi | |
| 14676 | ||
| 14677 | ||
| 14678 | printf "%s\n" "#define HAVE_GETTEXT 1" >>confdefs.h | |
| 14679 | ||
| 14680 | ||
| 14681 | printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h | |
| 14682 | ||
| 14683 | fi | |
| 14684 | ||
| 14685 | POSUB=po | |
| 14686 | fi | |
| 14687 | ||
| 14688 | ||
| 14689 | BUILD_INCLUDED_LIBINTL=yes | |
| 14690 | ||
| 14691 | ||
| 14692 | ||
| 14693 | ||
| 14694 | ||
| 14695 | ||
| 14696 | INTLLIBS="$LIBINTL" | |
| 14697 | ||
| 14698 | ||
| 14699 | ||
| 14700 | ||
| 14701 | ||
| 14702 | ||
| 14703 | ||
| 14704 | ac_header_dirent=no | |
| 14705 | for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do | |
| 14706 | as_ac_Header=`printf "%s\n" "ac_cv_header_dirent_$ac_hdr" | sed "$as_sed_sh"` | |
| 14707 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 | |
| 14708 | printf %s "checking for $ac_hdr that defines DIR... " >&6; } | |
| 14709 | if eval test \${$as_ac_Header+y} | |
| 14710 | then : | |
| 14711 | printf %s "(cached) " >&6 | |
| 14712 | else case e in #( | |
| 14713 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 14714 | /* end confdefs.h. */ | |
| 14715 | #include <sys/types.h> | |
| 14716 | #include <$ac_hdr> | |
| 14717 | ||
| 14718 | int | |
| 14719 | main (void) | |
| 14720 | { | |
| 14721 | if ((DIR *) 0) | |
| 14722 | return 0; | |
| 14723 | ; | |
| 14724 | return 0; | |
| 14725 | } | |
| 14726 | _ACEOF | |
| 14727 | if ac_fn_c_try_compile "$LINENO" | |
| 14728 | then : | |
| 14729 | eval "$as_ac_Header=yes" | |
| 14730 | else case e in #( | |
| 14731 | e) eval "$as_ac_Header=no" ;; | |
| 14732 | esac | |
| 14733 | fi | |
| 14734 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 14735 | esac | |
| 14736 | fi | |
| 14737 | eval ac_res=\$$as_ac_Header | |
| 14738 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 | |
| 14739 | printf "%s\n" "$ac_res" >&6; } | |
| 14740 | if eval test \"x\$"$as_ac_Header"\" = x"yes" | |
| 14741 | then : | |
| 14742 | cat >>confdefs.h <<_ACEOF | |
| 14743 | #define `printf "%s\n" "HAVE_$ac_hdr" | sed "$as_sed_cpp"` 1 | |
| 14744 | _ACEOF | |
| 14745 | ||
| 14746 | ac_header_dirent=$ac_hdr; break | |
| 14747 | fi | |
| 14748 | ||
| 14749 | done | |
| 14750 | # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. | |
| 14751 | if test $ac_header_dirent = dirent.h; then | |
| 14752 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 | |
| 14753 | printf %s "checking for library containing opendir... " >&6; } | |
| 14754 | if test ${ac_cv_search_opendir+y} | |
| 14755 | then : | |
| 14756 | printf %s "(cached) " >&6 | |
| 14757 | else case e in #( | |
| 14758 | e) ac_func_search_save_LIBS=$LIBS | |
| 14759 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 14760 | /* end confdefs.h. */ | |
| 14761 | ||
| 14762 | /* Override any GCC internal prototype to avoid an error. | |
| 14763 | Use char because int might match the return type of a GCC | |
| 14764 | builtin and then its argument prototype would still apply. | |
| 14765 | The 'extern "C"' is for builds by C++ compilers; | |
| 14766 | although this is not generally supported in C code supporting it here | |
| 14767 | has little cost and some practical benefit (sr 110532). */ | |
| 14768 | #ifdef __cplusplus | |
| 14769 | extern "C" | |
| 14770 | #endif | |
| 14771 | char opendir (void); | |
| 14772 | int | |
| 14773 | main (void) | |
| 14774 | { | |
| 14775 | return opendir (); | |
| 14776 | ; | |
| 14777 | return 0; | |
| 14778 | } | |
| 14779 | _ACEOF | |
| 14780 | for ac_lib in '' dir | |
| 14781 | do | |
| 14782 | if test -z "$ac_lib"; then | |
| 14783 | ac_res="none required" | |
| 14784 | else | |
| 14785 | ac_res=-l$ac_lib | |
| 14786 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
| 14787 | fi | |
| 14788 | if ac_fn_c_try_link "$LINENO" | |
| 14789 | then : | |
| 14790 | ac_cv_search_opendir=$ac_res | |
| 14791 | fi | |
| 14792 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 14793 | conftest$ac_exeext | |
| 14794 | if test ${ac_cv_search_opendir+y} | |
| 14795 | then : | |
| 14796 | break | |
| 14797 | fi | |
| 14798 | done | |
| 14799 | if test ${ac_cv_search_opendir+y} | |
| 14800 | then : | |
| 14801 | ||
| 14802 | else case e in #( | |
| 14803 | e) ac_cv_search_opendir=no ;; | |
| 14804 | esac | |
| 14805 | fi | |
| 14806 | rm conftest.$ac_ext | |
| 14807 | LIBS=$ac_func_search_save_LIBS ;; | |
| 14808 | esac | |
| 14809 | fi | |
| 14810 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 | |
| 14811 | printf "%s\n" "$ac_cv_search_opendir" >&6; } | |
| 14812 | ac_res=$ac_cv_search_opendir | |
| 14813 | if test "$ac_res" != no | |
| 14814 | then : | |
| 14815 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
| 14816 | ||
| 14817 | fi | |
| 14818 | ||
| 14819 | else | |
| 14820 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 | |
| 14821 | printf %s "checking for library containing opendir... " >&6; } | |
| 14822 | if test ${ac_cv_search_opendir+y} | |
| 14823 | then : | |
| 14824 | printf %s "(cached) " >&6 | |
| 14825 | else case e in #( | |
| 14826 | e) ac_func_search_save_LIBS=$LIBS | |
| 14827 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 14828 | /* end confdefs.h. */ | |
| 14829 | ||
| 14830 | /* Override any GCC internal prototype to avoid an error. | |
| 14831 | Use char because int might match the return type of a GCC | |
| 14832 | builtin and then its argument prototype would still apply. | |
| 14833 | The 'extern "C"' is for builds by C++ compilers; | |
| 14834 | although this is not generally supported in C code supporting it here | |
| 14835 | has little cost and some practical benefit (sr 110532). */ | |
| 14836 | #ifdef __cplusplus | |
| 14837 | extern "C" | |
| 14838 | #endif | |
| 14839 | char opendir (void); | |
| 14840 | int | |
| 14841 | main (void) | |
| 14842 | { | |
| 14843 | return opendir (); | |
| 14844 | ; | |
| 14845 | return 0; | |
| 14846 | } | |
| 14847 | _ACEOF | |
| 14848 | for ac_lib in '' x | |
| 14849 | do | |
| 14850 | if test -z "$ac_lib"; then | |
| 14851 | ac_res="none required" | |
| 14852 | else | |
| 14853 | ac_res=-l$ac_lib | |
| 14854 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" | |
| 14855 | fi | |
| 14856 | if ac_fn_c_try_link "$LINENO" | |
| 14857 | then : | |
| 14858 | ac_cv_search_opendir=$ac_res | |
| 14859 | fi | |
| 14860 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 14861 | conftest$ac_exeext | |
| 14862 | if test ${ac_cv_search_opendir+y} | |
| 14863 | then : | |
| 14864 | break | |
| 14865 | fi | |
| 14866 | done | |
| 14867 | if test ${ac_cv_search_opendir+y} | |
| 14868 | then : | |
| 14869 | ||
| 14870 | else case e in #( | |
| 14871 | e) ac_cv_search_opendir=no ;; | |
| 14872 | esac | |
| 14873 | fi | |
| 14874 | rm conftest.$ac_ext | |
| 14875 | LIBS=$ac_func_search_save_LIBS ;; | |
| 14876 | esac | |
| 14877 | fi | |
| 14878 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 | |
| 14879 | printf "%s\n" "$ac_cv_search_opendir" >&6; } | |
| 14880 | ac_res=$ac_cv_search_opendir | |
| 14881 | if test "$ac_res" != no | |
| 14882 | then : | |
| 14883 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" | |
| 14884 | ||
| 14885 | fi | |
| 14886 | ||
| 14887 | fi | |
| 14888 | ||
| 14889 | ||
| 14890 | ac_fn_c_check_header_compile "$LINENO" "sys/mkdev.h" "ac_cv_header_sys_mkdev_h" "$ac_includes_default" | |
| 14891 | if test "x$ac_cv_header_sys_mkdev_h" = xyes | |
| 14892 | then : | |
| 14893 | ||
| 14894 | printf "%s\n" "#define MAJOR_IN_MKDEV 1" >>confdefs.h | |
| 14895 | ||
| 14896 | fi | |
| 14897 | ||
| 14898 | if test $ac_cv_header_sys_mkdev_h = no; then | |
| 14899 | ac_fn_c_check_header_compile "$LINENO" "sys/sysmacros.h" "ac_cv_header_sys_sysmacros_h" "$ac_includes_default" | |
| 14900 | if test "x$ac_cv_header_sys_sysmacros_h" = xyes | |
| 14901 | then : | |
| 14902 | ||
| 14903 | printf "%s\n" "#define MAJOR_IN_SYSMACROS 1" >>confdefs.h | |
| 14904 | ||
| 14905 | fi | |
| 14906 | ||
| 14907 | fi | |
| 14908 | ||
| 14909 | ||
| 14910 | ||
| 14911 | ac_fn_c_check_header_compile "$LINENO" "inttypes.h" "ac_cv_header_inttypes_h" "$ac_includes_default" | |
| 14912 | if test "x$ac_cv_header_inttypes_h" = xyes | |
| 14913 | then : | |
| 14914 | printf "%s\n" "#define HAVE_INTTYPES_H 1" >>confdefs.h | |
| 14915 | ||
| 14916 | fi | |
| 14917 | ||
| 14918 | ||
| 14919 | ||
| 14920 | ac_fn_c_check_header_compile "$LINENO" "unistd.h" "ac_cv_header_unistd_h" "$ac_includes_default" | |
| 14921 | if test "x$ac_cv_header_unistd_h" = xyes | |
| 14922 | then : | |
| 14923 | printf "%s\n" "#define HAVE_UNISTD_H 1" >>confdefs.h | |
| 14924 | ||
| 14925 | fi | |
| 14926 | ac_fn_c_check_header_compile "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" | |
| 14927 | if test "x$ac_cv_header_stdlib_h" = xyes | |
| 14928 | then : | |
| 14929 | printf "%s\n" "#define HAVE_STDLIB_H 1" >>confdefs.h | |
| 14930 | ||
| 14931 | fi | |
| 14932 | ac_fn_c_check_header_compile "$LINENO" "varargs.h" "ac_cv_header_varargs_h" "$ac_includes_default" | |
| 14933 | if test "x$ac_cv_header_varargs_h" = xyes | |
| 14934 | then : | |
| 14935 | printf "%s\n" "#define HAVE_VARARGS_H 1" >>confdefs.h | |
| 14936 | ||
| 14937 | fi | |
| 14938 | ac_fn_c_check_header_compile "$LINENO" "limits.h" "ac_cv_header_limits_h" "$ac_includes_default" | |
| 14939 | if test "x$ac_cv_header_limits_h" = xyes | |
| 14940 | then : | |
| 14941 | printf "%s\n" "#define HAVE_LIMITS_H 1" >>confdefs.h | |
| 14942 | ||
| 14943 | fi | |
| 14944 | ac_fn_c_check_header_compile "$LINENO" "string.h" "ac_cv_header_string_h" "$ac_includes_default" | |
| 14945 | if test "x$ac_cv_header_string_h" = xyes | |
| 14946 | then : | |
| 14947 | printf "%s\n" "#define HAVE_STRING_H 1" >>confdefs.h | |
| 14948 | ||
| 14949 | fi | |
| 14950 | ac_fn_c_check_header_compile "$LINENO" "memory.h" "ac_cv_header_memory_h" "$ac_includes_default" | |
| 14951 | if test "x$ac_cv_header_memory_h" = xyes | |
| 14952 | then : | |
| 14953 | printf "%s\n" "#define HAVE_MEMORY_H 1" >>confdefs.h | |
| 14954 | ||
| 14955 | fi | |
| 14956 | ac_fn_c_check_header_compile "$LINENO" "locale.h" "ac_cv_header_locale_h" "$ac_includes_default" | |
| 14957 | if test "x$ac_cv_header_locale_h" = xyes | |
| 14958 | then : | |
| 14959 | printf "%s\n" "#define HAVE_LOCALE_H 1" >>confdefs.h | |
| 14960 | ||
| 14961 | fi | |
| 14962 | ac_fn_c_check_header_compile "$LINENO" "termcap.h" "ac_cv_header_termcap_h" "$ac_includes_default" | |
| 14963 | if test "x$ac_cv_header_termcap_h" = xyes | |
| 14964 | then : | |
| 14965 | printf "%s\n" "#define HAVE_TERMCAP_H 1" >>confdefs.h | |
| 14966 | ||
| 14967 | fi | |
| 14968 | ac_fn_c_check_header_compile "$LINENO" "termio.h" "ac_cv_header_termio_h" "$ac_includes_default" | |
| 14969 | if test "x$ac_cv_header_termio_h" = xyes | |
| 14970 | then : | |
| 14971 | printf "%s\n" "#define HAVE_TERMIO_H 1" >>confdefs.h | |
| 14972 | ||
| 14973 | fi | |
| 14974 | ac_fn_c_check_header_compile "$LINENO" "termios.h" "ac_cv_header_termios_h" "$ac_includes_default" | |
| 14975 | if test "x$ac_cv_header_termios_h" = xyes | |
| 14976 | then : | |
| 14977 | printf "%s\n" "#define HAVE_TERMIOS_H 1" >>confdefs.h | |
| 14978 | ||
| 14979 | fi | |
| 14980 | ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default" | |
| 14981 | if test "x$ac_cv_header_dlfcn_h" = xyes | |
| 14982 | then : | |
| 14983 | printf "%s\n" "#define HAVE_DLFCN_H 1" >>confdefs.h | |
| 14984 | ||
| 14985 | fi | |
| 14986 | ac_fn_c_check_header_compile "$LINENO" "stddef.h" "ac_cv_header_stddef_h" "$ac_includes_default" | |
| 14987 | if test "x$ac_cv_header_stddef_h" = xyes | |
| 14988 | then : | |
| 14989 | printf "%s\n" "#define HAVE_STDDEF_H 1" >>confdefs.h | |
| 14990 | ||
| 14991 | fi | |
| 14992 | ac_fn_c_check_header_compile "$LINENO" "stdint.h" "ac_cv_header_stdint_h" "$ac_includes_default" | |
| 14993 | if test "x$ac_cv_header_stdint_h" = xyes | |
| 14994 | then : | |
| 14995 | printf "%s\n" "#define HAVE_STDINT_H 1" >>confdefs.h | |
| 14996 | ||
| 14997 | fi | |
| 14998 | ac_fn_c_check_header_compile "$LINENO" "netdb.h" "ac_cv_header_netdb_h" "$ac_includes_default" | |
| 14999 | if test "x$ac_cv_header_netdb_h" = xyes | |
| 15000 | then : | |
| 15001 | printf "%s\n" "#define HAVE_NETDB_H 1" >>confdefs.h | |
| 15002 | ||
| 15003 | fi | |
| 15004 | ac_fn_c_check_header_compile "$LINENO" "pwd.h" "ac_cv_header_pwd_h" "$ac_includes_default" | |
| 15005 | if test "x$ac_cv_header_pwd_h" = xyes | |
| 15006 | then : | |
| 15007 | printf "%s\n" "#define HAVE_PWD_H 1" >>confdefs.h | |
| 15008 | ||
| 15009 | fi | |
| 15010 | ac_fn_c_check_header_compile "$LINENO" "grp.h" "ac_cv_header_grp_h" "$ac_includes_default" | |
| 15011 | if test "x$ac_cv_header_grp_h" = xyes | |
| 15012 | then : | |
| 15013 | printf "%s\n" "#define HAVE_GRP_H 1" >>confdefs.h | |
| 15014 | ||
| 15015 | fi | |
| 15016 | ac_fn_c_check_header_compile "$LINENO" "strings.h" "ac_cv_header_strings_h" "$ac_includes_default" | |
| 15017 | if test "x$ac_cv_header_strings_h" = xyes | |
| 15018 | then : | |
| 15019 | printf "%s\n" "#define HAVE_STRINGS_H 1" >>confdefs.h | |
| 15020 | ||
| 15021 | fi | |
| 15022 | ac_fn_c_check_header_compile "$LINENO" "stdckdint.h" "ac_cv_header_stdckdint_h" "$ac_includes_default" | |
| 15023 | if test "x$ac_cv_header_stdckdint_h" = xyes | |
| 15024 | then : | |
| 15025 | printf "%s\n" "#define HAVE_STDCKDINT_H 1" >>confdefs.h | |
| 15026 | ||
| 15027 | fi | |
| 15028 | ac_fn_c_check_header_compile "$LINENO" "regex.h" "ac_cv_header_regex_h" "$ac_includes_default" | |
| 15029 | if test "x$ac_cv_header_regex_h" = xyes | |
| 15030 | then : | |
| 15031 | printf "%s\n" "#define HAVE_REGEX_H 1" >>confdefs.h | |
| 15032 | ||
| 15033 | fi | |
| 15034 | ac_fn_c_check_header_compile "$LINENO" "syslog.h" "ac_cv_header_syslog_h" "$ac_includes_default" | |
| 15035 | if test "x$ac_cv_header_syslog_h" = xyes | |
| 15036 | then : | |
| 15037 | printf "%s\n" "#define HAVE_SYSLOG_H 1" >>confdefs.h | |
| 15038 | ||
| 15039 | fi | |
| 15040 | ac_fn_c_check_header_compile "$LINENO" "ulimit.h" "ac_cv_header_ulimit_h" "$ac_includes_default" | |
| 15041 | if test "x$ac_cv_header_ulimit_h" = xyes | |
| 15042 | then : | |
| 15043 | printf "%s\n" "#define HAVE_ULIMIT_H 1" >>confdefs.h | |
| 15044 | ||
| 15045 | fi | |
| 15046 | ||
| 15047 | ac_fn_c_check_header_compile "$LINENO" "sys/pte.h" "ac_cv_header_sys_pte_h" "$ac_includes_default" | |
| 15048 | if test "x$ac_cv_header_sys_pte_h" = xyes | |
| 15049 | then : | |
| 15050 | printf "%s\n" "#define HAVE_SYS_PTE_H 1" >>confdefs.h | |
| 15051 | ||
| 15052 | fi | |
| 15053 | ac_fn_c_check_header_compile "$LINENO" "sys/stream.h" "ac_cv_header_sys_stream_h" "$ac_includes_default" | |
| 15054 | if test "x$ac_cv_header_sys_stream_h" = xyes | |
| 15055 | then : | |
| 15056 | printf "%s\n" "#define HAVE_SYS_STREAM_H 1" >>confdefs.h | |
| 15057 | ||
| 15058 | fi | |
| 15059 | ac_fn_c_check_header_compile "$LINENO" "sys/select.h" "ac_cv_header_sys_select_h" "$ac_includes_default" | |
| 15060 | if test "x$ac_cv_header_sys_select_h" = xyes | |
| 15061 | then : | |
| 15062 | printf "%s\n" "#define HAVE_SYS_SELECT_H 1" >>confdefs.h | |
| 15063 | ||
| 15064 | fi | |
| 15065 | ac_fn_c_check_header_compile "$LINENO" "sys/file.h" "ac_cv_header_sys_file_h" "$ac_includes_default" | |
| 15066 | if test "x$ac_cv_header_sys_file_h" = xyes | |
| 15067 | then : | |
| 15068 | printf "%s\n" "#define HAVE_SYS_FILE_H 1" >>confdefs.h | |
| 15069 | ||
| 15070 | fi | |
| 15071 | ac_fn_c_check_header_compile "$LINENO" "sys/ioctl.h" "ac_cv_header_sys_ioctl_h" "$ac_includes_default" | |
| 15072 | if test "x$ac_cv_header_sys_ioctl_h" = xyes | |
| 15073 | then : | |
| 15074 | printf "%s\n" "#define HAVE_SYS_IOCTL_H 1" >>confdefs.h | |
| 15075 | ||
| 15076 | fi | |
| 15077 | ac_fn_c_check_header_compile "$LINENO" "sys/mman.h" "ac_cv_header_sys_mman_h" "$ac_includes_default" | |
| 15078 | if test "x$ac_cv_header_sys_mman_h" = xyes | |
| 15079 | then : | |
| 15080 | printf "%s\n" "#define HAVE_SYS_MMAN_H 1" >>confdefs.h | |
| 15081 | ||
| 15082 | fi | |
| 15083 | ac_fn_c_check_header_compile "$LINENO" "sys/param.h" "ac_cv_header_sys_param_h" "$ac_includes_default" | |
| 15084 | if test "x$ac_cv_header_sys_param_h" = xyes | |
| 15085 | then : | |
| 15086 | printf "%s\n" "#define HAVE_SYS_PARAM_H 1" >>confdefs.h | |
| 15087 | ||
| 15088 | fi | |
| 15089 | ac_fn_c_check_header_compile "$LINENO" "sys/random.h" "ac_cv_header_sys_random_h" "$ac_includes_default" | |
| 15090 | if test "x$ac_cv_header_sys_random_h" = xyes | |
| 15091 | then : | |
| 15092 | printf "%s\n" "#define HAVE_SYS_RANDOM_H 1" >>confdefs.h | |
| 15093 | ||
| 15094 | fi | |
| 15095 | ac_fn_c_check_header_compile "$LINENO" "sys/socket.h" "ac_cv_header_sys_socket_h" "$ac_includes_default" | |
| 15096 | if test "x$ac_cv_header_sys_socket_h" = xyes | |
| 15097 | then : | |
| 15098 | printf "%s\n" "#define HAVE_SYS_SOCKET_H 1" >>confdefs.h | |
| 15099 | ||
| 15100 | fi | |
| 15101 | ac_fn_c_check_header_compile "$LINENO" "sys/stat.h" "ac_cv_header_sys_stat_h" "$ac_includes_default" | |
| 15102 | if test "x$ac_cv_header_sys_stat_h" = xyes | |
| 15103 | then : | |
| 15104 | printf "%s\n" "#define HAVE_SYS_STAT_H 1" >>confdefs.h | |
| 15105 | ||
| 15106 | fi | |
| 15107 | ac_fn_c_check_header_compile "$LINENO" "sys/time.h" "ac_cv_header_sys_time_h" "$ac_includes_default" | |
| 15108 | if test "x$ac_cv_header_sys_time_h" = xyes | |
| 15109 | then : | |
| 15110 | printf "%s\n" "#define HAVE_SYS_TIME_H 1" >>confdefs.h | |
| 15111 | ||
| 15112 | fi | |
| 15113 | ac_fn_c_check_header_compile "$LINENO" "sys/times.h" "ac_cv_header_sys_times_h" "$ac_includes_default" | |
| 15114 | if test "x$ac_cv_header_sys_times_h" = xyes | |
| 15115 | then : | |
| 15116 | printf "%s\n" "#define HAVE_SYS_TIMES_H 1" >>confdefs.h | |
| 15117 | ||
| 15118 | fi | |
| 15119 | ac_fn_c_check_header_compile "$LINENO" "sys/types.h" "ac_cv_header_sys_types_h" "$ac_includes_default" | |
| 15120 | if test "x$ac_cv_header_sys_types_h" = xyes | |
| 15121 | then : | |
| 15122 | printf "%s\n" "#define HAVE_SYS_TYPES_H 1" >>confdefs.h | |
| 15123 | ||
| 15124 | fi | |
| 15125 | ac_fn_c_check_header_compile "$LINENO" "sys/wait.h" "ac_cv_header_sys_wait_h" "$ac_includes_default" | |
| 15126 | if test "x$ac_cv_header_sys_wait_h" = xyes | |
| 15127 | then : | |
| 15128 | printf "%s\n" "#define HAVE_SYS_WAIT_H 1" >>confdefs.h | |
| 15129 | ||
| 15130 | fi | |
| 15131 | ||
| 15132 | ac_fn_c_check_header_compile "$LINENO" "netinet/in.h" "ac_cv_header_netinet_in_h" "$ac_includes_default" | |
| 15133 | if test "x$ac_cv_header_netinet_in_h" = xyes | |
| 15134 | then : | |
| 15135 | printf "%s\n" "#define HAVE_NETINET_IN_H 1" >>confdefs.h | |
| 15136 | ||
| 15137 | fi | |
| 15138 | ac_fn_c_check_header_compile "$LINENO" "arpa/inet.h" "ac_cv_header_arpa_inet_h" "$ac_includes_default" | |
| 15139 | if test "x$ac_cv_header_arpa_inet_h" = xyes | |
| 15140 | then : | |
| 15141 | printf "%s\n" "#define HAVE_ARPA_INET_H 1" >>confdefs.h | |
| 15142 | ||
| 15143 | fi | |
| 15144 | ||
| 15145 | ||
| 15146 | ac_fn_c_check_header_compile "$LINENO" "sys/ptem.h" "ac_cv_header_sys_ptem_h" " | |
| 15147 | #if HAVE_SYS_STREAM_H | |
| 15148 | # include <sys/stream.h> | |
| 15149 | #endif | |
| 15150 | ||
| 15151 | " | |
| 15152 | if test "x$ac_cv_header_sys_ptem_h" = xyes | |
| 15153 | then : | |
| 15154 | ||
| 15155 | fi | |
| 15156 | ||
| 15157 | ||
| 15158 | ac_fn_c_check_header_compile "$LINENO" "sys/resource.h" "ac_cv_header_sys_resource_h" " | |
| 15159 | #if HAVE_SYS_TIME_H | |
| 15160 | # include <sys/time.h> | |
| 15161 | #endif | |
| 15162 | ||
| 15163 | " | |
| 15164 | if test "x$ac_cv_header_sys_resource_h" = xyes | |
| 15165 | then : | |
| 15166 | printf "%s\n" "#define HAVE_SYS_RESOURCE_H 1" >>confdefs.h | |
| 15167 | ||
| 15168 | fi | |
| 15169 | ||
| 15170 | ||
| 15171 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works | |
| 15172 | # for constant arguments. Useless! | |
| 15173 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 | |
| 15174 | printf %s "checking for working alloca.h... " >&6; } | |
| 15175 | if test ${ac_cv_working_alloca_h+y} | |
| 15176 | then : | |
| 15177 | printf %s "(cached) " >&6 | |
| 15178 | else case e in #( | |
| 15179 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 15180 | /* end confdefs.h. */ | |
| 15181 | #include <alloca.h> | |
| 15182 | int | |
| 15183 | main (void) | |
| 15184 | { | |
| 15185 | char *p = (char *) alloca (2 * sizeof (int)); | |
| 15186 | if (p) return 0; | |
| 15187 | ; | |
| 15188 | return 0; | |
| 15189 | } | |
| 15190 | _ACEOF | |
| 15191 | if ac_fn_c_try_link "$LINENO" | |
| 15192 | then : | |
| 15193 | ac_cv_working_alloca_h=yes | |
| 15194 | else case e in #( | |
| 15195 | e) ac_cv_working_alloca_h=no ;; | |
| 15196 | esac | |
| 15197 | fi | |
| 15198 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 15199 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 15200 | esac | |
| 15201 | fi | |
| 15202 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 | |
| 15203 | printf "%s\n" "$ac_cv_working_alloca_h" >&6; } | |
| 15204 | if test $ac_cv_working_alloca_h = yes; then | |
| 15205 | ||
| 15206 | printf "%s\n" "#define HAVE_ALLOCA_H 1" >>confdefs.h | |
| 15207 | ||
| 15208 | fi | |
| 15209 | ||
| 15210 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 | |
| 15211 | printf %s "checking for alloca... " >&6; } | |
| 15212 | if test ${ac_cv_func_alloca_works+y} | |
| 15213 | then : | |
| 15214 | printf %s "(cached) " >&6 | |
| 15215 | else case e in #( | |
| 15216 | e) ac_cv_func_alloca_works=$ac_cv_working_alloca_h | |
| 15217 | if test "$ac_cv_func_alloca_works" != yes | |
| 15218 | then : | |
| 15219 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 15220 | /* end confdefs.h. */ | |
| 15221 | #include <stdlib.h> | |
| 15222 | #include <stddef.h> | |
| 15223 | #ifndef alloca | |
| 15224 | # ifdef __GNUC__ | |
| 15225 | # define alloca __builtin_alloca | |
| 15226 | # elif defined _MSC_VER | |
| 15227 | # include <malloc.h> | |
| 15228 | # define alloca _alloca | |
| 15229 | # else | |
| 15230 | # ifdef __cplusplus | |
| 15231 | extern "C" | |
| 15232 | # endif | |
| 15233 | void *alloca (size_t); | |
| 15234 | # endif | |
| 15235 | #endif | |
| 15236 | ||
| 15237 | int | |
| 15238 | main (void) | |
| 15239 | { | |
| 15240 | char *p = (char *) alloca (1); | |
| 15241 | if (p) return 0; | |
| 15242 | ; | |
| 15243 | return 0; | |
| 15244 | } | |
| 15245 | _ACEOF | |
| 15246 | if ac_fn_c_try_link "$LINENO" | |
| 15247 | then : | |
| 15248 | ac_cv_func_alloca_works=yes | |
| 15249 | fi | |
| 15250 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 15251 | conftest$ac_exeext conftest.$ac_ext | |
| 15252 | fi ;; | |
| 15253 | esac | |
| 15254 | fi | |
| 15255 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 | |
| 15256 | printf "%s\n" "$ac_cv_func_alloca_works" >&6; } | |
| 15257 | ||
| 15258 | if test $ac_cv_func_alloca_works = yes; then | |
| 15259 | ||
| 15260 | printf "%s\n" "#define HAVE_ALLOCA 1" >>confdefs.h | |
| 15261 | ||
| 15262 | else | |
| 15263 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions | |
| 15264 | # that cause trouble. Some versions do not even contain alloca or | |
| 15265 | # contain a buggy version. If you still want to use their alloca, | |
| 15266 | # use ar to extract alloca.o from them instead of compiling alloca.c. | |
| 15267 | ||
| 15268 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext | |
| 15269 | ||
| 15270 | printf "%s\n" "#define C_ALLOCA 1" >>confdefs.h | |
| 15271 | ||
| 15272 | ||
| 15273 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 | |
| 15274 | printf %s "checking stack direction for C alloca... " >&6; } | |
| 15275 | if test ${ac_cv_c_stack_direction+y} | |
| 15276 | then : | |
| 15277 | printf %s "(cached) " >&6 | |
| 15278 | else case e in #( | |
| 15279 | e) if test "$cross_compiling" = yes | |
| 15280 | then : | |
| 15281 | ac_cv_c_stack_direction=0 | |
| 15282 | else case e in #( | |
| 15283 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 15284 | /* end confdefs.h. */ | |
| 15285 | $ac_includes_default | |
| 15286 | int | |
| 15287 | find_stack_direction (int *addr, int depth) | |
| 15288 | { | |
| 15289 | int dir, dummy = 0; | |
| 15290 | if (! addr) | |
| 15291 | addr = &dummy; | |
| 15292 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; | |
| 15293 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; | |
| 15294 | return dir + dummy; | |
| 15295 | } | |
| 15296 | ||
| 15297 | int | |
| 15298 | main (int argc, char **argv) | |
| 15299 | { | |
| 15300 | return find_stack_direction (0, argc + !argv + 20) < 0; | |
| 15301 | } | |
| 15302 | _ACEOF | |
| 15303 | if ac_fn_c_try_run "$LINENO" | |
| 15304 | then : | |
| 15305 | ac_cv_c_stack_direction=1 | |
| 15306 | else case e in #( | |
| 15307 | e) ac_cv_c_stack_direction=-1 ;; | |
| 15308 | esac | |
| 15309 | fi | |
| 15310 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 15311 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 15312 | esac | |
| 15313 | fi | |
| 15314 | ;; | |
| 15315 | esac | |
| 15316 | fi | |
| 15317 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 | |
| 15318 | printf "%s\n" "$ac_cv_c_stack_direction" >&6; } | |
| 15319 | printf "%s\n" "#define STACK_DIRECTION $ac_cv_c_stack_direction" >>confdefs.h | |
| 15320 | ||
| 15321 | ||
| 15322 | fi | |
| 15323 | ||
| 15324 | ac_fn_c_check_type "$LINENO" "uid_t" "ac_cv_type_uid_t" "$ac_includes_default" | |
| 15325 | if test "x$ac_cv_type_uid_t" = xyes | |
| 15326 | then : | |
| 15327 | ||
| 15328 | else case e in #( | |
| 15329 | e) | |
| 15330 | printf "%s\n" "#define uid_t int" >>confdefs.h | |
| 15331 | ;; | |
| 15332 | esac | |
| 15333 | fi | |
| 15334 | ||
| 15335 | ac_fn_c_check_type "$LINENO" "gid_t" "ac_cv_type_gid_t" "$ac_includes_default" | |
| 15336 | if test "x$ac_cv_type_gid_t" = xyes | |
| 15337 | then : | |
| 15338 | ||
| 15339 | else case e in #( | |
| 15340 | e) | |
| 15341 | printf "%s\n" "#define gid_t int" >>confdefs.h | |
| 15342 | ;; | |
| 15343 | esac | |
| 15344 | fi | |
| 15345 | ||
| 15346 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working chown" >&5 | |
| 15347 | printf %s "checking for working chown... " >&6; } | |
| 15348 | if test ${ac_cv_func_chown_works+y} | |
| 15349 | then : | |
| 15350 | printf %s "(cached) " >&6 | |
| 15351 | else case e in #( | |
| 15352 | e) if test "$cross_compiling" = yes | |
| 15353 | then : | |
| 15354 | case "$host_os" in # (( | |
| 15355 | # Guess yes on glibc systems. | |
| 15356 | *-gnu*) ac_cv_func_chown_works=yes ;; | |
| 15357 | # If we don't know, assume the worst. | |
| 15358 | *) ac_cv_func_chown_works=no ;; | |
| 15359 | esac | |
| 15360 | else case e in #( | |
| 15361 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 15362 | /* end confdefs.h. */ | |
| 15363 | $ac_includes_default | |
| 15364 | #include <fcntl.h> | |
| 15365 | ||
| 15366 | int | |
| 15367 | main (void) | |
| 15368 | { | |
| 15369 | char *f = "conftest.chown"; | |
| 15370 | struct stat before, after; | |
| 15371 | ||
| 15372 | if (creat (f, 0600) < 0) | |
| 15373 | return 1; | |
| 15374 | if (stat (f, &before) < 0) | |
| 15375 | return 1; | |
| 15376 | if (chown (f, (uid_t) -1, (gid_t) -1) == -1) | |
| 15377 | return 1; | |
| 15378 | if (stat (f, &after) < 0) | |
| 15379 | return 1; | |
| 15380 | return ! (before.st_uid == after.st_uid && before.st_gid == after.st_gid); | |
| 15381 | ||
| 15382 | ; | |
| 15383 | return 0; | |
| 15384 | } | |
| 15385 | _ACEOF | |
| 15386 | if ac_fn_c_try_run "$LINENO" | |
| 15387 | then : | |
| 15388 | ac_cv_func_chown_works=yes | |
| 15389 | else case e in #( | |
| 15390 | e) ac_cv_func_chown_works=no ;; | |
| 15391 | esac | |
| 15392 | fi | |
| 15393 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 15394 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 15395 | esac | |
| 15396 | fi | |
| 15397 | ||
| 15398 | rm -f conftest.chown | |
| 15399 | ;; | |
| 15400 | esac | |
| 15401 | fi | |
| 15402 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_chown_works" >&5 | |
| 15403 | printf "%s\n" "$ac_cv_func_chown_works" >&6; } | |
| 15404 | if test $ac_cv_func_chown_works = yes; then | |
| 15405 | ||
| 15406 | printf "%s\n" "#define HAVE_CHOWN 1" >>confdefs.h | |
| 15407 | ||
| 15408 | fi | |
| 15409 | ||
| 15410 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getpgrp requires zero arguments" >&5 | |
| 15411 | printf %s "checking whether getpgrp requires zero arguments... " >&6; } | |
| 15412 | if test ${ac_cv_func_getpgrp_void+y} | |
| 15413 | then : | |
| 15414 | printf %s "(cached) " >&6 | |
| 15415 | else case e in #( | |
| 15416 | e) # Use it with a single arg. | |
| 15417 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 15418 | /* end confdefs.h. */ | |
| 15419 | $ac_includes_default | |
| 15420 | int | |
| 15421 | main (void) | |
| 15422 | { | |
| 15423 | getpgrp (0); | |
| 15424 | ; | |
| 15425 | return 0; | |
| 15426 | } | |
| 15427 | _ACEOF | |
| 15428 | if ac_fn_c_try_compile "$LINENO" | |
| 15429 | then : | |
| 15430 | ac_cv_func_getpgrp_void=no | |
| 15431 | else case e in #( | |
| 15432 | e) ac_cv_func_getpgrp_void=yes ;; | |
| 15433 | esac | |
| 15434 | fi | |
| 15435 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 15436 | ;; | |
| 15437 | esac | |
| 15438 | fi | |
| 15439 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_getpgrp_void" >&5 | |
| 15440 | printf "%s\n" "$ac_cv_func_getpgrp_void" >&6; } | |
| 15441 | if test $ac_cv_func_getpgrp_void = yes; then | |
| 15442 | ||
| 15443 | printf "%s\n" "#define GETPGRP_VOID 1" >>confdefs.h | |
| 15444 | ||
| 15445 | fi | |
| 15446 | ||
| 15447 | ||
| 15448 | ||
| 15449 | if test "x$ac_cv_func_vprintf" = xno | |
| 15450 | then : | |
| 15451 | ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" | |
| 15452 | if test "x$ac_cv_func__doprnt" = xyes | |
| 15453 | then : | |
| 15454 | ||
| 15455 | printf "%s\n" "#define HAVE_DOPRNT 1" >>confdefs.h | |
| 15456 | ||
| 15457 | fi | |
| 15458 | ||
| 15459 | fi | |
| 15460 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working strcoll" >&5 | |
| 15461 | printf %s "checking for working strcoll... " >&6; } | |
| 15462 | if test ${ac_cv_func_strcoll_works+y} | |
| 15463 | then : | |
| 15464 | printf %s "(cached) " >&6 | |
| 15465 | else case e in #( | |
| 15466 | e) if test "$cross_compiling" = yes | |
| 15467 | then : | |
| 15468 | case "$host_os" in # (( | |
| 15469 | # Guess yes on glibc systems. | |
| 15470 | *-gnu*) ac_cv_func_strcoll_works=yes ;; | |
| 15471 | # If we don't know, assume the worst. | |
| 15472 | *) ac_cv_func_strcoll_works=no ;; | |
| 15473 | esac | |
| 15474 | else case e in #( | |
| 15475 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 15476 | /* end confdefs.h. */ | |
| 15477 | $ac_includes_default | |
| 15478 | int | |
| 15479 | main (void) | |
| 15480 | { | |
| 15481 | return (strcoll ("abc", "def") >= 0 || | |
| 15482 | strcoll ("ABC", "DEF") >= 0 || | |
| 15483 | strcoll ("123", "456") >= 0) | |
| 15484 | ; | |
| 15485 | return 0; | |
| 15486 | } | |
| 15487 | _ACEOF | |
| 15488 | if ac_fn_c_try_run "$LINENO" | |
| 15489 | then : | |
| 15490 | ac_cv_func_strcoll_works=yes | |
| 15491 | else case e in #( | |
| 15492 | e) ac_cv_func_strcoll_works=no ;; | |
| 15493 | esac | |
| 15494 | fi | |
| 15495 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 15496 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 15497 | esac | |
| 15498 | fi | |
| 15499 | ;; | |
| 15500 | esac | |
| 15501 | fi | |
| 15502 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_strcoll_works" >&5 | |
| 15503 | printf "%s\n" "$ac_cv_func_strcoll_works" >&6; } | |
| 15504 | if test $ac_cv_func_strcoll_works = yes; then | |
| 15505 | ||
| 15506 | printf "%s\n" "#define HAVE_STRCOLL 1" >>confdefs.h | |
| 15507 | ||
| 15508 | fi | |
| 15509 | ||
| 15510 | ||
| 15511 | ||
| 15512 | if test "$ac_cv_func_alloca_works" = "no" && test "$opt_bash_malloc" = "no"; then | |
| 15513 | MALLOC_TARGET=alloca | |
| 15514 | MALLOC_SRC=alloca.c | |
| 15515 | ||
| 15516 | MALLOC_LIB='-lmalloc' | |
| 15517 | MALLOC_LIBRARY='$(ALLOC_LIBDIR)/libmalloc.a' | |
| 15518 | MALLOC_LDFLAGS='-L$(ALLOC_LIBDIR)' | |
| 15519 | MALLOC_DEP='$(MALLOC_LIBRARY)' | |
| 15520 | fi | |
| 15521 | ||
| 15522 | if test "$ac_cv_func_vprintf" = no; then | |
| 15523 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for declaration of vprintf in stdio.h" >&5 | |
| 15524 | printf %s "checking for declaration of vprintf in stdio.h... " >&6; } | |
| 15525 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 15526 | /* end confdefs.h. */ | |
| 15527 | #include <stdio.h> | |
| 15528 | ||
| 15529 | _ACEOF | |
| 15530 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
| 15531 | $EGREP_TRADITIONAL "[int[ ]*vprintf[^a-zA-Z0-9]]" >/dev/null 2>&1 | |
| 15532 | then : | |
| 15533 | ac_cv_func_vprintf=yes | |
| 15534 | fi | |
| 15535 | rm -rf conftest* | |
| 15536 | ||
| 15537 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vprintf" >&5 | |
| 15538 | printf "%s\n" "$ac_cv_func_vprintf" >&6; } | |
| 15539 | if test $ac_cv_func_vprintf = yes; then | |
| 15540 | printf "%s\n" "#define HAVE_VPRINTF 1" >>confdefs.h | |
| 15541 | ||
| 15542 | fi | |
| 15543 | fi | |
| 15544 | ||
| 15545 | if test "$ac_cv_func_vprintf" = no && test "$ac_cv_func__doprnt" = "yes"; then | |
| 15546 | case " $LIBOBJS " in | |
| 15547 | *" vprint.$ac_objext "* ) ;; | |
| 15548 | *) LIBOBJS="$LIBOBJS vprint.$ac_objext" | |
| 15549 | ;; | |
| 15550 | esac | |
| 15551 | ||
| 15552 | fi | |
| 15553 | ||
| 15554 | ac_fn_c_check_func "$LINENO" "__setostype" "ac_cv_func___setostype" | |
| 15555 | if test "x$ac_cv_func___setostype" = xyes | |
| 15556 | then : | |
| 15557 | printf "%s\n" "#define HAVE_SETOSTYPE 1" >>confdefs.h | |
| 15558 | ||
| 15559 | fi | |
| 15560 | ||
| 15561 | ac_fn_c_check_func "$LINENO" "wait3" "ac_cv_func_wait3" | |
| 15562 | if test "x$ac_cv_func_wait3" = xyes | |
| 15563 | then : | |
| 15564 | printf "%s\n" "#define HAVE_WAIT3 1" >>confdefs.h | |
| 15565 | ||
| 15566 | fi | |
| 15567 | ||
| 15568 | ||
| 15569 | ac_fn_c_check_func "$LINENO" "mkfifo" "ac_cv_func_mkfifo" | |
| 15570 | if test "x$ac_cv_func_mkfifo" = xyes | |
| 15571 | then : | |
| 15572 | printf "%s\n" "#define HAVE_MKFIFO 1" >>confdefs.h | |
| 15573 | ||
| 15574 | else case e in #( | |
| 15575 | e) printf "%s\n" "#define MKFIFO_MISSING 1" >>confdefs.h | |
| 15576 | ;; | |
| 15577 | esac | |
| 15578 | fi | |
| 15579 | ||
| 15580 | ||
| 15581 | ac_fn_c_check_func "$LINENO" "dup2" "ac_cv_func_dup2" | |
| 15582 | if test "x$ac_cv_func_dup2" = xyes | |
| 15583 | then : | |
| 15584 | printf "%s\n" "#define HAVE_DUP2 1" >>confdefs.h | |
| 15585 | ||
| 15586 | fi | |
| 15587 | ac_fn_c_check_func "$LINENO" "eaccess" "ac_cv_func_eaccess" | |
| 15588 | if test "x$ac_cv_func_eaccess" = xyes | |
| 15589 | then : | |
| 15590 | printf "%s\n" "#define HAVE_EACCESS 1" >>confdefs.h | |
| 15591 | ||
| 15592 | fi | |
| 15593 | ac_fn_c_check_func "$LINENO" "fcntl" "ac_cv_func_fcntl" | |
| 15594 | if test "x$ac_cv_func_fcntl" = xyes | |
| 15595 | then : | |
| 15596 | printf "%s\n" "#define HAVE_FCNTL 1" >>confdefs.h | |
| 15597 | ||
| 15598 | fi | |
| 15599 | ac_fn_c_check_func "$LINENO" "getdtablesize" "ac_cv_func_getdtablesize" | |
| 15600 | if test "x$ac_cv_func_getdtablesize" = xyes | |
| 15601 | then : | |
| 15602 | printf "%s\n" "#define HAVE_GETDTABLESIZE 1" >>confdefs.h | |
| 15603 | ||
| 15604 | fi | |
| 15605 | ac_fn_c_check_func "$LINENO" "getentropy" "ac_cv_func_getentropy" | |
| 15606 | if test "x$ac_cv_func_getentropy" = xyes | |
| 15607 | then : | |
| 15608 | printf "%s\n" "#define HAVE_GETENTROPY 1" >>confdefs.h | |
| 15609 | ||
| 15610 | fi | |
| 15611 | ac_fn_c_check_func "$LINENO" "getgroups" "ac_cv_func_getgroups" | |
| 15612 | if test "x$ac_cv_func_getgroups" = xyes | |
| 15613 | then : | |
| 15614 | printf "%s\n" "#define HAVE_GETGROUPS 1" >>confdefs.h | |
| 15615 | ||
| 15616 | fi | |
| 15617 | ac_fn_c_check_func "$LINENO" "gethostname" "ac_cv_func_gethostname" | |
| 15618 | if test "x$ac_cv_func_gethostname" = xyes | |
| 15619 | then : | |
| 15620 | printf "%s\n" "#define HAVE_GETHOSTNAME 1" >>confdefs.h | |
| 15621 | ||
| 15622 | fi | |
| 15623 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" | |
| 15624 | if test "x$ac_cv_func_getpagesize" = xyes | |
| 15625 | then : | |
| 15626 | printf "%s\n" "#define HAVE_GETPAGESIZE 1" >>confdefs.h | |
| 15627 | ||
| 15628 | fi | |
| 15629 | ac_fn_c_check_func "$LINENO" "getpeername" "ac_cv_func_getpeername" | |
| 15630 | if test "x$ac_cv_func_getpeername" = xyes | |
| 15631 | then : | |
| 15632 | printf "%s\n" "#define HAVE_GETPEERNAME 1" >>confdefs.h | |
| 15633 | ||
| 15634 | fi | |
| 15635 | ac_fn_c_check_func "$LINENO" "getrandom" "ac_cv_func_getrandom" | |
| 15636 | if test "x$ac_cv_func_getrandom" = xyes | |
| 15637 | then : | |
| 15638 | printf "%s\n" "#define HAVE_GETRANDOM 1" >>confdefs.h | |
| 15639 | ||
| 15640 | fi | |
| 15641 | ac_fn_c_check_func "$LINENO" "getrlimit" "ac_cv_func_getrlimit" | |
| 15642 | if test "x$ac_cv_func_getrlimit" = xyes | |
| 15643 | then : | |
| 15644 | printf "%s\n" "#define HAVE_GETRLIMIT 1" >>confdefs.h | |
| 15645 | ||
| 15646 | fi | |
| 15647 | ac_fn_c_check_func "$LINENO" "getrusage" "ac_cv_func_getrusage" | |
| 15648 | if test "x$ac_cv_func_getrusage" = xyes | |
| 15649 | then : | |
| 15650 | printf "%s\n" "#define HAVE_GETRUSAGE 1" >>confdefs.h | |
| 15651 | ||
| 15652 | fi | |
| 15653 | ac_fn_c_check_func "$LINENO" "gettimeofday" "ac_cv_func_gettimeofday" | |
| 15654 | if test "x$ac_cv_func_gettimeofday" = xyes | |
| 15655 | then : | |
| 15656 | printf "%s\n" "#define HAVE_GETTIMEOFDAY 1" >>confdefs.h | |
| 15657 | ||
| 15658 | fi | |
| 15659 | ac_fn_c_check_func "$LINENO" "kill" "ac_cv_func_kill" | |
| 15660 | if test "x$ac_cv_func_kill" = xyes | |
| 15661 | then : | |
| 15662 | printf "%s\n" "#define HAVE_KILL 1" >>confdefs.h | |
| 15663 | ||
| 15664 | fi | |
| 15665 | ac_fn_c_check_func "$LINENO" "killpg" "ac_cv_func_killpg" | |
| 15666 | if test "x$ac_cv_func_killpg" = xyes | |
| 15667 | then : | |
| 15668 | printf "%s\n" "#define HAVE_KILLPG 1" >>confdefs.h | |
| 15669 | ||
| 15670 | fi | |
| 15671 | ac_fn_c_check_func "$LINENO" "lstat" "ac_cv_func_lstat" | |
| 15672 | if test "x$ac_cv_func_lstat" = xyes | |
| 15673 | then : | |
| 15674 | printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h | |
| 15675 | ||
| 15676 | fi | |
| 15677 | ac_fn_c_check_func "$LINENO" "nanosleep" "ac_cv_func_nanosleep" | |
| 15678 | if test "x$ac_cv_func_nanosleep" = xyes | |
| 15679 | then : | |
| 15680 | printf "%s\n" "#define HAVE_NANOSLEEP 1" >>confdefs.h | |
| 15681 | ||
| 15682 | fi | |
| 15683 | ac_fn_c_check_func "$LINENO" "pselect" "ac_cv_func_pselect" | |
| 15684 | if test "x$ac_cv_func_pselect" = xyes | |
| 15685 | then : | |
| 15686 | printf "%s\n" "#define HAVE_PSELECT 1" >>confdefs.h | |
| 15687 | ||
| 15688 | fi | |
| 15689 | ac_fn_c_check_func "$LINENO" "readlink" "ac_cv_func_readlink" | |
| 15690 | if test "x$ac_cv_func_readlink" = xyes | |
| 15691 | then : | |
| 15692 | printf "%s\n" "#define HAVE_READLINK 1" >>confdefs.h | |
| 15693 | ||
| 15694 | fi | |
| 15695 | ac_fn_c_check_func "$LINENO" "select" "ac_cv_func_select" | |
| 15696 | if test "x$ac_cv_func_select" = xyes | |
| 15697 | then : | |
| 15698 | printf "%s\n" "#define HAVE_SELECT 1" >>confdefs.h | |
| 15699 | ||
| 15700 | fi | |
| 15701 | ac_fn_c_check_func "$LINENO" "setdtablesize" "ac_cv_func_setdtablesize" | |
| 15702 | if test "x$ac_cv_func_setdtablesize" = xyes | |
| 15703 | then : | |
| 15704 | printf "%s\n" "#define HAVE_SETDTABLESIZE 1" >>confdefs.h | |
| 15705 | ||
| 15706 | fi | |
| 15707 | ac_fn_c_check_func "$LINENO" "setitimer" "ac_cv_func_setitimer" | |
| 15708 | if test "x$ac_cv_func_setitimer" = xyes | |
| 15709 | then : | |
| 15710 | printf "%s\n" "#define HAVE_SETITIMER 1" >>confdefs.h | |
| 15711 | ||
| 15712 | fi | |
| 15713 | ac_fn_c_check_func "$LINENO" "statfs" "ac_cv_func_statfs" | |
| 15714 | if test "x$ac_cv_func_statfs" = xyes | |
| 15715 | then : | |
| 15716 | printf "%s\n" "#define HAVE_STATFS 1" >>confdefs.h | |
| 15717 | ||
| 15718 | fi | |
| 15719 | ac_fn_c_check_func "$LINENO" "tcgetpgrp" "ac_cv_func_tcgetpgrp" | |
| 15720 | if test "x$ac_cv_func_tcgetpgrp" = xyes | |
| 15721 | then : | |
| 15722 | printf "%s\n" "#define HAVE_TCGETPGRP 1" >>confdefs.h | |
| 15723 | ||
| 15724 | fi | |
| 15725 | ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" | |
| 15726 | if test "x$ac_cv_func_uname" = xyes | |
| 15727 | then : | |
| 15728 | printf "%s\n" "#define HAVE_UNAME 1" >>confdefs.h | |
| 15729 | ||
| 15730 | fi | |
| 15731 | ac_fn_c_check_func "$LINENO" "ulimit" "ac_cv_func_ulimit" | |
| 15732 | if test "x$ac_cv_func_ulimit" = xyes | |
| 15733 | then : | |
| 15734 | printf "%s\n" "#define HAVE_ULIMIT 1" >>confdefs.h | |
| 15735 | ||
| 15736 | fi | |
| 15737 | ac_fn_c_check_func "$LINENO" "waitpid" "ac_cv_func_waitpid" | |
| 15738 | if test "x$ac_cv_func_waitpid" = xyes | |
| 15739 | then : | |
| 15740 | printf "%s\n" "#define HAVE_WAITPID 1" >>confdefs.h | |
| 15741 | ||
| 15742 | fi | |
| 15743 | ||
| 15744 | ac_fn_c_check_func "$LINENO" "rename" "ac_cv_func_rename" | |
| 15745 | if test "x$ac_cv_func_rename" = xyes | |
| 15746 | then : | |
| 15747 | printf "%s\n" "#define HAVE_RENAME 1" >>confdefs.h | |
| 15748 | ||
| 15749 | else case e in #( | |
| 15750 | e) case " $LIBOBJS " in | |
| 15751 | *" rename.$ac_objext "* ) ;; | |
| 15752 | *) LIBOBJS="$LIBOBJS rename.$ac_objext" | |
| 15753 | ;; | |
| 15754 | esac | |
| 15755 | ;; | |
| 15756 | esac | |
| 15757 | fi | |
| 15758 | ||
| 15759 | ||
| 15760 | ac_fn_c_check_func "$LINENO" "bcopy" "ac_cv_func_bcopy" | |
| 15761 | if test "x$ac_cv_func_bcopy" = xyes | |
| 15762 | then : | |
| 15763 | printf "%s\n" "#define HAVE_BCOPY 1" >>confdefs.h | |
| 15764 | ||
| 15765 | fi | |
| 15766 | ac_fn_c_check_func "$LINENO" "bzero" "ac_cv_func_bzero" | |
| 15767 | if test "x$ac_cv_func_bzero" = xyes | |
| 15768 | then : | |
| 15769 | printf "%s\n" "#define HAVE_BZERO 1" >>confdefs.h | |
| 15770 | ||
| 15771 | fi | |
| 15772 | ac_fn_c_check_func "$LINENO" "clock_gettime" "ac_cv_func_clock_gettime" | |
| 15773 | if test "x$ac_cv_func_clock_gettime" = xyes | |
| 15774 | then : | |
| 15775 | printf "%s\n" "#define HAVE_CLOCK_GETTIME 1" >>confdefs.h | |
| 15776 | ||
| 15777 | fi | |
| 15778 | ac_fn_c_check_func "$LINENO" "confstr" "ac_cv_func_confstr" | |
| 15779 | if test "x$ac_cv_func_confstr" = xyes | |
| 15780 | then : | |
| 15781 | printf "%s\n" "#define HAVE_CONFSTR 1" >>confdefs.h | |
| 15782 | ||
| 15783 | fi | |
| 15784 | ac_fn_c_check_func "$LINENO" "faccessat" "ac_cv_func_faccessat" | |
| 15785 | if test "x$ac_cv_func_faccessat" = xyes | |
| 15786 | then : | |
| 15787 | printf "%s\n" "#define HAVE_FACCESSAT 1" >>confdefs.h | |
| 15788 | ||
| 15789 | fi | |
| 15790 | ac_fn_c_check_func "$LINENO" "fnmatch" "ac_cv_func_fnmatch" | |
| 15791 | if test "x$ac_cv_func_fnmatch" = xyes | |
| 15792 | then : | |
| 15793 | printf "%s\n" "#define HAVE_FNMATCH 1" >>confdefs.h | |
| 15794 | ||
| 15795 | fi | |
| 15796 | ac_fn_c_check_func "$LINENO" "getaddrinfo" "ac_cv_func_getaddrinfo" | |
| 15797 | if test "x$ac_cv_func_getaddrinfo" = xyes | |
| 15798 | then : | |
| 15799 | printf "%s\n" "#define HAVE_GETADDRINFO 1" >>confdefs.h | |
| 15800 | ||
| 15801 | fi | |
| 15802 | ac_fn_c_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname" | |
| 15803 | if test "x$ac_cv_func_gethostbyname" = xyes | |
| 15804 | then : | |
| 15805 | printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h | |
| 15806 | ||
| 15807 | fi | |
| 15808 | ac_fn_c_check_func "$LINENO" "getservbyname" "ac_cv_func_getservbyname" | |
| 15809 | if test "x$ac_cv_func_getservbyname" = xyes | |
| 15810 | then : | |
| 15811 | printf "%s\n" "#define HAVE_GETSERVBYNAME 1" >>confdefs.h | |
| 15812 | ||
| 15813 | fi | |
| 15814 | ac_fn_c_check_func "$LINENO" "getservent" "ac_cv_func_getservent" | |
| 15815 | if test "x$ac_cv_func_getservent" = xyes | |
| 15816 | then : | |
| 15817 | printf "%s\n" "#define HAVE_GETSERVENT 1" >>confdefs.h | |
| 15818 | ||
| 15819 | fi | |
| 15820 | ac_fn_c_check_func "$LINENO" "inet_aton" "ac_cv_func_inet_aton" | |
| 15821 | if test "x$ac_cv_func_inet_aton" = xyes | |
| 15822 | then : | |
| 15823 | printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h | |
| 15824 | ||
| 15825 | fi | |
| 15826 | ac_fn_c_check_func "$LINENO" "imaxdiv" "ac_cv_func_imaxdiv" | |
| 15827 | if test "x$ac_cv_func_imaxdiv" = xyes | |
| 15828 | then : | |
| 15829 | printf "%s\n" "#define HAVE_IMAXDIV 1" >>confdefs.h | |
| 15830 | ||
| 15831 | fi | |
| 15832 | ac_fn_c_check_func "$LINENO" "memmove" "ac_cv_func_memmove" | |
| 15833 | if test "x$ac_cv_func_memmove" = xyes | |
| 15834 | then : | |
| 15835 | printf "%s\n" "#define HAVE_MEMMOVE 1" >>confdefs.h | |
| 15836 | ||
| 15837 | fi | |
| 15838 | ac_fn_c_check_func "$LINENO" "pathconf" "ac_cv_func_pathconf" | |
| 15839 | if test "x$ac_cv_func_pathconf" = xyes | |
| 15840 | then : | |
| 15841 | printf "%s\n" "#define HAVE_PATHCONF 1" >>confdefs.h | |
| 15842 | ||
| 15843 | fi | |
| 15844 | ac_fn_c_check_func "$LINENO" "putenv" "ac_cv_func_putenv" | |
| 15845 | if test "x$ac_cv_func_putenv" = xyes | |
| 15846 | then : | |
| 15847 | printf "%s\n" "#define HAVE_PUTENV 1" >>confdefs.h | |
| 15848 | ||
| 15849 | fi | |
| 15850 | ac_fn_c_check_func "$LINENO" "raise" "ac_cv_func_raise" | |
| 15851 | if test "x$ac_cv_func_raise" = xyes | |
| 15852 | then : | |
| 15853 | printf "%s\n" "#define HAVE_RAISE 1" >>confdefs.h | |
| 15854 | ||
| 15855 | fi | |
| 15856 | ac_fn_c_check_func "$LINENO" "random" "ac_cv_func_random" | |
| 15857 | if test "x$ac_cv_func_random" = xyes | |
| 15858 | then : | |
| 15859 | printf "%s\n" "#define HAVE_RANDOM 1" >>confdefs.h | |
| 15860 | ||
| 15861 | fi | |
| 15862 | ac_fn_c_check_func "$LINENO" "regcomp" "ac_cv_func_regcomp" | |
| 15863 | if test "x$ac_cv_func_regcomp" = xyes | |
| 15864 | then : | |
| 15865 | printf "%s\n" "#define HAVE_REGCOMP 1" >>confdefs.h | |
| 15866 | ||
| 15867 | fi | |
| 15868 | ac_fn_c_check_func "$LINENO" "regexec" "ac_cv_func_regexec" | |
| 15869 | if test "x$ac_cv_func_regexec" = xyes | |
| 15870 | then : | |
| 15871 | printf "%s\n" "#define HAVE_REGEXEC 1" >>confdefs.h | |
| 15872 | ||
| 15873 | fi | |
| 15874 | ac_fn_c_check_func "$LINENO" "setenv" "ac_cv_func_setenv" | |
| 15875 | if test "x$ac_cv_func_setenv" = xyes | |
| 15876 | then : | |
| 15877 | printf "%s\n" "#define HAVE_SETENV 1" >>confdefs.h | |
| 15878 | ||
| 15879 | fi | |
| 15880 | ac_fn_c_check_func "$LINENO" "setlinebuf" "ac_cv_func_setlinebuf" | |
| 15881 | if test "x$ac_cv_func_setlinebuf" = xyes | |
| 15882 | then : | |
| 15883 | printf "%s\n" "#define HAVE_SETLINEBUF 1" >>confdefs.h | |
| 15884 | ||
| 15885 | fi | |
| 15886 | ac_fn_c_check_func "$LINENO" "setlocale" "ac_cv_func_setlocale" | |
| 15887 | if test "x$ac_cv_func_setlocale" = xyes | |
| 15888 | then : | |
| 15889 | printf "%s\n" "#define HAVE_SETLOCALE 1" >>confdefs.h | |
| 15890 | ||
| 15891 | fi | |
| 15892 | ac_fn_c_check_func "$LINENO" "setvbuf" "ac_cv_func_setvbuf" | |
| 15893 | if test "x$ac_cv_func_setvbuf" = xyes | |
| 15894 | then : | |
| 15895 | printf "%s\n" "#define HAVE_SETVBUF 1" >>confdefs.h | |
| 15896 | ||
| 15897 | fi | |
| 15898 | ac_fn_c_check_func "$LINENO" "siginterrupt" "ac_cv_func_siginterrupt" | |
| 15899 | if test "x$ac_cv_func_siginterrupt" = xyes | |
| 15900 | then : | |
| 15901 | printf "%s\n" "#define HAVE_SIGINTERRUPT 1" >>confdefs.h | |
| 15902 | ||
| 15903 | fi | |
| 15904 | ac_fn_c_check_func "$LINENO" "strchr" "ac_cv_func_strchr" | |
| 15905 | if test "x$ac_cv_func_strchr" = xyes | |
| 15906 | then : | |
| 15907 | printf "%s\n" "#define HAVE_STRCHR 1" >>confdefs.h | |
| 15908 | ||
| 15909 | fi | |
| 15910 | ac_fn_c_check_func "$LINENO" "sysconf" "ac_cv_func_sysconf" | |
| 15911 | if test "x$ac_cv_func_sysconf" = xyes | |
| 15912 | then : | |
| 15913 | printf "%s\n" "#define HAVE_SYSCONF 1" >>confdefs.h | |
| 15914 | ||
| 15915 | fi | |
| 15916 | ac_fn_c_check_func "$LINENO" "syslog" "ac_cv_func_syslog" | |
| 15917 | if test "x$ac_cv_func_syslog" = xyes | |
| 15918 | then : | |
| 15919 | printf "%s\n" "#define HAVE_SYSLOG 1" >>confdefs.h | |
| 15920 | ||
| 15921 | fi | |
| 15922 | ac_fn_c_check_func "$LINENO" "tcgetattr" "ac_cv_func_tcgetattr" | |
| 15923 | if test "x$ac_cv_func_tcgetattr" = xyes | |
| 15924 | then : | |
| 15925 | printf "%s\n" "#define HAVE_TCGETATTR 1" >>confdefs.h | |
| 15926 | ||
| 15927 | fi | |
| 15928 | ac_fn_c_check_func "$LINENO" "tcgetwinsize" "ac_cv_func_tcgetwinsize" | |
| 15929 | if test "x$ac_cv_func_tcgetwinsize" = xyes | |
| 15930 | then : | |
| 15931 | printf "%s\n" "#define HAVE_TCGETWINSIZE 1" >>confdefs.h | |
| 15932 | ||
| 15933 | fi | |
| 15934 | ac_fn_c_check_func "$LINENO" "tcsetwinsize" "ac_cv_func_tcsetwinsize" | |
| 15935 | if test "x$ac_cv_func_tcsetwinsize" = xyes | |
| 15936 | then : | |
| 15937 | printf "%s\n" "#define HAVE_TCSETWINSIZE 1" >>confdefs.h | |
| 15938 | ||
| 15939 | fi | |
| 15940 | ac_fn_c_check_func "$LINENO" "times" "ac_cv_func_times" | |
| 15941 | if test "x$ac_cv_func_times" = xyes | |
| 15942 | then : | |
| 15943 | printf "%s\n" "#define HAVE_TIMES 1" >>confdefs.h | |
| 15944 | ||
| 15945 | fi | |
| 15946 | ac_fn_c_check_func "$LINENO" "ttyname" "ac_cv_func_ttyname" | |
| 15947 | if test "x$ac_cv_func_ttyname" = xyes | |
| 15948 | then : | |
| 15949 | printf "%s\n" "#define HAVE_TTYNAME 1" >>confdefs.h | |
| 15950 | ||
| 15951 | fi | |
| 15952 | ac_fn_c_check_func "$LINENO" "tzset" "ac_cv_func_tzset" | |
| 15953 | if test "x$ac_cv_func_tzset" = xyes | |
| 15954 | then : | |
| 15955 | printf "%s\n" "#define HAVE_TZSET 1" >>confdefs.h | |
| 15956 | ||
| 15957 | fi | |
| 15958 | ac_fn_c_check_func "$LINENO" "unsetenv" "ac_cv_func_unsetenv" | |
| 15959 | if test "x$ac_cv_func_unsetenv" = xyes | |
| 15960 | then : | |
| 15961 | printf "%s\n" "#define HAVE_UNSETENV 1" >>confdefs.h | |
| 15962 | ||
| 15963 | fi | |
| 15964 | ||
| 15965 | ||
| 15966 | ac_fn_c_check_func "$LINENO" "vasprintf" "ac_cv_func_vasprintf" | |
| 15967 | if test "x$ac_cv_func_vasprintf" = xyes | |
| 15968 | then : | |
| 15969 | printf "%s\n" "#define HAVE_VASPRINTF 1" >>confdefs.h | |
| 15970 | ||
| 15971 | fi | |
| 15972 | ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf" | |
| 15973 | if test "x$ac_cv_func_asprintf" = xyes | |
| 15974 | then : | |
| 15975 | printf "%s\n" "#define HAVE_ASPRINTF 1" >>confdefs.h | |
| 15976 | ||
| 15977 | fi | |
| 15978 | ||
| 15979 | ac_fn_c_check_func "$LINENO" "isascii" "ac_cv_func_isascii" | |
| 15980 | if test "x$ac_cv_func_isascii" = xyes | |
| 15981 | then : | |
| 15982 | printf "%s\n" "#define HAVE_ISASCII 1" >>confdefs.h | |
| 15983 | ||
| 15984 | fi | |
| 15985 | ac_fn_c_check_func "$LINENO" "isblank" "ac_cv_func_isblank" | |
| 15986 | if test "x$ac_cv_func_isblank" = xyes | |
| 15987 | then : | |
| 15988 | printf "%s\n" "#define HAVE_ISBLANK 1" >>confdefs.h | |
| 15989 | ||
| 15990 | fi | |
| 15991 | ac_fn_c_check_func "$LINENO" "isgraph" "ac_cv_func_isgraph" | |
| 15992 | if test "x$ac_cv_func_isgraph" = xyes | |
| 15993 | then : | |
| 15994 | printf "%s\n" "#define HAVE_ISGRAPH 1" >>confdefs.h | |
| 15995 | ||
| 15996 | fi | |
| 15997 | ac_fn_c_check_func "$LINENO" "isprint" "ac_cv_func_isprint" | |
| 15998 | if test "x$ac_cv_func_isprint" = xyes | |
| 15999 | then : | |
| 16000 | printf "%s\n" "#define HAVE_ISPRINT 1" >>confdefs.h | |
| 16001 | ||
| 16002 | fi | |
| 16003 | ac_fn_c_check_func "$LINENO" "isspace" "ac_cv_func_isspace" | |
| 16004 | if test "x$ac_cv_func_isspace" = xyes | |
| 16005 | then : | |
| 16006 | printf "%s\n" "#define HAVE_ISSPACE 1" >>confdefs.h | |
| 16007 | ||
| 16008 | fi | |
| 16009 | ac_fn_c_check_func "$LINENO" "isxdigit" "ac_cv_func_isxdigit" | |
| 16010 | if test "x$ac_cv_func_isxdigit" = xyes | |
| 16011 | then : | |
| 16012 | printf "%s\n" "#define HAVE_ISXDIGIT 1" >>confdefs.h | |
| 16013 | ||
| 16014 | fi | |
| 16015 | ||
| 16016 | ac_fn_c_check_func "$LINENO" "getpwent" "ac_cv_func_getpwent" | |
| 16017 | if test "x$ac_cv_func_getpwent" = xyes | |
| 16018 | then : | |
| 16019 | printf "%s\n" "#define HAVE_GETPWENT 1" >>confdefs.h | |
| 16020 | ||
| 16021 | fi | |
| 16022 | ac_fn_c_check_func "$LINENO" "getpwnam" "ac_cv_func_getpwnam" | |
| 16023 | if test "x$ac_cv_func_getpwnam" = xyes | |
| 16024 | then : | |
| 16025 | printf "%s\n" "#define HAVE_GETPWNAM 1" >>confdefs.h | |
| 16026 | ||
| 16027 | fi | |
| 16028 | ac_fn_c_check_func "$LINENO" "getpwuid" "ac_cv_func_getpwuid" | |
| 16029 | if test "x$ac_cv_func_getpwuid" = xyes | |
| 16030 | then : | |
| 16031 | printf "%s\n" "#define HAVE_GETPWUID 1" >>confdefs.h | |
| 16032 | ||
| 16033 | fi | |
| 16034 | ||
| 16035 | ac_fn_c_check_func "$LINENO" "mkstemp" "ac_cv_func_mkstemp" | |
| 16036 | if test "x$ac_cv_func_mkstemp" = xyes | |
| 16037 | then : | |
| 16038 | printf "%s\n" "#define HAVE_MKSTEMP 1" >>confdefs.h | |
| 16039 | ||
| 16040 | fi | |
| 16041 | ac_fn_c_check_func "$LINENO" "mkdtemp" "ac_cv_func_mkdtemp" | |
| 16042 | if test "x$ac_cv_func_mkdtemp" = xyes | |
| 16043 | then : | |
| 16044 | printf "%s\n" "#define HAVE_MKDTEMP 1" >>confdefs.h | |
| 16045 | ||
| 16046 | fi | |
| 16047 | ||
| 16048 | ac_fn_c_check_func "$LINENO" "arc4random" "ac_cv_func_arc4random" | |
| 16049 | if test "x$ac_cv_func_arc4random" = xyes | |
| 16050 | then : | |
| 16051 | printf "%s\n" "#define HAVE_ARC4RANDOM 1" >>confdefs.h | |
| 16052 | ||
| 16053 | fi | |
| 16054 | ||
| 16055 | ac_fn_c_check_func "$LINENO" "strlcat" "ac_cv_func_strlcat" | |
| 16056 | if test "x$ac_cv_func_strlcat" = xyes | |
| 16057 | then : | |
| 16058 | printf "%s\n" "#define HAVE_STRLCAT 1" >>confdefs.h | |
| 16059 | ||
| 16060 | fi | |
| 16061 | ||
| 16062 | ||
| 16063 | ac_fn_c_check_func "$LINENO" "memfd_create" "ac_cv_func_memfd_create" | |
| 16064 | if test "x$ac_cv_func_memfd_create" = xyes | |
| 16065 | then : | |
| 16066 | printf "%s\n" "#define HAVE_MEMFD_CREATE 1" >>confdefs.h | |
| 16067 | ||
| 16068 | fi | |
| 16069 | ac_fn_c_check_func "$LINENO" "shm_open" "ac_cv_func_shm_open" | |
| 16070 | if test "x$ac_cv_func_shm_open" = xyes | |
| 16071 | then : | |
| 16072 | printf "%s\n" "#define HAVE_SHM_OPEN 1" >>confdefs.h | |
| 16073 | ||
| 16074 | fi | |
| 16075 | ac_fn_c_check_func "$LINENO" "shm_mkstemp" "ac_cv_func_shm_mkstemp" | |
| 16076 | if test "x$ac_cv_func_shm_mkstemp" = xyes | |
| 16077 | then : | |
| 16078 | printf "%s\n" "#define HAVE_SHM_MKSTEMP 1" >>confdefs.h | |
| 16079 | ||
| 16080 | fi | |
| 16081 | ||
| 16082 | ||
| 16083 | ac_fn_c_check_func "$LINENO" "getcwd" "ac_cv_func_getcwd" | |
| 16084 | if test "x$ac_cv_func_getcwd" = xyes | |
| 16085 | then : | |
| 16086 | printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h | |
| 16087 | ||
| 16088 | else case e in #( | |
| 16089 | e) case " $LIBOBJS " in | |
| 16090 | *" getcwd.$ac_objext "* ) ;; | |
| 16091 | *) LIBOBJS="$LIBOBJS getcwd.$ac_objext" | |
| 16092 | ;; | |
| 16093 | esac | |
| 16094 | ;; | |
| 16095 | esac | |
| 16096 | fi | |
| 16097 | ac_fn_c_check_func "$LINENO" "memset" "ac_cv_func_memset" | |
| 16098 | if test "x$ac_cv_func_memset" = xyes | |
| 16099 | then : | |
| 16100 | printf "%s\n" "#define HAVE_MEMSET 1" >>confdefs.h | |
| 16101 | ||
| 16102 | else case e in #( | |
| 16103 | e) case " $LIBOBJS " in | |
| 16104 | *" memset.$ac_objext "* ) ;; | |
| 16105 | *) LIBOBJS="$LIBOBJS memset.$ac_objext" | |
| 16106 | ;; | |
| 16107 | esac | |
| 16108 | ;; | |
| 16109 | esac | |
| 16110 | fi | |
| 16111 | ||
| 16112 | ac_fn_c_check_func "$LINENO" "strcasecmp" "ac_cv_func_strcasecmp" | |
| 16113 | if test "x$ac_cv_func_strcasecmp" = xyes | |
| 16114 | then : | |
| 16115 | printf "%s\n" "#define HAVE_STRCASECMP 1" >>confdefs.h | |
| 16116 | ||
| 16117 | else case e in #( | |
| 16118 | e) case " $LIBOBJS " in | |
| 16119 | *" strcasecmp.$ac_objext "* ) ;; | |
| 16120 | *) LIBOBJS="$LIBOBJS strcasecmp.$ac_objext" | |
| 16121 | ;; | |
| 16122 | esac | |
| 16123 | ;; | |
| 16124 | esac | |
| 16125 | fi | |
| 16126 | ac_fn_c_check_func "$LINENO" "strcasestr" "ac_cv_func_strcasestr" | |
| 16127 | if test "x$ac_cv_func_strcasestr" = xyes | |
| 16128 | then : | |
| 16129 | printf "%s\n" "#define HAVE_STRCASESTR 1" >>confdefs.h | |
| 16130 | ||
| 16131 | else case e in #( | |
| 16132 | e) case " $LIBOBJS " in | |
| 16133 | *" strcasestr.$ac_objext "* ) ;; | |
| 16134 | *) LIBOBJS="$LIBOBJS strcasestr.$ac_objext" | |
| 16135 | ;; | |
| 16136 | esac | |
| 16137 | ;; | |
| 16138 | esac | |
| 16139 | fi | |
| 16140 | ac_fn_c_check_func "$LINENO" "strerror" "ac_cv_func_strerror" | |
| 16141 | if test "x$ac_cv_func_strerror" = xyes | |
| 16142 | then : | |
| 16143 | printf "%s\n" "#define HAVE_STRERROR 1" >>confdefs.h | |
| 16144 | ||
| 16145 | else case e in #( | |
| 16146 | e) case " $LIBOBJS " in | |
| 16147 | *" strerror.$ac_objext "* ) ;; | |
| 16148 | *) LIBOBJS="$LIBOBJS strerror.$ac_objext" | |
| 16149 | ;; | |
| 16150 | esac | |
| 16151 | ;; | |
| 16152 | esac | |
| 16153 | fi | |
| 16154 | ac_fn_c_check_func "$LINENO" "strftime" "ac_cv_func_strftime" | |
| 16155 | if test "x$ac_cv_func_strftime" = xyes | |
| 16156 | then : | |
| 16157 | printf "%s\n" "#define HAVE_STRFTIME 1" >>confdefs.h | |
| 16158 | ||
| 16159 | else case e in #( | |
| 16160 | e) case " $LIBOBJS " in | |
| 16161 | *" strftime.$ac_objext "* ) ;; | |
| 16162 | *) LIBOBJS="$LIBOBJS strftime.$ac_objext" | |
| 16163 | ;; | |
| 16164 | esac | |
| 16165 | ;; | |
| 16166 | esac | |
| 16167 | fi | |
| 16168 | ac_fn_c_check_func "$LINENO" "strnlen" "ac_cv_func_strnlen" | |
| 16169 | if test "x$ac_cv_func_strnlen" = xyes | |
| 16170 | then : | |
| 16171 | printf "%s\n" "#define HAVE_STRNLEN 1" >>confdefs.h | |
| 16172 | ||
| 16173 | else case e in #( | |
| 16174 | e) case " $LIBOBJS " in | |
| 16175 | *" strnlen.$ac_objext "* ) ;; | |
| 16176 | *) LIBOBJS="$LIBOBJS strnlen.$ac_objext" | |
| 16177 | ;; | |
| 16178 | esac | |
| 16179 | ;; | |
| 16180 | esac | |
| 16181 | fi | |
| 16182 | ac_fn_c_check_func "$LINENO" "strpbrk" "ac_cv_func_strpbrk" | |
| 16183 | if test "x$ac_cv_func_strpbrk" = xyes | |
| 16184 | then : | |
| 16185 | printf "%s\n" "#define HAVE_STRPBRK 1" >>confdefs.h | |
| 16186 | ||
| 16187 | else case e in #( | |
| 16188 | e) case " $LIBOBJS " in | |
| 16189 | *" strpbrk.$ac_objext "* ) ;; | |
| 16190 | *) LIBOBJS="$LIBOBJS strpbrk.$ac_objext" | |
| 16191 | ;; | |
| 16192 | esac | |
| 16193 | ;; | |
| 16194 | esac | |
| 16195 | fi | |
| 16196 | ac_fn_c_check_func "$LINENO" "strstr" "ac_cv_func_strstr" | |
| 16197 | if test "x$ac_cv_func_strstr" = xyes | |
| 16198 | then : | |
| 16199 | printf "%s\n" "#define HAVE_STRSTR 1" >>confdefs.h | |
| 16200 | ||
| 16201 | else case e in #( | |
| 16202 | e) case " $LIBOBJS " in | |
| 16203 | *" strstr.$ac_objext "* ) ;; | |
| 16204 | *) LIBOBJS="$LIBOBJS strstr.$ac_objext" | |
| 16205 | ;; | |
| 16206 | esac | |
| 16207 | ;; | |
| 16208 | esac | |
| 16209 | fi | |
| 16210 | ||
| 16211 | ac_fn_c_check_func "$LINENO" "strtod" "ac_cv_func_strtod" | |
| 16212 | if test "x$ac_cv_func_strtod" = xyes | |
| 16213 | then : | |
| 16214 | printf "%s\n" "#define HAVE_STRTOD 1" >>confdefs.h | |
| 16215 | ||
| 16216 | else case e in #( | |
| 16217 | e) case " $LIBOBJS " in | |
| 16218 | *" strtod.$ac_objext "* ) ;; | |
| 16219 | *) LIBOBJS="$LIBOBJS strtod.$ac_objext" | |
| 16220 | ;; | |
| 16221 | esac | |
| 16222 | ;; | |
| 16223 | esac | |
| 16224 | fi | |
| 16225 | ac_fn_c_check_func "$LINENO" "strtol" "ac_cv_func_strtol" | |
| 16226 | if test "x$ac_cv_func_strtol" = xyes | |
| 16227 | then : | |
| 16228 | printf "%s\n" "#define HAVE_STRTOL 1" >>confdefs.h | |
| 16229 | ||
| 16230 | else case e in #( | |
| 16231 | e) case " $LIBOBJS " in | |
| 16232 | *" strtol.$ac_objext "* ) ;; | |
| 16233 | *) LIBOBJS="$LIBOBJS strtol.$ac_objext" | |
| 16234 | ;; | |
| 16235 | esac | |
| 16236 | ;; | |
| 16237 | esac | |
| 16238 | fi | |
| 16239 | ac_fn_c_check_func "$LINENO" "strtoul" "ac_cv_func_strtoul" | |
| 16240 | if test "x$ac_cv_func_strtoul" = xyes | |
| 16241 | then : | |
| 16242 | printf "%s\n" "#define HAVE_STRTOUL 1" >>confdefs.h | |
| 16243 | ||
| 16244 | else case e in #( | |
| 16245 | e) case " $LIBOBJS " in | |
| 16246 | *" strtoul.$ac_objext "* ) ;; | |
| 16247 | *) LIBOBJS="$LIBOBJS strtoul.$ac_objext" | |
| 16248 | ;; | |
| 16249 | esac | |
| 16250 | ;; | |
| 16251 | esac | |
| 16252 | fi | |
| 16253 | ac_fn_c_check_func "$LINENO" "strtoll" "ac_cv_func_strtoll" | |
| 16254 | if test "x$ac_cv_func_strtoll" = xyes | |
| 16255 | then : | |
| 16256 | printf "%s\n" "#define HAVE_STRTOLL 1" >>confdefs.h | |
| 16257 | ||
| 16258 | else case e in #( | |
| 16259 | e) case " $LIBOBJS " in | |
| 16260 | *" strtoll.$ac_objext "* ) ;; | |
| 16261 | *) LIBOBJS="$LIBOBJS strtoll.$ac_objext" | |
| 16262 | ;; | |
| 16263 | esac | |
| 16264 | ;; | |
| 16265 | esac | |
| 16266 | fi | |
| 16267 | ac_fn_c_check_func "$LINENO" "strtoull" "ac_cv_func_strtoull" | |
| 16268 | if test "x$ac_cv_func_strtoull" = xyes | |
| 16269 | then : | |
| 16270 | printf "%s\n" "#define HAVE_STRTOULL 1" >>confdefs.h | |
| 16271 | ||
| 16272 | else case e in #( | |
| 16273 | e) case " $LIBOBJS " in | |
| 16274 | *" strtoull.$ac_objext "* ) ;; | |
| 16275 | *) LIBOBJS="$LIBOBJS strtoull.$ac_objext" | |
| 16276 | ;; | |
| 16277 | esac | |
| 16278 | ;; | |
| 16279 | esac | |
| 16280 | fi | |
| 16281 | ac_fn_c_check_func "$LINENO" "strtoumax" "ac_cv_func_strtoumax" | |
| 16282 | if test "x$ac_cv_func_strtoumax" = xyes | |
| 16283 | then : | |
| 16284 | printf "%s\n" "#define HAVE_STRTOUMAX 1" >>confdefs.h | |
| 16285 | ||
| 16286 | else case e in #( | |
| 16287 | e) case " $LIBOBJS " in | |
| 16288 | *" strtoumax.$ac_objext "* ) ;; | |
| 16289 | *) LIBOBJS="$LIBOBJS strtoumax.$ac_objext" | |
| 16290 | ;; | |
| 16291 | esac | |
| 16292 | ;; | |
| 16293 | esac | |
| 16294 | fi | |
| 16295 | ||
| 16296 | ac_fn_c_check_func "$LINENO" "dprintf" "ac_cv_func_dprintf" | |
| 16297 | if test "x$ac_cv_func_dprintf" = xyes | |
| 16298 | then : | |
| 16299 | printf "%s\n" "#define HAVE_DPRINTF 1" >>confdefs.h | |
| 16300 | ||
| 16301 | else case e in #( | |
| 16302 | e) case " $LIBOBJS " in | |
| 16303 | *" dprintf.$ac_objext "* ) ;; | |
| 16304 | *) LIBOBJS="$LIBOBJS dprintf.$ac_objext" | |
| 16305 | ;; | |
| 16306 | esac | |
| 16307 | ;; | |
| 16308 | esac | |
| 16309 | fi | |
| 16310 | ||
| 16311 | ac_fn_c_check_func "$LINENO" "strdup" "ac_cv_func_strdup" | |
| 16312 | if test "x$ac_cv_func_strdup" = xyes | |
| 16313 | then : | |
| 16314 | printf "%s\n" "#define HAVE_STRDUP 1" >>confdefs.h | |
| 16315 | ||
| 16316 | else case e in #( | |
| 16317 | e) case " $LIBOBJS " in | |
| 16318 | *" strdup.$ac_objext "* ) ;; | |
| 16319 | *) LIBOBJS="$LIBOBJS strdup.$ac_objext" | |
| 16320 | ;; | |
| 16321 | esac | |
| 16322 | ;; | |
| 16323 | esac | |
| 16324 | fi | |
| 16325 | ||
| 16326 | ac_fn_c_check_func "$LINENO" "strlcpy" "ac_cv_func_strlcpy" | |
| 16327 | if test "x$ac_cv_func_strlcpy" = xyes | |
| 16328 | then : | |
| 16329 | printf "%s\n" "#define HAVE_STRLCPY 1" >>confdefs.h | |
| 16330 | ||
| 16331 | else case e in #( | |
| 16332 | e) case " $LIBOBJS " in | |
| 16333 | *" strlcpy.$ac_objext "* ) ;; | |
| 16334 | *) LIBOBJS="$LIBOBJS strlcpy.$ac_objext" | |
| 16335 | ;; | |
| 16336 | esac | |
| 16337 | ;; | |
| 16338 | esac | |
| 16339 | fi | |
| 16340 | ||
| 16341 | ac_fn_c_check_func "$LINENO" "reallocarray" "ac_cv_func_reallocarray" | |
| 16342 | if test "x$ac_cv_func_reallocarray" = xyes | |
| 16343 | then : | |
| 16344 | printf "%s\n" "#define HAVE_REALLOCARRAY 1" >>confdefs.h | |
| 16345 | ||
| 16346 | else case e in #( | |
| 16347 | e) case " $LIBOBJS " in | |
| 16348 | *" reallocarray.$ac_objext "* ) ;; | |
| 16349 | *) LIBOBJS="$LIBOBJS reallocarray.$ac_objext" | |
| 16350 | ;; | |
| 16351 | esac | |
| 16352 | ;; | |
| 16353 | esac | |
| 16354 | fi | |
| 16355 | ||
| 16356 | ||
| 16357 | ac_fn_c_check_header_compile "$LINENO" "libaudit.h" "ac_cv_header_libaudit_h" "$ac_includes_default" | |
| 16358 | if test "x$ac_cv_header_libaudit_h" = xyes | |
| 16359 | then : | |
| 16360 | printf "%s\n" "#define HAVE_LIBAUDIT_H 1" >>confdefs.h | |
| 16361 | ||
| 16362 | fi | |
| 16363 | ||
| 16364 | ac_fn_check_decl "$LINENO" "AUDIT_USER_TTY" "ac_cv_have_decl_AUDIT_USER_TTY" "#include <linux/audit.h> | |
| 16365 | " "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 16366 | if test "x$ac_cv_have_decl_AUDIT_USER_TTY" = xyes | |
| 16367 | then : | |
| 16368 | ac_have_decl=1 | |
| 16369 | else case e in #( | |
| 16370 | e) ac_have_decl=0 ;; | |
| 16371 | esac | |
| 16372 | fi | |
| 16373 | printf "%s\n" "#define HAVE_DECL_AUDIT_USER_TTY $ac_have_decl" >>confdefs.h | |
| 16374 | ||
| 16375 | ||
| 16376 | ac_fn_check_decl "$LINENO" "confstr" "ac_cv_have_decl_confstr" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 16377 | if test "x$ac_cv_have_decl_confstr" = xyes | |
| 16378 | then : | |
| 16379 | ac_have_decl=1 | |
| 16380 | else case e in #( | |
| 16381 | e) ac_have_decl=0 ;; | |
| 16382 | esac | |
| 16383 | fi | |
| 16384 | printf "%s\n" "#define HAVE_DECL_CONFSTR $ac_have_decl" >>confdefs.h | |
| 16385 | ||
| 16386 | ac_fn_check_decl "$LINENO" "printf" "ac_cv_have_decl_printf" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 16387 | if test "x$ac_cv_have_decl_printf" = xyes | |
| 16388 | then : | |
| 16389 | ac_have_decl=1 | |
| 16390 | else case e in #( | |
| 16391 | e) ac_have_decl=0 ;; | |
| 16392 | esac | |
| 16393 | fi | |
| 16394 | printf "%s\n" "#define HAVE_DECL_PRINTF $ac_have_decl" >>confdefs.h | |
| 16395 | ||
| 16396 | ac_fn_check_decl "$LINENO" "brk" "ac_cv_have_decl_brk" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 16397 | if test "x$ac_cv_have_decl_brk" = xyes | |
| 16398 | then : | |
| 16399 | ac_have_decl=1 | |
| 16400 | else case e in #( | |
| 16401 | e) ac_have_decl=0 ;; | |
| 16402 | esac | |
| 16403 | fi | |
| 16404 | printf "%s\n" "#define HAVE_DECL_BRK $ac_have_decl" >>confdefs.h | |
| 16405 | ||
| 16406 | ac_fn_check_decl "$LINENO" "sbrk" "ac_cv_have_decl_sbrk" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 16407 | if test "x$ac_cv_have_decl_sbrk" = xyes | |
| 16408 | then : | |
| 16409 | ac_have_decl=1 | |
| 16410 | else case e in #( | |
| 16411 | e) ac_have_decl=0 ;; | |
| 16412 | esac | |
| 16413 | fi | |
| 16414 | printf "%s\n" "#define HAVE_DECL_SBRK $ac_have_decl" >>confdefs.h | |
| 16415 | ||
| 16416 | ac_fn_check_decl "$LINENO" "setregid" "ac_cv_have_decl_setregid" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 16417 | if test "x$ac_cv_have_decl_setregid" = xyes | |
| 16418 | then : | |
| 16419 | ac_have_decl=1 | |
| 16420 | else case e in #( | |
| 16421 | e) ac_have_decl=0 ;; | |
| 16422 | esac | |
| 16423 | fi | |
| 16424 | printf "%s\n" "#define HAVE_DECL_SETREGID $ac_have_decl" >>confdefs.h | |
| 16425 | ||
| 16426 | ac_fn_check_decl "$LINENO" "strcpy" "ac_cv_have_decl_strcpy" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 16427 | if test "x$ac_cv_have_decl_strcpy" = xyes | |
| 16428 | then : | |
| 16429 | ac_have_decl=1 | |
| 16430 | else case e in #( | |
| 16431 | e) ac_have_decl=0 ;; | |
| 16432 | esac | |
| 16433 | fi | |
| 16434 | printf "%s\n" "#define HAVE_DECL_STRCPY $ac_have_decl" >>confdefs.h | |
| 16435 | ||
| 16436 | ac_fn_check_decl "$LINENO" "strsignal" "ac_cv_have_decl_strsignal" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 16437 | if test "x$ac_cv_have_decl_strsignal" = xyes | |
| 16438 | then : | |
| 16439 | ac_have_decl=1 | |
| 16440 | else case e in #( | |
| 16441 | e) ac_have_decl=0 ;; | |
| 16442 | esac | |
| 16443 | fi | |
| 16444 | printf "%s\n" "#define HAVE_DECL_STRSIGNAL $ac_have_decl" >>confdefs.h | |
| 16445 | ||
| 16446 | ||
| 16447 | ac_fn_c_check_func "$LINENO" "setresuid" "ac_cv_func_setresuid" | |
| 16448 | if test "x$ac_cv_func_setresuid" = xyes | |
| 16449 | then : | |
| 16450 | printf "%s\n" "#define HAVE_SETRESUID 1" >>confdefs.h | |
| 16451 | ||
| 16452 | fi | |
| 16453 | ac_fn_c_check_func "$LINENO" "setresgid" "ac_cv_func_setresgid" | |
| 16454 | if test "x$ac_cv_func_setresgid" = xyes | |
| 16455 | then : | |
| 16456 | printf "%s\n" "#define HAVE_SETRESGID 1" >>confdefs.h | |
| 16457 | ||
| 16458 | fi | |
| 16459 | ||
| 16460 | ||
| 16461 | ac_fn_check_decl "$LINENO" "strtold" "ac_cv_have_decl_strtold" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 16462 | if test "x$ac_cv_have_decl_strtold" = xyes | |
| 16463 | then : | |
| 16464 | ac_have_decl=1 | |
| 16465 | else case e in #( | |
| 16466 | e) ac_have_decl=0 ;; | |
| 16467 | esac | |
| 16468 | fi | |
| 16469 | printf "%s\n" "#define HAVE_DECL_STRTOLD $ac_have_decl" >>confdefs.h | |
| 16470 | if test $ac_have_decl = 1 | |
| 16471 | then : | |
| 16472 | ||
| 16473 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for broken strtold" >&5 | |
| 16474 | printf %s "checking for broken strtold... " >&6; } | |
| 16475 | if test ${bash_cv_strtold_broken+y} | |
| 16476 | then : | |
| 16477 | printf %s "(cached) " >&6 | |
| 16478 | else case e in #( | |
| 16479 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 16480 | /* end confdefs.h. */ | |
| 16481 | #include <stdlib.h> | |
| 16482 | int | |
| 16483 | main (void) | |
| 16484 | { | |
| 16485 | long double r; char *foo, *bar; r = strtold(foo, &bar); | |
| 16486 | ||
| 16487 | ; | |
| 16488 | return 0; | |
| 16489 | } | |
| 16490 | _ACEOF | |
| 16491 | if ac_fn_c_try_compile "$LINENO" | |
| 16492 | then : | |
| 16493 | bash_cv_strtold_broken=no | |
| 16494 | else case e in #( | |
| 16495 | e) bash_cv_strtold_broken=yes ;; | |
| 16496 | esac | |
| 16497 | fi | |
| 16498 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 16499 | ||
| 16500 | ;; | |
| 16501 | esac | |
| 16502 | fi | |
| 16503 | ||
| 16504 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_strtold_broken" >&5 | |
| 16505 | printf "%s\n" "$bash_cv_strtold_broken" >&6; } | |
| 16506 | if test "$bash_cv_strtold_broken" = "yes" ; then | |
| 16507 | printf "%s\n" "#define STRTOLD_BROKEN 1" >>confdefs.h | |
| 16508 | ||
| 16509 | fi | |
| 16510 | ||
| 16511 | fi | |
| 16512 | ||
| 16513 | ||
| 16514 | ac_fn_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 16515 | if test "x$ac_cv_have_decl_strtol" = xyes | |
| 16516 | then : | |
| 16517 | ac_have_decl=1 | |
| 16518 | else case e in #( | |
| 16519 | e) ac_have_decl=0 ;; | |
| 16520 | esac | |
| 16521 | fi | |
| 16522 | printf "%s\n" "#define HAVE_DECL_STRTOL $ac_have_decl" >>confdefs.h | |
| 16523 | ||
| 16524 | ac_fn_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 16525 | if test "x$ac_cv_have_decl_strtoll" = xyes | |
| 16526 | then : | |
| 16527 | ac_have_decl=1 | |
| 16528 | else case e in #( | |
| 16529 | e) ac_have_decl=0 ;; | |
| 16530 | esac | |
| 16531 | fi | |
| 16532 | printf "%s\n" "#define HAVE_DECL_STRTOLL $ac_have_decl" >>confdefs.h | |
| 16533 | ||
| 16534 | ac_fn_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 16535 | if test "x$ac_cv_have_decl_strtoul" = xyes | |
| 16536 | then : | |
| 16537 | ac_have_decl=1 | |
| 16538 | else case e in #( | |
| 16539 | e) ac_have_decl=0 ;; | |
| 16540 | esac | |
| 16541 | fi | |
| 16542 | printf "%s\n" "#define HAVE_DECL_STRTOUL $ac_have_decl" >>confdefs.h | |
| 16543 | ||
| 16544 | ac_fn_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 16545 | if test "x$ac_cv_have_decl_strtoull" = xyes | |
| 16546 | then : | |
| 16547 | ac_have_decl=1 | |
| 16548 | else case e in #( | |
| 16549 | e) ac_have_decl=0 ;; | |
| 16550 | esac | |
| 16551 | fi | |
| 16552 | printf "%s\n" "#define HAVE_DECL_STRTOULL $ac_have_decl" >>confdefs.h | |
| 16553 | ||
| 16554 | ac_fn_check_decl "$LINENO" "strtoumax" "ac_cv_have_decl_strtoumax" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 16555 | if test "x$ac_cv_have_decl_strtoumax" = xyes | |
| 16556 | then : | |
| 16557 | ac_have_decl=1 | |
| 16558 | else case e in #( | |
| 16559 | e) ac_have_decl=0 ;; | |
| 16560 | esac | |
| 16561 | fi | |
| 16562 | printf "%s\n" "#define HAVE_DECL_STRTOUMAX $ac_have_decl" >>confdefs.h | |
| 16563 | ||
| 16564 | ||
| 16565 | ||
| 16566 | ||
| 16567 | ||
| 16568 | ||
| 16569 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mktime" >&5 | |
| 16570 | printf %s "checking for working mktime... " >&6; } | |
| 16571 | if test ${ac_cv_func_working_mktime+y} | |
| 16572 | then : | |
| 16573 | printf %s "(cached) " >&6 | |
| 16574 | else case e in #( | |
| 16575 | e) if test "$cross_compiling" = yes | |
| 16576 | then : | |
| 16577 | ac_cv_func_working_mktime=no | |
| 16578 | else case e in #( | |
| 16579 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 16580 | /* end confdefs.h. */ | |
| 16581 | /* Test program from Paul Eggert and Tony Leneis. */ | |
| 16582 | #include <time.h> | |
| 16583 | #ifdef HAVE_SYS_TIME_H | |
| 16584 | # include <sys/time.h> | |
| 16585 | #endif | |
| 16586 | ||
| 16587 | #include <limits.h> | |
| 16588 | #include <stdlib.h> | |
| 16589 | ||
| 16590 | #ifdef HAVE_UNISTD_H | |
| 16591 | # include <unistd.h> | |
| 16592 | #endif | |
| 16593 | ||
| 16594 | #ifndef HAVE_ALARM | |
| 16595 | # define alarm(X) /* empty */ | |
| 16596 | #endif | |
| 16597 | ||
| 16598 | /* Work around redefinition to rpl_putenv by other config tests. */ | |
| 16599 | #undef putenv | |
| 16600 | ||
| 16601 | static time_t time_t_max; | |
| 16602 | static time_t time_t_min; | |
| 16603 | ||
| 16604 | /* Values we'll use to set the TZ environment variable. */ | |
| 16605 | static const char *tz_strings[] = { | |
| 16606 | (const char *) 0, "TZ=GMT0", "TZ=JST-9", | |
| 16607 | "TZ=EST+3EDT+2,M10.1.0/00:00:00,M2.3.0/00:00:00" | |
| 16608 | }; | |
| 16609 | #define N_STRINGS (sizeof (tz_strings) / sizeof (tz_strings[0])) | |
| 16610 | ||
| 16611 | /* Return 0 if mktime fails to convert a date in the spring-forward gap. | |
| 16612 | Based on a problem report from Andreas Jaeger. */ | |
| 16613 | static int | |
| 16614 | spring_forward_gap (void) | |
| 16615 | { | |
| 16616 | /* glibc (up to about 1998-10-07) failed this test. */ | |
| 16617 | struct tm tm; | |
| 16618 | ||
| 16619 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" | |
| 16620 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
| 16621 | on systems that don't support the Olson extension, or don't have the | |
| 16622 | full zoneinfo tables installed. */ | |
| 16623 | putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); | |
| 16624 | ||
| 16625 | tm.tm_year = 98; | |
| 16626 | tm.tm_mon = 3; | |
| 16627 | tm.tm_mday = 5; | |
| 16628 | tm.tm_hour = 2; | |
| 16629 | tm.tm_min = 0; | |
| 16630 | tm.tm_sec = 0; | |
| 16631 | tm.tm_isdst = -1; | |
| 16632 | return mktime (&tm) != (time_t) -1; | |
| 16633 | } | |
| 16634 | ||
| 16635 | static int | |
| 16636 | mktime_test1 (time_t now) | |
| 16637 | { | |
| 16638 | struct tm *lt; | |
| 16639 | return ! (lt = localtime (&now)) || mktime (lt) == now; | |
| 16640 | } | |
| 16641 | ||
| 16642 | static int | |
| 16643 | mktime_test (time_t now) | |
| 16644 | { | |
| 16645 | return (mktime_test1 (now) | |
| 16646 | && mktime_test1 ((time_t) (time_t_max - now)) | |
| 16647 | && mktime_test1 ((time_t) (time_t_min + now))); | |
| 16648 | } | |
| 16649 | ||
| 16650 | static int | |
| 16651 | irix_6_4_bug (void) | |
| 16652 | { | |
| 16653 | /* Based on code from Ariel Faigon. */ | |
| 16654 | struct tm tm; | |
| 16655 | tm.tm_year = 96; | |
| 16656 | tm.tm_mon = 3; | |
| 16657 | tm.tm_mday = 0; | |
| 16658 | tm.tm_hour = 0; | |
| 16659 | tm.tm_min = 0; | |
| 16660 | tm.tm_sec = 0; | |
| 16661 | tm.tm_isdst = -1; | |
| 16662 | mktime (&tm); | |
| 16663 | return tm.tm_mon == 2 && tm.tm_mday == 31; | |
| 16664 | } | |
| 16665 | ||
| 16666 | static int | |
| 16667 | bigtime_test (int j) | |
| 16668 | { | |
| 16669 | struct tm tm; | |
| 16670 | time_t now; | |
| 16671 | tm.tm_year = tm.tm_mon = tm.tm_mday = tm.tm_hour = tm.tm_min = tm.tm_sec = j; | |
| 16672 | now = mktime (&tm); | |
| 16673 | if (now != (time_t) -1) | |
| 16674 | { | |
| 16675 | struct tm *lt = localtime (&now); | |
| 16676 | if (! (lt | |
| 16677 | && lt->tm_year == tm.tm_year | |
| 16678 | && lt->tm_mon == tm.tm_mon | |
| 16679 | && lt->tm_mday == tm.tm_mday | |
| 16680 | && lt->tm_hour == tm.tm_hour | |
| 16681 | && lt->tm_min == tm.tm_min | |
| 16682 | && lt->tm_sec == tm.tm_sec | |
| 16683 | && lt->tm_yday == tm.tm_yday | |
| 16684 | && lt->tm_wday == tm.tm_wday | |
| 16685 | && ((lt->tm_isdst < 0 ? -1 : 0 < lt->tm_isdst) | |
| 16686 | == (tm.tm_isdst < 0 ? -1 : 0 < tm.tm_isdst)))) | |
| 16687 | return 0; | |
| 16688 | } | |
| 16689 | return 1; | |
| 16690 | } | |
| 16691 | ||
| 16692 | static int | |
| 16693 | year_2050_test (void) | |
| 16694 | { | |
| 16695 | /* The correct answer for 2050-02-01 00:00:00 in Pacific time, | |
| 16696 | ignoring leap seconds. */ | |
| 16697 | unsigned long int answer = 2527315200UL; | |
| 16698 | ||
| 16699 | struct tm tm; | |
| 16700 | time_t t; | |
| 16701 | tm.tm_year = 2050 - 1900; | |
| 16702 | tm.tm_mon = 2 - 1; | |
| 16703 | tm.tm_mday = 1; | |
| 16704 | tm.tm_hour = tm.tm_min = tm.tm_sec = 0; | |
| 16705 | tm.tm_isdst = -1; | |
| 16706 | ||
| 16707 | /* Use the portable POSIX.1 specification "TZ=PST8PDT,M4.1.0,M10.5.0" | |
| 16708 | instead of "TZ=America/Vancouver" in order to detect the bug even | |
| 16709 | on systems that don't support the Olson extension, or don't have the | |
| 16710 | full zoneinfo tables installed. */ | |
| 16711 | putenv ((char*) "TZ=PST8PDT,M4.1.0,M10.5.0"); | |
| 16712 | ||
| 16713 | t = mktime (&tm); | |
| 16714 | ||
| 16715 | /* Check that the result is either a failure, or close enough | |
| 16716 | to the correct answer that we can assume the discrepancy is | |
| 16717 | due to leap seconds. */ | |
| 16718 | return (t == (time_t) -1 | |
| 16719 | || (0 < t && answer - 120 <= t && t <= answer + 120)); | |
| 16720 | } | |
| 16721 | ||
| 16722 | int | |
| 16723 | main (void) | |
| 16724 | { | |
| 16725 | time_t t, delta; | |
| 16726 | int i, j; | |
| 16727 | ||
| 16728 | /* This test makes some buggy mktime implementations loop. | |
| 16729 | Give up after 60 seconds; a mktime slower than that | |
| 16730 | isn't worth using anyway. */ | |
| 16731 | alarm (60); | |
| 16732 | ||
| 16733 | for (;;) | |
| 16734 | { | |
| 16735 | t = (time_t_max << 1) + 1; | |
| 16736 | if (t <= time_t_max) | |
| 16737 | break; | |
| 16738 | time_t_max = t; | |
| 16739 | } | |
| 16740 | time_t_min = - ((time_t) ~ (time_t) 0 == (time_t) -1) - time_t_max; | |
| 16741 | ||
| 16742 | delta = time_t_max / 997; /* a suitable prime number */ | |
| 16743 | for (i = 0; i < N_STRINGS; i++) | |
| 16744 | { | |
| 16745 | if (tz_strings[i]) | |
| 16746 | putenv ((char*) tz_strings[i]); | |
| 16747 | ||
| 16748 | for (t = 0; t <= time_t_max - delta; t += delta) | |
| 16749 | if (! mktime_test (t)) | |
| 16750 | return 1; | |
| 16751 | if (! (mktime_test ((time_t) 1) | |
| 16752 | && mktime_test ((time_t) (60 * 60)) | |
| 16753 | && mktime_test ((time_t) (60 * 60 * 24)))) | |
| 16754 | return 1; | |
| 16755 | ||
| 16756 | for (j = 1; ; j <<= 1) | |
| 16757 | if (! bigtime_test (j)) | |
| 16758 | return 1; | |
| 16759 | else if (INT_MAX / 2 < j) | |
| 16760 | break; | |
| 16761 | if (! bigtime_test (INT_MAX)) | |
| 16762 | return 1; | |
| 16763 | } | |
| 16764 | return ! (irix_6_4_bug () && spring_forward_gap () && year_2050_test ()); | |
| 16765 | } | |
| 16766 | _ACEOF | |
| 16767 | if ac_fn_c_try_run "$LINENO" | |
| 16768 | then : | |
| 16769 | ac_cv_func_working_mktime=yes | |
| 16770 | else case e in #( | |
| 16771 | e) ac_cv_func_working_mktime=no ;; | |
| 16772 | esac | |
| 16773 | fi | |
| 16774 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 16775 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 16776 | esac | |
| 16777 | fi | |
| 16778 | ;; | |
| 16779 | esac | |
| 16780 | fi | |
| 16781 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_working_mktime" >&5 | |
| 16782 | printf "%s\n" "$ac_cv_func_working_mktime" >&6; } | |
| 16783 | if test $ac_cv_func_working_mktime = no; then | |
| 16784 | case " $LIBOBJS " in | |
| 16785 | *" mktime.$ac_objext "* ) ;; | |
| 16786 | *) LIBOBJS="$LIBOBJS mktime.$ac_objext" | |
| 16787 | ;; | |
| 16788 | esac | |
| 16789 | ||
| 16790 | fi | |
| 16791 | ||
| 16792 | ||
| 16793 | ||
| 16794 | ac_fn_c_check_header_compile "$LINENO" "argz.h" "ac_cv_header_argz_h" "$ac_includes_default" | |
| 16795 | if test "x$ac_cv_header_argz_h" = xyes | |
| 16796 | then : | |
| 16797 | printf "%s\n" "#define HAVE_ARGZ_H 1" >>confdefs.h | |
| 16798 | ||
| 16799 | fi | |
| 16800 | ac_fn_c_check_header_compile "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" | |
| 16801 | if test "x$ac_cv_header_errno_h" = xyes | |
| 16802 | then : | |
| 16803 | printf "%s\n" "#define HAVE_ERRNO_H 1" >>confdefs.h | |
| 16804 | ||
| 16805 | fi | |
| 16806 | ac_fn_c_check_header_compile "$LINENO" "fcntl.h" "ac_cv_header_fcntl_h" "$ac_includes_default" | |
| 16807 | if test "x$ac_cv_header_fcntl_h" = xyes | |
| 16808 | then : | |
| 16809 | printf "%s\n" "#define HAVE_FCNTL_H 1" >>confdefs.h | |
| 16810 | ||
| 16811 | fi | |
| 16812 | ac_fn_c_check_header_compile "$LINENO" "malloc.h" "ac_cv_header_malloc_h" "$ac_includes_default" | |
| 16813 | if test "x$ac_cv_header_malloc_h" = xyes | |
| 16814 | then : | |
| 16815 | printf "%s\n" "#define HAVE_MALLOC_H 1" >>confdefs.h | |
| 16816 | ||
| 16817 | fi | |
| 16818 | ac_fn_c_check_header_compile "$LINENO" "stdio_ext.h" "ac_cv_header_stdio_ext_h" "$ac_includes_default" | |
| 16819 | if test "x$ac_cv_header_stdio_ext_h" = xyes | |
| 16820 | then : | |
| 16821 | printf "%s\n" "#define HAVE_STDIO_EXT_H 1" >>confdefs.h | |
| 16822 | ||
| 16823 | fi | |
| 16824 | ||
| 16825 | ||
| 16826 | printf "%s\n" "#define HAVE_MALLOC 1" >>confdefs.h | |
| 16827 | ||
| 16828 | ||
| 16829 | ||
| 16830 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 | |
| 16831 | printf %s "checking for working mmap... " >&6; } | |
| 16832 | if test ${ac_cv_func_mmap_fixed_mapped+y} | |
| 16833 | then : | |
| 16834 | printf %s "(cached) " >&6 | |
| 16835 | else case e in #( | |
| 16836 | e) if test "$cross_compiling" = yes | |
| 16837 | then : | |
| 16838 | case "$host_os" in # (( | |
| 16839 | # Guess yes on platforms where we know the result. | |
| 16840 | linux*) ac_cv_func_mmap_fixed_mapped=yes ;; | |
| 16841 | # If we don't know, assume the worst. | |
| 16842 | *) ac_cv_func_mmap_fixed_mapped=no ;; | |
| 16843 | esac | |
| 16844 | else case e in #( | |
| 16845 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 16846 | /* end confdefs.h. */ | |
| 16847 | $ac_includes_default | |
| 16848 | /* malloc might have been renamed as rpl_malloc. */ | |
| 16849 | #undef malloc | |
| 16850 | ||
| 16851 | /* Thanks to Mike Haertel and Jim Avera for this test. | |
| 16852 | Here is a matrix of mmap possibilities: | |
| 16853 | mmap private not fixed | |
| 16854 | mmap private fixed at somewhere currently unmapped | |
| 16855 | mmap private fixed at somewhere already mapped | |
| 16856 | mmap shared not fixed | |
| 16857 | mmap shared fixed at somewhere currently unmapped | |
| 16858 | mmap shared fixed at somewhere already mapped | |
| 16859 | For private mappings, we should verify that changes cannot be read() | |
| 16860 | back from the file, nor mmap's back from the file at a different | |
| 16861 | address. (There have been systems where private was not correctly | |
| 16862 | implemented like the infamous i386 svr4.0, and systems where the | |
| 16863 | VM page cache was not coherent with the file system buffer cache | |
| 16864 | like early versions of FreeBSD and possibly contemporary NetBSD.) | |
| 16865 | For shared mappings, we should conversely verify that changes get | |
| 16866 | propagated back to all the places they're supposed to be. */ | |
| 16867 | ||
| 16868 | #include <fcntl.h> | |
| 16869 | #include <sys/mman.h> | |
| 16870 | ||
| 16871 | #ifndef getpagesize | |
| 16872 | /* Prefer sysconf to the legacy getpagesize function, as getpagesize has | |
| 16873 | been removed from POSIX and is limited to page sizes that fit in 'int'. */ | |
| 16874 | # ifdef _SC_PAGESIZE | |
| 16875 | # define getpagesize() sysconf (_SC_PAGESIZE) | |
| 16876 | # elif defined _SC_PAGE_SIZE | |
| 16877 | # define getpagesize() sysconf (_SC_PAGE_SIZE) | |
| 16878 | # elif HAVE_GETPAGESIZE | |
| 16879 | int getpagesize (); | |
| 16880 | # else | |
| 16881 | # ifdef HAVE_SYS_PARAM_H | |
| 16882 | # include <sys/param.h> | |
| 16883 | # ifdef EXEC_PAGESIZE | |
| 16884 | # define getpagesize() EXEC_PAGESIZE | |
| 16885 | # else /* no EXEC_PAGESIZE */ | |
| 16886 | # ifdef NBPG | |
| 16887 | # define getpagesize() NBPG * CLSIZE | |
| 16888 | # ifndef CLSIZE | |
| 16889 | # define CLSIZE 1 | |
| 16890 | # endif /* no CLSIZE */ | |
| 16891 | # else /* no NBPG */ | |
| 16892 | # ifdef NBPC | |
| 16893 | # define getpagesize() NBPC | |
| 16894 | # else /* no NBPC */ | |
| 16895 | # ifdef PAGESIZE | |
| 16896 | # define getpagesize() PAGESIZE | |
| 16897 | # endif /* PAGESIZE */ | |
| 16898 | # endif /* no NBPC */ | |
| 16899 | # endif /* no NBPG */ | |
| 16900 | # endif /* no EXEC_PAGESIZE */ | |
| 16901 | # else /* no HAVE_SYS_PARAM_H */ | |
| 16902 | # define getpagesize() 8192 /* punt totally */ | |
| 16903 | # endif /* no HAVE_SYS_PARAM_H */ | |
| 16904 | # endif | |
| 16905 | #endif | |
| 16906 | ||
| 16907 | int | |
| 16908 | main (void) | |
| 16909 | { | |
| 16910 | char *data, *data2, *data3; | |
| 16911 | const char *cdata2; | |
| 16912 | long i, pagesize; | |
| 16913 | int fd, fd2; | |
| 16914 | ||
| 16915 | pagesize = getpagesize (); | |
| 16916 | ||
| 16917 | /* First, make a file with some known garbage in it. */ | |
| 16918 | data = (char *) malloc (pagesize); | |
| 16919 | if (!data) | |
| 16920 | return 1; | |
| 16921 | for (i = 0; i < pagesize; ++i) | |
| 16922 | *(data + i) = rand (); | |
| 16923 | umask (0); | |
| 16924 | fd = creat ("conftest.mmap", 0600); | |
| 16925 | if (fd < 0) | |
| 16926 | return 2; | |
| 16927 | if (write (fd, data, pagesize) != pagesize) | |
| 16928 | return 3; | |
| 16929 | close (fd); | |
| 16930 | ||
| 16931 | /* Next, check that the tail of a page is zero-filled. File must have | |
| 16932 | non-zero length, otherwise we risk SIGBUS for entire page. */ | |
| 16933 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); | |
| 16934 | if (fd2 < 0) | |
| 16935 | return 4; | |
| 16936 | cdata2 = ""; | |
| 16937 | if (write (fd2, cdata2, 1) != 1) | |
| 16938 | return 5; | |
| 16939 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); | |
| 16940 | if (data2 == MAP_FAILED) | |
| 16941 | return 6; | |
| 16942 | for (i = 0; i < pagesize; ++i) | |
| 16943 | if (*(data2 + i)) | |
| 16944 | return 7; | |
| 16945 | close (fd2); | |
| 16946 | /* 'return 8;' not currently used. */ | |
| 16947 | ||
| 16948 | /* Next, try to mmap the file at a fixed address which already has | |
| 16949 | something else allocated at it. If we can, also make sure that | |
| 16950 | we see the same garbage. */ | |
| 16951 | fd = open ("conftest.mmap", O_RDWR); | |
| 16952 | if (fd < 0) | |
| 16953 | return 9; | |
| 16954 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, | |
| 16955 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) | |
| 16956 | return 10; | |
| 16957 | for (i = 0; i < pagesize; ++i) | |
| 16958 | if (*(data + i) != *(data2 + i)) | |
| 16959 | return 11; | |
| 16960 | ||
| 16961 | /* Finally, make sure that changes to the mapped area do not | |
| 16962 | percolate back to the file as seen by read(). (This is a bug on | |
| 16963 | some variants of i386 svr4.0.) */ | |
| 16964 | for (i = 0; i < pagesize; ++i) | |
| 16965 | *(data2 + i) = *(data2 + i) + 1; | |
| 16966 | data3 = (char *) malloc (pagesize); | |
| 16967 | if (!data3) | |
| 16968 | return 12; | |
| 16969 | if (read (fd, data3, pagesize) != pagesize) | |
| 16970 | return 13; | |
| 16971 | for (i = 0; i < pagesize; ++i) | |
| 16972 | if (*(data + i) != *(data3 + i)) | |
| 16973 | return 14; | |
| 16974 | close (fd); | |
| 16975 | free (data); | |
| 16976 | free (data3); | |
| 16977 | return 0; | |
| 16978 | } | |
| 16979 | _ACEOF | |
| 16980 | if ac_fn_c_try_run "$LINENO" | |
| 16981 | then : | |
| 16982 | ac_cv_func_mmap_fixed_mapped=yes | |
| 16983 | else case e in #( | |
| 16984 | e) ac_cv_func_mmap_fixed_mapped=no ;; | |
| 16985 | esac | |
| 16986 | fi | |
| 16987 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 16988 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 16989 | esac | |
| 16990 | fi | |
| 16991 | ;; | |
| 16992 | esac | |
| 16993 | fi | |
| 16994 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 | |
| 16995 | printf "%s\n" "$ac_cv_func_mmap_fixed_mapped" >&6; } | |
| 16996 | if test $ac_cv_func_mmap_fixed_mapped = yes; then | |
| 16997 | ||
| 16998 | printf "%s\n" "#define HAVE_MMAP 1" >>confdefs.h | |
| 16999 | ||
| 17000 | fi | |
| 17001 | rm -f conftest.mmap conftest.txt | |
| 17002 | ||
| 17003 | ac_fn_c_check_func "$LINENO" "__argz_count" "ac_cv_func___argz_count" | |
| 17004 | if test "x$ac_cv_func___argz_count" = xyes | |
| 17005 | then : | |
| 17006 | printf "%s\n" "#define HAVE___ARGZ_COUNT 1" >>confdefs.h | |
| 17007 | ||
| 17008 | fi | |
| 17009 | ac_fn_c_check_func "$LINENO" "__argz_next" "ac_cv_func___argz_next" | |
| 17010 | if test "x$ac_cv_func___argz_next" = xyes | |
| 17011 | then : | |
| 17012 | printf "%s\n" "#define HAVE___ARGZ_NEXT 1" >>confdefs.h | |
| 17013 | ||
| 17014 | fi | |
| 17015 | ac_fn_c_check_func "$LINENO" "__argz_stringify" "ac_cv_func___argz_stringify" | |
| 17016 | if test "x$ac_cv_func___argz_stringify" = xyes | |
| 17017 | then : | |
| 17018 | printf "%s\n" "#define HAVE___ARGZ_STRINGIFY 1" >>confdefs.h | |
| 17019 | ||
| 17020 | fi | |
| 17021 | ac_fn_c_check_func "$LINENO" "dcgettext" "ac_cv_func_dcgettext" | |
| 17022 | if test "x$ac_cv_func_dcgettext" = xyes | |
| 17023 | then : | |
| 17024 | printf "%s\n" "#define HAVE_DCGETTEXT 1" >>confdefs.h | |
| 17025 | ||
| 17026 | fi | |
| 17027 | ac_fn_c_check_func "$LINENO" "locale_charset" "ac_cv_func_locale_charset" | |
| 17028 | if test "x$ac_cv_func_locale_charset" = xyes | |
| 17029 | then : | |
| 17030 | printf "%s\n" "#define HAVE_LOCALE_CHARSET 1" >>confdefs.h | |
| 17031 | ||
| 17032 | fi | |
| 17033 | ac_fn_c_check_func "$LINENO" "mempcpy" "ac_cv_func_mempcpy" | |
| 17034 | if test "x$ac_cv_func_mempcpy" = xyes | |
| 17035 | then : | |
| 17036 | printf "%s\n" "#define HAVE_MEMPCPY 1" >>confdefs.h | |
| 17037 | ||
| 17038 | fi | |
| 17039 | ac_fn_c_check_func "$LINENO" "munmap" "ac_cv_func_munmap" | |
| 17040 | if test "x$ac_cv_func_munmap" = xyes | |
| 17041 | then : | |
| 17042 | printf "%s\n" "#define HAVE_MUNMAP 1" >>confdefs.h | |
| 17043 | ||
| 17044 | fi | |
| 17045 | ac_fn_c_check_func "$LINENO" "mremap" "ac_cv_func_mremap" | |
| 17046 | if test "x$ac_cv_func_mremap" = xyes | |
| 17047 | then : | |
| 17048 | printf "%s\n" "#define HAVE_MREMAP 1" >>confdefs.h | |
| 17049 | ||
| 17050 | fi | |
| 17051 | ac_fn_c_check_func "$LINENO" "stpcpy" "ac_cv_func_stpcpy" | |
| 17052 | if test "x$ac_cv_func_stpcpy" = xyes | |
| 17053 | then : | |
| 17054 | printf "%s\n" "#define HAVE_STPCPY 1" >>confdefs.h | |
| 17055 | ||
| 17056 | fi | |
| 17057 | ac_fn_c_check_func "$LINENO" "strcspn" "ac_cv_func_strcspn" | |
| 17058 | if test "x$ac_cv_func_strcspn" = xyes | |
| 17059 | then : | |
| 17060 | printf "%s\n" "#define HAVE_STRCSPN 1" >>confdefs.h | |
| 17061 | ||
| 17062 | fi | |
| 17063 | ||
| 17064 | ||
| 17065 | INTL_DEP= INTL_INC= LIBINTL_H= | |
| 17066 | if test "x$USE_INCLUDED_LIBINTL" = "xyes"; then | |
| 17067 | INTL_DEP='${INTL_LIBDIR}/libintl.a' | |
| 17068 | INTL_INC='-I${INTL_LIBSRC} -I${INTL_BUILDDIR}' | |
| 17069 | LIBINTL_H='${INTL_BUILDDIR}/libintl.h' | |
| 17070 | ||
| 17071 | printf "%s\n" "#define HAVE_LOCALE_CHARSET 1" >>confdefs.h | |
| 17072 | ||
| 17073 | fi | |
| 17074 | ||
| 17075 | ||
| 17076 | ||
| 17077 | ||
| 17078 | ||
| 17079 | ||
| 17080 | ac_fn_c_check_header_compile "$LINENO" "wctype.h" "ac_cv_header_wctype_h" "$ac_includes_default" | |
| 17081 | if test "x$ac_cv_header_wctype_h" = xyes | |
| 17082 | then : | |
| 17083 | printf "%s\n" "#define HAVE_WCTYPE_H 1" >>confdefs.h | |
| 17084 | ||
| 17085 | fi | |
| 17086 | ||
| 17087 | ac_fn_c_check_header_compile "$LINENO" "wchar.h" "ac_cv_header_wchar_h" "$ac_includes_default" | |
| 17088 | if test "x$ac_cv_header_wchar_h" = xyes | |
| 17089 | then : | |
| 17090 | printf "%s\n" "#define HAVE_WCHAR_H 1" >>confdefs.h | |
| 17091 | ||
| 17092 | fi | |
| 17093 | ||
| 17094 | ac_fn_c_check_header_compile "$LINENO" "langinfo.h" "ac_cv_header_langinfo_h" "$ac_includes_default" | |
| 17095 | if test "x$ac_cv_header_langinfo_h" = xyes | |
| 17096 | then : | |
| 17097 | printf "%s\n" "#define HAVE_LANGINFO_H 1" >>confdefs.h | |
| 17098 | ||
| 17099 | fi | |
| 17100 | ||
| 17101 | ||
| 17102 | ac_fn_c_check_header_compile "$LINENO" "mbstr.h" "ac_cv_header_mbstr_h" "$ac_includes_default" | |
| 17103 | if test "x$ac_cv_header_mbstr_h" = xyes | |
| 17104 | then : | |
| 17105 | printf "%s\n" "#define HAVE_MBSTR_H 1" >>confdefs.h | |
| 17106 | ||
| 17107 | fi | |
| 17108 | ||
| 17109 | ||
| 17110 | ac_fn_c_check_func "$LINENO" "mbrlen" "ac_cv_func_mbrlen" | |
| 17111 | if test "x$ac_cv_func_mbrlen" = xyes | |
| 17112 | then : | |
| 17113 | printf "%s\n" "#define HAVE_MBRLEN 1" >>confdefs.h | |
| 17114 | ||
| 17115 | fi | |
| 17116 | ||
| 17117 | ac_fn_c_check_func "$LINENO" "mbscasecmp" "ac_cv_func_mbscasecmp" | |
| 17118 | if test "x$ac_cv_func_mbscasecmp" = xyes | |
| 17119 | then : | |
| 17120 | printf "%s\n" "#define HAVE_MBSCASECMP 1" >>confdefs.h | |
| 17121 | ||
| 17122 | fi | |
| 17123 | ||
| 17124 | ac_fn_c_check_func "$LINENO" "mbscmp" "ac_cv_func_mbscmp" | |
| 17125 | if test "x$ac_cv_func_mbscmp" = xyes | |
| 17126 | then : | |
| 17127 | printf "%s\n" "#define HAVE_MBSCMP 1" >>confdefs.h | |
| 17128 | ||
| 17129 | fi | |
| 17130 | ||
| 17131 | ac_fn_c_check_func "$LINENO" "mbsncmp" "ac_cv_func_mbsncmp" | |
| 17132 | if test "x$ac_cv_func_mbsncmp" = xyes | |
| 17133 | then : | |
| 17134 | printf "%s\n" "#define HAVE_MBSNCMP 1" >>confdefs.h | |
| 17135 | ||
| 17136 | fi | |
| 17137 | ||
| 17138 | ac_fn_c_check_func "$LINENO" "mbsnrtowcs" "ac_cv_func_mbsnrtowcs" | |
| 17139 | if test "x$ac_cv_func_mbsnrtowcs" = xyes | |
| 17140 | then : | |
| 17141 | printf "%s\n" "#define HAVE_MBSNRTOWCS 1" >>confdefs.h | |
| 17142 | ||
| 17143 | fi | |
| 17144 | ||
| 17145 | ac_fn_c_check_func "$LINENO" "mbsrtowcs" "ac_cv_func_mbsrtowcs" | |
| 17146 | if test "x$ac_cv_func_mbsrtowcs" = xyes | |
| 17147 | then : | |
| 17148 | printf "%s\n" "#define HAVE_MBSRTOWCS 1" >>confdefs.h | |
| 17149 | ||
| 17150 | fi | |
| 17151 | ||
| 17152 | ||
| 17153 | ac_fn_c_check_func "$LINENO" "mbschr" "ac_cv_func_mbschr" | |
| 17154 | if test "x$ac_cv_func_mbschr" = xyes | |
| 17155 | then : | |
| 17156 | printf "%s\n" "#define HAVE_MBSCHR 1" >>confdefs.h | |
| 17157 | ||
| 17158 | else case e in #( | |
| 17159 | e) case " $LIBOBJS " in | |
| 17160 | *" mbschr.$ac_objext "* ) ;; | |
| 17161 | *) LIBOBJS="$LIBOBJS mbschr.$ac_objext" | |
| 17162 | ;; | |
| 17163 | esac | |
| 17164 | ;; | |
| 17165 | esac | |
| 17166 | fi | |
| 17167 | ||
| 17168 | ||
| 17169 | ac_fn_c_check_func "$LINENO" "wcrtomb" "ac_cv_func_wcrtomb" | |
| 17170 | if test "x$ac_cv_func_wcrtomb" = xyes | |
| 17171 | then : | |
| 17172 | printf "%s\n" "#define HAVE_WCRTOMB 1" >>confdefs.h | |
| 17173 | ||
| 17174 | fi | |
| 17175 | ||
| 17176 | ac_fn_c_check_func "$LINENO" "wcscoll" "ac_cv_func_wcscoll" | |
| 17177 | if test "x$ac_cv_func_wcscoll" = xyes | |
| 17178 | then : | |
| 17179 | printf "%s\n" "#define HAVE_WCSCOLL 1" >>confdefs.h | |
| 17180 | ||
| 17181 | fi | |
| 17182 | ||
| 17183 | ac_fn_c_check_func "$LINENO" "wcsdup" "ac_cv_func_wcsdup" | |
| 17184 | if test "x$ac_cv_func_wcsdup" = xyes | |
| 17185 | then : | |
| 17186 | printf "%s\n" "#define HAVE_WCSDUP 1" >>confdefs.h | |
| 17187 | ||
| 17188 | fi | |
| 17189 | ||
| 17190 | ac_fn_c_check_func "$LINENO" "wcwidth" "ac_cv_func_wcwidth" | |
| 17191 | if test "x$ac_cv_func_wcwidth" = xyes | |
| 17192 | then : | |
| 17193 | printf "%s\n" "#define HAVE_WCWIDTH 1" >>confdefs.h | |
| 17194 | ||
| 17195 | fi | |
| 17196 | ||
| 17197 | ac_fn_c_check_func "$LINENO" "wctype" "ac_cv_func_wctype" | |
| 17198 | if test "x$ac_cv_func_wctype" = xyes | |
| 17199 | then : | |
| 17200 | printf "%s\n" "#define HAVE_WCTYPE 1" >>confdefs.h | |
| 17201 | ||
| 17202 | fi | |
| 17203 | ||
| 17204 | ac_fn_c_check_func "$LINENO" "wcsnrtombs" "ac_cv_func_wcsnrtombs" | |
| 17205 | if test "x$ac_cv_func_wcsnrtombs" = xyes | |
| 17206 | then : | |
| 17207 | printf "%s\n" "#define HAVE_WCSNRTOMBS 1" >>confdefs.h | |
| 17208 | ||
| 17209 | fi | |
| 17210 | ||
| 17211 | ||
| 17212 | ac_fn_c_check_func "$LINENO" "wcswidth" "ac_cv_func_wcswidth" | |
| 17213 | if test "x$ac_cv_func_wcswidth" = xyes | |
| 17214 | then : | |
| 17215 | printf "%s\n" "#define HAVE_WCSWIDTH 1" >>confdefs.h | |
| 17216 | ||
| 17217 | else case e in #( | |
| 17218 | e) case " $LIBOBJS " in | |
| 17219 | *" wcswidth.$ac_objext "* ) ;; | |
| 17220 | *) LIBOBJS="$LIBOBJS wcswidth.$ac_objext" | |
| 17221 | ;; | |
| 17222 | esac | |
| 17223 | ;; | |
| 17224 | esac | |
| 17225 | fi | |
| 17226 | ||
| 17227 | ||
| 17228 | ||
| 17229 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether mbrtowc and mbstate_t are properly declared" >&5 | |
| 17230 | printf %s "checking whether mbrtowc and mbstate_t are properly declared... " >&6; } | |
| 17231 | if test ${ac_cv_func_mbrtowc+y} | |
| 17232 | then : | |
| 17233 | printf %s "(cached) " >&6 | |
| 17234 | else case e in #( | |
| 17235 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 17236 | /* end confdefs.h. */ | |
| 17237 | #include <wchar.h> | |
| 17238 | int | |
| 17239 | main (void) | |
| 17240 | { | |
| 17241 | wchar_t wc; | |
| 17242 | char const s[] = ""; | |
| 17243 | size_t n = 1; | |
| 17244 | mbstate_t state; | |
| 17245 | return ! (sizeof state && (mbrtowc) (&wc, s, n, &state)); | |
| 17246 | ; | |
| 17247 | return 0; | |
| 17248 | } | |
| 17249 | _ACEOF | |
| 17250 | if ac_fn_c_try_link "$LINENO" | |
| 17251 | then : | |
| 17252 | ac_cv_func_mbrtowc=yes | |
| 17253 | else case e in #( | |
| 17254 | e) ac_cv_func_mbrtowc=no ;; | |
| 17255 | esac | |
| 17256 | fi | |
| 17257 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 17258 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 17259 | esac | |
| 17260 | fi | |
| 17261 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mbrtowc" >&5 | |
| 17262 | printf "%s\n" "$ac_cv_func_mbrtowc" >&6; } | |
| 17263 | if test $ac_cv_func_mbrtowc = yes; then | |
| 17264 | ||
| 17265 | printf "%s\n" "#define HAVE_MBRTOWC 1" >>confdefs.h | |
| 17266 | ||
| 17267 | fi | |
| 17268 | ||
| 17269 | if test $ac_cv_func_mbrtowc = yes; then | |
| 17270 | printf "%s\n" "#define HAVE_MBSTATE_T 1" >>confdefs.h | |
| 17271 | ||
| 17272 | fi | |
| 17273 | ||
| 17274 | ac_fn_c_check_func "$LINENO" "iswlower" "ac_cv_func_iswlower" | |
| 17275 | if test "x$ac_cv_func_iswlower" = xyes | |
| 17276 | then : | |
| 17277 | printf "%s\n" "#define HAVE_ISWLOWER 1" >>confdefs.h | |
| 17278 | ||
| 17279 | fi | |
| 17280 | ac_fn_c_check_func "$LINENO" "iswupper" "ac_cv_func_iswupper" | |
| 17281 | if test "x$ac_cv_func_iswupper" = xyes | |
| 17282 | then : | |
| 17283 | printf "%s\n" "#define HAVE_ISWUPPER 1" >>confdefs.h | |
| 17284 | ||
| 17285 | fi | |
| 17286 | ac_fn_c_check_func "$LINENO" "towlower" "ac_cv_func_towlower" | |
| 17287 | if test "x$ac_cv_func_towlower" = xyes | |
| 17288 | then : | |
| 17289 | printf "%s\n" "#define HAVE_TOWLOWER 1" >>confdefs.h | |
| 17290 | ||
| 17291 | fi | |
| 17292 | ac_fn_c_check_func "$LINENO" "towupper" "ac_cv_func_towupper" | |
| 17293 | if test "x$ac_cv_func_towupper" = xyes | |
| 17294 | then : | |
| 17295 | printf "%s\n" "#define HAVE_TOWUPPER 1" >>confdefs.h | |
| 17296 | ||
| 17297 | fi | |
| 17298 | ac_fn_c_check_func "$LINENO" "iswctype" "ac_cv_func_iswctype" | |
| 17299 | if test "x$ac_cv_func_iswctype" = xyes | |
| 17300 | then : | |
| 17301 | printf "%s\n" "#define HAVE_ISWCTYPE 1" >>confdefs.h | |
| 17302 | ||
| 17303 | fi | |
| 17304 | ||
| 17305 | ||
| 17306 | ||
| 17307 | ||
| 17308 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wchar_t in wchar.h" >&5 | |
| 17309 | printf %s "checking for wchar_t in wchar.h... " >&6; } | |
| 17310 | if test ${bash_cv_type_wchar_t+y} | |
| 17311 | then : | |
| 17312 | printf %s "(cached) " >&6 | |
| 17313 | else case e in #( | |
| 17314 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 17315 | /* end confdefs.h. */ | |
| 17316 | ||
| 17317 | #include <wchar.h> | |
| 17318 | int | |
| 17319 | main (void) | |
| 17320 | { | |
| 17321 | ||
| 17322 | wchar_t foo; | |
| 17323 | foo = 0; | |
| 17324 | ||
| 17325 | ; | |
| 17326 | return 0; | |
| 17327 | } | |
| 17328 | _ACEOF | |
| 17329 | if ac_fn_c_try_compile "$LINENO" | |
| 17330 | then : | |
| 17331 | bash_cv_type_wchar_t=yes | |
| 17332 | else case e in #( | |
| 17333 | e) bash_cv_type_wchar_t=no | |
| 17334 | ;; | |
| 17335 | esac | |
| 17336 | fi | |
| 17337 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 17338 | esac | |
| 17339 | fi | |
| 17340 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wchar_t" >&5 | |
| 17341 | printf "%s\n" "$bash_cv_type_wchar_t" >&6; } | |
| 17342 | if test $bash_cv_type_wchar_t = yes; then | |
| 17343 | ||
| 17344 | printf "%s\n" "#define HAVE_WCHAR_T 1" >>confdefs.h | |
| 17345 | ||
| 17346 | fi | |
| 17347 | ||
| 17348 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wctype_t in wctype.h" >&5 | |
| 17349 | printf %s "checking for wctype_t in wctype.h... " >&6; } | |
| 17350 | if test ${bash_cv_type_wctype_t+y} | |
| 17351 | then : | |
| 17352 | printf %s "(cached) " >&6 | |
| 17353 | else case e in #( | |
| 17354 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 17355 | /* end confdefs.h. */ | |
| 17356 | ||
| 17357 | #include <wctype.h> | |
| 17358 | int | |
| 17359 | main (void) | |
| 17360 | { | |
| 17361 | ||
| 17362 | wctype_t foo; | |
| 17363 | foo = 0; | |
| 17364 | ||
| 17365 | ; | |
| 17366 | return 0; | |
| 17367 | } | |
| 17368 | _ACEOF | |
| 17369 | if ac_fn_c_try_compile "$LINENO" | |
| 17370 | then : | |
| 17371 | bash_cv_type_wctype_t=yes | |
| 17372 | else case e in #( | |
| 17373 | e) bash_cv_type_wctype_t=no | |
| 17374 | ;; | |
| 17375 | esac | |
| 17376 | fi | |
| 17377 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 17378 | esac | |
| 17379 | fi | |
| 17380 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wctype_t" >&5 | |
| 17381 | printf "%s\n" "$bash_cv_type_wctype_t" >&6; } | |
| 17382 | if test $bash_cv_type_wctype_t = yes; then | |
| 17383 | ||
| 17384 | printf "%s\n" "#define HAVE_WCTYPE_T 1" >>confdefs.h | |
| 17385 | ||
| 17386 | fi | |
| 17387 | ||
| 17388 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wint_t in wctype.h" >&5 | |
| 17389 | printf %s "checking for wint_t in wctype.h... " >&6; } | |
| 17390 | if test ${bash_cv_type_wint_t+y} | |
| 17391 | then : | |
| 17392 | printf %s "(cached) " >&6 | |
| 17393 | else case e in #( | |
| 17394 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 17395 | /* end confdefs.h. */ | |
| 17396 | ||
| 17397 | #include <wctype.h> | |
| 17398 | int | |
| 17399 | main (void) | |
| 17400 | { | |
| 17401 | ||
| 17402 | wint_t foo; | |
| 17403 | foo = 0; | |
| 17404 | ||
| 17405 | ; | |
| 17406 | return 0; | |
| 17407 | } | |
| 17408 | _ACEOF | |
| 17409 | if ac_fn_c_try_compile "$LINENO" | |
| 17410 | then : | |
| 17411 | bash_cv_type_wint_t=yes | |
| 17412 | else case e in #( | |
| 17413 | e) bash_cv_type_wint_t=no | |
| 17414 | ;; | |
| 17415 | esac | |
| 17416 | fi | |
| 17417 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 17418 | esac | |
| 17419 | fi | |
| 17420 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_wint_t" >&5 | |
| 17421 | printf "%s\n" "$bash_cv_type_wint_t" >&6; } | |
| 17422 | if test $bash_cv_type_wint_t = yes; then | |
| 17423 | ||
| 17424 | printf "%s\n" "#define HAVE_WINT_T 1" >>confdefs.h | |
| 17425 | ||
| 17426 | fi | |
| 17427 | ||
| 17428 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for wcwidth broken with unicode combining characters" >&5 | |
| 17429 | printf %s "checking for wcwidth broken with unicode combining characters... " >&6; } | |
| 17430 | if test ${bash_cv_wcwidth_broken+y} | |
| 17431 | then : | |
| 17432 | printf %s "(cached) " >&6 | |
| 17433 | else case e in #( | |
| 17434 | e) if test "$cross_compiling" = yes | |
| 17435 | then : | |
| 17436 | bash_cv_wcwidth_broken=no | |
| 17437 | ||
| 17438 | else case e in #( | |
| 17439 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 17440 | /* end confdefs.h. */ | |
| 17441 | ||
| 17442 | #include <unistd.h> | |
| 17443 | #include <stdlib.h> | |
| 17444 | #include <stdio.h> | |
| 17445 | ||
| 17446 | #include <locale.h> | |
| 17447 | #include <wchar.h> | |
| 17448 | ||
| 17449 | int | |
| 17450 | main(int c, char **v) | |
| 17451 | { | |
| 17452 | int w; | |
| 17453 | ||
| 17454 | setlocale(LC_ALL, "en_US.UTF-8"); | |
| 17455 | w = wcwidth (0x0301); | |
| 17456 | if (w != 0) | |
| 17457 | exit (0); | |
| 17458 | w = wcwidth (0x200b); | |
| 17459 | exit (w == 0); /* exit 0 if wcwidth broken */ | |
| 17460 | } | |
| 17461 | ||
| 17462 | _ACEOF | |
| 17463 | if ac_fn_c_try_run "$LINENO" | |
| 17464 | then : | |
| 17465 | bash_cv_wcwidth_broken=yes | |
| 17466 | else case e in #( | |
| 17467 | e) bash_cv_wcwidth_broken=no ;; | |
| 17468 | esac | |
| 17469 | fi | |
| 17470 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 17471 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 17472 | esac | |
| 17473 | fi | |
| 17474 | ;; | |
| 17475 | esac | |
| 17476 | fi | |
| 17477 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcwidth_broken" >&5 | |
| 17478 | printf "%s\n" "$bash_cv_wcwidth_broken" >&6; } | |
| 17479 | if test "$bash_cv_wcwidth_broken" = yes; then | |
| 17480 | ||
| 17481 | printf "%s\n" "#define WCWIDTH_BROKEN 1" >>confdefs.h | |
| 17482 | ||
| 17483 | fi | |
| 17484 | ||
| 17485 | if test "$am_cv_func_iconv" = yes; then | |
| 17486 | OLDLIBS="$LIBS" | |
| 17487 | LIBS="$LIBS $LIBINTL $LIBICONV" | |
| 17488 | ac_fn_c_check_func "$LINENO" "locale_charset" "ac_cv_func_locale_charset" | |
| 17489 | if test "x$ac_cv_func_locale_charset" = xyes | |
| 17490 | then : | |
| 17491 | printf "%s\n" "#define HAVE_LOCALE_CHARSET 1" >>confdefs.h | |
| 17492 | ||
| 17493 | fi | |
| 17494 | ||
| 17495 | LIBS="$OLDLIBS" | |
| 17496 | fi | |
| 17497 | ||
| 17498 | # The cast to long int works around a bug in the HP C Compiler | |
| 17499 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
| 17500 | # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. | |
| 17501 | # This bug is HP SR number 8606223364. | |
| 17502 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of wchar_t" >&5 | |
| 17503 | printf %s "checking size of wchar_t... " >&6; } | |
| 17504 | if test ${ac_cv_sizeof_wchar_t+y} | |
| 17505 | then : | |
| 17506 | printf %s "(cached) " >&6 | |
| 17507 | else case e in #( | |
| 17508 | e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (wchar_t))" "ac_cv_sizeof_wchar_t" "$ac_includes_default" | |
| 17509 | then : | |
| 17510 | ||
| 17511 | else case e in #( | |
| 17512 | e) if test "$ac_cv_type_wchar_t" = yes; then | |
| 17513 | { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 17514 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 17515 | as_fn_error 77 "cannot compute sizeof (wchar_t) | |
| 17516 | See 'config.log' for more details" "$LINENO" 5; } | |
| 17517 | else | |
| 17518 | ac_cv_sizeof_wchar_t=0 | |
| 17519 | fi ;; | |
| 17520 | esac | |
| 17521 | fi | |
| 17522 | ;; | |
| 17523 | esac | |
| 17524 | fi | |
| 17525 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_wchar_t" >&5 | |
| 17526 | printf "%s\n" "$ac_cv_sizeof_wchar_t" >&6; } | |
| 17527 | ||
| 17528 | ||
| 17529 | ||
| 17530 | printf "%s\n" "#define SIZEOF_WCHAR_T $ac_cv_sizeof_wchar_t" >>confdefs.h | |
| 17531 | ||
| 17532 | ||
| 17533 | ||
| 17534 | ||
| 17535 | ||
| 17536 | if test "$opt_static_link" != yes; then | |
| 17537 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 | |
| 17538 | printf %s "checking for dlopen in -ldl... " >&6; } | |
| 17539 | if test ${ac_cv_lib_dl_dlopen+y} | |
| 17540 | then : | |
| 17541 | printf %s "(cached) " >&6 | |
| 17542 | else case e in #( | |
| 17543 | e) ac_check_lib_save_LIBS=$LIBS | |
| 17544 | LIBS="-ldl $LIBS" | |
| 17545 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 17546 | /* end confdefs.h. */ | |
| 17547 | ||
| 17548 | /* Override any GCC internal prototype to avoid an error. | |
| 17549 | Use char because int might match the return type of a GCC | |
| 17550 | builtin and then its argument prototype would still apply. | |
| 17551 | The 'extern "C"' is for builds by C++ compilers; | |
| 17552 | although this is not generally supported in C code supporting it here | |
| 17553 | has little cost and some practical benefit (sr 110532). */ | |
| 17554 | #ifdef __cplusplus | |
| 17555 | extern "C" | |
| 17556 | #endif | |
| 17557 | char dlopen (void); | |
| 17558 | int | |
| 17559 | main (void) | |
| 17560 | { | |
| 17561 | return dlopen (); | |
| 17562 | ; | |
| 17563 | return 0; | |
| 17564 | } | |
| 17565 | _ACEOF | |
| 17566 | if ac_fn_c_try_link "$LINENO" | |
| 17567 | then : | |
| 17568 | ac_cv_lib_dl_dlopen=yes | |
| 17569 | else case e in #( | |
| 17570 | e) ac_cv_lib_dl_dlopen=no ;; | |
| 17571 | esac | |
| 17572 | fi | |
| 17573 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 17574 | conftest$ac_exeext conftest.$ac_ext | |
| 17575 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 17576 | esac | |
| 17577 | fi | |
| 17578 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 | |
| 17579 | printf "%s\n" "$ac_cv_lib_dl_dlopen" >&6; } | |
| 17580 | if test "x$ac_cv_lib_dl_dlopen" = xyes | |
| 17581 | then : | |
| 17582 | printf "%s\n" "#define HAVE_LIBDL 1" >>confdefs.h | |
| 17583 | ||
| 17584 | LIBS="-ldl $LIBS" | |
| 17585 | ||
| 17586 | fi | |
| 17587 | ||
| 17588 | ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" | |
| 17589 | if test "x$ac_cv_func_dlopen" = xyes | |
| 17590 | then : | |
| 17591 | printf "%s\n" "#define HAVE_DLOPEN 1" >>confdefs.h | |
| 17592 | ||
| 17593 | fi | |
| 17594 | ac_fn_c_check_func "$LINENO" "dlclose" "ac_cv_func_dlclose" | |
| 17595 | if test "x$ac_cv_func_dlclose" = xyes | |
| 17596 | then : | |
| 17597 | printf "%s\n" "#define HAVE_DLCLOSE 1" >>confdefs.h | |
| 17598 | ||
| 17599 | fi | |
| 17600 | ac_fn_c_check_func "$LINENO" "dlsym" "ac_cv_func_dlsym" | |
| 17601 | if test "x$ac_cv_func_dlsym" = xyes | |
| 17602 | then : | |
| 17603 | printf "%s\n" "#define HAVE_DLSYM 1" >>confdefs.h | |
| 17604 | ||
| 17605 | fi | |
| 17606 | ||
| 17607 | fi | |
| 17608 | ||
| 17609 | if test "$ac_cv_func_inet_aton" != 'yes'; then | |
| 17610 | ||
| 17611 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for inet_aton" >&5 | |
| 17612 | printf %s "checking for inet_aton... " >&6; } | |
| 17613 | if test ${bash_cv_func_inet_aton+y} | |
| 17614 | then : | |
| 17615 | printf %s "(cached) " >&6 | |
| 17616 | else case e in #( | |
| 17617 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 17618 | /* end confdefs.h. */ | |
| 17619 | ||
| 17620 | #include <sys/types.h> | |
| 17621 | #include <netinet/in.h> | |
| 17622 | #include <arpa/inet.h> | |
| 17623 | struct in_addr ap; | |
| 17624 | int | |
| 17625 | main (void) | |
| 17626 | { | |
| 17627 | inet_aton("127.0.0.1", &ap); | |
| 17628 | ; | |
| 17629 | return 0; | |
| 17630 | } | |
| 17631 | _ACEOF | |
| 17632 | if ac_fn_c_try_link "$LINENO" | |
| 17633 | then : | |
| 17634 | bash_cv_func_inet_aton=yes | |
| 17635 | else case e in #( | |
| 17636 | e) bash_cv_func_inet_aton=no ;; | |
| 17637 | esac | |
| 17638 | fi | |
| 17639 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 17640 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 17641 | esac | |
| 17642 | fi | |
| 17643 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_inet_aton" >&5 | |
| 17644 | printf "%s\n" "$bash_cv_func_inet_aton" >&6; } | |
| 17645 | if test $bash_cv_func_inet_aton = yes; then | |
| 17646 | printf "%s\n" "#define HAVE_INET_ATON 1" >>confdefs.h | |
| 17647 | ||
| 17648 | else | |
| 17649 | case " $LIBOBJS " in | |
| 17650 | *" inet_aton.$ac_objext "* ) ;; | |
| 17651 | *) LIBOBJS="$LIBOBJS inet_aton.$ac_objext" | |
| 17652 | ;; | |
| 17653 | esac | |
| 17654 | ||
| 17655 | fi | |
| 17656 | ||
| 17657 | fi | |
| 17658 | ||
| 17659 | case "$host_os" in | |
| 17660 | irix4*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpwent in -lsun" >&5 | |
| 17661 | printf %s "checking for getpwent in -lsun... " >&6; } | |
| 17662 | if test ${ac_cv_lib_sun_getpwent+y} | |
| 17663 | then : | |
| 17664 | printf %s "(cached) " >&6 | |
| 17665 | else case e in #( | |
| 17666 | e) ac_check_lib_save_LIBS=$LIBS | |
| 17667 | LIBS="-lsun $LIBS" | |
| 17668 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 17669 | /* end confdefs.h. */ | |
| 17670 | ||
| 17671 | /* Override any GCC internal prototype to avoid an error. | |
| 17672 | Use char because int might match the return type of a GCC | |
| 17673 | builtin and then its argument prototype would still apply. | |
| 17674 | The 'extern "C"' is for builds by C++ compilers; | |
| 17675 | although this is not generally supported in C code supporting it here | |
| 17676 | has little cost and some practical benefit (sr 110532). */ | |
| 17677 | #ifdef __cplusplus | |
| 17678 | extern "C" | |
| 17679 | #endif | |
| 17680 | char getpwent (void); | |
| 17681 | int | |
| 17682 | main (void) | |
| 17683 | { | |
| 17684 | return getpwent (); | |
| 17685 | ; | |
| 17686 | return 0; | |
| 17687 | } | |
| 17688 | _ACEOF | |
| 17689 | if ac_fn_c_try_link "$LINENO" | |
| 17690 | then : | |
| 17691 | ac_cv_lib_sun_getpwent=yes | |
| 17692 | else case e in #( | |
| 17693 | e) ac_cv_lib_sun_getpwent=no ;; | |
| 17694 | esac | |
| 17695 | fi | |
| 17696 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 17697 | conftest$ac_exeext conftest.$ac_ext | |
| 17698 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 17699 | esac | |
| 17700 | fi | |
| 17701 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_sun_getpwent" >&5 | |
| 17702 | printf "%s\n" "$ac_cv_lib_sun_getpwent" >&6; } | |
| 17703 | if test "x$ac_cv_lib_sun_getpwent" = xyes | |
| 17704 | then : | |
| 17705 | printf "%s\n" "#define HAVE_LIBSUN 1" >>confdefs.h | |
| 17706 | ||
| 17707 | LIBS="-lsun $LIBS" | |
| 17708 | ||
| 17709 | fi | |
| 17710 | ;; | |
| 17711 | esac | |
| 17712 | ||
| 17713 | if test "$ac_cv_func_getpeername" = no; then | |
| 17714 | ||
| 17715 | if test "X$bash_cv_have_socklib" = "X"; then | |
| 17716 | _bash_needmsg= | |
| 17717 | else | |
| 17718 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socket library" >&5 | |
| 17719 | printf %s "checking for socket library... " >&6; } | |
| 17720 | _bash_needmsg=yes | |
| 17721 | fi | |
| 17722 | if test ${bash_cv_have_socklib+y} | |
| 17723 | then : | |
| 17724 | printf %s "(cached) " >&6 | |
| 17725 | else case e in #( | |
| 17726 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for getpeername in -lsocket" >&5 | |
| 17727 | printf %s "checking for getpeername in -lsocket... " >&6; } | |
| 17728 | if test ${ac_cv_lib_socket_getpeername+y} | |
| 17729 | then : | |
| 17730 | printf %s "(cached) " >&6 | |
| 17731 | else case e in #( | |
| 17732 | e) ac_check_lib_save_LIBS=$LIBS | |
| 17733 | LIBS="-lsocket -lnsl $LIBS" | |
| 17734 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 17735 | /* end confdefs.h. */ | |
| 17736 | ||
| 17737 | /* Override any GCC internal prototype to avoid an error. | |
| 17738 | Use char because int might match the return type of a GCC | |
| 17739 | builtin and then its argument prototype would still apply. | |
| 17740 | The 'extern "C"' is for builds by C++ compilers; | |
| 17741 | although this is not generally supported in C code supporting it here | |
| 17742 | has little cost and some practical benefit (sr 110532). */ | |
| 17743 | #ifdef __cplusplus | |
| 17744 | extern "C" | |
| 17745 | #endif | |
| 17746 | char getpeername (void); | |
| 17747 | int | |
| 17748 | main (void) | |
| 17749 | { | |
| 17750 | return getpeername (); | |
| 17751 | ; | |
| 17752 | return 0; | |
| 17753 | } | |
| 17754 | _ACEOF | |
| 17755 | if ac_fn_c_try_link "$LINENO" | |
| 17756 | then : | |
| 17757 | ac_cv_lib_socket_getpeername=yes | |
| 17758 | else case e in #( | |
| 17759 | e) ac_cv_lib_socket_getpeername=no ;; | |
| 17760 | esac | |
| 17761 | fi | |
| 17762 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 17763 | conftest$ac_exeext conftest.$ac_ext | |
| 17764 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 17765 | esac | |
| 17766 | fi | |
| 17767 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_getpeername" >&5 | |
| 17768 | printf "%s\n" "$ac_cv_lib_socket_getpeername" >&6; } | |
| 17769 | if test "x$ac_cv_lib_socket_getpeername" = xyes | |
| 17770 | then : | |
| 17771 | bash_cv_have_socklib=yes | |
| 17772 | else case e in #( | |
| 17773 | e) bash_cv_have_socklib=no ;; | |
| 17774 | esac | |
| 17775 | fi | |
| 17776 | ;; | |
| 17777 | esac | |
| 17778 | fi | |
| 17779 | ||
| 17780 | if test "X$_bash_needmsg" = Xyes; then | |
| 17781 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_socklib" >&5 | |
| 17782 | printf "%s\n" "$bash_cv_have_socklib" >&6; } | |
| 17783 | _bash_needmsg= | |
| 17784 | fi | |
| 17785 | if test $bash_cv_have_socklib = yes; then | |
| 17786 | # check for libnsl, add it to LIBS if present | |
| 17787 | if test "X$bash_cv_have_libnsl" = "X"; then | |
| 17788 | _bash_needmsg= | |
| 17789 | else | |
| 17790 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for libnsl" >&5 | |
| 17791 | printf %s "checking for libnsl... " >&6; } | |
| 17792 | _bash_needmsg=yes | |
| 17793 | fi | |
| 17794 | if test ${bash_cv_have_libnsl+y} | |
| 17795 | then : | |
| 17796 | printf %s "(cached) " >&6 | |
| 17797 | else case e in #( | |
| 17798 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for t_open in -lnsl" >&5 | |
| 17799 | printf %s "checking for t_open in -lnsl... " >&6; } | |
| 17800 | if test ${ac_cv_lib_nsl_t_open+y} | |
| 17801 | then : | |
| 17802 | printf %s "(cached) " >&6 | |
| 17803 | else case e in #( | |
| 17804 | e) ac_check_lib_save_LIBS=$LIBS | |
| 17805 | LIBS="-lnsl $LIBS" | |
| 17806 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 17807 | /* end confdefs.h. */ | |
| 17808 | ||
| 17809 | /* Override any GCC internal prototype to avoid an error. | |
| 17810 | Use char because int might match the return type of a GCC | |
| 17811 | builtin and then its argument prototype would still apply. | |
| 17812 | The 'extern "C"' is for builds by C++ compilers; | |
| 17813 | although this is not generally supported in C code supporting it here | |
| 17814 | has little cost and some practical benefit (sr 110532). */ | |
| 17815 | #ifdef __cplusplus | |
| 17816 | extern "C" | |
| 17817 | #endif | |
| 17818 | char t_open (void); | |
| 17819 | int | |
| 17820 | main (void) | |
| 17821 | { | |
| 17822 | return t_open (); | |
| 17823 | ; | |
| 17824 | return 0; | |
| 17825 | } | |
| 17826 | _ACEOF | |
| 17827 | if ac_fn_c_try_link "$LINENO" | |
| 17828 | then : | |
| 17829 | ac_cv_lib_nsl_t_open=yes | |
| 17830 | else case e in #( | |
| 17831 | e) ac_cv_lib_nsl_t_open=no ;; | |
| 17832 | esac | |
| 17833 | fi | |
| 17834 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 17835 | conftest$ac_exeext conftest.$ac_ext | |
| 17836 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 17837 | esac | |
| 17838 | fi | |
| 17839 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_t_open" >&5 | |
| 17840 | printf "%s\n" "$ac_cv_lib_nsl_t_open" >&6; } | |
| 17841 | if test "x$ac_cv_lib_nsl_t_open" = xyes | |
| 17842 | then : | |
| 17843 | bash_cv_have_libnsl=yes | |
| 17844 | else case e in #( | |
| 17845 | e) bash_cv_have_libnsl=no ;; | |
| 17846 | esac | |
| 17847 | fi | |
| 17848 | ;; | |
| 17849 | esac | |
| 17850 | fi | |
| 17851 | ||
| 17852 | if test "X$_bash_needmsg" = Xyes; then | |
| 17853 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_libnsl" >&5 | |
| 17854 | printf "%s\n" "$bash_cv_have_libnsl" >&6; } | |
| 17855 | _bash_needmsg= | |
| 17856 | fi | |
| 17857 | if test $bash_cv_have_libnsl = yes; then | |
| 17858 | LIBS="-lsocket -lnsl $LIBS" | |
| 17859 | else | |
| 17860 | LIBS="-lsocket $LIBS" | |
| 17861 | fi | |
| 17862 | printf "%s\n" "#define HAVE_LIBSOCKET 1" >>confdefs.h | |
| 17863 | ||
| 17864 | printf "%s\n" "#define HAVE_GETPEERNAME 1" >>confdefs.h | |
| 17865 | ||
| 17866 | fi | |
| 17867 | ||
| 17868 | fi | |
| 17869 | if test "$ac_cv_func_gethostbyname" = no; then | |
| 17870 | if test "X$bash_cv_have_gethostbyname" = "X"; then | |
| 17871 | _bash_needmsg=yes | |
| 17872 | else | |
| 17873 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5 | |
| 17874 | printf %s "checking for gethostbyname in socket library... " >&6; } | |
| 17875 | _bash_needmsg= | |
| 17876 | fi | |
| 17877 | if test ${bash_cv_have_gethostbyname+y} | |
| 17878 | then : | |
| 17879 | printf %s "(cached) " >&6 | |
| 17880 | else case e in #( | |
| 17881 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 17882 | /* end confdefs.h. */ | |
| 17883 | ||
| 17884 | #include <netdb.h> | |
| 17885 | ||
| 17886 | int | |
| 17887 | main (void) | |
| 17888 | { | |
| 17889 | ||
| 17890 | struct hostent *hp; | |
| 17891 | hp = gethostbyname("localhost"); | |
| 17892 | ||
| 17893 | ; | |
| 17894 | return 0; | |
| 17895 | } | |
| 17896 | _ACEOF | |
| 17897 | if ac_fn_c_try_link "$LINENO" | |
| 17898 | then : | |
| 17899 | bash_cv_have_gethostbyname=yes | |
| 17900 | else case e in #( | |
| 17901 | e) bash_cv_have_gethostbyname=no | |
| 17902 | ;; | |
| 17903 | esac | |
| 17904 | fi | |
| 17905 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 17906 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 17907 | esac | |
| 17908 | fi | |
| 17909 | ||
| 17910 | if test "X$_bash_needmsg" = Xyes; then | |
| 17911 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in socket library" >&5 | |
| 17912 | printf %s "checking for gethostbyname in socket library... " >&6; } | |
| 17913 | fi | |
| 17914 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_gethostbyname" >&5 | |
| 17915 | printf "%s\n" "$bash_cv_have_gethostbyname" >&6; } | |
| 17916 | if test "$bash_cv_have_gethostbyname" = yes; then | |
| 17917 | printf "%s\n" "#define HAVE_GETHOSTBYNAME 1" >>confdefs.h | |
| 17918 | ||
| 17919 | fi | |
| 17920 | ||
| 17921 | fi | |
| 17922 | ||
| 17923 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking type of array argument to getgroups" >&5 | |
| 17924 | printf %s "checking type of array argument to getgroups... " >&6; } | |
| 17925 | if test ${ac_cv_type_getgroups+y} | |
| 17926 | then : | |
| 17927 | printf %s "(cached) " >&6 | |
| 17928 | else case e in #( | |
| 17929 | e) # If AC_TYPE_UID_T says there isn't any gid_t typedef, then we can skip | |
| 17930 | # everything below. | |
| 17931 | if test $ac_cv_type_gid_t = no | |
| 17932 | then : | |
| 17933 | ac_cv_type_getgroups=int | |
| 17934 | else case e in #( | |
| 17935 | e) # Test programs below rely on strict type checking of extern declarations: | |
| 17936 | # 'extern int getgroups(int, int *); extern int getgroups(int, pid_t *);' | |
| 17937 | # is valid in C89 if and only if pid_t is a typedef for int. Unlike | |
| 17938 | # anything involving either an assignment or a function call, compilers | |
| 17939 | # tend to make this kind of type mismatch a hard error, not just an | |
| 17940 | # "incompatible pointer types" warning. | |
| 17941 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 17942 | /* end confdefs.h. */ | |
| 17943 | $ac_includes_default | |
| 17944 | extern int getgroups(int, gid_t *); | |
| 17945 | int | |
| 17946 | main (void) | |
| 17947 | { | |
| 17948 | return !(getgroups(0, 0) >= 0); | |
| 17949 | ; | |
| 17950 | return 0; | |
| 17951 | } | |
| 17952 | _ACEOF | |
| 17953 | if ac_fn_c_try_compile "$LINENO" | |
| 17954 | then : | |
| 17955 | ac_getgroups_gidarray=yes | |
| 17956 | else case e in #( | |
| 17957 | e) ac_getgroups_gidarray=no ;; | |
| 17958 | esac | |
| 17959 | fi | |
| 17960 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 17961 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 17962 | /* end confdefs.h. */ | |
| 17963 | $ac_includes_default | |
| 17964 | extern int getgroups(int, int *); | |
| 17965 | int | |
| 17966 | main (void) | |
| 17967 | { | |
| 17968 | return !(getgroups(0, 0) >= 0); | |
| 17969 | ; | |
| 17970 | return 0; | |
| 17971 | } | |
| 17972 | _ACEOF | |
| 17973 | if ac_fn_c_try_compile "$LINENO" | |
| 17974 | then : | |
| 17975 | ac_getgroups_intarray=yes | |
| 17976 | else case e in #( | |
| 17977 | e) ac_getgroups_intarray=no ;; | |
| 17978 | esac | |
| 17979 | fi | |
| 17980 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 17981 | ||
| 17982 | case int:$ac_getgroups_intarray,gid:$ac_getgroups_gidarray in #( | |
| 17983 | int:yes,gid:no) : | |
| 17984 | ac_cv_type_getgroups=int ;; #( | |
| 17985 | int:no,gid:yes) : | |
| 17986 | ac_cv_type_getgroups=gid_t ;; #( | |
| 17987 | int:yes,gid:yes) : | |
| 17988 | ||
| 17989 | # Both programs compiled - this means *either* that getgroups | |
| 17990 | # was declared with no prototype, in which case we should use int, | |
| 17991 | # or that it was declared prototyped but gid_t is a typedef for int, | |
| 17992 | # in which case we should use gid_t. Distinguish the two cases | |
| 17993 | # by testing if the compiler catches a blatantly incorrect function | |
| 17994 | # signature for getgroups. | |
| 17995 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 17996 | /* end confdefs.h. */ | |
| 17997 | $ac_includes_default | |
| 17998 | extern int getgroups(int, float); | |
| 17999 | int | |
| 18000 | main (void) | |
| 18001 | { | |
| 18002 | return !(getgroups(0, 0) >= 0); | |
| 18003 | ; | |
| 18004 | return 0; | |
| 18005 | } | |
| 18006 | _ACEOF | |
| 18007 | if ac_fn_c_try_compile "$LINENO" | |
| 18008 | then : | |
| 18009 | ||
| 18010 | # Compiler did not catch incorrect argument list; | |
| 18011 | # getgroups is unprototyped. | |
| 18012 | ac_cv_type_getgroups=int | |
| 18013 | ||
| 18014 | else case e in #( | |
| 18015 | e) | |
| 18016 | # Compiler caught incorrect argument list; | |
| 18017 | # gid_t is a typedef for int. | |
| 18018 | ac_cv_type_getgroups=gid_t | |
| 18019 | ;; | |
| 18020 | esac | |
| 18021 | fi | |
| 18022 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 18023 | ;; #( | |
| 18024 | *) : | |
| 18025 | ||
| 18026 | # Both programs failed to compile - this probably means getgroups | |
| 18027 | # wasn't declared at all. Use 'int', as this is probably a very | |
| 18028 | # old system where the type _would have been_ int. | |
| 18029 | ac_cv_type_getgroups=int | |
| 18030 | ;; | |
| 18031 | esac | |
| 18032 | ;; | |
| 18033 | esac | |
| 18034 | fi | |
| 18035 | ;; | |
| 18036 | esac | |
| 18037 | fi | |
| 18038 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_getgroups" >&5 | |
| 18039 | printf "%s\n" "$ac_cv_type_getgroups" >&6; } | |
| 18040 | printf "%s\n" "#define GETGROUPS_T $ac_cv_type_getgroups" >>confdefs.h | |
| 18041 | ||
| 18042 | ||
| 18043 | ac_fn_c_check_type "$LINENO" "off_t" "ac_cv_type_off_t" "$ac_includes_default" | |
| 18044 | if test "x$ac_cv_type_off_t" = xyes | |
| 18045 | then : | |
| 18046 | ||
| 18047 | else case e in #( | |
| 18048 | e) | |
| 18049 | printf "%s\n" "#define off_t long int" >>confdefs.h | |
| 18050 | ;; | |
| 18051 | esac | |
| 18052 | fi | |
| 18053 | ||
| 18054 | ac_fn_c_check_type "$LINENO" "mode_t" "ac_cv_type_mode_t" "$ac_includes_default" | |
| 18055 | if test "x$ac_cv_type_mode_t" = xyes | |
| 18056 | then : | |
| 18057 | ||
| 18058 | else case e in #( | |
| 18059 | e) | |
| 18060 | printf "%s\n" "#define mode_t int" >>confdefs.h | |
| 18061 | ;; | |
| 18062 | esac | |
| 18063 | fi | |
| 18064 | ||
| 18065 | ac_fn_c_check_type "$LINENO" "uid_t" "ac_cv_type_uid_t" "$ac_includes_default" | |
| 18066 | if test "x$ac_cv_type_uid_t" = xyes | |
| 18067 | then : | |
| 18068 | ||
| 18069 | else case e in #( | |
| 18070 | e) | |
| 18071 | printf "%s\n" "#define uid_t int" >>confdefs.h | |
| 18072 | ;; | |
| 18073 | esac | |
| 18074 | fi | |
| 18075 | ||
| 18076 | ac_fn_c_check_type "$LINENO" "gid_t" "ac_cv_type_gid_t" "$ac_includes_default" | |
| 18077 | if test "x$ac_cv_type_gid_t" = xyes | |
| 18078 | then : | |
| 18079 | ||
| 18080 | else case e in #( | |
| 18081 | e) | |
| 18082 | printf "%s\n" "#define gid_t int" >>confdefs.h | |
| 18083 | ;; | |
| 18084 | esac | |
| 18085 | fi | |
| 18086 | ||
| 18087 | ||
| 18088 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default | |
| 18089 | " | |
| 18090 | if test "x$ac_cv_type_pid_t" = xyes | |
| 18091 | then : | |
| 18092 | ||
| 18093 | else case e in #( | |
| 18094 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 18095 | /* end confdefs.h. */ | |
| 18096 | ||
| 18097 | #if defined _WIN64 && !defined __CYGWIN__ | |
| 18098 | LLP64 | |
| 18099 | #endif | |
| 18100 | ||
| 18101 | int | |
| 18102 | main (void) | |
| 18103 | { | |
| 18104 | ||
| 18105 | ; | |
| 18106 | return 0; | |
| 18107 | } | |
| 18108 | ||
| 18109 | _ACEOF | |
| 18110 | if ac_fn_c_try_compile "$LINENO" | |
| 18111 | then : | |
| 18112 | ac_pid_type='int' | |
| 18113 | else case e in #( | |
| 18114 | e) ac_pid_type='__int64' ;; | |
| 18115 | esac | |
| 18116 | fi | |
| 18117 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 18118 | ||
| 18119 | printf "%s\n" "#define pid_t $ac_pid_type" >>confdefs.h | |
| 18120 | ||
| 18121 | ;; | |
| 18122 | esac | |
| 18123 | fi | |
| 18124 | ||
| 18125 | ||
| 18126 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" | |
| 18127 | if test "x$ac_cv_type_size_t" = xyes | |
| 18128 | then : | |
| 18129 | ||
| 18130 | else case e in #( | |
| 18131 | e) | |
| 18132 | printf "%s\n" "#define size_t unsigned int" >>confdefs.h | |
| 18133 | ;; | |
| 18134 | esac | |
| 18135 | fi | |
| 18136 | ||
| 18137 | ||
| 18138 | ac_fn_c_check_type "$LINENO" "intptr_t" "ac_cv_type_intptr_t" "$ac_includes_default" | |
| 18139 | if test "x$ac_cv_type_intptr_t" = xyes | |
| 18140 | then : | |
| 18141 | ||
| 18142 | printf "%s\n" "#define HAVE_INTPTR_T 1" >>confdefs.h | |
| 18143 | ||
| 18144 | else case e in #( | |
| 18145 | e) for ac_type in 'int' 'long int' 'long long int'; do | |
| 18146 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 18147 | /* end confdefs.h. */ | |
| 18148 | $ac_includes_default | |
| 18149 | int | |
| 18150 | main (void) | |
| 18151 | { | |
| 18152 | static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; | |
| 18153 | test_array [0] = 0; | |
| 18154 | return test_array [0]; | |
| 18155 | ||
| 18156 | ; | |
| 18157 | return 0; | |
| 18158 | } | |
| 18159 | _ACEOF | |
| 18160 | if ac_fn_c_try_compile "$LINENO" | |
| 18161 | then : | |
| 18162 | ||
| 18163 | printf "%s\n" "#define intptr_t $ac_type" >>confdefs.h | |
| 18164 | ||
| 18165 | ac_type= | |
| 18166 | fi | |
| 18167 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 18168 | test -z "$ac_type" && break | |
| 18169 | done ;; | |
| 18170 | esac | |
| 18171 | fi | |
| 18172 | ||
| 18173 | ||
| 18174 | ||
| 18175 | ac_fn_c_check_type "$LINENO" "uintptr_t" "ac_cv_type_uintptr_t" "$ac_includes_default" | |
| 18176 | if test "x$ac_cv_type_uintptr_t" = xyes | |
| 18177 | then : | |
| 18178 | ||
| 18179 | printf "%s\n" "#define HAVE_UINTPTR_T 1" >>confdefs.h | |
| 18180 | ||
| 18181 | else case e in #( | |
| 18182 | e) for ac_type in 'unsigned int' 'unsigned long int' \ | |
| 18183 | 'unsigned long long int'; do | |
| 18184 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 18185 | /* end confdefs.h. */ | |
| 18186 | $ac_includes_default | |
| 18187 | int | |
| 18188 | main (void) | |
| 18189 | { | |
| 18190 | static int test_array [1 - 2 * !(sizeof (void *) <= sizeof ($ac_type))]; | |
| 18191 | test_array [0] = 0; | |
| 18192 | return test_array [0]; | |
| 18193 | ||
| 18194 | ; | |
| 18195 | return 0; | |
| 18196 | } | |
| 18197 | _ACEOF | |
| 18198 | if ac_fn_c_try_compile "$LINENO" | |
| 18199 | then : | |
| 18200 | ||
| 18201 | printf "%s\n" "#define uintptr_t $ac_type" >>confdefs.h | |
| 18202 | ||
| 18203 | ac_type= | |
| 18204 | fi | |
| 18205 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 18206 | test -z "$ac_type" && break | |
| 18207 | done ;; | |
| 18208 | esac | |
| 18209 | fi | |
| 18210 | ||
| 18211 | ||
| 18212 | ||
| 18213 | ac_fn_c_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" | |
| 18214 | if test "x$ac_cv_type_ssize_t" = xyes | |
| 18215 | then : | |
| 18216 | ||
| 18217 | else case e in #( | |
| 18218 | e) | |
| 18219 | printf "%s\n" "#define ssize_t int" >>confdefs.h | |
| 18220 | ;; | |
| 18221 | esac | |
| 18222 | fi | |
| 18223 | ||
| 18224 | ac_fn_c_check_type "$LINENO" "time_t" "ac_cv_type_time_t" "$ac_includes_default" | |
| 18225 | if test "x$ac_cv_type_time_t" = xyes | |
| 18226 | then : | |
| 18227 | ||
| 18228 | else case e in #( | |
| 18229 | e) | |
| 18230 | printf "%s\n" "#define time_t long" >>confdefs.h | |
| 18231 | ;; | |
| 18232 | esac | |
| 18233 | fi | |
| 18234 | ||
| 18235 | ||
| 18236 | ||
| 18237 | ||
| 18238 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for long long int" >&5 | |
| 18239 | printf %s "checking for long long int... " >&6; } | |
| 18240 | if test ${ac_cv_type_long_long_int+y} | |
| 18241 | then : | |
| 18242 | printf %s "(cached) " >&6 | |
| 18243 | else case e in #( | |
| 18244 | e) ac_cv_type_long_long_int=yes | |
| 18245 | case $ac_prog_cc_stdc in | |
| 18246 | no | c89) ;; | |
| 18247 | *) | |
| 18248 | ac_cv_type_long_long_int=$ac_cv_type_unsigned_long_long_int | |
| 18249 | if test $ac_cv_type_long_long_int = yes; then | |
| 18250 | if test "$cross_compiling" = yes | |
| 18251 | then : | |
| 18252 | : | |
| 18253 | else case e in #( | |
| 18254 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 18255 | /* end confdefs.h. */ | |
| 18256 | #include <limits.h> | |
| 18257 | #ifndef LLONG_MAX | |
| 18258 | # define HALF \\ | |
| 18259 | (1LL << (sizeof (long long int) * CHAR_BIT - 2)) | |
| 18260 | # define LLONG_MAX (HALF - 1 + HALF) | |
| 18261 | #endif | |
| 18262 | int | |
| 18263 | main (void) | |
| 18264 | { | |
| 18265 | long long int n = 1; | |
| 18266 | int i; | |
| 18267 | for (i = 0; ; i++) | |
| 18268 | { | |
| 18269 | long long int m = n << i; | |
| 18270 | if (m >> i != n) | |
| 18271 | return 1; | |
| 18272 | if (LLONG_MAX / 2 < m) | |
| 18273 | break; | |
| 18274 | } | |
| 18275 | return 0; | |
| 18276 | ; | |
| 18277 | return 0; | |
| 18278 | } | |
| 18279 | _ACEOF | |
| 18280 | if ac_fn_c_try_run "$LINENO" | |
| 18281 | then : | |
| 18282 | ||
| 18283 | else case e in #( | |
| 18284 | e) ac_cv_type_long_long_int=no ;; | |
| 18285 | esac | |
| 18286 | fi | |
| 18287 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 18288 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 18289 | esac | |
| 18290 | fi | |
| 18291 | ||
| 18292 | fi;; | |
| 18293 | esac ;; | |
| 18294 | esac | |
| 18295 | fi | |
| 18296 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_long_long_int" >&5 | |
| 18297 | printf "%s\n" "$ac_cv_type_long_long_int" >&6; } | |
| 18298 | if test $ac_cv_type_long_long_int = yes; then | |
| 18299 | ||
| 18300 | printf "%s\n" "#define HAVE_LONG_LONG_INT 1" >>confdefs.h | |
| 18301 | ||
| 18302 | fi | |
| 18303 | ||
| 18304 | ||
| 18305 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unsigned long long int" >&5 | |
| 18306 | printf %s "checking for unsigned long long int... " >&6; } | |
| 18307 | if test ${ac_cv_type_unsigned_long_long_int+y} | |
| 18308 | then : | |
| 18309 | printf %s "(cached) " >&6 | |
| 18310 | else case e in #( | |
| 18311 | e) ac_cv_type_unsigned_long_long_int=yes | |
| 18312 | case $ac_prog_cc_stdc in | |
| 18313 | no | c89) ;; | |
| 18314 | *) | |
| 18315 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 18316 | /* end confdefs.h. */ | |
| 18317 | ||
| 18318 | /* For now, do not test the preprocessor; as of 2007 there are too many | |
| 18319 | implementations with broken preprocessors. Perhaps this can | |
| 18320 | be revisited in 2012. In the meantime, code should not expect | |
| 18321 | #if to work with literals wider than 32 bits. */ | |
| 18322 | /* Test literals. */ | |
| 18323 | long long int ll = 9223372036854775807ll; | |
| 18324 | long long int nll = -9223372036854775807LL; | |
| 18325 | unsigned long long int ull = 18446744073709551615ULL; | |
| 18326 | /* Test constant expressions. */ | |
| 18327 | typedef int a[((-9223372036854775807LL < 0 && 0 < 9223372036854775807ll) | |
| 18328 | ? 1 : -1)]; | |
| 18329 | typedef int b[(18446744073709551615ULL <= (unsigned long long int) -1 | |
| 18330 | ? 1 : -1)]; | |
| 18331 | int i = 63; | |
| 18332 | int | |
| 18333 | main (void) | |
| 18334 | { | |
| 18335 | /* Test availability of runtime routines for shift and division. */ | |
| 18336 | long long int llmax = 9223372036854775807ll; | |
| 18337 | unsigned long long int ullmax = 18446744073709551615ull; | |
| 18338 | return ((ll << 63) | (ll >> 63) | (ll < i) | (ll > i) | |
| 18339 | | (llmax / ll) | (llmax % ll) | |
| 18340 | | (ull << 63) | (ull >> 63) | (ull << i) | (ull >> i) | |
| 18341 | | (ullmax / ull) | (ullmax % ull)); | |
| 18342 | ; | |
| 18343 | return 0; | |
| 18344 | } | |
| 18345 | ||
| 18346 | _ACEOF | |
| 18347 | if ac_fn_c_try_link "$LINENO" | |
| 18348 | then : | |
| 18349 | ||
| 18350 | else case e in #( | |
| 18351 | e) ac_cv_type_unsigned_long_long_int=no ;; | |
| 18352 | esac | |
| 18353 | fi | |
| 18354 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 18355 | conftest$ac_exeext conftest.$ac_ext;; | |
| 18356 | esac ;; | |
| 18357 | esac | |
| 18358 | fi | |
| 18359 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_unsigned_long_long_int" >&5 | |
| 18360 | printf "%s\n" "$ac_cv_type_unsigned_long_long_int" >&6; } | |
| 18361 | if test $ac_cv_type_unsigned_long_long_int = yes; then | |
| 18362 | ||
| 18363 | printf "%s\n" "#define HAVE_UNSIGNED_LONG_LONG_INT 1" >>confdefs.h | |
| 18364 | ||
| 18365 | fi | |
| 18366 | ||
| 18367 | ||
| 18368 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t in signal.h" >&5 | |
| 18369 | printf %s "checking for sig_atomic_t in signal.h... " >&6; } | |
| 18370 | if test ${ac_cv_have_sig_atomic_t+y} | |
| 18371 | then : | |
| 18372 | printf %s "(cached) " >&6 | |
| 18373 | else case e in #( | |
| 18374 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 18375 | /* end confdefs.h. */ | |
| 18376 | #include <signal.h> | |
| 18377 | int | |
| 18378 | main (void) | |
| 18379 | { | |
| 18380 | sig_atomic_t x; | |
| 18381 | ; | |
| 18382 | return 0; | |
| 18383 | } | |
| 18384 | _ACEOF | |
| 18385 | if ac_fn_c_try_link "$LINENO" | |
| 18386 | then : | |
| 18387 | ac_cv_have_sig_atomic_t=yes | |
| 18388 | else case e in #( | |
| 18389 | e) ac_cv_have_sig_atomic_t=no ;; | |
| 18390 | esac | |
| 18391 | fi | |
| 18392 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 18393 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 18394 | esac | |
| 18395 | fi | |
| 18396 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_sig_atomic_t" >&5 | |
| 18397 | printf "%s\n" "$ac_cv_have_sig_atomic_t" >&6; } | |
| 18398 | if test "$ac_cv_have_sig_atomic_t" = "no" | |
| 18399 | then | |
| 18400 | ||
| 18401 | ||
| 18402 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sig_atomic_t" >&5 | |
| 18403 | printf %s "checking for sig_atomic_t... " >&6; } | |
| 18404 | if test ${bash_cv_type_sig_atomic_t+y} | |
| 18405 | then : | |
| 18406 | printf %s "(cached) " >&6 | |
| 18407 | else case e in #( | |
| 18408 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 18409 | /* end confdefs.h. */ | |
| 18410 | #include <sys/types.h> | |
| 18411 | #if HAVE_STDLIB_H | |
| 18412 | #include <stdlib.h> | |
| 18413 | #endif | |
| 18414 | #if HAVE_STDDEF_H | |
| 18415 | #include <stddef.h> | |
| 18416 | #endif | |
| 18417 | #if HAVE_INTTYPES_H | |
| 18418 | #include <inttypes.h> | |
| 18419 | #endif | |
| 18420 | #if HAVE_STDINT_H | |
| 18421 | #include <stdint.h> | |
| 18422 | #endif | |
| 18423 | #include <signal.h> | |
| 18424 | ||
| 18425 | _ACEOF | |
| 18426 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
| 18427 | $EGREP_TRADITIONAL "sig_atomic_t" >/dev/null 2>&1 | |
| 18428 | then : | |
| 18429 | bash_cv_type_sig_atomic_t=yes | |
| 18430 | else case e in #( | |
| 18431 | e) bash_cv_type_sig_atomic_t=no ;; | |
| 18432 | esac | |
| 18433 | fi | |
| 18434 | rm -rf conftest* | |
| 18435 | ;; | |
| 18436 | esac | |
| 18437 | fi | |
| 18438 | ||
| 18439 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sig_atomic_t" >&5 | |
| 18440 | printf "%s\n" "$bash_cv_type_sig_atomic_t" >&6; } | |
| 18441 | ||
| 18442 | if test $bash_cv_type_sig_atomic_t = no; then | |
| 18443 | printf "%s\n" "#define sig_atomic_t int" >>confdefs.h | |
| 18444 | ||
| 18445 | fi | |
| 18446 | ||
| 18447 | fi | |
| 18448 | ||
| 18449 | ||
| 18450 | # The cast to long int works around a bug in the HP C Compiler | |
| 18451 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
| 18452 | # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. | |
| 18453 | # This bug is HP SR number 8606223364. | |
| 18454 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of char" >&5 | |
| 18455 | printf %s "checking size of char... " >&6; } | |
| 18456 | if test ${ac_cv_sizeof_char+y} | |
| 18457 | then : | |
| 18458 | printf %s "(cached) " >&6 | |
| 18459 | else case e in #( | |
| 18460 | e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char))" "ac_cv_sizeof_char" "$ac_includes_default" | |
| 18461 | then : | |
| 18462 | ||
| 18463 | else case e in #( | |
| 18464 | e) if test "$ac_cv_type_char" = yes; then | |
| 18465 | { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 18466 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 18467 | as_fn_error 77 "cannot compute sizeof (char) | |
| 18468 | See 'config.log' for more details" "$LINENO" 5; } | |
| 18469 | else | |
| 18470 | ac_cv_sizeof_char=0 | |
| 18471 | fi ;; | |
| 18472 | esac | |
| 18473 | fi | |
| 18474 | ;; | |
| 18475 | esac | |
| 18476 | fi | |
| 18477 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char" >&5 | |
| 18478 | printf "%s\n" "$ac_cv_sizeof_char" >&6; } | |
| 18479 | ||
| 18480 | ||
| 18481 | ||
| 18482 | printf "%s\n" "#define SIZEOF_CHAR $ac_cv_sizeof_char" >>confdefs.h | |
| 18483 | ||
| 18484 | ||
| 18485 | # The cast to long int works around a bug in the HP C Compiler | |
| 18486 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
| 18487 | # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. | |
| 18488 | # This bug is HP SR number 8606223364. | |
| 18489 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of short" >&5 | |
| 18490 | printf %s "checking size of short... " >&6; } | |
| 18491 | if test ${ac_cv_sizeof_short+y} | |
| 18492 | then : | |
| 18493 | printf %s "(cached) " >&6 | |
| 18494 | else case e in #( | |
| 18495 | e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (short))" "ac_cv_sizeof_short" "$ac_includes_default" | |
| 18496 | then : | |
| 18497 | ||
| 18498 | else case e in #( | |
| 18499 | e) if test "$ac_cv_type_short" = yes; then | |
| 18500 | { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 18501 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 18502 | as_fn_error 77 "cannot compute sizeof (short) | |
| 18503 | See 'config.log' for more details" "$LINENO" 5; } | |
| 18504 | else | |
| 18505 | ac_cv_sizeof_short=0 | |
| 18506 | fi ;; | |
| 18507 | esac | |
| 18508 | fi | |
| 18509 | ;; | |
| 18510 | esac | |
| 18511 | fi | |
| 18512 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_short" >&5 | |
| 18513 | printf "%s\n" "$ac_cv_sizeof_short" >&6; } | |
| 18514 | ||
| 18515 | ||
| 18516 | ||
| 18517 | printf "%s\n" "#define SIZEOF_SHORT $ac_cv_sizeof_short" >>confdefs.h | |
| 18518 | ||
| 18519 | ||
| 18520 | # The cast to long int works around a bug in the HP C Compiler | |
| 18521 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
| 18522 | # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. | |
| 18523 | # This bug is HP SR number 8606223364. | |
| 18524 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of int" >&5 | |
| 18525 | printf %s "checking size of int... " >&6; } | |
| 18526 | if test ${ac_cv_sizeof_int+y} | |
| 18527 | then : | |
| 18528 | printf %s "(cached) " >&6 | |
| 18529 | else case e in #( | |
| 18530 | e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (int))" "ac_cv_sizeof_int" "$ac_includes_default" | |
| 18531 | then : | |
| 18532 | ||
| 18533 | else case e in #( | |
| 18534 | e) if test "$ac_cv_type_int" = yes; then | |
| 18535 | { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 18536 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 18537 | as_fn_error 77 "cannot compute sizeof (int) | |
| 18538 | See 'config.log' for more details" "$LINENO" 5; } | |
| 18539 | else | |
| 18540 | ac_cv_sizeof_int=0 | |
| 18541 | fi ;; | |
| 18542 | esac | |
| 18543 | fi | |
| 18544 | ;; | |
| 18545 | esac | |
| 18546 | fi | |
| 18547 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int" >&5 | |
| 18548 | printf "%s\n" "$ac_cv_sizeof_int" >&6; } | |
| 18549 | ||
| 18550 | ||
| 18551 | ||
| 18552 | printf "%s\n" "#define SIZEOF_INT $ac_cv_sizeof_int" >>confdefs.h | |
| 18553 | ||
| 18554 | ||
| 18555 | # The cast to long int works around a bug in the HP C Compiler | |
| 18556 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
| 18557 | # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. | |
| 18558 | # This bug is HP SR number 8606223364. | |
| 18559 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 | |
| 18560 | printf %s "checking size of long... " >&6; } | |
| 18561 | if test ${ac_cv_sizeof_long+y} | |
| 18562 | then : | |
| 18563 | printf %s "(cached) " >&6 | |
| 18564 | else case e in #( | |
| 18565 | e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default" | |
| 18566 | then : | |
| 18567 | ||
| 18568 | else case e in #( | |
| 18569 | e) if test "$ac_cv_type_long" = yes; then | |
| 18570 | { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 18571 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 18572 | as_fn_error 77 "cannot compute sizeof (long) | |
| 18573 | See 'config.log' for more details" "$LINENO" 5; } | |
| 18574 | else | |
| 18575 | ac_cv_sizeof_long=0 | |
| 18576 | fi ;; | |
| 18577 | esac | |
| 18578 | fi | |
| 18579 | ;; | |
| 18580 | esac | |
| 18581 | fi | |
| 18582 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 | |
| 18583 | printf "%s\n" "$ac_cv_sizeof_long" >&6; } | |
| 18584 | ||
| 18585 | ||
| 18586 | ||
| 18587 | printf "%s\n" "#define SIZEOF_LONG $ac_cv_sizeof_long" >>confdefs.h | |
| 18588 | ||
| 18589 | ||
| 18590 | # The cast to long int works around a bug in the HP C Compiler | |
| 18591 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
| 18592 | # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. | |
| 18593 | # This bug is HP SR number 8606223364. | |
| 18594 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of char *" >&5 | |
| 18595 | printf %s "checking size of char *... " >&6; } | |
| 18596 | if test ${ac_cv_sizeof_char_p+y} | |
| 18597 | then : | |
| 18598 | printf %s "(cached) " >&6 | |
| 18599 | else case e in #( | |
| 18600 | e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (char *))" "ac_cv_sizeof_char_p" "$ac_includes_default" | |
| 18601 | then : | |
| 18602 | ||
| 18603 | else case e in #( | |
| 18604 | e) if test "$ac_cv_type_char_p" = yes; then | |
| 18605 | { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 18606 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 18607 | as_fn_error 77 "cannot compute sizeof (char *) | |
| 18608 | See 'config.log' for more details" "$LINENO" 5; } | |
| 18609 | else | |
| 18610 | ac_cv_sizeof_char_p=0 | |
| 18611 | fi ;; | |
| 18612 | esac | |
| 18613 | fi | |
| 18614 | ;; | |
| 18615 | esac | |
| 18616 | fi | |
| 18617 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_char_p" >&5 | |
| 18618 | printf "%s\n" "$ac_cv_sizeof_char_p" >&6; } | |
| 18619 | ||
| 18620 | ||
| 18621 | ||
| 18622 | printf "%s\n" "#define SIZEOF_CHAR_P $ac_cv_sizeof_char_p" >>confdefs.h | |
| 18623 | ||
| 18624 | ||
| 18625 | # The cast to long int works around a bug in the HP C Compiler | |
| 18626 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
| 18627 | # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. | |
| 18628 | # This bug is HP SR number 8606223364. | |
| 18629 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of size_t" >&5 | |
| 18630 | printf %s "checking size of size_t... " >&6; } | |
| 18631 | if test ${ac_cv_sizeof_size_t+y} | |
| 18632 | then : | |
| 18633 | printf %s "(cached) " >&6 | |
| 18634 | else case e in #( | |
| 18635 | e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (size_t))" "ac_cv_sizeof_size_t" "$ac_includes_default" | |
| 18636 | then : | |
| 18637 | ||
| 18638 | else case e in #( | |
| 18639 | e) if test "$ac_cv_type_size_t" = yes; then | |
| 18640 | { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 18641 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 18642 | as_fn_error 77 "cannot compute sizeof (size_t) | |
| 18643 | See 'config.log' for more details" "$LINENO" 5; } | |
| 18644 | else | |
| 18645 | ac_cv_sizeof_size_t=0 | |
| 18646 | fi ;; | |
| 18647 | esac | |
| 18648 | fi | |
| 18649 | ;; | |
| 18650 | esac | |
| 18651 | fi | |
| 18652 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_size_t" >&5 | |
| 18653 | printf "%s\n" "$ac_cv_sizeof_size_t" >&6; } | |
| 18654 | ||
| 18655 | ||
| 18656 | ||
| 18657 | printf "%s\n" "#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t" >>confdefs.h | |
| 18658 | ||
| 18659 | ||
| 18660 | # The cast to long int works around a bug in the HP C Compiler | |
| 18661 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
| 18662 | # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. | |
| 18663 | # This bug is HP SR number 8606223364. | |
| 18664 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of double" >&5 | |
| 18665 | printf %s "checking size of double... " >&6; } | |
| 18666 | if test ${ac_cv_sizeof_double+y} | |
| 18667 | then : | |
| 18668 | printf %s "(cached) " >&6 | |
| 18669 | else case e in #( | |
| 18670 | e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (double))" "ac_cv_sizeof_double" "$ac_includes_default" | |
| 18671 | then : | |
| 18672 | ||
| 18673 | else case e in #( | |
| 18674 | e) if test "$ac_cv_type_double" = yes; then | |
| 18675 | { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 18676 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 18677 | as_fn_error 77 "cannot compute sizeof (double) | |
| 18678 | See 'config.log' for more details" "$LINENO" 5; } | |
| 18679 | else | |
| 18680 | ac_cv_sizeof_double=0 | |
| 18681 | fi ;; | |
| 18682 | esac | |
| 18683 | fi | |
| 18684 | ;; | |
| 18685 | esac | |
| 18686 | fi | |
| 18687 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_double" >&5 | |
| 18688 | printf "%s\n" "$ac_cv_sizeof_double" >&6; } | |
| 18689 | ||
| 18690 | ||
| 18691 | ||
| 18692 | printf "%s\n" "#define SIZEOF_DOUBLE $ac_cv_sizeof_double" >>confdefs.h | |
| 18693 | ||
| 18694 | ||
| 18695 | # The cast to long int works around a bug in the HP C Compiler | |
| 18696 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
| 18697 | # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. | |
| 18698 | # This bug is HP SR number 8606223364. | |
| 18699 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 | |
| 18700 | printf %s "checking size of long long... " >&6; } | |
| 18701 | if test ${ac_cv_sizeof_long_long+y} | |
| 18702 | then : | |
| 18703 | printf %s "(cached) " >&6 | |
| 18704 | else case e in #( | |
| 18705 | e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default" | |
| 18706 | then : | |
| 18707 | ||
| 18708 | else case e in #( | |
| 18709 | e) if test "$ac_cv_type_long_long" = yes; then | |
| 18710 | { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 18711 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 18712 | as_fn_error 77 "cannot compute sizeof (long long) | |
| 18713 | See 'config.log' for more details" "$LINENO" 5; } | |
| 18714 | else | |
| 18715 | ac_cv_sizeof_long_long=0 | |
| 18716 | fi ;; | |
| 18717 | esac | |
| 18718 | fi | |
| 18719 | ;; | |
| 18720 | esac | |
| 18721 | fi | |
| 18722 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 | |
| 18723 | printf "%s\n" "$ac_cv_sizeof_long_long" >&6; } | |
| 18724 | ||
| 18725 | ||
| 18726 | ||
| 18727 | printf "%s\n" "#define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long" >>confdefs.h | |
| 18728 | ||
| 18729 | ||
| 18730 | ||
| 18731 | ||
| 18732 | if test "$ac_cv_sizeof_short" = 2; then | |
| 18733 | ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default" | |
| 18734 | if test "x$ac_cv_type_bits16_t" = xyes | |
| 18735 | then : | |
| 18736 | ||
| 18737 | else case e in #( | |
| 18738 | e) | |
| 18739 | printf "%s\n" "#define bits16_t short" >>confdefs.h | |
| 18740 | ;; | |
| 18741 | esac | |
| 18742 | fi | |
| 18743 | ||
| 18744 | elif test "$ac_cv_sizeof_char" = 2; then | |
| 18745 | ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default" | |
| 18746 | if test "x$ac_cv_type_bits16_t" = xyes | |
| 18747 | then : | |
| 18748 | ||
| 18749 | else case e in #( | |
| 18750 | e) | |
| 18751 | printf "%s\n" "#define bits16_t char" >>confdefs.h | |
| 18752 | ;; | |
| 18753 | esac | |
| 18754 | fi | |
| 18755 | ||
| 18756 | else | |
| 18757 | ac_fn_c_check_type "$LINENO" "bits16_t" "ac_cv_type_bits16_t" "$ac_includes_default" | |
| 18758 | if test "x$ac_cv_type_bits16_t" = xyes | |
| 18759 | then : | |
| 18760 | ||
| 18761 | else case e in #( | |
| 18762 | e) | |
| 18763 | printf "%s\n" "#define bits16_t short" >>confdefs.h | |
| 18764 | ;; | |
| 18765 | esac | |
| 18766 | fi | |
| 18767 | ||
| 18768 | fi | |
| 18769 | ||
| 18770 | ||
| 18771 | if test "$ac_cv_sizeof_short" = 2; then | |
| 18772 | ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default" | |
| 18773 | if test "x$ac_cv_type_u_bits16_t" = xyes | |
| 18774 | then : | |
| 18775 | ||
| 18776 | else case e in #( | |
| 18777 | e) | |
| 18778 | printf "%s\n" "#define u_bits16_t unsigned short" >>confdefs.h | |
| 18779 | ;; | |
| 18780 | esac | |
| 18781 | fi | |
| 18782 | ||
| 18783 | elif test "$ac_cv_sizeof_char" = 2; then | |
| 18784 | ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default" | |
| 18785 | if test "x$ac_cv_type_u_bits16_t" = xyes | |
| 18786 | then : | |
| 18787 | ||
| 18788 | else case e in #( | |
| 18789 | e) | |
| 18790 | printf "%s\n" "#define u_bits16_t unsigned char" >>confdefs.h | |
| 18791 | ;; | |
| 18792 | esac | |
| 18793 | fi | |
| 18794 | ||
| 18795 | else | |
| 18796 | ac_fn_c_check_type "$LINENO" "u_bits16_t" "ac_cv_type_u_bits16_t" "$ac_includes_default" | |
| 18797 | if test "x$ac_cv_type_u_bits16_t" = xyes | |
| 18798 | then : | |
| 18799 | ||
| 18800 | else case e in #( | |
| 18801 | e) | |
| 18802 | printf "%s\n" "#define u_bits16_t unsigned short" >>confdefs.h | |
| 18803 | ;; | |
| 18804 | esac | |
| 18805 | fi | |
| 18806 | ||
| 18807 | fi | |
| 18808 | ||
| 18809 | ||
| 18810 | if test "$ac_cv_sizeof_int" = 4; then | |
| 18811 | ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default" | |
| 18812 | if test "x$ac_cv_type_bits32_t" = xyes | |
| 18813 | then : | |
| 18814 | ||
| 18815 | else case e in #( | |
| 18816 | e) | |
| 18817 | printf "%s\n" "#define bits32_t int" >>confdefs.h | |
| 18818 | ;; | |
| 18819 | esac | |
| 18820 | fi | |
| 18821 | ||
| 18822 | elif test "$ac_cv_sizeof_long" = 4; then | |
| 18823 | ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default" | |
| 18824 | if test "x$ac_cv_type_bits32_t" = xyes | |
| 18825 | then : | |
| 18826 | ||
| 18827 | else case e in #( | |
| 18828 | e) | |
| 18829 | printf "%s\n" "#define bits32_t long" >>confdefs.h | |
| 18830 | ;; | |
| 18831 | esac | |
| 18832 | fi | |
| 18833 | ||
| 18834 | else | |
| 18835 | ac_fn_c_check_type "$LINENO" "bits32_t" "ac_cv_type_bits32_t" "$ac_includes_default" | |
| 18836 | if test "x$ac_cv_type_bits32_t" = xyes | |
| 18837 | then : | |
| 18838 | ||
| 18839 | else case e in #( | |
| 18840 | e) | |
| 18841 | printf "%s\n" "#define bits32_t int" >>confdefs.h | |
| 18842 | ;; | |
| 18843 | esac | |
| 18844 | fi | |
| 18845 | ||
| 18846 | fi | |
| 18847 | ||
| 18848 | ||
| 18849 | if test "$ac_cv_sizeof_int" = 4; then | |
| 18850 | ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default" | |
| 18851 | if test "x$ac_cv_type_u_bits32_t" = xyes | |
| 18852 | then : | |
| 18853 | ||
| 18854 | else case e in #( | |
| 18855 | e) | |
| 18856 | printf "%s\n" "#define u_bits32_t unsigned int" >>confdefs.h | |
| 18857 | ;; | |
| 18858 | esac | |
| 18859 | fi | |
| 18860 | ||
| 18861 | elif test "$ac_cv_sizeof_long" = 4; then | |
| 18862 | ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default" | |
| 18863 | if test "x$ac_cv_type_u_bits32_t" = xyes | |
| 18864 | then : | |
| 18865 | ||
| 18866 | else case e in #( | |
| 18867 | e) | |
| 18868 | printf "%s\n" "#define u_bits32_t unsigned long" >>confdefs.h | |
| 18869 | ;; | |
| 18870 | esac | |
| 18871 | fi | |
| 18872 | ||
| 18873 | else | |
| 18874 | ac_fn_c_check_type "$LINENO" "u_bits32_t" "ac_cv_type_u_bits32_t" "$ac_includes_default" | |
| 18875 | if test "x$ac_cv_type_u_bits32_t" = xyes | |
| 18876 | then : | |
| 18877 | ||
| 18878 | else case e in #( | |
| 18879 | e) | |
| 18880 | printf "%s\n" "#define u_bits32_t unsigned int" >>confdefs.h | |
| 18881 | ;; | |
| 18882 | esac | |
| 18883 | fi | |
| 18884 | ||
| 18885 | fi | |
| 18886 | ||
| 18887 | ||
| 18888 | if test "$ac_cv_sizeof_char_p" = 8; then | |
| 18889 | ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" | |
| 18890 | if test "x$ac_cv_type_bits64_t" = xyes | |
| 18891 | then : | |
| 18892 | ||
| 18893 | else case e in #( | |
| 18894 | e) | |
| 18895 | printf "%s\n" "#define bits64_t char *" >>confdefs.h | |
| 18896 | ;; | |
| 18897 | esac | |
| 18898 | fi | |
| 18899 | ||
| 18900 | elif test "$ac_cv_sizeof_double" = 8; then | |
| 18901 | ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" | |
| 18902 | if test "x$ac_cv_type_bits64_t" = xyes | |
| 18903 | then : | |
| 18904 | ||
| 18905 | else case e in #( | |
| 18906 | e) | |
| 18907 | printf "%s\n" "#define bits64_t double" >>confdefs.h | |
| 18908 | ;; | |
| 18909 | esac | |
| 18910 | fi | |
| 18911 | ||
| 18912 | elif test -n "$ac_cv_type_long_long" && test "$ac_cv_sizeof_long_long" = 8; then | |
| 18913 | ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" | |
| 18914 | if test "x$ac_cv_type_bits64_t" = xyes | |
| 18915 | then : | |
| 18916 | ||
| 18917 | else case e in #( | |
| 18918 | e) | |
| 18919 | printf "%s\n" "#define bits64_t long long" >>confdefs.h | |
| 18920 | ;; | |
| 18921 | esac | |
| 18922 | fi | |
| 18923 | ||
| 18924 | elif test "$ac_cv_sizeof_long" = 8; then | |
| 18925 | ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" | |
| 18926 | if test "x$ac_cv_type_bits64_t" = xyes | |
| 18927 | then : | |
| 18928 | ||
| 18929 | else case e in #( | |
| 18930 | e) | |
| 18931 | printf "%s\n" "#define bits64_t long" >>confdefs.h | |
| 18932 | ;; | |
| 18933 | esac | |
| 18934 | fi | |
| 18935 | ||
| 18936 | else | |
| 18937 | ac_fn_c_check_type "$LINENO" "bits64_t" "ac_cv_type_bits64_t" "$ac_includes_default" | |
| 18938 | if test "x$ac_cv_type_bits64_t" = xyes | |
| 18939 | then : | |
| 18940 | ||
| 18941 | else case e in #( | |
| 18942 | e) | |
| 18943 | printf "%s\n" "#define bits64_t double" >>confdefs.h | |
| 18944 | ;; | |
| 18945 | esac | |
| 18946 | fi | |
| 18947 | ||
| 18948 | fi | |
| 18949 | ||
| 18950 | ||
| 18951 | ||
| 18952 | if test "$ac_cv_sizeof_int" = "$ac_cv_sizeof_char_p"; then | |
| 18953 | ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" | |
| 18954 | if test "x$ac_cv_type_ptrdiff_t" = xyes | |
| 18955 | then : | |
| 18956 | ||
| 18957 | else case e in #( | |
| 18958 | e) | |
| 18959 | printf "%s\n" "#define ptrdiff_t int" >>confdefs.h | |
| 18960 | ;; | |
| 18961 | esac | |
| 18962 | fi | |
| 18963 | ||
| 18964 | elif test "$ac_cv_sizeof_long" = "$ac_cv_sizeof_char_p"; then | |
| 18965 | ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" | |
| 18966 | if test "x$ac_cv_type_ptrdiff_t" = xyes | |
| 18967 | then : | |
| 18968 | ||
| 18969 | else case e in #( | |
| 18970 | e) | |
| 18971 | printf "%s\n" "#define ptrdiff_t long" >>confdefs.h | |
| 18972 | ;; | |
| 18973 | esac | |
| 18974 | fi | |
| 18975 | ||
| 18976 | elif test "$ac_cv_type_long_long" = yes && test "$ac_cv_sizeof_long_long" = "$ac_cv_sizeof_char_p"; then | |
| 18977 | ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" | |
| 18978 | if test "x$ac_cv_type_ptrdiff_t" = xyes | |
| 18979 | then : | |
| 18980 | ||
| 18981 | else case e in #( | |
| 18982 | e) | |
| 18983 | printf "%s\n" "#define ptrdiff_t long long" >>confdefs.h | |
| 18984 | ;; | |
| 18985 | esac | |
| 18986 | fi | |
| 18987 | ||
| 18988 | else | |
| 18989 | ac_fn_c_check_type "$LINENO" "ptrdiff_t" "ac_cv_type_ptrdiff_t" "$ac_includes_default" | |
| 18990 | if test "x$ac_cv_type_ptrdiff_t" = xyes | |
| 18991 | then : | |
| 18992 | ||
| 18993 | else case e in #( | |
| 18994 | e) | |
| 18995 | printf "%s\n" "#define ptrdiff_t int" >>confdefs.h | |
| 18996 | ;; | |
| 18997 | esac | |
| 18998 | fi | |
| 18999 | ||
| 19000 | fi | |
| 19001 | ||
| 19002 | ||
| 19003 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether stat file-mode macros are broken" >&5 | |
| 19004 | printf %s "checking whether stat file-mode macros are broken... " >&6; } | |
| 19005 | if test ${ac_cv_header_stat_broken+y} | |
| 19006 | then : | |
| 19007 | printf %s "(cached) " >&6 | |
| 19008 | else case e in #( | |
| 19009 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 19010 | /* end confdefs.h. */ | |
| 19011 | #include <sys/types.h> | |
| 19012 | #include <sys/stat.h> | |
| 19013 | ||
| 19014 | #if defined S_ISBLK && defined S_IFDIR | |
| 19015 | extern char c1[S_ISBLK (S_IFDIR) ? -1 : 1]; | |
| 19016 | #endif | |
| 19017 | ||
| 19018 | #if defined S_ISBLK && defined S_IFCHR | |
| 19019 | extern char c2[S_ISBLK (S_IFCHR) ? -1 : 1]; | |
| 19020 | #endif | |
| 19021 | ||
| 19022 | #if defined S_ISLNK && defined S_IFREG | |
| 19023 | extern char c3[S_ISLNK (S_IFREG) ? -1 : 1]; | |
| 19024 | #endif | |
| 19025 | ||
| 19026 | #if defined S_ISSOCK && defined S_IFREG | |
| 19027 | extern char c4[S_ISSOCK (S_IFREG) ? -1 : 1]; | |
| 19028 | #endif | |
| 19029 | ||
| 19030 | _ACEOF | |
| 19031 | if ac_fn_c_try_compile "$LINENO" | |
| 19032 | then : | |
| 19033 | ac_cv_header_stat_broken=no | |
| 19034 | else case e in #( | |
| 19035 | e) ac_cv_header_stat_broken=yes ;; | |
| 19036 | esac | |
| 19037 | fi | |
| 19038 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 19039 | esac | |
| 19040 | fi | |
| 19041 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stat_broken" >&5 | |
| 19042 | printf "%s\n" "$ac_cv_header_stat_broken" >&6; } | |
| 19043 | if test $ac_cv_header_stat_broken = yes; then | |
| 19044 | ||
| 19045 | printf "%s\n" "#define STAT_MACROS_BROKEN 1" >>confdefs.h | |
| 19046 | ||
| 19047 | fi | |
| 19048 | ||
| 19049 | ||
| 19050 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether #! works in shell scripts" >&5 | |
| 19051 | printf %s "checking whether #! works in shell scripts... " >&6; } | |
| 19052 | if test ${ac_cv_sys_interpreter+y} | |
| 19053 | then : | |
| 19054 | printf %s "(cached) " >&6 | |
| 19055 | else case e in #( | |
| 19056 | e) echo '#! /bin/cat | |
| 19057 | exit 69 | |
| 19058 | ' >conftest | |
| 19059 | chmod u+x conftest | |
| 19060 | (SHELL=/bin/sh; export SHELL; ./conftest >/dev/null 2>&1) | |
| 19061 | if test $? -ne 69; then | |
| 19062 | ac_cv_sys_interpreter=yes | |
| 19063 | else | |
| 19064 | ac_cv_sys_interpreter=no | |
| 19065 | fi | |
| 19066 | rm -f conftest ;; | |
| 19067 | esac | |
| 19068 | fi | |
| 19069 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_interpreter" >&5 | |
| 19070 | printf "%s\n" "$ac_cv_sys_interpreter" >&6; } | |
| 19071 | interpval=$ac_cv_sys_interpreter | |
| 19072 | ||
| 19073 | if test $ac_cv_sys_interpreter = yes; then | |
| 19074 | printf "%s\n" "#define HAVE_HASH_BANG_EXEC 1" >>confdefs.h | |
| 19075 | ||
| 19076 | fi | |
| 19077 | ||
| 19078 | if test "$ac_cv_func_lstat" = "no"; then | |
| 19079 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for lstat" >&5 | |
| 19080 | printf %s "checking for lstat... " >&6; } | |
| 19081 | if test ${bash_cv_func_lstat+y} | |
| 19082 | then : | |
| 19083 | printf %s "(cached) " >&6 | |
| 19084 | else case e in #( | |
| 19085 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 19086 | /* end confdefs.h. */ | |
| 19087 | ||
| 19088 | #include <sys/types.h> | |
| 19089 | #include <sys/stat.h> | |
| 19090 | ||
| 19091 | int | |
| 19092 | main (void) | |
| 19093 | { | |
| 19094 | lstat(".",(struct stat *)0); | |
| 19095 | ; | |
| 19096 | return 0; | |
| 19097 | } | |
| 19098 | _ACEOF | |
| 19099 | if ac_fn_c_try_link "$LINENO" | |
| 19100 | then : | |
| 19101 | bash_cv_func_lstat=yes | |
| 19102 | else case e in #( | |
| 19103 | e) bash_cv_func_lstat=no ;; | |
| 19104 | esac | |
| 19105 | fi | |
| 19106 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 19107 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 19108 | esac | |
| 19109 | fi | |
| 19110 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_lstat" >&5 | |
| 19111 | printf "%s\n" "$bash_cv_func_lstat" >&6; } | |
| 19112 | if test $bash_cv_func_lstat = yes; then | |
| 19113 | printf "%s\n" "#define HAVE_LSTAT 1" >>confdefs.h | |
| 19114 | ||
| 19115 | fi | |
| 19116 | ||
| 19117 | fi | |
| 19118 | ||
| 19119 | ||
| 19120 | ||
| 19121 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether strchrnul works" >&5 | |
| 19122 | printf %s "checking whether strchrnul works... " >&6; } | |
| 19123 | if test ${bash_cv_func_strchrnul_works+y} | |
| 19124 | then : | |
| 19125 | printf %s "(cached) " >&6 | |
| 19126 | else case e in #( | |
| 19127 | e) if test "$cross_compiling" = yes | |
| 19128 | then : | |
| 19129 | bash_cv_func_strchrnul_works=no | |
| 19130 | ||
| 19131 | else case e in #( | |
| 19132 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 19133 | /* end confdefs.h. */ | |
| 19134 | ||
| 19135 | #include <string.h> | |
| 19136 | ||
| 19137 | int | |
| 19138 | main (void) | |
| 19139 | { | |
| 19140 | const char *buf = "abc"; | |
| 19141 | return strchrnul (buf, 'd') != buf + 3; | |
| 19142 | ||
| 19143 | ||
| 19144 | ; | |
| 19145 | return 0; | |
| 19146 | } | |
| 19147 | _ACEOF | |
| 19148 | if ac_fn_c_try_run "$LINENO" | |
| 19149 | then : | |
| 19150 | bash_cv_func_strchrnul_works=yes | |
| 19151 | else case e in #( | |
| 19152 | e) bash_cv_func_strchrnul_works=no ;; | |
| 19153 | esac | |
| 19154 | fi | |
| 19155 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 19156 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 19157 | esac | |
| 19158 | fi | |
| 19159 | ;; | |
| 19160 | esac | |
| 19161 | fi | |
| 19162 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strchrnul_works" >&5 | |
| 19163 | printf "%s\n" "$bash_cv_func_strchrnul_works" >&6; } | |
| 19164 | ||
| 19165 | if test "$bash_cv_func_strchrnul_works" = "no"; then | |
| 19166 | case " $LIBOBJS " in | |
| 19167 | *" strchrnul.$ac_objext "* ) ;; | |
| 19168 | *) LIBOBJS="$LIBOBJS strchrnul.$ac_objext" | |
| 19169 | ;; | |
| 19170 | esac | |
| 19171 | ||
| 19172 | fi | |
| 19173 | ||
| 19174 | ||
| 19175 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if dup2 fails to clear the close-on-exec flag" >&5 | |
| 19176 | printf %s "checking if dup2 fails to clear the close-on-exec flag... " >&6; } | |
| 19177 | if test ${bash_cv_dup2_broken+y} | |
| 19178 | then : | |
| 19179 | printf %s "(cached) " >&6 | |
| 19180 | else case e in #( | |
| 19181 | e) if test "$cross_compiling" = yes | |
| 19182 | then : | |
| 19183 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&5 | |
| 19184 | printf "%s\n" "$as_me: WARNING: cannot check dup2 if cross compiling -- defaulting to no" >&2;} | |
| 19185 | bash_cv_dup2_broken=no | |
| 19186 | ||
| 19187 | else case e in #( | |
| 19188 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 19189 | /* end confdefs.h. */ | |
| 19190 | ||
| 19191 | #include <sys/types.h> | |
| 19192 | #include <fcntl.h> | |
| 19193 | #include <stdlib.h> | |
| 19194 | #ifdef HAVE_UNISTD_H | |
| 19195 | # include <unistd.h> | |
| 19196 | #endif /* HAVE_UNISTD_H */ | |
| 19197 | int | |
| 19198 | main() | |
| 19199 | { | |
| 19200 | int fd1, fd2, fl; | |
| 19201 | fd1 = open("/dev/null", 2); | |
| 19202 | if (fcntl(fd1, 2, 1) < 0) | |
| 19203 | exit(1); | |
| 19204 | fd2 = dup2(fd1, 1); | |
| 19205 | if (fd2 < 0) | |
| 19206 | exit(2); | |
| 19207 | fl = fcntl(fd2, 1, 0); | |
| 19208 | /* fl will be 1 if dup2 did not reset the close-on-exec flag. */ | |
| 19209 | exit(fl != 1); | |
| 19210 | } | |
| 19211 | ||
| 19212 | _ACEOF | |
| 19213 | if ac_fn_c_try_run "$LINENO" | |
| 19214 | then : | |
| 19215 | bash_cv_dup2_broken=yes | |
| 19216 | else case e in #( | |
| 19217 | e) bash_cv_dup2_broken=no ;; | |
| 19218 | esac | |
| 19219 | fi | |
| 19220 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 19221 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 19222 | esac | |
| 19223 | fi | |
| 19224 | ;; | |
| 19225 | esac | |
| 19226 | fi | |
| 19227 | ||
| 19228 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dup2_broken" >&5 | |
| 19229 | printf "%s\n" "$bash_cv_dup2_broken" >&6; } | |
| 19230 | if test $bash_cv_dup2_broken = yes; then | |
| 19231 | printf "%s\n" "#define DUP2_BROKEN 1" >>confdefs.h | |
| 19232 | ||
| 19233 | fi | |
| 19234 | ||
| 19235 | ||
| 19236 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether pgrps need synchronization" >&5 | |
| 19237 | printf %s "checking whether pgrps need synchronization... " >&6; } | |
| 19238 | if test ${bash_cv_pgrp_pipe+y} | |
| 19239 | then : | |
| 19240 | printf %s "(cached) " >&6 | |
| 19241 | else case e in #( | |
| 19242 | e) if test "$cross_compiling" = yes | |
| 19243 | then : | |
| 19244 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&5 | |
| 19245 | printf "%s\n" "$as_me: WARNING: cannot check pgrp synchronization if cross compiling -- defaulting to no" >&2;} | |
| 19246 | bash_cv_pgrp_pipe=no | |
| 19247 | ||
| 19248 | else case e in #( | |
| 19249 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 19250 | /* end confdefs.h. */ | |
| 19251 | ||
| 19252 | #ifdef HAVE_UNISTD_H | |
| 19253 | # include <unistd.h> | |
| 19254 | #endif | |
| 19255 | #ifdef HAVE_SYS_WAIT_H | |
| 19256 | # include <sys/wait.h> | |
| 19257 | #endif | |
| 19258 | #include <stdlib.h> | |
| 19259 | int | |
| 19260 | main() | |
| 19261 | { | |
| 19262 | # ifdef GETPGRP_VOID | |
| 19263 | # define getpgID() getpgrp() | |
| 19264 | # else | |
| 19265 | # define getpgID() getpgrp(0) | |
| 19266 | # define setpgid(x,y) setpgrp(x,y) | |
| 19267 | # endif | |
| 19268 | int pid1, pid2, fds[2]; | |
| 19269 | int status; | |
| 19270 | char ok; | |
| 19271 | ||
| 19272 | switch (pid1 = fork()) { | |
| 19273 | case -1: | |
| 19274 | exit(1); | |
| 19275 | case 0: | |
| 19276 | setpgid(0, getpid()); | |
| 19277 | exit(0); | |
| 19278 | } | |
| 19279 | setpgid(pid1, pid1); | |
| 19280 | ||
| 19281 | sleep(2); /* let first child die */ | |
| 19282 | ||
| 19283 | if (pipe(fds) < 0) | |
| 19284 | exit(2); | |
| 19285 | ||
| 19286 | switch (pid2 = fork()) { | |
| 19287 | case -1: | |
| 19288 | exit(3); | |
| 19289 | case 0: | |
| 19290 | setpgid(0, pid1); | |
| 19291 | ok = getpgID() == pid1; | |
| 19292 | write(fds[1], &ok, 1); | |
| 19293 | exit(0); | |
| 19294 | } | |
| 19295 | setpgid(pid2, pid1); | |
| 19296 | ||
| 19297 | close(fds[1]); | |
| 19298 | if (read(fds[0], &ok, 1) != 1) | |
| 19299 | exit(4); | |
| 19300 | wait(&status); | |
| 19301 | wait(&status); | |
| 19302 | exit(ok ? 0 : 5); | |
| 19303 | } | |
| 19304 | ||
| 19305 | _ACEOF | |
| 19306 | if ac_fn_c_try_run "$LINENO" | |
| 19307 | then : | |
| 19308 | bash_cv_pgrp_pipe=no | |
| 19309 | else case e in #( | |
| 19310 | e) bash_cv_pgrp_pipe=yes ;; | |
| 19311 | esac | |
| 19312 | fi | |
| 19313 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 19314 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 19315 | esac | |
| 19316 | fi | |
| 19317 | ;; | |
| 19318 | esac | |
| 19319 | fi | |
| 19320 | ||
| 19321 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_pgrp_pipe" >&5 | |
| 19322 | printf "%s\n" "$bash_cv_pgrp_pipe" >&6; } | |
| 19323 | if test $bash_cv_pgrp_pipe = yes; then | |
| 19324 | printf "%s\n" "#define PGRP_PIPE 1" >>confdefs.h | |
| 19325 | ||
| 19326 | fi | |
| 19327 | ||
| 19328 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for type of signal functions" >&5 | |
| 19329 | printf %s "checking for type of signal functions... " >&6; } | |
| 19330 | if test ${bash_cv_signal_vintage+y} | |
| 19331 | then : | |
| 19332 | printf %s "(cached) " >&6 | |
| 19333 | else case e in #( | |
| 19334 | e) | |
| 19335 | if test ${bash_cv_posix_signals+y} | |
| 19336 | then : | |
| 19337 | printf %s "(cached) " >&6 | |
| 19338 | else case e in #( | |
| 19339 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 19340 | /* end confdefs.h. */ | |
| 19341 | ||
| 19342 | #include <signal.h> | |
| 19343 | ||
| 19344 | int | |
| 19345 | main (void) | |
| 19346 | { | |
| 19347 | ||
| 19348 | sigset_t ss; | |
| 19349 | struct sigaction sa; | |
| 19350 | sigemptyset(&ss); sigsuspend(&ss); | |
| 19351 | sigaction(SIGINT, &sa, (struct sigaction *) 0); | |
| 19352 | sigprocmask(SIG_BLOCK, &ss, (sigset_t *) 0); | |
| 19353 | ||
| 19354 | ; | |
| 19355 | return 0; | |
| 19356 | } | |
| 19357 | _ACEOF | |
| 19358 | if ac_fn_c_try_link "$LINENO" | |
| 19359 | then : | |
| 19360 | bash_cv_posix_signals=yes | |
| 19361 | else case e in #( | |
| 19362 | e) bash_cv_posix_signals=no | |
| 19363 | ;; | |
| 19364 | esac | |
| 19365 | fi | |
| 19366 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 19367 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 19368 | esac | |
| 19369 | fi | |
| 19370 | ||
| 19371 | ||
| 19372 | if test $bash_cv_posix_signals = yes; then | |
| 19373 | bash_cv_signal_vintage=posix | |
| 19374 | else | |
| 19375 | if test ${bash_cv_bsd_signals+y} | |
| 19376 | then : | |
| 19377 | printf %s "(cached) " >&6 | |
| 19378 | else case e in #( | |
| 19379 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 19380 | /* end confdefs.h. */ | |
| 19381 | ||
| 19382 | #include <signal.h> | |
| 19383 | ||
| 19384 | int | |
| 19385 | main (void) | |
| 19386 | { | |
| 19387 | ||
| 19388 | int mask = sigmask(SIGINT); | |
| 19389 | sigsetmask(mask); sigblock(mask); sigpause(mask); | |
| 19390 | ||
| 19391 | ; | |
| 19392 | return 0; | |
| 19393 | } | |
| 19394 | _ACEOF | |
| 19395 | if ac_fn_c_try_link "$LINENO" | |
| 19396 | then : | |
| 19397 | bash_cv_bsd_signals=yes | |
| 19398 | else case e in #( | |
| 19399 | e) bash_cv_bsd_signals=no | |
| 19400 | ;; | |
| 19401 | esac | |
| 19402 | fi | |
| 19403 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 19404 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 19405 | esac | |
| 19406 | fi | |
| 19407 | ||
| 19408 | ||
| 19409 | if test $bash_cv_bsd_signals = yes; then | |
| 19410 | bash_cv_signal_vintage=4.2bsd | |
| 19411 | else | |
| 19412 | if test ${bash_cv_sysv_signals+y} | |
| 19413 | then : | |
| 19414 | printf %s "(cached) " >&6 | |
| 19415 | else case e in #( | |
| 19416 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 19417 | /* end confdefs.h. */ | |
| 19418 | ||
| 19419 | #include <signal.h> | |
| 19420 | void foo() { } | |
| 19421 | ||
| 19422 | int | |
| 19423 | main (void) | |
| 19424 | { | |
| 19425 | ||
| 19426 | int mask = sigmask(SIGINT); | |
| 19427 | sigset(SIGINT, foo); sigrelse(SIGINT); | |
| 19428 | sighold(SIGINT); sigpause(SIGINT); | |
| 19429 | ||
| 19430 | ; | |
| 19431 | return 0; | |
| 19432 | } | |
| 19433 | _ACEOF | |
| 19434 | if ac_fn_c_try_link "$LINENO" | |
| 19435 | then : | |
| 19436 | bash_cv_sysv_signals=yes | |
| 19437 | else case e in #( | |
| 19438 | e) bash_cv_sysv_signals=no | |
| 19439 | ;; | |
| 19440 | esac | |
| 19441 | fi | |
| 19442 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 19443 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 19444 | esac | |
| 19445 | fi | |
| 19446 | ||
| 19447 | ||
| 19448 | if test $bash_cv_sysv_signals = yes; then | |
| 19449 | bash_cv_signal_vintage=svr3 | |
| 19450 | else | |
| 19451 | bash_cv_signal_vintage=v7 | |
| 19452 | fi | |
| 19453 | fi | |
| 19454 | fi | |
| 19455 | ;; | |
| 19456 | esac | |
| 19457 | fi | |
| 19458 | ||
| 19459 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_signal_vintage" >&5 | |
| 19460 | printf "%s\n" "$bash_cv_signal_vintage" >&6; } | |
| 19461 | if test "$bash_cv_signal_vintage" = posix; then | |
| 19462 | printf "%s\n" "#define HAVE_POSIX_SIGNALS 1" >>confdefs.h | |
| 19463 | ||
| 19464 | elif test "$bash_cv_signal_vintage" = "4.2bsd"; then | |
| 19465 | printf "%s\n" "#define HAVE_BSD_SIGNALS 1" >>confdefs.h | |
| 19466 | ||
| 19467 | elif test "$bash_cv_signal_vintage" = svr3; then | |
| 19468 | printf "%s\n" "#define HAVE_USG_SIGHOLD 1" >>confdefs.h | |
| 19469 | ||
| 19470 | fi | |
| 19471 | ||
| 19472 | ||
| 19473 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys_errlist and sys_nerr" >&5 | |
| 19474 | printf %s "checking for sys_errlist and sys_nerr... " >&6; } | |
| 19475 | if test ${bash_cv_sys_errlist+y} | |
| 19476 | then : | |
| 19477 | printf %s "(cached) " >&6 | |
| 19478 | else case e in #( | |
| 19479 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 19480 | /* end confdefs.h. */ | |
| 19481 | ||
| 19482 | #include <errno.h> | |
| 19483 | ||
| 19484 | int | |
| 19485 | main (void) | |
| 19486 | { | |
| 19487 | ||
| 19488 | extern char *sys_errlist[]; | |
| 19489 | extern int sys_nerr; | |
| 19490 | char *msg = sys_errlist[sys_nerr - 1]; | |
| 19491 | ||
| 19492 | ; | |
| 19493 | return 0; | |
| 19494 | } | |
| 19495 | _ACEOF | |
| 19496 | if ac_fn_c_try_link "$LINENO" | |
| 19497 | then : | |
| 19498 | bash_cv_sys_errlist=yes | |
| 19499 | else case e in #( | |
| 19500 | e) bash_cv_sys_errlist=no | |
| 19501 | ;; | |
| 19502 | esac | |
| 19503 | fi | |
| 19504 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 19505 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 19506 | esac | |
| 19507 | fi | |
| 19508 | ||
| 19509 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_errlist" >&5 | |
| 19510 | printf "%s\n" "$bash_cv_sys_errlist" >&6; } | |
| 19511 | if test $bash_cv_sys_errlist = yes; then | |
| 19512 | printf "%s\n" "#define HAVE_SYS_ERRLIST 1" >>confdefs.h | |
| 19513 | ||
| 19514 | fi | |
| 19515 | ||
| 19516 | ac_fn_check_decl "$LINENO" "sys_siglist" "ac_cv_have_decl_sys_siglist" "#include <signal.h> | |
| 19517 | /* NetBSD declares sys_siglist in unistd.h. */ | |
| 19518 | #ifdef HAVE_UNISTD_H | |
| 19519 | # include <unistd.h> | |
| 19520 | #endif | |
| 19521 | ||
| 19522 | " "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 19523 | if test "x$ac_cv_have_decl_sys_siglist" = xyes | |
| 19524 | then : | |
| 19525 | ac_have_decl=1 | |
| 19526 | else case e in #( | |
| 19527 | e) ac_have_decl=0 ;; | |
| 19528 | esac | |
| 19529 | fi | |
| 19530 | printf "%s\n" "#define HAVE_DECL_SYS_SIGLIST $ac_have_decl" >>confdefs.h | |
| 19531 | ||
| 19532 | ||
| 19533 | ||
| 19534 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sys_siglist in system C library" >&5 | |
| 19535 | printf %s "checking for sys_siglist in system C library... " >&6; } | |
| 19536 | if test ${bash_cv_sys_siglist+y} | |
| 19537 | then : | |
| 19538 | printf %s "(cached) " >&6 | |
| 19539 | else case e in #( | |
| 19540 | e) if test "$cross_compiling" = yes | |
| 19541 | then : | |
| 19542 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&5 | |
| 19543 | printf "%s\n" "$as_me: WARNING: cannot check for sys_siglist if cross compiling -- defaulting to no" >&2;} | |
| 19544 | bash_cv_sys_siglist=no | |
| 19545 | ||
| 19546 | else case e in #( | |
| 19547 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 19548 | /* end confdefs.h. */ | |
| 19549 | ||
| 19550 | #include <sys/types.h> | |
| 19551 | #include <signal.h> | |
| 19552 | #ifdef HAVE_UNISTD_H | |
| 19553 | #include <unistd.h> | |
| 19554 | #endif | |
| 19555 | #include <stdlib.h> | |
| 19556 | #if !HAVE_DECL_SYS_SIGLIST | |
| 19557 | extern char *sys_siglist[]; | |
| 19558 | #endif | |
| 19559 | int | |
| 19560 | main() | |
| 19561 | { | |
| 19562 | char *msg = sys_siglist[2]; | |
| 19563 | exit(msg == 0); | |
| 19564 | } | |
| 19565 | ||
| 19566 | _ACEOF | |
| 19567 | if ac_fn_c_try_run "$LINENO" | |
| 19568 | then : | |
| 19569 | bash_cv_sys_siglist=yes | |
| 19570 | else case e in #( | |
| 19571 | e) bash_cv_sys_siglist=no ;; | |
| 19572 | esac | |
| 19573 | fi | |
| 19574 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 19575 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 19576 | esac | |
| 19577 | fi | |
| 19578 | ;; | |
| 19579 | esac | |
| 19580 | fi | |
| 19581 | ||
| 19582 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_siglist" >&5 | |
| 19583 | printf "%s\n" "$bash_cv_sys_siglist" >&6; } | |
| 19584 | if test $bash_cv_sys_siglist = yes; then | |
| 19585 | printf "%s\n" "#define HAVE_SYS_SIGLIST 1" >>confdefs.h | |
| 19586 | ||
| 19587 | fi | |
| 19588 | ||
| 19589 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in signal.h or unistd.h" >&5 | |
| 19590 | printf %s "checking for _sys_siglist in signal.h or unistd.h... " >&6; } | |
| 19591 | if test ${bash_cv_decl_under_sys_siglist+y} | |
| 19592 | then : | |
| 19593 | printf %s "(cached) " >&6 | |
| 19594 | else case e in #( | |
| 19595 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 19596 | /* end confdefs.h. */ | |
| 19597 | ||
| 19598 | #include <sys/types.h> | |
| 19599 | #include <signal.h> | |
| 19600 | #ifdef HAVE_UNISTD_H | |
| 19601 | #include <unistd.h> | |
| 19602 | #endif | |
| 19603 | int | |
| 19604 | main (void) | |
| 19605 | { | |
| 19606 | char *msg = _sys_siglist[2]; | |
| 19607 | ; | |
| 19608 | return 0; | |
| 19609 | } | |
| 19610 | _ACEOF | |
| 19611 | if ac_fn_c_try_compile "$LINENO" | |
| 19612 | then : | |
| 19613 | bash_cv_decl_under_sys_siglist=yes | |
| 19614 | else case e in #( | |
| 19615 | e) bash_cv_decl_under_sys_siglist=no ;; | |
| 19616 | esac | |
| 19617 | fi | |
| 19618 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 19619 | esac | |
| 19620 | fi | |
| 19621 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_decl_under_sys_siglist" >&5 | |
| 19622 | printf "%s\n" "$bash_cv_decl_under_sys_siglist" >&6; } | |
| 19623 | if test $bash_cv_decl_under_sys_siglist = yes; then | |
| 19624 | printf "%s\n" "#define UNDER_SYS_SIGLIST_DECLARED 1" >>confdefs.h | |
| 19625 | ||
| 19626 | fi | |
| 19627 | ||
| 19628 | ||
| 19629 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for _sys_siglist in system C library" >&5 | |
| 19630 | printf %s "checking for _sys_siglist in system C library... " >&6; } | |
| 19631 | if test ${bash_cv_under_sys_siglist+y} | |
| 19632 | then : | |
| 19633 | printf %s "(cached) " >&6 | |
| 19634 | else case e in #( | |
| 19635 | e) if test "$cross_compiling" = yes | |
| 19636 | then : | |
| 19637 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&5 | |
| 19638 | printf "%s\n" "$as_me: WARNING: cannot check for _sys_siglist if cross compiling -- defaulting to no" >&2;} | |
| 19639 | bash_cv_under_sys_siglist=no | |
| 19640 | ||
| 19641 | else case e in #( | |
| 19642 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 19643 | /* end confdefs.h. */ | |
| 19644 | ||
| 19645 | #include <sys/types.h> | |
| 19646 | #include <signal.h> | |
| 19647 | #ifdef HAVE_UNISTD_H | |
| 19648 | #include <unistd.h> | |
| 19649 | #endif | |
| 19650 | #include <stdlib.h> | |
| 19651 | #ifndef UNDER_SYS_SIGLIST_DECLARED | |
| 19652 | extern char *_sys_siglist[]; | |
| 19653 | #endif | |
| 19654 | int | |
| 19655 | main() | |
| 19656 | { | |
| 19657 | char *msg = (char *)_sys_siglist[2]; | |
| 19658 | exit(msg == 0); | |
| 19659 | } | |
| 19660 | ||
| 19661 | _ACEOF | |
| 19662 | if ac_fn_c_try_run "$LINENO" | |
| 19663 | then : | |
| 19664 | bash_cv_under_sys_siglist=yes | |
| 19665 | else case e in #( | |
| 19666 | e) bash_cv_under_sys_siglist=no ;; | |
| 19667 | esac | |
| 19668 | fi | |
| 19669 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 19670 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 19671 | esac | |
| 19672 | fi | |
| 19673 | ;; | |
| 19674 | esac | |
| 19675 | fi | |
| 19676 | ||
| 19677 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_under_sys_siglist" >&5 | |
| 19678 | printf "%s\n" "$bash_cv_under_sys_siglist" >&6; } | |
| 19679 | if test $bash_cv_under_sys_siglist = yes; then | |
| 19680 | printf "%s\n" "#define HAVE_UNDER_SYS_SIGLIST 1" >>confdefs.h | |
| 19681 | ||
| 19682 | fi | |
| 19683 | ||
| 19684 | ||
| 19685 | ||
| 19686 | ||
| 19687 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for clock_t" >&5 | |
| 19688 | printf %s "checking for clock_t... " >&6; } | |
| 19689 | if test ${bash_cv_type_clock_t+y} | |
| 19690 | then : | |
| 19691 | printf %s "(cached) " >&6 | |
| 19692 | else case e in #( | |
| 19693 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 19694 | /* end confdefs.h. */ | |
| 19695 | #include <sys/types.h> | |
| 19696 | #if HAVE_STDLIB_H | |
| 19697 | #include <stdlib.h> | |
| 19698 | #endif | |
| 19699 | #if HAVE_STDDEF_H | |
| 19700 | #include <stddef.h> | |
| 19701 | #endif | |
| 19702 | #if HAVE_INTTYPES_H | |
| 19703 | #include <inttypes.h> | |
| 19704 | #endif | |
| 19705 | #if HAVE_STDINT_H | |
| 19706 | #include <stdint.h> | |
| 19707 | #endif | |
| 19708 | #include <sys/times.h> | |
| 19709 | ||
| 19710 | _ACEOF | |
| 19711 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
| 19712 | $EGREP_TRADITIONAL "clock_t" >/dev/null 2>&1 | |
| 19713 | then : | |
| 19714 | bash_cv_type_clock_t=yes | |
| 19715 | else case e in #( | |
| 19716 | e) bash_cv_type_clock_t=no ;; | |
| 19717 | esac | |
| 19718 | fi | |
| 19719 | rm -rf conftest* | |
| 19720 | ;; | |
| 19721 | esac | |
| 19722 | fi | |
| 19723 | ||
| 19724 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_clock_t" >&5 | |
| 19725 | printf "%s\n" "$bash_cv_type_clock_t" >&6; } | |
| 19726 | ||
| 19727 | if test $bash_cv_type_clock_t = no; then | |
| 19728 | printf "%s\n" "#define clock_t long" >>confdefs.h | |
| 19729 | ||
| 19730 | fi | |
| 19731 | ||
| 19732 | ||
| 19733 | ||
| 19734 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sigset_t" >&5 | |
| 19735 | printf %s "checking for sigset_t... " >&6; } | |
| 19736 | if test ${bash_cv_type_sigset_t+y} | |
| 19737 | then : | |
| 19738 | printf %s "(cached) " >&6 | |
| 19739 | else case e in #( | |
| 19740 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 19741 | /* end confdefs.h. */ | |
| 19742 | #include <sys/types.h> | |
| 19743 | #if HAVE_STDLIB_H | |
| 19744 | #include <stdlib.h> | |
| 19745 | #endif | |
| 19746 | #if HAVE_STDDEF_H | |
| 19747 | #include <stddef.h> | |
| 19748 | #endif | |
| 19749 | #if HAVE_INTTYPES_H | |
| 19750 | #include <inttypes.h> | |
| 19751 | #endif | |
| 19752 | #if HAVE_STDINT_H | |
| 19753 | #include <stdint.h> | |
| 19754 | #endif | |
| 19755 | #include <signal.h> | |
| 19756 | ||
| 19757 | _ACEOF | |
| 19758 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
| 19759 | $EGREP_TRADITIONAL "sigset_t" >/dev/null 2>&1 | |
| 19760 | then : | |
| 19761 | bash_cv_type_sigset_t=yes | |
| 19762 | else case e in #( | |
| 19763 | e) bash_cv_type_sigset_t=no ;; | |
| 19764 | esac | |
| 19765 | fi | |
| 19766 | rm -rf conftest* | |
| 19767 | ;; | |
| 19768 | esac | |
| 19769 | fi | |
| 19770 | ||
| 19771 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_sigset_t" >&5 | |
| 19772 | printf "%s\n" "$bash_cv_type_sigset_t" >&6; } | |
| 19773 | ||
| 19774 | if test $bash_cv_type_sigset_t = no; then | |
| 19775 | printf "%s\n" "#define sigset_t int" >>confdefs.h | |
| 19776 | ||
| 19777 | fi | |
| 19778 | ||
| 19779 | if test "$ac_cv_header_sys_socket_h" = "yes"; then | |
| 19780 | ||
| 19781 | ||
| 19782 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for socklen_t" >&5 | |
| 19783 | printf %s "checking for socklen_t... " >&6; } | |
| 19784 | if test ${bash_cv_type_socklen_t+y} | |
| 19785 | then : | |
| 19786 | printf %s "(cached) " >&6 | |
| 19787 | else case e in #( | |
| 19788 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 19789 | /* end confdefs.h. */ | |
| 19790 | #include <sys/types.h> | |
| 19791 | #if HAVE_STDLIB_H | |
| 19792 | #include <stdlib.h> | |
| 19793 | #endif | |
| 19794 | #if HAVE_STDDEF_H | |
| 19795 | #include <stddef.h> | |
| 19796 | #endif | |
| 19797 | #if HAVE_INTTYPES_H | |
| 19798 | #include <inttypes.h> | |
| 19799 | #endif | |
| 19800 | #if HAVE_STDINT_H | |
| 19801 | #include <stdint.h> | |
| 19802 | #endif | |
| 19803 | #include <sys/socket.h> | |
| 19804 | ||
| 19805 | _ACEOF | |
| 19806 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
| 19807 | $EGREP_TRADITIONAL "socklen_t" >/dev/null 2>&1 | |
| 19808 | then : | |
| 19809 | bash_cv_type_socklen_t=yes | |
| 19810 | else case e in #( | |
| 19811 | e) bash_cv_type_socklen_t=no ;; | |
| 19812 | esac | |
| 19813 | fi | |
| 19814 | rm -rf conftest* | |
| 19815 | ;; | |
| 19816 | esac | |
| 19817 | fi | |
| 19818 | ||
| 19819 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_socklen_t" >&5 | |
| 19820 | printf "%s\n" "$bash_cv_type_socklen_t" >&6; } | |
| 19821 | if test $bash_cv_type_socklen_t = yes; then | |
| 19822 | printf "%s\n" "#define HAVE_SOCKLEN_T 1" >>confdefs.h | |
| 19823 | ||
| 19824 | fi | |
| 19825 | if test $bash_cv_type_socklen_t = no; then | |
| 19826 | printf "%s\n" "#define socklen_t unsigned int" >>confdefs.h | |
| 19827 | ||
| 19828 | fi | |
| 19829 | ||
| 19830 | fi | |
| 19831 | ||
| 19832 | ac_fn_c_check_type "$LINENO" "quad_t" "ac_cv_type_quad_t" "$ac_includes_default" | |
| 19833 | if test "x$ac_cv_type_quad_t" = xyes | |
| 19834 | then : | |
| 19835 | printf "%s\n" "#define HAVE_QUAD_T 1" >>confdefs.h | |
| 19836 | ||
| 19837 | fi | |
| 19838 | ||
| 19839 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for type of struct rlimit fields" >&5 | |
| 19840 | printf %s "checking for type of struct rlimit fields... " >&6; } | |
| 19841 | if test ${bash_cv_type_rlimit+y} | |
| 19842 | then : | |
| 19843 | printf %s "(cached) " >&6 | |
| 19844 | else case e in #( | |
| 19845 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 19846 | /* end confdefs.h. */ | |
| 19847 | ||
| 19848 | #include <sys/types.h> | |
| 19849 | #include <sys/resource.h> | |
| 19850 | int | |
| 19851 | main (void) | |
| 19852 | { | |
| 19853 | rlim_t xxx; | |
| 19854 | ||
| 19855 | ; | |
| 19856 | return 0; | |
| 19857 | } | |
| 19858 | _ACEOF | |
| 19859 | if ac_fn_c_try_compile "$LINENO" | |
| 19860 | then : | |
| 19861 | bash_cv_type_rlimit=rlim_t | |
| 19862 | else case e in #( | |
| 19863 | e) | |
| 19864 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for size of struct rlimit fields" >&5 | |
| 19865 | printf %s "checking for size of struct rlimit fields... " >&6; } | |
| 19866 | if test ${bash_cv_sizeof_rlim_cur+y} | |
| 19867 | then : | |
| 19868 | printf %s "(cached) " >&6 | |
| 19869 | else case e in #( | |
| 19870 | e) if test "$cross_compiling" = yes | |
| 19871 | then : | |
| 19872 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check size of rlimit fields if cross compiling -- defaulting to long" >&5 | |
| 19873 | printf "%s\n" "$as_me: WARNING: cannot check size of rlimit fields if cross compiling -- defaulting to long" >&2;} | |
| 19874 | bash_cv_sizeof_rlim_cur=$ac_cv_sizeof_long | |
| 19875 | ||
| 19876 | else case e in #( | |
| 19877 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 19878 | /* end confdefs.h. */ | |
| 19879 | ||
| 19880 | #ifdef HAVE_SYS_TIME_H | |
| 19881 | #include <sys/time.h> | |
| 19882 | #endif | |
| 19883 | #include <stdlib.h> | |
| 19884 | #include <sys/resource.h> | |
| 19885 | int | |
| 19886 | main() | |
| 19887 | { | |
| 19888 | struct rlimit r; | |
| 19889 | exit(sizeof (r.rlim_cur)); | |
| 19890 | } | |
| 19891 | ||
| 19892 | _ACEOF | |
| 19893 | if ac_fn_c_try_run "$LINENO" | |
| 19894 | then : | |
| 19895 | bash_cv_sizeof_rlim_cur=$? | |
| 19896 | else case e in #( | |
| 19897 | e) bash_cv_sizeof_rlim_cur=$? ;; | |
| 19898 | esac | |
| 19899 | fi | |
| 19900 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 19901 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 19902 | esac | |
| 19903 | fi | |
| 19904 | ;; | |
| 19905 | esac | |
| 19906 | fi | |
| 19907 | ||
| 19908 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sizeof_rlim_cur" >&5 | |
| 19909 | printf "%s\n" "$bash_cv_sizeof_rlim_cur" >&6; } | |
| 19910 | ||
| 19911 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for size of quad_t" >&5 | |
| 19912 | printf %s "checking for size of quad_t... " >&6; } | |
| 19913 | if test ${bash_cv_sizeof_quad_t+y} | |
| 19914 | then : | |
| 19915 | printf %s "(cached) " >&6 | |
| 19916 | else case e in #( | |
| 19917 | e) if test "$cross_compiling" = yes | |
| 19918 | then : | |
| 19919 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check size of quad_t if cross compiling -- defaulting to 0" >&5 | |
| 19920 | printf "%s\n" "$as_me: WARNING: cannot check size of quad_t if cross compiling -- defaulting to 0" >&2;} | |
| 19921 | bash_cv_sizeof_quad_t=0 | |
| 19922 | ||
| 19923 | else case e in #( | |
| 19924 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 19925 | /* end confdefs.h. */ | |
| 19926 | ||
| 19927 | #include <sys/types.h> | |
| 19928 | #include <stdlib.h> | |
| 19929 | #if HAVE_INTTYPES_H | |
| 19930 | #include <inttypes.h> | |
| 19931 | #endif | |
| 19932 | #if HAVE_STDINT_H | |
| 19933 | #include <stdint.h> | |
| 19934 | #endif | |
| 19935 | ||
| 19936 | int | |
| 19937 | main() | |
| 19938 | { | |
| 19939 | #if HAVE_QUAD_T | |
| 19940 | quad_t x; | |
| 19941 | exit(sizeof (x)); | |
| 19942 | #else | |
| 19943 | exit (0); | |
| 19944 | #endif | |
| 19945 | } | |
| 19946 | ||
| 19947 | _ACEOF | |
| 19948 | if ac_fn_c_try_run "$LINENO" | |
| 19949 | then : | |
| 19950 | bash_cv_sizeof_quad_t=$? | |
| 19951 | else case e in #( | |
| 19952 | e) bash_cv_sizeof_quad_t=$? ;; | |
| 19953 | esac | |
| 19954 | fi | |
| 19955 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 19956 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 19957 | esac | |
| 19958 | fi | |
| 19959 | ;; | |
| 19960 | esac | |
| 19961 | fi | |
| 19962 | ||
| 19963 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sizeof_quad_t" >&5 | |
| 19964 | printf "%s\n" "$bash_cv_sizeof_quad_t" >&6; } | |
| 19965 | ||
| 19966 | if test $bash_cv_sizeof_rlim_cur = $ac_cv_sizeof_long; then | |
| 19967 | bash_cv_type_rlimit='unsigned long' | |
| 19968 | elif test $bash_cv_sizeof_rlim_cur = $ac_cv_sizeof_long_long; then | |
| 19969 | bash_cv_type_rlimit='unsigned long long' | |
| 19970 | elif test $bash_cv_sizeof_rlim_cur = $ac_cv_sizeof_int; then | |
| 19971 | bash_cv_type_rlimit='unsigned int' | |
| 19972 | elif test $bash_cv_sizeof_rlim_cur = $bash_cv_sizeof_quad_t; then | |
| 19973 | bash_cv_type_rlimit='quad_t' | |
| 19974 | else | |
| 19975 | bash_cv_type_rlimit='unsigned long' | |
| 19976 | fi | |
| 19977 | ||
| 19978 | ;; | |
| 19979 | esac | |
| 19980 | fi | |
| 19981 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 19982 | esac | |
| 19983 | fi | |
| 19984 | ||
| 19985 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_type_rlimit" >&5 | |
| 19986 | printf "%s\n" "$bash_cv_type_rlimit" >&6; } | |
| 19987 | printf "%s\n" "#define RLIMTYPE $bash_cv_type_rlimit" >>confdefs.h | |
| 19988 | ||
| 19989 | ||
| 19990 | ||
| 19991 | ||
| 19992 | ||
| 19993 | ac_fn_c_check_type "$LINENO" "intmax_t" "ac_cv_type_intmax_t" "$ac_includes_default" | |
| 19994 | if test "x$ac_cv_type_intmax_t" = xyes | |
| 19995 | then : | |
| 19996 | ||
| 19997 | printf "%s\n" "#define HAVE_INTMAX_T 1" >>confdefs.h | |
| 19998 | ||
| 19999 | else case e in #( | |
| 20000 | e) test $ac_cv_type_long_long_int = yes \ | |
| 20001 | && ac_type='long long int' \ | |
| 20002 | || ac_type='long int' | |
| 20003 | ||
| 20004 | printf "%s\n" "#define intmax_t $ac_type" >>confdefs.h | |
| 20005 | ;; | |
| 20006 | esac | |
| 20007 | fi | |
| 20008 | ||
| 20009 | ||
| 20010 | ||
| 20011 | ||
| 20012 | ac_fn_c_check_type "$LINENO" "uintmax_t" "ac_cv_type_uintmax_t" "$ac_includes_default" | |
| 20013 | if test "x$ac_cv_type_uintmax_t" = xyes | |
| 20014 | then : | |
| 20015 | ||
| 20016 | printf "%s\n" "#define HAVE_UINTMAX_T 1" >>confdefs.h | |
| 20017 | ||
| 20018 | else case e in #( | |
| 20019 | e) test $ac_cv_type_unsigned_long_long_int = yes \ | |
| 20020 | && ac_type='unsigned long long int' \ | |
| 20021 | || ac_type='unsigned long int' | |
| 20022 | ||
| 20023 | printf "%s\n" "#define uintmax_t $ac_type" >>confdefs.h | |
| 20024 | ;; | |
| 20025 | esac | |
| 20026 | fi | |
| 20027 | ||
| 20028 | ||
| 20029 | ||
| 20030 | # The cast to long int works around a bug in the HP C Compiler | |
| 20031 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects | |
| 20032 | # declarations like 'int a3[[(sizeof (unsigned char)) >= 0]];'. | |
| 20033 | # This bug is HP SR number 8606223364. | |
| 20034 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking size of intmax_t" >&5 | |
| 20035 | printf %s "checking size of intmax_t... " >&6; } | |
| 20036 | if test ${ac_cv_sizeof_intmax_t+y} | |
| 20037 | then : | |
| 20038 | printf %s "(cached) " >&6 | |
| 20039 | else case e in #( | |
| 20040 | e) if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (intmax_t))" "ac_cv_sizeof_intmax_t" "$ac_includes_default" | |
| 20041 | then : | |
| 20042 | ||
| 20043 | else case e in #( | |
| 20044 | e) if test "$ac_cv_type_intmax_t" = yes; then | |
| 20045 | { { printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: in '$ac_pwd':" >&5 | |
| 20046 | printf "%s\n" "$as_me: error: in '$ac_pwd':" >&2;} | |
| 20047 | as_fn_error 77 "cannot compute sizeof (intmax_t) | |
| 20048 | See 'config.log' for more details" "$LINENO" 5; } | |
| 20049 | else | |
| 20050 | ac_cv_sizeof_intmax_t=0 | |
| 20051 | fi ;; | |
| 20052 | esac | |
| 20053 | fi | |
| 20054 | ;; | |
| 20055 | esac | |
| 20056 | fi | |
| 20057 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_intmax_t" >&5 | |
| 20058 | printf "%s\n" "$ac_cv_sizeof_intmax_t" >&6; } | |
| 20059 | ||
| 20060 | ||
| 20061 | ||
| 20062 | printf "%s\n" "#define SIZEOF_INTMAX_T $ac_cv_sizeof_intmax_t" >>confdefs.h | |
| 20063 | ||
| 20064 | ||
| 20065 | ||
| 20066 | ||
| 20067 | ac_fn_c_check_member "$LINENO" "struct termios" "c_line" "ac_cv_member_struct_termios_c_line" " | |
| 20068 | #include <sys/types.h> | |
| 20069 | #include <termios.h> | |
| 20070 | ||
| 20071 | " | |
| 20072 | if test "x$ac_cv_member_struct_termios_c_line" = xyes | |
| 20073 | then : | |
| 20074 | printf "%s\n" "#define TERMIOS_LDISC 1" >>confdefs.h | |
| 20075 | ||
| 20076 | fi | |
| 20077 | ||
| 20078 | ||
| 20079 | ||
| 20080 | ac_fn_c_check_member "$LINENO" "struct termio" "c_line" "ac_cv_member_struct_termio_c_line" " | |
| 20081 | #include <sys/types.h> | |
| 20082 | #include <termio.h> | |
| 20083 | ||
| 20084 | " | |
| 20085 | if test "x$ac_cv_member_struct_termio_c_line" = xyes | |
| 20086 | then : | |
| 20087 | printf "%s\n" "#define TERMIO_LDISC 1" >>confdefs.h | |
| 20088 | ||
| 20089 | fi | |
| 20090 | ||
| 20091 | ||
| 20092 | ||
| 20093 | ||
| 20094 | ac_fn_c_check_member "$LINENO" "struct dirent" "d_ino" "ac_cv_member_struct_dirent_d_ino" " | |
| 20095 | #include <stdio.h> | |
| 20096 | #include <sys/types.h> | |
| 20097 | #ifdef HAVE_UNISTD_H | |
| 20098 | # include <unistd.h> | |
| 20099 | #endif /* HAVE_UNISTD_H */ | |
| 20100 | #if defined(HAVE_DIRENT_H) | |
| 20101 | # include <dirent.h> | |
| 20102 | #else | |
| 20103 | # define dirent direct | |
| 20104 | # ifdef HAVE_SYS_NDIR_H | |
| 20105 | # include <sys/ndir.h> | |
| 20106 | # endif /* SYSNDIR */ | |
| 20107 | # ifdef HAVE_SYS_DIR_H | |
| 20108 | # include <sys/dir.h> | |
| 20109 | # endif /* SYSDIR */ | |
| 20110 | # ifdef HAVE_NDIR_H | |
| 20111 | # include <ndir.h> | |
| 20112 | # endif | |
| 20113 | #endif /* HAVE_DIRENT_H */ | |
| 20114 | ||
| 20115 | " | |
| 20116 | if test "x$ac_cv_member_struct_dirent_d_ino" = xyes | |
| 20117 | then : | |
| 20118 | ||
| 20119 | printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_INO 1" >>confdefs.h | |
| 20120 | ||
| 20121 | ||
| 20122 | fi | |
| 20123 | ||
| 20124 | ||
| 20125 | ||
| 20126 | ||
| 20127 | ac_fn_c_check_member "$LINENO" "struct dirent" "d_fileno" "ac_cv_member_struct_dirent_d_fileno" " | |
| 20128 | #include <stdio.h> | |
| 20129 | #include <sys/types.h> | |
| 20130 | #ifdef HAVE_UNISTD_H | |
| 20131 | # include <unistd.h> | |
| 20132 | #endif /* HAVE_UNISTD_H */ | |
| 20133 | #if defined(HAVE_DIRENT_H) | |
| 20134 | # include <dirent.h> | |
| 20135 | #else | |
| 20136 | # define dirent direct | |
| 20137 | # ifdef HAVE_SYS_NDIR_H | |
| 20138 | # include <sys/ndir.h> | |
| 20139 | # endif /* SYSNDIR */ | |
| 20140 | # ifdef HAVE_SYS_DIR_H | |
| 20141 | # include <sys/dir.h> | |
| 20142 | # endif /* SYSDIR */ | |
| 20143 | # ifdef HAVE_NDIR_H | |
| 20144 | # include <ndir.h> | |
| 20145 | # endif | |
| 20146 | #endif /* HAVE_DIRENT_H */ | |
| 20147 | ||
| 20148 | " | |
| 20149 | if test "x$ac_cv_member_struct_dirent_d_fileno" = xyes | |
| 20150 | then : | |
| 20151 | ||
| 20152 | printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_FILENO 1" >>confdefs.h | |
| 20153 | ||
| 20154 | ||
| 20155 | fi | |
| 20156 | ||
| 20157 | ||
| 20158 | ||
| 20159 | ||
| 20160 | ac_fn_c_check_member "$LINENO" "struct dirent" "d_namlen" "ac_cv_member_struct_dirent_d_namlen" " | |
| 20161 | #include <stdio.h> | |
| 20162 | #include <sys/types.h> | |
| 20163 | #ifdef HAVE_UNISTD_H | |
| 20164 | # include <unistd.h> | |
| 20165 | #endif /* HAVE_UNISTD_H */ | |
| 20166 | #if defined(HAVE_DIRENT_H) | |
| 20167 | # include <dirent.h> | |
| 20168 | #else | |
| 20169 | # define dirent direct | |
| 20170 | # ifdef HAVE_SYS_NDIR_H | |
| 20171 | # include <sys/ndir.h> | |
| 20172 | # endif /* SYSNDIR */ | |
| 20173 | # ifdef HAVE_SYS_DIR_H | |
| 20174 | # include <sys/dir.h> | |
| 20175 | # endif /* SYSDIR */ | |
| 20176 | # ifdef HAVE_NDIR_H | |
| 20177 | # include <ndir.h> | |
| 20178 | # endif | |
| 20179 | #endif /* HAVE_DIRENT_H */ | |
| 20180 | ||
| 20181 | " | |
| 20182 | if test "x$ac_cv_member_struct_dirent_d_namlen" = xyes | |
| 20183 | then : | |
| 20184 | ||
| 20185 | printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_NAMLEN 1" >>confdefs.h | |
| 20186 | ||
| 20187 | ||
| 20188 | fi | |
| 20189 | ||
| 20190 | ||
| 20191 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for d_type member in directory struct" >&5 | |
| 20192 | printf %s "checking for d_type member in directory struct... " >&6; } | |
| 20193 | if test ${gl_cv_struct_dirent_d_type+y} | |
| 20194 | then : | |
| 20195 | printf %s "(cached) " >&6 | |
| 20196 | else case e in #( | |
| 20197 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 20198 | /* end confdefs.h. */ | |
| 20199 | ||
| 20200 | #include <sys/types.h> | |
| 20201 | #include <dirent.h> | |
| 20202 | ||
| 20203 | int | |
| 20204 | main (void) | |
| 20205 | { | |
| 20206 | struct dirent dp; dp.d_type = 0; | |
| 20207 | ; | |
| 20208 | return 0; | |
| 20209 | } | |
| 20210 | _ACEOF | |
| 20211 | if ac_fn_c_try_link "$LINENO" | |
| 20212 | then : | |
| 20213 | gl_cv_struct_dirent_d_type=yes | |
| 20214 | else case e in #( | |
| 20215 | e) gl_cv_struct_dirent_d_type=no ;; | |
| 20216 | esac | |
| 20217 | fi | |
| 20218 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 20219 | conftest$ac_exeext conftest.$ac_ext | |
| 20220 | ||
| 20221 | ;; | |
| 20222 | esac | |
| 20223 | fi | |
| 20224 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $gl_cv_struct_dirent_d_type" >&5 | |
| 20225 | printf "%s\n" "$gl_cv_struct_dirent_d_type" >&6; } | |
| 20226 | if test $gl_cv_struct_dirent_d_type = yes; then | |
| 20227 | ||
| 20228 | printf "%s\n" "#define HAVE_STRUCT_DIRENT_D_TYPE 1" >>confdefs.h | |
| 20229 | ||
| 20230 | fi | |
| 20231 | ||
| 20232 | ||
| 20233 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct winsize in sys/ioctl.h and termios.h" >&5 | |
| 20234 | printf %s "checking for struct winsize in sys/ioctl.h and termios.h... " >&6; } | |
| 20235 | if test ${bash_cv_struct_winsize_header+y} | |
| 20236 | then : | |
| 20237 | printf %s "(cached) " >&6 | |
| 20238 | else case e in #( | |
| 20239 | e) | |
| 20240 | if test ${bash_cv_struct_winsize_ioctl+y} | |
| 20241 | then : | |
| 20242 | printf %s "(cached) " >&6 | |
| 20243 | else case e in #( | |
| 20244 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 20245 | /* end confdefs.h. */ | |
| 20246 | ||
| 20247 | #include <sys/types.h> | |
| 20248 | #include <sys/ioctl.h> | |
| 20249 | ||
| 20250 | int | |
| 20251 | main (void) | |
| 20252 | { | |
| 20253 | ||
| 20254 | struct winsize x; | |
| 20255 | if (sizeof (x) > 0) return (0); | |
| 20256 | ||
| 20257 | ; | |
| 20258 | return 0; | |
| 20259 | } | |
| 20260 | _ACEOF | |
| 20261 | if ac_fn_c_try_compile "$LINENO" | |
| 20262 | then : | |
| 20263 | bash_cv_struct_winsize_ioctl=yes | |
| 20264 | else case e in #( | |
| 20265 | e) bash_cv_struct_winsize_ioctl=no ;; | |
| 20266 | esac | |
| 20267 | fi | |
| 20268 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 20269 | ;; | |
| 20270 | esac | |
| 20271 | fi | |
| 20272 | ||
| 20273 | ||
| 20274 | if test ${bash_cv_struct_winsize_termios+y} | |
| 20275 | then : | |
| 20276 | printf %s "(cached) " >&6 | |
| 20277 | else case e in #( | |
| 20278 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 20279 | /* end confdefs.h. */ | |
| 20280 | ||
| 20281 | #include <sys/types.h> | |
| 20282 | #include <sys/termios.h> | |
| 20283 | ||
| 20284 | int | |
| 20285 | main (void) | |
| 20286 | { | |
| 20287 | ||
| 20288 | struct winsize x; | |
| 20289 | if (sizeof (x) > 0) return (0); | |
| 20290 | ||
| 20291 | ; | |
| 20292 | return 0; | |
| 20293 | } | |
| 20294 | _ACEOF | |
| 20295 | if ac_fn_c_try_compile "$LINENO" | |
| 20296 | then : | |
| 20297 | bash_cv_struct_winsize_termios=yes | |
| 20298 | else case e in #( | |
| 20299 | e) bash_cv_struct_winsize_termios=no ;; | |
| 20300 | esac | |
| 20301 | fi | |
| 20302 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 20303 | ;; | |
| 20304 | esac | |
| 20305 | fi | |
| 20306 | ||
| 20307 | ||
| 20308 | ||
| 20309 | if test $bash_cv_struct_winsize_ioctl = yes; then | |
| 20310 | bash_cv_struct_winsize_header=ioctl_h | |
| 20311 | elif test $bash_cv_struct_winsize_termios = yes; then | |
| 20312 | bash_cv_struct_winsize_header=termios_h | |
| 20313 | else | |
| 20314 | bash_cv_struct_winsize_header=other | |
| 20315 | fi | |
| 20316 | ;; | |
| 20317 | esac | |
| 20318 | fi | |
| 20319 | ||
| 20320 | if test $bash_cv_struct_winsize_header = ioctl_h; then | |
| 20321 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: sys/ioctl.h" >&5 | |
| 20322 | printf "%s\n" "sys/ioctl.h" >&6; } | |
| 20323 | printf "%s\n" "#define STRUCT_WINSIZE_IN_SYS_IOCTL 1" >>confdefs.h | |
| 20324 | ||
| 20325 | elif test $bash_cv_struct_winsize_header = termios_h; then | |
| 20326 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: termios.h" >&5 | |
| 20327 | printf "%s\n" "termios.h" >&6; } | |
| 20328 | printf "%s\n" "#define STRUCT_WINSIZE_IN_TERMIOS 1" >>confdefs.h | |
| 20329 | ||
| 20330 | else | |
| 20331 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: not found" >&5 | |
| 20332 | printf "%s\n" "not found" >&6; } | |
| 20333 | fi | |
| 20334 | ||
| 20335 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timeval in sys/time.h and time.h" >&5 | |
| 20336 | printf %s "checking for struct timeval in sys/time.h and time.h... " >&6; } | |
| 20337 | if test ${bash_cv_struct_timeval+y} | |
| 20338 | then : | |
| 20339 | printf %s "(cached) " >&6 | |
| 20340 | else case e in #( | |
| 20341 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 20342 | /* end confdefs.h. */ | |
| 20343 | #if HAVE_SYS_TIME_H | |
| 20344 | #include <sys/time.h> | |
| 20345 | #endif | |
| 20346 | #include <time.h> | |
| 20347 | ||
| 20348 | int | |
| 20349 | main (void) | |
| 20350 | { | |
| 20351 | static struct timeval x; x.tv_sec = x.tv_usec; | |
| 20352 | ||
| 20353 | ; | |
| 20354 | return 0; | |
| 20355 | } | |
| 20356 | _ACEOF | |
| 20357 | if ac_fn_c_try_compile "$LINENO" | |
| 20358 | then : | |
| 20359 | bash_cv_struct_timeval=yes | |
| 20360 | else case e in #( | |
| 20361 | e) bash_cv_struct_timeval=no ;; | |
| 20362 | esac | |
| 20363 | fi | |
| 20364 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 20365 | ;; | |
| 20366 | esac | |
| 20367 | fi | |
| 20368 | ||
| 20369 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timeval" >&5 | |
| 20370 | printf "%s\n" "$bash_cv_struct_timeval" >&6; } | |
| 20371 | if test $bash_cv_struct_timeval = yes; then | |
| 20372 | printf "%s\n" "#define HAVE_TIMEVAL 1" >>confdefs.h | |
| 20373 | ||
| 20374 | fi | |
| 20375 | ||
| 20376 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" | |
| 20377 | if test "x$ac_cv_member_struct_stat_st_blocks" = xyes | |
| 20378 | then : | |
| 20379 | ||
| 20380 | printf "%s\n" "#define HAVE_STRUCT_STAT_ST_BLOCKS 1" >>confdefs.h | |
| 20381 | ||
| 20382 | ||
| 20383 | fi | |
| 20384 | ||
| 20385 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct tm is in sys/time.h or time.h" >&5 | |
| 20386 | printf %s "checking whether struct tm is in sys/time.h or time.h... " >&6; } | |
| 20387 | if test ${ac_cv_struct_tm+y} | |
| 20388 | then : | |
| 20389 | printf %s "(cached) " >&6 | |
| 20390 | else case e in #( | |
| 20391 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 20392 | /* end confdefs.h. */ | |
| 20393 | #include <sys/types.h> | |
| 20394 | #include <time.h> | |
| 20395 | ||
| 20396 | int | |
| 20397 | main (void) | |
| 20398 | { | |
| 20399 | struct tm tm; | |
| 20400 | int *p = &tm.tm_sec; | |
| 20401 | return !p; | |
| 20402 | ; | |
| 20403 | return 0; | |
| 20404 | } | |
| 20405 | _ACEOF | |
| 20406 | if ac_fn_c_try_compile "$LINENO" | |
| 20407 | then : | |
| 20408 | ac_cv_struct_tm=time.h | |
| 20409 | else case e in #( | |
| 20410 | e) ac_cv_struct_tm=sys/time.h ;; | |
| 20411 | esac | |
| 20412 | fi | |
| 20413 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 20414 | esac | |
| 20415 | fi | |
| 20416 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_struct_tm" >&5 | |
| 20417 | printf "%s\n" "$ac_cv_struct_tm" >&6; } | |
| 20418 | if test $ac_cv_struct_tm = sys/time.h; then | |
| 20419 | ||
| 20420 | printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h | |
| 20421 | ||
| 20422 | fi | |
| 20423 | ||
| 20424 | ac_fn_c_check_member "$LINENO" "struct tm" "tm_zone" "ac_cv_member_struct_tm_tm_zone" "#include <sys/types.h> | |
| 20425 | #include <$ac_cv_struct_tm> | |
| 20426 | ||
| 20427 | " | |
| 20428 | if test "x$ac_cv_member_struct_tm_tm_zone" = xyes | |
| 20429 | then : | |
| 20430 | ||
| 20431 | printf "%s\n" "#define HAVE_STRUCT_TM_TM_ZONE 1" >>confdefs.h | |
| 20432 | ||
| 20433 | ||
| 20434 | fi | |
| 20435 | ||
| 20436 | if test "$ac_cv_member_struct_tm_tm_zone" = yes; then | |
| 20437 | ||
| 20438 | printf "%s\n" "#define HAVE_TM_ZONE 1" >>confdefs.h | |
| 20439 | ||
| 20440 | else | |
| 20441 | ac_fn_check_decl "$LINENO" "tzname" "ac_cv_have_decl_tzname" "#include <time.h> | |
| 20442 | " "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 20443 | if test "x$ac_cv_have_decl_tzname" = xyes | |
| 20444 | then : | |
| 20445 | ac_have_decl=1 | |
| 20446 | else case e in #( | |
| 20447 | e) ac_have_decl=0 ;; | |
| 20448 | esac | |
| 20449 | fi | |
| 20450 | printf "%s\n" "#define HAVE_DECL_TZNAME $ac_have_decl" >>confdefs.h | |
| 20451 | ||
| 20452 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tzname" >&5 | |
| 20453 | printf %s "checking for tzname... " >&6; } | |
| 20454 | if test ${ac_cv_var_tzname+y} | |
| 20455 | then : | |
| 20456 | printf %s "(cached) " >&6 | |
| 20457 | else case e in #( | |
| 20458 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 20459 | /* end confdefs.h. */ | |
| 20460 | #include <time.h> | |
| 20461 | #if !HAVE_DECL_TZNAME | |
| 20462 | extern char *tzname[]; | |
| 20463 | #endif | |
| 20464 | ||
| 20465 | int | |
| 20466 | main (void) | |
| 20467 | { | |
| 20468 | return tzname[0][0]; | |
| 20469 | ; | |
| 20470 | return 0; | |
| 20471 | } | |
| 20472 | _ACEOF | |
| 20473 | if ac_fn_c_try_link "$LINENO" | |
| 20474 | then : | |
| 20475 | ac_cv_var_tzname=yes | |
| 20476 | else case e in #( | |
| 20477 | e) ac_cv_var_tzname=no ;; | |
| 20478 | esac | |
| 20479 | fi | |
| 20480 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 20481 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 20482 | esac | |
| 20483 | fi | |
| 20484 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_tzname" >&5 | |
| 20485 | printf "%s\n" "$ac_cv_var_tzname" >&6; } | |
| 20486 | if test $ac_cv_var_tzname = yes; then | |
| 20487 | ||
| 20488 | printf "%s\n" "#define HAVE_TZNAME 1" >>confdefs.h | |
| 20489 | ||
| 20490 | fi | |
| 20491 | fi | |
| 20492 | ||
| 20493 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timezone in sys/time.h and time.h" >&5 | |
| 20494 | printf %s "checking for struct timezone in sys/time.h and time.h... " >&6; } | |
| 20495 | if test ${bash_cv_struct_timezone+y} | |
| 20496 | then : | |
| 20497 | printf %s "(cached) " >&6 | |
| 20498 | else case e in #( | |
| 20499 | e) | |
| 20500 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 20501 | /* end confdefs.h. */ | |
| 20502 | #include <sys/time.h> | |
| 20503 | ||
| 20504 | _ACEOF | |
| 20505 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
| 20506 | $EGREP_TRADITIONAL "struct timezone" >/dev/null 2>&1 | |
| 20507 | then : | |
| 20508 | bash_cv_struct_timezone=yes | |
| 20509 | else case e in #( | |
| 20510 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 20511 | /* end confdefs.h. */ | |
| 20512 | #include <time.h> | |
| 20513 | ||
| 20514 | _ACEOF | |
| 20515 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
| 20516 | $EGREP_TRADITIONAL "struct timezone" >/dev/null 2>&1 | |
| 20517 | then : | |
| 20518 | bash_cv_struct_timezone=yes | |
| 20519 | else case e in #( | |
| 20520 | e) bash_cv_struct_timezone=no ;; | |
| 20521 | esac | |
| 20522 | fi | |
| 20523 | rm -rf conftest* | |
| 20524 | ;; | |
| 20525 | esac | |
| 20526 | fi | |
| 20527 | rm -rf conftest* | |
| 20528 | ||
| 20529 | ;; | |
| 20530 | esac | |
| 20531 | fi | |
| 20532 | ||
| 20533 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_struct_timezone" >&5 | |
| 20534 | printf "%s\n" "$bash_cv_struct_timezone" >&6; } | |
| 20535 | if test $bash_cv_struct_timezone = yes; then | |
| 20536 | printf "%s\n" "#define HAVE_STRUCT_TIMEZONE 1" >>confdefs.h | |
| 20537 | ||
| 20538 | fi | |
| 20539 | ||
| 20540 | ||
| 20541 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for offset of exit status in return status from wait" >&5 | |
| 20542 | printf %s "checking for offset of exit status in return status from wait... " >&6; } | |
| 20543 | if test ${bash_cv_wexitstatus_offset+y} | |
| 20544 | then : | |
| 20545 | printf %s "(cached) " >&6 | |
| 20546 | else case e in #( | |
| 20547 | e) if test "$cross_compiling" = yes | |
| 20548 | then : | |
| 20549 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&5 | |
| 20550 | printf "%s\n" "$as_me: WARNING: cannot check WEXITSTATUS offset if cross compiling -- defaulting to 0" >&2;} | |
| 20551 | bash_cv_wexitstatus_offset=0 | |
| 20552 | ||
| 20553 | else case e in #( | |
| 20554 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 20555 | /* end confdefs.h. */ | |
| 20556 | ||
| 20557 | #include <stdlib.h> | |
| 20558 | #include <unistd.h> | |
| 20559 | ||
| 20560 | #include <sys/wait.h> | |
| 20561 | ||
| 20562 | int | |
| 20563 | main(int c, char **v) | |
| 20564 | { | |
| 20565 | pid_t pid, p; | |
| 20566 | int s, i, n; | |
| 20567 | ||
| 20568 | s = 0; | |
| 20569 | pid = fork(); | |
| 20570 | if (pid == 0) | |
| 20571 | exit (42); | |
| 20572 | ||
| 20573 | /* wait for the process */ | |
| 20574 | p = wait(&s); | |
| 20575 | if (p != pid) | |
| 20576 | exit (255); | |
| 20577 | ||
| 20578 | /* crack s */ | |
| 20579 | for (i = 0; i < (sizeof(s) * 8); i++) | |
| 20580 | { | |
| 20581 | n = (s >> i) & 0xff; | |
| 20582 | if (n == 42) | |
| 20583 | exit (i); | |
| 20584 | } | |
| 20585 | ||
| 20586 | exit (254); | |
| 20587 | } | |
| 20588 | ||
| 20589 | _ACEOF | |
| 20590 | if ac_fn_c_try_run "$LINENO" | |
| 20591 | then : | |
| 20592 | bash_cv_wexitstatus_offset=0 | |
| 20593 | else case e in #( | |
| 20594 | e) bash_cv_wexitstatus_offset=$? ;; | |
| 20595 | esac | |
| 20596 | fi | |
| 20597 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 20598 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 20599 | esac | |
| 20600 | fi | |
| 20601 | ;; | |
| 20602 | esac | |
| 20603 | fi | |
| 20604 | ||
| 20605 | if test "$bash_cv_wexitstatus_offset" -gt 32 ; then | |
| 20606 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: bad exit status from test program -- defaulting to 0" >&5 | |
| 20607 | printf "%s\n" "$as_me: WARNING: bad exit status from test program -- defaulting to 0" >&2;} | |
| 20608 | bash_cv_wexitstatus_offset=0 | |
| 20609 | fi | |
| 20610 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wexitstatus_offset" >&5 | |
| 20611 | printf "%s\n" "$bash_cv_wexitstatus_offset" >&6; } | |
| 20612 | ||
| 20613 | printf "%s\n" "#define WEXITSTATUS_OFFSET $bash_cv_wexitstatus_offset" >>confdefs.h | |
| 20614 | ||
| 20615 | ||
| 20616 | ||
| 20617 | ||
| 20618 | ||
| 20619 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <time.h>" >&5 | |
| 20620 | printf %s "checking for struct timespec in <time.h>... " >&6; } | |
| 20621 | if test ${bash_cv_sys_struct_timespec_in_time_h+y} | |
| 20622 | then : | |
| 20623 | printf %s "(cached) " >&6 | |
| 20624 | else case e in #( | |
| 20625 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 20626 | /* end confdefs.h. */ | |
| 20627 | #include <time.h> | |
| 20628 | ||
| 20629 | int | |
| 20630 | main (void) | |
| 20631 | { | |
| 20632 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
| 20633 | ; | |
| 20634 | return 0; | |
| 20635 | } | |
| 20636 | _ACEOF | |
| 20637 | if ac_fn_c_try_compile "$LINENO" | |
| 20638 | then : | |
| 20639 | bash_cv_sys_struct_timespec_in_time_h=yes | |
| 20640 | else case e in #( | |
| 20641 | e) bash_cv_sys_struct_timespec_in_time_h=no ;; | |
| 20642 | esac | |
| 20643 | fi | |
| 20644 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 20645 | esac | |
| 20646 | fi | |
| 20647 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_time_h" >&5 | |
| 20648 | printf "%s\n" "$bash_cv_sys_struct_timespec_in_time_h" >&6; } | |
| 20649 | ||
| 20650 | HAVE_STRUCT_TIMESPEC=0 | |
| 20651 | TIME_H_DEFINES_STRUCT_TIMESPEC=0 | |
| 20652 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=0 | |
| 20653 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=0 | |
| 20654 | if test $bash_cv_sys_struct_timespec_in_time_h = yes; then | |
| 20655 | printf "%s\n" "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h | |
| 20656 | ||
| 20657 | printf "%s\n" "#define TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h | |
| 20658 | ||
| 20659 | TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
| 20660 | else | |
| 20661 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <sys/time.h>" >&5 | |
| 20662 | printf %s "checking for struct timespec in <sys/time.h>... " >&6; } | |
| 20663 | if test ${bash_cv_sys_struct_timespec_in_sys_time_h+y} | |
| 20664 | then : | |
| 20665 | printf %s "(cached) " >&6 | |
| 20666 | else case e in #( | |
| 20667 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 20668 | /* end confdefs.h. */ | |
| 20669 | #include <sys/time.h> | |
| 20670 | ||
| 20671 | int | |
| 20672 | main (void) | |
| 20673 | { | |
| 20674 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
| 20675 | ; | |
| 20676 | return 0; | |
| 20677 | } | |
| 20678 | _ACEOF | |
| 20679 | if ac_fn_c_try_compile "$LINENO" | |
| 20680 | then : | |
| 20681 | bash_cv_sys_struct_timespec_in_sys_time_h=yes | |
| 20682 | else case e in #( | |
| 20683 | e) bash_cv_sys_struct_timespec_in_sys_time_h=no ;; | |
| 20684 | esac | |
| 20685 | fi | |
| 20686 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 20687 | esac | |
| 20688 | fi | |
| 20689 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_sys_time_h" >&5 | |
| 20690 | printf "%s\n" "$bash_cv_sys_struct_timespec_in_sys_time_h" >&6; } | |
| 20691 | if test $bash_cv_sys_struct_timespec_in_sys_time_h = yes; then | |
| 20692 | SYS_TIME_H_DEFINES_STRUCT_TIMESPEC=1 | |
| 20693 | printf "%s\n" "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h | |
| 20694 | ||
| 20695 | printf "%s\n" "#define SYS_TIME_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h | |
| 20696 | ||
| 20697 | else | |
| 20698 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct timespec in <pthread.h>" >&5 | |
| 20699 | printf %s "checking for struct timespec in <pthread.h>... " >&6; } | |
| 20700 | if test ${bash_cv_sys_struct_timespec_in_pthread_h+y} | |
| 20701 | then : | |
| 20702 | printf %s "(cached) " >&6 | |
| 20703 | else case e in #( | |
| 20704 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 20705 | /* end confdefs.h. */ | |
| 20706 | #include <pthread.h> | |
| 20707 | ||
| 20708 | int | |
| 20709 | main (void) | |
| 20710 | { | |
| 20711 | static struct timespec x; x.tv_sec = x.tv_nsec; | |
| 20712 | ; | |
| 20713 | return 0; | |
| 20714 | } | |
| 20715 | _ACEOF | |
| 20716 | if ac_fn_c_try_compile "$LINENO" | |
| 20717 | then : | |
| 20718 | bash_cv_sys_struct_timespec_in_pthread_h=yes | |
| 20719 | else case e in #( | |
| 20720 | e) bash_cv_sys_struct_timespec_in_pthread_h=no ;; | |
| 20721 | esac | |
| 20722 | fi | |
| 20723 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 20724 | esac | |
| 20725 | fi | |
| 20726 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_struct_timespec_in_pthread_h" >&5 | |
| 20727 | printf "%s\n" "$bash_cv_sys_struct_timespec_in_pthread_h" >&6; } | |
| 20728 | if test $bash_cv_sys_struct_timespec_in_pthread_h = yes; then | |
| 20729 | PTHREAD_H_DEFINES_STRUCT_TIMESPEC=1 | |
| 20730 | printf "%s\n" "#define HAVE_STRUCT_TIMESPEC 1" >>confdefs.h | |
| 20731 | ||
| 20732 | printf "%s\n" "#define PTHREAD_H_DEFINES_STRUCT_TIMESPEC 1" >>confdefs.h | |
| 20733 | ||
| 20734 | fi | |
| 20735 | fi | |
| 20736 | fi | |
| 20737 | ||
| 20738 | ||
| 20739 | ||
| 20740 | ||
| 20741 | ||
| 20742 | ||
| 20743 | ||
| 20744 | ||
| 20745 | ||
| 20746 | ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.tv_nsec" "ac_cv_member_struct_stat_st_atim_tv_nsec" "#include <sys/types.h> | |
| 20747 | #include <sys/stat.h> | |
| 20748 | " | |
| 20749 | if test "x$ac_cv_member_struct_stat_st_atim_tv_nsec" = xyes | |
| 20750 | then : | |
| 20751 | ||
| 20752 | printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_TV_NSEC 1" >>confdefs.h | |
| 20753 | ||
| 20754 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether struct stat.st_atim is of type struct timespec" >&5 | |
| 20755 | printf %s "checking whether struct stat.st_atim is of type struct timespec... " >&6; } | |
| 20756 | if test ${ac_cv_typeof_struct_stat_st_atim_is_struct_timespec+y} | |
| 20757 | then : | |
| 20758 | printf %s "(cached) " >&6 | |
| 20759 | else case e in #( | |
| 20760 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 20761 | /* end confdefs.h. */ | |
| 20762 | ||
| 20763 | #include <sys/types.h> | |
| 20764 | #include <sys/stat.h> | |
| 20765 | #if HAVE_SYS_TIME_H | |
| 20766 | # include <sys/time.h> | |
| 20767 | #endif | |
| 20768 | #include <time.h> | |
| 20769 | struct timespec ts; | |
| 20770 | struct stat st; | |
| 20771 | ||
| 20772 | int | |
| 20773 | main (void) | |
| 20774 | { | |
| 20775 | ||
| 20776 | st.st_atim = ts; | |
| 20777 | ||
| 20778 | ; | |
| 20779 | return 0; | |
| 20780 | } | |
| 20781 | _ACEOF | |
| 20782 | if ac_fn_c_try_compile "$LINENO" | |
| 20783 | then : | |
| 20784 | ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=yes | |
| 20785 | else case e in #( | |
| 20786 | e) ac_cv_typeof_struct_stat_st_atim_is_struct_timespec=no ;; | |
| 20787 | esac | |
| 20788 | fi | |
| 20789 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 20790 | esac | |
| 20791 | fi | |
| 20792 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&5 | |
| 20793 | printf "%s\n" "$ac_cv_typeof_struct_stat_st_atim_is_struct_timespec" >&6; } | |
| 20794 | if test $ac_cv_typeof_struct_stat_st_atim_is_struct_timespec = yes; then | |
| 20795 | ||
| 20796 | printf "%s\n" "#define TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC 1" >>confdefs.h | |
| 20797 | ||
| 20798 | fi | |
| 20799 | else case e in #( | |
| 20800 | e) ac_fn_c_check_member "$LINENO" "struct stat" "st_atimespec.tv_nsec" "ac_cv_member_struct_stat_st_atimespec_tv_nsec" "#include <sys/types.h> | |
| 20801 | #include <sys/stat.h> | |
| 20802 | " | |
| 20803 | if test "x$ac_cv_member_struct_stat_st_atimespec_tv_nsec" = xyes | |
| 20804 | then : | |
| 20805 | ||
| 20806 | printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMESPEC_TV_NSEC 1" >>confdefs.h | |
| 20807 | ||
| 20808 | ||
| 20809 | else case e in #( | |
| 20810 | e) ac_fn_c_check_member "$LINENO" "struct stat" "st_atimensec" "ac_cv_member_struct_stat_st_atimensec" "#include <sys/types.h> | |
| 20811 | #include <sys/stat.h> | |
| 20812 | " | |
| 20813 | if test "x$ac_cv_member_struct_stat_st_atimensec" = xyes | |
| 20814 | then : | |
| 20815 | ||
| 20816 | printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIMENSEC 1" >>confdefs.h | |
| 20817 | ||
| 20818 | ||
| 20819 | else case e in #( | |
| 20820 | e) ac_fn_c_check_member "$LINENO" "struct stat" "st_atim.st__tim.tv_nsec" "ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" "#include <sys/types.h> | |
| 20821 | #include <sys/stat.h> | |
| 20822 | " | |
| 20823 | if test "x$ac_cv_member_struct_stat_st_atim_st__tim_tv_nsec" = xyes | |
| 20824 | then : | |
| 20825 | ||
| 20826 | printf "%s\n" "#define HAVE_STRUCT_STAT_ST_ATIM_ST__TIM_TV_NSEC 1" >>confdefs.h | |
| 20827 | ||
| 20828 | ||
| 20829 | fi | |
| 20830 | ;; | |
| 20831 | esac | |
| 20832 | fi | |
| 20833 | ;; | |
| 20834 | esac | |
| 20835 | fi | |
| 20836 | ;; | |
| 20837 | esac | |
| 20838 | fi | |
| 20839 | ||
| 20840 | ||
| 20841 | ||
| 20842 | ||
| 20843 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for sbrk" >&5 | |
| 20844 | printf %s "checking for sbrk... " >&6; } | |
| 20845 | if test ${ac_cv_func_sbrk+y} | |
| 20846 | then : | |
| 20847 | printf %s "(cached) " >&6 | |
| 20848 | else case e in #( | |
| 20849 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 20850 | /* end confdefs.h. */ | |
| 20851 | #include <unistd.h> | |
| 20852 | int | |
| 20853 | main (void) | |
| 20854 | { | |
| 20855 | void *x = sbrk (4096); | |
| 20856 | ; | |
| 20857 | return 0; | |
| 20858 | } | |
| 20859 | _ACEOF | |
| 20860 | if ac_fn_c_try_link "$LINENO" | |
| 20861 | then : | |
| 20862 | ac_cv_func_sbrk=yes | |
| 20863 | else case e in #( | |
| 20864 | e) ac_cv_func_sbrk=no ;; | |
| 20865 | esac | |
| 20866 | fi | |
| 20867 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 20868 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 20869 | esac | |
| 20870 | fi | |
| 20871 | ||
| 20872 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_sbrk" >&5 | |
| 20873 | printf "%s\n" "$ac_cv_func_sbrk" >&6; } | |
| 20874 | if test X$ac_cv_func_sbrk = Xyes; then | |
| 20875 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working sbrk" >&5 | |
| 20876 | printf %s "checking for working sbrk... " >&6; } | |
| 20877 | if test ${bash_cv_func_sbrk+y} | |
| 20878 | then : | |
| 20879 | printf %s "(cached) " >&6 | |
| 20880 | else case e in #( | |
| 20881 | e) if test "$cross_compiling" = yes | |
| 20882 | then : | |
| 20883 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check working sbrk if cross-compiling" >&5 | |
| 20884 | printf "%s\n" "$as_me: WARNING: cannot check working sbrk if cross-compiling" >&2;} | |
| 20885 | bash_cv_func_sbrk=yes | |
| 20886 | ||
| 20887 | else case e in #( | |
| 20888 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 20889 | /* end confdefs.h. */ | |
| 20890 | ||
| 20891 | #include <stdlib.h> | |
| 20892 | #include <unistd.h> | |
| 20893 | ||
| 20894 | int | |
| 20895 | main(int c, char **v) | |
| 20896 | { | |
| 20897 | void *x; | |
| 20898 | ||
| 20899 | x = sbrk (4096); | |
| 20900 | exit ((x == (void *)-1) ? 1 : 0); | |
| 20901 | } | |
| 20902 | ||
| 20903 | _ACEOF | |
| 20904 | if ac_fn_c_try_run "$LINENO" | |
| 20905 | then : | |
| 20906 | bash_cv_func_sbrk=yes | |
| 20907 | else case e in #( | |
| 20908 | e) bash_cv_func_sbrk=no ;; | |
| 20909 | esac | |
| 20910 | fi | |
| 20911 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 20912 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 20913 | esac | |
| 20914 | fi | |
| 20915 | ;; | |
| 20916 | esac | |
| 20917 | fi | |
| 20918 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_sbrk" >&5 | |
| 20919 | printf "%s\n" "$bash_cv_func_sbrk" >&6; } | |
| 20920 | if test $bash_cv_func_sbrk = no; then | |
| 20921 | ac_cv_func_sbrk=no | |
| 20922 | fi | |
| 20923 | fi | |
| 20924 | if test $ac_cv_func_sbrk = yes; then | |
| 20925 | ||
| 20926 | printf "%s\n" "#define HAVE_SBRK 1" >>confdefs.h | |
| 20927 | ||
| 20928 | fi | |
| 20929 | ||
| 20930 | ||
| 20931 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for brk" >&5 | |
| 20932 | printf %s "checking for brk... " >&6; } | |
| 20933 | if test ${ac_cv_func_brk+y} | |
| 20934 | then : | |
| 20935 | printf %s "(cached) " >&6 | |
| 20936 | else case e in #( | |
| 20937 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 20938 | /* end confdefs.h. */ | |
| 20939 | #include <unistd.h> | |
| 20940 | int | |
| 20941 | main (void) | |
| 20942 | { | |
| 20943 | void *x = brk (0); | |
| 20944 | ; | |
| 20945 | return 0; | |
| 20946 | } | |
| 20947 | _ACEOF | |
| 20948 | if ac_fn_c_try_link "$LINENO" | |
| 20949 | then : | |
| 20950 | ac_cv_func_brk=yes | |
| 20951 | else case e in #( | |
| 20952 | e) ac_cv_func_brk=no ;; | |
| 20953 | esac | |
| 20954 | fi | |
| 20955 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 20956 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 20957 | esac | |
| 20958 | fi | |
| 20959 | ||
| 20960 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_brk" >&5 | |
| 20961 | printf "%s\n" "$ac_cv_func_brk" >&6; } | |
| 20962 | if test X$ac_cv_func_brk = Xyes; then | |
| 20963 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for working brk" >&5 | |
| 20964 | printf %s "checking for working brk... " >&6; } | |
| 20965 | if test ${bash_cv_func_brk+y} | |
| 20966 | then : | |
| 20967 | printf %s "(cached) " >&6 | |
| 20968 | else case e in #( | |
| 20969 | e) if test "$cross_compiling" = yes | |
| 20970 | then : | |
| 20971 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check working brk if cross-compiling" >&5 | |
| 20972 | printf "%s\n" "$as_me: WARNING: cannot check working brk if cross-compiling" >&2;} | |
| 20973 | bash_cv_func_brk=yes | |
| 20974 | ||
| 20975 | else case e in #( | |
| 20976 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 20977 | /* end confdefs.h. */ | |
| 20978 | ||
| 20979 | #include <stdlib.h> | |
| 20980 | #include <unistd.h> | |
| 20981 | ||
| 20982 | int | |
| 20983 | main(int c, char **v) | |
| 20984 | { | |
| 20985 | void *x; | |
| 20986 | ||
| 20987 | x = brk (0); | |
| 20988 | exit ((x == (void *)-1) ? 1 : 0); | |
| 20989 | } | |
| 20990 | ||
| 20991 | _ACEOF | |
| 20992 | if ac_fn_c_try_run "$LINENO" | |
| 20993 | then : | |
| 20994 | bash_cv_func_brk=yes | |
| 20995 | else case e in #( | |
| 20996 | e) bash_cv_func_brk=no ;; | |
| 20997 | esac | |
| 20998 | fi | |
| 20999 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 21000 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 21001 | esac | |
| 21002 | fi | |
| 21003 | ;; | |
| 21004 | esac | |
| 21005 | fi | |
| 21006 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_brk" >&5 | |
| 21007 | printf "%s\n" "$bash_cv_func_brk" >&6; } | |
| 21008 | if test $bash_cv_func_brk = no; then | |
| 21009 | ac_cv_func_brk=no | |
| 21010 | fi | |
| 21011 | fi | |
| 21012 | if test $ac_cv_func_brk = yes; then | |
| 21013 | ||
| 21014 | printf "%s\n" "#define HAVE_BRK 1" >>confdefs.h | |
| 21015 | ||
| 21016 | fi | |
| 21017 | ||
| 21018 | ||
| 21019 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for the existence of strsignal" >&5 | |
| 21020 | printf %s "checking for the existence of strsignal... " >&6; } | |
| 21021 | if test ${bash_cv_have_strsignal+y} | |
| 21022 | then : | |
| 21023 | printf %s "(cached) " >&6 | |
| 21024 | else case e in #( | |
| 21025 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 21026 | /* end confdefs.h. */ | |
| 21027 | #include <sys/types.h> | |
| 21028 | #include <signal.h> | |
| 21029 | #include <string.h> | |
| 21030 | int | |
| 21031 | main (void) | |
| 21032 | { | |
| 21033 | char *s = (char *)strsignal(2); | |
| 21034 | ; | |
| 21035 | return 0; | |
| 21036 | } | |
| 21037 | _ACEOF | |
| 21038 | if ac_fn_c_try_link "$LINENO" | |
| 21039 | then : | |
| 21040 | bash_cv_have_strsignal=yes | |
| 21041 | else case e in #( | |
| 21042 | e) bash_cv_have_strsignal=no ;; | |
| 21043 | esac | |
| 21044 | fi | |
| 21045 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 21046 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 21047 | esac | |
| 21048 | fi | |
| 21049 | ||
| 21050 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_have_strsignal" >&5 | |
| 21051 | printf "%s\n" "$bash_cv_have_strsignal" >&6; } | |
| 21052 | if test $bash_cv_have_strsignal = yes; then | |
| 21053 | printf "%s\n" "#define HAVE_STRSIGNAL 1" >>confdefs.h | |
| 21054 | ||
| 21055 | fi | |
| 21056 | ||
| 21057 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if opendir() opens non-directories" >&5 | |
| 21058 | printf %s "checking if opendir() opens non-directories... " >&6; } | |
| 21059 | if test ${bash_cv_opendir_not_robust+y} | |
| 21060 | then : | |
| 21061 | printf %s "(cached) " >&6 | |
| 21062 | else case e in #( | |
| 21063 | e) if test "$cross_compiling" = yes | |
| 21064 | then : | |
| 21065 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&5 | |
| 21066 | printf "%s\n" "$as_me: WARNING: cannot check opendir if cross compiling -- defaulting to no" >&2;} | |
| 21067 | bash_cv_opendir_not_robust=no | |
| 21068 | ||
| 21069 | else case e in #( | |
| 21070 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 21071 | /* end confdefs.h. */ | |
| 21072 | ||
| 21073 | #include <stdio.h> | |
| 21074 | #include <sys/types.h> | |
| 21075 | #include <fcntl.h> | |
| 21076 | #ifdef HAVE_UNISTD_H | |
| 21077 | # include <unistd.h> | |
| 21078 | #endif /* HAVE_UNISTD_H */ | |
| 21079 | #ifdef HAVE_SYS_STAT_H | |
| 21080 | #include <sys/stat.h> | |
| 21081 | #endif | |
| 21082 | #if defined(HAVE_DIRENT_H) | |
| 21083 | # include <dirent.h> | |
| 21084 | #else | |
| 21085 | # define dirent direct | |
| 21086 | # ifdef HAVE_SYS_NDIR_H | |
| 21087 | # include <sys/ndir.h> | |
| 21088 | # endif /* SYSNDIR */ | |
| 21089 | # ifdef HAVE_SYS_DIR_H | |
| 21090 | # include <sys/dir.h> | |
| 21091 | # endif /* SYSDIR */ | |
| 21092 | # ifdef HAVE_NDIR_H | |
| 21093 | # include <ndir.h> | |
| 21094 | # endif | |
| 21095 | #endif /* HAVE_DIRENT_H */ | |
| 21096 | #include <stdlib.h> | |
| 21097 | int | |
| 21098 | main() | |
| 21099 | { | |
| 21100 | DIR *dir; | |
| 21101 | int fd, err; | |
| 21102 | err = mkdir("bash-aclocal", 0700); | |
| 21103 | if (err < 0) { | |
| 21104 | perror("mkdir"); | |
| 21105 | exit(1); | |
| 21106 | } | |
| 21107 | unlink("bash-aclocal/not_a_directory"); | |
| 21108 | fd = open("bash-aclocal/not_a_directory", O_WRONLY|O_CREAT|O_EXCL, 0666); | |
| 21109 | write(fd, "\n", 1); | |
| 21110 | close(fd); | |
| 21111 | dir = opendir("bash-aclocal/not_a_directory"); | |
| 21112 | unlink("bash-aclocal/not_a_directory"); | |
| 21113 | rmdir("bash-aclocal"); | |
| 21114 | exit (dir == 0); | |
| 21115 | } | |
| 21116 | ||
| 21117 | _ACEOF | |
| 21118 | if ac_fn_c_try_run "$LINENO" | |
| 21119 | then : | |
| 21120 | bash_cv_opendir_not_robust=yes | |
| 21121 | else case e in #( | |
| 21122 | e) bash_cv_opendir_not_robust=no ;; | |
| 21123 | esac | |
| 21124 | fi | |
| 21125 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 21126 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 21127 | esac | |
| 21128 | fi | |
| 21129 | ;; | |
| 21130 | esac | |
| 21131 | fi | |
| 21132 | ||
| 21133 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_opendir_not_robust" >&5 | |
| 21134 | printf "%s\n" "$bash_cv_opendir_not_robust" >&6; } | |
| 21135 | if test $bash_cv_opendir_not_robust = yes; then | |
| 21136 | printf "%s\n" "#define OPENDIR_NOT_ROBUST 1" >>confdefs.h | |
| 21137 | ||
| 21138 | fi | |
| 21139 | ||
| 21140 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether ulimit can substitute for getdtablesize" >&5 | |
| 21141 | printf %s "checking whether ulimit can substitute for getdtablesize... " >&6; } | |
| 21142 | if test ${bash_cv_ulimit_maxfds+y} | |
| 21143 | then : | |
| 21144 | printf %s "(cached) " >&6 | |
| 21145 | else case e in #( | |
| 21146 | e) if test "$cross_compiling" = yes | |
| 21147 | then : | |
| 21148 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&5 | |
| 21149 | printf "%s\n" "$as_me: WARNING: cannot check ulimit if cross compiling -- defaulting to no" >&2;} | |
| 21150 | bash_cv_ulimit_maxfds=no | |
| 21151 | ||
| 21152 | else case e in #( | |
| 21153 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 21154 | /* end confdefs.h. */ | |
| 21155 | ||
| 21156 | #include <stdlib.h> | |
| 21157 | #ifdef HAVE_ULIMIT_H | |
| 21158 | #include <ulimit.h> | |
| 21159 | #endif | |
| 21160 | int | |
| 21161 | main() | |
| 21162 | { | |
| 21163 | long maxfds = ulimit(4, 0L); | |
| 21164 | exit (maxfds == -1L); | |
| 21165 | } | |
| 21166 | ||
| 21167 | _ACEOF | |
| 21168 | if ac_fn_c_try_run "$LINENO" | |
| 21169 | then : | |
| 21170 | bash_cv_ulimit_maxfds=yes | |
| 21171 | else case e in #( | |
| 21172 | e) bash_cv_ulimit_maxfds=no ;; | |
| 21173 | esac | |
| 21174 | fi | |
| 21175 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 21176 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 21177 | esac | |
| 21178 | fi | |
| 21179 | ;; | |
| 21180 | esac | |
| 21181 | fi | |
| 21182 | ||
| 21183 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_ulimit_maxfds" >&5 | |
| 21184 | printf "%s\n" "$bash_cv_ulimit_maxfds" >&6; } | |
| 21185 | if test $bash_cv_ulimit_maxfds = yes; then | |
| 21186 | printf "%s\n" "#define ULIMIT_MAXFDS 1" >>confdefs.h | |
| 21187 | ||
| 21188 | fi | |
| 21189 | ||
| 21190 | ||
| 21191 | ||
| 21192 | ||
| 21193 | ||
| 21194 | ||
| 21195 | ac_fn_check_decl "$LINENO" "fpurge" "ac_cv_have_decl_fpurge" "#include <stdio.h> | |
| 21196 | " "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 21197 | if test "x$ac_cv_have_decl_fpurge" = xyes | |
| 21198 | then : | |
| 21199 | ac_have_decl=1 | |
| 21200 | else case e in #( | |
| 21201 | e) ac_have_decl=0 ;; | |
| 21202 | esac | |
| 21203 | fi | |
| 21204 | printf "%s\n" "#define HAVE_DECL_FPURGE $ac_have_decl" >>confdefs.h | |
| 21205 | ||
| 21206 | ||
| 21207 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking to see if getenv can be redefined" >&5 | |
| 21208 | printf %s "checking to see if getenv can be redefined... " >&6; } | |
| 21209 | if test ${bash_cv_getenv_redef+y} | |
| 21210 | then : | |
| 21211 | printf %s "(cached) " >&6 | |
| 21212 | else case e in #( | |
| 21213 | e) if test "$cross_compiling" = yes | |
| 21214 | then : | |
| 21215 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&5 | |
| 21216 | printf "%s\n" "$as_me: WARNING: cannot check getenv redefinition if cross compiling -- defaulting to yes" >&2;} | |
| 21217 | bash_cv_getenv_redef=yes | |
| 21218 | ||
| 21219 | else case e in #( | |
| 21220 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 21221 | /* end confdefs.h. */ | |
| 21222 | ||
| 21223 | #ifdef HAVE_UNISTD_H | |
| 21224 | # include <unistd.h> | |
| 21225 | #endif | |
| 21226 | #include <stdlib.h> | |
| 21227 | char * | |
| 21228 | getenv (const char *name) | |
| 21229 | { | |
| 21230 | return "42"; | |
| 21231 | } | |
| 21232 | int | |
| 21233 | main() | |
| 21234 | { | |
| 21235 | char *s; | |
| 21236 | /* The next allows this program to run, but does not allow bash to link | |
| 21237 | when it redefines getenv. I'm not really interested in figuring out | |
| 21238 | why not. */ | |
| 21239 | #if defined (NeXT) | |
| 21240 | exit(1); | |
| 21241 | #endif | |
| 21242 | s = getenv("ABCDE"); | |
| 21243 | exit(s == 0); /* force optimizer to leave getenv in */ | |
| 21244 | } | |
| 21245 | ||
| 21246 | _ACEOF | |
| 21247 | if ac_fn_c_try_run "$LINENO" | |
| 21248 | then : | |
| 21249 | bash_cv_getenv_redef=yes | |
| 21250 | else case e in #( | |
| 21251 | e) bash_cv_getenv_redef=no ;; | |
| 21252 | esac | |
| 21253 | fi | |
| 21254 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 21255 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 21256 | esac | |
| 21257 | fi | |
| 21258 | ;; | |
| 21259 | esac | |
| 21260 | fi | |
| 21261 | ||
| 21262 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getenv_redef" >&5 | |
| 21263 | printf "%s\n" "$bash_cv_getenv_redef" >&6; } | |
| 21264 | if test $bash_cv_getenv_redef = yes; then | |
| 21265 | printf "%s\n" "#define CAN_REDEFINE_GETENV 1" >>confdefs.h | |
| 21266 | ||
| 21267 | fi | |
| 21268 | ||
| 21269 | if test "$ac_cv_func_getcwd" = "yes"; then | |
| 21270 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if getcwd() will dynamically allocate memory with 0 size" >&5 | |
| 21271 | printf %s "checking if getcwd() will dynamically allocate memory with 0 size... " >&6; } | |
| 21272 | if test ${bash_cv_getcwd_malloc+y} | |
| 21273 | then : | |
| 21274 | printf %s "(cached) " >&6 | |
| 21275 | else case e in #( | |
| 21276 | e) if test "$cross_compiling" = yes | |
| 21277 | then : | |
| 21278 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&5 | |
| 21279 | printf "%s\n" "$as_me: WARNING: cannot check whether getcwd allocates memory when cross-compiling -- defaulting to no" >&2;} | |
| 21280 | bash_cv_getcwd_malloc=no | |
| 21281 | ||
| 21282 | else case e in #( | |
| 21283 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 21284 | /* end confdefs.h. */ | |
| 21285 | ||
| 21286 | #include <stdio.h> | |
| 21287 | #ifdef HAVE_UNISTD_H | |
| 21288 | #include <unistd.h> | |
| 21289 | #endif | |
| 21290 | #include <stdlib.h> | |
| 21291 | ||
| 21292 | int | |
| 21293 | main() | |
| 21294 | { | |
| 21295 | char *xpwd; | |
| 21296 | xpwd = getcwd(0, 0); | |
| 21297 | exit (xpwd == 0); | |
| 21298 | } | |
| 21299 | ||
| 21300 | _ACEOF | |
| 21301 | if ac_fn_c_try_run "$LINENO" | |
| 21302 | then : | |
| 21303 | bash_cv_getcwd_malloc=yes | |
| 21304 | else case e in #( | |
| 21305 | e) bash_cv_getcwd_malloc=no ;; | |
| 21306 | esac | |
| 21307 | fi | |
| 21308 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 21309 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 21310 | esac | |
| 21311 | fi | |
| 21312 | ;; | |
| 21313 | esac | |
| 21314 | fi | |
| 21315 | ||
| 21316 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getcwd_malloc" >&5 | |
| 21317 | printf "%s\n" "$bash_cv_getcwd_malloc" >&6; } | |
| 21318 | if test $bash_cv_getcwd_malloc = no; then | |
| 21319 | printf "%s\n" "#define GETCWD_BROKEN 1" >>confdefs.h | |
| 21320 | ||
| 21321 | case " $LIBOBJS " in | |
| 21322 | *" getcwd.$ac_objext "* ) ;; | |
| 21323 | *) LIBOBJS="$LIBOBJS getcwd.$ac_objext" | |
| 21324 | ;; | |
| 21325 | esac | |
| 21326 | ||
| 21327 | fi | |
| 21328 | ||
| 21329 | fi | |
| 21330 | printf "%s\n" "#define HAVE_GETCWD 1" >>confdefs.h | |
| 21331 | ||
| 21332 | ||
| 21333 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for presence of POSIX-style sigsetjmp/siglongjmp" >&5 | |
| 21334 | printf %s "checking for presence of POSIX-style sigsetjmp/siglongjmp... " >&6; } | |
| 21335 | if test ${bash_cv_func_sigsetjmp+y} | |
| 21336 | then : | |
| 21337 | printf %s "(cached) " >&6 | |
| 21338 | else case e in #( | |
| 21339 | e) if test "$cross_compiling" = yes | |
| 21340 | then : | |
| 21341 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to $bash_cv_posix_signals" >&5 | |
| 21342 | printf "%s\n" "$as_me: WARNING: cannot check for sigsetjmp/siglongjmp if cross-compiling -- defaulting to $bash_cv_posix_signals" >&2;} | |
| 21343 | if test "$bash_cv_posix_signals" = "yes" ; then | |
| 21344 | bash_cv_func_sigsetjmp=present | |
| 21345 | else | |
| 21346 | bash_cv_func_sigsetjmp=missing | |
| 21347 | fi | |
| 21348 | ||
| 21349 | else case e in #( | |
| 21350 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 21351 | /* end confdefs.h. */ | |
| 21352 | ||
| 21353 | #ifdef HAVE_UNISTD_H | |
| 21354 | #include <unistd.h> | |
| 21355 | #endif | |
| 21356 | #include <sys/types.h> | |
| 21357 | #include <signal.h> | |
| 21358 | #include <setjmp.h> | |
| 21359 | #include <stdlib.h> | |
| 21360 | ||
| 21361 | int | |
| 21362 | main() | |
| 21363 | { | |
| 21364 | #if !defined (_POSIX_VERSION) || !defined (HAVE_POSIX_SIGNALS) | |
| 21365 | exit (1); | |
| 21366 | #else | |
| 21367 | ||
| 21368 | int code; | |
| 21369 | sigset_t set, oset, nset; | |
| 21370 | sigjmp_buf xx; | |
| 21371 | ||
| 21372 | /* get the mask */ | |
| 21373 | sigemptyset(&set); | |
| 21374 | sigemptyset(&oset); | |
| 21375 | ||
| 21376 | sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &oset); | |
| 21377 | /* paranoia -- make sure SIGINT is not blocked */ | |
| 21378 | sigdelset (&oset, SIGINT); | |
| 21379 | sigprocmask (SIG_SETMASK, &oset, (sigset_t *)NULL); | |
| 21380 | ||
| 21381 | /* save it */ | |
| 21382 | code = sigsetjmp(xx, 1); | |
| 21383 | if (code) | |
| 21384 | { | |
| 21385 | sigprocmask(SIG_BLOCK, (sigset_t *)NULL, &nset); | |
| 21386 | /* could compare nset to oset here, but we just look for SIGINT */ | |
| 21387 | if (sigismember (&nset, SIGINT)) | |
| 21388 | exit(1); | |
| 21389 | exit(0); | |
| 21390 | } | |
| 21391 | ||
| 21392 | /* change it so that SIGINT is blocked */ | |
| 21393 | sigaddset(&set, SIGINT); | |
| 21394 | sigprocmask(SIG_BLOCK, &set, (sigset_t *)NULL); | |
| 21395 | ||
| 21396 | /* and siglongjmp */ | |
| 21397 | siglongjmp(xx, 10); | |
| 21398 | exit(1); | |
| 21399 | #endif | |
| 21400 | } | |
| 21401 | ||
| 21402 | _ACEOF | |
| 21403 | if ac_fn_c_try_run "$LINENO" | |
| 21404 | then : | |
| 21405 | bash_cv_func_sigsetjmp=present | |
| 21406 | else case e in #( | |
| 21407 | e) bash_cv_func_sigsetjmp=missing ;; | |
| 21408 | esac | |
| 21409 | fi | |
| 21410 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 21411 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 21412 | esac | |
| 21413 | fi | |
| 21414 | ;; | |
| 21415 | esac | |
| 21416 | fi | |
| 21417 | ||
| 21418 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_sigsetjmp" >&5 | |
| 21419 | printf "%s\n" "$bash_cv_func_sigsetjmp" >&6; } | |
| 21420 | if test $bash_cv_func_sigsetjmp = present; then | |
| 21421 | printf "%s\n" "#define HAVE_POSIX_SIGSETJMP 1" >>confdefs.h | |
| 21422 | ||
| 21423 | fi | |
| 21424 | ||
| 21425 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether or not strcoll and strcmp differ" >&5 | |
| 21426 | printf %s "checking whether or not strcoll and strcmp differ... " >&6; } | |
| 21427 | if test ${bash_cv_func_strcoll_broken+y} | |
| 21428 | then : | |
| 21429 | printf %s "(cached) " >&6 | |
| 21430 | else case e in #( | |
| 21431 | e) if test "$cross_compiling" = yes | |
| 21432 | then : | |
| 21433 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&5 | |
| 21434 | printf "%s\n" "$as_me: WARNING: cannot check strcoll if cross compiling -- defaulting to no" >&2;} | |
| 21435 | bash_cv_func_strcoll_broken=no | |
| 21436 | ||
| 21437 | else case e in #( | |
| 21438 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 21439 | /* end confdefs.h. */ | |
| 21440 | ||
| 21441 | #include <stdio.h> | |
| 21442 | #if defined (HAVE_LOCALE_H) | |
| 21443 | #include <locale.h> | |
| 21444 | #endif | |
| 21445 | #include <string.h> | |
| 21446 | #include <stdlib.h> | |
| 21447 | ||
| 21448 | int | |
| 21449 | main(int c, char **v) | |
| 21450 | { | |
| 21451 | int r1, r2; | |
| 21452 | char *deflocale, *defcoll; | |
| 21453 | ||
| 21454 | #ifdef HAVE_SETLOCALE | |
| 21455 | deflocale = setlocale(LC_ALL, ""); | |
| 21456 | defcoll = setlocale(LC_COLLATE, ""); | |
| 21457 | #endif | |
| 21458 | ||
| 21459 | #ifdef HAVE_STRCOLL | |
| 21460 | /* These two values are taken from tests/glob-test. */ | |
| 21461 | r1 = strcoll("abd", "aXd"); | |
| 21462 | #else | |
| 21463 | r1 = 0; | |
| 21464 | #endif | |
| 21465 | r2 = strcmp("abd", "aXd"); | |
| 21466 | ||
| 21467 | /* These two should both be greater than 0. It is permissible for | |
| 21468 | a system to return different values, as long as the sign is the | |
| 21469 | same. */ | |
| 21470 | ||
| 21471 | /* Exit with 1 (failure) if these two values are both > 0, since | |
| 21472 | this tests whether strcoll(3) is broken with respect to strcmp(3) | |
| 21473 | in the default locale. */ | |
| 21474 | exit (r1 > 0 && r2 > 0); | |
| 21475 | } | |
| 21476 | ||
| 21477 | _ACEOF | |
| 21478 | if ac_fn_c_try_run "$LINENO" | |
| 21479 | then : | |
| 21480 | bash_cv_func_strcoll_broken=yes | |
| 21481 | else case e in #( | |
| 21482 | e) bash_cv_func_strcoll_broken=no ;; | |
| 21483 | esac | |
| 21484 | fi | |
| 21485 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 21486 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 21487 | esac | |
| 21488 | fi | |
| 21489 | ;; | |
| 21490 | esac | |
| 21491 | fi | |
| 21492 | ||
| 21493 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_strcoll_broken" >&5 | |
| 21494 | printf "%s\n" "$bash_cv_func_strcoll_broken" >&6; } | |
| 21495 | if test $bash_cv_func_strcoll_broken = yes; then | |
| 21496 | printf "%s\n" "#define STRCOLL_BROKEN 1" >>confdefs.h | |
| 21497 | ||
| 21498 | fi | |
| 21499 | ||
| 21500 | ||
| 21501 | ||
| 21502 | ||
| 21503 | if test X$ac_cv_func_snprintf = Xyes; then | |
| 21504 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for standard-conformant snprintf" >&5 | |
| 21505 | printf %s "checking for standard-conformant snprintf... " >&6; } | |
| 21506 | if test ${bash_cv_func_snprintf+y} | |
| 21507 | then : | |
| 21508 | printf %s "(cached) " >&6 | |
| 21509 | else case e in #( | |
| 21510 | e) if test "$cross_compiling" = yes | |
| 21511 | then : | |
| 21512 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard snprintf if cross-compiling" >&5 | |
| 21513 | printf "%s\n" "$as_me: WARNING: cannot check standard snprintf if cross-compiling" >&2;} | |
| 21514 | bash_cv_func_snprintf=yes | |
| 21515 | ||
| 21516 | else case e in #( | |
| 21517 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 21518 | /* end confdefs.h. */ | |
| 21519 | ||
| 21520 | #include <stdio.h> | |
| 21521 | #include <stdlib.h> | |
| 21522 | ||
| 21523 | int | |
| 21524 | main() | |
| 21525 | { | |
| 21526 | int n; | |
| 21527 | n = snprintf (0, 0, "%s", "0123456"); | |
| 21528 | exit(n != 7); | |
| 21529 | } | |
| 21530 | ||
| 21531 | _ACEOF | |
| 21532 | if ac_fn_c_try_run "$LINENO" | |
| 21533 | then : | |
| 21534 | bash_cv_func_snprintf=yes | |
| 21535 | else case e in #( | |
| 21536 | e) bash_cv_func_snprintf=no ;; | |
| 21537 | esac | |
| 21538 | fi | |
| 21539 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 21540 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 21541 | esac | |
| 21542 | fi | |
| 21543 | ;; | |
| 21544 | esac | |
| 21545 | fi | |
| 21546 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_snprintf" >&5 | |
| 21547 | printf "%s\n" "$bash_cv_func_snprintf" >&6; } | |
| 21548 | if test $bash_cv_func_snprintf = no; then | |
| 21549 | ac_cv_func_snprintf=no | |
| 21550 | fi | |
| 21551 | fi | |
| 21552 | if test $ac_cv_func_snprintf = no; then | |
| 21553 | ||
| 21554 | printf "%s\n" "#define HAVE_SNPRINTF 0" >>confdefs.h | |
| 21555 | ||
| 21556 | fi | |
| 21557 | ||
| 21558 | ||
| 21559 | ||
| 21560 | ||
| 21561 | if test X$ac_cv_func_vsnprintf = Xyes; then | |
| 21562 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for standard-conformant vsnprintf" >&5 | |
| 21563 | printf %s "checking for standard-conformant vsnprintf... " >&6; } | |
| 21564 | if test ${bash_cv_func_vsnprintf+y} | |
| 21565 | then : | |
| 21566 | printf %s "(cached) " >&6 | |
| 21567 | else case e in #( | |
| 21568 | e) if test "$cross_compiling" = yes | |
| 21569 | then : | |
| 21570 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check standard vsnprintf if cross-compiling" >&5 | |
| 21571 | printf "%s\n" "$as_me: WARNING: cannot check standard vsnprintf if cross-compiling" >&2;} | |
| 21572 | bash_cv_func_vsnprintf=yes | |
| 21573 | ||
| 21574 | else case e in #( | |
| 21575 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 21576 | /* end confdefs.h. */ | |
| 21577 | ||
| 21578 | #include <stdarg.h> | |
| 21579 | #include <stdio.h> | |
| 21580 | #include <stdlib.h> | |
| 21581 | ||
| 21582 | static int | |
| 21583 | foo(const char *fmt, ...) | |
| 21584 | { | |
| 21585 | va_list args; | |
| 21586 | int n; | |
| 21587 | ||
| 21588 | va_start(args, fmt); | |
| 21589 | n = vsnprintf(0, 0, fmt, args); | |
| 21590 | va_end (args); | |
| 21591 | return n; | |
| 21592 | } | |
| 21593 | ||
| 21594 | int | |
| 21595 | main() | |
| 21596 | { | |
| 21597 | int n; | |
| 21598 | n = foo("%s", "0123456"); | |
| 21599 | exit(n != 7); | |
| 21600 | } | |
| 21601 | ||
| 21602 | _ACEOF | |
| 21603 | if ac_fn_c_try_run "$LINENO" | |
| 21604 | then : | |
| 21605 | bash_cv_func_vsnprintf=yes | |
| 21606 | else case e in #( | |
| 21607 | e) bash_cv_func_vsnprintf=no ;; | |
| 21608 | esac | |
| 21609 | fi | |
| 21610 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 21611 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 21612 | esac | |
| 21613 | fi | |
| 21614 | ;; | |
| 21615 | esac | |
| 21616 | fi | |
| 21617 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_func_vsnprintf" >&5 | |
| 21618 | printf "%s\n" "$bash_cv_func_vsnprintf" >&6; } | |
| 21619 | if test $bash_cv_func_vsnprintf = no; then | |
| 21620 | ac_cv_func_vsnprintf=no | |
| 21621 | fi | |
| 21622 | fi | |
| 21623 | if test $ac_cv_func_vsnprintf = no; then | |
| 21624 | ||
| 21625 | printf "%s\n" "#define HAVE_VSNPRINTF 0" >>confdefs.h | |
| 21626 | ||
| 21627 | fi | |
| 21628 | ||
| 21629 | ||
| 21630 | ||
| 21631 | ac_fn_c_check_func "$LINENO" "strtoimax" "ac_cv_func_strtoimax" | |
| 21632 | if test "x$ac_cv_func_strtoimax" = xyes | |
| 21633 | then : | |
| 21634 | printf "%s\n" "#define HAVE_STRTOIMAX 1" >>confdefs.h | |
| 21635 | ||
| 21636 | fi | |
| 21637 | ||
| 21638 | ac_fn_check_decl "$LINENO" "strtoimax" "ac_cv_have_decl_strtoimax" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 21639 | if test "x$ac_cv_have_decl_strtoimax" = xyes | |
| 21640 | then : | |
| 21641 | ac_have_decl=1 | |
| 21642 | else case e in #( | |
| 21643 | e) ac_have_decl=0 ;; | |
| 21644 | esac | |
| 21645 | fi | |
| 21646 | printf "%s\n" "#define HAVE_DECL_STRTOIMAX $ac_have_decl" >>confdefs.h | |
| 21647 | ||
| 21648 | ||
| 21649 | if test "$ac_cv_func_strtoimax" != "yes" ; then | |
| 21650 | case " $LIBOBJS " in | |
| 21651 | *" strtoimax.$ac_objext "* ) ;; | |
| 21652 | *) LIBOBJS="$LIBOBJS strtoimax.$ac_objext" | |
| 21653 | ;; | |
| 21654 | esac | |
| 21655 | ||
| 21656 | fi | |
| 21657 | ||
| 21658 | ac_fn_check_decl "$LINENO" "clearerr_unlocked" "ac_cv_have_decl_clearerr_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 21659 | if test "x$ac_cv_have_decl_clearerr_unlocked" = xyes | |
| 21660 | then : | |
| 21661 | ac_have_decl=1 | |
| 21662 | else case e in #( | |
| 21663 | e) ac_have_decl=0 ;; | |
| 21664 | esac | |
| 21665 | fi | |
| 21666 | printf "%s\n" "#define HAVE_DECL_CLEARERR_UNLOCKED $ac_have_decl" >>confdefs.h | |
| 21667 | ||
| 21668 | ac_fn_check_decl "$LINENO" "feof_unlocked" "ac_cv_have_decl_feof_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 21669 | if test "x$ac_cv_have_decl_feof_unlocked" = xyes | |
| 21670 | then : | |
| 21671 | ac_have_decl=1 | |
| 21672 | else case e in #( | |
| 21673 | e) ac_have_decl=0 ;; | |
| 21674 | esac | |
| 21675 | fi | |
| 21676 | printf "%s\n" "#define HAVE_DECL_FEOF_UNLOCKED $ac_have_decl" >>confdefs.h | |
| 21677 | ||
| 21678 | ac_fn_check_decl "$LINENO" "ferror_unlocked" "ac_cv_have_decl_ferror_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 21679 | if test "x$ac_cv_have_decl_ferror_unlocked" = xyes | |
| 21680 | then : | |
| 21681 | ac_have_decl=1 | |
| 21682 | else case e in #( | |
| 21683 | e) ac_have_decl=0 ;; | |
| 21684 | esac | |
| 21685 | fi | |
| 21686 | printf "%s\n" "#define HAVE_DECL_FERROR_UNLOCKED $ac_have_decl" >>confdefs.h | |
| 21687 | ||
| 21688 | ac_fn_check_decl "$LINENO" "fflush_unlocked" "ac_cv_have_decl_fflush_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 21689 | if test "x$ac_cv_have_decl_fflush_unlocked" = xyes | |
| 21690 | then : | |
| 21691 | ac_have_decl=1 | |
| 21692 | else case e in #( | |
| 21693 | e) ac_have_decl=0 ;; | |
| 21694 | esac | |
| 21695 | fi | |
| 21696 | printf "%s\n" "#define HAVE_DECL_FFLUSH_UNLOCKED $ac_have_decl" >>confdefs.h | |
| 21697 | ||
| 21698 | ac_fn_check_decl "$LINENO" "fgets_unlocked" "ac_cv_have_decl_fgets_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 21699 | if test "x$ac_cv_have_decl_fgets_unlocked" = xyes | |
| 21700 | then : | |
| 21701 | ac_have_decl=1 | |
| 21702 | else case e in #( | |
| 21703 | e) ac_have_decl=0 ;; | |
| 21704 | esac | |
| 21705 | fi | |
| 21706 | printf "%s\n" "#define HAVE_DECL_FGETS_UNLOCKED $ac_have_decl" >>confdefs.h | |
| 21707 | ||
| 21708 | ac_fn_check_decl "$LINENO" "fputc_unlocked" "ac_cv_have_decl_fputc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 21709 | if test "x$ac_cv_have_decl_fputc_unlocked" = xyes | |
| 21710 | then : | |
| 21711 | ac_have_decl=1 | |
| 21712 | else case e in #( | |
| 21713 | e) ac_have_decl=0 ;; | |
| 21714 | esac | |
| 21715 | fi | |
| 21716 | printf "%s\n" "#define HAVE_DECL_FPUTC_UNLOCKED $ac_have_decl" >>confdefs.h | |
| 21717 | ||
| 21718 | ac_fn_check_decl "$LINENO" "fputs_unlocked" "ac_cv_have_decl_fputs_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 21719 | if test "x$ac_cv_have_decl_fputs_unlocked" = xyes | |
| 21720 | then : | |
| 21721 | ac_have_decl=1 | |
| 21722 | else case e in #( | |
| 21723 | e) ac_have_decl=0 ;; | |
| 21724 | esac | |
| 21725 | fi | |
| 21726 | printf "%s\n" "#define HAVE_DECL_FPUTS_UNLOCKED $ac_have_decl" >>confdefs.h | |
| 21727 | ||
| 21728 | ac_fn_check_decl "$LINENO" "fread_unlocked" "ac_cv_have_decl_fread_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 21729 | if test "x$ac_cv_have_decl_fread_unlocked" = xyes | |
| 21730 | then : | |
| 21731 | ac_have_decl=1 | |
| 21732 | else case e in #( | |
| 21733 | e) ac_have_decl=0 ;; | |
| 21734 | esac | |
| 21735 | fi | |
| 21736 | printf "%s\n" "#define HAVE_DECL_FREAD_UNLOCKED $ac_have_decl" >>confdefs.h | |
| 21737 | ||
| 21738 | ac_fn_check_decl "$LINENO" "fwrite_unlocked" "ac_cv_have_decl_fwrite_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 21739 | if test "x$ac_cv_have_decl_fwrite_unlocked" = xyes | |
| 21740 | then : | |
| 21741 | ac_have_decl=1 | |
| 21742 | else case e in #( | |
| 21743 | e) ac_have_decl=0 ;; | |
| 21744 | esac | |
| 21745 | fi | |
| 21746 | printf "%s\n" "#define HAVE_DECL_FWRITE_UNLOCKED $ac_have_decl" >>confdefs.h | |
| 21747 | ||
| 21748 | ac_fn_check_decl "$LINENO" "getc_unlocked" "ac_cv_have_decl_getc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 21749 | if test "x$ac_cv_have_decl_getc_unlocked" = xyes | |
| 21750 | then : | |
| 21751 | ac_have_decl=1 | |
| 21752 | else case e in #( | |
| 21753 | e) ac_have_decl=0 ;; | |
| 21754 | esac | |
| 21755 | fi | |
| 21756 | printf "%s\n" "#define HAVE_DECL_GETC_UNLOCKED $ac_have_decl" >>confdefs.h | |
| 21757 | ||
| 21758 | ac_fn_check_decl "$LINENO" "getchar_unlocked" "ac_cv_have_decl_getchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 21759 | if test "x$ac_cv_have_decl_getchar_unlocked" = xyes | |
| 21760 | then : | |
| 21761 | ac_have_decl=1 | |
| 21762 | else case e in #( | |
| 21763 | e) ac_have_decl=0 ;; | |
| 21764 | esac | |
| 21765 | fi | |
| 21766 | printf "%s\n" "#define HAVE_DECL_GETCHAR_UNLOCKED $ac_have_decl" >>confdefs.h | |
| 21767 | ||
| 21768 | ac_fn_check_decl "$LINENO" "putc_unlocked" "ac_cv_have_decl_putc_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 21769 | if test "x$ac_cv_have_decl_putc_unlocked" = xyes | |
| 21770 | then : | |
| 21771 | ac_have_decl=1 | |
| 21772 | else case e in #( | |
| 21773 | e) ac_have_decl=0 ;; | |
| 21774 | esac | |
| 21775 | fi | |
| 21776 | printf "%s\n" "#define HAVE_DECL_PUTC_UNLOCKED $ac_have_decl" >>confdefs.h | |
| 21777 | ||
| 21778 | ac_fn_check_decl "$LINENO" "putchar_unlocked" "ac_cv_have_decl_putchar_unlocked" "$ac_includes_default" "$ac_c_undeclared_builtin_options" "CFLAGS" | |
| 21779 | if test "x$ac_cv_have_decl_putchar_unlocked" = xyes | |
| 21780 | then : | |
| 21781 | ac_have_decl=1 | |
| 21782 | else case e in #( | |
| 21783 | e) ac_have_decl=0 ;; | |
| 21784 | esac | |
| 21785 | fi | |
| 21786 | printf "%s\n" "#define HAVE_DECL_PUTCHAR_UNLOCKED $ac_have_decl" >>confdefs.h | |
| 21787 | ||
| 21788 | ||
| 21789 | ||
| 21790 | ||
| 21791 | ||
| 21792 | ||
| 21793 | ||
| 21794 | ||
| 21795 | ||
| 21796 | ||
| 21797 | ||
| 21798 | ||
| 21799 | ||
| 21800 | ||
| 21801 | ||
| 21802 | ||
| 21803 | ||
| 21804 | ||
| 21805 | ||
| 21806 | ||
| 21807 | if test "$ac_cv_func_putenv" = "yes"; then | |
| 21808 | ||
| 21809 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for standard-conformant putenv declaration" >&5 | |
| 21810 | printf %s "checking for standard-conformant putenv declaration... " >&6; } | |
| 21811 | if test ${bash_cv_std_putenv+y} | |
| 21812 | then : | |
| 21813 | printf %s "(cached) " >&6 | |
| 21814 | else case e in #( | |
| 21815 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 21816 | /* end confdefs.h. */ | |
| 21817 | ||
| 21818 | #if HAVE_STDLIB_H | |
| 21819 | #include <stdlib.h> | |
| 21820 | #endif | |
| 21821 | #if HAVE_STDDEF_H | |
| 21822 | #include <stddef.h> | |
| 21823 | #endif | |
| 21824 | extern int putenv (char *); | |
| 21825 | ||
| 21826 | int | |
| 21827 | main (void) | |
| 21828 | { | |
| 21829 | return (putenv == 0); | |
| 21830 | ; | |
| 21831 | return 0; | |
| 21832 | } | |
| 21833 | _ACEOF | |
| 21834 | if ac_fn_c_try_link "$LINENO" | |
| 21835 | then : | |
| 21836 | bash_cv_std_putenv=yes | |
| 21837 | else case e in #( | |
| 21838 | e) bash_cv_std_putenv=no | |
| 21839 | ;; | |
| 21840 | esac | |
| 21841 | fi | |
| 21842 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 21843 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 21844 | esac | |
| 21845 | fi | |
| 21846 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_putenv" >&5 | |
| 21847 | printf "%s\n" "$bash_cv_std_putenv" >&6; } | |
| 21848 | if test $bash_cv_std_putenv = yes; then | |
| 21849 | printf "%s\n" "#define HAVE_STD_PUTENV 1" >>confdefs.h | |
| 21850 | ||
| 21851 | fi | |
| 21852 | ||
| 21853 | else | |
| 21854 | printf "%s\n" "#define HAVE_STD_PUTENV 1" >>confdefs.h | |
| 21855 | ||
| 21856 | fi | |
| 21857 | if test "$ac_cv_func_unsetenv" = "yes"; then | |
| 21858 | ||
| 21859 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for standard-conformant unsetenv declaration" >&5 | |
| 21860 | printf %s "checking for standard-conformant unsetenv declaration... " >&6; } | |
| 21861 | if test ${bash_cv_std_unsetenv+y} | |
| 21862 | then : | |
| 21863 | printf %s "(cached) " >&6 | |
| 21864 | else case e in #( | |
| 21865 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 21866 | /* end confdefs.h. */ | |
| 21867 | ||
| 21868 | #if HAVE_STDLIB_H | |
| 21869 | #include <stdlib.h> | |
| 21870 | #endif | |
| 21871 | #if HAVE_STDDEF_H | |
| 21872 | #include <stddef.h> | |
| 21873 | #endif | |
| 21874 | extern int unsetenv (const char *); | |
| 21875 | ||
| 21876 | int | |
| 21877 | main (void) | |
| 21878 | { | |
| 21879 | return (unsetenv == 0); | |
| 21880 | ; | |
| 21881 | return 0; | |
| 21882 | } | |
| 21883 | _ACEOF | |
| 21884 | if ac_fn_c_try_link "$LINENO" | |
| 21885 | then : | |
| 21886 | bash_cv_std_unsetenv=yes | |
| 21887 | else case e in #( | |
| 21888 | e) bash_cv_std_unsetenv=no | |
| 21889 | ;; | |
| 21890 | esac | |
| 21891 | fi | |
| 21892 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 21893 | conftest$ac_exeext conftest.$ac_ext ;; | |
| 21894 | esac | |
| 21895 | fi | |
| 21896 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_std_unsetenv" >&5 | |
| 21897 | printf "%s\n" "$bash_cv_std_unsetenv" >&6; } | |
| 21898 | if test $bash_cv_std_unsetenv = yes; then | |
| 21899 | printf "%s\n" "#define HAVE_STD_UNSETENV 1" >>confdefs.h | |
| 21900 | ||
| 21901 | fi | |
| 21902 | ||
| 21903 | else | |
| 21904 | printf "%s\n" "#define HAVE_STD_UNSETENV 1" >>confdefs.h | |
| 21905 | ||
| 21906 | fi | |
| 21907 | ||
| 21908 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for printf floating point output in hex notation" >&5 | |
| 21909 | printf %s "checking for printf floating point output in hex notation... " >&6; } | |
| 21910 | if test ${bash_cv_printf_a_format+y} | |
| 21911 | then : | |
| 21912 | printf %s "(cached) " >&6 | |
| 21913 | else case e in #( | |
| 21914 | e) if test "$cross_compiling" = yes | |
| 21915 | then : | |
| 21916 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check printf if cross compiling -- defaulting to no" >&5 | |
| 21917 | printf "%s\n" "$as_me: WARNING: cannot check printf if cross compiling -- defaulting to no" >&2;} | |
| 21918 | bash_cv_printf_a_format=no | |
| 21919 | ||
| 21920 | else case e in #( | |
| 21921 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 21922 | /* end confdefs.h. */ | |
| 21923 | ||
| 21924 | #include <stdio.h> | |
| 21925 | #include <string.h> | |
| 21926 | #include <stdlib.h> | |
| 21927 | ||
| 21928 | int | |
| 21929 | main() | |
| 21930 | { | |
| 21931 | double y = 0.0; | |
| 21932 | char abuf[1024]; | |
| 21933 | ||
| 21934 | sprintf(abuf, "%A", y); | |
| 21935 | exit(strchr(abuf, 'P') == (char *)0); | |
| 21936 | } | |
| 21937 | ||
| 21938 | _ACEOF | |
| 21939 | if ac_fn_c_try_run "$LINENO" | |
| 21940 | then : | |
| 21941 | bash_cv_printf_a_format=yes | |
| 21942 | else case e in #( | |
| 21943 | e) bash_cv_printf_a_format=no ;; | |
| 21944 | esac | |
| 21945 | fi | |
| 21946 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 21947 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 21948 | esac | |
| 21949 | fi | |
| 21950 | ;; | |
| 21951 | esac | |
| 21952 | fi | |
| 21953 | ||
| 21954 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_printf_a_format" >&5 | |
| 21955 | printf "%s\n" "$bash_cv_printf_a_format" >&6; } | |
| 21956 | if test $bash_cv_printf_a_format = yes; then | |
| 21957 | printf "%s\n" "#define HAVE_PRINTF_A_FORMAT 1" >>confdefs.h | |
| 21958 | ||
| 21959 | fi | |
| 21960 | ||
| 21961 | ||
| 21962 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether fnmatch can be used to check bracket equivalence classes" >&5 | |
| 21963 | printf %s "checking whether fnmatch can be used to check bracket equivalence classes... " >&6; } | |
| 21964 | if test ${bash_cv_fnmatch_equiv_fallback+y} | |
| 21965 | then : | |
| 21966 | printf %s "(cached) " >&6 | |
| 21967 | else case e in #( | |
| 21968 | e) if test "$cross_compiling" = yes | |
| 21969 | then : | |
| 21970 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check fnmatch if cross compiling -- defaulting to no" >&5 | |
| 21971 | printf "%s\n" "$as_me: WARNING: cannot check fnmatch if cross compiling -- defaulting to no" >&2;} | |
| 21972 | bash_cv_fnmatch_equiv_fallback=no | |
| 21973 | ||
| 21974 | else case e in #( | |
| 21975 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 21976 | /* end confdefs.h. */ | |
| 21977 | ||
| 21978 | #include <stdlib.h> | |
| 21979 | #include <unistd.h> | |
| 21980 | #include <stdio.h> | |
| 21981 | #include <fnmatch.h> | |
| 21982 | #include <locale.h> | |
| 21983 | ||
| 21984 | char *pattern = "[[=a=]]"; | |
| 21985 | ||
| 21986 | /* char *string = "ä"; */ | |
| 21987 | unsigned char string[4] = { '\xc3', '\xa4', '\0' }; | |
| 21988 | ||
| 21989 | int | |
| 21990 | main (int c, char **v) | |
| 21991 | { | |
| 21992 | setlocale (LC_ALL, "en_US.UTF-8"); | |
| 21993 | if (fnmatch (pattern, (const char *)string, 0) != FNM_NOMATCH) | |
| 21994 | exit (0); | |
| 21995 | exit (1); | |
| 21996 | } | |
| 21997 | ||
| 21998 | _ACEOF | |
| 21999 | if ac_fn_c_try_run "$LINENO" | |
| 22000 | then : | |
| 22001 | bash_cv_fnmatch_equiv_fallback=yes | |
| 22002 | else case e in #( | |
| 22003 | e) bash_cv_fnmatch_equiv_fallback=no ;; | |
| 22004 | esac | |
| 22005 | fi | |
| 22006 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 22007 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 22008 | esac | |
| 22009 | fi | |
| 22010 | ;; | |
| 22011 | esac | |
| 22012 | fi | |
| 22013 | ||
| 22014 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_fnmatch_equiv_fallback" >&5 | |
| 22015 | printf "%s\n" "$bash_cv_fnmatch_equiv_fallback" >&6; } | |
| 22016 | if test "$bash_cv_fnmatch_equiv_fallback" = "yes" ; then | |
| 22017 | bash_cv_fnmatch_equiv_value=1 | |
| 22018 | else | |
| 22019 | bash_cv_fnmatch_equiv_value=0 | |
| 22020 | fi | |
| 22021 | ||
| 22022 | printf "%s\n" "#define FNMATCH_EQUIV_FALLBACK $bash_cv_fnmatch_equiv_value" >>confdefs.h | |
| 22023 | ||
| 22024 | ||
| 22025 | ||
| 22026 | ||
| 22027 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if signal handlers must be reinstalled when invoked" >&5 | |
| 22028 | printf %s "checking if signal handlers must be reinstalled when invoked... " >&6; } | |
| 22029 | if test ${bash_cv_must_reinstall_sighandlers+y} | |
| 22030 | then : | |
| 22031 | printf %s "(cached) " >&6 | |
| 22032 | else case e in #( | |
| 22033 | e) if test "$cross_compiling" = yes | |
| 22034 | then : | |
| 22035 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&5 | |
| 22036 | printf "%s\n" "$as_me: WARNING: cannot check signal handling if cross compiling -- defaulting to no" >&2;} | |
| 22037 | bash_cv_must_reinstall_sighandlers=no | |
| 22038 | ||
| 22039 | else case e in #( | |
| 22040 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 22041 | /* end confdefs.h. */ | |
| 22042 | ||
| 22043 | #include <signal.h> | |
| 22044 | #ifdef HAVE_UNISTD_H | |
| 22045 | #include <unistd.h> | |
| 22046 | #endif | |
| 22047 | #include <stdlib.h> | |
| 22048 | ||
| 22049 | typedef void sigfunc(int); | |
| 22050 | ||
| 22051 | volatile int nsigint; | |
| 22052 | ||
| 22053 | #ifdef HAVE_POSIX_SIGNALS | |
| 22054 | sigfunc * | |
| 22055 | set_signal_handler(int sig, sigfunc *handler) | |
| 22056 | { | |
| 22057 | struct sigaction act, oact; | |
| 22058 | act.sa_handler = handler; | |
| 22059 | act.sa_flags = 0; | |
| 22060 | sigemptyset (&act.sa_mask); | |
| 22061 | sigemptyset (&oact.sa_mask); | |
| 22062 | sigaction (sig, &act, &oact); | |
| 22063 | return (oact.sa_handler); | |
| 22064 | } | |
| 22065 | #else | |
| 22066 | #define set_signal_handler(s, h) signal(s, h) | |
| 22067 | #endif | |
| 22068 | ||
| 22069 | void | |
| 22070 | sigint(int s) | |
| 22071 | { | |
| 22072 | nsigint++; | |
| 22073 | } | |
| 22074 | ||
| 22075 | int | |
| 22076 | main() | |
| 22077 | { | |
| 22078 | nsigint = 0; | |
| 22079 | set_signal_handler(SIGINT, sigint); | |
| 22080 | kill((int)getpid(), SIGINT); | |
| 22081 | kill((int)getpid(), SIGINT); | |
| 22082 | exit(nsigint != 2); | |
| 22083 | } | |
| 22084 | ||
| 22085 | _ACEOF | |
| 22086 | if ac_fn_c_try_run "$LINENO" | |
| 22087 | then : | |
| 22088 | bash_cv_must_reinstall_sighandlers=no | |
| 22089 | else case e in #( | |
| 22090 | e) bash_cv_must_reinstall_sighandlers=yes ;; | |
| 22091 | esac | |
| 22092 | fi | |
| 22093 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 22094 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 22095 | esac | |
| 22096 | fi | |
| 22097 | ;; | |
| 22098 | esac | |
| 22099 | fi | |
| 22100 | ||
| 22101 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_must_reinstall_sighandlers" >&5 | |
| 22102 | printf "%s\n" "$bash_cv_must_reinstall_sighandlers" >&6; } | |
| 22103 | if test $bash_cv_must_reinstall_sighandlers = yes; then | |
| 22104 | printf "%s\n" "#define MUST_REINSTALL_SIGHANDLERS 1" >>confdefs.h | |
| 22105 | ||
| 22106 | fi | |
| 22107 | ||
| 22108 | ||
| 22109 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for presence of necessary job control definitions" >&5 | |
| 22110 | printf %s "checking for presence of necessary job control definitions... " >&6; } | |
| 22111 | if test ${bash_cv_job_control_missing+y} | |
| 22112 | then : | |
| 22113 | printf %s "(cached) " >&6 | |
| 22114 | else case e in #( | |
| 22115 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 22116 | /* end confdefs.h. */ | |
| 22117 | ||
| 22118 | #include <sys/types.h> | |
| 22119 | #ifdef HAVE_SYS_WAIT_H | |
| 22120 | #include <sys/wait.h> | |
| 22121 | #endif | |
| 22122 | #ifdef HAVE_UNISTD_H | |
| 22123 | #include <unistd.h> | |
| 22124 | #endif | |
| 22125 | #include <signal.h> | |
| 22126 | ||
| 22127 | /* add more tests in here as appropriate */ | |
| 22128 | ||
| 22129 | /* signal type */ | |
| 22130 | #if !defined (HAVE_POSIX_SIGNALS) && !defined (HAVE_BSD_SIGNALS) | |
| 22131 | #error | |
| 22132 | #endif | |
| 22133 | ||
| 22134 | /* signals and tty control. */ | |
| 22135 | #if !defined (SIGTSTP) || !defined (SIGSTOP) || !defined (SIGCONT) | |
| 22136 | #error | |
| 22137 | #endif | |
| 22138 | ||
| 22139 | /* process control */ | |
| 22140 | #if !defined (WNOHANG) || !defined (WUNTRACED) | |
| 22141 | #error | |
| 22142 | #endif | |
| 22143 | ||
| 22144 | /* Posix systems have tcgetpgrp and waitpid. */ | |
| 22145 | #if defined (_POSIX_VERSION) && !defined (HAVE_TCGETPGRP) | |
| 22146 | #error | |
| 22147 | #endif | |
| 22148 | ||
| 22149 | #if defined (_POSIX_VERSION) && !defined (HAVE_WAITPID) | |
| 22150 | #error | |
| 22151 | #endif | |
| 22152 | ||
| 22153 | /* Other systems have TIOCSPGRP/TIOCGPRGP and wait3. */ | |
| 22154 | #if !defined (_POSIX_VERSION) && !defined (HAVE_WAIT3) | |
| 22155 | #error | |
| 22156 | #endif | |
| 22157 | ||
| 22158 | ||
| 22159 | int | |
| 22160 | main (void) | |
| 22161 | { | |
| 22162 | int x; | |
| 22163 | ; | |
| 22164 | return 0; | |
| 22165 | } | |
| 22166 | _ACEOF | |
| 22167 | if ac_fn_c_try_compile "$LINENO" | |
| 22168 | then : | |
| 22169 | bash_cv_job_control_missing=present | |
| 22170 | else case e in #( | |
| 22171 | e) bash_cv_job_control_missing=missing | |
| 22172 | ;; | |
| 22173 | esac | |
| 22174 | fi | |
| 22175 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 22176 | esac | |
| 22177 | fi | |
| 22178 | ||
| 22179 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_job_control_missing" >&5 | |
| 22180 | printf "%s\n" "$bash_cv_job_control_missing" >&6; } | |
| 22181 | if test $bash_cv_job_control_missing = missing; then | |
| 22182 | printf "%s\n" "#define JOB_CONTROL_MISSING 1" >>confdefs.h | |
| 22183 | ||
| 22184 | fi | |
| 22185 | ||
| 22186 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for presence of named pipes" >&5 | |
| 22187 | printf %s "checking for presence of named pipes... " >&6; } | |
| 22188 | if test ${bash_cv_sys_named_pipes+y} | |
| 22189 | then : | |
| 22190 | printf %s "(cached) " >&6 | |
| 22191 | else case e in #( | |
| 22192 | e) if test "$cross_compiling" = yes | |
| 22193 | then : | |
| 22194 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&5 | |
| 22195 | printf "%s\n" "$as_me: WARNING: cannot check for named pipes if cross-compiling -- defaulting to missing" >&2;} | |
| 22196 | bash_cv_sys_named_pipes=missing | |
| 22197 | ||
| 22198 | else case e in #( | |
| 22199 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 22200 | /* end confdefs.h. */ | |
| 22201 | ||
| 22202 | #include <sys/types.h> | |
| 22203 | #include <sys/stat.h> | |
| 22204 | #ifdef HAVE_UNISTD_H | |
| 22205 | #include <unistd.h> | |
| 22206 | #endif | |
| 22207 | #include <stdio.h> | |
| 22208 | #include <stdlib.h> | |
| 22209 | ||
| 22210 | /* Add more tests in here as appropriate. */ | |
| 22211 | int | |
| 22212 | main() | |
| 22213 | { | |
| 22214 | int fd, err; | |
| 22215 | ||
| 22216 | #if defined (HAVE_MKFIFO) | |
| 22217 | exit (0); | |
| 22218 | #endif | |
| 22219 | ||
| 22220 | #if !defined (S_IFIFO) && (defined (_POSIX_VERSION) && !defined (S_ISFIFO)) | |
| 22221 | exit (1); | |
| 22222 | #endif | |
| 22223 | ||
| 22224 | #if defined (NeXT) | |
| 22225 | exit (1); | |
| 22226 | #endif | |
| 22227 | err = mkdir("bash-aclocal", 0700); | |
| 22228 | if (err < 0) { | |
| 22229 | perror ("mkdir"); | |
| 22230 | exit(1); | |
| 22231 | } | |
| 22232 | fd = mknod ("bash-aclocal/sh-np-autoconf", 0666 | S_IFIFO, 0); | |
| 22233 | if (fd == -1) { | |
| 22234 | rmdir ("bash-aclocal"); | |
| 22235 | exit (1); | |
| 22236 | } | |
| 22237 | close(fd); | |
| 22238 | unlink ("bash-aclocal/sh-np-autoconf"); | |
| 22239 | rmdir ("bash-aclocal"); | |
| 22240 | exit(0); | |
| 22241 | } | |
| 22242 | ||
| 22243 | _ACEOF | |
| 22244 | if ac_fn_c_try_run "$LINENO" | |
| 22245 | then : | |
| 22246 | bash_cv_sys_named_pipes=present | |
| 22247 | else case e in #( | |
| 22248 | e) bash_cv_sys_named_pipes=missing ;; | |
| 22249 | esac | |
| 22250 | fi | |
| 22251 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 22252 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 22253 | esac | |
| 22254 | fi | |
| 22255 | ;; | |
| 22256 | esac | |
| 22257 | fi | |
| 22258 | ||
| 22259 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_sys_named_pipes" >&5 | |
| 22260 | printf "%s\n" "$bash_cv_sys_named_pipes" >&6; } | |
| 22261 | if test $bash_cv_sys_named_pipes = missing; then | |
| 22262 | printf "%s\n" "#define NAMED_PIPES_MISSING 1" >>confdefs.h | |
| 22263 | ||
| 22264 | fi | |
| 22265 | ||
| 22266 | ||
| 22267 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether termios.h defines TIOCGWINSZ" >&5 | |
| 22268 | printf %s "checking whether termios.h defines TIOCGWINSZ... " >&6; } | |
| 22269 | if test ${ac_cv_sys_tiocgwinsz_in_termios_h+y} | |
| 22270 | then : | |
| 22271 | printf %s "(cached) " >&6 | |
| 22272 | else case e in #( | |
| 22273 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 22274 | /* end confdefs.h. */ | |
| 22275 | $ac_includes_default | |
| 22276 | #include <termios.h> | |
| 22277 | const int tiocgwinsz = TIOCGWINSZ; | |
| 22278 | ||
| 22279 | _ACEOF | |
| 22280 | if ac_fn_c_try_compile "$LINENO" | |
| 22281 | then : | |
| 22282 | ac_cv_sys_tiocgwinsz_in_termios_h=yes | |
| 22283 | else case e in #( | |
| 22284 | e) ac_cv_sys_tiocgwinsz_in_termios_h=no ;; | |
| 22285 | esac | |
| 22286 | fi | |
| 22287 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 22288 | esac | |
| 22289 | fi | |
| 22290 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_termios_h" >&5 | |
| 22291 | printf "%s\n" "$ac_cv_sys_tiocgwinsz_in_termios_h" >&6; } | |
| 22292 | ||
| 22293 | if test $ac_cv_sys_tiocgwinsz_in_termios_h != yes; then | |
| 22294 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether sys/ioctl.h defines TIOCGWINSZ" >&5 | |
| 22295 | printf %s "checking whether sys/ioctl.h defines TIOCGWINSZ... " >&6; } | |
| 22296 | if test ${ac_cv_sys_tiocgwinsz_in_sys_ioctl_h+y} | |
| 22297 | then : | |
| 22298 | printf %s "(cached) " >&6 | |
| 22299 | else case e in #( | |
| 22300 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 22301 | /* end confdefs.h. */ | |
| 22302 | $ac_includes_default | |
| 22303 | #include <sys/ioctl.h> | |
| 22304 | const int tiocgwinsz = TIOCGWINSZ; | |
| 22305 | ||
| 22306 | _ACEOF | |
| 22307 | if ac_fn_c_try_compile "$LINENO" | |
| 22308 | then : | |
| 22309 | ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=yes | |
| 22310 | else case e in #( | |
| 22311 | e) ac_cv_sys_tiocgwinsz_in_sys_ioctl_h=no ;; | |
| 22312 | esac | |
| 22313 | fi | |
| 22314 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 22315 | esac | |
| 22316 | fi | |
| 22317 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&5 | |
| 22318 | printf "%s\n" "$ac_cv_sys_tiocgwinsz_in_sys_ioctl_h" >&6; } | |
| 22319 | ||
| 22320 | if test $ac_cv_sys_tiocgwinsz_in_sys_ioctl_h = yes; then | |
| 22321 | ||
| 22322 | printf "%s\n" "#define GWINSZ_IN_SYS_IOCTL 1" >>confdefs.h | |
| 22323 | ||
| 22324 | fi | |
| 22325 | fi | |
| 22326 | ||
| 22327 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for TIOCSTAT in sys/ioctl.h" >&5 | |
| 22328 | printf %s "checking for TIOCSTAT in sys/ioctl.h... " >&6; } | |
| 22329 | if test ${bash_cv_tiocstat_in_ioctl+y} | |
| 22330 | then : | |
| 22331 | printf %s "(cached) " >&6 | |
| 22332 | else case e in #( | |
| 22333 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 22334 | /* end confdefs.h. */ | |
| 22335 | ||
| 22336 | #include <sys/types.h> | |
| 22337 | #include <sys/ioctl.h> | |
| 22338 | int | |
| 22339 | main (void) | |
| 22340 | { | |
| 22341 | int x = TIOCSTAT; | |
| 22342 | ; | |
| 22343 | return 0; | |
| 22344 | } | |
| 22345 | _ACEOF | |
| 22346 | if ac_fn_c_try_compile "$LINENO" | |
| 22347 | then : | |
| 22348 | bash_cv_tiocstat_in_ioctl=yes | |
| 22349 | else case e in #( | |
| 22350 | e) bash_cv_tiocstat_in_ioctl=no | |
| 22351 | ;; | |
| 22352 | esac | |
| 22353 | fi | |
| 22354 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 22355 | esac | |
| 22356 | fi | |
| 22357 | ||
| 22358 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_tiocstat_in_ioctl" >&5 | |
| 22359 | printf "%s\n" "$bash_cv_tiocstat_in_ioctl" >&6; } | |
| 22360 | if test $bash_cv_tiocstat_in_ioctl = yes; then | |
| 22361 | printf "%s\n" "#define TIOCSTAT_IN_SYS_IOCTL 1" >>confdefs.h | |
| 22362 | ||
| 22363 | fi | |
| 22364 | ||
| 22365 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for FIONREAD in sys/ioctl.h" >&5 | |
| 22366 | printf %s "checking for FIONREAD in sys/ioctl.h... " >&6; } | |
| 22367 | if test ${bash_cv_fionread_in_ioctl+y} | |
| 22368 | then : | |
| 22369 | printf %s "(cached) " >&6 | |
| 22370 | else case e in #( | |
| 22371 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 22372 | /* end confdefs.h. */ | |
| 22373 | ||
| 22374 | #include <sys/types.h> | |
| 22375 | #include <sys/ioctl.h> | |
| 22376 | int | |
| 22377 | main (void) | |
| 22378 | { | |
| 22379 | int x = FIONREAD; | |
| 22380 | ; | |
| 22381 | return 0; | |
| 22382 | } | |
| 22383 | _ACEOF | |
| 22384 | if ac_fn_c_try_compile "$LINENO" | |
| 22385 | then : | |
| 22386 | bash_cv_fionread_in_ioctl=yes | |
| 22387 | else case e in #( | |
| 22388 | e) bash_cv_fionread_in_ioctl=no | |
| 22389 | ;; | |
| 22390 | esac | |
| 22391 | fi | |
| 22392 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 22393 | esac | |
| 22394 | fi | |
| 22395 | ||
| 22396 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_fionread_in_ioctl" >&5 | |
| 22397 | printf "%s\n" "$bash_cv_fionread_in_ioctl" >&6; } | |
| 22398 | if test $bash_cv_fionread_in_ioctl = yes; then | |
| 22399 | printf "%s\n" "#define FIONREAD_IN_SYS_IOCTL 1" >>confdefs.h | |
| 22400 | ||
| 22401 | fi | |
| 22402 | ||
| 22403 | ||
| 22404 | ||
| 22405 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether WCONTINUED flag to waitpid is unavailable or available but broken" >&5 | |
| 22406 | printf %s "checking whether WCONTINUED flag to waitpid is unavailable or available but broken... " >&6; } | |
| 22407 | if test ${bash_cv_wcontinued_broken+y} | |
| 22408 | then : | |
| 22409 | printf %s "(cached) " >&6 | |
| 22410 | else case e in #( | |
| 22411 | e) if test "$cross_compiling" = yes | |
| 22412 | then : | |
| 22413 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&5 | |
| 22414 | printf "%s\n" "$as_me: WARNING: cannot check WCONTINUED if cross compiling -- defaulting to no" >&2;} | |
| 22415 | bash_cv_wcontinued_broken=no | |
| 22416 | ||
| 22417 | else case e in #( | |
| 22418 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 22419 | /* end confdefs.h. */ | |
| 22420 | ||
| 22421 | #include <sys/types.h> | |
| 22422 | #include <sys/wait.h> | |
| 22423 | #include <unistd.h> | |
| 22424 | #include <errno.h> | |
| 22425 | #include <stdlib.h> | |
| 22426 | ||
| 22427 | #ifndef errno | |
| 22428 | extern int errno; | |
| 22429 | #endif | |
| 22430 | int | |
| 22431 | main() | |
| 22432 | { | |
| 22433 | int x; | |
| 22434 | ||
| 22435 | x = waitpid(-1, (int *)0, WNOHANG|WCONTINUED); | |
| 22436 | if (x == -1 && errno == EINVAL) | |
| 22437 | exit (1); | |
| 22438 | else | |
| 22439 | exit (0); | |
| 22440 | } | |
| 22441 | ||
| 22442 | _ACEOF | |
| 22443 | if ac_fn_c_try_run "$LINENO" | |
| 22444 | then : | |
| 22445 | bash_cv_wcontinued_broken=no | |
| 22446 | else case e in #( | |
| 22447 | e) bash_cv_wcontinued_broken=yes ;; | |
| 22448 | esac | |
| 22449 | fi | |
| 22450 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 22451 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 22452 | esac | |
| 22453 | fi | |
| 22454 | ;; | |
| 22455 | esac | |
| 22456 | fi | |
| 22457 | ||
| 22458 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_wcontinued_broken" >&5 | |
| 22459 | printf "%s\n" "$bash_cv_wcontinued_broken" >&6; } | |
| 22460 | if test $bash_cv_wcontinued_broken = yes; then | |
| 22461 | printf "%s\n" "#define WCONTINUED_BROKEN 1" >>confdefs.h | |
| 22462 | ||
| 22463 | fi | |
| 22464 | ||
| 22465 | ||
| 22466 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for speed_t in sys/types.h" >&5 | |
| 22467 | printf %s "checking for speed_t in sys/types.h... " >&6; } | |
| 22468 | if test ${bash_cv_speed_t_in_sys_types+y} | |
| 22469 | then : | |
| 22470 | printf %s "(cached) " >&6 | |
| 22471 | else case e in #( | |
| 22472 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 22473 | /* end confdefs.h. */ | |
| 22474 | #include <sys/types.h> | |
| 22475 | int | |
| 22476 | main (void) | |
| 22477 | { | |
| 22478 | speed_t x; | |
| 22479 | ; | |
| 22480 | return 0; | |
| 22481 | } | |
| 22482 | _ACEOF | |
| 22483 | if ac_fn_c_try_compile "$LINENO" | |
| 22484 | then : | |
| 22485 | bash_cv_speed_t_in_sys_types=yes | |
| 22486 | else case e in #( | |
| 22487 | e) bash_cv_speed_t_in_sys_types=no ;; | |
| 22488 | esac | |
| 22489 | fi | |
| 22490 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 22491 | esac | |
| 22492 | fi | |
| 22493 | ||
| 22494 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_speed_t_in_sys_types" >&5 | |
| 22495 | printf "%s\n" "$bash_cv_speed_t_in_sys_types" >&6; } | |
| 22496 | if test $bash_cv_speed_t_in_sys_types = yes; then | |
| 22497 | printf "%s\n" "#define SPEED_T_IN_SYS_TYPES 1" >>confdefs.h | |
| 22498 | ||
| 22499 | fi | |
| 22500 | ||
| 22501 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether getpw functions are declared in pwd.h" >&5 | |
| 22502 | printf %s "checking whether getpw functions are declared in pwd.h... " >&6; } | |
| 22503 | if test ${bash_cv_getpw_declared+y} | |
| 22504 | then : | |
| 22505 | printf %s "(cached) " >&6 | |
| 22506 | else case e in #( | |
| 22507 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 22508 | /* end confdefs.h. */ | |
| 22509 | ||
| 22510 | #include <sys/types.h> | |
| 22511 | #ifdef HAVE_UNISTD_H | |
| 22512 | # include <unistd.h> | |
| 22513 | #endif | |
| 22514 | #include <pwd.h> | |
| 22515 | ||
| 22516 | _ACEOF | |
| 22517 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | | |
| 22518 | $EGREP_TRADITIONAL "getpwuid" >/dev/null 2>&1 | |
| 22519 | then : | |
| 22520 | bash_cv_getpw_declared=yes | |
| 22521 | else case e in #( | |
| 22522 | e) bash_cv_getpw_declared=no ;; | |
| 22523 | esac | |
| 22524 | fi | |
| 22525 | rm -rf conftest* | |
| 22526 | ;; | |
| 22527 | esac | |
| 22528 | fi | |
| 22529 | ||
| 22530 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_getpw_declared" >&5 | |
| 22531 | printf "%s\n" "$bash_cv_getpw_declared" >&6; } | |
| 22532 | if test $bash_cv_getpw_declared = yes; then | |
| 22533 | printf "%s\n" "#define HAVE_GETPW_DECLS 1" >>confdefs.h | |
| 22534 | ||
| 22535 | fi | |
| 22536 | ||
| 22537 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for unusable real-time signals due to large values" >&5 | |
| 22538 | printf %s "checking for unusable real-time signals due to large values... " >&6; } | |
| 22539 | if test ${bash_cv_unusable_rtsigs+y} | |
| 22540 | then : | |
| 22541 | printf %s "(cached) " >&6 | |
| 22542 | else case e in #( | |
| 22543 | e) if test "$cross_compiling" = yes | |
| 22544 | then : | |
| 22545 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&5 | |
| 22546 | printf "%s\n" "$as_me: WARNING: cannot check real-time signals if cross compiling -- defaulting to yes" >&2;} | |
| 22547 | bash_cv_unusable_rtsigs=yes | |
| 22548 | ||
| 22549 | else case e in #( | |
| 22550 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 22551 | /* end confdefs.h. */ | |
| 22552 | ||
| 22553 | #include <sys/types.h> | |
| 22554 | #include <signal.h> | |
| 22555 | #include <stdlib.h> | |
| 22556 | ||
| 22557 | #ifndef NSIG | |
| 22558 | # define NSIG 64 | |
| 22559 | #endif | |
| 22560 | ||
| 22561 | int | |
| 22562 | main () | |
| 22563 | { | |
| 22564 | int n_sigs = 2 * NSIG; | |
| 22565 | #ifdef SIGRTMIN | |
| 22566 | int rtmin = SIGRTMIN; | |
| 22567 | #else | |
| 22568 | int rtmin = 0; | |
| 22569 | #endif | |
| 22570 | ||
| 22571 | exit(rtmin < n_sigs); | |
| 22572 | } | |
| 22573 | ||
| 22574 | _ACEOF | |
| 22575 | if ac_fn_c_try_run "$LINENO" | |
| 22576 | then : | |
| 22577 | bash_cv_unusable_rtsigs=yes | |
| 22578 | else case e in #( | |
| 22579 | e) bash_cv_unusable_rtsigs=no ;; | |
| 22580 | esac | |
| 22581 | fi | |
| 22582 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ | |
| 22583 | conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 22584 | esac | |
| 22585 | fi | |
| 22586 | ;; | |
| 22587 | esac | |
| 22588 | fi | |
| 22589 | ||
| 22590 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_unusable_rtsigs" >&5 | |
| 22591 | printf "%s\n" "$bash_cv_unusable_rtsigs" >&6; } | |
| 22592 | if test $bash_cv_unusable_rtsigs = yes; then | |
| 22593 | printf "%s\n" "#define UNUSABLE_RT_SIGNALS 1" >>confdefs.h | |
| 22594 | ||
| 22595 | fi | |
| 22596 | ||
| 22597 | ||
| 22598 | ||
| 22599 | ||
| 22600 | ||
| 22601 | if test "$bash_cv_sys_siglist" = no && test "$bash_cv_under_sys_siglist" = no && test "$bash_cv_have_strsignal" = no; then | |
| 22602 | SIGLIST_O=siglist.o | |
| 22603 | else | |
| 22604 | SIGLIST_O= | |
| 22605 | fi | |
| 22606 | ||
| 22607 | ||
| 22608 | ||
| 22609 | case "$host_os" in | |
| 22610 | hpux*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $host_os needs _KERNEL for RLIMIT defines" >&5 | |
| 22611 | printf %s "checking whether $host_os needs _KERNEL for RLIMIT defines... " >&6; } | |
| 22612 | if test ${bash_cv_kernel_rlimit+y} | |
| 22613 | then : | |
| 22614 | printf %s "(cached) " >&6 | |
| 22615 | else case e in #( | |
| 22616 | e) if test ${bash_cv_rlimit+y} | |
| 22617 | then : | |
| 22618 | printf %s "(cached) " >&6 | |
| 22619 | else case e in #( | |
| 22620 | e) cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 22621 | /* end confdefs.h. */ | |
| 22622 | ||
| 22623 | #include <sys/types.h> | |
| 22624 | #include <sys/resource.h> | |
| 22625 | ||
| 22626 | int | |
| 22627 | main (void) | |
| 22628 | { | |
| 22629 | ||
| 22630 | int f; | |
| 22631 | f = RLIMIT_DATA; | |
| 22632 | ||
| 22633 | ; | |
| 22634 | return 0; | |
| 22635 | } | |
| 22636 | _ACEOF | |
| 22637 | if ac_fn_c_try_compile "$LINENO" | |
| 22638 | then : | |
| 22639 | bash_cv_rlimit=yes | |
| 22640 | else case e in #( | |
| 22641 | e) bash_cv_rlimit=no | |
| 22642 | ;; | |
| 22643 | esac | |
| 22644 | fi | |
| 22645 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext ;; | |
| 22646 | esac | |
| 22647 | fi | |
| 22648 | ||
| 22649 | ||
| 22650 | if test $bash_cv_rlimit = no; then | |
| 22651 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 22652 | /* end confdefs.h. */ | |
| 22653 | ||
| 22654 | #include <sys/types.h> | |
| 22655 | #define _KERNEL | |
| 22656 | #include <sys/resource.h> | |
| 22657 | #undef _KERNEL | |
| 22658 | ||
| 22659 | int | |
| 22660 | main (void) | |
| 22661 | { | |
| 22662 | ||
| 22663 | int f; | |
| 22664 | f = RLIMIT_DATA; | |
| 22665 | ||
| 22666 | ; | |
| 22667 | return 0; | |
| 22668 | } | |
| 22669 | _ACEOF | |
| 22670 | if ac_fn_c_try_compile "$LINENO" | |
| 22671 | then : | |
| 22672 | bash_cv_kernel_rlimit=yes | |
| 22673 | else case e in #( | |
| 22674 | e) bash_cv_kernel_rlimit=no ;; | |
| 22675 | esac | |
| 22676 | fi | |
| 22677 | rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext | |
| 22678 | fi | |
| 22679 | ;; | |
| 22680 | esac | |
| 22681 | fi | |
| 22682 | ||
| 22683 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_kernel_rlimit" >&5 | |
| 22684 | printf "%s\n" "$bash_cv_kernel_rlimit" >&6; } | |
| 22685 | if test $bash_cv_kernel_rlimit = yes; then | |
| 22686 | printf "%s\n" "#define RLIMIT_NEEDS_KERNEL 1" >>confdefs.h | |
| 22687 | ||
| 22688 | fi | |
| 22689 | ;; | |
| 22690 | esac | |
| 22691 | ||
| 22692 | if test "$opt_readline" = yes; then | |
| 22693 | case "$host_os" in | |
| 22694 | aix*) prefer_curses=yes ;; | |
| 22695 | esac | |
| 22696 | ||
| 22697 | if test "X$bash_cv_termcap_lib" = "X"; then | |
| 22698 | _bash_needmsg=yes | |
| 22699 | else | |
| 22700 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 | |
| 22701 | printf %s "checking which library has the termcap functions... " >&6; } | |
| 22702 | _bash_needmsg= | |
| 22703 | fi | |
| 22704 | if test ${bash_cv_termcap_lib+y} | |
| 22705 | then : | |
| 22706 | printf %s "(cached) " >&6 | |
| 22707 | else case e in #( | |
| 22708 | e) ac_fn_c_check_func "$LINENO" "tgetent" "ac_cv_func_tgetent" | |
| 22709 | if test "x$ac_cv_func_tgetent" = xyes | |
| 22710 | then : | |
| 22711 | bash_cv_termcap_lib=libc | |
| 22712 | else case e in #( | |
| 22713 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltermcap" >&5 | |
| 22714 | printf %s "checking for tgetent in -ltermcap... " >&6; } | |
| 22715 | if test ${ac_cv_lib_termcap_tgetent+y} | |
| 22716 | then : | |
| 22717 | printf %s "(cached) " >&6 | |
| 22718 | else case e in #( | |
| 22719 | e) ac_check_lib_save_LIBS=$LIBS | |
| 22720 | LIBS="-ltermcap $LIBS" | |
| 22721 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 22722 | /* end confdefs.h. */ | |
| 22723 | ||
| 22724 | /* Override any GCC internal prototype to avoid an error. | |
| 22725 | Use char because int might match the return type of a GCC | |
| 22726 | builtin and then its argument prototype would still apply. | |
| 22727 | The 'extern "C"' is for builds by C++ compilers; | |
| 22728 | although this is not generally supported in C code supporting it here | |
| 22729 | has little cost and some practical benefit (sr 110532). */ | |
| 22730 | #ifdef __cplusplus | |
| 22731 | extern "C" | |
| 22732 | #endif | |
| 22733 | char tgetent (void); | |
| 22734 | int | |
| 22735 | main (void) | |
| 22736 | { | |
| 22737 | return tgetent (); | |
| 22738 | ; | |
| 22739 | return 0; | |
| 22740 | } | |
| 22741 | _ACEOF | |
| 22742 | if ac_fn_c_try_link "$LINENO" | |
| 22743 | then : | |
| 22744 | ac_cv_lib_termcap_tgetent=yes | |
| 22745 | else case e in #( | |
| 22746 | e) ac_cv_lib_termcap_tgetent=no ;; | |
| 22747 | esac | |
| 22748 | fi | |
| 22749 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 22750 | conftest$ac_exeext conftest.$ac_ext | |
| 22751 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 22752 | esac | |
| 22753 | fi | |
| 22754 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_termcap_tgetent" >&5 | |
| 22755 | printf "%s\n" "$ac_cv_lib_termcap_tgetent" >&6; } | |
| 22756 | if test "x$ac_cv_lib_termcap_tgetent" = xyes | |
| 22757 | then : | |
| 22758 | bash_cv_termcap_lib=libtermcap | |
| 22759 | else case e in #( | |
| 22760 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -ltinfo" >&5 | |
| 22761 | printf %s "checking for tgetent in -ltinfo... " >&6; } | |
| 22762 | if test ${ac_cv_lib_tinfo_tgetent+y} | |
| 22763 | then : | |
| 22764 | printf %s "(cached) " >&6 | |
| 22765 | else case e in #( | |
| 22766 | e) ac_check_lib_save_LIBS=$LIBS | |
| 22767 | LIBS="-ltinfo $LIBS" | |
| 22768 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 22769 | /* end confdefs.h. */ | |
| 22770 | ||
| 22771 | /* Override any GCC internal prototype to avoid an error. | |
| 22772 | Use char because int might match the return type of a GCC | |
| 22773 | builtin and then its argument prototype would still apply. | |
| 22774 | The 'extern "C"' is for builds by C++ compilers; | |
| 22775 | although this is not generally supported in C code supporting it here | |
| 22776 | has little cost and some practical benefit (sr 110532). */ | |
| 22777 | #ifdef __cplusplus | |
| 22778 | extern "C" | |
| 22779 | #endif | |
| 22780 | char tgetent (void); | |
| 22781 | int | |
| 22782 | main (void) | |
| 22783 | { | |
| 22784 | return tgetent (); | |
| 22785 | ; | |
| 22786 | return 0; | |
| 22787 | } | |
| 22788 | _ACEOF | |
| 22789 | if ac_fn_c_try_link "$LINENO" | |
| 22790 | then : | |
| 22791 | ac_cv_lib_tinfo_tgetent=yes | |
| 22792 | else case e in #( | |
| 22793 | e) ac_cv_lib_tinfo_tgetent=no ;; | |
| 22794 | esac | |
| 22795 | fi | |
| 22796 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 22797 | conftest$ac_exeext conftest.$ac_ext | |
| 22798 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 22799 | esac | |
| 22800 | fi | |
| 22801 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tinfo_tgetent" >&5 | |
| 22802 | printf "%s\n" "$ac_cv_lib_tinfo_tgetent" >&6; } | |
| 22803 | if test "x$ac_cv_lib_tinfo_tgetent" = xyes | |
| 22804 | then : | |
| 22805 | bash_cv_termcap_lib=libtinfo | |
| 22806 | else case e in #( | |
| 22807 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lcurses" >&5 | |
| 22808 | printf %s "checking for tgetent in -lcurses... " >&6; } | |
| 22809 | if test ${ac_cv_lib_curses_tgetent+y} | |
| 22810 | then : | |
| 22811 | printf %s "(cached) " >&6 | |
| 22812 | else case e in #( | |
| 22813 | e) ac_check_lib_save_LIBS=$LIBS | |
| 22814 | LIBS="-lcurses $LIBS" | |
| 22815 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 22816 | /* end confdefs.h. */ | |
| 22817 | ||
| 22818 | /* Override any GCC internal prototype to avoid an error. | |
| 22819 | Use char because int might match the return type of a GCC | |
| 22820 | builtin and then its argument prototype would still apply. | |
| 22821 | The 'extern "C"' is for builds by C++ compilers; | |
| 22822 | although this is not generally supported in C code supporting it here | |
| 22823 | has little cost and some practical benefit (sr 110532). */ | |
| 22824 | #ifdef __cplusplus | |
| 22825 | extern "C" | |
| 22826 | #endif | |
| 22827 | char tgetent (void); | |
| 22828 | int | |
| 22829 | main (void) | |
| 22830 | { | |
| 22831 | return tgetent (); | |
| 22832 | ; | |
| 22833 | return 0; | |
| 22834 | } | |
| 22835 | _ACEOF | |
| 22836 | if ac_fn_c_try_link "$LINENO" | |
| 22837 | then : | |
| 22838 | ac_cv_lib_curses_tgetent=yes | |
| 22839 | else case e in #( | |
| 22840 | e) ac_cv_lib_curses_tgetent=no ;; | |
| 22841 | esac | |
| 22842 | fi | |
| 22843 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 22844 | conftest$ac_exeext conftest.$ac_ext | |
| 22845 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 22846 | esac | |
| 22847 | fi | |
| 22848 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_curses_tgetent" >&5 | |
| 22849 | printf "%s\n" "$ac_cv_lib_curses_tgetent" >&6; } | |
| 22850 | if test "x$ac_cv_lib_curses_tgetent" = xyes | |
| 22851 | then : | |
| 22852 | bash_cv_termcap_lib=libcurses | |
| 22853 | else case e in #( | |
| 22854 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncursesw" >&5 | |
| 22855 | printf %s "checking for tgetent in -lncursesw... " >&6; } | |
| 22856 | if test ${ac_cv_lib_ncursesw_tgetent+y} | |
| 22857 | then : | |
| 22858 | printf %s "(cached) " >&6 | |
| 22859 | else case e in #( | |
| 22860 | e) ac_check_lib_save_LIBS=$LIBS | |
| 22861 | LIBS="-lncursesw $LIBS" | |
| 22862 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 22863 | /* end confdefs.h. */ | |
| 22864 | ||
| 22865 | /* Override any GCC internal prototype to avoid an error. | |
| 22866 | Use char because int might match the return type of a GCC | |
| 22867 | builtin and then its argument prototype would still apply. | |
| 22868 | The 'extern "C"' is for builds by C++ compilers; | |
| 22869 | although this is not generally supported in C code supporting it here | |
| 22870 | has little cost and some practical benefit (sr 110532). */ | |
| 22871 | #ifdef __cplusplus | |
| 22872 | extern "C" | |
| 22873 | #endif | |
| 22874 | char tgetent (void); | |
| 22875 | int | |
| 22876 | main (void) | |
| 22877 | { | |
| 22878 | return tgetent (); | |
| 22879 | ; | |
| 22880 | return 0; | |
| 22881 | } | |
| 22882 | _ACEOF | |
| 22883 | if ac_fn_c_try_link "$LINENO" | |
| 22884 | then : | |
| 22885 | ac_cv_lib_ncursesw_tgetent=yes | |
| 22886 | else case e in #( | |
| 22887 | e) ac_cv_lib_ncursesw_tgetent=no ;; | |
| 22888 | esac | |
| 22889 | fi | |
| 22890 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 22891 | conftest$ac_exeext conftest.$ac_ext | |
| 22892 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 22893 | esac | |
| 22894 | fi | |
| 22895 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncursesw_tgetent" >&5 | |
| 22896 | printf "%s\n" "$ac_cv_lib_ncursesw_tgetent" >&6; } | |
| 22897 | if test "x$ac_cv_lib_ncursesw_tgetent" = xyes | |
| 22898 | then : | |
| 22899 | bash_cv_termcap_lib=libncursesw | |
| 22900 | else case e in #( | |
| 22901 | e) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for tgetent in -lncurses" >&5 | |
| 22902 | printf %s "checking for tgetent in -lncurses... " >&6; } | |
| 22903 | if test ${ac_cv_lib_ncurses_tgetent+y} | |
| 22904 | then : | |
| 22905 | printf %s "(cached) " >&6 | |
| 22906 | else case e in #( | |
| 22907 | e) ac_check_lib_save_LIBS=$LIBS | |
| 22908 | LIBS="-lncurses $LIBS" | |
| 22909 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext | |
| 22910 | /* end confdefs.h. */ | |
| 22911 | ||
| 22912 | /* Override any GCC internal prototype to avoid an error. | |
| 22913 | Use char because int might match the return type of a GCC | |
| 22914 | builtin and then its argument prototype would still apply. | |
| 22915 | The 'extern "C"' is for builds by C++ compilers; | |
| 22916 | although this is not generally supported in C code supporting it here | |
| 22917 | has little cost and some practical benefit (sr 110532). */ | |
| 22918 | #ifdef __cplusplus | |
| 22919 | extern "C" | |
| 22920 | #endif | |
| 22921 | char tgetent (void); | |
| 22922 | int | |
| 22923 | main (void) | |
| 22924 | { | |
| 22925 | return tgetent (); | |
| 22926 | ; | |
| 22927 | return 0; | |
| 22928 | } | |
| 22929 | _ACEOF | |
| 22930 | if ac_fn_c_try_link "$LINENO" | |
| 22931 | then : | |
| 22932 | ac_cv_lib_ncurses_tgetent=yes | |
| 22933 | else case e in #( | |
| 22934 | e) ac_cv_lib_ncurses_tgetent=no ;; | |
| 22935 | esac | |
| 22936 | fi | |
| 22937 | rm -f core conftest.err conftest.$ac_objext conftest.beam \ | |
| 22938 | conftest$ac_exeext conftest.$ac_ext | |
| 22939 | LIBS=$ac_check_lib_save_LIBS ;; | |
| 22940 | esac | |
| 22941 | fi | |
| 22942 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_tgetent" >&5 | |
| 22943 | printf "%s\n" "$ac_cv_lib_ncurses_tgetent" >&6; } | |
| 22944 | if test "x$ac_cv_lib_ncurses_tgetent" = xyes | |
| 22945 | then : | |
| 22946 | bash_cv_termcap_lib=libncurses | |
| 22947 | else case e in #( | |
| 22948 | e) bash_cv_termcap_lib=gnutermcap ;; | |
| 22949 | esac | |
| 22950 | fi | |
| 22951 | ;; | |
| 22952 | esac | |
| 22953 | fi | |
| 22954 | ;; | |
| 22955 | esac | |
| 22956 | fi | |
| 22957 | ;; | |
| 22958 | esac | |
| 22959 | fi | |
| 22960 | ;; | |
| 22961 | esac | |
| 22962 | fi | |
| 22963 | ;; | |
| 22964 | esac | |
| 22965 | fi | |
| 22966 | ;; | |
| 22967 | esac | |
| 22968 | fi | |
| 22969 | ||
| 22970 | if test "X$_bash_needmsg" = "Xyes"; then | |
| 22971 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking which library has the termcap functions" >&5 | |
| 22972 | printf %s "checking which library has the termcap functions... " >&6; } | |
| 22973 | fi | |
| 22974 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: using $bash_cv_termcap_lib" >&5 | |
| 22975 | printf "%s\n" "using $bash_cv_termcap_lib" >&6; } | |
| 22976 | if test $bash_cv_termcap_lib = gnutermcap && test -z "$prefer_curses"; then | |
| 22977 | LDFLAGS="$LDFLAGS -L./lib/termcap" | |
| 22978 | TERMCAP_LIB="./lib/termcap/libtermcap.a" | |
| 22979 | TERMCAP_DEP="./lib/termcap/libtermcap.a" | |
| 22980 | elif test $bash_cv_termcap_lib = libtermcap && test -z "$prefer_curses"; then | |
| 22981 | TERMCAP_LIB=-ltermcap | |
| 22982 | TERMCAP_DEP= | |
| 22983 | elif test $bash_cv_termcap_lib = libtinfo; then | |
| 22984 | TERMCAP_LIB=-ltinfo | |
| 22985 | TERMCAP_DEP= | |
| 22986 | elif test $bash_cv_termcap_lib = libncursesw; then | |
| 22987 | TERMCAP_LIB=-lncursesw | |
| 22988 | TERMCAP_DEP= | |
| 22989 | elif test $bash_cv_termcap_lib = libncurses; then | |
| 22990 | TERMCAP_LIB=-lncurses | |
| 22991 | TERMCAP_DEP= | |
| 22992 | elif test $bash_cv_termcap_lib = libcurses; then | |
| 22993 | TERMCAP_LIB=-lcurses | |
| 22994 | TERMCAP_DEP= | |
| 22995 | elif test $bash_cv_termcap_lib = libc; then | |
| 22996 | TERMCAP_LIB= | |
| 22997 | TERMCAP_DEP= | |
| 22998 | else | |
| 22999 | # we assume ncurses is installed somewhere the linker can find it | |
| 23000 | TERMCAP_LIB=-lncurses | |
| 23001 | TERMCAP_DEP= | |
| 23002 | fi | |
| 23003 | ||
| 23004 | fi | |
| 23005 | ||
| 23006 | ||
| 23007 | ||
| 23008 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether /dev/fd is available" >&5 | |
| 23009 | printf %s "checking whether /dev/fd is available... " >&6; } | |
| 23010 | if test ${bash_cv_dev_fd+y} | |
| 23011 | then : | |
| 23012 | printf %s "(cached) " >&6 | |
| 23013 | else case e in #( | |
| 23014 | e) bash_cv_dev_fd="" | |
| 23015 | if test -d /dev/fd && (exec test -r /dev/fd/0 < /dev/null) ; then | |
| 23016 | # check for systems like FreeBSD 5 that only provide /dev/fd/[012] | |
| 23017 | if (exec test -r /dev/fd/3 3</dev/null) ; then | |
| 23018 | bash_cv_dev_fd=standard | |
| 23019 | else | |
| 23020 | bash_cv_dev_fd=absent | |
| 23021 | fi | |
| 23022 | elif test "$host_os" = "openedition" && (exec test -r /dev/fd0 < /dev/null); then | |
| 23023 | bash_cv_dev_fd=nodir # /dev/fdN via character device | |
| 23024 | fi | |
| 23025 | if test -z "$bash_cv_dev_fd" ; then | |
| 23026 | if test -d /proc/self/fd && (exec test -r /proc/self/fd/0 < /dev/null) ; then | |
| 23027 | bash_cv_dev_fd=whacky | |
| 23028 | else | |
| 23029 | bash_cv_dev_fd=absent | |
| 23030 | fi | |
| 23031 | fi | |
| 23032 | ;; | |
| 23033 | esac | |
| 23034 | fi | |
| 23035 | ||
| 23036 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dev_fd" >&5 | |
| 23037 | printf "%s\n" "$bash_cv_dev_fd" >&6; } | |
| 23038 | if test $bash_cv_dev_fd = "standard"; then | |
| 23039 | printf "%s\n" "#define HAVE_DEV_FD 1" >>confdefs.h | |
| 23040 | ||
| 23041 | printf "%s\n" "#define DEV_FD_PREFIX \"/dev/fd/\"" >>confdefs.h | |
| 23042 | ||
| 23043 | elif test $bash_cv_dev_fd = "whacky"; then | |
| 23044 | printf "%s\n" "#define HAVE_DEV_FD 1" >>confdefs.h | |
| 23045 | ||
| 23046 | printf "%s\n" "#define DEV_FD_PREFIX \"/proc/self/fd/\"" >>confdefs.h | |
| 23047 | ||
| 23048 | elif test $bash_cv_dev_fd = "nodir"; then | |
| 23049 | printf "%s\n" "#define HAVE_DEV_FD 1" >>confdefs.h | |
| 23050 | ||
| 23051 | printf "%s\n" "#define DEV_FD_PREFIX \"/dev/fd\"" >>confdefs.h | |
| 23052 | ||
| 23053 | fi | |
| 23054 | ||
| 23055 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether /dev/stdin stdout stderr are available" >&5 | |
| 23056 | printf %s "checking whether /dev/stdin stdout stderr are available... " >&6; } | |
| 23057 | if test ${bash_cv_dev_stdin+y} | |
| 23058 | then : | |
| 23059 | printf %s "(cached) " >&6 | |
| 23060 | else case e in #( | |
| 23061 | e) if (exec test -r /dev/stdin < /dev/null) ; then | |
| 23062 | bash_cv_dev_stdin=present | |
| 23063 | else | |
| 23064 | bash_cv_dev_stdin=absent | |
| 23065 | fi | |
| 23066 | ;; | |
| 23067 | esac | |
| 23068 | fi | |
| 23069 | ||
| 23070 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_dev_stdin" >&5 | |
| 23071 | printf "%s\n" "$bash_cv_dev_stdin" >&6; } | |
| 23072 | if test $bash_cv_dev_stdin = "present"; then | |
| 23073 | printf "%s\n" "#define HAVE_DEV_STDIN 1" >>confdefs.h | |
| 23074 | ||
| 23075 | fi | |
| 23076 | ||
| 23077 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for default mail directory" >&5 | |
| 23078 | printf %s "checking for default mail directory... " >&6; } | |
| 23079 | if test ${bash_cv_mail_dir+y} | |
| 23080 | then : | |
| 23081 | printf %s "(cached) " >&6 | |
| 23082 | else case e in #( | |
| 23083 | e) if test -d /var/mail; then | |
| 23084 | bash_cv_mail_dir=/var/mail | |
| 23085 | elif test -d /var/spool/mail; then | |
| 23086 | bash_cv_mail_dir=/var/spool/mail | |
| 23087 | elif test -d /usr/mail; then | |
| 23088 | bash_cv_mail_dir=/usr/mail | |
| 23089 | elif test -d /usr/spool/mail; then | |
| 23090 | bash_cv_mail_dir=/usr/spool/mail | |
| 23091 | else | |
| 23092 | bash_cv_mail_dir=unknown | |
| 23093 | fi | |
| 23094 | ;; | |
| 23095 | esac | |
| 23096 | fi | |
| 23097 | ||
| 23098 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $bash_cv_mail_dir" >&5 | |
| 23099 | printf "%s\n" "$bash_cv_mail_dir" >&6; } | |
| 23100 | printf "%s\n" "#define DEFAULT_MAIL_DIRECTORY \"$bash_cv_mail_dir\"" >>confdefs.h | |
| 23101 | ||
| 23102 | ||
| 23103 | ||
| 23104 | if test "$bash_cv_job_control_missing" = missing; then | |
| 23105 | opt_job_control=no | |
| 23106 | fi | |
| 23107 | ||
| 23108 | if test "$opt_job_control" = yes; then | |
| 23109 | printf "%s\n" "#define JOB_CONTROL 1" >>confdefs.h | |
| 23110 | ||
| 23111 | JOBS_O=jobs.o | |
| 23112 | else | |
| 23113 | JOBS_O=nojobs.o | |
| 23114 | fi | |
| 23115 | ||
| 23116 | ||
| 23117 | ||
| 23118 | ||
| 23119 | LOCAL_DEFS=-DSHELL | |
| 23120 | ||
| 23121 | ||
| 23122 | case "${host_os}" in | |
| 23123 | sysv4.2*) printf "%s\n" "#define SVR4_2 1" >>confdefs.h | |
| 23124 | ||
| 23125 | printf "%s\n" "#define SVR4 1" >>confdefs.h | |
| 23126 | ;; | |
| 23127 | sysv4*) printf "%s\n" "#define SVR4 1" >>confdefs.h | |
| 23128 | ;; | |
| 23129 | sysv5*) printf "%s\n" "#define SVR5 1" >>confdefs.h | |
| 23130 | ;; | |
| 23131 | hpux9*) LOCAL_CFLAGS="-DHPUX9 -DHPUX -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;; | |
| 23132 | hpux*) LOCAL_CFLAGS="-DHPUX -DTGETENT_BROKEN -DTGETFLAG_BROKEN" ;; | |
| 23133 | dgux*) LOCAL_CFLAGS=-D_DGUX_SOURCE; LOCAL_LIBS=-ldgc ;; | |
| 23134 | isc*) LOCAL_CFLAGS=-Disc386 ;; | |
| 23135 | rhapsody*) LOCAL_CFLAGS=-DRHAPSODY ;; | |
| 23136 | darwin*) LOCAL_CFLAGS=-DMACOSX ;; | |
| 23137 | sco3.2v5*) LOCAL_CFLAGS="-b elf -DWAITPID_BROKEN -DPATH_MAX=1024" ;; | |
| 23138 | sco3.2v4*) LOCAL_CFLAGS="-DMUST_UNBLOCK_CHLD -DPATH_MAX=1024" ;; | |
| 23139 | sco3.2*) LOCAL_CFLAGS=-DMUST_UNBLOCK_CHLD ;; | |
| 23140 | sunos4*) LOCAL_CFLAGS=-DSunOS4 ;; | |
| 23141 | solaris2.5*) LOCAL_CFLAGS="-DSunOS5 -DSOLARIS" ;; | |
| 23142 | solaris2.8*) LOCAL_CFLAGS=-DSOLARIS ;; | |
| 23143 | solaris2.9*) LOCAL_CFLAGS=-DSOLARIS ;; | |
| 23144 | solaris2.10*) LOCAL_CFLAGS=-DSOLARIS ;; | |
| 23145 | solaris2*) LOCAL_CFLAGS=-DSOLARIS ;; | |
| 23146 | lynxos*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; | |
| 23147 | linux*) LOCAL_LDFLAGS=-rdynamic # allow dynamic loading | |
| 23148 | case "`uname -r`" in | |
| 23149 | 1.*|2.[0123]*) : ;; | |
| 23150 | *) printf "%s\n" "#define PGRP_PIPE 1" >>confdefs.h | |
| 23151 | ;; | |
| 23152 | esac ;; | |
| 23153 | netbsd*|openbsd*) LOCAL_CFLAGS="-DDEV_FD_STAT_BROKEN" ;; | |
| 23154 | freebsd*|midnightbsd*) LOCAL_CFLAGS='-DHEREDOC_PIPESIZE=4096' ;; | |
| 23155 | *qnx[67]*) LOCAL_LIBS="-lncurses" ;; | |
| 23156 | *qnx*) LOCAL_CFLAGS="-Dqnx -F -3s" LOCAL_LDFLAGS="-3s" LOCAL_LIBS="-lunix -lncurses" ;; | |
| 23157 | powerux*) LOCAL_LIBS="-lgen" ;; | |
| 23158 | cygwin*|msys*) LOCAL_CFLAGS=-DRECYCLES_PIDS ;; | |
| 23159 | opennt*|interix*) LOCAL_CFLAGS="-DNO_MAIN_ENV_ARG -DBROKEN_DIRENT_D_INO -D_POSIX_SOURCE -D_ALL_SOURCE -DRECYCLES_PIDS" ;; | |
| 23160 | *openstep*) LOCAL_CFLAGS="-D__APPLE_CC__" ;; | |
| 23161 | esac | |
| 23162 | ||
| 23163 | case "${host_os}-${CC}" in | |
| 23164 | aix4.2*-*gcc*) LOCAL_LDFLAGS="-Xlinker -bexpall -Xlinker -brtl" ;; | |
| 23165 | aix4.2*) LOCAL_LDFLAGS="-bexpall -brtl" ;; | |
| 23166 | bsdi4*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux | |
| 23167 | bsdi5*-*gcc*) LOCAL_LDFLAGS="-rdynamic" ;; # allow dynamic loading, like Linux | |
| 23168 | hpux11*-gcc*) LOCAL_LDFLAGS="-Wl,-E" ;; # allow dynamic loading | |
| 23169 | esac | |
| 23170 | ||
| 23171 | case "${host_os}" in | |
| 23172 | freebsd[3-9]*) | |
| 23173 | if test -x /usr/bin/objformat && test "`/usr/bin/objformat`" = "elf" ; then | |
| 23174 | LOCAL_LDFLAGS=-rdynamic # allow dynamic loading | |
| 23175 | fi ;; | |
| 23176 | freebsd*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading | |
| 23177 | openbsd*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading | |
| 23178 | netbsd*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading | |
| 23179 | dragonfly*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading | |
| 23180 | midnightbsd*) LOCAL_LDFLAGS=-rdynamic ;; # allow dynamic loading | |
| 23181 | esac | |
| 23182 | ||
| 23183 | case "$host_cpu" in | |
| 23184 | *cray*) LOCAL_CFLAGS="-DCRAY" ;; # shell var so config.h can use it | |
| 23185 | esac | |
| 23186 | ||
| 23187 | case "$host_cpu-$host_os" in | |
| 23188 | ibmrt-*bsd4*) LOCAL_CFLAGS="-ma -U__STDC__" ;; | |
| 23189 | esac | |
| 23190 | ||
| 23191 | case "$host_cpu-$host_vendor-$host_os" in | |
| 23192 | m88k-motorola-sysv3) LOCAL_CFLAGS=-DWAITPID_BROKEN ;; | |
| 23193 | mips-pyramid-sysv4) LOCAL_CFLAGS=-Xa ;; | |
| 23194 | esac | |
| 23195 | ||
| 23196 | # turn off paren warnings in gcc | |
| 23197 | #CFLAGS="$CFLAGS ${STYLE_CFLAGS}" | |
| 23198 | ||
| 23199 | # | |
| 23200 | # Shared object configuration section. These values are generated by | |
| 23201 | # ${srcdir}/support/shobj-conf | |
| 23202 | # | |
| 23203 | if test "$ac_cv_func_dlopen" = "yes" && test -f ${srcdir}/support/shobj-conf | |
| 23204 | then | |
| 23205 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking shared object configuration for loadable builtins" >&5 | |
| 23206 | printf %s "checking shared object configuration for loadable builtins... " >&6; } | |
| 23207 | eval `${CONFIG_SHELL-/bin/sh} ${srcdir}/support/shobj-conf -C "${CC}" -c "${host_cpu}" -o "${host_os}" -v "${host_vendor}"` | |
| 23208 | ||
| 23209 | ||
| 23210 | ||
| 23211 | ||
| 23212 | ||
| 23213 | ||
| 23214 | ||
| 23215 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $SHOBJ_STATUS" >&5 | |
| 23216 | printf "%s\n" "$SHOBJ_STATUS" >&6; } | |
| 23217 | else | |
| 23218 | SHOBJ_STATUS=unsupported | |
| 23219 | ||
| 23220 | fi | |
| 23221 | ||
| 23222 | # try to create a directory tree if the source is elsewhere | |
| 23223 | # this should be packaged into a script accessible via ${srcdir}/support | |
| 23224 | case "$srcdir" in | |
| 23225 | .) ;; | |
| 23226 | *) for d in doc tests support lib examples; do # dirs | |
| 23227 | test -d $d || mkdir $d | |
| 23228 | done | |
| 23229 | for ld in readline glob tilde malloc sh termcap; do # libdirs | |
| 23230 | test -d lib/$ld || mkdir lib/$ld | |
| 23231 | done | |
| 23232 | test -d examples/loadables || mkdir examples/loadables # loadable builtins | |
| 23233 | test -d examples/loadables/perl || mkdir examples/loadables/perl | |
| 23234 | ;; | |
| 23235 | esac | |
| 23236 | ||
| 23237 | BUILD_DIR=`pwd` | |
| 23238 | case "$BUILD_DIR" in | |
| 23239 | *\ *) BUILD_DIR=`echo "$BUILD_DIR" | sed 's: :\\\\ :g'` ;; | |
| 23240 | *) ;; | |
| 23241 | esac | |
| 23242 | ||
| 23243 | if test -z "$localedir"; then | |
| 23244 | localedir='${datarootdir}/locale' | |
| 23245 | fi | |
| 23246 | if test -z "$datarootdir"; then | |
| 23247 | datarootdir='${prefix}/share' | |
| 23248 | fi | |
| 23249 | ||
| 23250 | ||
| 23251 | ||
| 23252 | ||
| 23253 | ||
| 23254 | ||
| 23255 | # Some versions of autoconf don't substitute these automatically | |
| 23256 | ||
| 23257 | ||
| 23258 | ||
| 23259 | # directory where we install dynamically loadable builtins | |
| 23260 | if test -z "$loadablesdir"; then | |
| 23261 | loadablesdir='${libdir}/bash' | |
| 23262 | fi | |
| 23263 | ||
| 23264 | if test -z "$headersdir"; then | |
| 23265 | headersdir='$(includedir)/$(PACKAGE_NAME)' | |
| 23266 | fi | |
| 23267 | ||
| 23268 | ||
| 23269 | ||
| 23270 | ||
| 23271 | ||
| 23272 | ||
| 23273 | ||
| 23274 | ||
| 23275 | ||
| 23276 | ||
| 23277 | ||
| 23278 | ||
| 23279 | ||
| 23280 | ||
| 23281 | ||
| 23282 | ||
| 23283 | ||
| 23284 | ||
| 23285 | ||
| 23286 | ||
| 23287 | #AC_SUBST(ALLOCA_SOURCE) | |
| 23288 | #AC_SUBST(ALLOCA_OBJECT) | |
| 23289 | ||
| 23290 | ac_config_files="$ac_config_files Makefile builtins/Makefile lib/readline/Makefile lib/glob/Makefile lib/intl/Makefile lib/malloc/Makefile lib/sh/Makefile lib/termcap/Makefile lib/tilde/Makefile doc/Makefile support/Makefile po/Makefile.in examples/loadables/Makefile examples/loadables/Makefile.inc examples/loadables/Makefile.sample examples/loadables/perl/Makefile support/bash.pc support/bashbug.sh" | |
| 23291 | ||
| 23292 | ||
| 23293 | ac_config_commands="$ac_config_commands stamp-h" | |
| 23294 | ||
| 23295 | ||
| 23296 | if test "$ac_cv_header_stdckdint_h" = yes; then | |
| 23297 | rm -f stdckdint.h | |
| 23298 | STDCKDINT_H= | |
| 23299 | elif cmp ${srcdir}/include/stdckdint.in.h stdckdint.h 2>/dev/null; then | |
| 23300 | : | |
| 23301 | STDCKDINT_H='${BUILD_DIR}/stdckdint.h' | |
| 23302 | else | |
| 23303 | cp ${srcdir}/include/stdckdint.in.h stdckdint.h | |
| 23304 | STDCKDINT_H='${BUILD_DIR}/stdckdint.h' | |
| 23305 | fi | |
| 23306 | ||
| 23307 | ||
| 23308 | cat >confcache <<\_ACEOF | |
| 23309 | # This file is a shell script that caches the results of configure | |
| 23310 | # tests run on this system so they can be shared between configure | |
| 23311 | # scripts and configure runs, see configure's option --config-cache. | |
| 23312 | # It is not useful on other systems. If it contains results you don't | |
| 23313 | # want to keep, you may remove or edit it. | |
| 23314 | # | |
| 23315 | # config.status only pays attention to the cache file if you give it | |
| 23316 | # the --recheck option to rerun configure. | |
| 23317 | # | |
| 23318 | # 'ac_cv_env_foo' variables (set or unset) will be overridden when | |
| 23319 | # loading this file, other *unset* 'ac_cv_foo' will be assigned the | |
| 23320 | # following values. | |
| 23321 | ||
| 23322 | _ACEOF | |
| 23323 | ||
| 23324 | # The following way of writing the cache mishandles newlines in values, | |
| 23325 | # but we know of no workaround that is simple, portable, and efficient. | |
| 23326 | # So, we kill variables containing newlines. | |
| 23327 | # Ultrix sh set writes to stderr and can't be redirected directly, | |
| 23328 | # and sets the high bit in the cache file unless we assign to the vars. | |
| 23329 | ( | |
| 23330 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do | |
| 23331 | eval ac_val=\$$ac_var | |
| 23332 | case $ac_val in #( | |
| 23333 | *${as_nl}*) | |
| 23334 | case $ac_var in #( | |
| 23335 | *_cv_*) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 | |
| 23336 | printf "%s\n" "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; | |
| 23337 | esac | |
| 23338 | case $ac_var in #( | |
| 23339 | _ | IFS | as_nl) ;; #( | |
| 23340 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( | |
| 23341 | *) { eval $ac_var=; unset $ac_var;} ;; | |
| 23342 | esac ;; | |
| 23343 | esac | |
| 23344 | done | |
| 23345 | ||
| 23346 | (set) 2>&1 | | |
| 23347 | case $as_nl`(ac_space=' '; set) 2>&1` in #( | |
| 23348 | *${as_nl}ac_space=\ *) | |
| 23349 | # 'set' does not quote correctly, so add quotes: double-quote | |
| 23350 | # substitution turns \\\\ into \\, and sed turns \\ into \. | |
| 23351 | sed -n \ | |
| 23352 | "s/'/'\\\\''/g; | |
| 23353 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" | |
| 23354 | ;; #( | |
| 23355 | *) | |
| 23356 | # 'set' quotes correctly as required by POSIX, so do not add quotes. | |
| 23357 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" | |
| 23358 | ;; | |
| 23359 | esac | | |
| 23360 | sort | |
| 23361 | ) | | |
| 23362 | sed ' | |
| 23363 | /^ac_cv_env_/b end | |
| 23364 | t clear | |
| 23365 | :clear | |
| 23366 | s/^\([^=]*\)=\(.*[{}].*\)$/test ${\1+y} || &/ | |
| 23367 | t end | |
| 23368 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ | |
| 23369 | :end' >>confcache | |
| 23370 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else | |
| 23371 | if test -w "$cache_file"; then | |
| 23372 | if test "x$cache_file" != "x/dev/null"; then | |
| 23373 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 | |
| 23374 | printf "%s\n" "$as_me: updating cache $cache_file" >&6;} | |
| 23375 | if test ! -f "$cache_file" || test -h "$cache_file"; then | |
| 23376 | cat confcache >"$cache_file" | |
| 23377 | else | |
| 23378 | case $cache_file in #( | |
| 23379 | */* | ?:*) | |
| 23380 | mv -f confcache "$cache_file"$$ && | |
| 23381 | mv -f "$cache_file"$$ "$cache_file" ;; #( | |
| 23382 | *) | |
| 23383 | mv -f confcache "$cache_file" ;; | |
| 23384 | esac | |
| 23385 | fi | |
| 23386 | fi | |
| 23387 | else | |
| 23388 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 | |
| 23389 | printf "%s\n" "$as_me: not updating unwritable cache $cache_file" >&6;} | |
| 23390 | fi | |
| 23391 | fi | |
| 23392 | rm -f confcache | |
| 23393 | ||
| 23394 | test "x$prefix" = xNONE && prefix=$ac_default_prefix | |
| 23395 | # Let make expand exec_prefix. | |
| 23396 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' | |
| 23397 | ||
| 23398 | DEFS=-DHAVE_CONFIG_H | |
| 23399 | ||
| 23400 | ac_libobjs= | |
| 23401 | ac_ltlibobjs= | |
| 23402 | U= | |
| 23403 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue | |
| 23404 | # 1. Remove the extension, and $U if already installed. | |
| 23405 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' | |
| 23406 | ac_i=`printf "%s\n" "$ac_i" | sed "$ac_script"` | |
| 23407 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR | |
| 23408 | # will be set to the directory where LIBOBJS objects are built. | |
| 23409 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" | |
| 23410 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' | |
| 23411 | done | |
| 23412 | LIBOBJS=$ac_libobjs | |
| 23413 | ||
| 23414 | LTLIBOBJS=$ac_ltlibobjs | |
| 23415 | ||
| 23416 | ||
| 23417 | # Check whether --enable-year2038 was given. | |
| 23418 | if test ${enable_year2038+y} | |
| 23419 | then : | |
| 23420 | enableval=$enable_year2038; | |
| 23421 | fi | |
| 23422 | ||
| 23423 | ||
| 23424 | ||
| 23425 | : "${CONFIG_STATUS=./config.status}" | |
| 23426 | ac_write_fail=0 | |
| 23427 | ac_clean_files_save=$ac_clean_files | |
| 23428 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" | |
| 23429 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 | |
| 23430 | printf "%s\n" "$as_me: creating $CONFIG_STATUS" >&6;} | |
| 23431 | as_write_fail=0 | |
| 23432 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 | |
| 23433 | #! $SHELL | |
| 23434 | # Generated by $as_me. | |
| 23435 | # Run this file to recreate the current configuration. | |
| 23436 | # Compiler output produced by configure, useful for debugging | |
| 23437 | # configure, is in config.log if it exists. | |
| 23438 | ||
| 23439 | debug=false | |
| 23440 | ac_cs_recheck=false | |
| 23441 | ac_cs_silent=false | |
| 23442 | ||
| 23443 | SHELL=\${CONFIG_SHELL-$SHELL} | |
| 23444 | export SHELL | |
| 23445 | _ASEOF | |
| 23446 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 | |
| 23447 | ## -------------------- ## | |
| 23448 | ## M4sh Initialization. ## | |
| 23449 | ## -------------------- ## | |
| 23450 | ||
| 23451 | # Be more Bourne compatible | |
| 23452 | DUALCASE=1; export DUALCASE # for MKS sh | |
| 23453 | if test ${ZSH_VERSION+y} && (emulate sh) >/dev/null 2>&1 | |
| 23454 | then : | |
| 23455 | emulate sh | |
| 23456 | NULLCMD=: | |
| 23457 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which | |
| 23458 | # is contrary to our usage. Disable this feature. | |
| 23459 | alias -g '${1+"$@"}'='"$@"' | |
| 23460 | setopt NO_GLOB_SUBST | |
| 23461 | else case e in #( | |
| 23462 | e) case `(set -o) 2>/dev/null` in #( | |
| 23463 | *posix*) : | |
| 23464 | set -o posix ;; #( | |
| 23465 | *) : | |
| 23466 | ;; | |
| 23467 | esac ;; | |
| 23468 | esac | |
| 23469 | fi | |
| 23470 | ||
| 23471 | ||
| 23472 | ||
| 23473 | # Reset variables that may have inherited troublesome values from | |
| 23474 | # the environment. | |
| 23475 | ||
| 23476 | # IFS needs to be set, to space, tab, and newline, in precisely that order. | |
| 23477 | # (If _AS_PATH_WALK were called with IFS unset, it would have the | |
| 23478 | # side effect of setting IFS to empty, thus disabling word splitting.) | |
| 23479 | # Quoting is to prevent editors from complaining about space-tab. | |
| 23480 | as_nl=' | |
| 23481 | ' | |
| 23482 | export as_nl | |
| 23483 | IFS=" "" $as_nl" | |
| 23484 | ||
| 23485 | PS1='$ ' | |
| 23486 | PS2='> ' | |
| 23487 | PS4='+ ' | |
| 23488 | ||
| 23489 | # Ensure predictable behavior from utilities with locale-dependent output. | |
| 23490 | LC_ALL=C | |
| 23491 | export LC_ALL | |
| 23492 | LANGUAGE=C | |
| 23493 | export LANGUAGE | |
| 23494 | ||
| 23495 | # We cannot yet rely on "unset" to work, but we need these variables | |
| 23496 | # to be unset--not just set to an empty or harmless value--now, to | |
| 23497 | # avoid bugs in old shells (e.g. pre-3.0 UWIN ksh). This construct | |
| 23498 | # also avoids known problems related to "unset" and subshell syntax | |
| 23499 | # in other old shells (e.g. bash 2.01 and pdksh 5.2.14). | |
| 23500 | for as_var in BASH_ENV ENV MAIL MAILPATH CDPATH | |
| 23501 | do eval test \${$as_var+y} \ | |
| 23502 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : | |
| 23503 | done | |
| 23504 | ||
| 23505 | # Ensure that fds 0, 1, and 2 are open. | |
| 23506 | if (exec 3>&0) 2>/dev/null; then :; else exec 0</dev/null; fi | |
| 23507 | if (exec 3>&1) 2>/dev/null; then :; else exec 1>/dev/null; fi | |
| 23508 | if (exec 3>&2) ; then :; else exec 2>/dev/null; fi | |
| 23509 | ||
| 23510 | # The user is always right. | |
| 23511 | if ${PATH_SEPARATOR+false} :; then | |
| 23512 | PATH_SEPARATOR=: | |
| 23513 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { | |
| 23514 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || | |
| 23515 | PATH_SEPARATOR=';' | |
| 23516 | } | |
| 23517 | fi | |
| 23518 | ||
| 23519 | ||
| 23520 | # Find who we are. Look in the path if we contain no directory separator. | |
| 23521 | as_myself= | |
| 23522 | case $0 in #(( | |
| 23523 | *[\\/]* ) as_myself=$0 ;; | |
| 23524 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR | |
| 23525 | for as_dir in $PATH | |
| 23526 | do | |
| 23527 | IFS=$as_save_IFS | |
| 23528 | case $as_dir in #((( | |
| 23529 | '') as_dir=./ ;; | |
| 23530 | */) ;; | |
| 23531 | *) as_dir=$as_dir/ ;; | |
| 23532 | esac | |
| 23533 | test -r "$as_dir$0" && as_myself=$as_dir$0 && break | |
| 23534 | done | |
| 23535 | IFS=$as_save_IFS | |
| 23536 | ||
| 23537 | ;; | |
| 23538 | esac | |
| 23539 | # We did not find ourselves, most probably we were run as 'sh COMMAND' | |
| 23540 | # in which case we are not to be found in the path. | |
| 23541 | if test "x$as_myself" = x; then | |
| 23542 | as_myself=$0 | |
| 23543 | fi | |
| 23544 | if test ! -f "$as_myself"; then | |
| 23545 | printf "%s\n" "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 | |
| 23546 | exit 1 | |
| 23547 | fi | |
| 23548 | ||
| 23549 | ||
| 23550 | ||
| 23551 | # as_fn_error STATUS ERROR [LINENO LOG_FD] | |
| 23552 | # ---------------------------------------- | |
| 23553 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are | |
| 23554 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the | |
| 23555 | # script with STATUS, using 1 if that was 0. | |
| 23556 | as_fn_error () | |
| 23557 | { | |
| 23558 | as_status=$1; test $as_status -eq 0 && as_status=1 | |
| 23559 | if test "$4"; then | |
| 23560 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack | |
| 23561 | printf "%s\n" "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 | |
| 23562 | fi | |
| 23563 | printf "%s\n" "$as_me: error: $2" >&2 | |
| 23564 | as_fn_exit $as_status | |
| 23565 | } # as_fn_error | |
| 23566 | ||
| 23567 | ||
| 23568 | # as_fn_set_status STATUS | |
| 23569 | # ----------------------- | |
| 23570 | # Set $? to STATUS, without forking. | |
| 23571 | as_fn_set_status () | |
| 23572 | { | |
| 23573 | return $1 | |
| 23574 | } # as_fn_set_status | |
| 23575 | ||
| 23576 | # as_fn_exit STATUS | |
| 23577 | # ----------------- | |
| 23578 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. | |
| 23579 | as_fn_exit () | |
| 23580 | { | |
| 23581 | set +e | |
| 23582 | as_fn_set_status $1 | |
| 23583 | exit $1 | |
| 23584 | } # as_fn_exit | |
| 23585 | ||
| 23586 | # as_fn_unset VAR | |
| 23587 | # --------------- | |
| 23588 | # Portably unset VAR. | |
| 23589 | as_fn_unset () | |
| 23590 | { | |
| 23591 | { eval $1=; unset $1;} | |
| 23592 | } | |
| 23593 | as_unset=as_fn_unset | |
| 23594 | ||
| 23595 | # as_fn_append VAR VALUE | |
| 23596 | # ---------------------- | |
| 23597 | # Append the text in VALUE to the end of the definition contained in VAR. Take | |
| 23598 | # advantage of any shell optimizations that allow amortized linear growth over | |
| 23599 | # repeated appends, instead of the typical quadratic growth present in naive | |
| 23600 | # implementations. | |
| 23601 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null | |
| 23602 | then : | |
| 23603 | eval 'as_fn_append () | |
| 23604 | { | |
| 23605 | eval $1+=\$2 | |
| 23606 | }' | |
| 23607 | else case e in #( | |
| 23608 | e) as_fn_append () | |
| 23609 | { | |
| 23610 | eval $1=\$$1\$2 | |
| 23611 | } ;; | |
| 23612 | esac | |
| 23613 | fi # as_fn_append | |
| 23614 | ||
| 23615 | # as_fn_arith ARG... | |
| 23616 | # ------------------ | |
| 23617 | # Perform arithmetic evaluation on the ARGs, and store the result in the | |
| 23618 | # global $as_val. Take advantage of shells that can avoid forks. The arguments | |
| 23619 | # must be portable across $(()) and expr. | |
| 23620 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null | |
| 23621 | then : | |
| 23622 | eval 'as_fn_arith () | |
| 23623 | { | |
| 23624 | as_val=$(( $* )) | |
| 23625 | }' | |
| 23626 | else case e in #( | |
| 23627 | e) as_fn_arith () | |
| 23628 | { | |
| 23629 | as_val=`expr "$@" || test $? -eq 1` | |
| 23630 | } ;; | |
| 23631 | esac | |
| 23632 | fi # as_fn_arith | |
| 23633 | ||
| 23634 | ||
| 23635 | if expr a : '\(a\)' >/dev/null 2>&1 && | |
| 23636 | test "X`expr 00001 : '.*\(...\)'`" = X001; then | |
| 23637 | as_expr=expr | |
| 23638 | else | |
| 23639 | as_expr=false | |
| 23640 | fi | |
| 23641 | ||
| 23642 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then | |
| 23643 | as_basename=basename | |
| 23644 | else | |
| 23645 | as_basename=false | |
| 23646 | fi | |
| 23647 | ||
| 23648 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then | |
| 23649 | as_dirname=dirname | |
| 23650 | else | |
| 23651 | as_dirname=false | |
| 23652 | fi | |
| 23653 | ||
| 23654 | as_me=`$as_basename -- "$0" || | |
| 23655 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ | |
| 23656 | X"$0" : 'X\(//\)$' \| \ | |
| 23657 | X"$0" : 'X\(/\)' \| . 2>/dev/null || | |
| 23658 | printf "%s\n" X/"$0" | | |
| 23659 | sed '/^.*\/\([^/][^/]*\)\/*$/{ | |
| 23660 | s//\1/ | |
| 23661 | q | |
| 23662 | } | |
| 23663 | /^X\/\(\/\/\)$/{ | |
| 23664 | s//\1/ | |
| 23665 | q | |
| 23666 | } | |
| 23667 | /^X\/\(\/\).*/{ | |
| 23668 | s//\1/ | |
| 23669 | q | |
| 23670 | } | |
| 23671 | s/.*/./; q'` | |
| 23672 | ||
| 23673 | # Avoid depending upon Character Ranges. | |
| 23674 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' | |
| 23675 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' | |
| 23676 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS | |
| 23677 | as_cr_digits='0123456789' | |
| 23678 | as_cr_alnum=$as_cr_Letters$as_cr_digits | |
| 23679 | ||
| 23680 | ||
| 23681 | # Determine whether it's possible to make 'echo' print without a newline. | |
| 23682 | # These variables are no longer used directly by Autoconf, but are AC_SUBSTed | |
| 23683 | # for compatibility with existing Makefiles. | |
| 23684 | ECHO_C= ECHO_N= ECHO_T= | |
| 23685 | case `echo -n x` in #((((( | |
| 23686 | -n*) | |
| 23687 | case `echo 'xy\c'` in | |
| 23688 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. | |
| 23689 | xy) ECHO_C='\c';; | |
| 23690 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null | |
| 23691 | ECHO_T=' ';; | |
| 23692 | esac;; | |
| 23693 | *) | |
| 23694 | ECHO_N='-n';; | |
| 23695 | esac | |
| 23696 | ||
| 23697 | # For backward compatibility with old third-party macros, we provide | |
| 23698 | # the shell variables $as_echo and $as_echo_n. New code should use | |
| 23699 | # AS_ECHO(["message"]) and AS_ECHO_N(["message"]), respectively. | |
| 23700 | as_echo='printf %s\n' | |
| 23701 | as_echo_n='printf %s' | |
| 23702 | ||
| 23703 | rm -f conf$$ conf$$.exe conf$$.file | |
| 23704 | if test -d conf$$.dir; then | |
| 23705 | rm -f conf$$.dir/conf$$.file | |
| 23706 | else | |
| 23707 | rm -f conf$$.dir | |
| 23708 | mkdir conf$$.dir 2>/dev/null | |
| 23709 | fi | |
| 23710 | if (echo >conf$$.file) 2>/dev/null; then | |
| 23711 | if ln -s conf$$.file conf$$ 2>/dev/null; then | |
| 23712 | as_ln_s='ln -s' | |
| 23713 | # ... but there are two gotchas: | |
| 23714 | # 1) On MSYS, both 'ln -s file dir' and 'ln file dir' fail. | |
| 23715 | # 2) DJGPP < 2.04 has no symlinks; 'ln -s' creates a wrapper executable. | |
| 23716 | # In both cases, we have to default to 'cp -pR'. | |
| 23717 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || | |
| 23718 | as_ln_s='cp -pR' | |
| 23719 | elif ln conf$$.file conf$$ 2>/dev/null; then | |
| 23720 | as_ln_s=ln | |
| 23721 | else | |
| 23722 | as_ln_s='cp -pR' | |
| 23723 | fi | |
| 23724 | else | |
| 23725 | as_ln_s='cp -pR' | |
| 23726 | fi | |
| 23727 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file | |
| 23728 | rmdir conf$$.dir 2>/dev/null | |
| 23729 | ||
| 23730 | ||
| 23731 | # as_fn_mkdir_p | |
| 23732 | # ------------- | |
| 23733 | # Create "$as_dir" as a directory, including parents if necessary. | |
| 23734 | as_fn_mkdir_p () | |
| 23735 | { | |
| 23736 | ||
| 23737 | case $as_dir in #( | |
| 23738 | -*) as_dir=./$as_dir;; | |
| 23739 | esac | |
| 23740 | test -d "$as_dir" || eval $as_mkdir_p || { | |
| 23741 | as_dirs= | |
| 23742 | while :; do | |
| 23743 | case $as_dir in #( | |
| 23744 | *\'*) as_qdir=`printf "%s\n" "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( | |
| 23745 | *) as_qdir=$as_dir;; | |
| 23746 | esac | |
| 23747 | as_dirs="'$as_qdir' $as_dirs" | |
| 23748 | as_dir=`$as_dirname -- "$as_dir" || | |
| 23749 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
| 23750 | X"$as_dir" : 'X\(//\)[^/]' \| \ | |
| 23751 | X"$as_dir" : 'X\(//\)$' \| \ | |
| 23752 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || | |
| 23753 | printf "%s\n" X"$as_dir" | | |
| 23754 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
| 23755 | s//\1/ | |
| 23756 | q | |
| 23757 | } | |
| 23758 | /^X\(\/\/\)[^/].*/{ | |
| 23759 | s//\1/ | |
| 23760 | q | |
| 23761 | } | |
| 23762 | /^X\(\/\/\)$/{ | |
| 23763 | s//\1/ | |
| 23764 | q | |
| 23765 | } | |
| 23766 | /^X\(\/\).*/{ | |
| 23767 | s//\1/ | |
| 23768 | q | |
| 23769 | } | |
| 23770 | s/.*/./; q'` | |
| 23771 | test -d "$as_dir" && break | |
| 23772 | done | |
| 23773 | test -z "$as_dirs" || eval "mkdir $as_dirs" | |
| 23774 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" | |
| 23775 | ||
| 23776 | ||
| 23777 | } # as_fn_mkdir_p | |
| 23778 | if mkdir -p . 2>/dev/null; then | |
| 23779 | as_mkdir_p='mkdir -p "$as_dir"' | |
| 23780 | else | |
| 23781 | test -d ./-p && rmdir ./-p | |
| 23782 | as_mkdir_p=false | |
| 23783 | fi | |
| 23784 | ||
| 23785 | ||
| 23786 | # as_fn_executable_p FILE | |
| 23787 | # ----------------------- | |
| 23788 | # Test if FILE is an executable regular file. | |
| 23789 | as_fn_executable_p () | |
| 23790 | { | |
| 23791 | test -f "$1" && test -x "$1" | |
| 23792 | } # as_fn_executable_p | |
| 23793 | as_test_x='test -x' | |
| 23794 | as_executable_p=as_fn_executable_p | |
| 23795 | ||
| 23796 | # Sed expression to map a string onto a valid CPP name. | |
| 23797 | as_sed_cpp="y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g" | |
| 23798 | as_tr_cpp="eval sed '$as_sed_cpp'" # deprecated | |
| 23799 | ||
| 23800 | # Sed expression to map a string onto a valid variable name. | |
| 23801 | as_sed_sh="y%*+%pp%;s%[^_$as_cr_alnum]%_%g" | |
| 23802 | as_tr_sh="eval sed '$as_sed_sh'" # deprecated | |
| 23803 | ||
| 23804 | ||
| 23805 | exec 6>&1 | |
| 23806 | ## ----------------------------------- ## | |
| 23807 | ## Main body of $CONFIG_STATUS script. ## | |
| 23808 | ## ----------------------------------- ## | |
| 23809 | _ASEOF | |
| 23810 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 | |
| 23811 | ||
| 23812 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
| 23813 | # Save the log message, to keep $0 and so on meaningful, and to | |
| 23814 | # report actual input values of CONFIG_FILES etc. instead of their | |
| 23815 | # values after options handling. | |
| 23816 | ac_log=" | |
| 23817 | This file was extended by bash $as_me 5.3-release, which was | |
| 23818 | generated by GNU Autoconf 2.72. Invocation command line was | |
| 23819 | ||
| 23820 | CONFIG_FILES = $CONFIG_FILES | |
| 23821 | CONFIG_HEADERS = $CONFIG_HEADERS | |
| 23822 | CONFIG_LINKS = $CONFIG_LINKS | |
| 23823 | CONFIG_COMMANDS = $CONFIG_COMMANDS | |
| 23824 | $ $0 $@ | |
| 23825 | ||
| 23826 | on `(hostname || uname -n) 2>/dev/null | sed 1q` | |
| 23827 | " | |
| 23828 | ||
| 23829 | _ACEOF | |
| 23830 | ||
| 23831 | case $ac_config_files in *" | |
| 23832 | "*) set x $ac_config_files; shift; ac_config_files=$*;; | |
| 23833 | esac | |
| 23834 | ||
| 23835 | case $ac_config_headers in *" | |
| 23836 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; | |
| 23837 | esac | |
| 23838 | ||
| 23839 | ||
| 23840 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
| 23841 | # Files that config.status was made for. | |
| 23842 | config_files="$ac_config_files" | |
| 23843 | config_headers="$ac_config_headers" | |
| 23844 | config_commands="$ac_config_commands" | |
| 23845 | ||
| 23846 | _ACEOF | |
| 23847 | ||
| 23848 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
| 23849 | ac_cs_usage="\ | |
| 23850 | '$as_me' instantiates files and other configuration actions | |
| 23851 | from templates according to the current configuration. Unless the files | |
| 23852 | and actions are specified as TAGs, all are instantiated by default. | |
| 23853 | ||
| 23854 | Usage: $0 [OPTION]... [TAG]... | |
| 23855 | ||
| 23856 | -h, --help print this help, then exit | |
| 23857 | -V, --version print version number and configuration settings, then exit | |
| 23858 | --config print configuration, then exit | |
| 23859 | -q, --quiet, --silent | |
| 23860 | do not print progress messages | |
| 23861 | -d, --debug don't remove temporary files | |
| 23862 | --recheck update $as_me by reconfiguring in the same conditions | |
| 23863 | --file=FILE[:TEMPLATE] | |
| 23864 | instantiate the configuration file FILE | |
| 23865 | --header=FILE[:TEMPLATE] | |
| 23866 | instantiate the configuration header FILE | |
| 23867 | ||
| 23868 | Configuration files: | |
| 23869 | $config_files | |
| 23870 | ||
| 23871 | Configuration headers: | |
| 23872 | $config_headers | |
| 23873 | ||
| 23874 | Configuration commands: | |
| 23875 | $config_commands | |
| 23876 | ||
| 23877 | Report bugs to <bug-bash@gnu.org>." | |
| 23878 | ||
| 23879 | _ACEOF | |
| 23880 | ac_cs_config=`printf "%s\n" "$ac_configure_args" | sed "$ac_safe_unquote"` | |
| 23881 | ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\''/g"` | |
| 23882 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
| 23883 | ac_cs_config='$ac_cs_config_escaped' | |
| 23884 | ac_cs_version="\\ | |
| 23885 | bash config.status 5.3-release | |
| 23886 | configured by $0, generated by GNU Autoconf 2.72, | |
| 23887 | with options \\"\$ac_cs_config\\" | |
| 23888 | ||
| 23889 | Copyright (C) 2023 Free Software Foundation, Inc. | |
| 23890 | This config.status script is free software; the Free Software Foundation | |
| 23891 | gives unlimited permission to copy, distribute and modify it." | |
| 23892 | ||
| 23893 | ac_pwd='$ac_pwd' | |
| 23894 | srcdir='$srcdir' | |
| 23895 | INSTALL='$INSTALL' | |
| 23896 | MKDIR_P='$MKDIR_P' | |
| 23897 | test -n "\$AWK" || AWK=awk | |
| 23898 | _ACEOF | |
| 23899 | ||
| 23900 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
| 23901 | # The default lists apply if the user does not specify any file. | |
| 23902 | ac_need_defaults=: | |
| 23903 | while test $# != 0 | |
| 23904 | do | |
| 23905 | case $1 in | |
| 23906 | --*=?*) | |
| 23907 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
| 23908 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` | |
| 23909 | ac_shift=: | |
| 23910 | ;; | |
| 23911 | --*=) | |
| 23912 | ac_option=`expr "X$1" : 'X\([^=]*\)='` | |
| 23913 | ac_optarg= | |
| 23914 | ac_shift=: | |
| 23915 | ;; | |
| 23916 | *) | |
| 23917 | ac_option=$1 | |
| 23918 | ac_optarg=$2 | |
| 23919 | ac_shift=shift | |
| 23920 | ;; | |
| 23921 | esac | |
| 23922 | ||
| 23923 | case $ac_option in | |
| 23924 | # Handling of the options. | |
| 23925 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) | |
| 23926 | ac_cs_recheck=: ;; | |
| 23927 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) | |
| 23928 | printf "%s\n" "$ac_cs_version"; exit ;; | |
| 23929 | --config | --confi | --conf | --con | --co | --c ) | |
| 23930 | printf "%s\n" "$ac_cs_config"; exit ;; | |
| 23931 | --debug | --debu | --deb | --de | --d | -d ) | |
| 23932 | debug=: ;; | |
| 23933 | --file | --fil | --fi | --f ) | |
| 23934 | $ac_shift | |
| 23935 | case $ac_optarg in | |
| 23936 | *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
| 23937 | '') as_fn_error $? "missing file argument" ;; | |
| 23938 | esac | |
| 23939 | as_fn_append CONFIG_FILES " '$ac_optarg'" | |
| 23940 | ac_need_defaults=false;; | |
| 23941 | --header | --heade | --head | --hea ) | |
| 23942 | $ac_shift | |
| 23943 | case $ac_optarg in | |
| 23944 | *\'*) ac_optarg=`printf "%s\n" "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; | |
| 23945 | esac | |
| 23946 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" | |
| 23947 | ac_need_defaults=false;; | |
| 23948 | --he | --h) | |
| 23949 | # Conflict between --help and --header | |
| 23950 | as_fn_error $? "ambiguous option: '$1' | |
| 23951 | Try '$0 --help' for more information.";; | |
| 23952 | --help | --hel | -h ) | |
| 23953 | printf "%s\n" "$ac_cs_usage"; exit ;; | |
| 23954 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | |
| 23955 | | -silent | --silent | --silen | --sile | --sil | --si | --s) | |
| 23956 | ac_cs_silent=: ;; | |
| 23957 | ||
| 23958 | # This is an error. | |
| 23959 | -*) as_fn_error $? "unrecognized option: '$1' | |
| 23960 | Try '$0 --help' for more information." ;; | |
| 23961 | ||
| 23962 | *) as_fn_append ac_config_targets " $1" | |
| 23963 | ac_need_defaults=false ;; | |
| 23964 | ||
| 23965 | esac | |
| 23966 | shift | |
| 23967 | done | |
| 23968 | ||
| 23969 | ac_configure_extra_args= | |
| 23970 | ||
| 23971 | if $ac_cs_silent; then | |
| 23972 | exec 6>/dev/null | |
| 23973 | ac_configure_extra_args="$ac_configure_extra_args --silent" | |
| 23974 | fi | |
| 23975 | ||
| 23976 | _ACEOF | |
| 23977 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
| 23978 | if \$ac_cs_recheck; then | |
| 23979 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion | |
| 23980 | shift | |
| 23981 | \printf "%s\n" "running CONFIG_SHELL=$SHELL \$*" >&6 | |
| 23982 | CONFIG_SHELL='$SHELL' | |
| 23983 | export CONFIG_SHELL | |
| 23984 | exec "\$@" | |
| 23985 | fi | |
| 23986 | ||
| 23987 | _ACEOF | |
| 23988 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
| 23989 | exec 5>>config.log | |
| 23990 | { | |
| 23991 | echo | |
| 23992 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX | |
| 23993 | ## Running $as_me. ## | |
| 23994 | _ASBOX | |
| 23995 | printf "%s\n" "$ac_log" | |
| 23996 | } >&5 | |
| 23997 | ||
| 23998 | _ACEOF | |
| 23999 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
| 24000 | # | |
| 24001 | # INIT-COMMANDS | |
| 24002 | # | |
| 24003 | # Capture the value of obsolete ALL_LINGUAS because we need it to compute | |
| 24004 | # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. | |
| 24005 | OBSOLETE_ALL_LINGUAS="$ALL_LINGUAS" | |
| 24006 | # Capture the value of LINGUAS because we need it to compute CATALOGS. | |
| 24007 | LINGUAS="${LINGUAS-%UNSET%}" | |
| 24008 | ||
| 24009 | ||
| 24010 | _ACEOF | |
| 24011 | ||
| 24012 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
| 24013 | ||
| 24014 | # Handling of arguments. | |
| 24015 | for ac_config_target in $ac_config_targets | |
| 24016 | do | |
| 24017 | case $ac_config_target in | |
| 24018 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; | |
| 24019 | "buildconf.h") CONFIG_HEADERS="$CONFIG_HEADERS buildconf.h" ;; | |
| 24020 | "po-directories") CONFIG_COMMANDS="$CONFIG_COMMANDS po-directories" ;; | |
| 24021 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; | |
| 24022 | "builtins/Makefile") CONFIG_FILES="$CONFIG_FILES builtins/Makefile" ;; | |
| 24023 | "lib/readline/Makefile") CONFIG_FILES="$CONFIG_FILES lib/readline/Makefile" ;; | |
| 24024 | "lib/glob/Makefile") CONFIG_FILES="$CONFIG_FILES lib/glob/Makefile" ;; | |
| 24025 | "lib/intl/Makefile") CONFIG_FILES="$CONFIG_FILES lib/intl/Makefile" ;; | |
| 24026 | "lib/malloc/Makefile") CONFIG_FILES="$CONFIG_FILES lib/malloc/Makefile" ;; | |
| 24027 | "lib/sh/Makefile") CONFIG_FILES="$CONFIG_FILES lib/sh/Makefile" ;; | |
| 24028 | "lib/termcap/Makefile") CONFIG_FILES="$CONFIG_FILES lib/termcap/Makefile" ;; | |
| 24029 | "lib/tilde/Makefile") CONFIG_FILES="$CONFIG_FILES lib/tilde/Makefile" ;; | |
| 24030 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; | |
| 24031 | "support/Makefile") CONFIG_FILES="$CONFIG_FILES support/Makefile" ;; | |
| 24032 | "po/Makefile.in") CONFIG_FILES="$CONFIG_FILES po/Makefile.in" ;; | |
| 24033 | "examples/loadables/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile" ;; | |
| 24034 | "examples/loadables/Makefile.inc") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile.inc" ;; | |
| 24035 | "examples/loadables/Makefile.sample") CONFIG_FILES="$CONFIG_FILES examples/loadables/Makefile.sample" ;; | |
| 24036 | "examples/loadables/perl/Makefile") CONFIG_FILES="$CONFIG_FILES examples/loadables/perl/Makefile" ;; | |
| 24037 | "support/bash.pc") CONFIG_FILES="$CONFIG_FILES support/bash.pc" ;; | |
| 24038 | "support/bashbug.sh") CONFIG_FILES="$CONFIG_FILES support/bashbug.sh" ;; | |
| 24039 | "stamp-h") CONFIG_COMMANDS="$CONFIG_COMMANDS stamp-h" ;; | |
| 24040 | ||
| 24041 | *) as_fn_error $? "invalid argument: '$ac_config_target'" "$LINENO" 5;; | |
| 24042 | esac | |
| 24043 | done | |
| 24044 | ||
| 24045 | ||
| 24046 | # If the user did not use the arguments to specify the items to instantiate, | |
| 24047 | # then the envvar interface is used. Set only those that are not. | |
| 24048 | # We use the long form for the default assignment because of an extremely | |
| 24049 | # bizarre bug on SunOS 4.1.3. | |
| 24050 | if $ac_need_defaults; then | |
| 24051 | test ${CONFIG_FILES+y} || CONFIG_FILES=$config_files | |
| 24052 | test ${CONFIG_HEADERS+y} || CONFIG_HEADERS=$config_headers | |
| 24053 | test ${CONFIG_COMMANDS+y} || CONFIG_COMMANDS=$config_commands | |
| 24054 | fi | |
| 24055 | ||
| 24056 | # Have a temporary directory for convenience. Make it in the build tree | |
| 24057 | # simply because there is no reason against having it here, and in addition, | |
| 24058 | # creating and moving files from /tmp can sometimes cause problems. | |
| 24059 | # Hook for its removal unless debugging. | |
| 24060 | # Note that there is a small window in which the directory will not be cleaned: | |
| 24061 | # after its creation but before its name has been assigned to '$tmp'. | |
| 24062 | $debug || | |
| 24063 | { | |
| 24064 | tmp= ac_tmp= | |
| 24065 | trap 'exit_status=$? | |
| 24066 | : "${ac_tmp:=$tmp}" | |
| 24067 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status | |
| 24068 | ' 0 | |
| 24069 | trap 'as_fn_exit 1' 1 2 13 15 | |
| 24070 | } | |
| 24071 | # Create a (secure) tmp directory for tmp files. | |
| 24072 | ||
| 24073 | { | |
| 24074 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && | |
| 24075 | test -d "$tmp" | |
| 24076 | } || | |
| 24077 | { | |
| 24078 | tmp=./conf$$-$RANDOM | |
| 24079 | (umask 077 && mkdir "$tmp") | |
| 24080 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 | |
| 24081 | ac_tmp=$tmp | |
| 24082 | ||
| 24083 | # Set up the scripts for CONFIG_FILES section. | |
| 24084 | # No need to generate them if there are no CONFIG_FILES. | |
| 24085 | # This happens for instance with './config.status config.h'. | |
| 24086 | if test -n "$CONFIG_FILES"; then | |
| 24087 | ||
| 24088 | ||
| 24089 | ac_cr=`echo X | tr X '\015'` | |
| 24090 | # On cygwin, bash can eat \r inside `` if the user requested igncr. | |
| 24091 | # But we know of no other shell where ac_cr would be empty at this | |
| 24092 | # point, so we can use a bashism as a fallback. | |
| 24093 | if test "x$ac_cr" = x; then | |
| 24094 | eval ac_cr=\$\'\\r\' | |
| 24095 | fi | |
| 24096 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` | |
| 24097 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then | |
| 24098 | ac_cs_awk_cr='\\r' | |
| 24099 | else | |
| 24100 | ac_cs_awk_cr=$ac_cr | |
| 24101 | fi | |
| 24102 | ||
| 24103 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && | |
| 24104 | _ACEOF | |
| 24105 | ||
| 24106 | ||
| 24107 | { | |
| 24108 | echo "cat >conf$$subs.awk <<_ACEOF" && | |
| 24109 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && | |
| 24110 | echo "_ACEOF" | |
| 24111 | } >conf$$subs.sh || | |
| 24112 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 | |
| 24113 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` | |
| 24114 | ac_delim='%!_!# ' | |
| 24115 | for ac_last_try in false false false false false :; do | |
| 24116 | . ./conf$$subs.sh || | |
| 24117 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 | |
| 24118 | ||
| 24119 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` | |
| 24120 | if test $ac_delim_n = $ac_delim_num; then | |
| 24121 | break | |
| 24122 | elif $ac_last_try; then | |
| 24123 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 | |
| 24124 | else | |
| 24125 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
| 24126 | fi | |
| 24127 | done | |
| 24128 | rm -f conf$$subs.sh | |
| 24129 | ||
| 24130 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
| 24131 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && | |
| 24132 | _ACEOF | |
| 24133 | sed -n ' | |
| 24134 | h | |
| 24135 | s/^/S["/; s/!.*/"]=/ | |
| 24136 | p | |
| 24137 | g | |
| 24138 | s/^[^!]*!// | |
| 24139 | :repl | |
| 24140 | t repl | |
| 24141 | s/'"$ac_delim"'$// | |
| 24142 | t delim | |
| 24143 | :nl | |
| 24144 | h | |
| 24145 | s/\(.\{148\}\)..*/\1/ | |
| 24146 | t more1 | |
| 24147 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ | |
| 24148 | p | |
| 24149 | n | |
| 24150 | b repl | |
| 24151 | :more1 | |
| 24152 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
| 24153 | p | |
| 24154 | g | |
| 24155 | s/.\{148\}// | |
| 24156 | t nl | |
| 24157 | :delim | |
| 24158 | h | |
| 24159 | s/\(.\{148\}\)..*/\1/ | |
| 24160 | t more2 | |
| 24161 | s/["\\]/\\&/g; s/^/"/; s/$/"/ | |
| 24162 | p | |
| 24163 | b | |
| 24164 | :more2 | |
| 24165 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ | |
| 24166 | p | |
| 24167 | g | |
| 24168 | s/.\{148\}// | |
| 24169 | t delim | |
| 24170 | ' <conf$$subs.awk | sed ' | |
| 24171 | /^[^""]/{ | |
| 24172 | N | |
| 24173 | s/\n// | |
| 24174 | } | |
| 24175 | ' >>$CONFIG_STATUS || ac_write_fail=1 | |
| 24176 | rm -f conf$$subs.awk | |
| 24177 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
| 24178 | _ACAWK | |
| 24179 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && | |
| 24180 | for (key in S) S_is_set[key] = 1 | |
| 24181 | FS = "\a" | |
| 24182 | ||
| 24183 | } | |
| 24184 | { | |
| 24185 | line = $ 0 | |
| 24186 | nfields = split(line, field, "@") | |
| 24187 | substed = 0 | |
| 24188 | len = length(field[1]) | |
| 24189 | for (i = 2; i < nfields; i++) { | |
| 24190 | key = field[i] | |
| 24191 | keylen = length(key) | |
| 24192 | if (S_is_set[key]) { | |
| 24193 | value = S[key] | |
| 24194 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) | |
| 24195 | len += length(value) + length(field[++i]) | |
| 24196 | substed = 1 | |
| 24197 | } else | |
| 24198 | len += 1 + keylen | |
| 24199 | } | |
| 24200 | ||
| 24201 | print line | |
| 24202 | } | |
| 24203 | ||
| 24204 | _ACAWK | |
| 24205 | _ACEOF | |
| 24206 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
| 24207 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then | |
| 24208 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" | |
| 24209 | else | |
| 24210 | cat | |
| 24211 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ | |
| 24212 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 | |
| 24213 | _ACEOF | |
| 24214 | ||
| 24215 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), | |
| 24216 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and | |
| 24217 | # trailing colons and then remove the whole line if VPATH becomes empty | |
| 24218 | # (actually we leave an empty line to preserve line numbers). | |
| 24219 | if test "x$srcdir" = x.; then | |
| 24220 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ | |
| 24221 | h | |
| 24222 | s/// | |
| 24223 | s/^/:/ | |
| 24224 | s/[ ]*$/:/ | |
| 24225 | s/:\$(srcdir):/:/g | |
| 24226 | s/:\${srcdir}:/:/g | |
| 24227 | s/:@srcdir@:/:/g | |
| 24228 | s/^:*// | |
| 24229 | s/:*$// | |
| 24230 | x | |
| 24231 | s/\(=[ ]*\).*/\1/ | |
| 24232 | G | |
| 24233 | s/\n// | |
| 24234 | s/^[^=]*=[ ]*$// | |
| 24235 | }' | |
| 24236 | fi | |
| 24237 | ||
| 24238 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
| 24239 | fi # test -n "$CONFIG_FILES" | |
| 24240 | ||
| 24241 | # Set up the scripts for CONFIG_HEADERS section. | |
| 24242 | # No need to generate them if there are no CONFIG_HEADERS. | |
| 24243 | # This happens for instance with './config.status Makefile'. | |
| 24244 | if test -n "$CONFIG_HEADERS"; then | |
| 24245 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || | |
| 24246 | BEGIN { | |
| 24247 | _ACEOF | |
| 24248 | ||
| 24249 | # Transform confdefs.h into an awk script 'defines.awk', embedded as | |
| 24250 | # here-document in config.status, that substitutes the proper values into | |
| 24251 | # config.h.in to produce config.h. | |
| 24252 | ||
| 24253 | # Create a delimiter string that does not exist in confdefs.h, to ease | |
| 24254 | # handling of long lines. | |
| 24255 | ac_delim='%!_!# ' | |
| 24256 | for ac_last_try in false false :; do | |
| 24257 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` | |
| 24258 | if test -z "$ac_tt"; then | |
| 24259 | break | |
| 24260 | elif $ac_last_try; then | |
| 24261 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 | |
| 24262 | else | |
| 24263 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " | |
| 24264 | fi | |
| 24265 | done | |
| 24266 | ||
| 24267 | # For the awk script, D is an array of macro values keyed by name, | |
| 24268 | # likewise P contains macro parameters if any. Preserve backslash | |
| 24269 | # newline sequences. | |
| 24270 | ||
| 24271 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* | |
| 24272 | sed -n ' | |
| 24273 | s/.\{148\}/&'"$ac_delim"'/g | |
| 24274 | t rset | |
| 24275 | :rset | |
| 24276 | s/^[ ]*#[ ]*define[ ][ ]*/ / | |
| 24277 | t def | |
| 24278 | d | |
| 24279 | :def | |
| 24280 | s/\\$// | |
| 24281 | t bsnl | |
| 24282 | s/["\\]/\\&/g | |
| 24283 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
| 24284 | D["\1"]=" \3"/p | |
| 24285 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p | |
| 24286 | d | |
| 24287 | :bsnl | |
| 24288 | s/["\\]/\\&/g | |
| 24289 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ | |
| 24290 | D["\1"]=" \3\\\\\\n"\\/p | |
| 24291 | t cont | |
| 24292 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p | |
| 24293 | t cont | |
| 24294 | d | |
| 24295 | :cont | |
| 24296 | n | |
| 24297 | s/.\{148\}/&'"$ac_delim"'/g | |
| 24298 | t clear | |
| 24299 | :clear | |
| 24300 | s/\\$// | |
| 24301 | t bsnlc | |
| 24302 | s/["\\]/\\&/g; s/^/"/; s/$/"/p | |
| 24303 | d | |
| 24304 | :bsnlc | |
| 24305 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p | |
| 24306 | b cont | |
| 24307 | ' <confdefs.h | sed ' | |
| 24308 | s/'"$ac_delim"'/"\\\ | |
| 24309 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 | |
| 24310 | ||
| 24311 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
| 24312 | for (key in D) D_is_set[key] = 1 | |
| 24313 | FS = "\a" | |
| 24314 | } | |
| 24315 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { | |
| 24316 | line = \$ 0 | |
| 24317 | split(line, arg, " ") | |
| 24318 | if (arg[1] == "#") { | |
| 24319 | defundef = arg[2] | |
| 24320 | mac1 = arg[3] | |
| 24321 | } else { | |
| 24322 | defundef = substr(arg[1], 2) | |
| 24323 | mac1 = arg[2] | |
| 24324 | } | |
| 24325 | split(mac1, mac2, "(") #) | |
| 24326 | macro = mac2[1] | |
| 24327 | prefix = substr(line, 1, index(line, defundef) - 1) | |
| 24328 | if (D_is_set[macro]) { | |
| 24329 | # Preserve the white space surrounding the "#". | |
| 24330 | print prefix "define", macro P[macro] D[macro] | |
| 24331 | next | |
| 24332 | } else { | |
| 24333 | # Replace #undef with comments. This is necessary, for example, | |
| 24334 | # in the case of _POSIX_SOURCE, which is predefined and required | |
| 24335 | # on some systems where configure will not decide to define it. | |
| 24336 | if (defundef == "undef") { | |
| 24337 | print "/*", prefix defundef, macro, "*/" | |
| 24338 | next | |
| 24339 | } | |
| 24340 | } | |
| 24341 | } | |
| 24342 | { print } | |
| 24343 | _ACAWK | |
| 24344 | _ACEOF | |
| 24345 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
| 24346 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 | |
| 24347 | fi # test -n "$CONFIG_HEADERS" | |
| 24348 | ||
| 24349 | ||
| 24350 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" | |
| 24351 | shift | |
| 24352 | for ac_tag | |
| 24353 | do | |
| 24354 | case $ac_tag in | |
| 24355 | :[FHLC]) ac_mode=$ac_tag; continue;; | |
| 24356 | esac | |
| 24357 | case $ac_mode$ac_tag in | |
| 24358 | :[FHL]*:*);; | |
| 24359 | :L* | :C*:*) as_fn_error $? "invalid tag '$ac_tag'" "$LINENO" 5;; | |
| 24360 | :[FH]-) ac_tag=-:-;; | |
| 24361 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; | |
| 24362 | esac | |
| 24363 | ac_save_IFS=$IFS | |
| 24364 | IFS=: | |
| 24365 | set x $ac_tag | |
| 24366 | IFS=$ac_save_IFS | |
| 24367 | shift | |
| 24368 | ac_file=$1 | |
| 24369 | shift | |
| 24370 | ||
| 24371 | case $ac_mode in | |
| 24372 | :L) ac_source=$1;; | |
| 24373 | :[FH]) | |
| 24374 | ac_file_inputs= | |
| 24375 | for ac_f | |
| 24376 | do | |
| 24377 | case $ac_f in | |
| 24378 | -) ac_f="$ac_tmp/stdin";; | |
| 24379 | *) # Look for the file first in the build tree, then in the source tree | |
| 24380 | # (if the path is not absolute). The absolute path cannot be DOS-style, | |
| 24381 | # because $ac_f cannot contain ':'. | |
| 24382 | test -f "$ac_f" || | |
| 24383 | case $ac_f in | |
| 24384 | [\\/$]*) false;; | |
| 24385 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; | |
| 24386 | esac || | |
| 24387 | as_fn_error 1 "cannot find input file: '$ac_f'" "$LINENO" 5;; | |
| 24388 | esac | |
| 24389 | case $ac_f in *\'*) ac_f=`printf "%s\n" "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac | |
| 24390 | as_fn_append ac_file_inputs " '$ac_f'" | |
| 24391 | done | |
| 24392 | ||
| 24393 | # Let's still pretend it is 'configure' which instantiates (i.e., don't | |
| 24394 | # use $as_me), people would be surprised to read: | |
| 24395 | # /* config.h. Generated by config.status. */ | |
| 24396 | configure_input='Generated from '` | |
| 24397 | printf "%s\n" "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' | |
| 24398 | `' by configure.' | |
| 24399 | if test x"$ac_file" != x-; then | |
| 24400 | configure_input="$ac_file. $configure_input" | |
| 24401 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 | |
| 24402 | printf "%s\n" "$as_me: creating $ac_file" >&6;} | |
| 24403 | fi | |
| 24404 | # Neutralize special characters interpreted by sed in replacement strings. | |
| 24405 | case $configure_input in #( | |
| 24406 | *\&* | *\|* | *\\* ) | |
| 24407 | ac_sed_conf_input=`printf "%s\n" "$configure_input" | | |
| 24408 | sed 's/[\\\\&|]/\\\\&/g'`;; #( | |
| 24409 | *) ac_sed_conf_input=$configure_input;; | |
| 24410 | esac | |
| 24411 | ||
| 24412 | case $ac_tag in | |
| 24413 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ | |
| 24414 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; | |
| 24415 | esac | |
| 24416 | ;; | |
| 24417 | esac | |
| 24418 | ||
| 24419 | ac_dir=`$as_dirname -- "$ac_file" || | |
| 24420 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ | |
| 24421 | X"$ac_file" : 'X\(//\)[^/]' \| \ | |
| 24422 | X"$ac_file" : 'X\(//\)$' \| \ | |
| 24423 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || | |
| 24424 | printf "%s\n" X"$ac_file" | | |
| 24425 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ | |
| 24426 | s//\1/ | |
| 24427 | q | |
| 24428 | } | |
| 24429 | /^X\(\/\/\)[^/].*/{ | |
| 24430 | s//\1/ | |
| 24431 | q | |
| 24432 | } | |
| 24433 | /^X\(\/\/\)$/{ | |
| 24434 | s//\1/ | |
| 24435 | q | |
| 24436 | } | |
| 24437 | /^X\(\/\).*/{ | |
| 24438 | s//\1/ | |
| 24439 | q | |
| 24440 | } | |
| 24441 | s/.*/./; q'` | |
| 24442 | as_dir="$ac_dir"; as_fn_mkdir_p | |
| 24443 | ac_builddir=. | |
| 24444 | ||
| 24445 | case "$ac_dir" in | |
| 24446 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
| 24447 | *) | |
| 24448 | ac_dir_suffix=/`printf "%s\n" "$ac_dir" | sed 's|^\.[\\/]||'` | |
| 24449 | # A ".." for each directory in $ac_dir_suffix. | |
| 24450 | ac_top_builddir_sub=`printf "%s\n" "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` | |
| 24451 | case $ac_top_builddir_sub in | |
| 24452 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; | |
| 24453 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; | |
| 24454 | esac ;; | |
| 24455 | esac | |
| 24456 | ac_abs_top_builddir=$ac_pwd | |
| 24457 | ac_abs_builddir=$ac_pwd$ac_dir_suffix | |
| 24458 | # for backward compatibility: | |
| 24459 | ac_top_builddir=$ac_top_build_prefix | |
| 24460 | ||
| 24461 | case $srcdir in | |
| 24462 | .) # We are building in place. | |
| 24463 | ac_srcdir=. | |
| 24464 | ac_top_srcdir=$ac_top_builddir_sub | |
| 24465 | ac_abs_top_srcdir=$ac_pwd ;; | |
| 24466 | [\\/]* | ?:[\\/]* ) # Absolute name. | |
| 24467 | ac_srcdir=$srcdir$ac_dir_suffix; | |
| 24468 | ac_top_srcdir=$srcdir | |
| 24469 | ac_abs_top_srcdir=$srcdir ;; | |
| 24470 | *) # Relative name. | |
| 24471 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix | |
| 24472 | ac_top_srcdir=$ac_top_build_prefix$srcdir | |
| 24473 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; | |
| 24474 | esac | |
| 24475 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix | |
| 24476 | ||
| 24477 | ||
| 24478 | case $ac_mode in | |
| 24479 | :F) | |
| 24480 | # | |
| 24481 | # CONFIG_FILE | |
| 24482 | # | |
| 24483 | ||
| 24484 | case $INSTALL in | |
| 24485 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; | |
| 24486 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; | |
| 24487 | esac | |
| 24488 | ac_MKDIR_P=$MKDIR_P | |
| 24489 | case $MKDIR_P in | |
| 24490 | [\\/$]* | ?:[\\/]* ) ;; | |
| 24491 | */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; | |
| 24492 | esac | |
| 24493 | _ACEOF | |
| 24494 | ||
| 24495 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
| 24496 | # If the template does not know about datarootdir, expand it. | |
| 24497 | # FIXME: This hack should be removed a few years after 2.60. | |
| 24498 | ac_datarootdir_hack=; ac_datarootdir_seen= | |
| 24499 | ac_sed_dataroot=' | |
| 24500 | /datarootdir/ { | |
| 24501 | p | |
| 24502 | q | |
| 24503 | } | |
| 24504 | /@datadir@/p | |
| 24505 | /@docdir@/p | |
| 24506 | /@infodir@/p | |
| 24507 | /@localedir@/p | |
| 24508 | /@mandir@/p' | |
| 24509 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in | |
| 24510 | *datarootdir*) ac_datarootdir_seen=yes;; | |
| 24511 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) | |
| 24512 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 | |
| 24513 | printf "%s\n" "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} | |
| 24514 | _ACEOF | |
| 24515 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
| 24516 | ac_datarootdir_hack=' | |
| 24517 | s&@datadir@&$datadir&g | |
| 24518 | s&@docdir@&$docdir&g | |
| 24519 | s&@infodir@&$infodir&g | |
| 24520 | s&@localedir@&$localedir&g | |
| 24521 | s&@mandir@&$mandir&g | |
| 24522 | s&\\\${datarootdir}&$datarootdir&g' ;; | |
| 24523 | esac | |
| 24524 | _ACEOF | |
| 24525 | ||
| 24526 | # Neutralize VPATH when '$srcdir' = '.'. | |
| 24527 | # Shell code in configure.ac might set extrasub. | |
| 24528 | # FIXME: do we really want to maintain this feature? | |
| 24529 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 | |
| 24530 | ac_sed_extra="$ac_vpsub | |
| 24531 | $extrasub | |
| 24532 | _ACEOF | |
| 24533 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 | |
| 24534 | :t | |
| 24535 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b | |
| 24536 | s|@configure_input@|$ac_sed_conf_input|;t t | |
| 24537 | s&@top_builddir@&$ac_top_builddir_sub&;t t | |
| 24538 | s&@top_build_prefix@&$ac_top_build_prefix&;t t | |
| 24539 | s&@srcdir@&$ac_srcdir&;t t | |
| 24540 | s&@abs_srcdir@&$ac_abs_srcdir&;t t | |
| 24541 | s&@top_srcdir@&$ac_top_srcdir&;t t | |
| 24542 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t | |
| 24543 | s&@builddir@&$ac_builddir&;t t | |
| 24544 | s&@abs_builddir@&$ac_abs_builddir&;t t | |
| 24545 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t | |
| 24546 | s&@INSTALL@&$ac_INSTALL&;t t | |
| 24547 | s&@MKDIR_P@&$ac_MKDIR_P&;t t | |
| 24548 | $ac_datarootdir_hack | |
| 24549 | " | |
| 24550 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ | |
| 24551 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
| 24552 | ||
| 24553 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && | |
| 24554 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && | |
| 24555 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ | |
| 24556 | "$ac_tmp/out"`; test -z "$ac_out"; } && | |
| 24557 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable 'datarootdir' | |
| 24558 | which seems to be undefined. Please make sure it is defined" >&5 | |
| 24559 | printf "%s\n" "$as_me: WARNING: $ac_file contains a reference to the variable 'datarootdir' | |
| 24560 | which seems to be undefined. Please make sure it is defined" >&2;} | |
| 24561 | ||
| 24562 | rm -f "$ac_tmp/stdin" | |
| 24563 | case $ac_file in | |
| 24564 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; | |
| 24565 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; | |
| 24566 | esac \ | |
| 24567 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
| 24568 | ;; | |
| 24569 | :H) | |
| 24570 | # | |
| 24571 | # CONFIG_HEADER | |
| 24572 | # | |
| 24573 | if test x"$ac_file" != x-; then | |
| 24574 | { | |
| 24575 | printf "%s\n" "/* $configure_input */" >&1 \ | |
| 24576 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" | |
| 24577 | } >"$ac_tmp/config.h" \ | |
| 24578 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
| 24579 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then | |
| 24580 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 | |
| 24581 | printf "%s\n" "$as_me: $ac_file is unchanged" >&6;} | |
| 24582 | else | |
| 24583 | rm -f "$ac_file" | |
| 24584 | mv "$ac_tmp/config.h" "$ac_file" \ | |
| 24585 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 | |
| 24586 | fi | |
| 24587 | else | |
| 24588 | printf "%s\n" "/* $configure_input */" >&1 \ | |
| 24589 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ | |
| 24590 | || as_fn_error $? "could not create -" "$LINENO" 5 | |
| 24591 | fi | |
| 24592 | ;; | |
| 24593 | ||
| 24594 | :C) { printf "%s\n" "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 | |
| 24595 | printf "%s\n" "$as_me: executing $ac_file commands" >&6;} | |
| 24596 | ;; | |
| 24597 | esac | |
| 24598 | ||
| 24599 | ||
| 24600 | case $ac_file$ac_mode in | |
| 24601 | "po-directories":C) | |
| 24602 | for ac_file in $CONFIG_FILES; do | |
| 24603 | # Support "outfile[:infile[:infile...]]" | |
| 24604 | case "$ac_file" in | |
| 24605 | *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;; | |
| 24606 | esac | |
| 24607 | # PO directories have a Makefile.in generated from Makefile.in.in. | |
| 24608 | case "$ac_file" in */Makefile.in) | |
| 24609 | # Adjust a relative srcdir. | |
| 24610 | ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'` | |
| 24611 | ac_dir_suffix=/`echo "$ac_dir"|sed 's%^\./%%'` | |
| 24612 | ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'` | |
| 24613 | # In autoconf-2.13 it is called $ac_given_srcdir. | |
| 24614 | # In autoconf-2.50 it is called $srcdir. | |
| 24615 | test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir" | |
| 24616 | case "$ac_given_srcdir" in | |
| 24617 | .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;; | |
| 24618 | /*) top_srcdir="$ac_given_srcdir" ;; | |
| 24619 | *) top_srcdir="$ac_dots$ac_given_srcdir" ;; | |
| 24620 | esac | |
| 24621 | # Treat a directory as a PO directory if and only if it has a | |
| 24622 | # POTFILES.in file. This allows packages to have multiple PO | |
| 24623 | # directories under different names or in different locations. | |
| 24624 | if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then | |
| 24625 | rm -f "$ac_dir/POTFILES" | |
| 24626 | test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES" | |
| 24627 | gt_tab=`printf '\t'` | |
| 24628 | 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" | |
| 24629 | POMAKEFILEDEPS="POTFILES.in" | |
| 24630 | # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend | |
| 24631 | # on $ac_dir but don't depend on user-specified configuration | |
| 24632 | # parameters. | |
| 24633 | if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then | |
| 24634 | # The LINGUAS file contains the set of available languages. | |
| 24635 | if test -n "$OBSOLETE_ALL_LINGUAS"; then | |
| 24636 | test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete" | |
| 24637 | fi | |
| 24638 | ALL_LINGUAS=`sed -e "/^#/d" -e "s/#.*//" "$ac_given_srcdir/$ac_dir/LINGUAS"` | |
| 24639 | POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS" | |
| 24640 | else | |
| 24641 | # The set of available languages was given in configure.in. | |
| 24642 | ALL_LINGUAS=$OBSOLETE_ALL_LINGUAS | |
| 24643 | fi | |
| 24644 | # Compute POFILES | |
| 24645 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po) | |
| 24646 | # Compute UPDATEPOFILES | |
| 24647 | # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update) | |
| 24648 | # Compute DUMMYPOFILES | |
| 24649 | # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop) | |
| 24650 | # Compute GMOFILES | |
| 24651 | # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo) | |
| 24652 | case "$ac_given_srcdir" in | |
| 24653 | .) srcdirpre= ;; | |
| 24654 | *) srcdirpre='$(srcdir)/' ;; | |
| 24655 | esac | |
| 24656 | POFILES= | |
| 24657 | UPDATEPOFILES= | |
| 24658 | DUMMYPOFILES= | |
| 24659 | GMOFILES= | |
| 24660 | for lang in $ALL_LINGUAS; do | |
| 24661 | POFILES="$POFILES $srcdirpre$lang.po" | |
| 24662 | UPDATEPOFILES="$UPDATEPOFILES $lang.po-update" | |
| 24663 | DUMMYPOFILES="$DUMMYPOFILES $lang.nop" | |
| 24664 | GMOFILES="$GMOFILES $srcdirpre$lang.gmo" | |
| 24665 | done | |
| 24666 | # CATALOGS depends on both $ac_dir and the user's LINGUAS | |
| 24667 | # environment variable. | |
| 24668 | INST_LINGUAS= | |
| 24669 | if test -n "$ALL_LINGUAS"; then | |
| 24670 | for presentlang in $ALL_LINGUAS; do | |
| 24671 | useit=no | |
| 24672 | if test "%UNSET%" != "$LINGUAS"; then | |
| 24673 | desiredlanguages="$LINGUAS" | |
| 24674 | else | |
| 24675 | desiredlanguages="$ALL_LINGUAS" | |
| 24676 | fi | |
| 24677 | for desiredlang in $desiredlanguages; do | |
| 24678 | # Use the presentlang catalog if desiredlang is | |
| 24679 | # a. equal to presentlang, or | |
| 24680 | # b. a variant of presentlang (because in this case, | |
| 24681 | # presentlang can be used as a fallback for messages | |
| 24682 | # which are not translated in the desiredlang catalog). | |
| 24683 | case "$desiredlang" in | |
| 24684 | "$presentlang" | "$presentlang"_* | "$presentlang".* | "$presentlang"@*) | |
| 24685 | useit=yes | |
| 24686 | ;; | |
| 24687 | esac | |
| 24688 | done | |
| 24689 | if test $useit = yes; then | |
| 24690 | INST_LINGUAS="$INST_LINGUAS $presentlang" | |
| 24691 | fi | |
| 24692 | done | |
| 24693 | fi | |
| 24694 | CATALOGS= | |
| 24695 | if test -n "$INST_LINGUAS"; then | |
| 24696 | for lang in $INST_LINGUAS; do | |
| 24697 | CATALOGS="$CATALOGS $lang.gmo" | |
| 24698 | done | |
| 24699 | fi | |
| 24700 | test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile" | |
| 24701 | 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" | |
| 24702 | for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do | |
| 24703 | if test -f "$f"; then | |
| 24704 | case "$f" in | |
| 24705 | *.orig | *.bak | *~) ;; | |
| 24706 | *) cat "$f" >> "$ac_dir/Makefile" ;; | |
| 24707 | esac | |
| 24708 | fi | |
| 24709 | done | |
| 24710 | fi | |
| 24711 | ;; | |
| 24712 | esac | |
| 24713 | done ;; | |
| 24714 | "stamp-h":C) echo timestamp > stamp-h ;; | |
| 24715 | ||
| 24716 | esac | |
| 24717 | done # for ac_tag | |
| 24718 | ||
| 24719 | ||
| 24720 | as_fn_exit 0 | |
| 24721 | _ACEOF | |
| 24722 | ac_clean_files=$ac_clean_files_save | |
| 24723 | ||
| 24724 | test $ac_write_fail = 0 || | |
| 24725 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 | |
| 24726 | ||
| 24727 | ||
| 24728 | # configure is writing to config.log, and then calls config.status. | |
| 24729 | # config.status does its own redirection, appending to config.log. | |
| 24730 | # Unfortunately, on DOS this fails, as config.log is still kept open | |
| 24731 | # by configure, so config.status won't be able to write to it; its | |
| 24732 | # output is simply discarded. So we exec the FD to /dev/null, | |
| 24733 | # effectively closing config.log, so it can be properly (re)opened and | |
| 24734 | # appended to by config.status. When coming back to configure, we | |
| 24735 | # need to make the FD available again. | |
| 24736 | if test "$no_create" != yes; then | |
| 24737 | ac_cs_success=: | |
| 24738 | ac_config_status_args= | |
| 24739 | test "$silent" = yes && | |
| 24740 | ac_config_status_args="$ac_config_status_args --quiet" | |
| 24741 | exec 5>/dev/null | |
| 24742 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false | |
| 24743 | exec 5>>config.log | |
| 24744 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which | |
| 24745 | # would make configure fail if this is the last instruction. | |
| 24746 | $ac_cs_success || as_fn_exit 1 | |
| 24747 | fi | |
| 24748 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then | |
| 24749 | { printf "%s\n" "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 | |
| 24750 | printf "%s\n" "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} | |
| 24751 | fi | |
| 24752 | ||
| 24753 |