| 1 | #! /bin/sh |
| 2 | # Guess values for system-dependent variables and create Makefiles. |
| 3 | # Generated by GNU Autoconf 2.69. |
| 4 | # |
| 5 | # |
| 6 | # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. |
| 7 | # |
| 8 | # |
| 9 | # This configure script is free software; the Free Software Foundation |
| 10 | # gives unlimited permission to copy, distribute and modify it. |
| 11 | ## -------------------- ## |
| 12 | ## M4sh Initialization. ## |
| 13 | ## -------------------- ## |
| 14 | |
| 15 | # Be more Bourne compatible |
| 16 | DUALCASE=1; export DUALCASE # for MKS sh |
| 17 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : |
| 18 | emulate sh |
| 19 | NULLCMD=: |
| 20 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
| 21 | # is contrary to our usage. Disable this feature. |
| 22 | alias -g '${1+"$@"}'='"$@"' |
| 23 | setopt NO_GLOB_SUBST |
| 24 | else |
| 25 | case `(set -o) 2>/dev/null` in #( |
| 26 | *posix*) : |
| 27 | set -o posix ;; #( |
| 28 | *) : |
| 29 | ;; |
| 30 | esac |
| 31 | fi |
| 32 | |
| 33 | |
| 34 | as_nl=' |
| 35 | ' |
| 36 | export as_nl |
| 37 | # Printing a long string crashes Solaris 7 /usr/bin/printf. |
| 38 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' |
| 39 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo |
| 40 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo |
| 41 | # Prefer a ksh shell builtin over an external printf program on Solaris, |
| 42 | # but without wasting forks for bash or zsh. |
| 43 | if test -z "$BASH_VERSION$ZSH_VERSION" \ |
| 44 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then |
| 45 | as_echo='print -r --' |
| 46 | as_echo_n='print -rn --' |
| 47 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then |
| 48 | as_echo='printf %s\n' |
| 49 | as_echo_n='printf %s' |
| 50 | else |
| 51 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then |
| 52 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' |
| 53 | as_echo_n='/usr/ucb/echo -n' |
| 54 | else |
| 55 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' |
| 56 | as_echo_n_body='eval |
| 57 | arg=$1; |
| 58 | case $arg in #( |
| 59 | *"$as_nl"*) |
| 60 | expr "X$arg" : "X\\(.*\\)$as_nl"; |
| 61 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; |
| 62 | esac; |
| 63 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" |
| 64 | ' |
| 65 | export as_echo_n_body |
| 66 | as_echo_n='sh -c $as_echo_n_body as_echo' |
| 67 | fi |
| 68 | export as_echo_body |
| 69 | as_echo='sh -c $as_echo_body as_echo' |
| 70 | fi |
| 71 | |
| 72 | # The user is always right. |
| 73 | if test "${PATH_SEPARATOR+set}" != set; then |
| 74 | PATH_SEPARATOR=: |
| 75 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { |
| 76 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || |
| 77 | PATH_SEPARATOR=';' |
| 78 | } |
| 79 | fi |
| 80 | |
| 81 | |
| 82 | # IFS |
| 83 | # We need space, tab and new line, in precisely that order. Quoting is |
| 84 | # there to prevent editors from complaining about space-tab. |
| 85 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word |
| 86 | # splitting by setting IFS to empty value.) |
| 87 | IFS=" "" $as_nl" |
| 88 | |
| 89 | # Find who we are. Look in the path if we contain no directory separator. |
| 90 | as_myself= |
| 91 | case $0 in #(( |
| 92 | *[\\/]* ) as_myself=$0 ;; |
| 93 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 94 | for as_dir in $PATH |
| 95 | do |
| 96 | IFS=$as_save_IFS |
| 97 | test -z "$as_dir" && as_dir=. |
| 98 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break |
| 99 | done |
| 100 | IFS=$as_save_IFS |
| 101 | |
| 102 | ;; |
| 103 | esac |
| 104 | # We did not find ourselves, most probably we were run as `sh COMMAND' |
| 105 | # in which case we are not to be found in the path. |
| 106 | if test "x$as_myself" = x; then |
| 107 | as_myself=$0 |
| 108 | fi |
| 109 | if test ! -f "$as_myself"; then |
| 110 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 |
| 111 | exit 1 |
| 112 | fi |
| 113 | |
| 114 | # Unset variables that we do not need and which cause bugs (e.g. in |
| 115 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" |
| 116 | # suppresses any "Segmentation fault" message there. '((' could |
| 117 | # trigger a bug in pdksh 5.2.14. |
| 118 | for as_var in BASH_ENV ENV MAIL MAILPATH |
| 119 | do eval test x\${$as_var+set} = xset \ |
| 120 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : |
| 121 | done |
| 122 | PS1='$ ' |
| 123 | PS2='> ' |
| 124 | PS4='+ ' |
| 125 | |
| 126 | # NLS nuisances. |
| 127 | LC_ALL=C |
| 128 | export LC_ALL |
| 129 | LANGUAGE=C |
| 130 | export LANGUAGE |
| 131 | |
| 132 | # CDPATH. |
| 133 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH |
| 134 | |
| 135 | # Use a proper internal environment variable to ensure we don't fall |
| 136 | # into an infinite loop, continuously re-executing ourselves. |
| 137 | if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then |
| 138 | _as_can_reexec=no; export _as_can_reexec; |
| 139 | # We cannot yet assume a decent shell, so we have to provide a |
| 140 | # neutralization value for shells without unset; and this also |
| 141 | # works around shells that cannot unset nonexistent variables. |
| 142 | # Preserve -v and -x to the replacement shell. |
| 143 | BASH_ENV=/dev/null |
| 144 | ENV=/dev/null |
| 145 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV |
| 146 | case $- in # (((( |
| 147 | *v*x* | *x*v* ) as_opts=-vx ;; |
| 148 | *v* ) as_opts=-v ;; |
| 149 | *x* ) as_opts=-x ;; |
| 150 | * ) as_opts= ;; |
| 151 | esac |
| 152 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} |
| 153 | # Admittedly, this is quite paranoid, since all the known shells bail |
| 154 | # out after a failed `exec'. |
| 155 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 |
| 156 | as_fn_exit 255 |
| 157 | fi |
| 158 | # We don't want this to propagate to other subprocesses. |
| 159 | { _as_can_reexec=; unset _as_can_reexec;} |
| 160 | if test "x$CONFIG_SHELL" = x; then |
| 161 | as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : |
| 162 | emulate sh |
| 163 | NULLCMD=: |
| 164 | # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which |
| 165 | # is contrary to our usage. Disable this feature. |
| 166 | alias -g '\${1+\"\$@\"}'='\"\$@\"' |
| 167 | setopt NO_GLOB_SUBST |
| 168 | else |
| 169 | case \`(set -o) 2>/dev/null\` in #( |
| 170 | *posix*) : |
| 171 | set -o posix ;; #( |
| 172 | *) : |
| 173 | ;; |
| 174 | esac |
| 175 | fi |
| 176 | " |
| 177 | as_required="as_fn_return () { (exit \$1); } |
| 178 | as_fn_success () { as_fn_return 0; } |
| 179 | as_fn_failure () { as_fn_return 1; } |
| 180 | as_fn_ret_success () { return 0; } |
| 181 | as_fn_ret_failure () { return 1; } |
| 182 | |
| 183 | exitcode=0 |
| 184 | as_fn_success || { exitcode=1; echo as_fn_success failed.; } |
| 185 | as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } |
| 186 | as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } |
| 187 | as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } |
| 188 | if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : |
| 189 | |
| 190 | else |
| 191 | exitcode=1; echo positional parameters were not saved. |
| 192 | fi |
| 193 | test x\$exitcode = x0 || exit 1 |
| 194 | test -x / || exit 1" |
| 195 | as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO |
| 196 | as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO |
| 197 | eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && |
| 198 | test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 |
| 199 | test \$(( 1 + 1 )) = 2 || exit 1" |
| 200 | if (eval "$as_required") 2>/dev/null; then : |
| 201 | as_have_required=yes |
| 202 | else |
| 203 | as_have_required=no |
| 204 | fi |
| 205 | if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : |
| 206 | |
| 207 | else |
| 208 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 209 | as_found=false |
| 210 | for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH |
| 211 | do |
| 212 | IFS=$as_save_IFS |
| 213 | test -z "$as_dir" && as_dir=. |
| 214 | as_found=: |
| 215 | case $as_dir in #( |
| 216 | /*) |
| 217 | for as_base in sh bash ksh sh5; do |
| 218 | # Try only shells that exist, to save several forks. |
| 219 | as_shell=$as_dir/$as_base |
| 220 | if { test -f "$as_shell" || test -f "$as_shell.exe"; } && |
| 221 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : |
| 222 | CONFIG_SHELL=$as_shell as_have_required=yes |
| 223 | if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : |
| 224 | break 2 |
| 225 | fi |
| 226 | fi |
| 227 | done;; |
| 228 | esac |
| 229 | as_found=false |
| 230 | done |
| 231 | $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && |
| 232 | { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : |
| 233 | CONFIG_SHELL=$SHELL as_have_required=yes |
| 234 | fi; } |
| 235 | IFS=$as_save_IFS |
| 236 | |
| 237 | |
| 238 | if test "x$CONFIG_SHELL" != x; then : |
| 239 | export CONFIG_SHELL |
| 240 | # We cannot yet assume a decent shell, so we have to provide a |
| 241 | # neutralization value for shells without unset; and this also |
| 242 | # works around shells that cannot unset nonexistent variables. |
| 243 | # Preserve -v and -x to the replacement shell. |
| 244 | BASH_ENV=/dev/null |
| 245 | ENV=/dev/null |
| 246 | (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV |
| 247 | case $- in # (((( |
| 248 | *v*x* | *x*v* ) as_opts=-vx ;; |
| 249 | *v* ) as_opts=-v ;; |
| 250 | *x* ) as_opts=-x ;; |
| 251 | * ) as_opts= ;; |
| 252 | esac |
| 253 | exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} |
| 254 | # Admittedly, this is quite paranoid, since all the known shells bail |
| 255 | # out after a failed `exec'. |
| 256 | $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 |
| 257 | exit 255 |
| 258 | fi |
| 259 | |
| 260 | if test x$as_have_required = xno; then : |
| 261 | $as_echo "$0: This script requires a shell more modern than all" |
| 262 | $as_echo "$0: the shells that I found on your system." |
| 263 | if test x${ZSH_VERSION+set} = xset ; then |
| 264 | $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" |
| 265 | $as_echo "$0: be upgraded to zsh 4.3.4 or later." |
| 266 | else |
| 267 | $as_echo "$0: Please tell bug-autoconf@gnu.org about your system, |
| 268 | $0: including any error possibly output before this |
| 269 | $0: message. Then install a modern shell, or manually run |
| 270 | $0: the script under such a shell if you do have one." |
| 271 | fi |
| 272 | exit 1 |
| 273 | fi |
| 274 | fi |
| 275 | fi |
| 276 | SHELL=${CONFIG_SHELL-/bin/sh} |
| 277 | export SHELL |
| 278 | # Unset more variables known to interfere with behavior of common tools. |
| 279 | CLICOLOR_FORCE= GREP_OPTIONS= |
| 280 | unset CLICOLOR_FORCE GREP_OPTIONS |
| 281 | |
| 282 | ## --------------------- ## |
| 283 | ## M4sh Shell Functions. ## |
| 284 | ## --------------------- ## |
| 285 | # as_fn_unset VAR |
| 286 | # --------------- |
| 287 | # Portably unset VAR. |
| 288 | as_fn_unset () |
| 289 | { |
| 290 | { eval $1=; unset $1;} |
| 291 | } |
| 292 | as_unset=as_fn_unset |
| 293 | |
| 294 | # as_fn_set_status STATUS |
| 295 | # ----------------------- |
| 296 | # Set $? to STATUS, without forking. |
| 297 | as_fn_set_status () |
| 298 | { |
| 299 | return $1 |
| 300 | } # as_fn_set_status |
| 301 | |
| 302 | # as_fn_exit STATUS |
| 303 | # ----------------- |
| 304 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. |
| 305 | as_fn_exit () |
| 306 | { |
| 307 | set +e |
| 308 | as_fn_set_status $1 |
| 309 | exit $1 |
| 310 | } # as_fn_exit |
| 311 | |
| 312 | # as_fn_mkdir_p |
| 313 | # ------------- |
| 314 | # Create "$as_dir" as a directory, including parents if necessary. |
| 315 | as_fn_mkdir_p () |
| 316 | { |
| 317 | |
| 318 | case $as_dir in #( |
| 319 | -*) as_dir=./$as_dir;; |
| 320 | esac |
| 321 | test -d "$as_dir" || eval $as_mkdir_p || { |
| 322 | as_dirs= |
| 323 | while :; do |
| 324 | case $as_dir in #( |
| 325 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( |
| 326 | *) as_qdir=$as_dir;; |
| 327 | esac |
| 328 | as_dirs="'$as_qdir' $as_dirs" |
| 329 | as_dir=`$as_dirname -- "$as_dir" || |
| 330 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
| 331 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
| 332 | X"$as_dir" : 'X\(//\)$' \| \ |
| 333 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || |
| 334 | $as_echo X"$as_dir" | |
| 335 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
| 336 | s//\1/ |
| 337 | q |
| 338 | } |
| 339 | /^X\(\/\/\)[^/].*/{ |
| 340 | s//\1/ |
| 341 | q |
| 342 | } |
| 343 | /^X\(\/\/\)$/{ |
| 344 | s//\1/ |
| 345 | q |
| 346 | } |
| 347 | /^X\(\/\).*/{ |
| 348 | s//\1/ |
| 349 | q |
| 350 | } |
| 351 | s/.*/./; q'` |
| 352 | test -d "$as_dir" && break |
| 353 | done |
| 354 | test -z "$as_dirs" || eval "mkdir $as_dirs" |
| 355 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
| 356 | |
| 357 | |
| 358 | } # as_fn_mkdir_p |
| 359 | |
| 360 | # as_fn_executable_p FILE |
| 361 | # ----------------------- |
| 362 | # Test if FILE is an executable regular file. |
| 363 | as_fn_executable_p () |
| 364 | { |
| 365 | test -f "$1" && test -x "$1" |
| 366 | } # as_fn_executable_p |
| 367 | # as_fn_append VAR VALUE |
| 368 | # ---------------------- |
| 369 | # Append the text in VALUE to the end of the definition contained in VAR. Take |
| 370 | # advantage of any shell optimizations that allow amortized linear growth over |
| 371 | # repeated appends, instead of the typical quadratic growth present in naive |
| 372 | # implementations. |
| 373 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : |
| 374 | eval 'as_fn_append () |
| 375 | { |
| 376 | eval $1+=\$2 |
| 377 | }' |
| 378 | else |
| 379 | as_fn_append () |
| 380 | { |
| 381 | eval $1=\$$1\$2 |
| 382 | } |
| 383 | fi # as_fn_append |
| 384 | |
| 385 | # as_fn_arith ARG... |
| 386 | # ------------------ |
| 387 | # Perform arithmetic evaluation on the ARGs, and store the result in the |
| 388 | # global $as_val. Take advantage of shells that can avoid forks. The arguments |
| 389 | # must be portable across $(()) and expr. |
| 390 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : |
| 391 | eval 'as_fn_arith () |
| 392 | { |
| 393 | as_val=$(( $* )) |
| 394 | }' |
| 395 | else |
| 396 | as_fn_arith () |
| 397 | { |
| 398 | as_val=`expr "$@" || test $? -eq 1` |
| 399 | } |
| 400 | fi # as_fn_arith |
| 401 | |
| 402 | |
| 403 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
| 404 | # ---------------------------------------- |
| 405 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
| 406 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the |
| 407 | # script with STATUS, using 1 if that was 0. |
| 408 | as_fn_error () |
| 409 | { |
| 410 | as_status=$1; test $as_status -eq 0 && as_status=1 |
| 411 | if test "$4"; then |
| 412 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 413 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 |
| 414 | fi |
| 415 | $as_echo "$as_me: error: $2" >&2 |
| 416 | as_fn_exit $as_status |
| 417 | } # as_fn_error |
| 418 | |
| 419 | if expr a : '\(a\)' >/dev/null 2>&1 && |
| 420 | test "X`expr 00001 : '.*\(...\)'`" = X001; then |
| 421 | as_expr=expr |
| 422 | else |
| 423 | as_expr=false |
| 424 | fi |
| 425 | |
| 426 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
| 427 | as_basename=basename |
| 428 | else |
| 429 | as_basename=false |
| 430 | fi |
| 431 | |
| 432 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
| 433 | as_dirname=dirname |
| 434 | else |
| 435 | as_dirname=false |
| 436 | fi |
| 437 | |
| 438 | as_me=`$as_basename -- "$0" || |
| 439 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
| 440 | X"$0" : 'X\(//\)$' \| \ |
| 441 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
| 442 | $as_echo X/"$0" | |
| 443 | sed '/^.*\/\([^/][^/]*\)\/*$/{ |
| 444 | s//\1/ |
| 445 | q |
| 446 | } |
| 447 | /^X\/\(\/\/\)$/{ |
| 448 | s//\1/ |
| 449 | q |
| 450 | } |
| 451 | /^X\/\(\/\).*/{ |
| 452 | s//\1/ |
| 453 | q |
| 454 | } |
| 455 | s/.*/./; q'` |
| 456 | |
| 457 | # Avoid depending upon Character Ranges. |
| 458 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' |
| 459 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
| 460 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS |
| 461 | as_cr_digits='0123456789' |
| 462 | as_cr_alnum=$as_cr_Letters$as_cr_digits |
| 463 | |
| 464 | |
| 465 | as_lineno_1=$LINENO as_lineno_1a=$LINENO |
| 466 | as_lineno_2=$LINENO as_lineno_2a=$LINENO |
| 467 | eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && |
| 468 | test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { |
| 469 | # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) |
| 470 | sed -n ' |
| 471 | p |
| 472 | /[$]LINENO/= |
| 473 | ' <$as_myself | |
| 474 | sed ' |
| 475 | s/[$]LINENO.*/&-/ |
| 476 | t lineno |
| 477 | b |
| 478 | :lineno |
| 479 | N |
| 480 | :loop |
| 481 | s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ |
| 482 | t loop |
| 483 | s/-\n.*// |
| 484 | ' >$as_me.lineno && |
| 485 | chmod +x "$as_me.lineno" || |
| 486 | { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } |
| 487 | |
| 488 | # If we had to re-execute with $CONFIG_SHELL, we're ensured to have |
| 489 | # already done that, so ensure we don't try to do so again and fall |
| 490 | # in an infinite loop. This has already happened in practice. |
| 491 | _as_can_reexec=no; export _as_can_reexec |
| 492 | # Don't try to exec as it changes $[0], causing all sort of problems |
| 493 | # (the dirname of $[0] is not the place where we might find the |
| 494 | # original and so on. Autoconf is especially sensitive to this). |
| 495 | . "./$as_me.lineno" |
| 496 | # Exit status is that of the last command. |
| 497 | exit |
| 498 | } |
| 499 | |
| 500 | ECHO_C= ECHO_N= ECHO_T= |
| 501 | case `echo -n x` in #((((( |
| 502 | -n*) |
| 503 | case `echo 'xy\c'` in |
| 504 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. |
| 505 | xy) ECHO_C='\c';; |
| 506 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null |
| 507 | ECHO_T=' ';; |
| 508 | esac;; |
| 509 | *) |
| 510 | ECHO_N='-n';; |
| 511 | esac |
| 512 | |
| 513 | rm -f conf$$ conf$$.exe conf$$.file |
| 514 | if test -d conf$$.dir; then |
| 515 | rm -f conf$$.dir/conf$$.file |
| 516 | else |
| 517 | rm -f conf$$.dir |
| 518 | mkdir conf$$.dir 2>/dev/null |
| 519 | fi |
| 520 | if (echo >conf$$.file) 2>/dev/null; then |
| 521 | if ln -s conf$$.file conf$$ 2>/dev/null; then |
| 522 | as_ln_s='ln -s' |
| 523 | # ... but there are two gotchas: |
| 524 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. |
| 525 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. |
| 526 | # In both cases, we have to default to `cp -pR'. |
| 527 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
| 528 | as_ln_s='cp -pR' |
| 529 | elif ln conf$$.file conf$$ 2>/dev/null; then |
| 530 | as_ln_s=ln |
| 531 | else |
| 532 | as_ln_s='cp -pR' |
| 533 | fi |
| 534 | else |
| 535 | as_ln_s='cp -pR' |
| 536 | fi |
| 537 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
| 538 | rmdir conf$$.dir 2>/dev/null |
| 539 | |
| 540 | if mkdir -p . 2>/dev/null; then |
| 541 | as_mkdir_p='mkdir -p "$as_dir"' |
| 542 | else |
| 543 | test -d ./-p && rmdir ./-p |
| 544 | as_mkdir_p=false |
| 545 | fi |
| 546 | |
| 547 | as_test_x='test -x' |
| 548 | as_executable_p=as_fn_executable_p |
| 549 | |
| 550 | # Sed expression to map a string onto a valid CPP name. |
| 551 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
| 552 | |
| 553 | # Sed expression to map a string onto a valid variable name. |
| 554 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
| 555 | |
| 556 | |
| 557 | test -n "$DJDIR" || exec 7<&0 </dev/null |
| 558 | exec 6>&1 |
| 559 | |
| 560 | # Name of the host. |
| 561 | # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, |
| 562 | # so uname gets run too. |
| 563 | ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` |
| 564 | |
| 565 | # |
| 566 | # Initializations. |
| 567 | # |
| 568 | ac_default_prefix=/usr/local |
| 569 | ac_clean_files= |
| 570 | ac_config_libobj_dir=. |
| 571 | LIBOBJS= |
| 572 | cross_compiling=no |
| 573 | subdirs= |
| 574 | MFLAGS= |
| 575 | MAKEFLAGS= |
| 576 | |
| 577 | # Identity of this package. |
| 578 | PACKAGE_NAME= |
| 579 | PACKAGE_TARNAME= |
| 580 | PACKAGE_VERSION= |
| 581 | PACKAGE_STRING= |
| 582 | PACKAGE_BUGREPORT= |
| 583 | PACKAGE_URL= |
| 584 | |
| 585 | ac_unique_file="main.c" |
| 586 | # Factoring default headers for most tests. |
| 587 | ac_includes_default="\ |
| 588 | #include <stdio.h> |
| 589 | #ifdef HAVE_SYS_TYPES_H |
| 590 | # include <sys/types.h> |
| 591 | #endif |
| 592 | #ifdef HAVE_SYS_STAT_H |
| 593 | # include <sys/stat.h> |
| 594 | #endif |
| 595 | #ifdef STDC_HEADERS |
| 596 | # include <stdlib.h> |
| 597 | # include <stddef.h> |
| 598 | #else |
| 599 | # ifdef HAVE_STDLIB_H |
| 600 | # include <stdlib.h> |
| 601 | # endif |
| 602 | #endif |
| 603 | #ifdef HAVE_STRING_H |
| 604 | # if !defined STDC_HEADERS && defined HAVE_MEMORY_H |
| 605 | # include <memory.h> |
| 606 | # endif |
| 607 | # include <string.h> |
| 608 | #endif |
| 609 | #ifdef HAVE_STRINGS_H |
| 610 | # include <strings.h> |
| 611 | #endif |
| 612 | #ifdef HAVE_INTTYPES_H |
| 613 | # include <inttypes.h> |
| 614 | #endif |
| 615 | #ifdef HAVE_STDINT_H |
| 616 | # include <stdint.h> |
| 617 | #endif |
| 618 | #ifdef HAVE_UNISTD_H |
| 619 | # include <unistd.h> |
| 620 | #endif" |
| 621 | |
| 622 | enable_option_checking=no |
| 623 | ac_header_list= |
| 624 | ac_subst_vars='LTLIBOBJS |
| 625 | LIBOBJS |
| 626 | GCORE_TRANSFORM_NAME |
| 627 | GDB_TRANSFORM_NAME |
| 628 | XSLTPROC |
| 629 | NM_H |
| 630 | GDB_NM_FILE |
| 631 | LTLIBXXHASH |
| 632 | LIBXXHASH |
| 633 | HAVE_LIBXXHASH |
| 634 | LTLIBBABELTRACE |
| 635 | LIBBABELTRACE |
| 636 | HAVE_LIBBABELTRACE |
| 637 | HAVE_NATIVE_GCORE_HOST |
| 638 | NAT_GENERATED_FILES |
| 639 | XM_CLIBS |
| 640 | MH_CFLAGS |
| 641 | LOADLIBES |
| 642 | NAT_CDEPS |
| 643 | NATDEPFILES |
| 644 | NAT_FILE |
| 645 | target_subdir |
| 646 | CONFIG_UNINSTALL |
| 647 | CONFIG_INSTALL |
| 648 | CONFIG_CLEAN |
| 649 | CONFIG_ALL |
| 650 | CONFIG_SRCS |
| 651 | CONFIG_DEPS |
| 652 | CONFIG_OBS |
| 653 | PROFILE_CFLAGS |
| 654 | ENABLE_CFLAGS |
| 655 | SIM_OBS |
| 656 | SIM |
| 657 | XMKMF |
| 658 | GDBTK_SRC_DIR |
| 659 | GDBTK_CFLAGS |
| 660 | GDBTKLIBS |
| 661 | X_LIBS |
| 662 | X_LDFLAGS |
| 663 | X_CFLAGS |
| 664 | TK_XINCLUDES |
| 665 | TK_DEPS |
| 666 | TK_LIBRARY |
| 667 | TK_INCLUDE |
| 668 | TK_STUB_LIB_SPEC |
| 669 | TK_STUB_LIB_FLAG |
| 670 | TK_STUB_LIB_FILE |
| 671 | TK_LIB_SPEC |
| 672 | TK_LIB_FLAG |
| 673 | TK_LIB_FILE |
| 674 | TK_SRC_DIR |
| 675 | TK_BIN_DIR |
| 676 | TK_VERSION |
| 677 | TCL_DEPS |
| 678 | TCL_LIBRARY |
| 679 | TCL_INCLUDE |
| 680 | TCL_STUB_LIB_SPEC |
| 681 | TCL_STUB_LIB_FLAG |
| 682 | TCL_STUB_LIB_FILE |
| 683 | TCL_LIB_SPEC |
| 684 | TCL_LIB_FLAG |
| 685 | TCL_LIB_FILE |
| 686 | TCL_SRC_DIR |
| 687 | TCL_BIN_DIR |
| 688 | TCL_PATCH_LEVEL |
| 689 | TCL_VERSION |
| 690 | WIN32LDAPP |
| 691 | WIN32LIBS |
| 692 | GUI_CFLAGS_X |
| 693 | LIBGUI |
| 694 | LTLIBLZMA |
| 695 | LIBLZMA |
| 696 | HAVE_LIBLZMA |
| 697 | SER_HARDWIRE |
| 698 | WERROR_CFLAGS |
| 699 | WARN_CFLAGS |
| 700 | SYSTEM_GDBINIT_DIR |
| 701 | SYSTEM_GDBINIT |
| 702 | TARGET_SYSTEM_ROOT |
| 703 | CONFIG_LDFLAGS |
| 704 | RDYNAMIC |
| 705 | LTLIBIPT |
| 706 | LIBIPT |
| 707 | HAVE_LIBIPT |
| 708 | PTHREAD_CFLAGS |
| 709 | PTHREAD_LIBS |
| 710 | PTHREAD_CC |
| 711 | ax_pthread_config |
| 712 | SED |
| 713 | ALLOCA |
| 714 | SRCHIGH_CFLAGS |
| 715 | SRCHIGH_LIBS |
| 716 | HAVE_GUILE_FALSE |
| 717 | HAVE_GUILE_TRUE |
| 718 | GUILE_LIBS |
| 719 | GUILE_CPPFLAGS |
| 720 | GUILD_TARGET_FLAG |
| 721 | GUILD |
| 722 | pkg_config_prog_path |
| 723 | HAVE_PYTHON_FALSE |
| 724 | HAVE_PYTHON_TRUE |
| 725 | PYTHON_LIBS |
| 726 | PYTHON_CPPFLAGS |
| 727 | PYTHON_CFLAGS |
| 728 | python_prog_path |
| 729 | LTLIBMPFR |
| 730 | LIBMPFR |
| 731 | HAVE_LIBMPFR |
| 732 | LTLIBEXPAT |
| 733 | LIBEXPAT |
| 734 | HAVE_LIBEXPAT |
| 735 | JIT_READER_DIR |
| 736 | TARGET_PTR |
| 737 | READLINE_TEXI_INCFLAG |
| 738 | READLINE_CFLAGS |
| 739 | READLINE_DEPS |
| 740 | READLINE |
| 741 | LTLIBICONV |
| 742 | LIBICONV |
| 743 | zlibinc |
| 744 | zlibdir |
| 745 | MIG |
| 746 | WINDRES |
| 747 | DLLTOOL |
| 748 | AR |
| 749 | YFLAGS |
| 750 | YACC |
| 751 | RANLIB |
| 752 | LN_S |
| 753 | INSTALL_DATA |
| 754 | INSTALL_SCRIPT |
| 755 | INSTALL_PROGRAM |
| 756 | AWK |
| 757 | REPORT_BUGS_TEXI |
| 758 | REPORT_BUGS_TO |
| 759 | PKGVERSION |
| 760 | CODESIGN_CERT |
| 761 | LIBDEBUGINFOD |
| 762 | HAVE_NATIVE_GCORE_TARGET |
| 763 | TARGET_OBS |
| 764 | subdirs |
| 765 | GDB_DATADIR |
| 766 | DEBUGDIR |
| 767 | MAKEINFO_EXTRA_FLAGS |
| 768 | MAKEINFOFLAGS |
| 769 | MAKEINFO |
| 770 | PACKAGE |
| 771 | CATOBJEXT |
| 772 | GENCAT |
| 773 | INSTOBJEXT |
| 774 | DATADIRNAME |
| 775 | CATALOGS |
| 776 | POSUB |
| 777 | GMSGFMT |
| 778 | XGETTEXT |
| 779 | INCINTL |
| 780 | LIBINTL_DEP |
| 781 | LIBINTL |
| 782 | USE_NLS |
| 783 | CCDEPMODE |
| 784 | DEPDIR |
| 785 | am__leading_dot |
| 786 | CXX_DIALECT |
| 787 | HAVE_CXX11 |
| 788 | INSTALL_STRIP_PROGRAM |
| 789 | STRIP |
| 790 | install_sh |
| 791 | target_os |
| 792 | target_vendor |
| 793 | target_cpu |
| 794 | target |
| 795 | host_os |
| 796 | host_vendor |
| 797 | host_cpu |
| 798 | host |
| 799 | build_os |
| 800 | build_vendor |
| 801 | build_cpu |
| 802 | build |
| 803 | EGREP |
| 804 | GREP |
| 805 | CPP |
| 806 | ac_ct_CXX |
| 807 | CXXFLAGS |
| 808 | CXX |
| 809 | OBJEXT |
| 810 | EXEEXT |
| 811 | ac_ct_CC |
| 812 | CPPFLAGS |
| 813 | LDFLAGS |
| 814 | CFLAGS |
| 815 | CC |
| 816 | MAINT |
| 817 | MAINTAINER_MODE_FALSE |
| 818 | MAINTAINER_MODE_TRUE |
| 819 | target_alias |
| 820 | host_alias |
| 821 | build_alias |
| 822 | LIBS |
| 823 | ECHO_T |
| 824 | ECHO_N |
| 825 | ECHO_C |
| 826 | DEFS |
| 827 | mandir |
| 828 | localedir |
| 829 | libdir |
| 830 | psdir |
| 831 | pdfdir |
| 832 | dvidir |
| 833 | htmldir |
| 834 | infodir |
| 835 | docdir |
| 836 | oldincludedir |
| 837 | includedir |
| 838 | localstatedir |
| 839 | sharedstatedir |
| 840 | sysconfdir |
| 841 | datadir |
| 842 | datarootdir |
| 843 | libexecdir |
| 844 | sbindir |
| 845 | bindir |
| 846 | program_transform_name |
| 847 | prefix |
| 848 | exec_prefix |
| 849 | PACKAGE_URL |
| 850 | PACKAGE_BUGREPORT |
| 851 | PACKAGE_STRING |
| 852 | PACKAGE_VERSION |
| 853 | PACKAGE_TARNAME |
| 854 | PACKAGE_NAME |
| 855 | PATH_SEPARATOR |
| 856 | SHELL' |
| 857 | ac_subst_files='nat_makefile_frag' |
| 858 | ac_user_opts=' |
| 859 | enable_option_checking |
| 860 | enable_maintainer_mode |
| 861 | enable_plugins |
| 862 | enable_largefile |
| 863 | with_separate_debug_dir |
| 864 | with_gdb_datadir |
| 865 | with_relocated_sources |
| 866 | with_auto_load_dir |
| 867 | with_auto_load_safe_path |
| 868 | enable_targets |
| 869 | enable_64_bit_bfd |
| 870 | enable_gdbmi |
| 871 | enable_tui |
| 872 | enable_gdbtk |
| 873 | with_debuginfod |
| 874 | with_libunwind_ia64 |
| 875 | with_curses |
| 876 | enable_profiling |
| 877 | enable_codesign |
| 878 | with_pkgversion |
| 879 | with_bugurl |
| 880 | with_system_zlib |
| 881 | with_gnu_ld |
| 882 | enable_rpath |
| 883 | with_libiconv_prefix |
| 884 | with_libiconv_type |
| 885 | with_iconv_bin |
| 886 | with_system_readline |
| 887 | with_jit_reader_dir |
| 888 | with_expat |
| 889 | with_libexpat_prefix |
| 890 | with_libexpat_type |
| 891 | with_mpfr |
| 892 | with_libmpfr_prefix |
| 893 | with_libmpfr_type |
| 894 | with_python |
| 895 | with_python_libdir |
| 896 | with_guile |
| 897 | enable_source_highlight |
| 898 | with_intel_pt |
| 899 | with_libipt_prefix |
| 900 | with_libipt_type |
| 901 | with_included_regex |
| 902 | with_sysroot |
| 903 | with_system_gdbinit |
| 904 | with_system_gdbinit_dir |
| 905 | enable_werror |
| 906 | enable_build_warnings |
| 907 | enable_gdb_build_warnings |
| 908 | enable_ubsan |
| 909 | with_lzma |
| 910 | with_liblzma_prefix |
| 911 | with_liblzma_type |
| 912 | with_tcl |
| 913 | with_tk |
| 914 | with_x |
| 915 | enable_sim |
| 916 | with_babeltrace |
| 917 | with_libbabeltrace_prefix |
| 918 | with_libbabeltrace_type |
| 919 | with_xxhash |
| 920 | with_libxxhash_prefix |
| 921 | with_libxxhash_type |
| 922 | enable_unit_tests |
| 923 | ' |
| 924 | ac_precious_vars='build_alias |
| 925 | host_alias |
| 926 | target_alias |
| 927 | CC |
| 928 | CFLAGS |
| 929 | LDFLAGS |
| 930 | LIBS |
| 931 | CPPFLAGS |
| 932 | CXX |
| 933 | CXXFLAGS |
| 934 | CCC |
| 935 | CPP |
| 936 | MAKEINFO |
| 937 | MAKEINFOFLAGS |
| 938 | YACC |
| 939 | YFLAGS |
| 940 | XMKMF' |
| 941 | ac_subdirs_all='testsuite |
| 942 | gdbtk' |
| 943 | |
| 944 | # Initialize some variables set by options. |
| 945 | ac_init_help= |
| 946 | ac_init_version=false |
| 947 | ac_unrecognized_opts= |
| 948 | ac_unrecognized_sep= |
| 949 | # The variables have the same names as the options, with |
| 950 | # dashes changed to underlines. |
| 951 | cache_file=/dev/null |
| 952 | exec_prefix=NONE |
| 953 | no_create= |
| 954 | no_recursion= |
| 955 | prefix=NONE |
| 956 | program_prefix=NONE |
| 957 | program_suffix=NONE |
| 958 | program_transform_name=s,x,x, |
| 959 | silent= |
| 960 | site= |
| 961 | srcdir= |
| 962 | verbose= |
| 963 | x_includes=NONE |
| 964 | x_libraries=NONE |
| 965 | |
| 966 | # Installation directory options. |
| 967 | # These are left unexpanded so users can "make install exec_prefix=/foo" |
| 968 | # and all the variables that are supposed to be based on exec_prefix |
| 969 | # by default will actually change. |
| 970 | # Use braces instead of parens because sh, perl, etc. also accept them. |
| 971 | # (The list follows the same order as the GNU Coding Standards.) |
| 972 | bindir='${exec_prefix}/bin' |
| 973 | sbindir='${exec_prefix}/sbin' |
| 974 | libexecdir='${exec_prefix}/libexec' |
| 975 | datarootdir='${prefix}/share' |
| 976 | datadir='${datarootdir}' |
| 977 | sysconfdir='${prefix}/etc' |
| 978 | sharedstatedir='${prefix}/com' |
| 979 | localstatedir='${prefix}/var' |
| 980 | includedir='${prefix}/include' |
| 981 | oldincludedir='/usr/include' |
| 982 | docdir='${datarootdir}/doc/${PACKAGE}' |
| 983 | infodir='${datarootdir}/info' |
| 984 | htmldir='${docdir}' |
| 985 | dvidir='${docdir}' |
| 986 | pdfdir='${docdir}' |
| 987 | psdir='${docdir}' |
| 988 | libdir='${exec_prefix}/lib' |
| 989 | localedir='${datarootdir}/locale' |
| 990 | mandir='${datarootdir}/man' |
| 991 | |
| 992 | ac_prev= |
| 993 | ac_dashdash= |
| 994 | for ac_option |
| 995 | do |
| 996 | # If the previous option needs an argument, assign it. |
| 997 | if test -n "$ac_prev"; then |
| 998 | eval $ac_prev=\$ac_option |
| 999 | ac_prev= |
| 1000 | continue |
| 1001 | fi |
| 1002 | |
| 1003 | case $ac_option in |
| 1004 | *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; |
| 1005 | *=) ac_optarg= ;; |
| 1006 | *) ac_optarg=yes ;; |
| 1007 | esac |
| 1008 | |
| 1009 | # Accept the important Cygnus configure options, so we can diagnose typos. |
| 1010 | |
| 1011 | case $ac_dashdash$ac_option in |
| 1012 | --) |
| 1013 | ac_dashdash=yes ;; |
| 1014 | |
| 1015 | -bindir | --bindir | --bindi | --bind | --bin | --bi) |
| 1016 | ac_prev=bindir ;; |
| 1017 | -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) |
| 1018 | bindir=$ac_optarg ;; |
| 1019 | |
| 1020 | -build | --build | --buil | --bui | --bu) |
| 1021 | ac_prev=build_alias ;; |
| 1022 | -build=* | --build=* | --buil=* | --bui=* | --bu=*) |
| 1023 | build_alias=$ac_optarg ;; |
| 1024 | |
| 1025 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
| 1026 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) |
| 1027 | ac_prev=cache_file ;; |
| 1028 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ |
| 1029 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) |
| 1030 | cache_file=$ac_optarg ;; |
| 1031 | |
| 1032 | --config-cache | -C) |
| 1033 | cache_file=config.cache ;; |
| 1034 | |
| 1035 | -datadir | --datadir | --datadi | --datad) |
| 1036 | ac_prev=datadir ;; |
| 1037 | -datadir=* | --datadir=* | --datadi=* | --datad=*) |
| 1038 | datadir=$ac_optarg ;; |
| 1039 | |
| 1040 | -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ |
| 1041 | | --dataroo | --dataro | --datar) |
| 1042 | ac_prev=datarootdir ;; |
| 1043 | -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ |
| 1044 | | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) |
| 1045 | datarootdir=$ac_optarg ;; |
| 1046 | |
| 1047 | -disable-* | --disable-*) |
| 1048 | ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` |
| 1049 | # Reject names that are not valid shell variable names. |
| 1050 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
| 1051 | as_fn_error $? "invalid feature name: $ac_useropt" |
| 1052 | ac_useropt_orig=$ac_useropt |
| 1053 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` |
| 1054 | case $ac_user_opts in |
| 1055 | *" |
| 1056 | "enable_$ac_useropt" |
| 1057 | "*) ;; |
| 1058 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" |
| 1059 | ac_unrecognized_sep=', ';; |
| 1060 | esac |
| 1061 | eval enable_$ac_useropt=no ;; |
| 1062 | |
| 1063 | -docdir | --docdir | --docdi | --doc | --do) |
| 1064 | ac_prev=docdir ;; |
| 1065 | -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) |
| 1066 | docdir=$ac_optarg ;; |
| 1067 | |
| 1068 | -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) |
| 1069 | ac_prev=dvidir ;; |
| 1070 | -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) |
| 1071 | dvidir=$ac_optarg ;; |
| 1072 | |
| 1073 | -enable-* | --enable-*) |
| 1074 | ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` |
| 1075 | # Reject names that are not valid shell variable names. |
| 1076 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
| 1077 | as_fn_error $? "invalid feature name: $ac_useropt" |
| 1078 | ac_useropt_orig=$ac_useropt |
| 1079 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` |
| 1080 | case $ac_user_opts in |
| 1081 | *" |
| 1082 | "enable_$ac_useropt" |
| 1083 | "*) ;; |
| 1084 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" |
| 1085 | ac_unrecognized_sep=', ';; |
| 1086 | esac |
| 1087 | eval enable_$ac_useropt=\$ac_optarg ;; |
| 1088 | |
| 1089 | -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ |
| 1090 | | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ |
| 1091 | | --exec | --exe | --ex) |
| 1092 | ac_prev=exec_prefix ;; |
| 1093 | -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ |
| 1094 | | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ |
| 1095 | | --exec=* | --exe=* | --ex=*) |
| 1096 | exec_prefix=$ac_optarg ;; |
| 1097 | |
| 1098 | -gas | --gas | --ga | --g) |
| 1099 | # Obsolete; use --with-gas. |
| 1100 | with_gas=yes ;; |
| 1101 | |
| 1102 | -help | --help | --hel | --he | -h) |
| 1103 | ac_init_help=long ;; |
| 1104 | -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) |
| 1105 | ac_init_help=recursive ;; |
| 1106 | -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) |
| 1107 | ac_init_help=short ;; |
| 1108 | |
| 1109 | -host | --host | --hos | --ho) |
| 1110 | ac_prev=host_alias ;; |
| 1111 | -host=* | --host=* | --hos=* | --ho=*) |
| 1112 | host_alias=$ac_optarg ;; |
| 1113 | |
| 1114 | -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) |
| 1115 | ac_prev=htmldir ;; |
| 1116 | -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ |
| 1117 | | --ht=*) |
| 1118 | htmldir=$ac_optarg ;; |
| 1119 | |
| 1120 | -includedir | --includedir | --includedi | --included | --include \ |
| 1121 | | --includ | --inclu | --incl | --inc) |
| 1122 | ac_prev=includedir ;; |
| 1123 | -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ |
| 1124 | | --includ=* | --inclu=* | --incl=* | --inc=*) |
| 1125 | includedir=$ac_optarg ;; |
| 1126 | |
| 1127 | -infodir | --infodir | --infodi | --infod | --info | --inf) |
| 1128 | ac_prev=infodir ;; |
| 1129 | -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) |
| 1130 | infodir=$ac_optarg ;; |
| 1131 | |
| 1132 | -libdir | --libdir | --libdi | --libd) |
| 1133 | ac_prev=libdir ;; |
| 1134 | -libdir=* | --libdir=* | --libdi=* | --libd=*) |
| 1135 | libdir=$ac_optarg ;; |
| 1136 | |
| 1137 | -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ |
| 1138 | | --libexe | --libex | --libe) |
| 1139 | ac_prev=libexecdir ;; |
| 1140 | -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ |
| 1141 | | --libexe=* | --libex=* | --libe=*) |
| 1142 | libexecdir=$ac_optarg ;; |
| 1143 | |
| 1144 | -localedir | --localedir | --localedi | --localed | --locale) |
| 1145 | ac_prev=localedir ;; |
| 1146 | -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) |
| 1147 | localedir=$ac_optarg ;; |
| 1148 | |
| 1149 | -localstatedir | --localstatedir | --localstatedi | --localstated \ |
| 1150 | | --localstate | --localstat | --localsta | --localst | --locals) |
| 1151 | ac_prev=localstatedir ;; |
| 1152 | -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ |
| 1153 | | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) |
| 1154 | localstatedir=$ac_optarg ;; |
| 1155 | |
| 1156 | -mandir | --mandir | --mandi | --mand | --man | --ma | --m) |
| 1157 | ac_prev=mandir ;; |
| 1158 | -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) |
| 1159 | mandir=$ac_optarg ;; |
| 1160 | |
| 1161 | -nfp | --nfp | --nf) |
| 1162 | # Obsolete; use --without-fp. |
| 1163 | with_fp=no ;; |
| 1164 | |
| 1165 | -no-create | --no-create | --no-creat | --no-crea | --no-cre \ |
| 1166 | | --no-cr | --no-c | -n) |
| 1167 | no_create=yes ;; |
| 1168 | |
| 1169 | -no-recursion | --no-recursion | --no-recursio | --no-recursi \ |
| 1170 | | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) |
| 1171 | no_recursion=yes ;; |
| 1172 | |
| 1173 | -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ |
| 1174 | | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ |
| 1175 | | --oldin | --oldi | --old | --ol | --o) |
| 1176 | ac_prev=oldincludedir ;; |
| 1177 | -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ |
| 1178 | | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ |
| 1179 | | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) |
| 1180 | oldincludedir=$ac_optarg ;; |
| 1181 | |
| 1182 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
| 1183 | ac_prev=prefix ;; |
| 1184 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) |
| 1185 | prefix=$ac_optarg ;; |
| 1186 | |
| 1187 | -program-prefix | --program-prefix | --program-prefi | --program-pref \ |
| 1188 | | --program-pre | --program-pr | --program-p) |
| 1189 | ac_prev=program_prefix ;; |
| 1190 | -program-prefix=* | --program-prefix=* | --program-prefi=* \ |
| 1191 | | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) |
| 1192 | program_prefix=$ac_optarg ;; |
| 1193 | |
| 1194 | -program-suffix | --program-suffix | --program-suffi | --program-suff \ |
| 1195 | | --program-suf | --program-su | --program-s) |
| 1196 | ac_prev=program_suffix ;; |
| 1197 | -program-suffix=* | --program-suffix=* | --program-suffi=* \ |
| 1198 | | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) |
| 1199 | program_suffix=$ac_optarg ;; |
| 1200 | |
| 1201 | -program-transform-name | --program-transform-name \ |
| 1202 | | --program-transform-nam | --program-transform-na \ |
| 1203 | | --program-transform-n | --program-transform- \ |
| 1204 | | --program-transform | --program-transfor \ |
| 1205 | | --program-transfo | --program-transf \ |
| 1206 | | --program-trans | --program-tran \ |
| 1207 | | --progr-tra | --program-tr | --program-t) |
| 1208 | ac_prev=program_transform_name ;; |
| 1209 | -program-transform-name=* | --program-transform-name=* \ |
| 1210 | | --program-transform-nam=* | --program-transform-na=* \ |
| 1211 | | --program-transform-n=* | --program-transform-=* \ |
| 1212 | | --program-transform=* | --program-transfor=* \ |
| 1213 | | --program-transfo=* | --program-transf=* \ |
| 1214 | | --program-trans=* | --program-tran=* \ |
| 1215 | | --progr-tra=* | --program-tr=* | --program-t=*) |
| 1216 | program_transform_name=$ac_optarg ;; |
| 1217 | |
| 1218 | -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) |
| 1219 | ac_prev=pdfdir ;; |
| 1220 | -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) |
| 1221 | pdfdir=$ac_optarg ;; |
| 1222 | |
| 1223 | -psdir | --psdir | --psdi | --psd | --ps) |
| 1224 | ac_prev=psdir ;; |
| 1225 | -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) |
| 1226 | psdir=$ac_optarg ;; |
| 1227 | |
| 1228 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 1229 | | -silent | --silent | --silen | --sile | --sil) |
| 1230 | silent=yes ;; |
| 1231 | |
| 1232 | -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) |
| 1233 | ac_prev=sbindir ;; |
| 1234 | -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ |
| 1235 | | --sbi=* | --sb=*) |
| 1236 | sbindir=$ac_optarg ;; |
| 1237 | |
| 1238 | -sharedstatedir | --sharedstatedir | --sharedstatedi \ |
| 1239 | | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ |
| 1240 | | --sharedst | --shareds | --shared | --share | --shar \ |
| 1241 | | --sha | --sh) |
| 1242 | ac_prev=sharedstatedir ;; |
| 1243 | -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ |
| 1244 | | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ |
| 1245 | | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ |
| 1246 | | --sha=* | --sh=*) |
| 1247 | sharedstatedir=$ac_optarg ;; |
| 1248 | |
| 1249 | -site | --site | --sit) |
| 1250 | ac_prev=site ;; |
| 1251 | -site=* | --site=* | --sit=*) |
| 1252 | site=$ac_optarg ;; |
| 1253 | |
| 1254 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
| 1255 | ac_prev=srcdir ;; |
| 1256 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
| 1257 | srcdir=$ac_optarg ;; |
| 1258 | |
| 1259 | -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ |
| 1260 | | --syscon | --sysco | --sysc | --sys | --sy) |
| 1261 | ac_prev=sysconfdir ;; |
| 1262 | -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ |
| 1263 | | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) |
| 1264 | sysconfdir=$ac_optarg ;; |
| 1265 | |
| 1266 | -target | --target | --targe | --targ | --tar | --ta | --t) |
| 1267 | ac_prev=target_alias ;; |
| 1268 | -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) |
| 1269 | target_alias=$ac_optarg ;; |
| 1270 | |
| 1271 | -v | -verbose | --verbose | --verbos | --verbo | --verb) |
| 1272 | verbose=yes ;; |
| 1273 | |
| 1274 | -version | --version | --versio | --versi | --vers | -V) |
| 1275 | ac_init_version=: ;; |
| 1276 | |
| 1277 | -with-* | --with-*) |
| 1278 | ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` |
| 1279 | # Reject names that are not valid shell variable names. |
| 1280 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
| 1281 | as_fn_error $? "invalid package name: $ac_useropt" |
| 1282 | ac_useropt_orig=$ac_useropt |
| 1283 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` |
| 1284 | case $ac_user_opts in |
| 1285 | *" |
| 1286 | "with_$ac_useropt" |
| 1287 | "*) ;; |
| 1288 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" |
| 1289 | ac_unrecognized_sep=', ';; |
| 1290 | esac |
| 1291 | eval with_$ac_useropt=\$ac_optarg ;; |
| 1292 | |
| 1293 | -without-* | --without-*) |
| 1294 | ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` |
| 1295 | # Reject names that are not valid shell variable names. |
| 1296 | expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && |
| 1297 | as_fn_error $? "invalid package name: $ac_useropt" |
| 1298 | ac_useropt_orig=$ac_useropt |
| 1299 | ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` |
| 1300 | case $ac_user_opts in |
| 1301 | *" |
| 1302 | "with_$ac_useropt" |
| 1303 | "*) ;; |
| 1304 | *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" |
| 1305 | ac_unrecognized_sep=', ';; |
| 1306 | esac |
| 1307 | eval with_$ac_useropt=no ;; |
| 1308 | |
| 1309 | --x) |
| 1310 | # Obsolete; use --with-x. |
| 1311 | with_x=yes ;; |
| 1312 | |
| 1313 | -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ |
| 1314 | | --x-incl | --x-inc | --x-in | --x-i) |
| 1315 | ac_prev=x_includes ;; |
| 1316 | -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ |
| 1317 | | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) |
| 1318 | x_includes=$ac_optarg ;; |
| 1319 | |
| 1320 | -x-libraries | --x-libraries | --x-librarie | --x-librari \ |
| 1321 | | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) |
| 1322 | ac_prev=x_libraries ;; |
| 1323 | -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ |
| 1324 | | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) |
| 1325 | x_libraries=$ac_optarg ;; |
| 1326 | |
| 1327 | -*) as_fn_error $? "unrecognized option: \`$ac_option' |
| 1328 | Try \`$0 --help' for more information" |
| 1329 | ;; |
| 1330 | |
| 1331 | *=*) |
| 1332 | ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` |
| 1333 | # Reject names that are not valid shell variable names. |
| 1334 | case $ac_envvar in #( |
| 1335 | '' | [0-9]* | *[!_$as_cr_alnum]* ) |
| 1336 | as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; |
| 1337 | esac |
| 1338 | eval $ac_envvar=\$ac_optarg |
| 1339 | export $ac_envvar ;; |
| 1340 | |
| 1341 | *) |
| 1342 | # FIXME: should be removed in autoconf 3.0. |
| 1343 | $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 |
| 1344 | expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && |
| 1345 | $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 |
| 1346 | : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" |
| 1347 | ;; |
| 1348 | |
| 1349 | esac |
| 1350 | done |
| 1351 | |
| 1352 | if test -n "$ac_prev"; then |
| 1353 | ac_option=--`echo $ac_prev | sed 's/_/-/g'` |
| 1354 | as_fn_error $? "missing argument to $ac_option" |
| 1355 | fi |
| 1356 | |
| 1357 | if test -n "$ac_unrecognized_opts"; then |
| 1358 | case $enable_option_checking in |
| 1359 | no) ;; |
| 1360 | fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; |
| 1361 | *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; |
| 1362 | esac |
| 1363 | fi |
| 1364 | |
| 1365 | # Check all directory arguments for consistency. |
| 1366 | for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ |
| 1367 | datadir sysconfdir sharedstatedir localstatedir includedir \ |
| 1368 | oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ |
| 1369 | libdir localedir mandir |
| 1370 | do |
| 1371 | eval ac_val=\$$ac_var |
| 1372 | # Remove trailing slashes. |
| 1373 | case $ac_val in |
| 1374 | */ ) |
| 1375 | ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` |
| 1376 | eval $ac_var=\$ac_val;; |
| 1377 | esac |
| 1378 | # Be sure to have absolute directory names. |
| 1379 | case $ac_val in |
| 1380 | [\\/$]* | ?:[\\/]* ) continue;; |
| 1381 | NONE | '' ) case $ac_var in *prefix ) continue;; esac;; |
| 1382 | esac |
| 1383 | as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" |
| 1384 | done |
| 1385 | |
| 1386 | # There might be people who depend on the old broken behavior: `$host' |
| 1387 | # used to hold the argument of --host etc. |
| 1388 | # FIXME: To remove some day. |
| 1389 | build=$build_alias |
| 1390 | host=$host_alias |
| 1391 | target=$target_alias |
| 1392 | |
| 1393 | # FIXME: To remove some day. |
| 1394 | if test "x$host_alias" != x; then |
| 1395 | if test "x$build_alias" = x; then |
| 1396 | cross_compiling=maybe |
| 1397 | elif test "x$build_alias" != "x$host_alias"; then |
| 1398 | cross_compiling=yes |
| 1399 | fi |
| 1400 | fi |
| 1401 | |
| 1402 | ac_tool_prefix= |
| 1403 | test -n "$host_alias" && ac_tool_prefix=$host_alias- |
| 1404 | |
| 1405 | test "$silent" = yes && exec 6>/dev/null |
| 1406 | |
| 1407 | |
| 1408 | ac_pwd=`pwd` && test -n "$ac_pwd" && |
| 1409 | ac_ls_di=`ls -di .` && |
| 1410 | ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || |
| 1411 | as_fn_error $? "working directory cannot be determined" |
| 1412 | test "X$ac_ls_di" = "X$ac_pwd_ls_di" || |
| 1413 | as_fn_error $? "pwd does not report name of working directory" |
| 1414 | |
| 1415 | |
| 1416 | # Find the source files, if location was not specified. |
| 1417 | if test -z "$srcdir"; then |
| 1418 | ac_srcdir_defaulted=yes |
| 1419 | # Try the directory containing this script, then the parent directory. |
| 1420 | ac_confdir=`$as_dirname -- "$as_myself" || |
| 1421 | $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
| 1422 | X"$as_myself" : 'X\(//\)[^/]' \| \ |
| 1423 | X"$as_myself" : 'X\(//\)$' \| \ |
| 1424 | X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || |
| 1425 | $as_echo X"$as_myself" | |
| 1426 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
| 1427 | s//\1/ |
| 1428 | q |
| 1429 | } |
| 1430 | /^X\(\/\/\)[^/].*/{ |
| 1431 | s//\1/ |
| 1432 | q |
| 1433 | } |
| 1434 | /^X\(\/\/\)$/{ |
| 1435 | s//\1/ |
| 1436 | q |
| 1437 | } |
| 1438 | /^X\(\/\).*/{ |
| 1439 | s//\1/ |
| 1440 | q |
| 1441 | } |
| 1442 | s/.*/./; q'` |
| 1443 | srcdir=$ac_confdir |
| 1444 | if test ! -r "$srcdir/$ac_unique_file"; then |
| 1445 | srcdir=.. |
| 1446 | fi |
| 1447 | else |
| 1448 | ac_srcdir_defaulted=no |
| 1449 | fi |
| 1450 | if test ! -r "$srcdir/$ac_unique_file"; then |
| 1451 | test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." |
| 1452 | as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" |
| 1453 | fi |
| 1454 | ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" |
| 1455 | ac_abs_confdir=`( |
| 1456 | cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" |
| 1457 | pwd)` |
| 1458 | # When building in place, set srcdir=. |
| 1459 | if test "$ac_abs_confdir" = "$ac_pwd"; then |
| 1460 | srcdir=. |
| 1461 | fi |
| 1462 | # Remove unnecessary trailing slashes from srcdir. |
| 1463 | # Double slashes in file names in object file debugging info |
| 1464 | # mess up M-x gdb in Emacs. |
| 1465 | case $srcdir in |
| 1466 | */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; |
| 1467 | esac |
| 1468 | for ac_var in $ac_precious_vars; do |
| 1469 | eval ac_env_${ac_var}_set=\${${ac_var}+set} |
| 1470 | eval ac_env_${ac_var}_value=\$${ac_var} |
| 1471 | eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} |
| 1472 | eval ac_cv_env_${ac_var}_value=\$${ac_var} |
| 1473 | done |
| 1474 | |
| 1475 | # |
| 1476 | # Report the --help message. |
| 1477 | # |
| 1478 | if test "$ac_init_help" = "long"; then |
| 1479 | # Omit some internal or obsolete options to make the list less imposing. |
| 1480 | # This message is too long to be a string in the A/UX 3.1 sh. |
| 1481 | cat <<_ACEOF |
| 1482 | \`configure' configures this package to adapt to many kinds of systems. |
| 1483 | |
| 1484 | Usage: $0 [OPTION]... [VAR=VALUE]... |
| 1485 | |
| 1486 | To assign environment variables (e.g., CC, CFLAGS...), specify them as |
| 1487 | VAR=VALUE. See below for descriptions of some of the useful variables. |
| 1488 | |
| 1489 | Defaults for the options are specified in brackets. |
| 1490 | |
| 1491 | Configuration: |
| 1492 | -h, --help display this help and exit |
| 1493 | --help=short display options specific to this package |
| 1494 | --help=recursive display the short help of all the included packages |
| 1495 | -V, --version display version information and exit |
| 1496 | -q, --quiet, --silent do not print \`checking ...' messages |
| 1497 | --cache-file=FILE cache test results in FILE [disabled] |
| 1498 | -C, --config-cache alias for \`--cache-file=config.cache' |
| 1499 | -n, --no-create do not create output files |
| 1500 | --srcdir=DIR find the sources in DIR [configure dir or \`..'] |
| 1501 | |
| 1502 | Installation directories: |
| 1503 | --prefix=PREFIX install architecture-independent files in PREFIX |
| 1504 | [$ac_default_prefix] |
| 1505 | --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX |
| 1506 | [PREFIX] |
| 1507 | |
| 1508 | By default, \`make install' will install all the files in |
| 1509 | \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify |
| 1510 | an installation prefix other than \`$ac_default_prefix' using \`--prefix', |
| 1511 | for instance \`--prefix=\$HOME'. |
| 1512 | |
| 1513 | For better control, use the options below. |
| 1514 | |
| 1515 | Fine tuning of the installation directories: |
| 1516 | --bindir=DIR user executables [EPREFIX/bin] |
| 1517 | --sbindir=DIR system admin executables [EPREFIX/sbin] |
| 1518 | --libexecdir=DIR program executables [EPREFIX/libexec] |
| 1519 | --sysconfdir=DIR read-only single-machine data [PREFIX/etc] |
| 1520 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] |
| 1521 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] |
| 1522 | --libdir=DIR object code libraries [EPREFIX/lib] |
| 1523 | --includedir=DIR C header files [PREFIX/include] |
| 1524 | --oldincludedir=DIR C header files for non-gcc [/usr/include] |
| 1525 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] |
| 1526 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] |
| 1527 | --infodir=DIR info documentation [DATAROOTDIR/info] |
| 1528 | --localedir=DIR locale-dependent data [DATAROOTDIR/locale] |
| 1529 | --mandir=DIR man documentation [DATAROOTDIR/man] |
| 1530 | --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE] |
| 1531 | --htmldir=DIR html documentation [DOCDIR] |
| 1532 | --dvidir=DIR dvi documentation [DOCDIR] |
| 1533 | --pdfdir=DIR pdf documentation [DOCDIR] |
| 1534 | --psdir=DIR ps documentation [DOCDIR] |
| 1535 | _ACEOF |
| 1536 | |
| 1537 | cat <<\_ACEOF |
| 1538 | |
| 1539 | Program names: |
| 1540 | --program-prefix=PREFIX prepend PREFIX to installed program names |
| 1541 | --program-suffix=SUFFIX append SUFFIX to installed program names |
| 1542 | --program-transform-name=PROGRAM run sed PROGRAM on installed program names |
| 1543 | |
| 1544 | X features: |
| 1545 | --x-includes=DIR X include files are in DIR |
| 1546 | --x-libraries=DIR X library files are in DIR |
| 1547 | |
| 1548 | System types: |
| 1549 | --build=BUILD configure for building on BUILD [guessed] |
| 1550 | --host=HOST cross-compile to build programs to run on HOST [BUILD] |
| 1551 | --target=TARGET configure for building compilers for TARGET [HOST] |
| 1552 | _ACEOF |
| 1553 | fi |
| 1554 | |
| 1555 | if test -n "$ac_init_help"; then |
| 1556 | |
| 1557 | cat <<\_ACEOF |
| 1558 | |
| 1559 | Optional Features: |
| 1560 | --disable-option-checking ignore unrecognized --enable/--with options |
| 1561 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
| 1562 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
| 1563 | --enable-maintainer-mode |
| 1564 | enable make rules and dependencies not useful (and |
| 1565 | sometimes confusing) to the casual installer |
| 1566 | --enable-plugins Enable support for plugins |
| 1567 | --disable-largefile omit support for large files |
| 1568 | --enable-targets=TARGETS |
| 1569 | alternative target configurations |
| 1570 | --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes) |
| 1571 | --disable-gdbmi disable machine-interface (MI) |
| 1572 | --enable-tui enable full-screen terminal user interface (TUI) |
| 1573 | --enable-gdbtk enable gdbtk graphical user interface (GUI) |
| 1574 | --enable-profiling enable profiling of GDB |
| 1575 | --enable-codesign=CERT sign gdb with 'codesign -s CERT' |
| 1576 | --disable-rpath do not hardcode runtime library paths |
| 1577 | --enable-source-highlight |
| 1578 | enable source-highlight for source listings |
| 1579 | --enable-werror treat compile warnings as errors |
| 1580 | --enable-build-warnings enable build-time compiler warnings if gcc is used |
| 1581 | --enable-gdb-build-warnings |
| 1582 | enable GDB specific build-time compiler warnings if |
| 1583 | gcc is used |
| 1584 | --enable-ubsan enable undefined behavior sanitizer (auto/yes/no) |
| 1585 | --enable-sim link gdb with simulator |
| 1586 | --enable-unit-tests Enable the inclusion of unit tests when compiling |
| 1587 | GDB |
| 1588 | |
| 1589 | Optional Packages: |
| 1590 | --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] |
| 1591 | --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) |
| 1592 | --with-separate-debug-dir=PATH |
| 1593 | look for global separate debug info in this path |
| 1594 | [LIBDIR/debug] |
| 1595 | --with-gdb-datadir=PATH look for global separate data files in this path |
| 1596 | [DATADIR/gdb] |
| 1597 | --with-relocated-sources=PATH |
| 1598 | automatically relocate this path for source files |
| 1599 | --with-auto-load-dir=PATH |
| 1600 | directories from which to load auto-loaded scripts |
| 1601 | [$debugdir:$datadir/auto-load] |
| 1602 | --with-auto-load-safe-path=PATH |
| 1603 | directories safe to hold auto-loaded files |
| 1604 | [--with-auto-load-dir] |
| 1605 | --without-auto-load-safe-path |
| 1606 | do not restrict auto-loaded files locations |
| 1607 | --with-debuginfod Enable debuginfo lookups with debuginfod |
| 1608 | (auto/yes/no) |
| 1609 | --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets |
| 1610 | --with-curses use the curses library instead of the termcap |
| 1611 | library |
| 1612 | --with-pkgversion=PKG Use PKG in the version string in place of "GDB" |
| 1613 | --with-bugurl=URL Direct users to URL to report a bug |
| 1614 | --with-system-zlib use installed libz |
| 1615 | --with-gnu-ld assume the C compiler uses GNU ld default=no |
| 1616 | --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib |
| 1617 | --without-libiconv-prefix don't search for libiconv in includedir and libdir |
| 1618 | --with-libiconv-type=TYPE type of library to search for (auto/static/shared) |
| 1619 | --with-iconv-bin=PATH specify where to find the iconv program |
| 1620 | --with-system-readline use installed readline library |
| 1621 | --with-jit-reader-dir=PATH |
| 1622 | directory to load the JIT readers from |
| 1623 | --with-expat include expat support (auto/yes/no) |
| 1624 | --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib |
| 1625 | --without-libexpat-prefix don't search for libexpat in includedir and libdir |
| 1626 | --with-libexpat-type=TYPE type of library to search for (auto/static/shared) |
| 1627 | --with-mpfr include MPFR support (auto/yes/no) |
| 1628 | --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib |
| 1629 | --without-libmpfr-prefix don't search for libmpfr in includedir and libdir |
| 1630 | --with-libmpfr-type=TYPE type of library to search for (auto/static/shared) |
| 1631 | --with-python[=PYTHON] include python support |
| 1632 | (auto/yes/no/<python-program>) |
| 1633 | --with-python-libdir[=DIR] |
| 1634 | search for python's libraries in DIR |
| 1635 | --with-guile[=GUILE] include guile support |
| 1636 | (auto/yes/no/<guile-version>/<pkg-config-program>) |
| 1637 | --with-intel-pt include Intel Processor Trace support (auto/yes/no) |
| 1638 | --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib |
| 1639 | --without-libipt-prefix don't search for libipt in includedir and libdir |
| 1640 | --with-libipt-type=TYPE type of library to search for (auto/static/shared) |
| 1641 | --without-included-regex |
| 1642 | don't use included regex; this is the default on |
| 1643 | systems with version 2 of the GNU C library (use |
| 1644 | with caution on other system) |
| 1645 | --with-sysroot[=DIR] search for usr/lib et al within DIR |
| 1646 | --with-system-gdbinit=PATH |
| 1647 | automatically load a system-wide gdbinit file |
| 1648 | --with-system-gdbinit-dir=PATH |
| 1649 | automatically load system-wide gdbinit files from |
| 1650 | this directory |
| 1651 | --with-lzma support lzma compression (auto/yes/no) |
| 1652 | --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib |
| 1653 | --without-liblzma-prefix don't search for liblzma in includedir and libdir |
| 1654 | --with-liblzma-type=TYPE type of library to search for (auto/static/shared) |
| 1655 | --with-tcl directory containing tcl configuration (tclConfig.sh) |
| 1656 | --with-tk directory containing tk configuration (tkConfig.sh) |
| 1657 | --with-x use the X Window System |
| 1658 | --with-babeltrace include babeltrace support (auto/yes/no) |
| 1659 | --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib |
| 1660 | --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir |
| 1661 | --with-libbabeltrace-type=TYPE type of library to search for (auto/static/shared) |
| 1662 | --with-xxhash use libxxhash for hashing (faster) (auto/yes/no) |
| 1663 | --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib |
| 1664 | --without-libxxhash-prefix don't search for libxxhash in includedir and libdir |
| 1665 | --with-libxxhash-type=TYPE type of library to search for (auto/static/shared) |
| 1666 | |
| 1667 | Some influential environment variables: |
| 1668 | CC C compiler command |
| 1669 | CFLAGS C compiler flags |
| 1670 | LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a |
| 1671 | nonstandard directory <lib dir> |
| 1672 | LIBS libraries to pass to the linker, e.g. -l<library> |
| 1673 | CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if |
| 1674 | you have headers in a nonstandard directory <include dir> |
| 1675 | CXX C++ compiler command |
| 1676 | CXXFLAGS C++ compiler flags |
| 1677 | CPP C preprocessor |
| 1678 | MAKEINFO Parent configure detects if it is of sufficient version. |
| 1679 | MAKEINFOFLAGS |
| 1680 | Parameters for MAKEINFO. |
| 1681 | YACC The `Yet Another Compiler Compiler' implementation to use. |
| 1682 | Defaults to the first program found out of: `bison -y', `byacc', |
| 1683 | `yacc'. |
| 1684 | YFLAGS The list of arguments that will be passed by default to $YACC. |
| 1685 | This script will default YFLAGS to the empty string to avoid a |
| 1686 | default value of `-d' given by some make applications. |
| 1687 | XMKMF Path to xmkmf, Makefile generator for X Window System |
| 1688 | |
| 1689 | Use these variables to override the choices made by `configure' or to help |
| 1690 | it to find libraries and programs with nonstandard names/locations. |
| 1691 | |
| 1692 | Report bugs to the package provider. |
| 1693 | _ACEOF |
| 1694 | ac_status=$? |
| 1695 | fi |
| 1696 | |
| 1697 | if test "$ac_init_help" = "recursive"; then |
| 1698 | # If there are subdirs, report their specific --help. |
| 1699 | for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue |
| 1700 | test -d "$ac_dir" || |
| 1701 | { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || |
| 1702 | continue |
| 1703 | ac_builddir=. |
| 1704 | |
| 1705 | case "$ac_dir" in |
| 1706 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; |
| 1707 | *) |
| 1708 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` |
| 1709 | # A ".." for each directory in $ac_dir_suffix. |
| 1710 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` |
| 1711 | case $ac_top_builddir_sub in |
| 1712 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; |
| 1713 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; |
| 1714 | esac ;; |
| 1715 | esac |
| 1716 | ac_abs_top_builddir=$ac_pwd |
| 1717 | ac_abs_builddir=$ac_pwd$ac_dir_suffix |
| 1718 | # for backward compatibility: |
| 1719 | ac_top_builddir=$ac_top_build_prefix |
| 1720 | |
| 1721 | case $srcdir in |
| 1722 | .) # We are building in place. |
| 1723 | ac_srcdir=. |
| 1724 | ac_top_srcdir=$ac_top_builddir_sub |
| 1725 | ac_abs_top_srcdir=$ac_pwd ;; |
| 1726 | [\\/]* | ?:[\\/]* ) # Absolute name. |
| 1727 | ac_srcdir=$srcdir$ac_dir_suffix; |
| 1728 | ac_top_srcdir=$srcdir |
| 1729 | ac_abs_top_srcdir=$srcdir ;; |
| 1730 | *) # Relative name. |
| 1731 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix |
| 1732 | ac_top_srcdir=$ac_top_build_prefix$srcdir |
| 1733 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; |
| 1734 | esac |
| 1735 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
| 1736 | |
| 1737 | cd "$ac_dir" || { ac_status=$?; continue; } |
| 1738 | # Check for guested configure. |
| 1739 | if test -f "$ac_srcdir/configure.gnu"; then |
| 1740 | echo && |
| 1741 | $SHELL "$ac_srcdir/configure.gnu" --help=recursive |
| 1742 | elif test -f "$ac_srcdir/configure"; then |
| 1743 | echo && |
| 1744 | $SHELL "$ac_srcdir/configure" --help=recursive |
| 1745 | else |
| 1746 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
| 1747 | fi || ac_status=$? |
| 1748 | cd "$ac_pwd" || { ac_status=$?; break; } |
| 1749 | done |
| 1750 | fi |
| 1751 | |
| 1752 | test -n "$ac_init_help" && exit $ac_status |
| 1753 | if $ac_init_version; then |
| 1754 | cat <<\_ACEOF |
| 1755 | configure |
| 1756 | generated by GNU Autoconf 2.69 |
| 1757 | |
| 1758 | Copyright (C) 2012 Free Software Foundation, Inc. |
| 1759 | This configure script is free software; the Free Software Foundation |
| 1760 | gives unlimited permission to copy, distribute and modify it. |
| 1761 | _ACEOF |
| 1762 | exit |
| 1763 | fi |
| 1764 | |
| 1765 | ## ------------------------ ## |
| 1766 | ## Autoconf initialization. ## |
| 1767 | ## ------------------------ ## |
| 1768 | |
| 1769 | # ac_fn_c_try_compile LINENO |
| 1770 | # -------------------------- |
| 1771 | # Try to compile conftest.$ac_ext, and return whether this succeeded. |
| 1772 | ac_fn_c_try_compile () |
| 1773 | { |
| 1774 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1775 | rm -f conftest.$ac_objext |
| 1776 | if { { ac_try="$ac_compile" |
| 1777 | case "(($ac_try" in |
| 1778 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1779 | *) ac_try_echo=$ac_try;; |
| 1780 | esac |
| 1781 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1782 | $as_echo "$ac_try_echo"; } >&5 |
| 1783 | (eval "$ac_compile") 2>conftest.err |
| 1784 | ac_status=$? |
| 1785 | if test -s conftest.err; then |
| 1786 | grep -v '^ *+' conftest.err >conftest.er1 |
| 1787 | cat conftest.er1 >&5 |
| 1788 | mv -f conftest.er1 conftest.err |
| 1789 | fi |
| 1790 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1791 | test $ac_status = 0; } && { |
| 1792 | test -z "$ac_c_werror_flag" || |
| 1793 | test ! -s conftest.err |
| 1794 | } && test -s conftest.$ac_objext; then : |
| 1795 | ac_retval=0 |
| 1796 | else |
| 1797 | $as_echo "$as_me: failed program was:" >&5 |
| 1798 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 1799 | |
| 1800 | ac_retval=1 |
| 1801 | fi |
| 1802 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 1803 | as_fn_set_status $ac_retval |
| 1804 | |
| 1805 | } # ac_fn_c_try_compile |
| 1806 | |
| 1807 | # ac_fn_cxx_try_compile LINENO |
| 1808 | # ---------------------------- |
| 1809 | # Try to compile conftest.$ac_ext, and return whether this succeeded. |
| 1810 | ac_fn_cxx_try_compile () |
| 1811 | { |
| 1812 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1813 | rm -f conftest.$ac_objext |
| 1814 | if { { ac_try="$ac_compile" |
| 1815 | case "(($ac_try" in |
| 1816 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1817 | *) ac_try_echo=$ac_try;; |
| 1818 | esac |
| 1819 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1820 | $as_echo "$ac_try_echo"; } >&5 |
| 1821 | (eval "$ac_compile") 2>conftest.err |
| 1822 | ac_status=$? |
| 1823 | if test -s conftest.err; then |
| 1824 | grep -v '^ *+' conftest.err >conftest.er1 |
| 1825 | cat conftest.er1 >&5 |
| 1826 | mv -f conftest.er1 conftest.err |
| 1827 | fi |
| 1828 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1829 | test $ac_status = 0; } && { |
| 1830 | test -z "$ac_cxx_werror_flag" || |
| 1831 | test ! -s conftest.err |
| 1832 | } && test -s conftest.$ac_objext; then : |
| 1833 | ac_retval=0 |
| 1834 | else |
| 1835 | $as_echo "$as_me: failed program was:" >&5 |
| 1836 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 1837 | |
| 1838 | ac_retval=1 |
| 1839 | fi |
| 1840 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 1841 | as_fn_set_status $ac_retval |
| 1842 | |
| 1843 | } # ac_fn_cxx_try_compile |
| 1844 | |
| 1845 | # ac_fn_c_try_cpp LINENO |
| 1846 | # ---------------------- |
| 1847 | # Try to preprocess conftest.$ac_ext, and return whether this succeeded. |
| 1848 | ac_fn_c_try_cpp () |
| 1849 | { |
| 1850 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1851 | if { { ac_try="$ac_cpp conftest.$ac_ext" |
| 1852 | case "(($ac_try" in |
| 1853 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1854 | *) ac_try_echo=$ac_try;; |
| 1855 | esac |
| 1856 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1857 | $as_echo "$ac_try_echo"; } >&5 |
| 1858 | (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err |
| 1859 | ac_status=$? |
| 1860 | if test -s conftest.err; then |
| 1861 | grep -v '^ *+' conftest.err >conftest.er1 |
| 1862 | cat conftest.er1 >&5 |
| 1863 | mv -f conftest.er1 conftest.err |
| 1864 | fi |
| 1865 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1866 | test $ac_status = 0; } > conftest.i && { |
| 1867 | test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || |
| 1868 | test ! -s conftest.err |
| 1869 | }; then : |
| 1870 | ac_retval=0 |
| 1871 | else |
| 1872 | $as_echo "$as_me: failed program was:" >&5 |
| 1873 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 1874 | |
| 1875 | ac_retval=1 |
| 1876 | fi |
| 1877 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 1878 | as_fn_set_status $ac_retval |
| 1879 | |
| 1880 | } # ac_fn_c_try_cpp |
| 1881 | |
| 1882 | # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES |
| 1883 | # ------------------------------------------------------- |
| 1884 | # Tests whether HEADER exists, giving a warning if it cannot be compiled using |
| 1885 | # the include files in INCLUDES and setting the cache variable VAR |
| 1886 | # accordingly. |
| 1887 | ac_fn_c_check_header_mongrel () |
| 1888 | { |
| 1889 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1890 | if eval \${$3+:} false; then : |
| 1891 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 1892 | $as_echo_n "checking for $2... " >&6; } |
| 1893 | if eval \${$3+:} false; then : |
| 1894 | $as_echo_n "(cached) " >&6 |
| 1895 | fi |
| 1896 | eval ac_res=\$$3 |
| 1897 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 1898 | $as_echo "$ac_res" >&6; } |
| 1899 | else |
| 1900 | # Is the header compilable? |
| 1901 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 |
| 1902 | $as_echo_n "checking $2 usability... " >&6; } |
| 1903 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1904 | /* end confdefs.h. */ |
| 1905 | $4 |
| 1906 | #include <$2> |
| 1907 | _ACEOF |
| 1908 | if ac_fn_c_try_compile "$LINENO"; then : |
| 1909 | ac_header_compiler=yes |
| 1910 | else |
| 1911 | ac_header_compiler=no |
| 1912 | fi |
| 1913 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 1914 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 |
| 1915 | $as_echo "$ac_header_compiler" >&6; } |
| 1916 | |
| 1917 | # Is the header present? |
| 1918 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 |
| 1919 | $as_echo_n "checking $2 presence... " >&6; } |
| 1920 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 1921 | /* end confdefs.h. */ |
| 1922 | #include <$2> |
| 1923 | _ACEOF |
| 1924 | if ac_fn_c_try_cpp "$LINENO"; then : |
| 1925 | ac_header_preproc=yes |
| 1926 | else |
| 1927 | ac_header_preproc=no |
| 1928 | fi |
| 1929 | rm -f conftest.err conftest.i conftest.$ac_ext |
| 1930 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 |
| 1931 | $as_echo "$ac_header_preproc" >&6; } |
| 1932 | |
| 1933 | # So? What about this header? |
| 1934 | case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( |
| 1935 | yes:no: ) |
| 1936 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 |
| 1937 | $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} |
| 1938 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 |
| 1939 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} |
| 1940 | ;; |
| 1941 | no:yes:* ) |
| 1942 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 |
| 1943 | $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} |
| 1944 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 |
| 1945 | $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} |
| 1946 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 |
| 1947 | $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} |
| 1948 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 |
| 1949 | $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} |
| 1950 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 |
| 1951 | $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} |
| 1952 | ;; |
| 1953 | esac |
| 1954 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 1955 | $as_echo_n "checking for $2... " >&6; } |
| 1956 | if eval \${$3+:} false; then : |
| 1957 | $as_echo_n "(cached) " >&6 |
| 1958 | else |
| 1959 | eval "$3=\$ac_header_compiler" |
| 1960 | fi |
| 1961 | eval ac_res=\$$3 |
| 1962 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 1963 | $as_echo "$ac_res" >&6; } |
| 1964 | fi |
| 1965 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 1966 | |
| 1967 | } # ac_fn_c_check_header_mongrel |
| 1968 | |
| 1969 | # ac_fn_c_try_run LINENO |
| 1970 | # ---------------------- |
| 1971 | # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes |
| 1972 | # that executables *can* be run. |
| 1973 | ac_fn_c_try_run () |
| 1974 | { |
| 1975 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 1976 | if { { ac_try="$ac_link" |
| 1977 | case "(($ac_try" in |
| 1978 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1979 | *) ac_try_echo=$ac_try;; |
| 1980 | esac |
| 1981 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1982 | $as_echo "$ac_try_echo"; } >&5 |
| 1983 | (eval "$ac_link") 2>&5 |
| 1984 | ac_status=$? |
| 1985 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1986 | test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' |
| 1987 | { { case "(($ac_try" in |
| 1988 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 1989 | *) ac_try_echo=$ac_try;; |
| 1990 | esac |
| 1991 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 1992 | $as_echo "$ac_try_echo"; } >&5 |
| 1993 | (eval "$ac_try") 2>&5 |
| 1994 | ac_status=$? |
| 1995 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 1996 | test $ac_status = 0; }; }; then : |
| 1997 | ac_retval=0 |
| 1998 | else |
| 1999 | $as_echo "$as_me: program exited with status $ac_status" >&5 |
| 2000 | $as_echo "$as_me: failed program was:" >&5 |
| 2001 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 2002 | |
| 2003 | ac_retval=$ac_status |
| 2004 | fi |
| 2005 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo |
| 2006 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 2007 | as_fn_set_status $ac_retval |
| 2008 | |
| 2009 | } # ac_fn_c_try_run |
| 2010 | |
| 2011 | # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES |
| 2012 | # ------------------------------------------------------- |
| 2013 | # Tests whether HEADER exists and can be compiled using the include files in |
| 2014 | # INCLUDES, setting the cache variable VAR accordingly. |
| 2015 | ac_fn_c_check_header_compile () |
| 2016 | { |
| 2017 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 2018 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 2019 | $as_echo_n "checking for $2... " >&6; } |
| 2020 | if eval \${$3+:} false; then : |
| 2021 | $as_echo_n "(cached) " >&6 |
| 2022 | else |
| 2023 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2024 | /* end confdefs.h. */ |
| 2025 | $4 |
| 2026 | #include <$2> |
| 2027 | _ACEOF |
| 2028 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2029 | eval "$3=yes" |
| 2030 | else |
| 2031 | eval "$3=no" |
| 2032 | fi |
| 2033 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2034 | fi |
| 2035 | eval ac_res=\$$3 |
| 2036 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 2037 | $as_echo "$ac_res" >&6; } |
| 2038 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 2039 | |
| 2040 | } # ac_fn_c_check_header_compile |
| 2041 | |
| 2042 | # ac_fn_c_try_link LINENO |
| 2043 | # ----------------------- |
| 2044 | # Try to link conftest.$ac_ext, and return whether this succeeded. |
| 2045 | ac_fn_c_try_link () |
| 2046 | { |
| 2047 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 2048 | rm -f conftest.$ac_objext conftest$ac_exeext |
| 2049 | if { { ac_try="$ac_link" |
| 2050 | case "(($ac_try" in |
| 2051 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 2052 | *) ac_try_echo=$ac_try;; |
| 2053 | esac |
| 2054 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 2055 | $as_echo "$ac_try_echo"; } >&5 |
| 2056 | (eval "$ac_link") 2>conftest.err |
| 2057 | ac_status=$? |
| 2058 | if test -s conftest.err; then |
| 2059 | grep -v '^ *+' conftest.err >conftest.er1 |
| 2060 | cat conftest.er1 >&5 |
| 2061 | mv -f conftest.er1 conftest.err |
| 2062 | fi |
| 2063 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 2064 | test $ac_status = 0; } && { |
| 2065 | test -z "$ac_c_werror_flag" || |
| 2066 | test ! -s conftest.err |
| 2067 | } && test -s conftest$ac_exeext && { |
| 2068 | test "$cross_compiling" = yes || |
| 2069 | test -x conftest$ac_exeext |
| 2070 | }; then : |
| 2071 | ac_retval=0 |
| 2072 | else |
| 2073 | $as_echo "$as_me: failed program was:" >&5 |
| 2074 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 2075 | |
| 2076 | ac_retval=1 |
| 2077 | fi |
| 2078 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information |
| 2079 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would |
| 2080 | # interfere with the next link command; also delete a directory that is |
| 2081 | # left behind by Apple's compiler. We do this before executing the actions. |
| 2082 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo |
| 2083 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 2084 | as_fn_set_status $ac_retval |
| 2085 | |
| 2086 | } # ac_fn_c_try_link |
| 2087 | |
| 2088 | # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES |
| 2089 | # -------------------------------------------- |
| 2090 | # Tries to find the compile-time value of EXPR in a program that includes |
| 2091 | # INCLUDES, setting VAR accordingly. Returns whether the value could be |
| 2092 | # computed |
| 2093 | ac_fn_c_compute_int () |
| 2094 | { |
| 2095 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 2096 | if test "$cross_compiling" = yes; then |
| 2097 | # Depending upon the size, compute the lo and hi bounds. |
| 2098 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2099 | /* end confdefs.h. */ |
| 2100 | $4 |
| 2101 | int |
| 2102 | main () |
| 2103 | { |
| 2104 | static int test_array [1 - 2 * !(($2) >= 0)]; |
| 2105 | test_array [0] = 0; |
| 2106 | return test_array [0]; |
| 2107 | |
| 2108 | ; |
| 2109 | return 0; |
| 2110 | } |
| 2111 | _ACEOF |
| 2112 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2113 | ac_lo=0 ac_mid=0 |
| 2114 | while :; do |
| 2115 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2116 | /* end confdefs.h. */ |
| 2117 | $4 |
| 2118 | int |
| 2119 | main () |
| 2120 | { |
| 2121 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; |
| 2122 | test_array [0] = 0; |
| 2123 | return test_array [0]; |
| 2124 | |
| 2125 | ; |
| 2126 | return 0; |
| 2127 | } |
| 2128 | _ACEOF |
| 2129 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2130 | ac_hi=$ac_mid; break |
| 2131 | else |
| 2132 | as_fn_arith $ac_mid + 1 && ac_lo=$as_val |
| 2133 | if test $ac_lo -le $ac_mid; then |
| 2134 | ac_lo= ac_hi= |
| 2135 | break |
| 2136 | fi |
| 2137 | as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val |
| 2138 | fi |
| 2139 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2140 | done |
| 2141 | else |
| 2142 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2143 | /* end confdefs.h. */ |
| 2144 | $4 |
| 2145 | int |
| 2146 | main () |
| 2147 | { |
| 2148 | static int test_array [1 - 2 * !(($2) < 0)]; |
| 2149 | test_array [0] = 0; |
| 2150 | return test_array [0]; |
| 2151 | |
| 2152 | ; |
| 2153 | return 0; |
| 2154 | } |
| 2155 | _ACEOF |
| 2156 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2157 | ac_hi=-1 ac_mid=-1 |
| 2158 | while :; do |
| 2159 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2160 | /* end confdefs.h. */ |
| 2161 | $4 |
| 2162 | int |
| 2163 | main () |
| 2164 | { |
| 2165 | static int test_array [1 - 2 * !(($2) >= $ac_mid)]; |
| 2166 | test_array [0] = 0; |
| 2167 | return test_array [0]; |
| 2168 | |
| 2169 | ; |
| 2170 | return 0; |
| 2171 | } |
| 2172 | _ACEOF |
| 2173 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2174 | ac_lo=$ac_mid; break |
| 2175 | else |
| 2176 | as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val |
| 2177 | if test $ac_mid -le $ac_hi; then |
| 2178 | ac_lo= ac_hi= |
| 2179 | break |
| 2180 | fi |
| 2181 | as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val |
| 2182 | fi |
| 2183 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2184 | done |
| 2185 | else |
| 2186 | ac_lo= ac_hi= |
| 2187 | fi |
| 2188 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2189 | fi |
| 2190 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2191 | # Binary search between lo and hi bounds. |
| 2192 | while test "x$ac_lo" != "x$ac_hi"; do |
| 2193 | as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val |
| 2194 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2195 | /* end confdefs.h. */ |
| 2196 | $4 |
| 2197 | int |
| 2198 | main () |
| 2199 | { |
| 2200 | static int test_array [1 - 2 * !(($2) <= $ac_mid)]; |
| 2201 | test_array [0] = 0; |
| 2202 | return test_array [0]; |
| 2203 | |
| 2204 | ; |
| 2205 | return 0; |
| 2206 | } |
| 2207 | _ACEOF |
| 2208 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2209 | ac_hi=$ac_mid |
| 2210 | else |
| 2211 | as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val |
| 2212 | fi |
| 2213 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2214 | done |
| 2215 | case $ac_lo in #(( |
| 2216 | ?*) eval "$3=\$ac_lo"; ac_retval=0 ;; |
| 2217 | '') ac_retval=1 ;; |
| 2218 | esac |
| 2219 | else |
| 2220 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2221 | /* end confdefs.h. */ |
| 2222 | $4 |
| 2223 | static long int longval () { return $2; } |
| 2224 | static unsigned long int ulongval () { return $2; } |
| 2225 | #include <stdio.h> |
| 2226 | #include <stdlib.h> |
| 2227 | int |
| 2228 | main () |
| 2229 | { |
| 2230 | |
| 2231 | FILE *f = fopen ("conftest.val", "w"); |
| 2232 | if (! f) |
| 2233 | return 1; |
| 2234 | if (($2) < 0) |
| 2235 | { |
| 2236 | long int i = longval (); |
| 2237 | if (i != ($2)) |
| 2238 | return 1; |
| 2239 | fprintf (f, "%ld", i); |
| 2240 | } |
| 2241 | else |
| 2242 | { |
| 2243 | unsigned long int i = ulongval (); |
| 2244 | if (i != ($2)) |
| 2245 | return 1; |
| 2246 | fprintf (f, "%lu", i); |
| 2247 | } |
| 2248 | /* Do not output a trailing newline, as this causes \r\n confusion |
| 2249 | on some platforms. */ |
| 2250 | return ferror (f) || fclose (f) != 0; |
| 2251 | |
| 2252 | ; |
| 2253 | return 0; |
| 2254 | } |
| 2255 | _ACEOF |
| 2256 | if ac_fn_c_try_run "$LINENO"; then : |
| 2257 | echo >>conftest.val; read $3 <conftest.val; ac_retval=0 |
| 2258 | else |
| 2259 | ac_retval=1 |
| 2260 | fi |
| 2261 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 2262 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 2263 | rm -f conftest.val |
| 2264 | |
| 2265 | fi |
| 2266 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 2267 | as_fn_set_status $ac_retval |
| 2268 | |
| 2269 | } # ac_fn_c_compute_int |
| 2270 | |
| 2271 | # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES |
| 2272 | # --------------------------------------------- |
| 2273 | # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR |
| 2274 | # accordingly. |
| 2275 | ac_fn_c_check_decl () |
| 2276 | { |
| 2277 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 2278 | as_decl_name=`echo $2|sed 's/ *(.*//'` |
| 2279 | as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` |
| 2280 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 |
| 2281 | $as_echo_n "checking whether $as_decl_name is declared... " >&6; } |
| 2282 | if eval \${$3+:} false; then : |
| 2283 | $as_echo_n "(cached) " >&6 |
| 2284 | else |
| 2285 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2286 | /* end confdefs.h. */ |
| 2287 | $4 |
| 2288 | int |
| 2289 | main () |
| 2290 | { |
| 2291 | #ifndef $as_decl_name |
| 2292 | #ifdef __cplusplus |
| 2293 | (void) $as_decl_use; |
| 2294 | #else |
| 2295 | (void) $as_decl_name; |
| 2296 | #endif |
| 2297 | #endif |
| 2298 | |
| 2299 | ; |
| 2300 | return 0; |
| 2301 | } |
| 2302 | _ACEOF |
| 2303 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2304 | eval "$3=yes" |
| 2305 | else |
| 2306 | eval "$3=no" |
| 2307 | fi |
| 2308 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2309 | fi |
| 2310 | eval ac_res=\$$3 |
| 2311 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 2312 | $as_echo "$ac_res" >&6; } |
| 2313 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 2314 | |
| 2315 | } # ac_fn_c_check_decl |
| 2316 | |
| 2317 | # ac_fn_c_check_func LINENO FUNC VAR |
| 2318 | # ---------------------------------- |
| 2319 | # Tests whether FUNC exists, setting the cache variable VAR accordingly |
| 2320 | ac_fn_c_check_func () |
| 2321 | { |
| 2322 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 2323 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 2324 | $as_echo_n "checking for $2... " >&6; } |
| 2325 | if eval \${$3+:} false; then : |
| 2326 | $as_echo_n "(cached) " >&6 |
| 2327 | else |
| 2328 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2329 | /* end confdefs.h. */ |
| 2330 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
| 2331 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ |
| 2332 | #define $2 innocuous_$2 |
| 2333 | |
| 2334 | /* System header to define __stub macros and hopefully few prototypes, |
| 2335 | which can conflict with char $2 (); below. |
| 2336 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
| 2337 | <limits.h> exists even on freestanding compilers. */ |
| 2338 | |
| 2339 | #ifdef __STDC__ |
| 2340 | # include <limits.h> |
| 2341 | #else |
| 2342 | # include <assert.h> |
| 2343 | #endif |
| 2344 | |
| 2345 | #undef $2 |
| 2346 | |
| 2347 | /* Override any GCC internal prototype to avoid an error. |
| 2348 | Use char because int might match the return type of a GCC |
| 2349 | builtin and then its argument prototype would still apply. */ |
| 2350 | #ifdef __cplusplus |
| 2351 | extern "C" |
| 2352 | #endif |
| 2353 | char $2 (); |
| 2354 | /* The GNU C library defines this for functions which it implements |
| 2355 | to always fail with ENOSYS. Some functions are actually named |
| 2356 | something starting with __ and the normal name is an alias. */ |
| 2357 | #if defined __stub_$2 || defined __stub___$2 |
| 2358 | choke me |
| 2359 | #endif |
| 2360 | |
| 2361 | int |
| 2362 | main () |
| 2363 | { |
| 2364 | return $2 (); |
| 2365 | ; |
| 2366 | return 0; |
| 2367 | } |
| 2368 | _ACEOF |
| 2369 | if ac_fn_c_try_link "$LINENO"; then : |
| 2370 | eval "$3=yes" |
| 2371 | else |
| 2372 | eval "$3=no" |
| 2373 | fi |
| 2374 | rm -f core conftest.err conftest.$ac_objext \ |
| 2375 | conftest$ac_exeext conftest.$ac_ext |
| 2376 | fi |
| 2377 | eval ac_res=\$$3 |
| 2378 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 2379 | $as_echo "$ac_res" >&6; } |
| 2380 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 2381 | |
| 2382 | } # ac_fn_c_check_func |
| 2383 | |
| 2384 | # ac_fn_c_check_type LINENO TYPE VAR INCLUDES |
| 2385 | # ------------------------------------------- |
| 2386 | # Tests whether TYPE exists after having included INCLUDES, setting cache |
| 2387 | # variable VAR accordingly. |
| 2388 | ac_fn_c_check_type () |
| 2389 | { |
| 2390 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 2391 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 2392 | $as_echo_n "checking for $2... " >&6; } |
| 2393 | if eval \${$3+:} false; then : |
| 2394 | $as_echo_n "(cached) " >&6 |
| 2395 | else |
| 2396 | eval "$3=no" |
| 2397 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2398 | /* end confdefs.h. */ |
| 2399 | $4 |
| 2400 | int |
| 2401 | main () |
| 2402 | { |
| 2403 | if (sizeof ($2)) |
| 2404 | return 0; |
| 2405 | ; |
| 2406 | return 0; |
| 2407 | } |
| 2408 | _ACEOF |
| 2409 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2410 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2411 | /* end confdefs.h. */ |
| 2412 | $4 |
| 2413 | int |
| 2414 | main () |
| 2415 | { |
| 2416 | if (sizeof (($2))) |
| 2417 | return 0; |
| 2418 | ; |
| 2419 | return 0; |
| 2420 | } |
| 2421 | _ACEOF |
| 2422 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2423 | |
| 2424 | else |
| 2425 | eval "$3=yes" |
| 2426 | fi |
| 2427 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2428 | fi |
| 2429 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2430 | fi |
| 2431 | eval ac_res=\$$3 |
| 2432 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 2433 | $as_echo "$ac_res" >&6; } |
| 2434 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 2435 | |
| 2436 | } # ac_fn_c_check_type |
| 2437 | |
| 2438 | # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES |
| 2439 | # ---------------------------------------------------- |
| 2440 | # Tries to find if the field MEMBER exists in type AGGR, after including |
| 2441 | # INCLUDES, setting cache variable VAR accordingly. |
| 2442 | ac_fn_c_check_member () |
| 2443 | { |
| 2444 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 2445 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 |
| 2446 | $as_echo_n "checking for $2.$3... " >&6; } |
| 2447 | if eval \${$4+:} false; then : |
| 2448 | $as_echo_n "(cached) " >&6 |
| 2449 | else |
| 2450 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2451 | /* end confdefs.h. */ |
| 2452 | $5 |
| 2453 | int |
| 2454 | main () |
| 2455 | { |
| 2456 | static $2 ac_aggr; |
| 2457 | if (ac_aggr.$3) |
| 2458 | return 0; |
| 2459 | ; |
| 2460 | return 0; |
| 2461 | } |
| 2462 | _ACEOF |
| 2463 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2464 | eval "$4=yes" |
| 2465 | else |
| 2466 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2467 | /* end confdefs.h. */ |
| 2468 | $5 |
| 2469 | int |
| 2470 | main () |
| 2471 | { |
| 2472 | static $2 ac_aggr; |
| 2473 | if (sizeof ac_aggr.$3) |
| 2474 | return 0; |
| 2475 | ; |
| 2476 | return 0; |
| 2477 | } |
| 2478 | _ACEOF |
| 2479 | if ac_fn_c_try_compile "$LINENO"; then : |
| 2480 | eval "$4=yes" |
| 2481 | else |
| 2482 | eval "$4=no" |
| 2483 | fi |
| 2484 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2485 | fi |
| 2486 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 2487 | fi |
| 2488 | eval ac_res=\$$4 |
| 2489 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 2490 | $as_echo "$ac_res" >&6; } |
| 2491 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 2492 | |
| 2493 | } # ac_fn_c_check_member |
| 2494 | |
| 2495 | # ac_fn_cxx_try_link LINENO |
| 2496 | # ------------------------- |
| 2497 | # Try to link conftest.$ac_ext, and return whether this succeeded. |
| 2498 | ac_fn_cxx_try_link () |
| 2499 | { |
| 2500 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 2501 | rm -f conftest.$ac_objext conftest$ac_exeext |
| 2502 | if { { ac_try="$ac_link" |
| 2503 | case "(($ac_try" in |
| 2504 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 2505 | *) ac_try_echo=$ac_try;; |
| 2506 | esac |
| 2507 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 2508 | $as_echo "$ac_try_echo"; } >&5 |
| 2509 | (eval "$ac_link") 2>conftest.err |
| 2510 | ac_status=$? |
| 2511 | if test -s conftest.err; then |
| 2512 | grep -v '^ *+' conftest.err >conftest.er1 |
| 2513 | cat conftest.er1 >&5 |
| 2514 | mv -f conftest.er1 conftest.err |
| 2515 | fi |
| 2516 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 2517 | test $ac_status = 0; } && { |
| 2518 | test -z "$ac_cxx_werror_flag" || |
| 2519 | test ! -s conftest.err |
| 2520 | } && test -s conftest$ac_exeext && { |
| 2521 | test "$cross_compiling" = yes || |
| 2522 | test -x conftest$ac_exeext |
| 2523 | }; then : |
| 2524 | ac_retval=0 |
| 2525 | else |
| 2526 | $as_echo "$as_me: failed program was:" >&5 |
| 2527 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 2528 | |
| 2529 | ac_retval=1 |
| 2530 | fi |
| 2531 | # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information |
| 2532 | # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would |
| 2533 | # interfere with the next link command; also delete a directory that is |
| 2534 | # left behind by Apple's compiler. We do this before executing the actions. |
| 2535 | rm -rf conftest.dSYM conftest_ipa8_conftest.oo |
| 2536 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 2537 | as_fn_set_status $ac_retval |
| 2538 | |
| 2539 | } # ac_fn_cxx_try_link |
| 2540 | |
| 2541 | # ac_fn_cxx_check_func LINENO FUNC VAR |
| 2542 | # ------------------------------------ |
| 2543 | # Tests whether FUNC exists, setting the cache variable VAR accordingly |
| 2544 | ac_fn_cxx_check_func () |
| 2545 | { |
| 2546 | as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 2547 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 |
| 2548 | $as_echo_n "checking for $2... " >&6; } |
| 2549 | if eval \${$3+:} false; then : |
| 2550 | $as_echo_n "(cached) " >&6 |
| 2551 | else |
| 2552 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 2553 | /* end confdefs.h. */ |
| 2554 | /* Define $2 to an innocuous variant, in case <limits.h> declares $2. |
| 2555 | For example, HP-UX 11i <limits.h> declares gettimeofday. */ |
| 2556 | #define $2 innocuous_$2 |
| 2557 | |
| 2558 | /* System header to define __stub macros and hopefully few prototypes, |
| 2559 | which can conflict with char $2 (); below. |
| 2560 | Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
| 2561 | <limits.h> exists even on freestanding compilers. */ |
| 2562 | |
| 2563 | #ifdef __STDC__ |
| 2564 | # include <limits.h> |
| 2565 | #else |
| 2566 | # include <assert.h> |
| 2567 | #endif |
| 2568 | |
| 2569 | #undef $2 |
| 2570 | |
| 2571 | /* Override any GCC internal prototype to avoid an error. |
| 2572 | Use char because int might match the return type of a GCC |
| 2573 | builtin and then its argument prototype would still apply. */ |
| 2574 | #ifdef __cplusplus |
| 2575 | extern "C" |
| 2576 | #endif |
| 2577 | char $2 (); |
| 2578 | /* The GNU C library defines this for functions which it implements |
| 2579 | to always fail with ENOSYS. Some functions are actually named |
| 2580 | something starting with __ and the normal name is an alias. */ |
| 2581 | #if defined __stub_$2 || defined __stub___$2 |
| 2582 | choke me |
| 2583 | #endif |
| 2584 | |
| 2585 | int |
| 2586 | main () |
| 2587 | { |
| 2588 | return $2 (); |
| 2589 | ; |
| 2590 | return 0; |
| 2591 | } |
| 2592 | _ACEOF |
| 2593 | if ac_fn_cxx_try_link "$LINENO"; then : |
| 2594 | eval "$3=yes" |
| 2595 | else |
| 2596 | eval "$3=no" |
| 2597 | fi |
| 2598 | rm -f core conftest.err conftest.$ac_objext \ |
| 2599 | conftest$ac_exeext conftest.$ac_ext |
| 2600 | fi |
| 2601 | eval ac_res=\$$3 |
| 2602 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 2603 | $as_echo "$ac_res" >&6; } |
| 2604 | eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno |
| 2605 | |
| 2606 | } # ac_fn_cxx_check_func |
| 2607 | cat >config.log <<_ACEOF |
| 2608 | This file contains any messages produced by compilers while |
| 2609 | running configure, to aid debugging if configure makes a mistake. |
| 2610 | |
| 2611 | It was created by $as_me, which was |
| 2612 | generated by GNU Autoconf 2.69. Invocation command line was |
| 2613 | |
| 2614 | $ $0 $@ |
| 2615 | |
| 2616 | _ACEOF |
| 2617 | exec 5>>config.log |
| 2618 | { |
| 2619 | cat <<_ASUNAME |
| 2620 | ## --------- ## |
| 2621 | ## Platform. ## |
| 2622 | ## --------- ## |
| 2623 | |
| 2624 | hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` |
| 2625 | uname -m = `(uname -m) 2>/dev/null || echo unknown` |
| 2626 | uname -r = `(uname -r) 2>/dev/null || echo unknown` |
| 2627 | uname -s = `(uname -s) 2>/dev/null || echo unknown` |
| 2628 | uname -v = `(uname -v) 2>/dev/null || echo unknown` |
| 2629 | |
| 2630 | /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` |
| 2631 | /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` |
| 2632 | |
| 2633 | /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` |
| 2634 | /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` |
| 2635 | /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` |
| 2636 | /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` |
| 2637 | /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` |
| 2638 | /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` |
| 2639 | /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` |
| 2640 | |
| 2641 | _ASUNAME |
| 2642 | |
| 2643 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 2644 | for as_dir in $PATH |
| 2645 | do |
| 2646 | IFS=$as_save_IFS |
| 2647 | test -z "$as_dir" && as_dir=. |
| 2648 | $as_echo "PATH: $as_dir" |
| 2649 | done |
| 2650 | IFS=$as_save_IFS |
| 2651 | |
| 2652 | } >&5 |
| 2653 | |
| 2654 | cat >&5 <<_ACEOF |
| 2655 | |
| 2656 | |
| 2657 | ## ----------- ## |
| 2658 | ## Core tests. ## |
| 2659 | ## ----------- ## |
| 2660 | |
| 2661 | _ACEOF |
| 2662 | |
| 2663 | |
| 2664 | # Keep a trace of the command line. |
| 2665 | # Strip out --no-create and --no-recursion so they do not pile up. |
| 2666 | # Strip out --silent because we don't want to record it for future runs. |
| 2667 | # Also quote any args containing shell meta-characters. |
| 2668 | # Make two passes to allow for proper duplicate-argument suppression. |
| 2669 | ac_configure_args= |
| 2670 | ac_configure_args0= |
| 2671 | ac_configure_args1= |
| 2672 | ac_must_keep_next=false |
| 2673 | for ac_pass in 1 2 |
| 2674 | do |
| 2675 | for ac_arg |
| 2676 | do |
| 2677 | case $ac_arg in |
| 2678 | -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; |
| 2679 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 2680 | | -silent | --silent | --silen | --sile | --sil) |
| 2681 | continue ;; |
| 2682 | *\'*) |
| 2683 | ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
| 2684 | esac |
| 2685 | case $ac_pass in |
| 2686 | 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; |
| 2687 | 2) |
| 2688 | as_fn_append ac_configure_args1 " '$ac_arg'" |
| 2689 | if test $ac_must_keep_next = true; then |
| 2690 | ac_must_keep_next=false # Got value, back to normal. |
| 2691 | else |
| 2692 | case $ac_arg in |
| 2693 | *=* | --config-cache | -C | -disable-* | --disable-* \ |
| 2694 | | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ |
| 2695 | | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ |
| 2696 | | -with-* | --with-* | -without-* | --without-* | --x) |
| 2697 | case "$ac_configure_args0 " in |
| 2698 | "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; |
| 2699 | esac |
| 2700 | ;; |
| 2701 | -* ) ac_must_keep_next=true ;; |
| 2702 | esac |
| 2703 | fi |
| 2704 | as_fn_append ac_configure_args " '$ac_arg'" |
| 2705 | ;; |
| 2706 | esac |
| 2707 | done |
| 2708 | done |
| 2709 | { ac_configure_args0=; unset ac_configure_args0;} |
| 2710 | { ac_configure_args1=; unset ac_configure_args1;} |
| 2711 | |
| 2712 | # When interrupted or exit'd, cleanup temporary files, and complete |
| 2713 | # config.log. We remove comments because anyway the quotes in there |
| 2714 | # would cause problems or look ugly. |
| 2715 | # WARNING: Use '\'' to represent an apostrophe within the trap. |
| 2716 | # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. |
| 2717 | trap 'exit_status=$? |
| 2718 | # Save into config.log some information that might help in debugging. |
| 2719 | { |
| 2720 | echo |
| 2721 | |
| 2722 | $as_echo "## ---------------- ## |
| 2723 | ## Cache variables. ## |
| 2724 | ## ---------------- ##" |
| 2725 | echo |
| 2726 | # The following way of writing the cache mishandles newlines in values, |
| 2727 | ( |
| 2728 | for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do |
| 2729 | eval ac_val=\$$ac_var |
| 2730 | case $ac_val in #( |
| 2731 | *${as_nl}*) |
| 2732 | case $ac_var in #( |
| 2733 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 |
| 2734 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; |
| 2735 | esac |
| 2736 | case $ac_var in #( |
| 2737 | _ | IFS | as_nl) ;; #( |
| 2738 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( |
| 2739 | *) { eval $ac_var=; unset $ac_var;} ;; |
| 2740 | esac ;; |
| 2741 | esac |
| 2742 | done |
| 2743 | (set) 2>&1 | |
| 2744 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( |
| 2745 | *${as_nl}ac_space=\ *) |
| 2746 | sed -n \ |
| 2747 | "s/'\''/'\''\\\\'\'''\''/g; |
| 2748 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" |
| 2749 | ;; #( |
| 2750 | *) |
| 2751 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
| 2752 | ;; |
| 2753 | esac | |
| 2754 | sort |
| 2755 | ) |
| 2756 | echo |
| 2757 | |
| 2758 | $as_echo "## ----------------- ## |
| 2759 | ## Output variables. ## |
| 2760 | ## ----------------- ##" |
| 2761 | echo |
| 2762 | for ac_var in $ac_subst_vars |
| 2763 | do |
| 2764 | eval ac_val=\$$ac_var |
| 2765 | case $ac_val in |
| 2766 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; |
| 2767 | esac |
| 2768 | $as_echo "$ac_var='\''$ac_val'\''" |
| 2769 | done | sort |
| 2770 | echo |
| 2771 | |
| 2772 | if test -n "$ac_subst_files"; then |
| 2773 | $as_echo "## ------------------- ## |
| 2774 | ## File substitutions. ## |
| 2775 | ## ------------------- ##" |
| 2776 | echo |
| 2777 | for ac_var in $ac_subst_files |
| 2778 | do |
| 2779 | eval ac_val=\$$ac_var |
| 2780 | case $ac_val in |
| 2781 | *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; |
| 2782 | esac |
| 2783 | $as_echo "$ac_var='\''$ac_val'\''" |
| 2784 | done | sort |
| 2785 | echo |
| 2786 | fi |
| 2787 | |
| 2788 | if test -s confdefs.h; then |
| 2789 | $as_echo "## ----------- ## |
| 2790 | ## confdefs.h. ## |
| 2791 | ## ----------- ##" |
| 2792 | echo |
| 2793 | cat confdefs.h |
| 2794 | echo |
| 2795 | fi |
| 2796 | test "$ac_signal" != 0 && |
| 2797 | $as_echo "$as_me: caught signal $ac_signal" |
| 2798 | $as_echo "$as_me: exit $exit_status" |
| 2799 | } >&5 |
| 2800 | rm -f core *.core core.conftest.* && |
| 2801 | rm -f -r conftest* confdefs* conf$$* $ac_clean_files && |
| 2802 | exit $exit_status |
| 2803 | ' 0 |
| 2804 | for ac_signal in 1 2 13 15; do |
| 2805 | trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal |
| 2806 | done |
| 2807 | ac_signal=0 |
| 2808 | |
| 2809 | # confdefs.h avoids OS command line length limits that DEFS can exceed. |
| 2810 | rm -f -r conftest* confdefs.h |
| 2811 | |
| 2812 | $as_echo "/* confdefs.h */" > confdefs.h |
| 2813 | |
| 2814 | # Predefined preprocessor variables. |
| 2815 | |
| 2816 | cat >>confdefs.h <<_ACEOF |
| 2817 | #define PACKAGE_NAME "$PACKAGE_NAME" |
| 2818 | _ACEOF |
| 2819 | |
| 2820 | cat >>confdefs.h <<_ACEOF |
| 2821 | #define PACKAGE_TARNAME "$PACKAGE_TARNAME" |
| 2822 | _ACEOF |
| 2823 | |
| 2824 | cat >>confdefs.h <<_ACEOF |
| 2825 | #define PACKAGE_VERSION "$PACKAGE_VERSION" |
| 2826 | _ACEOF |
| 2827 | |
| 2828 | cat >>confdefs.h <<_ACEOF |
| 2829 | #define PACKAGE_STRING "$PACKAGE_STRING" |
| 2830 | _ACEOF |
| 2831 | |
| 2832 | cat >>confdefs.h <<_ACEOF |
| 2833 | #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" |
| 2834 | _ACEOF |
| 2835 | |
| 2836 | cat >>confdefs.h <<_ACEOF |
| 2837 | #define PACKAGE_URL "$PACKAGE_URL" |
| 2838 | _ACEOF |
| 2839 | |
| 2840 | |
| 2841 | # Let the site file select an alternate cache file if it wants to. |
| 2842 | # Prefer an explicitly selected file to automatically selected ones. |
| 2843 | ac_site_file1=NONE |
| 2844 | ac_site_file2=NONE |
| 2845 | if test -n "$CONFIG_SITE"; then |
| 2846 | # We do not want a PATH search for config.site. |
| 2847 | case $CONFIG_SITE in #(( |
| 2848 | -*) ac_site_file1=./$CONFIG_SITE;; |
| 2849 | */*) ac_site_file1=$CONFIG_SITE;; |
| 2850 | *) ac_site_file1=./$CONFIG_SITE;; |
| 2851 | esac |
| 2852 | elif test "x$prefix" != xNONE; then |
| 2853 | ac_site_file1=$prefix/share/config.site |
| 2854 | ac_site_file2=$prefix/etc/config.site |
| 2855 | else |
| 2856 | ac_site_file1=$ac_default_prefix/share/config.site |
| 2857 | ac_site_file2=$ac_default_prefix/etc/config.site |
| 2858 | fi |
| 2859 | for ac_site_file in "$ac_site_file1" "$ac_site_file2" |
| 2860 | do |
| 2861 | test "x$ac_site_file" = xNONE && continue |
| 2862 | if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then |
| 2863 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 |
| 2864 | $as_echo "$as_me: loading site script $ac_site_file" >&6;} |
| 2865 | sed 's/^/| /' "$ac_site_file" >&5 |
| 2866 | . "$ac_site_file" \ |
| 2867 | || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 2868 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 2869 | as_fn_error $? "failed to load site script $ac_site_file |
| 2870 | See \`config.log' for more details" "$LINENO" 5; } |
| 2871 | fi |
| 2872 | done |
| 2873 | |
| 2874 | if test -r "$cache_file"; then |
| 2875 | # Some versions of bash will fail to source /dev/null (special files |
| 2876 | # actually), so we avoid doing that. DJGPP emulates it as a regular file. |
| 2877 | if test /dev/null != "$cache_file" && test -f "$cache_file"; then |
| 2878 | { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 |
| 2879 | $as_echo "$as_me: loading cache $cache_file" >&6;} |
| 2880 | case $cache_file in |
| 2881 | [\\/]* | ?:[\\/]* ) . "$cache_file";; |
| 2882 | *) . "./$cache_file";; |
| 2883 | esac |
| 2884 | fi |
| 2885 | else |
| 2886 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 |
| 2887 | $as_echo "$as_me: creating cache $cache_file" >&6;} |
| 2888 | >$cache_file |
| 2889 | fi |
| 2890 | |
| 2891 | as_fn_append ac_header_list " stdlib.h" |
| 2892 | as_fn_append ac_header_list " unistd.h" |
| 2893 | as_fn_append ac_header_list " sys/param.h" |
| 2894 | # Check that the precious variables saved in the cache have kept the same |
| 2895 | # value. |
| 2896 | ac_cache_corrupted=false |
| 2897 | for ac_var in $ac_precious_vars; do |
| 2898 | eval ac_old_set=\$ac_cv_env_${ac_var}_set |
| 2899 | eval ac_new_set=\$ac_env_${ac_var}_set |
| 2900 | eval ac_old_val=\$ac_cv_env_${ac_var}_value |
| 2901 | eval ac_new_val=\$ac_env_${ac_var}_value |
| 2902 | case $ac_old_set,$ac_new_set in |
| 2903 | set,) |
| 2904 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 |
| 2905 | $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} |
| 2906 | ac_cache_corrupted=: ;; |
| 2907 | ,set) |
| 2908 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 |
| 2909 | $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} |
| 2910 | ac_cache_corrupted=: ;; |
| 2911 | ,);; |
| 2912 | *) |
| 2913 | if test "x$ac_old_val" != "x$ac_new_val"; then |
| 2914 | # differences in whitespace do not lead to failure. |
| 2915 | ac_old_val_w=`echo x $ac_old_val` |
| 2916 | ac_new_val_w=`echo x $ac_new_val` |
| 2917 | if test "$ac_old_val_w" != "$ac_new_val_w"; then |
| 2918 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 |
| 2919 | $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} |
| 2920 | ac_cache_corrupted=: |
| 2921 | else |
| 2922 | { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 |
| 2923 | $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} |
| 2924 | eval $ac_var=\$ac_old_val |
| 2925 | fi |
| 2926 | { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 |
| 2927 | $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} |
| 2928 | { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 |
| 2929 | $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} |
| 2930 | fi;; |
| 2931 | esac |
| 2932 | # Pass precious variables to config.status. |
| 2933 | if test "$ac_new_set" = set; then |
| 2934 | case $ac_new_val in |
| 2935 | *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; |
| 2936 | *) ac_arg=$ac_var=$ac_new_val ;; |
| 2937 | esac |
| 2938 | case " $ac_configure_args " in |
| 2939 | *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. |
| 2940 | *) as_fn_append ac_configure_args " '$ac_arg'" ;; |
| 2941 | esac |
| 2942 | fi |
| 2943 | done |
| 2944 | if $ac_cache_corrupted; then |
| 2945 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 2946 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 2947 | { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 |
| 2948 | $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} |
| 2949 | as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 |
| 2950 | fi |
| 2951 | ## -------------------- ## |
| 2952 | ## Main body of script. ## |
| 2953 | ## -------------------- ## |
| 2954 | |
| 2955 | ac_ext=c |
| 2956 | ac_cpp='$CPP $CPPFLAGS' |
| 2957 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 2958 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 2959 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 2960 | |
| 2961 | |
| 2962 | |
| 2963 | |
| 2964 | |
| 2965 | ac_config_headers="$ac_config_headers config.h:config.in" |
| 2966 | |
| 2967 | |
| 2968 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5 |
| 2969 | $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; } |
| 2970 | # Check whether --enable-maintainer-mode was given. |
| 2971 | if test "${enable_maintainer_mode+set}" = set; then : |
| 2972 | enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval |
| 2973 | else |
| 2974 | USE_MAINTAINER_MODE=no |
| 2975 | fi |
| 2976 | |
| 2977 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5 |
| 2978 | $as_echo "$USE_MAINTAINER_MODE" >&6; } |
| 2979 | if test $USE_MAINTAINER_MODE = yes; then |
| 2980 | MAINTAINER_MODE_TRUE= |
| 2981 | MAINTAINER_MODE_FALSE='#' |
| 2982 | else |
| 2983 | MAINTAINER_MODE_TRUE='#' |
| 2984 | MAINTAINER_MODE_FALSE= |
| 2985 | fi |
| 2986 | |
| 2987 | MAINT=$MAINTAINER_MODE_TRUE |
| 2988 | |
| 2989 | |
| 2990 | |
| 2991 | ac_ext=c |
| 2992 | ac_cpp='$CPP $CPPFLAGS' |
| 2993 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 2994 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 2995 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 2996 | if test -n "$ac_tool_prefix"; then |
| 2997 | # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. |
| 2998 | set dummy ${ac_tool_prefix}gcc; ac_word=$2 |
| 2999 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 3000 | $as_echo_n "checking for $ac_word... " >&6; } |
| 3001 | if ${ac_cv_prog_CC+:} false; then : |
| 3002 | $as_echo_n "(cached) " >&6 |
| 3003 | else |
| 3004 | if test -n "$CC"; then |
| 3005 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 3006 | else |
| 3007 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 3008 | for as_dir in $PATH |
| 3009 | do |
| 3010 | IFS=$as_save_IFS |
| 3011 | test -z "$as_dir" && as_dir=. |
| 3012 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 3013 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 3014 | ac_cv_prog_CC="${ac_tool_prefix}gcc" |
| 3015 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 3016 | break 2 |
| 3017 | fi |
| 3018 | done |
| 3019 | done |
| 3020 | IFS=$as_save_IFS |
| 3021 | |
| 3022 | fi |
| 3023 | fi |
| 3024 | CC=$ac_cv_prog_CC |
| 3025 | if test -n "$CC"; then |
| 3026 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
| 3027 | $as_echo "$CC" >&6; } |
| 3028 | else |
| 3029 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3030 | $as_echo "no" >&6; } |
| 3031 | fi |
| 3032 | |
| 3033 | |
| 3034 | fi |
| 3035 | if test -z "$ac_cv_prog_CC"; then |
| 3036 | ac_ct_CC=$CC |
| 3037 | # Extract the first word of "gcc", so it can be a program name with args. |
| 3038 | set dummy gcc; ac_word=$2 |
| 3039 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 3040 | $as_echo_n "checking for $ac_word... " >&6; } |
| 3041 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
| 3042 | $as_echo_n "(cached) " >&6 |
| 3043 | else |
| 3044 | if test -n "$ac_ct_CC"; then |
| 3045 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. |
| 3046 | else |
| 3047 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 3048 | for as_dir in $PATH |
| 3049 | do |
| 3050 | IFS=$as_save_IFS |
| 3051 | test -z "$as_dir" && as_dir=. |
| 3052 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 3053 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 3054 | ac_cv_prog_ac_ct_CC="gcc" |
| 3055 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 3056 | break 2 |
| 3057 | fi |
| 3058 | done |
| 3059 | done |
| 3060 | IFS=$as_save_IFS |
| 3061 | |
| 3062 | fi |
| 3063 | fi |
| 3064 | ac_ct_CC=$ac_cv_prog_ac_ct_CC |
| 3065 | if test -n "$ac_ct_CC"; then |
| 3066 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
| 3067 | $as_echo "$ac_ct_CC" >&6; } |
| 3068 | else |
| 3069 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3070 | $as_echo "no" >&6; } |
| 3071 | fi |
| 3072 | |
| 3073 | if test "x$ac_ct_CC" = x; then |
| 3074 | CC="" |
| 3075 | else |
| 3076 | case $cross_compiling:$ac_tool_warned in |
| 3077 | yes:) |
| 3078 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 3079 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 3080 | ac_tool_warned=yes ;; |
| 3081 | esac |
| 3082 | CC=$ac_ct_CC |
| 3083 | fi |
| 3084 | else |
| 3085 | CC="$ac_cv_prog_CC" |
| 3086 | fi |
| 3087 | |
| 3088 | if test -z "$CC"; then |
| 3089 | if test -n "$ac_tool_prefix"; then |
| 3090 | # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. |
| 3091 | set dummy ${ac_tool_prefix}cc; ac_word=$2 |
| 3092 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 3093 | $as_echo_n "checking for $ac_word... " >&6; } |
| 3094 | if ${ac_cv_prog_CC+:} false; then : |
| 3095 | $as_echo_n "(cached) " >&6 |
| 3096 | else |
| 3097 | if test -n "$CC"; then |
| 3098 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 3099 | else |
| 3100 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 3101 | for as_dir in $PATH |
| 3102 | do |
| 3103 | IFS=$as_save_IFS |
| 3104 | test -z "$as_dir" && as_dir=. |
| 3105 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 3106 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 3107 | ac_cv_prog_CC="${ac_tool_prefix}cc" |
| 3108 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 3109 | break 2 |
| 3110 | fi |
| 3111 | done |
| 3112 | done |
| 3113 | IFS=$as_save_IFS |
| 3114 | |
| 3115 | fi |
| 3116 | fi |
| 3117 | CC=$ac_cv_prog_CC |
| 3118 | if test -n "$CC"; then |
| 3119 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
| 3120 | $as_echo "$CC" >&6; } |
| 3121 | else |
| 3122 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3123 | $as_echo "no" >&6; } |
| 3124 | fi |
| 3125 | |
| 3126 | |
| 3127 | fi |
| 3128 | fi |
| 3129 | if test -z "$CC"; then |
| 3130 | # Extract the first word of "cc", so it can be a program name with args. |
| 3131 | set dummy cc; ac_word=$2 |
| 3132 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 3133 | $as_echo_n "checking for $ac_word... " >&6; } |
| 3134 | if ${ac_cv_prog_CC+:} false; then : |
| 3135 | $as_echo_n "(cached) " >&6 |
| 3136 | else |
| 3137 | if test -n "$CC"; then |
| 3138 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 3139 | else |
| 3140 | ac_prog_rejected=no |
| 3141 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 3142 | for as_dir in $PATH |
| 3143 | do |
| 3144 | IFS=$as_save_IFS |
| 3145 | test -z "$as_dir" && as_dir=. |
| 3146 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 3147 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 3148 | if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then |
| 3149 | ac_prog_rejected=yes |
| 3150 | continue |
| 3151 | fi |
| 3152 | ac_cv_prog_CC="cc" |
| 3153 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 3154 | break 2 |
| 3155 | fi |
| 3156 | done |
| 3157 | done |
| 3158 | IFS=$as_save_IFS |
| 3159 | |
| 3160 | if test $ac_prog_rejected = yes; then |
| 3161 | # We found a bogon in the path, so make sure we never use it. |
| 3162 | set dummy $ac_cv_prog_CC |
| 3163 | shift |
| 3164 | if test $# != 0; then |
| 3165 | # We chose a different compiler from the bogus one. |
| 3166 | # However, it has the same basename, so the bogon will be chosen |
| 3167 | # first if we set CC to just the basename; use the full file name. |
| 3168 | shift |
| 3169 | ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" |
| 3170 | fi |
| 3171 | fi |
| 3172 | fi |
| 3173 | fi |
| 3174 | CC=$ac_cv_prog_CC |
| 3175 | if test -n "$CC"; then |
| 3176 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
| 3177 | $as_echo "$CC" >&6; } |
| 3178 | else |
| 3179 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3180 | $as_echo "no" >&6; } |
| 3181 | fi |
| 3182 | |
| 3183 | |
| 3184 | fi |
| 3185 | if test -z "$CC"; then |
| 3186 | if test -n "$ac_tool_prefix"; then |
| 3187 | for ac_prog in cl.exe |
| 3188 | do |
| 3189 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. |
| 3190 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 |
| 3191 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 3192 | $as_echo_n "checking for $ac_word... " >&6; } |
| 3193 | if ${ac_cv_prog_CC+:} false; then : |
| 3194 | $as_echo_n "(cached) " >&6 |
| 3195 | else |
| 3196 | if test -n "$CC"; then |
| 3197 | ac_cv_prog_CC="$CC" # Let the user override the test. |
| 3198 | else |
| 3199 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 3200 | for as_dir in $PATH |
| 3201 | do |
| 3202 | IFS=$as_save_IFS |
| 3203 | test -z "$as_dir" && as_dir=. |
| 3204 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 3205 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 3206 | ac_cv_prog_CC="$ac_tool_prefix$ac_prog" |
| 3207 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 3208 | break 2 |
| 3209 | fi |
| 3210 | done |
| 3211 | done |
| 3212 | IFS=$as_save_IFS |
| 3213 | |
| 3214 | fi |
| 3215 | fi |
| 3216 | CC=$ac_cv_prog_CC |
| 3217 | if test -n "$CC"; then |
| 3218 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 |
| 3219 | $as_echo "$CC" >&6; } |
| 3220 | else |
| 3221 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3222 | $as_echo "no" >&6; } |
| 3223 | fi |
| 3224 | |
| 3225 | |
| 3226 | test -n "$CC" && break |
| 3227 | done |
| 3228 | fi |
| 3229 | if test -z "$CC"; then |
| 3230 | ac_ct_CC=$CC |
| 3231 | for ac_prog in cl.exe |
| 3232 | do |
| 3233 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 3234 | set dummy $ac_prog; ac_word=$2 |
| 3235 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 3236 | $as_echo_n "checking for $ac_word... " >&6; } |
| 3237 | if ${ac_cv_prog_ac_ct_CC+:} false; then : |
| 3238 | $as_echo_n "(cached) " >&6 |
| 3239 | else |
| 3240 | if test -n "$ac_ct_CC"; then |
| 3241 | ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. |
| 3242 | else |
| 3243 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 3244 | for as_dir in $PATH |
| 3245 | do |
| 3246 | IFS=$as_save_IFS |
| 3247 | test -z "$as_dir" && as_dir=. |
| 3248 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 3249 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 3250 | ac_cv_prog_ac_ct_CC="$ac_prog" |
| 3251 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 3252 | break 2 |
| 3253 | fi |
| 3254 | done |
| 3255 | done |
| 3256 | IFS=$as_save_IFS |
| 3257 | |
| 3258 | fi |
| 3259 | fi |
| 3260 | ac_ct_CC=$ac_cv_prog_ac_ct_CC |
| 3261 | if test -n "$ac_ct_CC"; then |
| 3262 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 |
| 3263 | $as_echo "$ac_ct_CC" >&6; } |
| 3264 | else |
| 3265 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3266 | $as_echo "no" >&6; } |
| 3267 | fi |
| 3268 | |
| 3269 | |
| 3270 | test -n "$ac_ct_CC" && break |
| 3271 | done |
| 3272 | |
| 3273 | if test "x$ac_ct_CC" = x; then |
| 3274 | CC="" |
| 3275 | else |
| 3276 | case $cross_compiling:$ac_tool_warned in |
| 3277 | yes:) |
| 3278 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 3279 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 3280 | ac_tool_warned=yes ;; |
| 3281 | esac |
| 3282 | CC=$ac_ct_CC |
| 3283 | fi |
| 3284 | fi |
| 3285 | |
| 3286 | fi |
| 3287 | |
| 3288 | |
| 3289 | test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 3290 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 3291 | as_fn_error $? "no acceptable C compiler found in \$PATH |
| 3292 | See \`config.log' for more details" "$LINENO" 5; } |
| 3293 | |
| 3294 | # Provide some information about the compiler. |
| 3295 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 |
| 3296 | set X $ac_compile |
| 3297 | ac_compiler=$2 |
| 3298 | for ac_option in --version -v -V -qversion; do |
| 3299 | { { ac_try="$ac_compiler $ac_option >&5" |
| 3300 | case "(($ac_try" in |
| 3301 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 3302 | *) ac_try_echo=$ac_try;; |
| 3303 | esac |
| 3304 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 3305 | $as_echo "$ac_try_echo"; } >&5 |
| 3306 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err |
| 3307 | ac_status=$? |
| 3308 | if test -s conftest.err; then |
| 3309 | sed '10a\ |
| 3310 | ... rest of stderr output deleted ... |
| 3311 | 10q' conftest.err >conftest.er1 |
| 3312 | cat conftest.er1 >&5 |
| 3313 | fi |
| 3314 | rm -f conftest.er1 conftest.err |
| 3315 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 3316 | test $ac_status = 0; } |
| 3317 | done |
| 3318 | |
| 3319 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3320 | /* end confdefs.h. */ |
| 3321 | |
| 3322 | int |
| 3323 | main () |
| 3324 | { |
| 3325 | |
| 3326 | ; |
| 3327 | return 0; |
| 3328 | } |
| 3329 | _ACEOF |
| 3330 | ac_clean_files_save=$ac_clean_files |
| 3331 | ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" |
| 3332 | # Try to create an executable without -o first, disregard a.out. |
| 3333 | # It will help us diagnose broken compilers, and finding out an intuition |
| 3334 | # of exeext. |
| 3335 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 |
| 3336 | $as_echo_n "checking whether the C compiler works... " >&6; } |
| 3337 | ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` |
| 3338 | |
| 3339 | # The possible output files: |
| 3340 | ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" |
| 3341 | |
| 3342 | ac_rmfiles= |
| 3343 | for ac_file in $ac_files |
| 3344 | do |
| 3345 | case $ac_file in |
| 3346 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
| 3347 | * ) ac_rmfiles="$ac_rmfiles $ac_file";; |
| 3348 | esac |
| 3349 | done |
| 3350 | rm -f $ac_rmfiles |
| 3351 | |
| 3352 | if { { ac_try="$ac_link_default" |
| 3353 | case "(($ac_try" in |
| 3354 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 3355 | *) ac_try_echo=$ac_try;; |
| 3356 | esac |
| 3357 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 3358 | $as_echo "$ac_try_echo"; } >&5 |
| 3359 | (eval "$ac_link_default") 2>&5 |
| 3360 | ac_status=$? |
| 3361 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 3362 | test $ac_status = 0; }; then : |
| 3363 | # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. |
| 3364 | # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' |
| 3365 | # in a Makefile. We should not override ac_cv_exeext if it was cached, |
| 3366 | # so that the user can short-circuit this test for compilers unknown to |
| 3367 | # Autoconf. |
| 3368 | for ac_file in $ac_files '' |
| 3369 | do |
| 3370 | test -f "$ac_file" || continue |
| 3371 | case $ac_file in |
| 3372 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) |
| 3373 | ;; |
| 3374 | [ab].out ) |
| 3375 | # We found the default executable, but exeext='' is most |
| 3376 | # certainly right. |
| 3377 | break;; |
| 3378 | *.* ) |
| 3379 | if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; |
| 3380 | then :; else |
| 3381 | ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
| 3382 | fi |
| 3383 | # We set ac_cv_exeext here because the later test for it is not |
| 3384 | # safe: cross compilers may not add the suffix if given an `-o' |
| 3385 | # argument, so we may need to know it at that point already. |
| 3386 | # Even if this section looks crufty: it has the advantage of |
| 3387 | # actually working. |
| 3388 | break;; |
| 3389 | * ) |
| 3390 | break;; |
| 3391 | esac |
| 3392 | done |
| 3393 | test "$ac_cv_exeext" = no && ac_cv_exeext= |
| 3394 | |
| 3395 | else |
| 3396 | ac_file='' |
| 3397 | fi |
| 3398 | if test -z "$ac_file"; then : |
| 3399 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3400 | $as_echo "no" >&6; } |
| 3401 | $as_echo "$as_me: failed program was:" >&5 |
| 3402 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 3403 | |
| 3404 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 3405 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 3406 | as_fn_error 77 "C compiler cannot create executables |
| 3407 | See \`config.log' for more details" "$LINENO" 5; } |
| 3408 | else |
| 3409 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 3410 | $as_echo "yes" >&6; } |
| 3411 | fi |
| 3412 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 |
| 3413 | $as_echo_n "checking for C compiler default output file name... " >&6; } |
| 3414 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 |
| 3415 | $as_echo "$ac_file" >&6; } |
| 3416 | ac_exeext=$ac_cv_exeext |
| 3417 | |
| 3418 | rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out |
| 3419 | ac_clean_files=$ac_clean_files_save |
| 3420 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 |
| 3421 | $as_echo_n "checking for suffix of executables... " >&6; } |
| 3422 | if { { ac_try="$ac_link" |
| 3423 | case "(($ac_try" in |
| 3424 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 3425 | *) ac_try_echo=$ac_try;; |
| 3426 | esac |
| 3427 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 3428 | $as_echo "$ac_try_echo"; } >&5 |
| 3429 | (eval "$ac_link") 2>&5 |
| 3430 | ac_status=$? |
| 3431 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 3432 | test $ac_status = 0; }; then : |
| 3433 | # If both `conftest.exe' and `conftest' are `present' (well, observable) |
| 3434 | # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will |
| 3435 | # work properly (i.e., refer to `conftest.exe'), while it won't with |
| 3436 | # `rm'. |
| 3437 | for ac_file in conftest.exe conftest conftest.*; do |
| 3438 | test -f "$ac_file" || continue |
| 3439 | case $ac_file in |
| 3440 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; |
| 3441 | *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` |
| 3442 | break;; |
| 3443 | * ) break;; |
| 3444 | esac |
| 3445 | done |
| 3446 | else |
| 3447 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 3448 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 3449 | as_fn_error $? "cannot compute suffix of executables: cannot compile and link |
| 3450 | See \`config.log' for more details" "$LINENO" 5; } |
| 3451 | fi |
| 3452 | rm -f conftest conftest$ac_cv_exeext |
| 3453 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 |
| 3454 | $as_echo "$ac_cv_exeext" >&6; } |
| 3455 | |
| 3456 | rm -f conftest.$ac_ext |
| 3457 | EXEEXT=$ac_cv_exeext |
| 3458 | ac_exeext=$EXEEXT |
| 3459 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3460 | /* end confdefs.h. */ |
| 3461 | #include <stdio.h> |
| 3462 | int |
| 3463 | main () |
| 3464 | { |
| 3465 | FILE *f = fopen ("conftest.out", "w"); |
| 3466 | return ferror (f) || fclose (f) != 0; |
| 3467 | |
| 3468 | ; |
| 3469 | return 0; |
| 3470 | } |
| 3471 | _ACEOF |
| 3472 | ac_clean_files="$ac_clean_files conftest.out" |
| 3473 | # Check that the compiler produces executables we can run. If not, either |
| 3474 | # the compiler is broken, or we cross compile. |
| 3475 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 |
| 3476 | $as_echo_n "checking whether we are cross compiling... " >&6; } |
| 3477 | if test "$cross_compiling" != yes; then |
| 3478 | { { ac_try="$ac_link" |
| 3479 | case "(($ac_try" in |
| 3480 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 3481 | *) ac_try_echo=$ac_try;; |
| 3482 | esac |
| 3483 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 3484 | $as_echo "$ac_try_echo"; } >&5 |
| 3485 | (eval "$ac_link") 2>&5 |
| 3486 | ac_status=$? |
| 3487 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 3488 | test $ac_status = 0; } |
| 3489 | if { ac_try='./conftest$ac_cv_exeext' |
| 3490 | { { case "(($ac_try" in |
| 3491 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 3492 | *) ac_try_echo=$ac_try;; |
| 3493 | esac |
| 3494 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 3495 | $as_echo "$ac_try_echo"; } >&5 |
| 3496 | (eval "$ac_try") 2>&5 |
| 3497 | ac_status=$? |
| 3498 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 3499 | test $ac_status = 0; }; }; then |
| 3500 | cross_compiling=no |
| 3501 | else |
| 3502 | if test "$cross_compiling" = maybe; then |
| 3503 | cross_compiling=yes |
| 3504 | else |
| 3505 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 3506 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 3507 | as_fn_error $? "cannot run C compiled programs. |
| 3508 | If you meant to cross compile, use \`--host'. |
| 3509 | See \`config.log' for more details" "$LINENO" 5; } |
| 3510 | fi |
| 3511 | fi |
| 3512 | fi |
| 3513 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 |
| 3514 | $as_echo "$cross_compiling" >&6; } |
| 3515 | |
| 3516 | rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out |
| 3517 | ac_clean_files=$ac_clean_files_save |
| 3518 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 |
| 3519 | $as_echo_n "checking for suffix of object files... " >&6; } |
| 3520 | if ${ac_cv_objext+:} false; then : |
| 3521 | $as_echo_n "(cached) " >&6 |
| 3522 | else |
| 3523 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3524 | /* end confdefs.h. */ |
| 3525 | |
| 3526 | int |
| 3527 | main () |
| 3528 | { |
| 3529 | |
| 3530 | ; |
| 3531 | return 0; |
| 3532 | } |
| 3533 | _ACEOF |
| 3534 | rm -f conftest.o conftest.obj |
| 3535 | if { { ac_try="$ac_compile" |
| 3536 | case "(($ac_try" in |
| 3537 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 3538 | *) ac_try_echo=$ac_try;; |
| 3539 | esac |
| 3540 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 3541 | $as_echo "$ac_try_echo"; } >&5 |
| 3542 | (eval "$ac_compile") 2>&5 |
| 3543 | ac_status=$? |
| 3544 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 3545 | test $ac_status = 0; }; then : |
| 3546 | for ac_file in conftest.o conftest.obj conftest.*; do |
| 3547 | test -f "$ac_file" || continue; |
| 3548 | case $ac_file in |
| 3549 | *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; |
| 3550 | *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` |
| 3551 | break;; |
| 3552 | esac |
| 3553 | done |
| 3554 | else |
| 3555 | $as_echo "$as_me: failed program was:" >&5 |
| 3556 | sed 's/^/| /' conftest.$ac_ext >&5 |
| 3557 | |
| 3558 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 3559 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 3560 | as_fn_error $? "cannot compute suffix of object files: cannot compile |
| 3561 | See \`config.log' for more details" "$LINENO" 5; } |
| 3562 | fi |
| 3563 | rm -f conftest.$ac_cv_objext conftest.$ac_ext |
| 3564 | fi |
| 3565 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 |
| 3566 | $as_echo "$ac_cv_objext" >&6; } |
| 3567 | OBJEXT=$ac_cv_objext |
| 3568 | ac_objext=$OBJEXT |
| 3569 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 |
| 3570 | $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } |
| 3571 | if ${ac_cv_c_compiler_gnu+:} false; then : |
| 3572 | $as_echo_n "(cached) " >&6 |
| 3573 | else |
| 3574 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3575 | /* end confdefs.h. */ |
| 3576 | |
| 3577 | int |
| 3578 | main () |
| 3579 | { |
| 3580 | #ifndef __GNUC__ |
| 3581 | choke me |
| 3582 | #endif |
| 3583 | |
| 3584 | ; |
| 3585 | return 0; |
| 3586 | } |
| 3587 | _ACEOF |
| 3588 | if ac_fn_c_try_compile "$LINENO"; then : |
| 3589 | ac_compiler_gnu=yes |
| 3590 | else |
| 3591 | ac_compiler_gnu=no |
| 3592 | fi |
| 3593 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 3594 | ac_cv_c_compiler_gnu=$ac_compiler_gnu |
| 3595 | |
| 3596 | fi |
| 3597 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 |
| 3598 | $as_echo "$ac_cv_c_compiler_gnu" >&6; } |
| 3599 | if test $ac_compiler_gnu = yes; then |
| 3600 | GCC=yes |
| 3601 | else |
| 3602 | GCC= |
| 3603 | fi |
| 3604 | ac_test_CFLAGS=${CFLAGS+set} |
| 3605 | ac_save_CFLAGS=$CFLAGS |
| 3606 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 |
| 3607 | $as_echo_n "checking whether $CC accepts -g... " >&6; } |
| 3608 | if ${ac_cv_prog_cc_g+:} false; then : |
| 3609 | $as_echo_n "(cached) " >&6 |
| 3610 | else |
| 3611 | ac_save_c_werror_flag=$ac_c_werror_flag |
| 3612 | ac_c_werror_flag=yes |
| 3613 | ac_cv_prog_cc_g=no |
| 3614 | CFLAGS="-g" |
| 3615 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3616 | /* end confdefs.h. */ |
| 3617 | |
| 3618 | int |
| 3619 | main () |
| 3620 | { |
| 3621 | |
| 3622 | ; |
| 3623 | return 0; |
| 3624 | } |
| 3625 | _ACEOF |
| 3626 | if ac_fn_c_try_compile "$LINENO"; then : |
| 3627 | ac_cv_prog_cc_g=yes |
| 3628 | else |
| 3629 | CFLAGS="" |
| 3630 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3631 | /* end confdefs.h. */ |
| 3632 | |
| 3633 | int |
| 3634 | main () |
| 3635 | { |
| 3636 | |
| 3637 | ; |
| 3638 | return 0; |
| 3639 | } |
| 3640 | _ACEOF |
| 3641 | if ac_fn_c_try_compile "$LINENO"; then : |
| 3642 | |
| 3643 | else |
| 3644 | ac_c_werror_flag=$ac_save_c_werror_flag |
| 3645 | CFLAGS="-g" |
| 3646 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3647 | /* end confdefs.h. */ |
| 3648 | |
| 3649 | int |
| 3650 | main () |
| 3651 | { |
| 3652 | |
| 3653 | ; |
| 3654 | return 0; |
| 3655 | } |
| 3656 | _ACEOF |
| 3657 | if ac_fn_c_try_compile "$LINENO"; then : |
| 3658 | ac_cv_prog_cc_g=yes |
| 3659 | fi |
| 3660 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 3661 | fi |
| 3662 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 3663 | fi |
| 3664 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 3665 | ac_c_werror_flag=$ac_save_c_werror_flag |
| 3666 | fi |
| 3667 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 |
| 3668 | $as_echo "$ac_cv_prog_cc_g" >&6; } |
| 3669 | if test "$ac_test_CFLAGS" = set; then |
| 3670 | CFLAGS=$ac_save_CFLAGS |
| 3671 | elif test $ac_cv_prog_cc_g = yes; then |
| 3672 | if test "$GCC" = yes; then |
| 3673 | CFLAGS="-g -O2" |
| 3674 | else |
| 3675 | CFLAGS="-g" |
| 3676 | fi |
| 3677 | else |
| 3678 | if test "$GCC" = yes; then |
| 3679 | CFLAGS="-O2" |
| 3680 | else |
| 3681 | CFLAGS= |
| 3682 | fi |
| 3683 | fi |
| 3684 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 |
| 3685 | $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } |
| 3686 | if ${ac_cv_prog_cc_c89+:} false; then : |
| 3687 | $as_echo_n "(cached) " >&6 |
| 3688 | else |
| 3689 | ac_cv_prog_cc_c89=no |
| 3690 | ac_save_CC=$CC |
| 3691 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3692 | /* end confdefs.h. */ |
| 3693 | #include <stdarg.h> |
| 3694 | #include <stdio.h> |
| 3695 | struct stat; |
| 3696 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ |
| 3697 | struct buf { int x; }; |
| 3698 | FILE * (*rcsopen) (struct buf *, struct stat *, int); |
| 3699 | static char *e (p, i) |
| 3700 | char **p; |
| 3701 | int i; |
| 3702 | { |
| 3703 | return p[i]; |
| 3704 | } |
| 3705 | static char *f (char * (*g) (char **, int), char **p, ...) |
| 3706 | { |
| 3707 | char *s; |
| 3708 | va_list v; |
| 3709 | va_start (v,p); |
| 3710 | s = g (p, va_arg (v,int)); |
| 3711 | va_end (v); |
| 3712 | return s; |
| 3713 | } |
| 3714 | |
| 3715 | /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has |
| 3716 | function prototypes and stuff, but not '\xHH' hex character constants. |
| 3717 | These don't provoke an error unfortunately, instead are silently treated |
| 3718 | as 'x'. The following induces an error, until -std is added to get |
| 3719 | proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an |
| 3720 | array size at least. It's necessary to write '\x00'==0 to get something |
| 3721 | that's true only with -std. */ |
| 3722 | int osf4_cc_array ['\x00' == 0 ? 1 : -1]; |
| 3723 | |
| 3724 | /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters |
| 3725 | inside strings and character constants. */ |
| 3726 | #define FOO(x) 'x' |
| 3727 | int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; |
| 3728 | |
| 3729 | int test (int i, double x); |
| 3730 | struct s1 {int (*f) (int a);}; |
| 3731 | struct s2 {int (*f) (double a);}; |
| 3732 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); |
| 3733 | int argc; |
| 3734 | char **argv; |
| 3735 | int |
| 3736 | main () |
| 3737 | { |
| 3738 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
| 3739 | ; |
| 3740 | return 0; |
| 3741 | } |
| 3742 | _ACEOF |
| 3743 | for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ |
| 3744 | -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" |
| 3745 | do |
| 3746 | CC="$ac_save_CC $ac_arg" |
| 3747 | if ac_fn_c_try_compile "$LINENO"; then : |
| 3748 | ac_cv_prog_cc_c89=$ac_arg |
| 3749 | fi |
| 3750 | rm -f core conftest.err conftest.$ac_objext |
| 3751 | test "x$ac_cv_prog_cc_c89" != "xno" && break |
| 3752 | done |
| 3753 | rm -f conftest.$ac_ext |
| 3754 | CC=$ac_save_CC |
| 3755 | |
| 3756 | fi |
| 3757 | # AC_CACHE_VAL |
| 3758 | case "x$ac_cv_prog_cc_c89" in |
| 3759 | x) |
| 3760 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
| 3761 | $as_echo "none needed" >&6; } ;; |
| 3762 | xno) |
| 3763 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 |
| 3764 | $as_echo "unsupported" >&6; } ;; |
| 3765 | *) |
| 3766 | CC="$CC $ac_cv_prog_cc_c89" |
| 3767 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 |
| 3768 | $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; |
| 3769 | esac |
| 3770 | if test "x$ac_cv_prog_cc_c89" != xno; then : |
| 3771 | |
| 3772 | fi |
| 3773 | |
| 3774 | ac_ext=c |
| 3775 | ac_cpp='$CPP $CPPFLAGS' |
| 3776 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 3777 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 3778 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 3779 | |
| 3780 | ac_ext=cpp |
| 3781 | ac_cpp='$CXXCPP $CPPFLAGS' |
| 3782 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 3783 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 3784 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu |
| 3785 | if test -z "$CXX"; then |
| 3786 | if test -n "$CCC"; then |
| 3787 | CXX=$CCC |
| 3788 | else |
| 3789 | if test -n "$ac_tool_prefix"; then |
| 3790 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC |
| 3791 | do |
| 3792 | # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. |
| 3793 | set dummy $ac_tool_prefix$ac_prog; ac_word=$2 |
| 3794 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 3795 | $as_echo_n "checking for $ac_word... " >&6; } |
| 3796 | if ${ac_cv_prog_CXX+:} false; then : |
| 3797 | $as_echo_n "(cached) " >&6 |
| 3798 | else |
| 3799 | if test -n "$CXX"; then |
| 3800 | ac_cv_prog_CXX="$CXX" # Let the user override the test. |
| 3801 | else |
| 3802 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 3803 | for as_dir in $PATH |
| 3804 | do |
| 3805 | IFS=$as_save_IFS |
| 3806 | test -z "$as_dir" && as_dir=. |
| 3807 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 3808 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 3809 | ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" |
| 3810 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 3811 | break 2 |
| 3812 | fi |
| 3813 | done |
| 3814 | done |
| 3815 | IFS=$as_save_IFS |
| 3816 | |
| 3817 | fi |
| 3818 | fi |
| 3819 | CXX=$ac_cv_prog_CXX |
| 3820 | if test -n "$CXX"; then |
| 3821 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 |
| 3822 | $as_echo "$CXX" >&6; } |
| 3823 | else |
| 3824 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3825 | $as_echo "no" >&6; } |
| 3826 | fi |
| 3827 | |
| 3828 | |
| 3829 | test -n "$CXX" && break |
| 3830 | done |
| 3831 | fi |
| 3832 | if test -z "$CXX"; then |
| 3833 | ac_ct_CXX=$CXX |
| 3834 | for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC |
| 3835 | do |
| 3836 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 3837 | set dummy $ac_prog; ac_word=$2 |
| 3838 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 3839 | $as_echo_n "checking for $ac_word... " >&6; } |
| 3840 | if ${ac_cv_prog_ac_ct_CXX+:} false; then : |
| 3841 | $as_echo_n "(cached) " >&6 |
| 3842 | else |
| 3843 | if test -n "$ac_ct_CXX"; then |
| 3844 | ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. |
| 3845 | else |
| 3846 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 3847 | for as_dir in $PATH |
| 3848 | do |
| 3849 | IFS=$as_save_IFS |
| 3850 | test -z "$as_dir" && as_dir=. |
| 3851 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 3852 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 3853 | ac_cv_prog_ac_ct_CXX="$ac_prog" |
| 3854 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 3855 | break 2 |
| 3856 | fi |
| 3857 | done |
| 3858 | done |
| 3859 | IFS=$as_save_IFS |
| 3860 | |
| 3861 | fi |
| 3862 | fi |
| 3863 | ac_ct_CXX=$ac_cv_prog_ac_ct_CXX |
| 3864 | if test -n "$ac_ct_CXX"; then |
| 3865 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 |
| 3866 | $as_echo "$ac_ct_CXX" >&6; } |
| 3867 | else |
| 3868 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 3869 | $as_echo "no" >&6; } |
| 3870 | fi |
| 3871 | |
| 3872 | |
| 3873 | test -n "$ac_ct_CXX" && break |
| 3874 | done |
| 3875 | |
| 3876 | if test "x$ac_ct_CXX" = x; then |
| 3877 | CXX="g++" |
| 3878 | else |
| 3879 | case $cross_compiling:$ac_tool_warned in |
| 3880 | yes:) |
| 3881 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 3882 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 3883 | ac_tool_warned=yes ;; |
| 3884 | esac |
| 3885 | CXX=$ac_ct_CXX |
| 3886 | fi |
| 3887 | fi |
| 3888 | |
| 3889 | fi |
| 3890 | fi |
| 3891 | # Provide some information about the compiler. |
| 3892 | $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 |
| 3893 | set X $ac_compile |
| 3894 | ac_compiler=$2 |
| 3895 | for ac_option in --version -v -V -qversion; do |
| 3896 | { { ac_try="$ac_compiler $ac_option >&5" |
| 3897 | case "(($ac_try" in |
| 3898 | *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; |
| 3899 | *) ac_try_echo=$ac_try;; |
| 3900 | esac |
| 3901 | eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" |
| 3902 | $as_echo "$ac_try_echo"; } >&5 |
| 3903 | (eval "$ac_compiler $ac_option >&5") 2>conftest.err |
| 3904 | ac_status=$? |
| 3905 | if test -s conftest.err; then |
| 3906 | sed '10a\ |
| 3907 | ... rest of stderr output deleted ... |
| 3908 | 10q' conftest.err >conftest.er1 |
| 3909 | cat conftest.er1 >&5 |
| 3910 | fi |
| 3911 | rm -f conftest.er1 conftest.err |
| 3912 | $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 |
| 3913 | test $ac_status = 0; } |
| 3914 | done |
| 3915 | |
| 3916 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 |
| 3917 | $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } |
| 3918 | if ${ac_cv_cxx_compiler_gnu+:} false; then : |
| 3919 | $as_echo_n "(cached) " >&6 |
| 3920 | else |
| 3921 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3922 | /* end confdefs.h. */ |
| 3923 | |
| 3924 | int |
| 3925 | main () |
| 3926 | { |
| 3927 | #ifndef __GNUC__ |
| 3928 | choke me |
| 3929 | #endif |
| 3930 | |
| 3931 | ; |
| 3932 | return 0; |
| 3933 | } |
| 3934 | _ACEOF |
| 3935 | if ac_fn_cxx_try_compile "$LINENO"; then : |
| 3936 | ac_compiler_gnu=yes |
| 3937 | else |
| 3938 | ac_compiler_gnu=no |
| 3939 | fi |
| 3940 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 3941 | ac_cv_cxx_compiler_gnu=$ac_compiler_gnu |
| 3942 | |
| 3943 | fi |
| 3944 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 |
| 3945 | $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } |
| 3946 | if test $ac_compiler_gnu = yes; then |
| 3947 | GXX=yes |
| 3948 | else |
| 3949 | GXX= |
| 3950 | fi |
| 3951 | ac_test_CXXFLAGS=${CXXFLAGS+set} |
| 3952 | ac_save_CXXFLAGS=$CXXFLAGS |
| 3953 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 |
| 3954 | $as_echo_n "checking whether $CXX accepts -g... " >&6; } |
| 3955 | if ${ac_cv_prog_cxx_g+:} false; then : |
| 3956 | $as_echo_n "(cached) " >&6 |
| 3957 | else |
| 3958 | ac_save_cxx_werror_flag=$ac_cxx_werror_flag |
| 3959 | ac_cxx_werror_flag=yes |
| 3960 | ac_cv_prog_cxx_g=no |
| 3961 | CXXFLAGS="-g" |
| 3962 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3963 | /* end confdefs.h. */ |
| 3964 | |
| 3965 | int |
| 3966 | main () |
| 3967 | { |
| 3968 | |
| 3969 | ; |
| 3970 | return 0; |
| 3971 | } |
| 3972 | _ACEOF |
| 3973 | if ac_fn_cxx_try_compile "$LINENO"; then : |
| 3974 | ac_cv_prog_cxx_g=yes |
| 3975 | else |
| 3976 | CXXFLAGS="" |
| 3977 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3978 | /* end confdefs.h. */ |
| 3979 | |
| 3980 | int |
| 3981 | main () |
| 3982 | { |
| 3983 | |
| 3984 | ; |
| 3985 | return 0; |
| 3986 | } |
| 3987 | _ACEOF |
| 3988 | if ac_fn_cxx_try_compile "$LINENO"; then : |
| 3989 | |
| 3990 | else |
| 3991 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag |
| 3992 | CXXFLAGS="-g" |
| 3993 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 3994 | /* end confdefs.h. */ |
| 3995 | |
| 3996 | int |
| 3997 | main () |
| 3998 | { |
| 3999 | |
| 4000 | ; |
| 4001 | return 0; |
| 4002 | } |
| 4003 | _ACEOF |
| 4004 | if ac_fn_cxx_try_compile "$LINENO"; then : |
| 4005 | ac_cv_prog_cxx_g=yes |
| 4006 | fi |
| 4007 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4008 | fi |
| 4009 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4010 | fi |
| 4011 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4012 | ac_cxx_werror_flag=$ac_save_cxx_werror_flag |
| 4013 | fi |
| 4014 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 |
| 4015 | $as_echo "$ac_cv_prog_cxx_g" >&6; } |
| 4016 | if test "$ac_test_CXXFLAGS" = set; then |
| 4017 | CXXFLAGS=$ac_save_CXXFLAGS |
| 4018 | elif test $ac_cv_prog_cxx_g = yes; then |
| 4019 | if test "$GXX" = yes; then |
| 4020 | CXXFLAGS="-g -O2" |
| 4021 | else |
| 4022 | CXXFLAGS="-g" |
| 4023 | fi |
| 4024 | else |
| 4025 | if test "$GXX" = yes; then |
| 4026 | CXXFLAGS="-O2" |
| 4027 | else |
| 4028 | CXXFLAGS= |
| 4029 | fi |
| 4030 | fi |
| 4031 | ac_ext=c |
| 4032 | ac_cpp='$CPP $CPPFLAGS' |
| 4033 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 4034 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 4035 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 4036 | |
| 4037 | |
| 4038 | |
| 4039 | ac_ext=c |
| 4040 | ac_cpp='$CPP $CPPFLAGS' |
| 4041 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 4042 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 4043 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 4044 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 |
| 4045 | $as_echo_n "checking how to run the C preprocessor... " >&6; } |
| 4046 | # On Suns, sometimes $CPP names a directory. |
| 4047 | if test -n "$CPP" && test -d "$CPP"; then |
| 4048 | CPP= |
| 4049 | fi |
| 4050 | if test -z "$CPP"; then |
| 4051 | if ${ac_cv_prog_CPP+:} false; then : |
| 4052 | $as_echo_n "(cached) " >&6 |
| 4053 | else |
| 4054 | # Double quotes because CPP needs to be expanded |
| 4055 | for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" |
| 4056 | do |
| 4057 | ac_preproc_ok=false |
| 4058 | for ac_c_preproc_warn_flag in '' yes |
| 4059 | do |
| 4060 | # Use a header file that comes with gcc, so configuring glibc |
| 4061 | # with a fresh cross-compiler works. |
| 4062 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
| 4063 | # <limits.h> exists even on freestanding compilers. |
| 4064 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 4065 | # not just through cpp. "Syntax error" is here to catch this case. |
| 4066 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4067 | /* end confdefs.h. */ |
| 4068 | #ifdef __STDC__ |
| 4069 | # include <limits.h> |
| 4070 | #else |
| 4071 | # include <assert.h> |
| 4072 | #endif |
| 4073 | Syntax error |
| 4074 | _ACEOF |
| 4075 | if ac_fn_c_try_cpp "$LINENO"; then : |
| 4076 | |
| 4077 | else |
| 4078 | # Broken: fails on valid input. |
| 4079 | continue |
| 4080 | fi |
| 4081 | rm -f conftest.err conftest.i conftest.$ac_ext |
| 4082 | |
| 4083 | # OK, works on sane cases. Now check whether nonexistent headers |
| 4084 | # can be detected and how. |
| 4085 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4086 | /* end confdefs.h. */ |
| 4087 | #include <ac_nonexistent.h> |
| 4088 | _ACEOF |
| 4089 | if ac_fn_c_try_cpp "$LINENO"; then : |
| 4090 | # Broken: success on invalid input. |
| 4091 | continue |
| 4092 | else |
| 4093 | # Passes both tests. |
| 4094 | ac_preproc_ok=: |
| 4095 | break |
| 4096 | fi |
| 4097 | rm -f conftest.err conftest.i conftest.$ac_ext |
| 4098 | |
| 4099 | done |
| 4100 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. |
| 4101 | rm -f conftest.i conftest.err conftest.$ac_ext |
| 4102 | if $ac_preproc_ok; then : |
| 4103 | break |
| 4104 | fi |
| 4105 | |
| 4106 | done |
| 4107 | ac_cv_prog_CPP=$CPP |
| 4108 | |
| 4109 | fi |
| 4110 | CPP=$ac_cv_prog_CPP |
| 4111 | else |
| 4112 | ac_cv_prog_CPP=$CPP |
| 4113 | fi |
| 4114 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 |
| 4115 | $as_echo "$CPP" >&6; } |
| 4116 | ac_preproc_ok=false |
| 4117 | for ac_c_preproc_warn_flag in '' yes |
| 4118 | do |
| 4119 | # Use a header file that comes with gcc, so configuring glibc |
| 4120 | # with a fresh cross-compiler works. |
| 4121 | # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since |
| 4122 | # <limits.h> exists even on freestanding compilers. |
| 4123 | # On the NeXT, cc -E runs the code through the compiler's parser, |
| 4124 | # not just through cpp. "Syntax error" is here to catch this case. |
| 4125 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4126 | /* end confdefs.h. */ |
| 4127 | #ifdef __STDC__ |
| 4128 | # include <limits.h> |
| 4129 | #else |
| 4130 | # include <assert.h> |
| 4131 | #endif |
| 4132 | Syntax error |
| 4133 | _ACEOF |
| 4134 | if ac_fn_c_try_cpp "$LINENO"; then : |
| 4135 | |
| 4136 | else |
| 4137 | # Broken: fails on valid input. |
| 4138 | continue |
| 4139 | fi |
| 4140 | rm -f conftest.err conftest.i conftest.$ac_ext |
| 4141 | |
| 4142 | # OK, works on sane cases. Now check whether nonexistent headers |
| 4143 | # can be detected and how. |
| 4144 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4145 | /* end confdefs.h. */ |
| 4146 | #include <ac_nonexistent.h> |
| 4147 | _ACEOF |
| 4148 | if ac_fn_c_try_cpp "$LINENO"; then : |
| 4149 | # Broken: success on invalid input. |
| 4150 | continue |
| 4151 | else |
| 4152 | # Passes both tests. |
| 4153 | ac_preproc_ok=: |
| 4154 | break |
| 4155 | fi |
| 4156 | rm -f conftest.err conftest.i conftest.$ac_ext |
| 4157 | |
| 4158 | done |
| 4159 | # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. |
| 4160 | rm -f conftest.i conftest.err conftest.$ac_ext |
| 4161 | if $ac_preproc_ok; then : |
| 4162 | |
| 4163 | else |
| 4164 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 4165 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 4166 | as_fn_error $? "C preprocessor \"$CPP\" fails sanity check |
| 4167 | See \`config.log' for more details" "$LINENO" 5; } |
| 4168 | fi |
| 4169 | |
| 4170 | ac_ext=c |
| 4171 | ac_cpp='$CPP $CPPFLAGS' |
| 4172 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 4173 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 4174 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 4175 | |
| 4176 | |
| 4177 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 |
| 4178 | $as_echo_n "checking for grep that handles long lines and -e... " >&6; } |
| 4179 | if ${ac_cv_path_GREP+:} false; then : |
| 4180 | $as_echo_n "(cached) " >&6 |
| 4181 | else |
| 4182 | if test -z "$GREP"; then |
| 4183 | ac_path_GREP_found=false |
| 4184 | # Loop through the user's path and test for each of PROGNAME-LIST |
| 4185 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4186 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin |
| 4187 | do |
| 4188 | IFS=$as_save_IFS |
| 4189 | test -z "$as_dir" && as_dir=. |
| 4190 | for ac_prog in grep ggrep; do |
| 4191 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 4192 | ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" |
| 4193 | as_fn_executable_p "$ac_path_GREP" || continue |
| 4194 | # Check for GNU ac_path_GREP and select it if it is found. |
| 4195 | # Check for GNU $ac_path_GREP |
| 4196 | case `"$ac_path_GREP" --version 2>&1` in |
| 4197 | *GNU*) |
| 4198 | ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; |
| 4199 | *) |
| 4200 | ac_count=0 |
| 4201 | $as_echo_n 0123456789 >"conftest.in" |
| 4202 | while : |
| 4203 | do |
| 4204 | cat "conftest.in" "conftest.in" >"conftest.tmp" |
| 4205 | mv "conftest.tmp" "conftest.in" |
| 4206 | cp "conftest.in" "conftest.nl" |
| 4207 | $as_echo 'GREP' >> "conftest.nl" |
| 4208 | "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break |
| 4209 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break |
| 4210 | as_fn_arith $ac_count + 1 && ac_count=$as_val |
| 4211 | if test $ac_count -gt ${ac_path_GREP_max-0}; then |
| 4212 | # Best one so far, save it but keep looking for a better one |
| 4213 | ac_cv_path_GREP="$ac_path_GREP" |
| 4214 | ac_path_GREP_max=$ac_count |
| 4215 | fi |
| 4216 | # 10*(2^10) chars as input seems more than enough |
| 4217 | test $ac_count -gt 10 && break |
| 4218 | done |
| 4219 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; |
| 4220 | esac |
| 4221 | |
| 4222 | $ac_path_GREP_found && break 3 |
| 4223 | done |
| 4224 | done |
| 4225 | done |
| 4226 | IFS=$as_save_IFS |
| 4227 | if test -z "$ac_cv_path_GREP"; then |
| 4228 | as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
| 4229 | fi |
| 4230 | else |
| 4231 | ac_cv_path_GREP=$GREP |
| 4232 | fi |
| 4233 | |
| 4234 | fi |
| 4235 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 |
| 4236 | $as_echo "$ac_cv_path_GREP" >&6; } |
| 4237 | GREP="$ac_cv_path_GREP" |
| 4238 | |
| 4239 | |
| 4240 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 |
| 4241 | $as_echo_n "checking for egrep... " >&6; } |
| 4242 | if ${ac_cv_path_EGREP+:} false; then : |
| 4243 | $as_echo_n "(cached) " >&6 |
| 4244 | else |
| 4245 | if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 |
| 4246 | then ac_cv_path_EGREP="$GREP -E" |
| 4247 | else |
| 4248 | if test -z "$EGREP"; then |
| 4249 | ac_path_EGREP_found=false |
| 4250 | # Loop through the user's path and test for each of PROGNAME-LIST |
| 4251 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 4252 | for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin |
| 4253 | do |
| 4254 | IFS=$as_save_IFS |
| 4255 | test -z "$as_dir" && as_dir=. |
| 4256 | for ac_prog in egrep; do |
| 4257 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 4258 | ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" |
| 4259 | as_fn_executable_p "$ac_path_EGREP" || continue |
| 4260 | # Check for GNU ac_path_EGREP and select it if it is found. |
| 4261 | # Check for GNU $ac_path_EGREP |
| 4262 | case `"$ac_path_EGREP" --version 2>&1` in |
| 4263 | *GNU*) |
| 4264 | ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; |
| 4265 | *) |
| 4266 | ac_count=0 |
| 4267 | $as_echo_n 0123456789 >"conftest.in" |
| 4268 | while : |
| 4269 | do |
| 4270 | cat "conftest.in" "conftest.in" >"conftest.tmp" |
| 4271 | mv "conftest.tmp" "conftest.in" |
| 4272 | cp "conftest.in" "conftest.nl" |
| 4273 | $as_echo 'EGREP' >> "conftest.nl" |
| 4274 | "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break |
| 4275 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break |
| 4276 | as_fn_arith $ac_count + 1 && ac_count=$as_val |
| 4277 | if test $ac_count -gt ${ac_path_EGREP_max-0}; then |
| 4278 | # Best one so far, save it but keep looking for a better one |
| 4279 | ac_cv_path_EGREP="$ac_path_EGREP" |
| 4280 | ac_path_EGREP_max=$ac_count |
| 4281 | fi |
| 4282 | # 10*(2^10) chars as input seems more than enough |
| 4283 | test $ac_count -gt 10 && break |
| 4284 | done |
| 4285 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; |
| 4286 | esac |
| 4287 | |
| 4288 | $ac_path_EGREP_found && break 3 |
| 4289 | done |
| 4290 | done |
| 4291 | done |
| 4292 | IFS=$as_save_IFS |
| 4293 | if test -z "$ac_cv_path_EGREP"; then |
| 4294 | as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 |
| 4295 | fi |
| 4296 | else |
| 4297 | ac_cv_path_EGREP=$EGREP |
| 4298 | fi |
| 4299 | |
| 4300 | fi |
| 4301 | fi |
| 4302 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 |
| 4303 | $as_echo "$ac_cv_path_EGREP" >&6; } |
| 4304 | EGREP="$ac_cv_path_EGREP" |
| 4305 | |
| 4306 | |
| 4307 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
| 4308 | $as_echo_n "checking for ANSI C header files... " >&6; } |
| 4309 | if ${ac_cv_header_stdc+:} false; then : |
| 4310 | $as_echo_n "(cached) " >&6 |
| 4311 | else |
| 4312 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4313 | /* end confdefs.h. */ |
| 4314 | #include <stdlib.h> |
| 4315 | #include <stdarg.h> |
| 4316 | #include <string.h> |
| 4317 | #include <float.h> |
| 4318 | |
| 4319 | int |
| 4320 | main () |
| 4321 | { |
| 4322 | |
| 4323 | ; |
| 4324 | return 0; |
| 4325 | } |
| 4326 | _ACEOF |
| 4327 | if ac_fn_c_try_compile "$LINENO"; then : |
| 4328 | ac_cv_header_stdc=yes |
| 4329 | else |
| 4330 | ac_cv_header_stdc=no |
| 4331 | fi |
| 4332 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4333 | |
| 4334 | if test $ac_cv_header_stdc = yes; then |
| 4335 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 4336 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4337 | /* end confdefs.h. */ |
| 4338 | #include <string.h> |
| 4339 | |
| 4340 | _ACEOF |
| 4341 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4342 | $EGREP "memchr" >/dev/null 2>&1; then : |
| 4343 | |
| 4344 | else |
| 4345 | ac_cv_header_stdc=no |
| 4346 | fi |
| 4347 | rm -f conftest* |
| 4348 | |
| 4349 | fi |
| 4350 | |
| 4351 | if test $ac_cv_header_stdc = yes; then |
| 4352 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 4353 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4354 | /* end confdefs.h. */ |
| 4355 | #include <stdlib.h> |
| 4356 | |
| 4357 | _ACEOF |
| 4358 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 4359 | $EGREP "free" >/dev/null 2>&1; then : |
| 4360 | |
| 4361 | else |
| 4362 | ac_cv_header_stdc=no |
| 4363 | fi |
| 4364 | rm -f conftest* |
| 4365 | |
| 4366 | fi |
| 4367 | |
| 4368 | if test $ac_cv_header_stdc = yes; then |
| 4369 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| 4370 | if test "$cross_compiling" = yes; then : |
| 4371 | : |
| 4372 | else |
| 4373 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4374 | /* end confdefs.h. */ |
| 4375 | #include <ctype.h> |
| 4376 | #include <stdlib.h> |
| 4377 | #if ((' ' & 0x0FF) == 0x020) |
| 4378 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 4379 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
| 4380 | #else |
| 4381 | # define ISLOWER(c) \ |
| 4382 | (('a' <= (c) && (c) <= 'i') \ |
| 4383 | || ('j' <= (c) && (c) <= 'r') \ |
| 4384 | || ('s' <= (c) && (c) <= 'z')) |
| 4385 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
| 4386 | #endif |
| 4387 | |
| 4388 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
| 4389 | int |
| 4390 | main () |
| 4391 | { |
| 4392 | int i; |
| 4393 | for (i = 0; i < 256; i++) |
| 4394 | if (XOR (islower (i), ISLOWER (i)) |
| 4395 | || toupper (i) != TOUPPER (i)) |
| 4396 | return 2; |
| 4397 | return 0; |
| 4398 | } |
| 4399 | _ACEOF |
| 4400 | if ac_fn_c_try_run "$LINENO"; then : |
| 4401 | |
| 4402 | else |
| 4403 | ac_cv_header_stdc=no |
| 4404 | fi |
| 4405 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 4406 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 4407 | fi |
| 4408 | |
| 4409 | fi |
| 4410 | fi |
| 4411 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
| 4412 | $as_echo "$ac_cv_header_stdc" >&6; } |
| 4413 | if test $ac_cv_header_stdc = yes; then |
| 4414 | |
| 4415 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
| 4416 | |
| 4417 | fi |
| 4418 | |
| 4419 | # On IRIX 5.3, sys/types and inttypes.h are conflicting. |
| 4420 | for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ |
| 4421 | inttypes.h stdint.h unistd.h |
| 4422 | do : |
| 4423 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 4424 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default |
| 4425 | " |
| 4426 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
| 4427 | cat >>confdefs.h <<_ACEOF |
| 4428 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
| 4429 | _ACEOF |
| 4430 | |
| 4431 | fi |
| 4432 | |
| 4433 | done |
| 4434 | |
| 4435 | |
| 4436 | |
| 4437 | ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default" |
| 4438 | if test "x$ac_cv_header_minix_config_h" = xyes; then : |
| 4439 | MINIX=yes |
| 4440 | else |
| 4441 | MINIX= |
| 4442 | fi |
| 4443 | |
| 4444 | |
| 4445 | if test "$MINIX" = yes; then |
| 4446 | |
| 4447 | $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h |
| 4448 | |
| 4449 | |
| 4450 | $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h |
| 4451 | |
| 4452 | |
| 4453 | $as_echo "#define _MINIX 1" >>confdefs.h |
| 4454 | |
| 4455 | fi |
| 4456 | |
| 4457 | |
| 4458 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5 |
| 4459 | $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; } |
| 4460 | if ${ac_cv_safe_to_define___extensions__+:} false; then : |
| 4461 | $as_echo_n "(cached) " >&6 |
| 4462 | else |
| 4463 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4464 | /* end confdefs.h. */ |
| 4465 | |
| 4466 | # define __EXTENSIONS__ 1 |
| 4467 | $ac_includes_default |
| 4468 | int |
| 4469 | main () |
| 4470 | { |
| 4471 | |
| 4472 | ; |
| 4473 | return 0; |
| 4474 | } |
| 4475 | _ACEOF |
| 4476 | if ac_fn_c_try_compile "$LINENO"; then : |
| 4477 | ac_cv_safe_to_define___extensions__=yes |
| 4478 | else |
| 4479 | ac_cv_safe_to_define___extensions__=no |
| 4480 | fi |
| 4481 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4482 | fi |
| 4483 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5 |
| 4484 | $as_echo "$ac_cv_safe_to_define___extensions__" >&6; } |
| 4485 | test $ac_cv_safe_to_define___extensions__ = yes && |
| 4486 | $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h |
| 4487 | |
| 4488 | $as_echo "#define _ALL_SOURCE 1" >>confdefs.h |
| 4489 | |
| 4490 | $as_echo "#define _GNU_SOURCE 1" >>confdefs.h |
| 4491 | |
| 4492 | $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h |
| 4493 | |
| 4494 | $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h |
| 4495 | |
| 4496 | |
| 4497 | ac_aux_dir= |
| 4498 | for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do |
| 4499 | if test -f "$ac_dir/install-sh"; then |
| 4500 | ac_aux_dir=$ac_dir |
| 4501 | ac_install_sh="$ac_aux_dir/install-sh -c" |
| 4502 | break |
| 4503 | elif test -f "$ac_dir/install.sh"; then |
| 4504 | ac_aux_dir=$ac_dir |
| 4505 | ac_install_sh="$ac_aux_dir/install.sh -c" |
| 4506 | break |
| 4507 | elif test -f "$ac_dir/shtool"; then |
| 4508 | ac_aux_dir=$ac_dir |
| 4509 | ac_install_sh="$ac_aux_dir/shtool install -c" |
| 4510 | break |
| 4511 | fi |
| 4512 | done |
| 4513 | if test -z "$ac_aux_dir"; then |
| 4514 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5 |
| 4515 | fi |
| 4516 | |
| 4517 | # These three variables are undocumented and unsupported, |
| 4518 | # and are intended to be withdrawn in a future Autoconf release. |
| 4519 | # They can cause serious problems if a builder's source tree is in a directory |
| 4520 | # whose full name contains unusual characters. |
| 4521 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. |
| 4522 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. |
| 4523 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. |
| 4524 | |
| 4525 | |
| 4526 | # Make sure we can run config.sub. |
| 4527 | $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || |
| 4528 | as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 |
| 4529 | |
| 4530 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 |
| 4531 | $as_echo_n "checking build system type... " >&6; } |
| 4532 | if ${ac_cv_build+:} false; then : |
| 4533 | $as_echo_n "(cached) " >&6 |
| 4534 | else |
| 4535 | ac_build_alias=$build_alias |
| 4536 | test "x$ac_build_alias" = x && |
| 4537 | ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` |
| 4538 | test "x$ac_build_alias" = x && |
| 4539 | as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 |
| 4540 | ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || |
| 4541 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 |
| 4542 | |
| 4543 | fi |
| 4544 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 |
| 4545 | $as_echo "$ac_cv_build" >&6; } |
| 4546 | case $ac_cv_build in |
| 4547 | *-*-*) ;; |
| 4548 | *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; |
| 4549 | esac |
| 4550 | build=$ac_cv_build |
| 4551 | ac_save_IFS=$IFS; IFS='-' |
| 4552 | set x $ac_cv_build |
| 4553 | shift |
| 4554 | build_cpu=$1 |
| 4555 | build_vendor=$2 |
| 4556 | shift; shift |
| 4557 | # Remember, the first character of IFS is used to create $*, |
| 4558 | # except with old shells: |
| 4559 | build_os=$* |
| 4560 | IFS=$ac_save_IFS |
| 4561 | case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac |
| 4562 | |
| 4563 | |
| 4564 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 |
| 4565 | $as_echo_n "checking host system type... " >&6; } |
| 4566 | if ${ac_cv_host+:} false; then : |
| 4567 | $as_echo_n "(cached) " >&6 |
| 4568 | else |
| 4569 | if test "x$host_alias" = x; then |
| 4570 | ac_cv_host=$ac_cv_build |
| 4571 | else |
| 4572 | ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || |
| 4573 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 |
| 4574 | fi |
| 4575 | |
| 4576 | fi |
| 4577 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 |
| 4578 | $as_echo "$ac_cv_host" >&6; } |
| 4579 | case $ac_cv_host in |
| 4580 | *-*-*) ;; |
| 4581 | *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; |
| 4582 | esac |
| 4583 | host=$ac_cv_host |
| 4584 | ac_save_IFS=$IFS; IFS='-' |
| 4585 | set x $ac_cv_host |
| 4586 | shift |
| 4587 | host_cpu=$1 |
| 4588 | host_vendor=$2 |
| 4589 | shift; shift |
| 4590 | # Remember, the first character of IFS is used to create $*, |
| 4591 | # except with old shells: |
| 4592 | host_os=$* |
| 4593 | IFS=$ac_save_IFS |
| 4594 | case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac |
| 4595 | |
| 4596 | |
| 4597 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5 |
| 4598 | $as_echo_n "checking target system type... " >&6; } |
| 4599 | if ${ac_cv_target+:} false; then : |
| 4600 | $as_echo_n "(cached) " >&6 |
| 4601 | else |
| 4602 | if test "x$target_alias" = x; then |
| 4603 | ac_cv_target=$ac_cv_host |
| 4604 | else |
| 4605 | ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` || |
| 4606 | as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5 |
| 4607 | fi |
| 4608 | |
| 4609 | fi |
| 4610 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5 |
| 4611 | $as_echo "$ac_cv_target" >&6; } |
| 4612 | case $ac_cv_target in |
| 4613 | *-*-*) ;; |
| 4614 | *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;; |
| 4615 | esac |
| 4616 | target=$ac_cv_target |
| 4617 | ac_save_IFS=$IFS; IFS='-' |
| 4618 | set x $ac_cv_target |
| 4619 | shift |
| 4620 | target_cpu=$1 |
| 4621 | target_vendor=$2 |
| 4622 | shift; shift |
| 4623 | # Remember, the first character of IFS is used to create $*, |
| 4624 | # except with old shells: |
| 4625 | target_os=$* |
| 4626 | IFS=$ac_save_IFS |
| 4627 | case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac |
| 4628 | |
| 4629 | |
| 4630 | # The aliases save the names the user supplied, while $host etc. |
| 4631 | # will get canonicalized. |
| 4632 | test -n "$target_alias" && |
| 4633 | test "$program_prefix$program_suffix$program_transform_name" = \ |
| 4634 | NONENONEs,x,x, && |
| 4635 | program_prefix=${target_alias}- |
| 4636 | |
| 4637 | # The tests for host and target for $enable_largefile require |
| 4638 | # canonical names. |
| 4639 | |
| 4640 | |
| 4641 | |
| 4642 | # As the $enable_largefile decision depends on --enable-plugins we must set it |
| 4643 | # even in directories otherwise not depending on the $plugins option. |
| 4644 | |
| 4645 | |
| 4646 | maybe_plugins=no |
| 4647 | for ac_header in dlfcn.h |
| 4648 | do : |
| 4649 | ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default |
| 4650 | " |
| 4651 | if test "x$ac_cv_header_dlfcn_h" = xyes; then : |
| 4652 | cat >>confdefs.h <<_ACEOF |
| 4653 | #define HAVE_DLFCN_H 1 |
| 4654 | _ACEOF |
| 4655 | maybe_plugins=yes |
| 4656 | fi |
| 4657 | |
| 4658 | done |
| 4659 | |
| 4660 | for ac_header in windows.h |
| 4661 | do : |
| 4662 | ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default |
| 4663 | " |
| 4664 | if test "x$ac_cv_header_windows_h" = xyes; then : |
| 4665 | cat >>confdefs.h <<_ACEOF |
| 4666 | #define HAVE_WINDOWS_H 1 |
| 4667 | _ACEOF |
| 4668 | maybe_plugins=yes |
| 4669 | fi |
| 4670 | |
| 4671 | done |
| 4672 | |
| 4673 | |
| 4674 | # Check whether --enable-plugins was given. |
| 4675 | if test "${enable_plugins+set}" = set; then : |
| 4676 | enableval=$enable_plugins; case "${enableval}" in |
| 4677 | no) plugins=no ;; |
| 4678 | *) plugins=yes |
| 4679 | if test "$maybe_plugins" != "yes" ; then |
| 4680 | as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5 |
| 4681 | fi ;; |
| 4682 | esac |
| 4683 | else |
| 4684 | plugins=$maybe_plugins |
| 4685 | |
| 4686 | fi |
| 4687 | |
| 4688 | if test "$plugins" = "yes"; then |
| 4689 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5 |
| 4690 | $as_echo_n "checking for library containing dlsym... " >&6; } |
| 4691 | if ${ac_cv_search_dlsym+:} false; then : |
| 4692 | $as_echo_n "(cached) " >&6 |
| 4693 | else |
| 4694 | ac_func_search_save_LIBS=$LIBS |
| 4695 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4696 | /* end confdefs.h. */ |
| 4697 | |
| 4698 | /* Override any GCC internal prototype to avoid an error. |
| 4699 | Use char because int might match the return type of a GCC |
| 4700 | builtin and then its argument prototype would still apply. */ |
| 4701 | #ifdef __cplusplus |
| 4702 | extern "C" |
| 4703 | #endif |
| 4704 | char dlsym (); |
| 4705 | int |
| 4706 | main () |
| 4707 | { |
| 4708 | return dlsym (); |
| 4709 | ; |
| 4710 | return 0; |
| 4711 | } |
| 4712 | _ACEOF |
| 4713 | for ac_lib in '' dl; do |
| 4714 | if test -z "$ac_lib"; then |
| 4715 | ac_res="none required" |
| 4716 | else |
| 4717 | ac_res=-l$ac_lib |
| 4718 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
| 4719 | fi |
| 4720 | if ac_fn_c_try_link "$LINENO"; then : |
| 4721 | ac_cv_search_dlsym=$ac_res |
| 4722 | fi |
| 4723 | rm -f core conftest.err conftest.$ac_objext \ |
| 4724 | conftest$ac_exeext |
| 4725 | if ${ac_cv_search_dlsym+:} false; then : |
| 4726 | break |
| 4727 | fi |
| 4728 | done |
| 4729 | if ${ac_cv_search_dlsym+:} false; then : |
| 4730 | |
| 4731 | else |
| 4732 | ac_cv_search_dlsym=no |
| 4733 | fi |
| 4734 | rm conftest.$ac_ext |
| 4735 | LIBS=$ac_func_search_save_LIBS |
| 4736 | fi |
| 4737 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5 |
| 4738 | $as_echo "$ac_cv_search_dlsym" >&6; } |
| 4739 | ac_res=$ac_cv_search_dlsym |
| 4740 | if test "$ac_res" != no; then : |
| 4741 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
| 4742 | |
| 4743 | fi |
| 4744 | |
| 4745 | fi |
| 4746 | |
| 4747 | |
| 4748 | case "${host}" in |
| 4749 | sparc-*-solaris*|i[3-7]86-*-solaris*) |
| 4750 | # On native 32bit sparc and ia32 solaris, large-file and procfs support |
| 4751 | # are mutually exclusive; and without procfs support, the bfd/ elf module |
| 4752 | # cannot provide certain routines such as elfcore_write_prpsinfo |
| 4753 | # or elfcore_write_prstatus. So unless the user explicitly requested |
| 4754 | # large-file support through the --enable-largefile switch, disable |
| 4755 | # large-file support in favor of procfs support. |
| 4756 | test "${target}" = "${host}" -a "x$plugins" = xno \ |
| 4757 | && : ${enable_largefile="no"} |
| 4758 | ;; |
| 4759 | esac |
| 4760 | |
| 4761 | # Check whether --enable-largefile was given. |
| 4762 | if test "${enable_largefile+set}" = set; then : |
| 4763 | enableval=$enable_largefile; |
| 4764 | fi |
| 4765 | |
| 4766 | if test "$enable_largefile" != no; then |
| 4767 | |
| 4768 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5 |
| 4769 | $as_echo_n "checking for special C compiler options needed for large files... " >&6; } |
| 4770 | if ${ac_cv_sys_largefile_CC+:} false; then : |
| 4771 | $as_echo_n "(cached) " >&6 |
| 4772 | else |
| 4773 | ac_cv_sys_largefile_CC=no |
| 4774 | if test "$GCC" != yes; then |
| 4775 | ac_save_CC=$CC |
| 4776 | while :; do |
| 4777 | # IRIX 6.2 and later do not support large files by default, |
| 4778 | # so use the C compiler's -n32 option if that helps. |
| 4779 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4780 | /* end confdefs.h. */ |
| 4781 | #include <sys/types.h> |
| 4782 | /* Check that off_t can represent 2**63 - 1 correctly. |
| 4783 | We can't simply define LARGE_OFF_T to be 9223372036854775807, |
| 4784 | since some C++ compilers masquerading as C compilers |
| 4785 | incorrectly reject 9223372036854775807. */ |
| 4786 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) |
| 4787 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
| 4788 | && LARGE_OFF_T % 2147483647 == 1) |
| 4789 | ? 1 : -1]; |
| 4790 | int |
| 4791 | main () |
| 4792 | { |
| 4793 | |
| 4794 | ; |
| 4795 | return 0; |
| 4796 | } |
| 4797 | _ACEOF |
| 4798 | if ac_fn_c_try_compile "$LINENO"; then : |
| 4799 | break |
| 4800 | fi |
| 4801 | rm -f core conftest.err conftest.$ac_objext |
| 4802 | CC="$CC -n32" |
| 4803 | if ac_fn_c_try_compile "$LINENO"; then : |
| 4804 | ac_cv_sys_largefile_CC=' -n32'; break |
| 4805 | fi |
| 4806 | rm -f core conftest.err conftest.$ac_objext |
| 4807 | break |
| 4808 | done |
| 4809 | CC=$ac_save_CC |
| 4810 | rm -f conftest.$ac_ext |
| 4811 | fi |
| 4812 | fi |
| 4813 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5 |
| 4814 | $as_echo "$ac_cv_sys_largefile_CC" >&6; } |
| 4815 | if test "$ac_cv_sys_largefile_CC" != no; then |
| 4816 | CC=$CC$ac_cv_sys_largefile_CC |
| 4817 | fi |
| 4818 | |
| 4819 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5 |
| 4820 | $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; } |
| 4821 | if ${ac_cv_sys_file_offset_bits+:} false; then : |
| 4822 | $as_echo_n "(cached) " >&6 |
| 4823 | else |
| 4824 | while :; do |
| 4825 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4826 | /* end confdefs.h. */ |
| 4827 | #include <sys/types.h> |
| 4828 | /* Check that off_t can represent 2**63 - 1 correctly. |
| 4829 | We can't simply define LARGE_OFF_T to be 9223372036854775807, |
| 4830 | since some C++ compilers masquerading as C compilers |
| 4831 | incorrectly reject 9223372036854775807. */ |
| 4832 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) |
| 4833 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
| 4834 | && LARGE_OFF_T % 2147483647 == 1) |
| 4835 | ? 1 : -1]; |
| 4836 | int |
| 4837 | main () |
| 4838 | { |
| 4839 | |
| 4840 | ; |
| 4841 | return 0; |
| 4842 | } |
| 4843 | _ACEOF |
| 4844 | if ac_fn_c_try_compile "$LINENO"; then : |
| 4845 | ac_cv_sys_file_offset_bits=no; break |
| 4846 | fi |
| 4847 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4848 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4849 | /* end confdefs.h. */ |
| 4850 | #define _FILE_OFFSET_BITS 64 |
| 4851 | #include <sys/types.h> |
| 4852 | /* Check that off_t can represent 2**63 - 1 correctly. |
| 4853 | We can't simply define LARGE_OFF_T to be 9223372036854775807, |
| 4854 | since some C++ compilers masquerading as C compilers |
| 4855 | incorrectly reject 9223372036854775807. */ |
| 4856 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) |
| 4857 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
| 4858 | && LARGE_OFF_T % 2147483647 == 1) |
| 4859 | ? 1 : -1]; |
| 4860 | int |
| 4861 | main () |
| 4862 | { |
| 4863 | |
| 4864 | ; |
| 4865 | return 0; |
| 4866 | } |
| 4867 | _ACEOF |
| 4868 | if ac_fn_c_try_compile "$LINENO"; then : |
| 4869 | ac_cv_sys_file_offset_bits=64; break |
| 4870 | fi |
| 4871 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4872 | ac_cv_sys_file_offset_bits=unknown |
| 4873 | break |
| 4874 | done |
| 4875 | fi |
| 4876 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5 |
| 4877 | $as_echo "$ac_cv_sys_file_offset_bits" >&6; } |
| 4878 | case $ac_cv_sys_file_offset_bits in #( |
| 4879 | no | unknown) ;; |
| 4880 | *) |
| 4881 | cat >>confdefs.h <<_ACEOF |
| 4882 | #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits |
| 4883 | _ACEOF |
| 4884 | ;; |
| 4885 | esac |
| 4886 | rm -rf conftest* |
| 4887 | if test $ac_cv_sys_file_offset_bits = unknown; then |
| 4888 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5 |
| 4889 | $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; } |
| 4890 | if ${ac_cv_sys_large_files+:} false; then : |
| 4891 | $as_echo_n "(cached) " >&6 |
| 4892 | else |
| 4893 | while :; do |
| 4894 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4895 | /* end confdefs.h. */ |
| 4896 | #include <sys/types.h> |
| 4897 | /* Check that off_t can represent 2**63 - 1 correctly. |
| 4898 | We can't simply define LARGE_OFF_T to be 9223372036854775807, |
| 4899 | since some C++ compilers masquerading as C compilers |
| 4900 | incorrectly reject 9223372036854775807. */ |
| 4901 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) |
| 4902 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
| 4903 | && LARGE_OFF_T % 2147483647 == 1) |
| 4904 | ? 1 : -1]; |
| 4905 | int |
| 4906 | main () |
| 4907 | { |
| 4908 | |
| 4909 | ; |
| 4910 | return 0; |
| 4911 | } |
| 4912 | _ACEOF |
| 4913 | if ac_fn_c_try_compile "$LINENO"; then : |
| 4914 | ac_cv_sys_large_files=no; break |
| 4915 | fi |
| 4916 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4917 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4918 | /* end confdefs.h. */ |
| 4919 | #define _LARGE_FILES 1 |
| 4920 | #include <sys/types.h> |
| 4921 | /* Check that off_t can represent 2**63 - 1 correctly. |
| 4922 | We can't simply define LARGE_OFF_T to be 9223372036854775807, |
| 4923 | since some C++ compilers masquerading as C compilers |
| 4924 | incorrectly reject 9223372036854775807. */ |
| 4925 | #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62)) |
| 4926 | int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721 |
| 4927 | && LARGE_OFF_T % 2147483647 == 1) |
| 4928 | ? 1 : -1]; |
| 4929 | int |
| 4930 | main () |
| 4931 | { |
| 4932 | |
| 4933 | ; |
| 4934 | return 0; |
| 4935 | } |
| 4936 | _ACEOF |
| 4937 | if ac_fn_c_try_compile "$LINENO"; then : |
| 4938 | ac_cv_sys_large_files=1; break |
| 4939 | fi |
| 4940 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 4941 | ac_cv_sys_large_files=unknown |
| 4942 | break |
| 4943 | done |
| 4944 | fi |
| 4945 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5 |
| 4946 | $as_echo "$ac_cv_sys_large_files" >&6; } |
| 4947 | case $ac_cv_sys_large_files in #( |
| 4948 | no | unknown) ;; |
| 4949 | *) |
| 4950 | cat >>confdefs.h <<_ACEOF |
| 4951 | #define _LARGE_FILES $ac_cv_sys_large_files |
| 4952 | _ACEOF |
| 4953 | ;; |
| 4954 | esac |
| 4955 | rm -rf conftest* |
| 4956 | fi |
| 4957 | |
| 4958 | |
| 4959 | fi |
| 4960 | |
| 4961 | |
| 4962 | |
| 4963 | |
| 4964 | |
| 4965 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5 |
| 4966 | $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; } |
| 4967 | if ${am_cv_prog_cc_stdc+:} false; then : |
| 4968 | $as_echo_n "(cached) " >&6 |
| 4969 | else |
| 4970 | am_cv_prog_cc_stdc=no |
| 4971 | ac_save_CC="$CC" |
| 4972 | # Don't try gcc -ansi; that turns off useful extensions and |
| 4973 | # breaks some systems' header files. |
| 4974 | # AIX -qlanglvl=ansi |
| 4975 | # Ultrix and OSF/1 -std1 |
| 4976 | # HP-UX 10.20 and later -Ae |
| 4977 | # HP-UX older versions -Aa -D_HPUX_SOURCE |
| 4978 | # SVR4 -Xc -D__EXTENSIONS__ |
| 4979 | for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" |
| 4980 | do |
| 4981 | CC="$ac_save_CC $ac_arg" |
| 4982 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 4983 | /* end confdefs.h. */ |
| 4984 | #include <stdarg.h> |
| 4985 | #include <stdio.h> |
| 4986 | #include <sys/types.h> |
| 4987 | #include <sys/stat.h> |
| 4988 | /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ |
| 4989 | struct buf { int x; }; |
| 4990 | FILE * (*rcsopen) (struct buf *, struct stat *, int); |
| 4991 | static char *e (p, i) |
| 4992 | char **p; |
| 4993 | int i; |
| 4994 | { |
| 4995 | return p[i]; |
| 4996 | } |
| 4997 | static char *f (char * (*g) (char **, int), char **p, ...) |
| 4998 | { |
| 4999 | char *s; |
| 5000 | va_list v; |
| 5001 | va_start (v,p); |
| 5002 | s = g (p, va_arg (v,int)); |
| 5003 | va_end (v); |
| 5004 | return s; |
| 5005 | } |
| 5006 | int test (int i, double x); |
| 5007 | struct s1 {int (*f) (int a);}; |
| 5008 | struct s2 {int (*f) (double a);}; |
| 5009 | int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); |
| 5010 | int argc; |
| 5011 | char **argv; |
| 5012 | |
| 5013 | int |
| 5014 | main () |
| 5015 | { |
| 5016 | |
| 5017 | return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; |
| 5018 | |
| 5019 | ; |
| 5020 | return 0; |
| 5021 | } |
| 5022 | _ACEOF |
| 5023 | if ac_fn_c_try_compile "$LINENO"; then : |
| 5024 | am_cv_prog_cc_stdc="$ac_arg"; break |
| 5025 | fi |
| 5026 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 5027 | done |
| 5028 | CC="$ac_save_CC" |
| 5029 | |
| 5030 | fi |
| 5031 | |
| 5032 | if test -z "$am_cv_prog_cc_stdc"; then |
| 5033 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 |
| 5034 | $as_echo "none needed" >&6; } |
| 5035 | else |
| 5036 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5 |
| 5037 | $as_echo "$am_cv_prog_cc_stdc" >&6; } |
| 5038 | fi |
| 5039 | case "x$am_cv_prog_cc_stdc" in |
| 5040 | x|xno) ;; |
| 5041 | *) CC="$CC $am_cv_prog_cc_stdc" ;; |
| 5042 | esac |
| 5043 | |
| 5044 | # Expand $ac_aux_dir to an absolute path. |
| 5045 | am_aux_dir=`cd "$ac_aux_dir" && pwd` |
| 5046 | |
| 5047 | if test x"${install_sh+set}" != xset; then |
| 5048 | case $am_aux_dir in |
| 5049 | *\ * | *\ *) |
| 5050 | install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; |
| 5051 | *) |
| 5052 | install_sh="\${SHELL} $am_aux_dir/install-sh" |
| 5053 | esac |
| 5054 | fi |
| 5055 | |
| 5056 | # Installed binaries are usually stripped using 'strip' when the user |
| 5057 | # run "make install-strip". However 'strip' might not be the right |
| 5058 | # tool to use in cross-compilation environments, therefore Automake |
| 5059 | # will honor the 'STRIP' environment variable to overrule this program. |
| 5060 | if test "$cross_compiling" != no; then |
| 5061 | if test -n "$ac_tool_prefix"; then |
| 5062 | # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. |
| 5063 | set dummy ${ac_tool_prefix}strip; ac_word=$2 |
| 5064 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 5065 | $as_echo_n "checking for $ac_word... " >&6; } |
| 5066 | if ${ac_cv_prog_STRIP+:} false; then : |
| 5067 | $as_echo_n "(cached) " >&6 |
| 5068 | else |
| 5069 | if test -n "$STRIP"; then |
| 5070 | ac_cv_prog_STRIP="$STRIP" # Let the user override the test. |
| 5071 | else |
| 5072 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 5073 | for as_dir in $PATH |
| 5074 | do |
| 5075 | IFS=$as_save_IFS |
| 5076 | test -z "$as_dir" && as_dir=. |
| 5077 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 5078 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 5079 | ac_cv_prog_STRIP="${ac_tool_prefix}strip" |
| 5080 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 5081 | break 2 |
| 5082 | fi |
| 5083 | done |
| 5084 | done |
| 5085 | IFS=$as_save_IFS |
| 5086 | |
| 5087 | fi |
| 5088 | fi |
| 5089 | STRIP=$ac_cv_prog_STRIP |
| 5090 | if test -n "$STRIP"; then |
| 5091 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 |
| 5092 | $as_echo "$STRIP" >&6; } |
| 5093 | else |
| 5094 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5095 | $as_echo "no" >&6; } |
| 5096 | fi |
| 5097 | |
| 5098 | |
| 5099 | fi |
| 5100 | if test -z "$ac_cv_prog_STRIP"; then |
| 5101 | ac_ct_STRIP=$STRIP |
| 5102 | # Extract the first word of "strip", so it can be a program name with args. |
| 5103 | set dummy strip; ac_word=$2 |
| 5104 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 5105 | $as_echo_n "checking for $ac_word... " >&6; } |
| 5106 | if ${ac_cv_prog_ac_ct_STRIP+:} false; then : |
| 5107 | $as_echo_n "(cached) " >&6 |
| 5108 | else |
| 5109 | if test -n "$ac_ct_STRIP"; then |
| 5110 | ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. |
| 5111 | else |
| 5112 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 5113 | for as_dir in $PATH |
| 5114 | do |
| 5115 | IFS=$as_save_IFS |
| 5116 | test -z "$as_dir" && as_dir=. |
| 5117 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 5118 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 5119 | ac_cv_prog_ac_ct_STRIP="strip" |
| 5120 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 5121 | break 2 |
| 5122 | fi |
| 5123 | done |
| 5124 | done |
| 5125 | IFS=$as_save_IFS |
| 5126 | |
| 5127 | fi |
| 5128 | fi |
| 5129 | ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP |
| 5130 | if test -n "$ac_ct_STRIP"; then |
| 5131 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 |
| 5132 | $as_echo "$ac_ct_STRIP" >&6; } |
| 5133 | else |
| 5134 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 5135 | $as_echo "no" >&6; } |
| 5136 | fi |
| 5137 | |
| 5138 | if test "x$ac_ct_STRIP" = x; then |
| 5139 | STRIP=":" |
| 5140 | else |
| 5141 | case $cross_compiling:$ac_tool_warned in |
| 5142 | yes:) |
| 5143 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 5144 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 5145 | ac_tool_warned=yes ;; |
| 5146 | esac |
| 5147 | STRIP=$ac_ct_STRIP |
| 5148 | fi |
| 5149 | else |
| 5150 | STRIP="$ac_cv_prog_STRIP" |
| 5151 | fi |
| 5152 | |
| 5153 | fi |
| 5154 | INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" |
| 5155 | |
| 5156 | |
| 5157 | ac_aux_dir= |
| 5158 | for ac_dir in .. "$srcdir"/..; do |
| 5159 | if test -f "$ac_dir/install-sh"; then |
| 5160 | ac_aux_dir=$ac_dir |
| 5161 | ac_install_sh="$ac_aux_dir/install-sh -c" |
| 5162 | break |
| 5163 | elif test -f "$ac_dir/install.sh"; then |
| 5164 | ac_aux_dir=$ac_dir |
| 5165 | ac_install_sh="$ac_aux_dir/install.sh -c" |
| 5166 | break |
| 5167 | elif test -f "$ac_dir/shtool"; then |
| 5168 | ac_aux_dir=$ac_dir |
| 5169 | ac_install_sh="$ac_aux_dir/shtool install -c" |
| 5170 | break |
| 5171 | fi |
| 5172 | done |
| 5173 | if test -z "$ac_aux_dir"; then |
| 5174 | as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5 |
| 5175 | fi |
| 5176 | |
| 5177 | # These three variables are undocumented and unsupported, |
| 5178 | # and are intended to be withdrawn in a future Autoconf release. |
| 5179 | # They can cause serious problems if a builder's source tree is in a directory |
| 5180 | # whose full name contains unusual characters. |
| 5181 | ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. |
| 5182 | ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. |
| 5183 | ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. |
| 5184 | |
| 5185 | |
| 5186 | |
| 5187 | test "$program_prefix" != NONE && |
| 5188 | program_transform_name="s&^&$program_prefix&;$program_transform_name" |
| 5189 | # Use a double $ so make ignores it. |
| 5190 | test "$program_suffix" != NONE && |
| 5191 | program_transform_name="s&\$&$program_suffix&;$program_transform_name" |
| 5192 | # Double any \ or $. |
| 5193 | # By default was `s,x,x', remove it if useless. |
| 5194 | ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' |
| 5195 | program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` |
| 5196 | |
| 5197 | |
| 5198 | # We require a C++11 compiler. Check if one is available, and if |
| 5199 | # necessary, set CXX_DIALECT to some -std=xxx switch. |
| 5200 | |
| 5201 | ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true |
| 5202 | ac_ext=cpp |
| 5203 | ac_cpp='$CXXCPP $CPPFLAGS' |
| 5204 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 5205 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 5206 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu |
| 5207 | CXX_DIALECT="" |
| 5208 | ac_success=no |
| 5209 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5 |
| 5210 | $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; } |
| 5211 | if ${ax_cv_cxx_compile_cxx11+:} false; then : |
| 5212 | $as_echo_n "(cached) " >&6 |
| 5213 | else |
| 5214 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5215 | /* end confdefs.h. */ |
| 5216 | |
| 5217 | |
| 5218 | // If the compiler admits that it is not ready for C++11, why torture it? |
| 5219 | // Hopefully, this will speed up the test. |
| 5220 | |
| 5221 | #ifndef __cplusplus |
| 5222 | |
| 5223 | #error "This is not a C++ compiler" |
| 5224 | |
| 5225 | #elif __cplusplus < 201103L |
| 5226 | |
| 5227 | #error "This is not a C++11 compiler" |
| 5228 | |
| 5229 | #else |
| 5230 | |
| 5231 | namespace cxx11 |
| 5232 | { |
| 5233 | |
| 5234 | namespace test_static_assert |
| 5235 | { |
| 5236 | |
| 5237 | template <typename T> |
| 5238 | struct check |
| 5239 | { |
| 5240 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); |
| 5241 | }; |
| 5242 | |
| 5243 | } |
| 5244 | |
| 5245 | namespace test_final_override |
| 5246 | { |
| 5247 | |
| 5248 | struct Base |
| 5249 | { |
| 5250 | virtual void f() {} |
| 5251 | }; |
| 5252 | |
| 5253 | struct Derived : public Base |
| 5254 | { |
| 5255 | virtual void f() override {} |
| 5256 | }; |
| 5257 | |
| 5258 | } |
| 5259 | |
| 5260 | namespace test_double_right_angle_brackets |
| 5261 | { |
| 5262 | |
| 5263 | template < typename T > |
| 5264 | struct check {}; |
| 5265 | |
| 5266 | typedef check<void> single_type; |
| 5267 | typedef check<check<void>> double_type; |
| 5268 | typedef check<check<check<void>>> triple_type; |
| 5269 | typedef check<check<check<check<void>>>> quadruple_type; |
| 5270 | |
| 5271 | } |
| 5272 | |
| 5273 | namespace test_decltype |
| 5274 | { |
| 5275 | |
| 5276 | int |
| 5277 | f() |
| 5278 | { |
| 5279 | int a = 1; |
| 5280 | decltype(a) b = 2; |
| 5281 | return a + b; |
| 5282 | } |
| 5283 | |
| 5284 | } |
| 5285 | |
| 5286 | namespace test_type_deduction |
| 5287 | { |
| 5288 | |
| 5289 | template < typename T1, typename T2 > |
| 5290 | struct is_same |
| 5291 | { |
| 5292 | static const bool value = false; |
| 5293 | }; |
| 5294 | |
| 5295 | template < typename T > |
| 5296 | struct is_same<T, T> |
| 5297 | { |
| 5298 | static const bool value = true; |
| 5299 | }; |
| 5300 | |
| 5301 | template < typename T1, typename T2 > |
| 5302 | auto |
| 5303 | add(T1 a1, T2 a2) -> decltype(a1 + a2) |
| 5304 | { |
| 5305 | return a1 + a2; |
| 5306 | } |
| 5307 | |
| 5308 | int |
| 5309 | test(const int c, volatile int v) |
| 5310 | { |
| 5311 | static_assert(is_same<int, decltype(0)>::value == true, ""); |
| 5312 | static_assert(is_same<int, decltype(c)>::value == false, ""); |
| 5313 | static_assert(is_same<int, decltype(v)>::value == false, ""); |
| 5314 | auto ac = c; |
| 5315 | auto av = v; |
| 5316 | auto sumi = ac + av + 'x'; |
| 5317 | auto sumf = ac + av + 1.0; |
| 5318 | static_assert(is_same<int, decltype(ac)>::value == true, ""); |
| 5319 | static_assert(is_same<int, decltype(av)>::value == true, ""); |
| 5320 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); |
| 5321 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); |
| 5322 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); |
| 5323 | return (sumf > 0.0) ? sumi : add(c, v); |
| 5324 | } |
| 5325 | |
| 5326 | } |
| 5327 | |
| 5328 | namespace test_noexcept |
| 5329 | { |
| 5330 | |
| 5331 | int f() { return 0; } |
| 5332 | int g() noexcept { return 0; } |
| 5333 | |
| 5334 | static_assert(noexcept(f()) == false, ""); |
| 5335 | static_assert(noexcept(g()) == true, ""); |
| 5336 | |
| 5337 | } |
| 5338 | |
| 5339 | namespace test_constexpr |
| 5340 | { |
| 5341 | |
| 5342 | template < typename CharT > |
| 5343 | unsigned long constexpr |
| 5344 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept |
| 5345 | { |
| 5346 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; |
| 5347 | } |
| 5348 | |
| 5349 | template < typename CharT > |
| 5350 | unsigned long constexpr |
| 5351 | strlen_c(const CharT *const s) noexcept |
| 5352 | { |
| 5353 | return strlen_c_r(s, 0UL); |
| 5354 | } |
| 5355 | |
| 5356 | static_assert(strlen_c("") == 0UL, ""); |
| 5357 | static_assert(strlen_c("1") == 1UL, ""); |
| 5358 | static_assert(strlen_c("example") == 7UL, ""); |
| 5359 | static_assert(strlen_c("another\0example") == 7UL, ""); |
| 5360 | |
| 5361 | } |
| 5362 | |
| 5363 | namespace test_rvalue_references |
| 5364 | { |
| 5365 | |
| 5366 | template < int N > |
| 5367 | struct answer |
| 5368 | { |
| 5369 | static constexpr int value = N; |
| 5370 | }; |
| 5371 | |
| 5372 | answer<1> f(int&) { return answer<1>(); } |
| 5373 | answer<2> f(const int&) { return answer<2>(); } |
| 5374 | answer<3> f(int&&) { return answer<3>(); } |
| 5375 | |
| 5376 | void |
| 5377 | test() |
| 5378 | { |
| 5379 | int i = 0; |
| 5380 | const int c = 0; |
| 5381 | static_assert(decltype(f(i))::value == 1, ""); |
| 5382 | static_assert(decltype(f(c))::value == 2, ""); |
| 5383 | static_assert(decltype(f(0))::value == 3, ""); |
| 5384 | } |
| 5385 | |
| 5386 | } |
| 5387 | |
| 5388 | namespace test_uniform_initialization |
| 5389 | { |
| 5390 | |
| 5391 | struct test |
| 5392 | { |
| 5393 | static const int zero {}; |
| 5394 | static const int one {1}; |
| 5395 | }; |
| 5396 | |
| 5397 | static_assert(test::zero == 0, ""); |
| 5398 | static_assert(test::one == 1, ""); |
| 5399 | |
| 5400 | } |
| 5401 | |
| 5402 | namespace test_lambdas |
| 5403 | { |
| 5404 | |
| 5405 | void |
| 5406 | test1() |
| 5407 | { |
| 5408 | auto lambda1 = [](){}; |
| 5409 | auto lambda2 = lambda1; |
| 5410 | lambda1(); |
| 5411 | lambda2(); |
| 5412 | } |
| 5413 | |
| 5414 | int |
| 5415 | test2() |
| 5416 | { |
| 5417 | auto a = [](int i, int j){ return i + j; }(1, 2); |
| 5418 | auto b = []() -> int { return '0'; }(); |
| 5419 | auto c = [=](){ return a + b; }(); |
| 5420 | auto d = [&](){ return c; }(); |
| 5421 | auto e = [a, &b](int x) mutable { |
| 5422 | const auto identity = [](int y){ return y; }; |
| 5423 | for (auto i = 0; i < a; ++i) |
| 5424 | a += b--; |
| 5425 | return x + identity(a + b); |
| 5426 | }(0); |
| 5427 | return a + b + c + d + e; |
| 5428 | } |
| 5429 | |
| 5430 | int |
| 5431 | test3() |
| 5432 | { |
| 5433 | const auto nullary = [](){ return 0; }; |
| 5434 | const auto unary = [](int x){ return x; }; |
| 5435 | using nullary_t = decltype(nullary); |
| 5436 | using unary_t = decltype(unary); |
| 5437 | const auto higher1st = [](nullary_t f){ return f(); }; |
| 5438 | const auto higher2nd = [unary](nullary_t f1){ |
| 5439 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; |
| 5440 | }; |
| 5441 | return higher1st(nullary) + higher2nd(nullary)(unary); |
| 5442 | } |
| 5443 | |
| 5444 | } |
| 5445 | |
| 5446 | namespace test_variadic_templates |
| 5447 | { |
| 5448 | |
| 5449 | template <int...> |
| 5450 | struct sum; |
| 5451 | |
| 5452 | template <int N0, int... N1toN> |
| 5453 | struct sum<N0, N1toN...> |
| 5454 | { |
| 5455 | static constexpr auto value = N0 + sum<N1toN...>::value; |
| 5456 | }; |
| 5457 | |
| 5458 | template <> |
| 5459 | struct sum<> |
| 5460 | { |
| 5461 | static constexpr auto value = 0; |
| 5462 | }; |
| 5463 | |
| 5464 | static_assert(sum<>::value == 0, ""); |
| 5465 | static_assert(sum<1>::value == 1, ""); |
| 5466 | static_assert(sum<23>::value == 23, ""); |
| 5467 | static_assert(sum<1, 2>::value == 3, ""); |
| 5468 | static_assert(sum<5, 5, 11>::value == 21, ""); |
| 5469 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); |
| 5470 | |
| 5471 | } |
| 5472 | |
| 5473 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae |
| 5474 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function |
| 5475 | // because of this. |
| 5476 | namespace test_template_alias_sfinae |
| 5477 | { |
| 5478 | |
| 5479 | struct foo {}; |
| 5480 | |
| 5481 | template<typename T> |
| 5482 | using member = typename T::member_type; |
| 5483 | |
| 5484 | template<typename T> |
| 5485 | void func(...) {} |
| 5486 | |
| 5487 | template<typename T> |
| 5488 | void func(member<T>*) {} |
| 5489 | |
| 5490 | void test(); |
| 5491 | |
| 5492 | void test() { func<foo>(0); } |
| 5493 | |
| 5494 | } |
| 5495 | |
| 5496 | } // namespace cxx11 |
| 5497 | |
| 5498 | #endif // __cplusplus >= 201103L |
| 5499 | |
| 5500 | |
| 5501 | |
| 5502 | _ACEOF |
| 5503 | if ac_fn_cxx_try_compile "$LINENO"; then : |
| 5504 | ax_cv_cxx_compile_cxx11=yes |
| 5505 | else |
| 5506 | ax_cv_cxx_compile_cxx11=no |
| 5507 | fi |
| 5508 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 5509 | fi |
| 5510 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5 |
| 5511 | $as_echo "$ax_cv_cxx_compile_cxx11" >&6; } |
| 5512 | if test x$ax_cv_cxx_compile_cxx11 = xyes; then |
| 5513 | ac_success=yes |
| 5514 | fi |
| 5515 | |
| 5516 | if test x$ac_success = xno; then |
| 5517 | for alternative in ${ax_cxx_compile_alternatives}; do |
| 5518 | switch="-std=gnu++${alternative}" |
| 5519 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` |
| 5520 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 |
| 5521 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } |
| 5522 | if eval \${$cachevar+:} false; then : |
| 5523 | $as_echo_n "(cached) " >&6 |
| 5524 | else |
| 5525 | ac_save_CXX="$CXX" |
| 5526 | CXX="$CXX $switch" |
| 5527 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5528 | /* end confdefs.h. */ |
| 5529 | |
| 5530 | |
| 5531 | // If the compiler admits that it is not ready for C++11, why torture it? |
| 5532 | // Hopefully, this will speed up the test. |
| 5533 | |
| 5534 | #ifndef __cplusplus |
| 5535 | |
| 5536 | #error "This is not a C++ compiler" |
| 5537 | |
| 5538 | #elif __cplusplus < 201103L |
| 5539 | |
| 5540 | #error "This is not a C++11 compiler" |
| 5541 | |
| 5542 | #else |
| 5543 | |
| 5544 | namespace cxx11 |
| 5545 | { |
| 5546 | |
| 5547 | namespace test_static_assert |
| 5548 | { |
| 5549 | |
| 5550 | template <typename T> |
| 5551 | struct check |
| 5552 | { |
| 5553 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); |
| 5554 | }; |
| 5555 | |
| 5556 | } |
| 5557 | |
| 5558 | namespace test_final_override |
| 5559 | { |
| 5560 | |
| 5561 | struct Base |
| 5562 | { |
| 5563 | virtual void f() {} |
| 5564 | }; |
| 5565 | |
| 5566 | struct Derived : public Base |
| 5567 | { |
| 5568 | virtual void f() override {} |
| 5569 | }; |
| 5570 | |
| 5571 | } |
| 5572 | |
| 5573 | namespace test_double_right_angle_brackets |
| 5574 | { |
| 5575 | |
| 5576 | template < typename T > |
| 5577 | struct check {}; |
| 5578 | |
| 5579 | typedef check<void> single_type; |
| 5580 | typedef check<check<void>> double_type; |
| 5581 | typedef check<check<check<void>>> triple_type; |
| 5582 | typedef check<check<check<check<void>>>> quadruple_type; |
| 5583 | |
| 5584 | } |
| 5585 | |
| 5586 | namespace test_decltype |
| 5587 | { |
| 5588 | |
| 5589 | int |
| 5590 | f() |
| 5591 | { |
| 5592 | int a = 1; |
| 5593 | decltype(a) b = 2; |
| 5594 | return a + b; |
| 5595 | } |
| 5596 | |
| 5597 | } |
| 5598 | |
| 5599 | namespace test_type_deduction |
| 5600 | { |
| 5601 | |
| 5602 | template < typename T1, typename T2 > |
| 5603 | struct is_same |
| 5604 | { |
| 5605 | static const bool value = false; |
| 5606 | }; |
| 5607 | |
| 5608 | template < typename T > |
| 5609 | struct is_same<T, T> |
| 5610 | { |
| 5611 | static const bool value = true; |
| 5612 | }; |
| 5613 | |
| 5614 | template < typename T1, typename T2 > |
| 5615 | auto |
| 5616 | add(T1 a1, T2 a2) -> decltype(a1 + a2) |
| 5617 | { |
| 5618 | return a1 + a2; |
| 5619 | } |
| 5620 | |
| 5621 | int |
| 5622 | test(const int c, volatile int v) |
| 5623 | { |
| 5624 | static_assert(is_same<int, decltype(0)>::value == true, ""); |
| 5625 | static_assert(is_same<int, decltype(c)>::value == false, ""); |
| 5626 | static_assert(is_same<int, decltype(v)>::value == false, ""); |
| 5627 | auto ac = c; |
| 5628 | auto av = v; |
| 5629 | auto sumi = ac + av + 'x'; |
| 5630 | auto sumf = ac + av + 1.0; |
| 5631 | static_assert(is_same<int, decltype(ac)>::value == true, ""); |
| 5632 | static_assert(is_same<int, decltype(av)>::value == true, ""); |
| 5633 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); |
| 5634 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); |
| 5635 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); |
| 5636 | return (sumf > 0.0) ? sumi : add(c, v); |
| 5637 | } |
| 5638 | |
| 5639 | } |
| 5640 | |
| 5641 | namespace test_noexcept |
| 5642 | { |
| 5643 | |
| 5644 | int f() { return 0; } |
| 5645 | int g() noexcept { return 0; } |
| 5646 | |
| 5647 | static_assert(noexcept(f()) == false, ""); |
| 5648 | static_assert(noexcept(g()) == true, ""); |
| 5649 | |
| 5650 | } |
| 5651 | |
| 5652 | namespace test_constexpr |
| 5653 | { |
| 5654 | |
| 5655 | template < typename CharT > |
| 5656 | unsigned long constexpr |
| 5657 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept |
| 5658 | { |
| 5659 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; |
| 5660 | } |
| 5661 | |
| 5662 | template < typename CharT > |
| 5663 | unsigned long constexpr |
| 5664 | strlen_c(const CharT *const s) noexcept |
| 5665 | { |
| 5666 | return strlen_c_r(s, 0UL); |
| 5667 | } |
| 5668 | |
| 5669 | static_assert(strlen_c("") == 0UL, ""); |
| 5670 | static_assert(strlen_c("1") == 1UL, ""); |
| 5671 | static_assert(strlen_c("example") == 7UL, ""); |
| 5672 | static_assert(strlen_c("another\0example") == 7UL, ""); |
| 5673 | |
| 5674 | } |
| 5675 | |
| 5676 | namespace test_rvalue_references |
| 5677 | { |
| 5678 | |
| 5679 | template < int N > |
| 5680 | struct answer |
| 5681 | { |
| 5682 | static constexpr int value = N; |
| 5683 | }; |
| 5684 | |
| 5685 | answer<1> f(int&) { return answer<1>(); } |
| 5686 | answer<2> f(const int&) { return answer<2>(); } |
| 5687 | answer<3> f(int&&) { return answer<3>(); } |
| 5688 | |
| 5689 | void |
| 5690 | test() |
| 5691 | { |
| 5692 | int i = 0; |
| 5693 | const int c = 0; |
| 5694 | static_assert(decltype(f(i))::value == 1, ""); |
| 5695 | static_assert(decltype(f(c))::value == 2, ""); |
| 5696 | static_assert(decltype(f(0))::value == 3, ""); |
| 5697 | } |
| 5698 | |
| 5699 | } |
| 5700 | |
| 5701 | namespace test_uniform_initialization |
| 5702 | { |
| 5703 | |
| 5704 | struct test |
| 5705 | { |
| 5706 | static const int zero {}; |
| 5707 | static const int one {1}; |
| 5708 | }; |
| 5709 | |
| 5710 | static_assert(test::zero == 0, ""); |
| 5711 | static_assert(test::one == 1, ""); |
| 5712 | |
| 5713 | } |
| 5714 | |
| 5715 | namespace test_lambdas |
| 5716 | { |
| 5717 | |
| 5718 | void |
| 5719 | test1() |
| 5720 | { |
| 5721 | auto lambda1 = [](){}; |
| 5722 | auto lambda2 = lambda1; |
| 5723 | lambda1(); |
| 5724 | lambda2(); |
| 5725 | } |
| 5726 | |
| 5727 | int |
| 5728 | test2() |
| 5729 | { |
| 5730 | auto a = [](int i, int j){ return i + j; }(1, 2); |
| 5731 | auto b = []() -> int { return '0'; }(); |
| 5732 | auto c = [=](){ return a + b; }(); |
| 5733 | auto d = [&](){ return c; }(); |
| 5734 | auto e = [a, &b](int x) mutable { |
| 5735 | const auto identity = [](int y){ return y; }; |
| 5736 | for (auto i = 0; i < a; ++i) |
| 5737 | a += b--; |
| 5738 | return x + identity(a + b); |
| 5739 | }(0); |
| 5740 | return a + b + c + d + e; |
| 5741 | } |
| 5742 | |
| 5743 | int |
| 5744 | test3() |
| 5745 | { |
| 5746 | const auto nullary = [](){ return 0; }; |
| 5747 | const auto unary = [](int x){ return x; }; |
| 5748 | using nullary_t = decltype(nullary); |
| 5749 | using unary_t = decltype(unary); |
| 5750 | const auto higher1st = [](nullary_t f){ return f(); }; |
| 5751 | const auto higher2nd = [unary](nullary_t f1){ |
| 5752 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; |
| 5753 | }; |
| 5754 | return higher1st(nullary) + higher2nd(nullary)(unary); |
| 5755 | } |
| 5756 | |
| 5757 | } |
| 5758 | |
| 5759 | namespace test_variadic_templates |
| 5760 | { |
| 5761 | |
| 5762 | template <int...> |
| 5763 | struct sum; |
| 5764 | |
| 5765 | template <int N0, int... N1toN> |
| 5766 | struct sum<N0, N1toN...> |
| 5767 | { |
| 5768 | static constexpr auto value = N0 + sum<N1toN...>::value; |
| 5769 | }; |
| 5770 | |
| 5771 | template <> |
| 5772 | struct sum<> |
| 5773 | { |
| 5774 | static constexpr auto value = 0; |
| 5775 | }; |
| 5776 | |
| 5777 | static_assert(sum<>::value == 0, ""); |
| 5778 | static_assert(sum<1>::value == 1, ""); |
| 5779 | static_assert(sum<23>::value == 23, ""); |
| 5780 | static_assert(sum<1, 2>::value == 3, ""); |
| 5781 | static_assert(sum<5, 5, 11>::value == 21, ""); |
| 5782 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); |
| 5783 | |
| 5784 | } |
| 5785 | |
| 5786 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae |
| 5787 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function |
| 5788 | // because of this. |
| 5789 | namespace test_template_alias_sfinae |
| 5790 | { |
| 5791 | |
| 5792 | struct foo {}; |
| 5793 | |
| 5794 | template<typename T> |
| 5795 | using member = typename T::member_type; |
| 5796 | |
| 5797 | template<typename T> |
| 5798 | void func(...) {} |
| 5799 | |
| 5800 | template<typename T> |
| 5801 | void func(member<T>*) {} |
| 5802 | |
| 5803 | void test(); |
| 5804 | |
| 5805 | void test() { func<foo>(0); } |
| 5806 | |
| 5807 | } |
| 5808 | |
| 5809 | } // namespace cxx11 |
| 5810 | |
| 5811 | #endif // __cplusplus >= 201103L |
| 5812 | |
| 5813 | |
| 5814 | |
| 5815 | _ACEOF |
| 5816 | if ac_fn_cxx_try_compile "$LINENO"; then : |
| 5817 | eval $cachevar=yes |
| 5818 | else |
| 5819 | eval $cachevar=no |
| 5820 | fi |
| 5821 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 5822 | CXX="$ac_save_CXX" |
| 5823 | fi |
| 5824 | eval ac_res=\$$cachevar |
| 5825 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 5826 | $as_echo "$ac_res" >&6; } |
| 5827 | if eval test x\$$cachevar = xyes; then |
| 5828 | CXX_DIALECT="$switch" |
| 5829 | ac_success=yes |
| 5830 | break |
| 5831 | fi |
| 5832 | done |
| 5833 | fi |
| 5834 | |
| 5835 | if test x$ac_success = xno; then |
| 5836 | for alternative in ${ax_cxx_compile_alternatives}; do |
| 5837 | for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do |
| 5838 | cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh` |
| 5839 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5 |
| 5840 | $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; } |
| 5841 | if eval \${$cachevar+:} false; then : |
| 5842 | $as_echo_n "(cached) " >&6 |
| 5843 | else |
| 5844 | ac_save_CXX="$CXX" |
| 5845 | CXX="$CXX $switch" |
| 5846 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 5847 | /* end confdefs.h. */ |
| 5848 | |
| 5849 | |
| 5850 | // If the compiler admits that it is not ready for C++11, why torture it? |
| 5851 | // Hopefully, this will speed up the test. |
| 5852 | |
| 5853 | #ifndef __cplusplus |
| 5854 | |
| 5855 | #error "This is not a C++ compiler" |
| 5856 | |
| 5857 | #elif __cplusplus < 201103L |
| 5858 | |
| 5859 | #error "This is not a C++11 compiler" |
| 5860 | |
| 5861 | #else |
| 5862 | |
| 5863 | namespace cxx11 |
| 5864 | { |
| 5865 | |
| 5866 | namespace test_static_assert |
| 5867 | { |
| 5868 | |
| 5869 | template <typename T> |
| 5870 | struct check |
| 5871 | { |
| 5872 | static_assert(sizeof(int) <= sizeof(T), "not big enough"); |
| 5873 | }; |
| 5874 | |
| 5875 | } |
| 5876 | |
| 5877 | namespace test_final_override |
| 5878 | { |
| 5879 | |
| 5880 | struct Base |
| 5881 | { |
| 5882 | virtual void f() {} |
| 5883 | }; |
| 5884 | |
| 5885 | struct Derived : public Base |
| 5886 | { |
| 5887 | virtual void f() override {} |
| 5888 | }; |
| 5889 | |
| 5890 | } |
| 5891 | |
| 5892 | namespace test_double_right_angle_brackets |
| 5893 | { |
| 5894 | |
| 5895 | template < typename T > |
| 5896 | struct check {}; |
| 5897 | |
| 5898 | typedef check<void> single_type; |
| 5899 | typedef check<check<void>> double_type; |
| 5900 | typedef check<check<check<void>>> triple_type; |
| 5901 | typedef check<check<check<check<void>>>> quadruple_type; |
| 5902 | |
| 5903 | } |
| 5904 | |
| 5905 | namespace test_decltype |
| 5906 | { |
| 5907 | |
| 5908 | int |
| 5909 | f() |
| 5910 | { |
| 5911 | int a = 1; |
| 5912 | decltype(a) b = 2; |
| 5913 | return a + b; |
| 5914 | } |
| 5915 | |
| 5916 | } |
| 5917 | |
| 5918 | namespace test_type_deduction |
| 5919 | { |
| 5920 | |
| 5921 | template < typename T1, typename T2 > |
| 5922 | struct is_same |
| 5923 | { |
| 5924 | static const bool value = false; |
| 5925 | }; |
| 5926 | |
| 5927 | template < typename T > |
| 5928 | struct is_same<T, T> |
| 5929 | { |
| 5930 | static const bool value = true; |
| 5931 | }; |
| 5932 | |
| 5933 | template < typename T1, typename T2 > |
| 5934 | auto |
| 5935 | add(T1 a1, T2 a2) -> decltype(a1 + a2) |
| 5936 | { |
| 5937 | return a1 + a2; |
| 5938 | } |
| 5939 | |
| 5940 | int |
| 5941 | test(const int c, volatile int v) |
| 5942 | { |
| 5943 | static_assert(is_same<int, decltype(0)>::value == true, ""); |
| 5944 | static_assert(is_same<int, decltype(c)>::value == false, ""); |
| 5945 | static_assert(is_same<int, decltype(v)>::value == false, ""); |
| 5946 | auto ac = c; |
| 5947 | auto av = v; |
| 5948 | auto sumi = ac + av + 'x'; |
| 5949 | auto sumf = ac + av + 1.0; |
| 5950 | static_assert(is_same<int, decltype(ac)>::value == true, ""); |
| 5951 | static_assert(is_same<int, decltype(av)>::value == true, ""); |
| 5952 | static_assert(is_same<int, decltype(sumi)>::value == true, ""); |
| 5953 | static_assert(is_same<int, decltype(sumf)>::value == false, ""); |
| 5954 | static_assert(is_same<int, decltype(add(c, v))>::value == true, ""); |
| 5955 | return (sumf > 0.0) ? sumi : add(c, v); |
| 5956 | } |
| 5957 | |
| 5958 | } |
| 5959 | |
| 5960 | namespace test_noexcept |
| 5961 | { |
| 5962 | |
| 5963 | int f() { return 0; } |
| 5964 | int g() noexcept { return 0; } |
| 5965 | |
| 5966 | static_assert(noexcept(f()) == false, ""); |
| 5967 | static_assert(noexcept(g()) == true, ""); |
| 5968 | |
| 5969 | } |
| 5970 | |
| 5971 | namespace test_constexpr |
| 5972 | { |
| 5973 | |
| 5974 | template < typename CharT > |
| 5975 | unsigned long constexpr |
| 5976 | strlen_c_r(const CharT *const s, const unsigned long acc) noexcept |
| 5977 | { |
| 5978 | return *s ? strlen_c_r(s + 1, acc + 1) : acc; |
| 5979 | } |
| 5980 | |
| 5981 | template < typename CharT > |
| 5982 | unsigned long constexpr |
| 5983 | strlen_c(const CharT *const s) noexcept |
| 5984 | { |
| 5985 | return strlen_c_r(s, 0UL); |
| 5986 | } |
| 5987 | |
| 5988 | static_assert(strlen_c("") == 0UL, ""); |
| 5989 | static_assert(strlen_c("1") == 1UL, ""); |
| 5990 | static_assert(strlen_c("example") == 7UL, ""); |
| 5991 | static_assert(strlen_c("another\0example") == 7UL, ""); |
| 5992 | |
| 5993 | } |
| 5994 | |
| 5995 | namespace test_rvalue_references |
| 5996 | { |
| 5997 | |
| 5998 | template < int N > |
| 5999 | struct answer |
| 6000 | { |
| 6001 | static constexpr int value = N; |
| 6002 | }; |
| 6003 | |
| 6004 | answer<1> f(int&) { return answer<1>(); } |
| 6005 | answer<2> f(const int&) { return answer<2>(); } |
| 6006 | answer<3> f(int&&) { return answer<3>(); } |
| 6007 | |
| 6008 | void |
| 6009 | test() |
| 6010 | { |
| 6011 | int i = 0; |
| 6012 | const int c = 0; |
| 6013 | static_assert(decltype(f(i))::value == 1, ""); |
| 6014 | static_assert(decltype(f(c))::value == 2, ""); |
| 6015 | static_assert(decltype(f(0))::value == 3, ""); |
| 6016 | } |
| 6017 | |
| 6018 | } |
| 6019 | |
| 6020 | namespace test_uniform_initialization |
| 6021 | { |
| 6022 | |
| 6023 | struct test |
| 6024 | { |
| 6025 | static const int zero {}; |
| 6026 | static const int one {1}; |
| 6027 | }; |
| 6028 | |
| 6029 | static_assert(test::zero == 0, ""); |
| 6030 | static_assert(test::one == 1, ""); |
| 6031 | |
| 6032 | } |
| 6033 | |
| 6034 | namespace test_lambdas |
| 6035 | { |
| 6036 | |
| 6037 | void |
| 6038 | test1() |
| 6039 | { |
| 6040 | auto lambda1 = [](){}; |
| 6041 | auto lambda2 = lambda1; |
| 6042 | lambda1(); |
| 6043 | lambda2(); |
| 6044 | } |
| 6045 | |
| 6046 | int |
| 6047 | test2() |
| 6048 | { |
| 6049 | auto a = [](int i, int j){ return i + j; }(1, 2); |
| 6050 | auto b = []() -> int { return '0'; }(); |
| 6051 | auto c = [=](){ return a + b; }(); |
| 6052 | auto d = [&](){ return c; }(); |
| 6053 | auto e = [a, &b](int x) mutable { |
| 6054 | const auto identity = [](int y){ return y; }; |
| 6055 | for (auto i = 0; i < a; ++i) |
| 6056 | a += b--; |
| 6057 | return x + identity(a + b); |
| 6058 | }(0); |
| 6059 | return a + b + c + d + e; |
| 6060 | } |
| 6061 | |
| 6062 | int |
| 6063 | test3() |
| 6064 | { |
| 6065 | const auto nullary = [](){ return 0; }; |
| 6066 | const auto unary = [](int x){ return x; }; |
| 6067 | using nullary_t = decltype(nullary); |
| 6068 | using unary_t = decltype(unary); |
| 6069 | const auto higher1st = [](nullary_t f){ return f(); }; |
| 6070 | const auto higher2nd = [unary](nullary_t f1){ |
| 6071 | return [unary, f1](unary_t f2){ return f2(unary(f1())); }; |
| 6072 | }; |
| 6073 | return higher1st(nullary) + higher2nd(nullary)(unary); |
| 6074 | } |
| 6075 | |
| 6076 | } |
| 6077 | |
| 6078 | namespace test_variadic_templates |
| 6079 | { |
| 6080 | |
| 6081 | template <int...> |
| 6082 | struct sum; |
| 6083 | |
| 6084 | template <int N0, int... N1toN> |
| 6085 | struct sum<N0, N1toN...> |
| 6086 | { |
| 6087 | static constexpr auto value = N0 + sum<N1toN...>::value; |
| 6088 | }; |
| 6089 | |
| 6090 | template <> |
| 6091 | struct sum<> |
| 6092 | { |
| 6093 | static constexpr auto value = 0; |
| 6094 | }; |
| 6095 | |
| 6096 | static_assert(sum<>::value == 0, ""); |
| 6097 | static_assert(sum<1>::value == 1, ""); |
| 6098 | static_assert(sum<23>::value == 23, ""); |
| 6099 | static_assert(sum<1, 2>::value == 3, ""); |
| 6100 | static_assert(sum<5, 5, 11>::value == 21, ""); |
| 6101 | static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, ""); |
| 6102 | |
| 6103 | } |
| 6104 | |
| 6105 | // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae |
| 6106 | // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function |
| 6107 | // because of this. |
| 6108 | namespace test_template_alias_sfinae |
| 6109 | { |
| 6110 | |
| 6111 | struct foo {}; |
| 6112 | |
| 6113 | template<typename T> |
| 6114 | using member = typename T::member_type; |
| 6115 | |
| 6116 | template<typename T> |
| 6117 | void func(...) {} |
| 6118 | |
| 6119 | template<typename T> |
| 6120 | void func(member<T>*) {} |
| 6121 | |
| 6122 | void test(); |
| 6123 | |
| 6124 | void test() { func<foo>(0); } |
| 6125 | |
| 6126 | } |
| 6127 | |
| 6128 | } // namespace cxx11 |
| 6129 | |
| 6130 | #endif // __cplusplus >= 201103L |
| 6131 | |
| 6132 | |
| 6133 | |
| 6134 | _ACEOF |
| 6135 | if ac_fn_cxx_try_compile "$LINENO"; then : |
| 6136 | eval $cachevar=yes |
| 6137 | else |
| 6138 | eval $cachevar=no |
| 6139 | fi |
| 6140 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 6141 | CXX="$ac_save_CXX" |
| 6142 | fi |
| 6143 | eval ac_res=\$$cachevar |
| 6144 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 |
| 6145 | $as_echo "$ac_res" >&6; } |
| 6146 | if eval test x\$$cachevar = xyes; then |
| 6147 | CXX_DIALECT="$switch" |
| 6148 | ac_success=yes |
| 6149 | break |
| 6150 | fi |
| 6151 | done |
| 6152 | if test x$ac_success = xyes; then |
| 6153 | break |
| 6154 | fi |
| 6155 | done |
| 6156 | fi |
| 6157 | ac_ext=c |
| 6158 | ac_cpp='$CPP $CPPFLAGS' |
| 6159 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 6160 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 6161 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 6162 | |
| 6163 | if test x$ax_cxx_compile_cxx11_required = xtrue; then |
| 6164 | if test x$ac_success = xno; then |
| 6165 | as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5 |
| 6166 | fi |
| 6167 | fi |
| 6168 | if test x$ac_success = xno; then |
| 6169 | HAVE_CXX11=0 |
| 6170 | { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5 |
| 6171 | $as_echo "$as_me: No compiler with C++11 support was found" >&6;} |
| 6172 | else |
| 6173 | HAVE_CXX11=1 |
| 6174 | |
| 6175 | $as_echo "#define HAVE_CXX11 1" >>confdefs.h |
| 6176 | |
| 6177 | fi |
| 6178 | |
| 6179 | |
| 6180 | |
| 6181 | |
| 6182 | # Dependency checking. |
| 6183 | rm -rf .tst 2>/dev/null |
| 6184 | mkdir .tst 2>/dev/null |
| 6185 | if test -d .tst; then |
| 6186 | am__leading_dot=. |
| 6187 | else |
| 6188 | am__leading_dot=_ |
| 6189 | fi |
| 6190 | rmdir .tst 2>/dev/null |
| 6191 | |
| 6192 | DEPDIR="${am__leading_dot}deps" |
| 6193 | |
| 6194 | ac_config_commands="$ac_config_commands depdir" |
| 6195 | |
| 6196 | |
| 6197 | depcc="$CC" am_compiler_list= |
| 6198 | |
| 6199 | am_depcomp=$ac_aux_dir/depcomp |
| 6200 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 |
| 6201 | $as_echo_n "checking dependency style of $depcc... " >&6; } |
| 6202 | if ${am_cv_CC_dependencies_compiler_type+:} false; then : |
| 6203 | $as_echo_n "(cached) " >&6 |
| 6204 | else |
| 6205 | if test -f "$am_depcomp"; then |
| 6206 | # We make a subdir and do the tests there. Otherwise we can end up |
| 6207 | # making bogus files that we don't know about and never remove. For |
| 6208 | # instance it was reported that on HP-UX the gcc test will end up |
| 6209 | # making a dummy file named `D' -- because `-MD' means `put the output |
| 6210 | # in D'. |
| 6211 | mkdir conftest.dir |
| 6212 | # Copy depcomp to subdir because otherwise we won't find it if we're |
| 6213 | # using a relative directory. |
| 6214 | cp "$am_depcomp" conftest.dir |
| 6215 | cd conftest.dir |
| 6216 | # We will build objects and dependencies in a subdirectory because |
| 6217 | # it helps to detect inapplicable dependency modes. For instance |
| 6218 | # both Tru64's cc and ICC support -MD to output dependencies as a |
| 6219 | # side effect of compilation, but ICC will put the dependencies in |
| 6220 | # the current directory while Tru64 will put them in the object |
| 6221 | # directory. |
| 6222 | mkdir sub |
| 6223 | |
| 6224 | am_cv_CC_dependencies_compiler_type=none |
| 6225 | if test "$am_compiler_list" = ""; then |
| 6226 | am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` |
| 6227 | fi |
| 6228 | for depmode in $am_compiler_list; do |
| 6229 | if test $depmode = none; then break; fi |
| 6230 | |
| 6231 | $as_echo "$as_me:$LINENO: trying $depmode" >&5 |
| 6232 | # Setup a source with many dependencies, because some compilers |
| 6233 | # like to wrap large dependency lists on column 80 (with \), and |
| 6234 | # we should not choose a depcomp mode which is confused by this. |
| 6235 | # |
| 6236 | # We need to recreate these files for each test, as the compiler may |
| 6237 | # overwrite some of them when testing with obscure command lines. |
| 6238 | # This happens at least with the AIX C compiler. |
| 6239 | : > sub/conftest.c |
| 6240 | for i in 1 2 3 4 5 6; do |
| 6241 | echo '#include "conftst'$i'.h"' >> sub/conftest.c |
| 6242 | # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with |
| 6243 | # Solaris 8's {/usr,}/bin/sh. |
| 6244 | touch sub/conftst$i.h |
| 6245 | done |
| 6246 | echo "include sub/conftest.Po" > confmf |
| 6247 | |
| 6248 | # We check with `-c' and `-o' for the sake of the "dashmstdout" |
| 6249 | # mode. It turns out that the SunPro C++ compiler does not properly |
| 6250 | # handle `-M -o', and we need to detect this. |
| 6251 | depcmd="depmode=$depmode \ |
| 6252 | source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ |
| 6253 | depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ |
| 6254 | $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c" |
| 6255 | echo "| $depcmd" | sed -e 's/ */ /g' >&5 |
| 6256 | if env $depcmd > conftest.err 2>&1 && |
| 6257 | grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 && |
| 6258 | grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 && |
| 6259 | ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then |
| 6260 | # icc doesn't choke on unknown options, it will just issue warnings |
| 6261 | # or remarks (even with -Werror). So we grep stderr for any message |
| 6262 | # that says an option was ignored or not supported. |
| 6263 | # When given -MP, icc 7.0 and 7.1 complain thusly: |
| 6264 | # icc: Command line warning: ignoring option '-M'; no argument required |
| 6265 | # The diagnosis changed in icc 8.0: |
| 6266 | # icc: Command line remark: option '-MP' not supported |
| 6267 | if (grep 'ignoring option' conftest.err || |
| 6268 | grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else |
| 6269 | am_cv_CC_dependencies_compiler_type=$depmode |
| 6270 | $as_echo "$as_me:$LINENO: success" >&5 |
| 6271 | break |
| 6272 | fi |
| 6273 | fi |
| 6274 | $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5 |
| 6275 | sed -e 's/^/| /' < conftest.err >&5 |
| 6276 | done |
| 6277 | |
| 6278 | cd .. |
| 6279 | rm -rf conftest.dir |
| 6280 | else |
| 6281 | am_cv_CC_dependencies_compiler_type=none |
| 6282 | fi |
| 6283 | |
| 6284 | fi |
| 6285 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 |
| 6286 | $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } |
| 6287 | if test x${am_cv_CC_dependencies_compiler_type-none} = xnone |
| 6288 | then as_fn_error $? "no usable dependency style found" "$LINENO" 5 |
| 6289 | else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type |
| 6290 | |
| 6291 | fi |
| 6292 | |
| 6293 | |
| 6294 | |
| 6295 | CONFIG_OBS= |
| 6296 | CONFIG_DEPS= |
| 6297 | CONFIG_SRCS= |
| 6298 | ENABLE_CFLAGS= |
| 6299 | |
| 6300 | CONFIG_ALL= |
| 6301 | CONFIG_CLEAN= |
| 6302 | CONFIG_INSTALL= |
| 6303 | CONFIG_UNINSTALL= |
| 6304 | |
| 6305 | # If we haven't got the data from the intl directory, |
| 6306 | # assume NLS is disabled. |
| 6307 | USE_NLS=no |
| 6308 | LIBINTL= |
| 6309 | LIBINTL_DEP= |
| 6310 | INCINTL= |
| 6311 | XGETTEXT= |
| 6312 | GMSGFMT= |
| 6313 | POSUB= |
| 6314 | |
| 6315 | if test -f ../intl/config.intl; then |
| 6316 | . ../intl/config.intl |
| 6317 | fi |
| 6318 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5 |
| 6319 | $as_echo_n "checking whether NLS is requested... " >&6; } |
| 6320 | if test x"$USE_NLS" != xyes; then |
| 6321 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 6322 | $as_echo "no" >&6; } |
| 6323 | else |
| 6324 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 6325 | $as_echo "yes" >&6; } |
| 6326 | |
| 6327 | $as_echo "#define ENABLE_NLS 1" >>confdefs.h |
| 6328 | |
| 6329 | |
| 6330 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5 |
| 6331 | $as_echo_n "checking for catalogs to be installed... " >&6; } |
| 6332 | # Look for .po and .gmo files in the source directory. |
| 6333 | CATALOGS= |
| 6334 | XLINGUAS= |
| 6335 | for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do |
| 6336 | # If there aren't any .gmo files the shell will give us the |
| 6337 | # literal string "../path/to/srcdir/po/*.gmo" which has to be |
| 6338 | # weeded out. |
| 6339 | case "$cat" in *\**) |
| 6340 | continue;; |
| 6341 | esac |
| 6342 | # The quadruple backslash is collapsed to a double backslash |
| 6343 | # by the backticks, then collapsed again by the double quotes, |
| 6344 | # leaving us with one backslash in the sed expression (right |
| 6345 | # before the dot that mustn't act as a wildcard). |
| 6346 | cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"` |
| 6347 | lang=`echo $cat | sed -e "s!\\\\.gmo!!"` |
| 6348 | # The user is allowed to set LINGUAS to a list of languages to |
| 6349 | # install catalogs for. If it's empty that means "all of them." |
| 6350 | if test "x$LINGUAS" = x; then |
| 6351 | CATALOGS="$CATALOGS $cat" |
| 6352 | XLINGUAS="$XLINGUAS $lang" |
| 6353 | else |
| 6354 | case "$LINGUAS" in *$lang*) |
| 6355 | CATALOGS="$CATALOGS $cat" |
| 6356 | XLINGUAS="$XLINGUAS $lang" |
| 6357 | ;; |
| 6358 | esac |
| 6359 | fi |
| 6360 | done |
| 6361 | LINGUAS="$XLINGUAS" |
| 6362 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5 |
| 6363 | $as_echo "$LINGUAS" >&6; } |
| 6364 | |
| 6365 | |
| 6366 | DATADIRNAME=share |
| 6367 | |
| 6368 | INSTOBJEXT=.mo |
| 6369 | |
| 6370 | GENCAT=gencat |
| 6371 | |
| 6372 | CATOBJEXT=.gmo |
| 6373 | |
| 6374 | fi |
| 6375 | |
| 6376 | localedir='${datadir}/locale' |
| 6377 | |
| 6378 | |
| 6379 | if test x"$USE_NLS" = xyes; then |
| 6380 | CONFIG_ALL="$CONFIG_ALL all-po" |
| 6381 | CONFIG_CLEAN="$CONFIG_CLEAN clean-po" |
| 6382 | CONFIG_INSTALL="$CONFIG_INSTALL install-po" |
| 6383 | CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po" |
| 6384 | fi |
| 6385 | |
| 6386 | PACKAGE=gdb |
| 6387 | |
| 6388 | cat >>confdefs.h <<_ACEOF |
| 6389 | #define PACKAGE "$PACKAGE" |
| 6390 | _ACEOF |
| 6391 | |
| 6392 | |
| 6393 | |
| 6394 | # We never need to detect it in this sub-configure. |
| 6395 | # But preserve it for config.status --recheck. |
| 6396 | |
| 6397 | |
| 6398 | |
| 6399 | MAKEINFO_EXTRA_FLAGS="" |
| 6400 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5 |
| 6401 | $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; } |
| 6402 | if ${gdb_cv_have_makeinfo_click+:} false; then : |
| 6403 | $as_echo_n "(cached) " >&6 |
| 6404 | else |
| 6405 | echo '@clicksequence{a @click{} b}' >conftest.texinfo |
| 6406 | if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then |
| 6407 | gdb_cv_have_makeinfo_click=yes |
| 6408 | else |
| 6409 | gdb_cv_have_makeinfo_click=no |
| 6410 | fi |
| 6411 | fi |
| 6412 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5 |
| 6413 | $as_echo "$gdb_cv_have_makeinfo_click" >&6; } |
| 6414 | if test x"$gdb_cv_have_makeinfo_click" = xyes; then |
| 6415 | MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK" |
| 6416 | fi |
| 6417 | |
| 6418 | |
| 6419 | |
| 6420 | |
| 6421 | # Check whether --with-separate-debug-dir was given. |
| 6422 | if test "${with_separate_debug_dir+set}" = set; then : |
| 6423 | withval=$with_separate_debug_dir; |
| 6424 | DEBUGDIR=$withval |
| 6425 | else |
| 6426 | DEBUGDIR=${libdir}/debug |
| 6427 | fi |
| 6428 | |
| 6429 | |
| 6430 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
| 6431 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
| 6432 | ac_define_dir=`eval echo $DEBUGDIR` |
| 6433 | ac_define_dir=`eval echo $ac_define_dir` |
| 6434 | |
| 6435 | cat >>confdefs.h <<_ACEOF |
| 6436 | #define DEBUGDIR "$ac_define_dir" |
| 6437 | _ACEOF |
| 6438 | |
| 6439 | |
| 6440 | |
| 6441 | |
| 6442 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
| 6443 | if test "x$prefix" = xNONE; then |
| 6444 | test_prefix=/usr/local |
| 6445 | else |
| 6446 | test_prefix=$prefix |
| 6447 | fi |
| 6448 | else |
| 6449 | test_prefix=$exec_prefix |
| 6450 | fi |
| 6451 | value=0 |
| 6452 | case ${ac_define_dir} in |
| 6453 | "${test_prefix}"|"${test_prefix}/"*|\ |
| 6454 | '${exec_prefix}'|'${exec_prefix}/'*) |
| 6455 | value=1 |
| 6456 | ;; |
| 6457 | esac |
| 6458 | |
| 6459 | cat >>confdefs.h <<_ACEOF |
| 6460 | #define DEBUGDIR_RELOCATABLE $value |
| 6461 | _ACEOF |
| 6462 | |
| 6463 | |
| 6464 | |
| 6465 | |
| 6466 | # We can't pass paths as command line arguments. |
| 6467 | # Mingw32 tries to be clever and will convert the paths for us. |
| 6468 | # For example -DBINDIR="/usr/local/bin" passed on the command line may get |
| 6469 | # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin". |
| 6470 | # This breaks GDB's relocatable path conversions since paths passed in |
| 6471 | # config.h would not get so translated, the path prefixes no longer match. |
| 6472 | |
| 6473 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
| 6474 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
| 6475 | ac_define_dir=`eval echo $bindir` |
| 6476 | ac_define_dir=`eval echo $ac_define_dir` |
| 6477 | |
| 6478 | cat >>confdefs.h <<_ACEOF |
| 6479 | #define BINDIR "$ac_define_dir" |
| 6480 | _ACEOF |
| 6481 | |
| 6482 | |
| 6483 | |
| 6484 | # GDB's datadir relocation |
| 6485 | |
| 6486 | |
| 6487 | |
| 6488 | # Check whether --with-gdb-datadir was given. |
| 6489 | if test "${with_gdb_datadir+set}" = set; then : |
| 6490 | withval=$with_gdb_datadir; |
| 6491 | GDB_DATADIR=$withval |
| 6492 | else |
| 6493 | GDB_DATADIR=${datadir}/gdb |
| 6494 | fi |
| 6495 | |
| 6496 | |
| 6497 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
| 6498 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
| 6499 | ac_define_dir=`eval echo $GDB_DATADIR` |
| 6500 | ac_define_dir=`eval echo $ac_define_dir` |
| 6501 | |
| 6502 | cat >>confdefs.h <<_ACEOF |
| 6503 | #define GDB_DATADIR "$ac_define_dir" |
| 6504 | _ACEOF |
| 6505 | |
| 6506 | |
| 6507 | |
| 6508 | |
| 6509 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
| 6510 | if test "x$prefix" = xNONE; then |
| 6511 | test_prefix=/usr/local |
| 6512 | else |
| 6513 | test_prefix=$prefix |
| 6514 | fi |
| 6515 | else |
| 6516 | test_prefix=$exec_prefix |
| 6517 | fi |
| 6518 | value=0 |
| 6519 | case ${ac_define_dir} in |
| 6520 | "${test_prefix}"|"${test_prefix}/"*|\ |
| 6521 | '${exec_prefix}'|'${exec_prefix}/'*) |
| 6522 | value=1 |
| 6523 | ;; |
| 6524 | esac |
| 6525 | |
| 6526 | cat >>confdefs.h <<_ACEOF |
| 6527 | #define GDB_DATADIR_RELOCATABLE $value |
| 6528 | _ACEOF |
| 6529 | |
| 6530 | |
| 6531 | |
| 6532 | |
| 6533 | |
| 6534 | # Check whether --with-relocated-sources was given. |
| 6535 | if test "${with_relocated_sources+set}" = set; then : |
| 6536 | withval=$with_relocated_sources; reloc_srcdir="${withval}" |
| 6537 | |
| 6538 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
| 6539 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
| 6540 | ac_define_dir=`eval echo $reloc_srcdir` |
| 6541 | ac_define_dir=`eval echo $ac_define_dir` |
| 6542 | |
| 6543 | cat >>confdefs.h <<_ACEOF |
| 6544 | #define RELOC_SRCDIR "$ac_define_dir" |
| 6545 | _ACEOF |
| 6546 | |
| 6547 | |
| 6548 | |
| 6549 | fi |
| 6550 | |
| 6551 | |
| 6552 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5 |
| 6553 | $as_echo_n "checking for default auto-load directory... " >&6; } |
| 6554 | |
| 6555 | # Check whether --with-auto-load-dir was given. |
| 6556 | if test "${with_auto_load_dir+set}" = set; then : |
| 6557 | withval=$with_auto_load_dir; |
| 6558 | else |
| 6559 | with_auto_load_dir='$debugdir:$datadir/auto-load' |
| 6560 | fi |
| 6561 | |
| 6562 | escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'` |
| 6563 | |
| 6564 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
| 6565 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
| 6566 | ac_define_dir=`eval echo $escape_dir` |
| 6567 | ac_define_dir=`eval echo $ac_define_dir` |
| 6568 | |
| 6569 | cat >>confdefs.h <<_ACEOF |
| 6570 | #define AUTO_LOAD_DIR "$ac_define_dir" |
| 6571 | _ACEOF |
| 6572 | |
| 6573 | |
| 6574 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5 |
| 6575 | $as_echo "$with_auto_load_dir" >&6; } |
| 6576 | |
| 6577 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5 |
| 6578 | $as_echo_n "checking for default auto-load safe-path... " >&6; } |
| 6579 | |
| 6580 | # Check whether --with-auto-load-safe-path was given. |
| 6581 | if test "${with_auto_load_safe_path+set}" = set; then : |
| 6582 | withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then |
| 6583 | with_auto_load_safe_path="/" |
| 6584 | fi |
| 6585 | else |
| 6586 | with_auto_load_safe_path="$with_auto_load_dir" |
| 6587 | fi |
| 6588 | |
| 6589 | escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'` |
| 6590 | |
| 6591 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
| 6592 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
| 6593 | ac_define_dir=`eval echo $escape_dir` |
| 6594 | ac_define_dir=`eval echo $ac_define_dir` |
| 6595 | |
| 6596 | cat >>confdefs.h <<_ACEOF |
| 6597 | #define AUTO_LOAD_SAFE_PATH "$ac_define_dir" |
| 6598 | _ACEOF |
| 6599 | |
| 6600 | |
| 6601 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5 |
| 6602 | $as_echo "$with_auto_load_safe_path" >&6; } |
| 6603 | |
| 6604 | |
| 6605 | |
| 6606 | subdirs="$subdirs testsuite" |
| 6607 | |
| 6608 | |
| 6609 | # Check whether to support alternative target configurations |
| 6610 | # Check whether --enable-targets was given. |
| 6611 | if test "${enable_targets+set}" = set; then : |
| 6612 | enableval=$enable_targets; case "${enableval}" in |
| 6613 | yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5 |
| 6614 | ;; |
| 6615 | no) enable_targets= ;; |
| 6616 | *) enable_targets=$enableval ;; |
| 6617 | esac |
| 6618 | fi |
| 6619 | |
| 6620 | |
| 6621 | # Check whether to enable 64-bit support on 32-bit hosts |
| 6622 | # Check whether --enable-64-bit-bfd was given. |
| 6623 | if test "${enable_64_bit_bfd+set}" = set; then : |
| 6624 | enableval=$enable_64_bit_bfd; case "${enableval}" in |
| 6625 | yes) want64=true ;; |
| 6626 | no) want64=false ;; |
| 6627 | *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;; |
| 6628 | esac |
| 6629 | else |
| 6630 | want64=false |
| 6631 | fi |
| 6632 | |
| 6633 | # Provide defaults for some variables set by the per-host and per-target |
| 6634 | # configuration. |
| 6635 | gdb_host_obs=posix-hdep.o |
| 6636 | |
| 6637 | if test "${target}" = "${host}"; then |
| 6638 | gdb_native=yes |
| 6639 | else |
| 6640 | gdb_native=no |
| 6641 | fi |
| 6642 | |
| 6643 | . $srcdir/configure.host |
| 6644 | |
| 6645 | # Accumulate some settings from configure.tgt over all enabled targets |
| 6646 | |
| 6647 | TARGET_OBS= |
| 6648 | all_targets= |
| 6649 | HAVE_NATIVE_GCORE_TARGET= |
| 6650 | |
| 6651 | for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'` |
| 6652 | do |
| 6653 | if test "$targ_alias" = "all"; then |
| 6654 | all_targets=true |
| 6655 | else |
| 6656 | # Canonicalize the secondary target names. |
| 6657 | result=`$ac_config_sub $targ_alias 2>/dev/null` |
| 6658 | if test -n "$result"; then |
| 6659 | targ=$result |
| 6660 | else |
| 6661 | targ=$targ_alias |
| 6662 | fi |
| 6663 | |
| 6664 | . ${srcdir}/configure.tgt |
| 6665 | |
| 6666 | if test -z "${gdb_target_obs}"; then : |
| 6667 | as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5 |
| 6668 | fi |
| 6669 | |
| 6670 | # Target-specific object files |
| 6671 | for i in ${gdb_target_obs}; do |
| 6672 | case " $TARGET_OBS " in |
| 6673 | *" ${i} "*) ;; |
| 6674 | *) |
| 6675 | TARGET_OBS="$TARGET_OBS ${i}" |
| 6676 | ;; |
| 6677 | esac |
| 6678 | done |
| 6679 | |
| 6680 | # Check whether this target needs 64-bit CORE_ADDR |
| 6681 | if test x${want64} = xfalse; then |
| 6682 | . ${srcdir}/../bfd/config.bfd |
| 6683 | fi |
| 6684 | |
| 6685 | # Check whether this target is native and supports gcore. |
| 6686 | if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \ |
| 6687 | && $gdb_have_gcore; then |
| 6688 | HAVE_NATIVE_GCORE_TARGET=1 |
| 6689 | fi |
| 6690 | fi |
| 6691 | done |
| 6692 | |
| 6693 | if test x${all_targets} = xtrue; then |
| 6694 | |
| 6695 | # We want all 64-bit targets if we either: |
| 6696 | # - run on a 64-bit host or |
| 6697 | # - already require 64-bit support for some other target or |
| 6698 | # - the --enable-64-bit-bfd option was supplied |
| 6699 | # Otherwise we only support all 32-bit targets. |
| 6700 | # |
| 6701 | # NOTE: This test must be in sync with the corresponding |
| 6702 | # tests in BFD! |
| 6703 | |
| 6704 | if test x${want64} = xfalse; then |
| 6705 | # The cast to long int works around a bug in the HP C Compiler |
| 6706 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 6707 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 6708 | # This bug is HP SR number 8606223364. |
| 6709 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5 |
| 6710 | $as_echo_n "checking size of long... " >&6; } |
| 6711 | if ${ac_cv_sizeof_long+:} false; then : |
| 6712 | $as_echo_n "(cached) " >&6 |
| 6713 | else |
| 6714 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then : |
| 6715 | |
| 6716 | else |
| 6717 | if test "$ac_cv_type_long" = yes; then |
| 6718 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 6719 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 6720 | as_fn_error 77 "cannot compute sizeof (long) |
| 6721 | See \`config.log' for more details" "$LINENO" 5; } |
| 6722 | else |
| 6723 | ac_cv_sizeof_long=0 |
| 6724 | fi |
| 6725 | fi |
| 6726 | |
| 6727 | fi |
| 6728 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5 |
| 6729 | $as_echo "$ac_cv_sizeof_long" >&6; } |
| 6730 | |
| 6731 | |
| 6732 | |
| 6733 | cat >>confdefs.h <<_ACEOF |
| 6734 | #define SIZEOF_LONG $ac_cv_sizeof_long |
| 6735 | _ACEOF |
| 6736 | |
| 6737 | |
| 6738 | if test "x${ac_cv_sizeof_long}" = "x8"; then |
| 6739 | want64=true |
| 6740 | fi |
| 6741 | fi |
| 6742 | if test x${want64} = xtrue; then |
| 6743 | TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)' |
| 6744 | else |
| 6745 | TARGET_OBS='$(ALL_TARGET_OBS)' |
| 6746 | fi |
| 6747 | fi |
| 6748 | |
| 6749 | |
| 6750 | |
| 6751 | |
| 6752 | # For other settings, only the main target counts. |
| 6753 | gdb_sim= |
| 6754 | gdb_osabi= |
| 6755 | targ=$target; . ${srcdir}/configure.tgt |
| 6756 | |
| 6757 | # Fetch the default architecture and default target vector from BFD. |
| 6758 | targ=$target; . $srcdir/../bfd/config.bfd |
| 6759 | |
| 6760 | # We only want the first architecture, so strip off the others if |
| 6761 | # there is more than one. |
| 6762 | targ_archs=`echo $targ_archs | sed 's/ .*//'` |
| 6763 | |
| 6764 | if test "x$targ_archs" != x; then |
| 6765 | |
| 6766 | cat >>confdefs.h <<_ACEOF |
| 6767 | #define DEFAULT_BFD_ARCH $targ_archs |
| 6768 | _ACEOF |
| 6769 | |
| 6770 | fi |
| 6771 | if test "x$targ_defvec" != x; then |
| 6772 | |
| 6773 | cat >>confdefs.h <<_ACEOF |
| 6774 | #define DEFAULT_BFD_VEC $targ_defvec |
| 6775 | _ACEOF |
| 6776 | |
| 6777 | fi |
| 6778 | |
| 6779 | # Enable MI. |
| 6780 | # Check whether --enable-gdbmi was given. |
| 6781 | if test "${enable_gdbmi+set}" = set; then : |
| 6782 | enableval=$enable_gdbmi; case $enableval in |
| 6783 | yes | no) |
| 6784 | ;; |
| 6785 | *) |
| 6786 | as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;; |
| 6787 | esac |
| 6788 | else |
| 6789 | enable_gdbmi=yes |
| 6790 | fi |
| 6791 | |
| 6792 | if test x"$enable_gdbmi" = xyes; then |
| 6793 | if test -d "$srcdir/mi"; then |
| 6794 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)" |
| 6795 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)" |
| 6796 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)" |
| 6797 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)" |
| 6798 | fi |
| 6799 | fi |
| 6800 | |
| 6801 | # Enable TUI. |
| 6802 | # Check whether --enable-tui was given. |
| 6803 | if test "${enable_tui+set}" = set; then : |
| 6804 | enableval=$enable_tui; case $enableval in |
| 6805 | yes | no | auto) |
| 6806 | ;; |
| 6807 | *) |
| 6808 | as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;; |
| 6809 | esac |
| 6810 | else |
| 6811 | enable_tui=auto |
| 6812 | fi |
| 6813 | |
| 6814 | |
| 6815 | # Enable gdbtk. |
| 6816 | # Check whether --enable-gdbtk was given. |
| 6817 | if test "${enable_gdbtk+set}" = set; then : |
| 6818 | enableval=$enable_gdbtk; case $enableval in |
| 6819 | yes | no) |
| 6820 | ;; |
| 6821 | *) |
| 6822 | as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;; |
| 6823 | esac |
| 6824 | else |
| 6825 | if test -d "$srcdir/gdbtk"; then |
| 6826 | enable_gdbtk=yes |
| 6827 | else |
| 6828 | enable_gdbtk=no |
| 6829 | fi |
| 6830 | fi |
| 6831 | |
| 6832 | # We unconditionally disable gdbtk tests on selected platforms. |
| 6833 | case $host_os in |
| 6834 | go32* | windows*) |
| 6835 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5 |
| 6836 | $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;} |
| 6837 | enable_gdbtk=no ;; |
| 6838 | esac |
| 6839 | |
| 6840 | # Handle optional debuginfod support |
| 6841 | |
| 6842 | # Enable debuginfod |
| 6843 | |
| 6844 | # Check whether --with-debuginfod was given. |
| 6845 | if test "${with_debuginfod+set}" = set; then : |
| 6846 | withval=$with_debuginfod; |
| 6847 | else |
| 6848 | with_debuginfod=auto |
| 6849 | fi |
| 6850 | |
| 6851 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use debuginfod" >&5 |
| 6852 | $as_echo_n "checking whether to use debuginfod... " >&6; } |
| 6853 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_debuginfod" >&5 |
| 6854 | $as_echo "$with_debuginfod" >&6; } |
| 6855 | |
| 6856 | if test "${with_debuginfod}" = no; then |
| 6857 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod support disabled; some features may be unavailable." >&5 |
| 6858 | $as_echo "$as_me: WARNING: debuginfod support disabled; some features may be unavailable." >&2;} |
| 6859 | else |
| 6860 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for debuginfod_begin in -ldebuginfod" >&5 |
| 6861 | $as_echo_n "checking for debuginfod_begin in -ldebuginfod... " >&6; } |
| 6862 | if ${ac_cv_lib_debuginfod_debuginfod_begin+:} false; then : |
| 6863 | $as_echo_n "(cached) " >&6 |
| 6864 | else |
| 6865 | ac_check_lib_save_LIBS=$LIBS |
| 6866 | LIBS="-ldebuginfod $LIBS" |
| 6867 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 6868 | /* end confdefs.h. */ |
| 6869 | |
| 6870 | /* Override any GCC internal prototype to avoid an error. |
| 6871 | Use char because int might match the return type of a GCC |
| 6872 | builtin and then its argument prototype would still apply. */ |
| 6873 | #ifdef __cplusplus |
| 6874 | extern "C" |
| 6875 | #endif |
| 6876 | char debuginfod_begin (); |
| 6877 | int |
| 6878 | main () |
| 6879 | { |
| 6880 | return debuginfod_begin (); |
| 6881 | ; |
| 6882 | return 0; |
| 6883 | } |
| 6884 | _ACEOF |
| 6885 | if ac_fn_c_try_link "$LINENO"; then : |
| 6886 | ac_cv_lib_debuginfod_debuginfod_begin=yes |
| 6887 | else |
| 6888 | ac_cv_lib_debuginfod_debuginfod_begin=no |
| 6889 | fi |
| 6890 | rm -f core conftest.err conftest.$ac_objext \ |
| 6891 | conftest$ac_exeext conftest.$ac_ext |
| 6892 | LIBS=$ac_check_lib_save_LIBS |
| 6893 | fi |
| 6894 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_debuginfod_debuginfod_begin" >&5 |
| 6895 | $as_echo "$ac_cv_lib_debuginfod_debuginfod_begin" >&6; } |
| 6896 | if test "x$ac_cv_lib_debuginfod_debuginfod_begin" = xyes; then : |
| 6897 | have_debuginfod_lib=yes |
| 6898 | fi |
| 6899 | |
| 6900 | ac_fn_c_check_decl "$LINENO" "debuginfod_begin" "ac_cv_have_decl_debuginfod_begin" "#include <elfutils/debuginfod.h> |
| 6901 | " |
| 6902 | if test "x$ac_cv_have_decl_debuginfod_begin" = xyes; then : |
| 6903 | have_debuginfod_h=yes |
| 6904 | fi |
| 6905 | |
| 6906 | if test "x$have_debuginfod_lib" = "xyes" -a \ |
| 6907 | "x$have_debuginfod_h" = "xyes"; then |
| 6908 | |
| 6909 | $as_echo "#define HAVE_LIBDEBUGINFOD 1" >>confdefs.h |
| 6910 | |
| 6911 | LIBDEBUGINFOD="-ldebuginfod" |
| 6912 | |
| 6913 | else |
| 6914 | |
| 6915 | if test "$with_debuginfod" = yes; then |
| 6916 | as_fn_error $? "debuginfod is missing or unusable" "$LINENO" 5 |
| 6917 | else |
| 6918 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: debuginfod is missing or unusable; some features may be unavailable." >&5 |
| 6919 | $as_echo "$as_me: WARNING: debuginfod is missing or unusable; some features may be unavailable." >&2;} |
| 6920 | fi |
| 6921 | fi |
| 6922 | fi |
| 6923 | |
| 6924 | |
| 6925 | # Libunwind support for ia64. |
| 6926 | |
| 6927 | # Check whether --with-libunwind-ia64 was given. |
| 6928 | if test "${with_libunwind_ia64+set}" = set; then : |
| 6929 | withval=$with_libunwind_ia64; |
| 6930 | else |
| 6931 | with_libunwind_ia64=auto |
| 6932 | fi |
| 6933 | |
| 6934 | |
| 6935 | # Backward compatibility option. |
| 6936 | if test "${with_libunwind+set}" = set; then |
| 6937 | if test x"$with_libunwind_ia64" != xauto; then |
| 6938 | as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5 |
| 6939 | fi |
| 6940 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5 |
| 6941 | $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;} |
| 6942 | with_libunwind_ia64="$with_libunwind" |
| 6943 | fi |
| 6944 | |
| 6945 | case "$with_libunwind_ia64" in |
| 6946 | yes | no) |
| 6947 | ;; |
| 6948 | auto) |
| 6949 | for ac_header in libunwind-ia64.h |
| 6950 | do : |
| 6951 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
| 6952 | if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then : |
| 6953 | cat >>confdefs.h <<_ACEOF |
| 6954 | #define HAVE_LIBUNWIND_IA64_H 1 |
| 6955 | _ACEOF |
| 6956 | |
| 6957 | fi |
| 6958 | |
| 6959 | done |
| 6960 | |
| 6961 | with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h |
| 6962 | ;; |
| 6963 | *) |
| 6964 | as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5 |
| 6965 | ;; |
| 6966 | esac |
| 6967 | |
| 6968 | if test x"$with_libunwind_ia64" = xyes; then |
| 6969 | for ac_header in libunwind-ia64.h |
| 6970 | do : |
| 6971 | ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default" |
| 6972 | if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then : |
| 6973 | cat >>confdefs.h <<_ACEOF |
| 6974 | #define HAVE_LIBUNWIND_IA64_H 1 |
| 6975 | _ACEOF |
| 6976 | |
| 6977 | fi |
| 6978 | |
| 6979 | done |
| 6980 | |
| 6981 | if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then |
| 6982 | as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5 |
| 6983 | fi |
| 6984 | CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o" |
| 6985 | CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o" |
| 6986 | CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c" |
| 6987 | fi |
| 6988 | |
| 6989 | opt_curses=no |
| 6990 | |
| 6991 | # Check whether --with-curses was given. |
| 6992 | if test "${with_curses+set}" = set; then : |
| 6993 | withval=$with_curses; opt_curses=$withval |
| 6994 | fi |
| 6995 | |
| 6996 | |
| 6997 | prefer_curses=no |
| 6998 | if test "$opt_curses" = "yes"; then |
| 6999 | prefer_curses=yes |
| 7000 | fi |
| 7001 | |
| 7002 | # Profiling support. |
| 7003 | # Check whether --enable-profiling was given. |
| 7004 | if test "${enable_profiling+set}" = set; then : |
| 7005 | enableval=$enable_profiling; case $enableval in |
| 7006 | yes | no) |
| 7007 | ;; |
| 7008 | *) |
| 7009 | as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;; |
| 7010 | esac |
| 7011 | else |
| 7012 | enable_profiling=no |
| 7013 | fi |
| 7014 | |
| 7015 | |
| 7016 | for ac_func in monstartup _mcleanup |
| 7017 | do : |
| 7018 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
| 7019 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
| 7020 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
| 7021 | cat >>confdefs.h <<_ACEOF |
| 7022 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
| 7023 | _ACEOF |
| 7024 | |
| 7025 | fi |
| 7026 | done |
| 7027 | |
| 7028 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5 |
| 7029 | $as_echo_n "checking for _etext... " >&6; } |
| 7030 | if ${ac_cv_var__etext+:} false; then : |
| 7031 | $as_echo_n "(cached) " >&6 |
| 7032 | else |
| 7033 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7034 | /* end confdefs.h. */ |
| 7035 | #include <stdlib.h> |
| 7036 | extern char _etext; |
| 7037 | |
| 7038 | int |
| 7039 | main () |
| 7040 | { |
| 7041 | free (&_etext); |
| 7042 | ; |
| 7043 | return 0; |
| 7044 | } |
| 7045 | _ACEOF |
| 7046 | if ac_fn_c_try_link "$LINENO"; then : |
| 7047 | ac_cv_var__etext=yes |
| 7048 | else |
| 7049 | ac_cv_var__etext=no |
| 7050 | fi |
| 7051 | rm -f core conftest.err conftest.$ac_objext \ |
| 7052 | conftest$ac_exeext conftest.$ac_ext |
| 7053 | fi |
| 7054 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5 |
| 7055 | $as_echo "$ac_cv_var__etext" >&6; } |
| 7056 | if test "$ac_cv_var__etext" = yes; then |
| 7057 | |
| 7058 | $as_echo "#define HAVE__ETEXT 1" >>confdefs.h |
| 7059 | |
| 7060 | fi |
| 7061 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5 |
| 7062 | $as_echo_n "checking for etext... " >&6; } |
| 7063 | if ${ac_cv_var_etext+:} false; then : |
| 7064 | $as_echo_n "(cached) " >&6 |
| 7065 | else |
| 7066 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7067 | /* end confdefs.h. */ |
| 7068 | #include <stdlib.h> |
| 7069 | extern char etext; |
| 7070 | |
| 7071 | int |
| 7072 | main () |
| 7073 | { |
| 7074 | free (&etext); |
| 7075 | ; |
| 7076 | return 0; |
| 7077 | } |
| 7078 | _ACEOF |
| 7079 | if ac_fn_c_try_link "$LINENO"; then : |
| 7080 | ac_cv_var_etext=yes |
| 7081 | else |
| 7082 | ac_cv_var_etext=no |
| 7083 | fi |
| 7084 | rm -f core conftest.err conftest.$ac_objext \ |
| 7085 | conftest$ac_exeext conftest.$ac_ext |
| 7086 | fi |
| 7087 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5 |
| 7088 | $as_echo "$ac_cv_var_etext" >&6; } |
| 7089 | if test "$ac_cv_var_etext" = yes; then |
| 7090 | |
| 7091 | $as_echo "#define HAVE_ETEXT 1" >>confdefs.h |
| 7092 | |
| 7093 | fi |
| 7094 | if test "$enable_profiling" = yes ; then |
| 7095 | if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then |
| 7096 | as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5 |
| 7097 | fi |
| 7098 | PROFILE_CFLAGS=-pg |
| 7099 | OLD_CFLAGS="$CFLAGS" |
| 7100 | CFLAGS="$CFLAGS $PROFILE_CFLAGS" |
| 7101 | |
| 7102 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5 |
| 7103 | $as_echo_n "checking whether $CC supports -pg... " >&6; } |
| 7104 | if ${ac_cv_cc_supports_pg+:} false; then : |
| 7105 | $as_echo_n "(cached) " >&6 |
| 7106 | else |
| 7107 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7108 | /* end confdefs.h. */ |
| 7109 | |
| 7110 | int |
| 7111 | main () |
| 7112 | { |
| 7113 | int x; |
| 7114 | ; |
| 7115 | return 0; |
| 7116 | } |
| 7117 | _ACEOF |
| 7118 | if ac_fn_c_try_compile "$LINENO"; then : |
| 7119 | ac_cv_cc_supports_pg=yes |
| 7120 | else |
| 7121 | ac_cv_cc_supports_pg=no |
| 7122 | fi |
| 7123 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 7124 | fi |
| 7125 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5 |
| 7126 | $as_echo "$ac_cv_cc_supports_pg" >&6; } |
| 7127 | |
| 7128 | if test "$ac_cv_cc_supports_pg" = no; then |
| 7129 | as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5 |
| 7130 | fi |
| 7131 | |
| 7132 | CFLAGS="$OLD_CFLAGS" |
| 7133 | fi |
| 7134 | |
| 7135 | CODESIGN_CERT= |
| 7136 | # Check whether --enable-codesign was given. |
| 7137 | if test "${enable_codesign+set}" = set; then : |
| 7138 | enableval=$enable_codesign; CODESIGN_CERT=$enableval |
| 7139 | fi |
| 7140 | |
| 7141 | |
| 7142 | |
| 7143 | |
| 7144 | |
| 7145 | # Check whether --with-pkgversion was given. |
| 7146 | if test "${with_pkgversion+set}" = set; then : |
| 7147 | withval=$with_pkgversion; case "$withval" in |
| 7148 | yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;; |
| 7149 | no) PKGVERSION= ;; |
| 7150 | *) PKGVERSION="($withval) " ;; |
| 7151 | esac |
| 7152 | else |
| 7153 | PKGVERSION="(GDB) " |
| 7154 | |
| 7155 | fi |
| 7156 | |
| 7157 | |
| 7158 | |
| 7159 | |
| 7160 | |
| 7161 | # Check whether --with-bugurl was given. |
| 7162 | if test "${with_bugurl+set}" = set; then : |
| 7163 | withval=$with_bugurl; case "$withval" in |
| 7164 | yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;; |
| 7165 | no) BUGURL= |
| 7166 | ;; |
| 7167 | *) BUGURL="$withval" |
| 7168 | ;; |
| 7169 | esac |
| 7170 | else |
| 7171 | BUGURL="http://www.gnu.org/software/gdb/bugs/" |
| 7172 | |
| 7173 | fi |
| 7174 | |
| 7175 | case ${BUGURL} in |
| 7176 | "") |
| 7177 | REPORT_BUGS_TO= |
| 7178 | REPORT_BUGS_TEXI= |
| 7179 | ;; |
| 7180 | *) |
| 7181 | REPORT_BUGS_TO="<$BUGURL>" |
| 7182 | REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`} |
| 7183 | ;; |
| 7184 | esac; |
| 7185 | |
| 7186 | |
| 7187 | |
| 7188 | |
| 7189 | cat >>confdefs.h <<_ACEOF |
| 7190 | #define PKGVERSION "$PKGVERSION" |
| 7191 | _ACEOF |
| 7192 | |
| 7193 | |
| 7194 | cat >>confdefs.h <<_ACEOF |
| 7195 | #define REPORT_BUGS_TO "$REPORT_BUGS_TO" |
| 7196 | _ACEOF |
| 7197 | |
| 7198 | |
| 7199 | # --------------------- # |
| 7200 | # Checks for programs. # |
| 7201 | # --------------------- # |
| 7202 | |
| 7203 | for ac_prog in gawk mawk nawk awk |
| 7204 | do |
| 7205 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 7206 | set dummy $ac_prog; ac_word=$2 |
| 7207 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 7208 | $as_echo_n "checking for $ac_word... " >&6; } |
| 7209 | if ${ac_cv_prog_AWK+:} false; then : |
| 7210 | $as_echo_n "(cached) " >&6 |
| 7211 | else |
| 7212 | if test -n "$AWK"; then |
| 7213 | ac_cv_prog_AWK="$AWK" # Let the user override the test. |
| 7214 | else |
| 7215 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 7216 | for as_dir in $PATH |
| 7217 | do |
| 7218 | IFS=$as_save_IFS |
| 7219 | test -z "$as_dir" && as_dir=. |
| 7220 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 7221 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 7222 | ac_cv_prog_AWK="$ac_prog" |
| 7223 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 7224 | break 2 |
| 7225 | fi |
| 7226 | done |
| 7227 | done |
| 7228 | IFS=$as_save_IFS |
| 7229 | |
| 7230 | fi |
| 7231 | fi |
| 7232 | AWK=$ac_cv_prog_AWK |
| 7233 | if test -n "$AWK"; then |
| 7234 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 |
| 7235 | $as_echo "$AWK" >&6; } |
| 7236 | else |
| 7237 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 7238 | $as_echo "no" >&6; } |
| 7239 | fi |
| 7240 | |
| 7241 | |
| 7242 | test -n "$AWK" && break |
| 7243 | done |
| 7244 | |
| 7245 | # Find a good install program. We prefer a C program (faster), |
| 7246 | # so one script is as good as another. But avoid the broken or |
| 7247 | # incompatible versions: |
| 7248 | # SysV /etc/install, /usr/sbin/install |
| 7249 | # SunOS /usr/etc/install |
| 7250 | # IRIX /sbin/install |
| 7251 | # AIX /bin/install |
| 7252 | # AmigaOS /C/install, which installs bootblocks on floppy discs |
| 7253 | # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag |
| 7254 | # AFS /usr/afsws/bin/install, which mishandles nonexistent args |
| 7255 | # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" |
| 7256 | # OS/2's system install, which has a completely different semantic |
| 7257 | # ./install, which can be erroneously created by make from ./install.sh. |
| 7258 | # Reject install programs that cannot install multiple files. |
| 7259 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 |
| 7260 | $as_echo_n "checking for a BSD-compatible install... " >&6; } |
| 7261 | if test -z "$INSTALL"; then |
| 7262 | if ${ac_cv_path_install+:} false; then : |
| 7263 | $as_echo_n "(cached) " >&6 |
| 7264 | else |
| 7265 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 7266 | for as_dir in $PATH |
| 7267 | do |
| 7268 | IFS=$as_save_IFS |
| 7269 | test -z "$as_dir" && as_dir=. |
| 7270 | # Account for people who put trailing slashes in PATH elements. |
| 7271 | case $as_dir/ in #(( |
| 7272 | ./ | .// | /[cC]/* | \ |
| 7273 | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ |
| 7274 | ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ |
| 7275 | /usr/ucb/* ) ;; |
| 7276 | *) |
| 7277 | # OSF1 and SCO ODT 3.0 have their own names for install. |
| 7278 | # Don't use installbsd from OSF since it installs stuff as root |
| 7279 | # by default. |
| 7280 | for ac_prog in ginstall scoinst install; do |
| 7281 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 7282 | if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then |
| 7283 | if test $ac_prog = install && |
| 7284 | grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then |
| 7285 | # AIX install. It has an incompatible calling convention. |
| 7286 | : |
| 7287 | elif test $ac_prog = install && |
| 7288 | grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then |
| 7289 | # program-specific install script used by HP pwplus--don't use. |
| 7290 | : |
| 7291 | else |
| 7292 | rm -rf conftest.one conftest.two conftest.dir |
| 7293 | echo one > conftest.one |
| 7294 | echo two > conftest.two |
| 7295 | mkdir conftest.dir |
| 7296 | if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && |
| 7297 | test -s conftest.one && test -s conftest.two && |
| 7298 | test -s conftest.dir/conftest.one && |
| 7299 | test -s conftest.dir/conftest.two |
| 7300 | then |
| 7301 | ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" |
| 7302 | break 3 |
| 7303 | fi |
| 7304 | fi |
| 7305 | fi |
| 7306 | done |
| 7307 | done |
| 7308 | ;; |
| 7309 | esac |
| 7310 | |
| 7311 | done |
| 7312 | IFS=$as_save_IFS |
| 7313 | |
| 7314 | rm -rf conftest.one conftest.two conftest.dir |
| 7315 | |
| 7316 | fi |
| 7317 | if test "${ac_cv_path_install+set}" = set; then |
| 7318 | INSTALL=$ac_cv_path_install |
| 7319 | else |
| 7320 | # As a last resort, use the slow shell script. Don't cache a |
| 7321 | # value for INSTALL within a source directory, because that will |
| 7322 | # break other packages using the cache if that directory is |
| 7323 | # removed, or if the value is a relative name. |
| 7324 | INSTALL=$ac_install_sh |
| 7325 | fi |
| 7326 | fi |
| 7327 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 |
| 7328 | $as_echo "$INSTALL" >&6; } |
| 7329 | |
| 7330 | # Use test -z because SunOS4 sh mishandles braces in ${var-val}. |
| 7331 | # It thinks the first close brace ends the variable substitution. |
| 7332 | test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' |
| 7333 | |
| 7334 | test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' |
| 7335 | |
| 7336 | test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' |
| 7337 | |
| 7338 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 |
| 7339 | $as_echo_n "checking whether ln -s works... " >&6; } |
| 7340 | LN_S=$as_ln_s |
| 7341 | if test "$LN_S" = "ln -s"; then |
| 7342 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 7343 | $as_echo "yes" >&6; } |
| 7344 | else |
| 7345 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 |
| 7346 | $as_echo "no, using $LN_S" >&6; } |
| 7347 | fi |
| 7348 | |
| 7349 | if test -n "$ac_tool_prefix"; then |
| 7350 | # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. |
| 7351 | set dummy ${ac_tool_prefix}ranlib; ac_word=$2 |
| 7352 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 7353 | $as_echo_n "checking for $ac_word... " >&6; } |
| 7354 | if ${ac_cv_prog_RANLIB+:} false; then : |
| 7355 | $as_echo_n "(cached) " >&6 |
| 7356 | else |
| 7357 | if test -n "$RANLIB"; then |
| 7358 | ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. |
| 7359 | else |
| 7360 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 7361 | for as_dir in $PATH |
| 7362 | do |
| 7363 | IFS=$as_save_IFS |
| 7364 | test -z "$as_dir" && as_dir=. |
| 7365 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 7366 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 7367 | ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" |
| 7368 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 7369 | break 2 |
| 7370 | fi |
| 7371 | done |
| 7372 | done |
| 7373 | IFS=$as_save_IFS |
| 7374 | |
| 7375 | fi |
| 7376 | fi |
| 7377 | RANLIB=$ac_cv_prog_RANLIB |
| 7378 | if test -n "$RANLIB"; then |
| 7379 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 |
| 7380 | $as_echo "$RANLIB" >&6; } |
| 7381 | else |
| 7382 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 7383 | $as_echo "no" >&6; } |
| 7384 | fi |
| 7385 | |
| 7386 | |
| 7387 | fi |
| 7388 | if test -z "$ac_cv_prog_RANLIB"; then |
| 7389 | ac_ct_RANLIB=$RANLIB |
| 7390 | # Extract the first word of "ranlib", so it can be a program name with args. |
| 7391 | set dummy ranlib; ac_word=$2 |
| 7392 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 7393 | $as_echo_n "checking for $ac_word... " >&6; } |
| 7394 | if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : |
| 7395 | $as_echo_n "(cached) " >&6 |
| 7396 | else |
| 7397 | if test -n "$ac_ct_RANLIB"; then |
| 7398 | ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. |
| 7399 | else |
| 7400 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 7401 | for as_dir in $PATH |
| 7402 | do |
| 7403 | IFS=$as_save_IFS |
| 7404 | test -z "$as_dir" && as_dir=. |
| 7405 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 7406 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 7407 | ac_cv_prog_ac_ct_RANLIB="ranlib" |
| 7408 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 7409 | break 2 |
| 7410 | fi |
| 7411 | done |
| 7412 | done |
| 7413 | IFS=$as_save_IFS |
| 7414 | |
| 7415 | fi |
| 7416 | fi |
| 7417 | ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB |
| 7418 | if test -n "$ac_ct_RANLIB"; then |
| 7419 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 |
| 7420 | $as_echo "$ac_ct_RANLIB" >&6; } |
| 7421 | else |
| 7422 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 7423 | $as_echo "no" >&6; } |
| 7424 | fi |
| 7425 | |
| 7426 | if test "x$ac_ct_RANLIB" = x; then |
| 7427 | RANLIB=":" |
| 7428 | else |
| 7429 | case $cross_compiling:$ac_tool_warned in |
| 7430 | yes:) |
| 7431 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 7432 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 7433 | ac_tool_warned=yes ;; |
| 7434 | esac |
| 7435 | RANLIB=$ac_ct_RANLIB |
| 7436 | fi |
| 7437 | else |
| 7438 | RANLIB="$ac_cv_prog_RANLIB" |
| 7439 | fi |
| 7440 | |
| 7441 | for ac_prog in 'bison -y' byacc |
| 7442 | do |
| 7443 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 7444 | set dummy $ac_prog; ac_word=$2 |
| 7445 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 7446 | $as_echo_n "checking for $ac_word... " >&6; } |
| 7447 | if ${ac_cv_prog_YACC+:} false; then : |
| 7448 | $as_echo_n "(cached) " >&6 |
| 7449 | else |
| 7450 | if test -n "$YACC"; then |
| 7451 | ac_cv_prog_YACC="$YACC" # Let the user override the test. |
| 7452 | else |
| 7453 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 7454 | for as_dir in $PATH |
| 7455 | do |
| 7456 | IFS=$as_save_IFS |
| 7457 | test -z "$as_dir" && as_dir=. |
| 7458 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 7459 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 7460 | ac_cv_prog_YACC="$ac_prog" |
| 7461 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 7462 | break 2 |
| 7463 | fi |
| 7464 | done |
| 7465 | done |
| 7466 | IFS=$as_save_IFS |
| 7467 | |
| 7468 | fi |
| 7469 | fi |
| 7470 | YACC=$ac_cv_prog_YACC |
| 7471 | if test -n "$YACC"; then |
| 7472 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5 |
| 7473 | $as_echo "$YACC" >&6; } |
| 7474 | else |
| 7475 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 7476 | $as_echo "no" >&6; } |
| 7477 | fi |
| 7478 | |
| 7479 | |
| 7480 | test -n "$YACC" && break |
| 7481 | done |
| 7482 | test -n "$YACC" || YACC="yacc" |
| 7483 | |
| 7484 | |
| 7485 | if test -n "$ac_tool_prefix"; then |
| 7486 | # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args. |
| 7487 | set dummy ${ac_tool_prefix}ar; ac_word=$2 |
| 7488 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 7489 | $as_echo_n "checking for $ac_word... " >&6; } |
| 7490 | if ${ac_cv_prog_AR+:} false; then : |
| 7491 | $as_echo_n "(cached) " >&6 |
| 7492 | else |
| 7493 | if test -n "$AR"; then |
| 7494 | ac_cv_prog_AR="$AR" # Let the user override the test. |
| 7495 | else |
| 7496 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 7497 | for as_dir in $PATH |
| 7498 | do |
| 7499 | IFS=$as_save_IFS |
| 7500 | test -z "$as_dir" && as_dir=. |
| 7501 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 7502 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 7503 | ac_cv_prog_AR="${ac_tool_prefix}ar" |
| 7504 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 7505 | break 2 |
| 7506 | fi |
| 7507 | done |
| 7508 | done |
| 7509 | IFS=$as_save_IFS |
| 7510 | |
| 7511 | fi |
| 7512 | fi |
| 7513 | AR=$ac_cv_prog_AR |
| 7514 | if test -n "$AR"; then |
| 7515 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 |
| 7516 | $as_echo "$AR" >&6; } |
| 7517 | else |
| 7518 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 7519 | $as_echo "no" >&6; } |
| 7520 | fi |
| 7521 | |
| 7522 | |
| 7523 | fi |
| 7524 | if test -z "$ac_cv_prog_AR"; then |
| 7525 | ac_ct_AR=$AR |
| 7526 | # Extract the first word of "ar", so it can be a program name with args. |
| 7527 | set dummy ar; ac_word=$2 |
| 7528 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 7529 | $as_echo_n "checking for $ac_word... " >&6; } |
| 7530 | if ${ac_cv_prog_ac_ct_AR+:} false; then : |
| 7531 | $as_echo_n "(cached) " >&6 |
| 7532 | else |
| 7533 | if test -n "$ac_ct_AR"; then |
| 7534 | ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. |
| 7535 | else |
| 7536 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 7537 | for as_dir in $PATH |
| 7538 | do |
| 7539 | IFS=$as_save_IFS |
| 7540 | test -z "$as_dir" && as_dir=. |
| 7541 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 7542 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 7543 | ac_cv_prog_ac_ct_AR="ar" |
| 7544 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 7545 | break 2 |
| 7546 | fi |
| 7547 | done |
| 7548 | done |
| 7549 | IFS=$as_save_IFS |
| 7550 | |
| 7551 | fi |
| 7552 | fi |
| 7553 | ac_ct_AR=$ac_cv_prog_ac_ct_AR |
| 7554 | if test -n "$ac_ct_AR"; then |
| 7555 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 |
| 7556 | $as_echo "$ac_ct_AR" >&6; } |
| 7557 | else |
| 7558 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 7559 | $as_echo "no" >&6; } |
| 7560 | fi |
| 7561 | |
| 7562 | if test "x$ac_ct_AR" = x; then |
| 7563 | AR="" |
| 7564 | else |
| 7565 | case $cross_compiling:$ac_tool_warned in |
| 7566 | yes:) |
| 7567 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 7568 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 7569 | ac_tool_warned=yes ;; |
| 7570 | esac |
| 7571 | AR=$ac_ct_AR |
| 7572 | fi |
| 7573 | else |
| 7574 | AR="$ac_cv_prog_AR" |
| 7575 | fi |
| 7576 | |
| 7577 | if test -n "$ac_tool_prefix"; then |
| 7578 | # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. |
| 7579 | set dummy ${ac_tool_prefix}dlltool; ac_word=$2 |
| 7580 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 7581 | $as_echo_n "checking for $ac_word... " >&6; } |
| 7582 | if ${ac_cv_prog_DLLTOOL+:} false; then : |
| 7583 | $as_echo_n "(cached) " >&6 |
| 7584 | else |
| 7585 | if test -n "$DLLTOOL"; then |
| 7586 | ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. |
| 7587 | else |
| 7588 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 7589 | for as_dir in $PATH |
| 7590 | do |
| 7591 | IFS=$as_save_IFS |
| 7592 | test -z "$as_dir" && as_dir=. |
| 7593 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 7594 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 7595 | ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" |
| 7596 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 7597 | break 2 |
| 7598 | fi |
| 7599 | done |
| 7600 | done |
| 7601 | IFS=$as_save_IFS |
| 7602 | |
| 7603 | fi |
| 7604 | fi |
| 7605 | DLLTOOL=$ac_cv_prog_DLLTOOL |
| 7606 | if test -n "$DLLTOOL"; then |
| 7607 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 |
| 7608 | $as_echo "$DLLTOOL" >&6; } |
| 7609 | else |
| 7610 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 7611 | $as_echo "no" >&6; } |
| 7612 | fi |
| 7613 | |
| 7614 | |
| 7615 | fi |
| 7616 | if test -z "$ac_cv_prog_DLLTOOL"; then |
| 7617 | ac_ct_DLLTOOL=$DLLTOOL |
| 7618 | # Extract the first word of "dlltool", so it can be a program name with args. |
| 7619 | set dummy dlltool; ac_word=$2 |
| 7620 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 7621 | $as_echo_n "checking for $ac_word... " >&6; } |
| 7622 | if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : |
| 7623 | $as_echo_n "(cached) " >&6 |
| 7624 | else |
| 7625 | if test -n "$ac_ct_DLLTOOL"; then |
| 7626 | ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. |
| 7627 | else |
| 7628 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 7629 | for as_dir in $PATH |
| 7630 | do |
| 7631 | IFS=$as_save_IFS |
| 7632 | test -z "$as_dir" && as_dir=. |
| 7633 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 7634 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 7635 | ac_cv_prog_ac_ct_DLLTOOL="dlltool" |
| 7636 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 7637 | break 2 |
| 7638 | fi |
| 7639 | done |
| 7640 | done |
| 7641 | IFS=$as_save_IFS |
| 7642 | |
| 7643 | fi |
| 7644 | fi |
| 7645 | ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL |
| 7646 | if test -n "$ac_ct_DLLTOOL"; then |
| 7647 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 |
| 7648 | $as_echo "$ac_ct_DLLTOOL" >&6; } |
| 7649 | else |
| 7650 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 7651 | $as_echo "no" >&6; } |
| 7652 | fi |
| 7653 | |
| 7654 | if test "x$ac_ct_DLLTOOL" = x; then |
| 7655 | DLLTOOL="" |
| 7656 | else |
| 7657 | case $cross_compiling:$ac_tool_warned in |
| 7658 | yes:) |
| 7659 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 7660 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 7661 | ac_tool_warned=yes ;; |
| 7662 | esac |
| 7663 | DLLTOOL=$ac_ct_DLLTOOL |
| 7664 | fi |
| 7665 | else |
| 7666 | DLLTOOL="$ac_cv_prog_DLLTOOL" |
| 7667 | fi |
| 7668 | |
| 7669 | if test -n "$ac_tool_prefix"; then |
| 7670 | # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args. |
| 7671 | set dummy ${ac_tool_prefix}windres; ac_word=$2 |
| 7672 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 7673 | $as_echo_n "checking for $ac_word... " >&6; } |
| 7674 | if ${ac_cv_prog_WINDRES+:} false; then : |
| 7675 | $as_echo_n "(cached) " >&6 |
| 7676 | else |
| 7677 | if test -n "$WINDRES"; then |
| 7678 | ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test. |
| 7679 | else |
| 7680 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 7681 | for as_dir in $PATH |
| 7682 | do |
| 7683 | IFS=$as_save_IFS |
| 7684 | test -z "$as_dir" && as_dir=. |
| 7685 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 7686 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 7687 | ac_cv_prog_WINDRES="${ac_tool_prefix}windres" |
| 7688 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 7689 | break 2 |
| 7690 | fi |
| 7691 | done |
| 7692 | done |
| 7693 | IFS=$as_save_IFS |
| 7694 | |
| 7695 | fi |
| 7696 | fi |
| 7697 | WINDRES=$ac_cv_prog_WINDRES |
| 7698 | if test -n "$WINDRES"; then |
| 7699 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5 |
| 7700 | $as_echo "$WINDRES" >&6; } |
| 7701 | else |
| 7702 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 7703 | $as_echo "no" >&6; } |
| 7704 | fi |
| 7705 | |
| 7706 | |
| 7707 | fi |
| 7708 | if test -z "$ac_cv_prog_WINDRES"; then |
| 7709 | ac_ct_WINDRES=$WINDRES |
| 7710 | # Extract the first word of "windres", so it can be a program name with args. |
| 7711 | set dummy windres; ac_word=$2 |
| 7712 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 7713 | $as_echo_n "checking for $ac_word... " >&6; } |
| 7714 | if ${ac_cv_prog_ac_ct_WINDRES+:} false; then : |
| 7715 | $as_echo_n "(cached) " >&6 |
| 7716 | else |
| 7717 | if test -n "$ac_ct_WINDRES"; then |
| 7718 | ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test. |
| 7719 | else |
| 7720 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 7721 | for as_dir in $PATH |
| 7722 | do |
| 7723 | IFS=$as_save_IFS |
| 7724 | test -z "$as_dir" && as_dir=. |
| 7725 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 7726 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 7727 | ac_cv_prog_ac_ct_WINDRES="windres" |
| 7728 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 7729 | break 2 |
| 7730 | fi |
| 7731 | done |
| 7732 | done |
| 7733 | IFS=$as_save_IFS |
| 7734 | |
| 7735 | fi |
| 7736 | fi |
| 7737 | ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES |
| 7738 | if test -n "$ac_ct_WINDRES"; then |
| 7739 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5 |
| 7740 | $as_echo "$ac_ct_WINDRES" >&6; } |
| 7741 | else |
| 7742 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 7743 | $as_echo "no" >&6; } |
| 7744 | fi |
| 7745 | |
| 7746 | if test "x$ac_ct_WINDRES" = x; then |
| 7747 | WINDRES="" |
| 7748 | else |
| 7749 | case $cross_compiling:$ac_tool_warned in |
| 7750 | yes:) |
| 7751 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 7752 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 7753 | ac_tool_warned=yes ;; |
| 7754 | esac |
| 7755 | WINDRES=$ac_ct_WINDRES |
| 7756 | fi |
| 7757 | else |
| 7758 | WINDRES="$ac_cv_prog_WINDRES" |
| 7759 | fi |
| 7760 | |
| 7761 | |
| 7762 | case $host_os in |
| 7763 | gnu*) |
| 7764 | # Needed for GNU Hurd hosts. |
| 7765 | if test -n "$ac_tool_prefix"; then |
| 7766 | # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args. |
| 7767 | set dummy ${ac_tool_prefix}mig; ac_word=$2 |
| 7768 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 7769 | $as_echo_n "checking for $ac_word... " >&6; } |
| 7770 | if ${ac_cv_prog_MIG+:} false; then : |
| 7771 | $as_echo_n "(cached) " >&6 |
| 7772 | else |
| 7773 | if test -n "$MIG"; then |
| 7774 | ac_cv_prog_MIG="$MIG" # Let the user override the test. |
| 7775 | else |
| 7776 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 7777 | for as_dir in $PATH |
| 7778 | do |
| 7779 | IFS=$as_save_IFS |
| 7780 | test -z "$as_dir" && as_dir=. |
| 7781 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 7782 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 7783 | ac_cv_prog_MIG="${ac_tool_prefix}mig" |
| 7784 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 7785 | break 2 |
| 7786 | fi |
| 7787 | done |
| 7788 | done |
| 7789 | IFS=$as_save_IFS |
| 7790 | |
| 7791 | fi |
| 7792 | fi |
| 7793 | MIG=$ac_cv_prog_MIG |
| 7794 | if test -n "$MIG"; then |
| 7795 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5 |
| 7796 | $as_echo "$MIG" >&6; } |
| 7797 | else |
| 7798 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 7799 | $as_echo "no" >&6; } |
| 7800 | fi |
| 7801 | |
| 7802 | |
| 7803 | fi |
| 7804 | if test -z "$ac_cv_prog_MIG"; then |
| 7805 | ac_ct_MIG=$MIG |
| 7806 | # Extract the first word of "mig", so it can be a program name with args. |
| 7807 | set dummy mig; ac_word=$2 |
| 7808 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 7809 | $as_echo_n "checking for $ac_word... " >&6; } |
| 7810 | if ${ac_cv_prog_ac_ct_MIG+:} false; then : |
| 7811 | $as_echo_n "(cached) " >&6 |
| 7812 | else |
| 7813 | if test -n "$ac_ct_MIG"; then |
| 7814 | ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test. |
| 7815 | else |
| 7816 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 7817 | for as_dir in $PATH |
| 7818 | do |
| 7819 | IFS=$as_save_IFS |
| 7820 | test -z "$as_dir" && as_dir=. |
| 7821 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 7822 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 7823 | ac_cv_prog_ac_ct_MIG="mig" |
| 7824 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 7825 | break 2 |
| 7826 | fi |
| 7827 | done |
| 7828 | done |
| 7829 | IFS=$as_save_IFS |
| 7830 | |
| 7831 | fi |
| 7832 | fi |
| 7833 | ac_ct_MIG=$ac_cv_prog_ac_ct_MIG |
| 7834 | if test -n "$ac_ct_MIG"; then |
| 7835 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5 |
| 7836 | $as_echo "$ac_ct_MIG" >&6; } |
| 7837 | else |
| 7838 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 7839 | $as_echo "no" >&6; } |
| 7840 | fi |
| 7841 | |
| 7842 | if test "x$ac_ct_MIG" = x; then |
| 7843 | MIG="" |
| 7844 | else |
| 7845 | case $cross_compiling:$ac_tool_warned in |
| 7846 | yes:) |
| 7847 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 |
| 7848 | $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} |
| 7849 | ac_tool_warned=yes ;; |
| 7850 | esac |
| 7851 | MIG=$ac_ct_MIG |
| 7852 | fi |
| 7853 | else |
| 7854 | MIG="$ac_cv_prog_MIG" |
| 7855 | fi |
| 7856 | |
| 7857 | if test x"$MIG" = x; then |
| 7858 | as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5 |
| 7859 | fi |
| 7860 | ;; |
| 7861 | esac |
| 7862 | |
| 7863 | # ---------------------- # |
| 7864 | # Checks for libraries. # |
| 7865 | # ---------------------- # |
| 7866 | |
| 7867 | # We might need to link with -lm; most simulators need it. |
| 7868 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5 |
| 7869 | $as_echo_n "checking for main in -lm... " >&6; } |
| 7870 | if ${ac_cv_lib_m_main+:} false; then : |
| 7871 | $as_echo_n "(cached) " >&6 |
| 7872 | else |
| 7873 | ac_check_lib_save_LIBS=$LIBS |
| 7874 | LIBS="-lm $LIBS" |
| 7875 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7876 | /* end confdefs.h. */ |
| 7877 | |
| 7878 | |
| 7879 | int |
| 7880 | main () |
| 7881 | { |
| 7882 | return main (); |
| 7883 | ; |
| 7884 | return 0; |
| 7885 | } |
| 7886 | _ACEOF |
| 7887 | if ac_fn_c_try_link "$LINENO"; then : |
| 7888 | ac_cv_lib_m_main=yes |
| 7889 | else |
| 7890 | ac_cv_lib_m_main=no |
| 7891 | fi |
| 7892 | rm -f core conftest.err conftest.$ac_objext \ |
| 7893 | conftest$ac_exeext conftest.$ac_ext |
| 7894 | LIBS=$ac_check_lib_save_LIBS |
| 7895 | fi |
| 7896 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5 |
| 7897 | $as_echo "$ac_cv_lib_m_main" >&6; } |
| 7898 | if test "x$ac_cv_lib_m_main" = xyes; then : |
| 7899 | cat >>confdefs.h <<_ACEOF |
| 7900 | #define HAVE_LIBM 1 |
| 7901 | _ACEOF |
| 7902 | |
| 7903 | LIBS="-lm $LIBS" |
| 7904 | |
| 7905 | fi |
| 7906 | |
| 7907 | |
| 7908 | # Some systems (e.g. Solaris) have `gethostbyname' in libnsl. |
| 7909 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5 |
| 7910 | $as_echo_n "checking for library containing gethostbyname... " >&6; } |
| 7911 | if ${ac_cv_search_gethostbyname+:} false; then : |
| 7912 | $as_echo_n "(cached) " >&6 |
| 7913 | else |
| 7914 | ac_func_search_save_LIBS=$LIBS |
| 7915 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7916 | /* end confdefs.h. */ |
| 7917 | |
| 7918 | /* Override any GCC internal prototype to avoid an error. |
| 7919 | Use char because int might match the return type of a GCC |
| 7920 | builtin and then its argument prototype would still apply. */ |
| 7921 | #ifdef __cplusplus |
| 7922 | extern "C" |
| 7923 | #endif |
| 7924 | char gethostbyname (); |
| 7925 | int |
| 7926 | main () |
| 7927 | { |
| 7928 | return gethostbyname (); |
| 7929 | ; |
| 7930 | return 0; |
| 7931 | } |
| 7932 | _ACEOF |
| 7933 | for ac_lib in '' nsl; do |
| 7934 | if test -z "$ac_lib"; then |
| 7935 | ac_res="none required" |
| 7936 | else |
| 7937 | ac_res=-l$ac_lib |
| 7938 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
| 7939 | fi |
| 7940 | if ac_fn_c_try_link "$LINENO"; then : |
| 7941 | ac_cv_search_gethostbyname=$ac_res |
| 7942 | fi |
| 7943 | rm -f core conftest.err conftest.$ac_objext \ |
| 7944 | conftest$ac_exeext |
| 7945 | if ${ac_cv_search_gethostbyname+:} false; then : |
| 7946 | break |
| 7947 | fi |
| 7948 | done |
| 7949 | if ${ac_cv_search_gethostbyname+:} false; then : |
| 7950 | |
| 7951 | else |
| 7952 | ac_cv_search_gethostbyname=no |
| 7953 | fi |
| 7954 | rm conftest.$ac_ext |
| 7955 | LIBS=$ac_func_search_save_LIBS |
| 7956 | fi |
| 7957 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5 |
| 7958 | $as_echo "$ac_cv_search_gethostbyname" >&6; } |
| 7959 | ac_res=$ac_cv_search_gethostbyname |
| 7960 | if test "$ac_res" != no; then : |
| 7961 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
| 7962 | |
| 7963 | fi |
| 7964 | |
| 7965 | |
| 7966 | # Some systems (e.g. Solaris) have `socketpair' in libsocket. |
| 7967 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5 |
| 7968 | $as_echo_n "checking for library containing socketpair... " >&6; } |
| 7969 | if ${ac_cv_search_socketpair+:} false; then : |
| 7970 | $as_echo_n "(cached) " >&6 |
| 7971 | else |
| 7972 | ac_func_search_save_LIBS=$LIBS |
| 7973 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 7974 | /* end confdefs.h. */ |
| 7975 | |
| 7976 | /* Override any GCC internal prototype to avoid an error. |
| 7977 | Use char because int might match the return type of a GCC |
| 7978 | builtin and then its argument prototype would still apply. */ |
| 7979 | #ifdef __cplusplus |
| 7980 | extern "C" |
| 7981 | #endif |
| 7982 | char socketpair (); |
| 7983 | int |
| 7984 | main () |
| 7985 | { |
| 7986 | return socketpair (); |
| 7987 | ; |
| 7988 | return 0; |
| 7989 | } |
| 7990 | _ACEOF |
| 7991 | for ac_lib in '' socket; do |
| 7992 | if test -z "$ac_lib"; then |
| 7993 | ac_res="none required" |
| 7994 | else |
| 7995 | ac_res=-l$ac_lib |
| 7996 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
| 7997 | fi |
| 7998 | if ac_fn_c_try_link "$LINENO"; then : |
| 7999 | ac_cv_search_socketpair=$ac_res |
| 8000 | fi |
| 8001 | rm -f core conftest.err conftest.$ac_objext \ |
| 8002 | conftest$ac_exeext |
| 8003 | if ${ac_cv_search_socketpair+:} false; then : |
| 8004 | break |
| 8005 | fi |
| 8006 | done |
| 8007 | if ${ac_cv_search_socketpair+:} false; then : |
| 8008 | |
| 8009 | else |
| 8010 | ac_cv_search_socketpair=no |
| 8011 | fi |
| 8012 | rm conftest.$ac_ext |
| 8013 | LIBS=$ac_func_search_save_LIBS |
| 8014 | fi |
| 8015 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5 |
| 8016 | $as_echo "$ac_cv_search_socketpair" >&6; } |
| 8017 | ac_res=$ac_cv_search_socketpair |
| 8018 | if test "$ac_res" != no; then : |
| 8019 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
| 8020 | |
| 8021 | fi |
| 8022 | |
| 8023 | |
| 8024 | # Link in zlib if we can. This allows us to read compressed debug sections. |
| 8025 | |
| 8026 | # Use the system's zlib library. |
| 8027 | zlibdir="-L\$(top_builddir)/../zlib" |
| 8028 | zlibinc="-I\$(top_srcdir)/../zlib" |
| 8029 | |
| 8030 | # Check whether --with-system-zlib was given. |
| 8031 | if test "${with_system_zlib+set}" = set; then : |
| 8032 | withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then |
| 8033 | zlibdir= |
| 8034 | zlibinc= |
| 8035 | fi |
| 8036 | |
| 8037 | fi |
| 8038 | |
| 8039 | |
| 8040 | |
| 8041 | |
| 8042 | |
| 8043 | # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c). |
| 8044 | # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd. |
| 8045 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5 |
| 8046 | $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; } |
| 8047 | if ${ac_cv_search_kinfo_getvmmap+:} false; then : |
| 8048 | $as_echo_n "(cached) " >&6 |
| 8049 | else |
| 8050 | ac_func_search_save_LIBS=$LIBS |
| 8051 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8052 | /* end confdefs.h. */ |
| 8053 | |
| 8054 | /* Override any GCC internal prototype to avoid an error. |
| 8055 | Use char because int might match the return type of a GCC |
| 8056 | builtin and then its argument prototype would still apply. */ |
| 8057 | #ifdef __cplusplus |
| 8058 | extern "C" |
| 8059 | #endif |
| 8060 | char kinfo_getvmmap (); |
| 8061 | int |
| 8062 | main () |
| 8063 | { |
| 8064 | return kinfo_getvmmap (); |
| 8065 | ; |
| 8066 | return 0; |
| 8067 | } |
| 8068 | _ACEOF |
| 8069 | for ac_lib in '' util util-freebsd; do |
| 8070 | if test -z "$ac_lib"; then |
| 8071 | ac_res="none required" |
| 8072 | else |
| 8073 | ac_res=-l$ac_lib |
| 8074 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
| 8075 | fi |
| 8076 | if ac_fn_c_try_link "$LINENO"; then : |
| 8077 | ac_cv_search_kinfo_getvmmap=$ac_res |
| 8078 | fi |
| 8079 | rm -f core conftest.err conftest.$ac_objext \ |
| 8080 | conftest$ac_exeext |
| 8081 | if ${ac_cv_search_kinfo_getvmmap+:} false; then : |
| 8082 | break |
| 8083 | fi |
| 8084 | done |
| 8085 | if ${ac_cv_search_kinfo_getvmmap+:} false; then : |
| 8086 | |
| 8087 | else |
| 8088 | ac_cv_search_kinfo_getvmmap=no |
| 8089 | fi |
| 8090 | rm conftest.$ac_ext |
| 8091 | LIBS=$ac_func_search_save_LIBS |
| 8092 | fi |
| 8093 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5 |
| 8094 | $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; } |
| 8095 | ac_res=$ac_cv_search_kinfo_getvmmap |
| 8096 | if test "$ac_res" != no; then : |
| 8097 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
| 8098 | |
| 8099 | $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h |
| 8100 | |
| 8101 | fi |
| 8102 | |
| 8103 | |
| 8104 | |
| 8105 | if test "X$prefix" = "XNONE"; then |
| 8106 | acl_final_prefix="$ac_default_prefix" |
| 8107 | else |
| 8108 | acl_final_prefix="$prefix" |
| 8109 | fi |
| 8110 | if test "X$exec_prefix" = "XNONE"; then |
| 8111 | acl_final_exec_prefix='${prefix}' |
| 8112 | else |
| 8113 | acl_final_exec_prefix="$exec_prefix" |
| 8114 | fi |
| 8115 | acl_save_prefix="$prefix" |
| 8116 | prefix="$acl_final_prefix" |
| 8117 | eval acl_final_exec_prefix=\"$acl_final_exec_prefix\" |
| 8118 | prefix="$acl_save_prefix" |
| 8119 | |
| 8120 | |
| 8121 | # Check whether --with-gnu-ld was given. |
| 8122 | if test "${with_gnu_ld+set}" = set; then : |
| 8123 | withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes |
| 8124 | else |
| 8125 | with_gnu_ld=no |
| 8126 | fi |
| 8127 | |
| 8128 | # Prepare PATH_SEPARATOR. |
| 8129 | # The user is always right. |
| 8130 | if test "${PATH_SEPARATOR+set}" != set; then |
| 8131 | echo "#! /bin/sh" >conf$$.sh |
| 8132 | echo "exit 0" >>conf$$.sh |
| 8133 | chmod +x conf$$.sh |
| 8134 | if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then |
| 8135 | PATH_SEPARATOR=';' |
| 8136 | else |
| 8137 | PATH_SEPARATOR=: |
| 8138 | fi |
| 8139 | rm -f conf$$.sh |
| 8140 | fi |
| 8141 | ac_prog=ld |
| 8142 | if test "$GCC" = yes; then |
| 8143 | # Check if gcc -print-prog-name=ld gives a path. |
| 8144 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5 |
| 8145 | $as_echo_n "checking for ld used by GCC... " >&6; } |
| 8146 | case $host in |
| 8147 | *-*-mingw*) |
| 8148 | # gcc leaves a trailing carriage return which upsets mingw |
| 8149 | ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; |
| 8150 | *) |
| 8151 | ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; |
| 8152 | esac |
| 8153 | case $ac_prog in |
| 8154 | # Accept absolute paths. |
| 8155 | [\\/]* | [A-Za-z]:[\\/]*) |
| 8156 | re_direlt='/[^/][^/]*/\.\./' |
| 8157 | # Canonicalize the path of ld |
| 8158 | ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'` |
| 8159 | while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do |
| 8160 | ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"` |
| 8161 | done |
| 8162 | test -z "$LD" && LD="$ac_prog" |
| 8163 | ;; |
| 8164 | "") |
| 8165 | # If it fails, then pretend we aren't using GCC. |
| 8166 | ac_prog=ld |
| 8167 | ;; |
| 8168 | *) |
| 8169 | # If it is relative, then search for the first ld in PATH. |
| 8170 | with_gnu_ld=unknown |
| 8171 | ;; |
| 8172 | esac |
| 8173 | elif test "$with_gnu_ld" = yes; then |
| 8174 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 |
| 8175 | $as_echo_n "checking for GNU ld... " >&6; } |
| 8176 | else |
| 8177 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 |
| 8178 | $as_echo_n "checking for non-GNU ld... " >&6; } |
| 8179 | fi |
| 8180 | if ${acl_cv_path_LD+:} false; then : |
| 8181 | $as_echo_n "(cached) " >&6 |
| 8182 | else |
| 8183 | if test -z "$LD"; then |
| 8184 | IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}" |
| 8185 | for ac_dir in $PATH; do |
| 8186 | test -z "$ac_dir" && ac_dir=. |
| 8187 | if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then |
| 8188 | acl_cv_path_LD="$ac_dir/$ac_prog" |
| 8189 | # Check to see if the program is GNU ld. I'd rather use --version, |
| 8190 | # but apparently some GNU ld's only accept -v. |
| 8191 | # Break only if it was the GNU/non-GNU ld that we prefer. |
| 8192 | if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then |
| 8193 | test "$with_gnu_ld" != no && break |
| 8194 | else |
| 8195 | test "$with_gnu_ld" != yes && break |
| 8196 | fi |
| 8197 | fi |
| 8198 | done |
| 8199 | IFS="$ac_save_ifs" |
| 8200 | else |
| 8201 | acl_cv_path_LD="$LD" # Let the user override the test with a path. |
| 8202 | fi |
| 8203 | fi |
| 8204 | |
| 8205 | LD="$acl_cv_path_LD" |
| 8206 | if test -n "$LD"; then |
| 8207 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5 |
| 8208 | $as_echo "$LD" >&6; } |
| 8209 | else |
| 8210 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 8211 | $as_echo "no" >&6; } |
| 8212 | fi |
| 8213 | test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 |
| 8214 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 |
| 8215 | $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } |
| 8216 | if ${acl_cv_prog_gnu_ld+:} false; then : |
| 8217 | $as_echo_n "(cached) " >&6 |
| 8218 | else |
| 8219 | # I'd rather use --version here, but apparently some GNU ld's only accept -v. |
| 8220 | if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then |
| 8221 | acl_cv_prog_gnu_ld=yes |
| 8222 | else |
| 8223 | acl_cv_prog_gnu_ld=no |
| 8224 | fi |
| 8225 | fi |
| 8226 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5 |
| 8227 | $as_echo "$acl_cv_prog_gnu_ld" >&6; } |
| 8228 | with_gnu_ld=$acl_cv_prog_gnu_ld |
| 8229 | |
| 8230 | |
| 8231 | |
| 8232 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5 |
| 8233 | $as_echo_n "checking for shared library run path origin... " >&6; } |
| 8234 | if ${acl_cv_rpath+:} false; then : |
| 8235 | $as_echo_n "(cached) " >&6 |
| 8236 | else |
| 8237 | |
| 8238 | CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \ |
| 8239 | ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh |
| 8240 | . ./conftest.sh |
| 8241 | rm -f ./conftest.sh |
| 8242 | acl_cv_rpath=done |
| 8243 | |
| 8244 | fi |
| 8245 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5 |
| 8246 | $as_echo "$acl_cv_rpath" >&6; } |
| 8247 | wl="$acl_cv_wl" |
| 8248 | libext="$acl_cv_libext" |
| 8249 | shlibext="$acl_cv_shlibext" |
| 8250 | hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec" |
| 8251 | hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator" |
| 8252 | hardcode_direct="$acl_cv_hardcode_direct" |
| 8253 | hardcode_minus_L="$acl_cv_hardcode_minus_L" |
| 8254 | # Check whether --enable-rpath was given. |
| 8255 | if test "${enable_rpath+set}" = set; then : |
| 8256 | enableval=$enable_rpath; : |
| 8257 | else |
| 8258 | enable_rpath=yes |
| 8259 | fi |
| 8260 | |
| 8261 | |
| 8262 | |
| 8263 | |
| 8264 | |
| 8265 | |
| 8266 | |
| 8267 | |
| 8268 | use_additional=yes |
| 8269 | |
| 8270 | acl_save_prefix="$prefix" |
| 8271 | prefix="$acl_final_prefix" |
| 8272 | acl_save_exec_prefix="$exec_prefix" |
| 8273 | exec_prefix="$acl_final_exec_prefix" |
| 8274 | |
| 8275 | eval additional_includedir=\"$includedir\" |
| 8276 | eval additional_libdir=\"$libdir\" |
| 8277 | |
| 8278 | exec_prefix="$acl_save_exec_prefix" |
| 8279 | prefix="$acl_save_prefix" |
| 8280 | |
| 8281 | |
| 8282 | # Check whether --with-libiconv-prefix was given. |
| 8283 | if test "${with_libiconv_prefix+set}" = set; then : |
| 8284 | withval=$with_libiconv_prefix; |
| 8285 | if test "X$withval" = "Xno"; then |
| 8286 | use_additional=no |
| 8287 | else |
| 8288 | if test "X$withval" = "X"; then |
| 8289 | |
| 8290 | acl_save_prefix="$prefix" |
| 8291 | prefix="$acl_final_prefix" |
| 8292 | acl_save_exec_prefix="$exec_prefix" |
| 8293 | exec_prefix="$acl_final_exec_prefix" |
| 8294 | |
| 8295 | eval additional_includedir=\"$includedir\" |
| 8296 | eval additional_libdir=\"$libdir\" |
| 8297 | |
| 8298 | exec_prefix="$acl_save_exec_prefix" |
| 8299 | prefix="$acl_save_prefix" |
| 8300 | |
| 8301 | else |
| 8302 | additional_includedir="$withval/include" |
| 8303 | additional_libdir="$withval/lib" |
| 8304 | fi |
| 8305 | fi |
| 8306 | |
| 8307 | fi |
| 8308 | |
| 8309 | |
| 8310 | # Check whether --with-libiconv-type was given. |
| 8311 | if test "${with_libiconv_type+set}" = set; then : |
| 8312 | withval=$with_libiconv_type; with_libiconv_type=$withval |
| 8313 | else |
| 8314 | with_libiconv_type=auto |
| 8315 | fi |
| 8316 | |
| 8317 | lib_type=`eval echo \$with_libiconv_type` |
| 8318 | |
| 8319 | LIBICONV= |
| 8320 | LTLIBICONV= |
| 8321 | INCICONV= |
| 8322 | rpathdirs= |
| 8323 | ltrpathdirs= |
| 8324 | names_already_handled= |
| 8325 | names_next_round='iconv ' |
| 8326 | while test -n "$names_next_round"; do |
| 8327 | names_this_round="$names_next_round" |
| 8328 | names_next_round= |
| 8329 | for name in $names_this_round; do |
| 8330 | already_handled= |
| 8331 | for n in $names_already_handled; do |
| 8332 | if test "$n" = "$name"; then |
| 8333 | already_handled=yes |
| 8334 | break |
| 8335 | fi |
| 8336 | done |
| 8337 | if test -z "$already_handled"; then |
| 8338 | names_already_handled="$names_already_handled $name" |
| 8339 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` |
| 8340 | eval value=\"\$HAVE_LIB$uppername\" |
| 8341 | if test -n "$value"; then |
| 8342 | if test "$value" = yes; then |
| 8343 | eval value=\"\$LIB$uppername\" |
| 8344 | test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value" |
| 8345 | eval value=\"\$LTLIB$uppername\" |
| 8346 | test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value" |
| 8347 | else |
| 8348 | : |
| 8349 | fi |
| 8350 | else |
| 8351 | found_dir= |
| 8352 | found_la= |
| 8353 | found_so= |
| 8354 | found_a= |
| 8355 | if test $use_additional = yes; then |
| 8356 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
| 8357 | found_dir="$additional_libdir" |
| 8358 | found_so="$additional_libdir/lib$name.$shlibext" |
| 8359 | if test -f "$additional_libdir/lib$name.la"; then |
| 8360 | found_la="$additional_libdir/lib$name.la" |
| 8361 | fi |
| 8362 | elif test x$lib_type != xshared; then |
| 8363 | if test -f "$additional_libdir/lib$name.$libext"; then |
| 8364 | found_dir="$additional_libdir" |
| 8365 | found_a="$additional_libdir/lib$name.$libext" |
| 8366 | if test -f "$additional_libdir/lib$name.la"; then |
| 8367 | found_la="$additional_libdir/lib$name.la" |
| 8368 | fi |
| 8369 | fi |
| 8370 | fi |
| 8371 | fi |
| 8372 | if test "X$found_dir" = "X"; then |
| 8373 | for x in $LDFLAGS $LTLIBICONV; do |
| 8374 | |
| 8375 | acl_save_prefix="$prefix" |
| 8376 | prefix="$acl_final_prefix" |
| 8377 | acl_save_exec_prefix="$exec_prefix" |
| 8378 | exec_prefix="$acl_final_exec_prefix" |
| 8379 | eval x=\"$x\" |
| 8380 | exec_prefix="$acl_save_exec_prefix" |
| 8381 | prefix="$acl_save_prefix" |
| 8382 | |
| 8383 | case "$x" in |
| 8384 | -L*) |
| 8385 | dir=`echo "X$x" | sed -e 's/^X-L//'` |
| 8386 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
| 8387 | found_dir="$dir" |
| 8388 | found_so="$dir/lib$name.$shlibext" |
| 8389 | if test -f "$dir/lib$name.la"; then |
| 8390 | found_la="$dir/lib$name.la" |
| 8391 | fi |
| 8392 | elif test x$lib_type != xshared; then |
| 8393 | if test -f "$dir/lib$name.$libext"; then |
| 8394 | found_dir="$dir" |
| 8395 | found_a="$dir/lib$name.$libext" |
| 8396 | if test -f "$dir/lib$name.la"; then |
| 8397 | found_la="$dir/lib$name.la" |
| 8398 | fi |
| 8399 | fi |
| 8400 | fi |
| 8401 | ;; |
| 8402 | esac |
| 8403 | if test "X$found_dir" != "X"; then |
| 8404 | break |
| 8405 | fi |
| 8406 | done |
| 8407 | fi |
| 8408 | if test "X$found_dir" != "X"; then |
| 8409 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name" |
| 8410 | if test "X$found_so" != "X"; then |
| 8411 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then |
| 8412 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" |
| 8413 | else |
| 8414 | haveit= |
| 8415 | for x in $ltrpathdirs; do |
| 8416 | if test "X$x" = "X$found_dir"; then |
| 8417 | haveit=yes |
| 8418 | break |
| 8419 | fi |
| 8420 | done |
| 8421 | if test -z "$haveit"; then |
| 8422 | ltrpathdirs="$ltrpathdirs $found_dir" |
| 8423 | fi |
| 8424 | if test "$hardcode_direct" = yes; then |
| 8425 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" |
| 8426 | else |
| 8427 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then |
| 8428 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" |
| 8429 | haveit= |
| 8430 | for x in $rpathdirs; do |
| 8431 | if test "X$x" = "X$found_dir"; then |
| 8432 | haveit=yes |
| 8433 | break |
| 8434 | fi |
| 8435 | done |
| 8436 | if test -z "$haveit"; then |
| 8437 | rpathdirs="$rpathdirs $found_dir" |
| 8438 | fi |
| 8439 | else |
| 8440 | haveit= |
| 8441 | for x in $LDFLAGS $LIBICONV; do |
| 8442 | |
| 8443 | acl_save_prefix="$prefix" |
| 8444 | prefix="$acl_final_prefix" |
| 8445 | acl_save_exec_prefix="$exec_prefix" |
| 8446 | exec_prefix="$acl_final_exec_prefix" |
| 8447 | eval x=\"$x\" |
| 8448 | exec_prefix="$acl_save_exec_prefix" |
| 8449 | prefix="$acl_save_prefix" |
| 8450 | |
| 8451 | if test "X$x" = "X-L$found_dir"; then |
| 8452 | haveit=yes |
| 8453 | break |
| 8454 | fi |
| 8455 | done |
| 8456 | if test -z "$haveit"; then |
| 8457 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir" |
| 8458 | fi |
| 8459 | if test "$hardcode_minus_L" != no; then |
| 8460 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so" |
| 8461 | else |
| 8462 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" |
| 8463 | fi |
| 8464 | fi |
| 8465 | fi |
| 8466 | fi |
| 8467 | else |
| 8468 | if test "X$found_a" != "X"; then |
| 8469 | LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a" |
| 8470 | else |
| 8471 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name" |
| 8472 | fi |
| 8473 | fi |
| 8474 | additional_includedir= |
| 8475 | case "$found_dir" in |
| 8476 | */lib | */lib/) |
| 8477 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` |
| 8478 | additional_includedir="$basedir/include" |
| 8479 | ;; |
| 8480 | esac |
| 8481 | if test "X$additional_includedir" != "X"; then |
| 8482 | if test "X$additional_includedir" != "X/usr/include"; then |
| 8483 | haveit= |
| 8484 | if test "X$additional_includedir" = "X/usr/local/include"; then |
| 8485 | if test -n "$GCC"; then |
| 8486 | case $host_os in |
| 8487 | linux*) haveit=yes;; |
| 8488 | esac |
| 8489 | fi |
| 8490 | fi |
| 8491 | if test -z "$haveit"; then |
| 8492 | for x in $CPPFLAGS $INCICONV; do |
| 8493 | |
| 8494 | acl_save_prefix="$prefix" |
| 8495 | prefix="$acl_final_prefix" |
| 8496 | acl_save_exec_prefix="$exec_prefix" |
| 8497 | exec_prefix="$acl_final_exec_prefix" |
| 8498 | eval x=\"$x\" |
| 8499 | exec_prefix="$acl_save_exec_prefix" |
| 8500 | prefix="$acl_save_prefix" |
| 8501 | |
| 8502 | if test "X$x" = "X-I$additional_includedir"; then |
| 8503 | haveit=yes |
| 8504 | break |
| 8505 | fi |
| 8506 | done |
| 8507 | if test -z "$haveit"; then |
| 8508 | if test -d "$additional_includedir"; then |
| 8509 | INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir" |
| 8510 | fi |
| 8511 | fi |
| 8512 | fi |
| 8513 | fi |
| 8514 | fi |
| 8515 | if test -n "$found_la"; then |
| 8516 | save_libdir="$libdir" |
| 8517 | case "$found_la" in |
| 8518 | */* | *\\*) . "$found_la" ;; |
| 8519 | *) . "./$found_la" ;; |
| 8520 | esac |
| 8521 | libdir="$save_libdir" |
| 8522 | for dep in $dependency_libs; do |
| 8523 | case "$dep" in |
| 8524 | -L*) |
| 8525 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` |
| 8526 | if test "X$additional_libdir" != "X/usr/lib"; then |
| 8527 | haveit= |
| 8528 | if test "X$additional_libdir" = "X/usr/local/lib"; then |
| 8529 | if test -n "$GCC"; then |
| 8530 | case $host_os in |
| 8531 | linux*) haveit=yes;; |
| 8532 | esac |
| 8533 | fi |
| 8534 | fi |
| 8535 | if test -z "$haveit"; then |
| 8536 | haveit= |
| 8537 | for x in $LDFLAGS $LIBICONV; do |
| 8538 | |
| 8539 | acl_save_prefix="$prefix" |
| 8540 | prefix="$acl_final_prefix" |
| 8541 | acl_save_exec_prefix="$exec_prefix" |
| 8542 | exec_prefix="$acl_final_exec_prefix" |
| 8543 | eval x=\"$x\" |
| 8544 | exec_prefix="$acl_save_exec_prefix" |
| 8545 | prefix="$acl_save_prefix" |
| 8546 | |
| 8547 | if test "X$x" = "X-L$additional_libdir"; then |
| 8548 | haveit=yes |
| 8549 | break |
| 8550 | fi |
| 8551 | done |
| 8552 | if test -z "$haveit"; then |
| 8553 | if test -d "$additional_libdir"; then |
| 8554 | LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir" |
| 8555 | fi |
| 8556 | fi |
| 8557 | haveit= |
| 8558 | for x in $LDFLAGS $LTLIBICONV; do |
| 8559 | |
| 8560 | acl_save_prefix="$prefix" |
| 8561 | prefix="$acl_final_prefix" |
| 8562 | acl_save_exec_prefix="$exec_prefix" |
| 8563 | exec_prefix="$acl_final_exec_prefix" |
| 8564 | eval x=\"$x\" |
| 8565 | exec_prefix="$acl_save_exec_prefix" |
| 8566 | prefix="$acl_save_prefix" |
| 8567 | |
| 8568 | if test "X$x" = "X-L$additional_libdir"; then |
| 8569 | haveit=yes |
| 8570 | break |
| 8571 | fi |
| 8572 | done |
| 8573 | if test -z "$haveit"; then |
| 8574 | if test -d "$additional_libdir"; then |
| 8575 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir" |
| 8576 | fi |
| 8577 | fi |
| 8578 | fi |
| 8579 | fi |
| 8580 | ;; |
| 8581 | -R*) |
| 8582 | dir=`echo "X$dep" | sed -e 's/^X-R//'` |
| 8583 | if test "$enable_rpath" != no; then |
| 8584 | haveit= |
| 8585 | for x in $rpathdirs; do |
| 8586 | if test "X$x" = "X$dir"; then |
| 8587 | haveit=yes |
| 8588 | break |
| 8589 | fi |
| 8590 | done |
| 8591 | if test -z "$haveit"; then |
| 8592 | rpathdirs="$rpathdirs $dir" |
| 8593 | fi |
| 8594 | haveit= |
| 8595 | for x in $ltrpathdirs; do |
| 8596 | if test "X$x" = "X$dir"; then |
| 8597 | haveit=yes |
| 8598 | break |
| 8599 | fi |
| 8600 | done |
| 8601 | if test -z "$haveit"; then |
| 8602 | ltrpathdirs="$ltrpathdirs $dir" |
| 8603 | fi |
| 8604 | fi |
| 8605 | ;; |
| 8606 | -l*) |
| 8607 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` |
| 8608 | ;; |
| 8609 | *.la) |
| 8610 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` |
| 8611 | ;; |
| 8612 | *) |
| 8613 | LIBICONV="${LIBICONV}${LIBICONV:+ }$dep" |
| 8614 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep" |
| 8615 | ;; |
| 8616 | esac |
| 8617 | done |
| 8618 | fi |
| 8619 | else |
| 8620 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
| 8621 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name" |
| 8622 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name" |
| 8623 | else |
| 8624 | LIBICONV="${LIBICONV}${LIBICONV:+ }-l:lib$name.$libext" |
| 8625 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l:lib$name.$libext" |
| 8626 | fi |
| 8627 | fi |
| 8628 | fi |
| 8629 | fi |
| 8630 | done |
| 8631 | done |
| 8632 | if test "X$rpathdirs" != "X"; then |
| 8633 | if test -n "$hardcode_libdir_separator"; then |
| 8634 | alldirs= |
| 8635 | for found_dir in $rpathdirs; do |
| 8636 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" |
| 8637 | done |
| 8638 | acl_save_libdir="$libdir" |
| 8639 | libdir="$alldirs" |
| 8640 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 8641 | libdir="$acl_save_libdir" |
| 8642 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" |
| 8643 | else |
| 8644 | for found_dir in $rpathdirs; do |
| 8645 | acl_save_libdir="$libdir" |
| 8646 | libdir="$found_dir" |
| 8647 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 8648 | libdir="$acl_save_libdir" |
| 8649 | LIBICONV="${LIBICONV}${LIBICONV:+ }$flag" |
| 8650 | done |
| 8651 | fi |
| 8652 | fi |
| 8653 | if test "X$ltrpathdirs" != "X"; then |
| 8654 | for found_dir in $ltrpathdirs; do |
| 8655 | LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir" |
| 8656 | done |
| 8657 | fi |
| 8658 | |
| 8659 | |
| 8660 | |
| 8661 | |
| 8662 | |
| 8663 | |
| 8664 | |
| 8665 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5 |
| 8666 | $as_echo_n "checking for iconv... " >&6; } |
| 8667 | if ${am_cv_func_iconv+:} false; then : |
| 8668 | $as_echo_n "(cached) " >&6 |
| 8669 | else |
| 8670 | |
| 8671 | am_cv_func_iconv="no, consider installing GNU libiconv" |
| 8672 | am_cv_lib_iconv=no |
| 8673 | am_save_CPPFLAGS="$CPPFLAGS" |
| 8674 | CPPFLAGS="$CPPFLAGS $INCICONV" |
| 8675 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8676 | /* end confdefs.h. */ |
| 8677 | #include <stdlib.h> |
| 8678 | #include <iconv.h> |
| 8679 | int |
| 8680 | main () |
| 8681 | { |
| 8682 | iconv_t cd = iconv_open("",""); |
| 8683 | iconv(cd,NULL,NULL,NULL,NULL); |
| 8684 | iconv_close(cd); |
| 8685 | ; |
| 8686 | return 0; |
| 8687 | } |
| 8688 | _ACEOF |
| 8689 | if ac_fn_c_try_link "$LINENO"; then : |
| 8690 | am_cv_func_iconv=yes |
| 8691 | fi |
| 8692 | rm -f core conftest.err conftest.$ac_objext \ |
| 8693 | conftest$ac_exeext conftest.$ac_ext |
| 8694 | CPPFLAGS="$am_save_CPPFLAGS" |
| 8695 | |
| 8696 | if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then |
| 8697 | for _libs in .libs _libs; do |
| 8698 | am_save_CPPFLAGS="$CPPFLAGS" |
| 8699 | am_save_LIBS="$LIBS" |
| 8700 | CPPFLAGS="$CPPFLAGS -I../libiconv/include" |
| 8701 | LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a" |
| 8702 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8703 | /* end confdefs.h. */ |
| 8704 | #include <stdlib.h> |
| 8705 | #include <iconv.h> |
| 8706 | int |
| 8707 | main () |
| 8708 | { |
| 8709 | iconv_t cd = iconv_open("",""); |
| 8710 | iconv(cd,NULL,NULL,NULL,NULL); |
| 8711 | iconv_close(cd); |
| 8712 | ; |
| 8713 | return 0; |
| 8714 | } |
| 8715 | _ACEOF |
| 8716 | if ac_fn_c_try_link "$LINENO"; then : |
| 8717 | INCICONV="-I../libiconv/include" |
| 8718 | LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a |
| 8719 | LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la |
| 8720 | am_cv_lib_iconv=yes |
| 8721 | am_cv_func_iconv=yes |
| 8722 | fi |
| 8723 | rm -f core conftest.err conftest.$ac_objext \ |
| 8724 | conftest$ac_exeext conftest.$ac_ext |
| 8725 | CPPFLAGS="$am_save_CPPFLAGS" |
| 8726 | LIBS="$am_save_LIBS" |
| 8727 | if test "$am_cv_func_iconv" = "yes"; then |
| 8728 | break |
| 8729 | fi |
| 8730 | done |
| 8731 | fi |
| 8732 | |
| 8733 | if test "$am_cv_func_iconv" != yes; then |
| 8734 | am_save_CPPFLAGS="$CPPFLAGS" |
| 8735 | am_save_LIBS="$LIBS" |
| 8736 | CPPFLAGS="$CPPFLAGS $INCICONV" |
| 8737 | LIBS="$LIBS $LIBICONV" |
| 8738 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8739 | /* end confdefs.h. */ |
| 8740 | #include <stdlib.h> |
| 8741 | #include <iconv.h> |
| 8742 | int |
| 8743 | main () |
| 8744 | { |
| 8745 | iconv_t cd = iconv_open("",""); |
| 8746 | iconv(cd,NULL,NULL,NULL,NULL); |
| 8747 | iconv_close(cd); |
| 8748 | ; |
| 8749 | return 0; |
| 8750 | } |
| 8751 | _ACEOF |
| 8752 | if ac_fn_c_try_link "$LINENO"; then : |
| 8753 | am_cv_lib_iconv=yes |
| 8754 | am_cv_func_iconv=yes |
| 8755 | fi |
| 8756 | rm -f core conftest.err conftest.$ac_objext \ |
| 8757 | conftest$ac_exeext conftest.$ac_ext |
| 8758 | CPPFLAGS="$am_save_CPPFLAGS" |
| 8759 | LIBS="$am_save_LIBS" |
| 8760 | fi |
| 8761 | |
| 8762 | fi |
| 8763 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5 |
| 8764 | $as_echo "$am_cv_func_iconv" >&6; } |
| 8765 | if test "$am_cv_func_iconv" = yes; then |
| 8766 | |
| 8767 | $as_echo "#define HAVE_ICONV 1" >>confdefs.h |
| 8768 | |
| 8769 | fi |
| 8770 | if test "$am_cv_lib_iconv" = yes; then |
| 8771 | |
| 8772 | for element in $INCICONV; do |
| 8773 | haveit= |
| 8774 | for x in $CPPFLAGS; do |
| 8775 | |
| 8776 | acl_save_prefix="$prefix" |
| 8777 | prefix="$acl_final_prefix" |
| 8778 | acl_save_exec_prefix="$exec_prefix" |
| 8779 | exec_prefix="$acl_final_exec_prefix" |
| 8780 | eval x=\"$x\" |
| 8781 | exec_prefix="$acl_save_exec_prefix" |
| 8782 | prefix="$acl_save_prefix" |
| 8783 | |
| 8784 | if test "X$x" = "X$element"; then |
| 8785 | haveit=yes |
| 8786 | break |
| 8787 | fi |
| 8788 | done |
| 8789 | if test -z "$haveit"; then |
| 8790 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" |
| 8791 | fi |
| 8792 | done |
| 8793 | |
| 8794 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5 |
| 8795 | $as_echo_n "checking how to link with libiconv... " >&6; } |
| 8796 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5 |
| 8797 | $as_echo "$LIBICONV" >&6; } |
| 8798 | else |
| 8799 | LIBICONV= |
| 8800 | LTLIBICONV= |
| 8801 | fi |
| 8802 | |
| 8803 | |
| 8804 | |
| 8805 | if test "$am_cv_func_iconv" = yes; then |
| 8806 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5 |
| 8807 | $as_echo_n "checking for iconv declaration... " >&6; } |
| 8808 | if ${am_cv_proto_iconv+:} false; then : |
| 8809 | $as_echo_n "(cached) " >&6 |
| 8810 | else |
| 8811 | |
| 8812 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8813 | /* end confdefs.h. */ |
| 8814 | |
| 8815 | #include <stdlib.h> |
| 8816 | #include <iconv.h> |
| 8817 | extern |
| 8818 | #ifdef __cplusplus |
| 8819 | "C" |
| 8820 | #endif |
| 8821 | #if defined(__STDC__) || defined(__cplusplus) |
| 8822 | size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft); |
| 8823 | #else |
| 8824 | size_t iconv(); |
| 8825 | #endif |
| 8826 | |
| 8827 | int |
| 8828 | main () |
| 8829 | { |
| 8830 | |
| 8831 | ; |
| 8832 | return 0; |
| 8833 | } |
| 8834 | _ACEOF |
| 8835 | if ac_fn_c_try_compile "$LINENO"; then : |
| 8836 | am_cv_proto_iconv_arg1="" |
| 8837 | else |
| 8838 | am_cv_proto_iconv_arg1="const" |
| 8839 | fi |
| 8840 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 8841 | am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);" |
| 8842 | fi |
| 8843 | |
| 8844 | am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'` |
| 8845 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:- |
| 8846 | }$am_cv_proto_iconv" >&5 |
| 8847 | $as_echo "${ac_t:- |
| 8848 | }$am_cv_proto_iconv" >&6; } |
| 8849 | |
| 8850 | cat >>confdefs.h <<_ACEOF |
| 8851 | #define ICONV_CONST $am_cv_proto_iconv_arg1 |
| 8852 | _ACEOF |
| 8853 | |
| 8854 | fi |
| 8855 | |
| 8856 | |
| 8857 | # GDB may fork/exec the iconv program to get the list of supported character |
| 8858 | # sets. Allow the user to specify where to find it. |
| 8859 | # There are several factors affecting the choice of option name: |
| 8860 | # - There is already --with-libiconv-prefix but we can't use it, it specifies |
| 8861 | # the build-time location of libiconv files. |
| 8862 | # - The program we need to find is iconv, which comes with glibc. The user |
| 8863 | # doesn't necessarily have libiconv installed. Therefore naming this |
| 8864 | # --with-libiconv-foo feels wrong. |
| 8865 | # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is |
| 8866 | # defined to work on directories not files (though it really doesn't know |
| 8867 | # the difference). |
| 8868 | # - Calling this --with-iconv-prefix is perceived to cause too much confusion |
| 8869 | # with --with-libiconv-prefix. |
| 8870 | # Putting these together is why the option name is --with-iconv-bin. |
| 8871 | |
| 8872 | |
| 8873 | # Check whether --with-iconv-bin was given. |
| 8874 | if test "${with_iconv_bin+set}" = set; then : |
| 8875 | withval=$with_iconv_bin; iconv_bin="${withval}" |
| 8876 | |
| 8877 | cat >>confdefs.h <<_ACEOF |
| 8878 | #define ICONV_BIN "${iconv_bin}" |
| 8879 | _ACEOF |
| 8880 | |
| 8881 | |
| 8882 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
| 8883 | if test "x$prefix" = xNONE; then |
| 8884 | test_prefix=/usr/local |
| 8885 | else |
| 8886 | test_prefix=$prefix |
| 8887 | fi |
| 8888 | else |
| 8889 | test_prefix=$exec_prefix |
| 8890 | fi |
| 8891 | value=0 |
| 8892 | case ${iconv_bin} in |
| 8893 | "${test_prefix}"|"${test_prefix}/"*|\ |
| 8894 | '${exec_prefix}'|'${exec_prefix}/'*) |
| 8895 | value=1 |
| 8896 | ;; |
| 8897 | esac |
| 8898 | |
| 8899 | cat >>confdefs.h <<_ACEOF |
| 8900 | #define ICONV_BIN_RELOCATABLE $value |
| 8901 | _ACEOF |
| 8902 | |
| 8903 | |
| 8904 | |
| 8905 | fi |
| 8906 | |
| 8907 | |
| 8908 | # For the TUI, we need enhanced curses functionality. |
| 8909 | if test x"$enable_tui" != xno; then |
| 8910 | prefer_curses=yes |
| 8911 | fi |
| 8912 | |
| 8913 | curses_found=no |
| 8914 | if test x"$prefer_curses" = xyes; then |
| 8915 | # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied |
| 8916 | # curses library because the latter might not provide all the |
| 8917 | # functionality we need. However, this leads to problems on systems |
| 8918 | # where the linker searches /usr/local/lib, but the compiler doesn't |
| 8919 | # search /usr/local/include, if ncurses is installed in /usr/local. A |
| 8920 | # default installation of ncurses on alpha*-dec-osf* will lead to such |
| 8921 | # a situation. |
| 8922 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5 |
| 8923 | $as_echo_n "checking for library containing waddstr... " >&6; } |
| 8924 | if ${ac_cv_search_waddstr+:} false; then : |
| 8925 | $as_echo_n "(cached) " >&6 |
| 8926 | else |
| 8927 | ac_func_search_save_LIBS=$LIBS |
| 8928 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 8929 | /* end confdefs.h. */ |
| 8930 | |
| 8931 | /* Override any GCC internal prototype to avoid an error. |
| 8932 | Use char because int might match the return type of a GCC |
| 8933 | builtin and then its argument prototype would still apply. */ |
| 8934 | #ifdef __cplusplus |
| 8935 | extern "C" |
| 8936 | #endif |
| 8937 | char waddstr (); |
| 8938 | int |
| 8939 | main () |
| 8940 | { |
| 8941 | return waddstr (); |
| 8942 | ; |
| 8943 | return 0; |
| 8944 | } |
| 8945 | _ACEOF |
| 8946 | for ac_lib in '' ncursesw ncurses cursesX curses; do |
| 8947 | if test -z "$ac_lib"; then |
| 8948 | ac_res="none required" |
| 8949 | else |
| 8950 | ac_res=-l$ac_lib |
| 8951 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
| 8952 | fi |
| 8953 | if ac_fn_c_try_link "$LINENO"; then : |
| 8954 | ac_cv_search_waddstr=$ac_res |
| 8955 | fi |
| 8956 | rm -f core conftest.err conftest.$ac_objext \ |
| 8957 | conftest$ac_exeext |
| 8958 | if ${ac_cv_search_waddstr+:} false; then : |
| 8959 | break |
| 8960 | fi |
| 8961 | done |
| 8962 | if ${ac_cv_search_waddstr+:} false; then : |
| 8963 | |
| 8964 | else |
| 8965 | ac_cv_search_waddstr=no |
| 8966 | fi |
| 8967 | rm conftest.$ac_ext |
| 8968 | LIBS=$ac_func_search_save_LIBS |
| 8969 | fi |
| 8970 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5 |
| 8971 | $as_echo "$ac_cv_search_waddstr" >&6; } |
| 8972 | ac_res=$ac_cv_search_waddstr |
| 8973 | if test "$ac_res" != no; then : |
| 8974 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
| 8975 | |
| 8976 | fi |
| 8977 | |
| 8978 | |
| 8979 | if test "$ac_cv_search_waddstr" != no; then |
| 8980 | curses_found=yes |
| 8981 | fi |
| 8982 | fi |
| 8983 | |
| 8984 | # Check whether we should enable the TUI, but only do so if we really |
| 8985 | # can. |
| 8986 | if test x"$enable_tui" != xno; then |
| 8987 | if test -d "$srcdir/tui"; then |
| 8988 | if test "$curses_found" != no; then |
| 8989 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)" |
| 8990 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)" |
| 8991 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)" |
| 8992 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)" |
| 8993 | else |
| 8994 | if test x"$enable_tui" = xyes; then |
| 8995 | as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5 |
| 8996 | else |
| 8997 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5 |
| 8998 | $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;} |
| 8999 | fi |
| 9000 | fi |
| 9001 | fi |
| 9002 | fi |
| 9003 | |
| 9004 | # Since GDB uses Readline, we need termcap functionality. In many |
| 9005 | # cases this will be provided by the curses library, but some systems |
| 9006 | # have a separate termcap library, or no curses library at all. |
| 9007 | |
| 9008 | case $host_os in |
| 9009 | cygwin*) |
| 9010 | if test -d "$srcdir/libtermcap"; then |
| 9011 | LIBS="../libtermcap/libtermcap.a $LIBS" |
| 9012 | ac_cv_search_tgetent="../libtermcap/libtermcap.a" |
| 9013 | fi ;; |
| 9014 | go32* | *djgpp*) |
| 9015 | ac_cv_search_tgetent="none required" |
| 9016 | ;; |
| 9017 | esac |
| 9018 | |
| 9019 | # These are the libraries checked by Readline. |
| 9020 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5 |
| 9021 | $as_echo_n "checking for library containing tgetent... " >&6; } |
| 9022 | if ${ac_cv_search_tgetent+:} false; then : |
| 9023 | $as_echo_n "(cached) " >&6 |
| 9024 | else |
| 9025 | ac_func_search_save_LIBS=$LIBS |
| 9026 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9027 | /* end confdefs.h. */ |
| 9028 | |
| 9029 | /* Override any GCC internal prototype to avoid an error. |
| 9030 | Use char because int might match the return type of a GCC |
| 9031 | builtin and then its argument prototype would still apply. */ |
| 9032 | #ifdef __cplusplus |
| 9033 | extern "C" |
| 9034 | #endif |
| 9035 | char tgetent (); |
| 9036 | int |
| 9037 | main () |
| 9038 | { |
| 9039 | return tgetent (); |
| 9040 | ; |
| 9041 | return 0; |
| 9042 | } |
| 9043 | _ACEOF |
| 9044 | for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do |
| 9045 | if test -z "$ac_lib"; then |
| 9046 | ac_res="none required" |
| 9047 | else |
| 9048 | ac_res=-l$ac_lib |
| 9049 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
| 9050 | fi |
| 9051 | if ac_fn_c_try_link "$LINENO"; then : |
| 9052 | ac_cv_search_tgetent=$ac_res |
| 9053 | fi |
| 9054 | rm -f core conftest.err conftest.$ac_objext \ |
| 9055 | conftest$ac_exeext |
| 9056 | if ${ac_cv_search_tgetent+:} false; then : |
| 9057 | break |
| 9058 | fi |
| 9059 | done |
| 9060 | if ${ac_cv_search_tgetent+:} false; then : |
| 9061 | |
| 9062 | else |
| 9063 | ac_cv_search_tgetent=no |
| 9064 | fi |
| 9065 | rm conftest.$ac_ext |
| 9066 | LIBS=$ac_func_search_save_LIBS |
| 9067 | fi |
| 9068 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5 |
| 9069 | $as_echo "$ac_cv_search_tgetent" >&6; } |
| 9070 | ac_res=$ac_cv_search_tgetent |
| 9071 | if test "$ac_res" != no; then : |
| 9072 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
| 9073 | |
| 9074 | fi |
| 9075 | |
| 9076 | |
| 9077 | if test "$ac_cv_search_tgetent" = no; then |
| 9078 | CONFIG_OBS="$CONFIG_OBS stub-termcap.o" |
| 9079 | fi |
| 9080 | |
| 9081 | |
| 9082 | # Check whether --with-system-readline was given. |
| 9083 | if test "${with_system_readline+set}" = set; then : |
| 9084 | withval=$with_system_readline; |
| 9085 | fi |
| 9086 | |
| 9087 | |
| 9088 | if test "$with_system_readline" = yes; then |
| 9089 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5 |
| 9090 | $as_echo_n "checking whether system readline is new enough... " >&6; } |
| 9091 | if ${gdb_cv_readline_ok+:} false; then : |
| 9092 | $as_echo_n "(cached) " >&6 |
| 9093 | else |
| 9094 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9095 | /* end confdefs.h. */ |
| 9096 | #include <stdio.h> |
| 9097 | #include <readline/readline.h> |
| 9098 | int |
| 9099 | main () |
| 9100 | { |
| 9101 | #if RL_VERSION_MAJOR < 7 |
| 9102 | # error "readline version 7 required" |
| 9103 | #endif |
| 9104 | ; |
| 9105 | return 0; |
| 9106 | } |
| 9107 | _ACEOF |
| 9108 | if ac_fn_c_try_compile "$LINENO"; then : |
| 9109 | gdb_cv_readline_ok=yes |
| 9110 | else |
| 9111 | gdb_cv_readline_ok=no |
| 9112 | fi |
| 9113 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 9114 | fi |
| 9115 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5 |
| 9116 | $as_echo "$gdb_cv_readline_ok" >&6; } |
| 9117 | if test "$gdb_cv_readline_ok" != yes; then |
| 9118 | as_fn_error $? "system readline is not new enough" "$LINENO" 5 |
| 9119 | fi |
| 9120 | |
| 9121 | READLINE=-lreadline |
| 9122 | READLINE_DEPS= |
| 9123 | READLINE_CFLAGS= |
| 9124 | READLINE_TEXI_INCFLAG= |
| 9125 | else |
| 9126 | READLINE='$(READLINE_DIR)/libreadline.a' |
| 9127 | READLINE_DEPS='$(READLINE)' |
| 9128 | READLINE_CFLAGS='-I$(READLINE_SRC)/..' |
| 9129 | READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)' |
| 9130 | fi |
| 9131 | |
| 9132 | |
| 9133 | |
| 9134 | |
| 9135 | |
| 9136 | # Generate jit-reader.h |
| 9137 | |
| 9138 | # This is typedeffed to GDB_CORE_ADDR in jit-reader.h |
| 9139 | TARGET_PTR= |
| 9140 | |
| 9141 | # The cast to long int works around a bug in the HP C Compiler |
| 9142 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 9143 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 9144 | # This bug is HP SR number 8606223364. |
| 9145 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5 |
| 9146 | $as_echo_n "checking size of unsigned long long... " >&6; } |
| 9147 | if ${ac_cv_sizeof_unsigned_long_long+:} false; then : |
| 9148 | $as_echo_n "(cached) " >&6 |
| 9149 | else |
| 9150 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then : |
| 9151 | |
| 9152 | else |
| 9153 | if test "$ac_cv_type_unsigned_long_long" = yes; then |
| 9154 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 9155 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 9156 | as_fn_error 77 "cannot compute sizeof (unsigned long long) |
| 9157 | See \`config.log' for more details" "$LINENO" 5; } |
| 9158 | else |
| 9159 | ac_cv_sizeof_unsigned_long_long=0 |
| 9160 | fi |
| 9161 | fi |
| 9162 | |
| 9163 | fi |
| 9164 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5 |
| 9165 | $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; } |
| 9166 | |
| 9167 | |
| 9168 | |
| 9169 | cat >>confdefs.h <<_ACEOF |
| 9170 | #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long |
| 9171 | _ACEOF |
| 9172 | |
| 9173 | |
| 9174 | # The cast to long int works around a bug in the HP C Compiler |
| 9175 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 9176 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 9177 | # This bug is HP SR number 8606223364. |
| 9178 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5 |
| 9179 | $as_echo_n "checking size of unsigned long... " >&6; } |
| 9180 | if ${ac_cv_sizeof_unsigned_long+:} false; then : |
| 9181 | $as_echo_n "(cached) " >&6 |
| 9182 | else |
| 9183 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then : |
| 9184 | |
| 9185 | else |
| 9186 | if test "$ac_cv_type_unsigned_long" = yes; then |
| 9187 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 9188 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 9189 | as_fn_error 77 "cannot compute sizeof (unsigned long) |
| 9190 | See \`config.log' for more details" "$LINENO" 5; } |
| 9191 | else |
| 9192 | ac_cv_sizeof_unsigned_long=0 |
| 9193 | fi |
| 9194 | fi |
| 9195 | |
| 9196 | fi |
| 9197 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5 |
| 9198 | $as_echo "$ac_cv_sizeof_unsigned_long" >&6; } |
| 9199 | |
| 9200 | |
| 9201 | |
| 9202 | cat >>confdefs.h <<_ACEOF |
| 9203 | #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long |
| 9204 | _ACEOF |
| 9205 | |
| 9206 | |
| 9207 | # The cast to long int works around a bug in the HP C Compiler |
| 9208 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 9209 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 9210 | # This bug is HP SR number 8606223364. |
| 9211 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5 |
| 9212 | $as_echo_n "checking size of unsigned __int128... " >&6; } |
| 9213 | if ${ac_cv_sizeof_unsigned___int128+:} false; then : |
| 9214 | $as_echo_n "(cached) " >&6 |
| 9215 | else |
| 9216 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then : |
| 9217 | |
| 9218 | else |
| 9219 | if test "$ac_cv_type_unsigned___int128" = yes; then |
| 9220 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 9221 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 9222 | as_fn_error 77 "cannot compute sizeof (unsigned __int128) |
| 9223 | See \`config.log' for more details" "$LINENO" 5; } |
| 9224 | else |
| 9225 | ac_cv_sizeof_unsigned___int128=0 |
| 9226 | fi |
| 9227 | fi |
| 9228 | |
| 9229 | fi |
| 9230 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5 |
| 9231 | $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; } |
| 9232 | |
| 9233 | |
| 9234 | |
| 9235 | cat >>confdefs.h <<_ACEOF |
| 9236 | #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128 |
| 9237 | _ACEOF |
| 9238 | |
| 9239 | |
| 9240 | |
| 9241 | if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then |
| 9242 | TARGET_PTR="unsigned long" |
| 9243 | elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then |
| 9244 | TARGET_PTR="unsigned long long" |
| 9245 | elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then |
| 9246 | TARGET_PTR="unsigned __int128" |
| 9247 | else |
| 9248 | TARGET_PTR="unsigned long" |
| 9249 | fi |
| 9250 | |
| 9251 | |
| 9252 | ac_config_files="$ac_config_files jit-reader.h:jit-reader.in" |
| 9253 | |
| 9254 | |
| 9255 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
| 9256 | $as_echo_n "checking for library containing dlopen... " >&6; } |
| 9257 | if ${ac_cv_search_dlopen+:} false; then : |
| 9258 | $as_echo_n "(cached) " >&6 |
| 9259 | else |
| 9260 | ac_func_search_save_LIBS=$LIBS |
| 9261 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9262 | /* end confdefs.h. */ |
| 9263 | |
| 9264 | /* Override any GCC internal prototype to avoid an error. |
| 9265 | Use char because int might match the return type of a GCC |
| 9266 | builtin and then its argument prototype would still apply. */ |
| 9267 | #ifdef __cplusplus |
| 9268 | extern "C" |
| 9269 | #endif |
| 9270 | char dlopen (); |
| 9271 | int |
| 9272 | main () |
| 9273 | { |
| 9274 | return dlopen (); |
| 9275 | ; |
| 9276 | return 0; |
| 9277 | } |
| 9278 | _ACEOF |
| 9279 | for ac_lib in '' dl; do |
| 9280 | if test -z "$ac_lib"; then |
| 9281 | ac_res="none required" |
| 9282 | else |
| 9283 | ac_res=-l$ac_lib |
| 9284 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
| 9285 | fi |
| 9286 | if ac_fn_c_try_link "$LINENO"; then : |
| 9287 | ac_cv_search_dlopen=$ac_res |
| 9288 | fi |
| 9289 | rm -f core conftest.err conftest.$ac_objext \ |
| 9290 | conftest$ac_exeext |
| 9291 | if ${ac_cv_search_dlopen+:} false; then : |
| 9292 | break |
| 9293 | fi |
| 9294 | done |
| 9295 | if ${ac_cv_search_dlopen+:} false; then : |
| 9296 | |
| 9297 | else |
| 9298 | ac_cv_search_dlopen=no |
| 9299 | fi |
| 9300 | rm conftest.$ac_ext |
| 9301 | LIBS=$ac_func_search_save_LIBS |
| 9302 | fi |
| 9303 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 |
| 9304 | $as_echo "$ac_cv_search_dlopen" >&6; } |
| 9305 | ac_res=$ac_cv_search_dlopen |
| 9306 | if test "$ac_res" != no; then : |
| 9307 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
| 9308 | |
| 9309 | fi |
| 9310 | |
| 9311 | |
| 9312 | |
| 9313 | |
| 9314 | # Check whether --with-jit-reader-dir was given. |
| 9315 | if test "${with_jit_reader_dir+set}" = set; then : |
| 9316 | withval=$with_jit_reader_dir; |
| 9317 | JIT_READER_DIR=$withval |
| 9318 | else |
| 9319 | JIT_READER_DIR=${libdir}/gdb |
| 9320 | fi |
| 9321 | |
| 9322 | |
| 9323 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
| 9324 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
| 9325 | ac_define_dir=`eval echo $JIT_READER_DIR` |
| 9326 | ac_define_dir=`eval echo $ac_define_dir` |
| 9327 | |
| 9328 | cat >>confdefs.h <<_ACEOF |
| 9329 | #define JIT_READER_DIR "$ac_define_dir" |
| 9330 | _ACEOF |
| 9331 | |
| 9332 | |
| 9333 | |
| 9334 | |
| 9335 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
| 9336 | if test "x$prefix" = xNONE; then |
| 9337 | test_prefix=/usr/local |
| 9338 | else |
| 9339 | test_prefix=$prefix |
| 9340 | fi |
| 9341 | else |
| 9342 | test_prefix=$exec_prefix |
| 9343 | fi |
| 9344 | value=0 |
| 9345 | case ${ac_define_dir} in |
| 9346 | "${test_prefix}"|"${test_prefix}/"*|\ |
| 9347 | '${exec_prefix}'|'${exec_prefix}/'*) |
| 9348 | value=1 |
| 9349 | ;; |
| 9350 | esac |
| 9351 | |
| 9352 | cat >>confdefs.h <<_ACEOF |
| 9353 | #define JIT_READER_DIR_RELOCATABLE $value |
| 9354 | _ACEOF |
| 9355 | |
| 9356 | |
| 9357 | |
| 9358 | |
| 9359 | |
| 9360 | # Check whether --with-expat was given. |
| 9361 | if test "${with_expat+set}" = set; then : |
| 9362 | withval=$with_expat; |
| 9363 | else |
| 9364 | with_expat=auto |
| 9365 | fi |
| 9366 | |
| 9367 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5 |
| 9368 | $as_echo_n "checking whether to use expat... " >&6; } |
| 9369 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5 |
| 9370 | $as_echo "$with_expat" >&6; } |
| 9371 | |
| 9372 | if test "${with_expat}" = no; then |
| 9373 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5 |
| 9374 | $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;} |
| 9375 | HAVE_LIBEXPAT=no |
| 9376 | else |
| 9377 | |
| 9378 | |
| 9379 | |
| 9380 | |
| 9381 | |
| 9382 | |
| 9383 | |
| 9384 | |
| 9385 | use_additional=yes |
| 9386 | |
| 9387 | acl_save_prefix="$prefix" |
| 9388 | prefix="$acl_final_prefix" |
| 9389 | acl_save_exec_prefix="$exec_prefix" |
| 9390 | exec_prefix="$acl_final_exec_prefix" |
| 9391 | |
| 9392 | eval additional_includedir=\"$includedir\" |
| 9393 | eval additional_libdir=\"$libdir\" |
| 9394 | |
| 9395 | exec_prefix="$acl_save_exec_prefix" |
| 9396 | prefix="$acl_save_prefix" |
| 9397 | |
| 9398 | |
| 9399 | # Check whether --with-libexpat-prefix was given. |
| 9400 | if test "${with_libexpat_prefix+set}" = set; then : |
| 9401 | withval=$with_libexpat_prefix; |
| 9402 | if test "X$withval" = "Xno"; then |
| 9403 | use_additional=no |
| 9404 | else |
| 9405 | if test "X$withval" = "X"; then |
| 9406 | |
| 9407 | acl_save_prefix="$prefix" |
| 9408 | prefix="$acl_final_prefix" |
| 9409 | acl_save_exec_prefix="$exec_prefix" |
| 9410 | exec_prefix="$acl_final_exec_prefix" |
| 9411 | |
| 9412 | eval additional_includedir=\"$includedir\" |
| 9413 | eval additional_libdir=\"$libdir\" |
| 9414 | |
| 9415 | exec_prefix="$acl_save_exec_prefix" |
| 9416 | prefix="$acl_save_prefix" |
| 9417 | |
| 9418 | else |
| 9419 | additional_includedir="$withval/include" |
| 9420 | additional_libdir="$withval/lib" |
| 9421 | fi |
| 9422 | fi |
| 9423 | |
| 9424 | fi |
| 9425 | |
| 9426 | |
| 9427 | # Check whether --with-libexpat-type was given. |
| 9428 | if test "${with_libexpat_type+set}" = set; then : |
| 9429 | withval=$with_libexpat_type; with_libexpat_type=$withval |
| 9430 | else |
| 9431 | with_libexpat_type=auto |
| 9432 | fi |
| 9433 | |
| 9434 | lib_type=`eval echo \$with_libexpat_type` |
| 9435 | |
| 9436 | LIBEXPAT= |
| 9437 | LTLIBEXPAT= |
| 9438 | INCEXPAT= |
| 9439 | rpathdirs= |
| 9440 | ltrpathdirs= |
| 9441 | names_already_handled= |
| 9442 | names_next_round='expat ' |
| 9443 | while test -n "$names_next_round"; do |
| 9444 | names_this_round="$names_next_round" |
| 9445 | names_next_round= |
| 9446 | for name in $names_this_round; do |
| 9447 | already_handled= |
| 9448 | for n in $names_already_handled; do |
| 9449 | if test "$n" = "$name"; then |
| 9450 | already_handled=yes |
| 9451 | break |
| 9452 | fi |
| 9453 | done |
| 9454 | if test -z "$already_handled"; then |
| 9455 | names_already_handled="$names_already_handled $name" |
| 9456 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` |
| 9457 | eval value=\"\$HAVE_LIB$uppername\" |
| 9458 | if test -n "$value"; then |
| 9459 | if test "$value" = yes; then |
| 9460 | eval value=\"\$LIB$uppername\" |
| 9461 | test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value" |
| 9462 | eval value=\"\$LTLIB$uppername\" |
| 9463 | test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value" |
| 9464 | else |
| 9465 | : |
| 9466 | fi |
| 9467 | else |
| 9468 | found_dir= |
| 9469 | found_la= |
| 9470 | found_so= |
| 9471 | found_a= |
| 9472 | if test $use_additional = yes; then |
| 9473 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
| 9474 | found_dir="$additional_libdir" |
| 9475 | found_so="$additional_libdir/lib$name.$shlibext" |
| 9476 | if test -f "$additional_libdir/lib$name.la"; then |
| 9477 | found_la="$additional_libdir/lib$name.la" |
| 9478 | fi |
| 9479 | elif test x$lib_type != xshared; then |
| 9480 | if test -f "$additional_libdir/lib$name.$libext"; then |
| 9481 | found_dir="$additional_libdir" |
| 9482 | found_a="$additional_libdir/lib$name.$libext" |
| 9483 | if test -f "$additional_libdir/lib$name.la"; then |
| 9484 | found_la="$additional_libdir/lib$name.la" |
| 9485 | fi |
| 9486 | fi |
| 9487 | fi |
| 9488 | fi |
| 9489 | if test "X$found_dir" = "X"; then |
| 9490 | for x in $LDFLAGS $LTLIBEXPAT; do |
| 9491 | |
| 9492 | acl_save_prefix="$prefix" |
| 9493 | prefix="$acl_final_prefix" |
| 9494 | acl_save_exec_prefix="$exec_prefix" |
| 9495 | exec_prefix="$acl_final_exec_prefix" |
| 9496 | eval x=\"$x\" |
| 9497 | exec_prefix="$acl_save_exec_prefix" |
| 9498 | prefix="$acl_save_prefix" |
| 9499 | |
| 9500 | case "$x" in |
| 9501 | -L*) |
| 9502 | dir=`echo "X$x" | sed -e 's/^X-L//'` |
| 9503 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
| 9504 | found_dir="$dir" |
| 9505 | found_so="$dir/lib$name.$shlibext" |
| 9506 | if test -f "$dir/lib$name.la"; then |
| 9507 | found_la="$dir/lib$name.la" |
| 9508 | fi |
| 9509 | elif test x$lib_type != xshared; then |
| 9510 | if test -f "$dir/lib$name.$libext"; then |
| 9511 | found_dir="$dir" |
| 9512 | found_a="$dir/lib$name.$libext" |
| 9513 | if test -f "$dir/lib$name.la"; then |
| 9514 | found_la="$dir/lib$name.la" |
| 9515 | fi |
| 9516 | fi |
| 9517 | fi |
| 9518 | ;; |
| 9519 | esac |
| 9520 | if test "X$found_dir" != "X"; then |
| 9521 | break |
| 9522 | fi |
| 9523 | done |
| 9524 | fi |
| 9525 | if test "X$found_dir" != "X"; then |
| 9526 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name" |
| 9527 | if test "X$found_so" != "X"; then |
| 9528 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then |
| 9529 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" |
| 9530 | else |
| 9531 | haveit= |
| 9532 | for x in $ltrpathdirs; do |
| 9533 | if test "X$x" = "X$found_dir"; then |
| 9534 | haveit=yes |
| 9535 | break |
| 9536 | fi |
| 9537 | done |
| 9538 | if test -z "$haveit"; then |
| 9539 | ltrpathdirs="$ltrpathdirs $found_dir" |
| 9540 | fi |
| 9541 | if test "$hardcode_direct" = yes; then |
| 9542 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" |
| 9543 | else |
| 9544 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then |
| 9545 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" |
| 9546 | haveit= |
| 9547 | for x in $rpathdirs; do |
| 9548 | if test "X$x" = "X$found_dir"; then |
| 9549 | haveit=yes |
| 9550 | break |
| 9551 | fi |
| 9552 | done |
| 9553 | if test -z "$haveit"; then |
| 9554 | rpathdirs="$rpathdirs $found_dir" |
| 9555 | fi |
| 9556 | else |
| 9557 | haveit= |
| 9558 | for x in $LDFLAGS $LIBEXPAT; do |
| 9559 | |
| 9560 | acl_save_prefix="$prefix" |
| 9561 | prefix="$acl_final_prefix" |
| 9562 | acl_save_exec_prefix="$exec_prefix" |
| 9563 | exec_prefix="$acl_final_exec_prefix" |
| 9564 | eval x=\"$x\" |
| 9565 | exec_prefix="$acl_save_exec_prefix" |
| 9566 | prefix="$acl_save_prefix" |
| 9567 | |
| 9568 | if test "X$x" = "X-L$found_dir"; then |
| 9569 | haveit=yes |
| 9570 | break |
| 9571 | fi |
| 9572 | done |
| 9573 | if test -z "$haveit"; then |
| 9574 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir" |
| 9575 | fi |
| 9576 | if test "$hardcode_minus_L" != no; then |
| 9577 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so" |
| 9578 | else |
| 9579 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" |
| 9580 | fi |
| 9581 | fi |
| 9582 | fi |
| 9583 | fi |
| 9584 | else |
| 9585 | if test "X$found_a" != "X"; then |
| 9586 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a" |
| 9587 | else |
| 9588 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name" |
| 9589 | fi |
| 9590 | fi |
| 9591 | additional_includedir= |
| 9592 | case "$found_dir" in |
| 9593 | */lib | */lib/) |
| 9594 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` |
| 9595 | additional_includedir="$basedir/include" |
| 9596 | ;; |
| 9597 | esac |
| 9598 | if test "X$additional_includedir" != "X"; then |
| 9599 | if test "X$additional_includedir" != "X/usr/include"; then |
| 9600 | haveit= |
| 9601 | if test "X$additional_includedir" = "X/usr/local/include"; then |
| 9602 | if test -n "$GCC"; then |
| 9603 | case $host_os in |
| 9604 | linux*) haveit=yes;; |
| 9605 | esac |
| 9606 | fi |
| 9607 | fi |
| 9608 | if test -z "$haveit"; then |
| 9609 | for x in $CPPFLAGS $INCEXPAT; do |
| 9610 | |
| 9611 | acl_save_prefix="$prefix" |
| 9612 | prefix="$acl_final_prefix" |
| 9613 | acl_save_exec_prefix="$exec_prefix" |
| 9614 | exec_prefix="$acl_final_exec_prefix" |
| 9615 | eval x=\"$x\" |
| 9616 | exec_prefix="$acl_save_exec_prefix" |
| 9617 | prefix="$acl_save_prefix" |
| 9618 | |
| 9619 | if test "X$x" = "X-I$additional_includedir"; then |
| 9620 | haveit=yes |
| 9621 | break |
| 9622 | fi |
| 9623 | done |
| 9624 | if test -z "$haveit"; then |
| 9625 | if test -d "$additional_includedir"; then |
| 9626 | INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir" |
| 9627 | fi |
| 9628 | fi |
| 9629 | fi |
| 9630 | fi |
| 9631 | fi |
| 9632 | if test -n "$found_la"; then |
| 9633 | save_libdir="$libdir" |
| 9634 | case "$found_la" in |
| 9635 | */* | *\\*) . "$found_la" ;; |
| 9636 | *) . "./$found_la" ;; |
| 9637 | esac |
| 9638 | libdir="$save_libdir" |
| 9639 | for dep in $dependency_libs; do |
| 9640 | case "$dep" in |
| 9641 | -L*) |
| 9642 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` |
| 9643 | if test "X$additional_libdir" != "X/usr/lib"; then |
| 9644 | haveit= |
| 9645 | if test "X$additional_libdir" = "X/usr/local/lib"; then |
| 9646 | if test -n "$GCC"; then |
| 9647 | case $host_os in |
| 9648 | linux*) haveit=yes;; |
| 9649 | esac |
| 9650 | fi |
| 9651 | fi |
| 9652 | if test -z "$haveit"; then |
| 9653 | haveit= |
| 9654 | for x in $LDFLAGS $LIBEXPAT; do |
| 9655 | |
| 9656 | acl_save_prefix="$prefix" |
| 9657 | prefix="$acl_final_prefix" |
| 9658 | acl_save_exec_prefix="$exec_prefix" |
| 9659 | exec_prefix="$acl_final_exec_prefix" |
| 9660 | eval x=\"$x\" |
| 9661 | exec_prefix="$acl_save_exec_prefix" |
| 9662 | prefix="$acl_save_prefix" |
| 9663 | |
| 9664 | if test "X$x" = "X-L$additional_libdir"; then |
| 9665 | haveit=yes |
| 9666 | break |
| 9667 | fi |
| 9668 | done |
| 9669 | if test -z "$haveit"; then |
| 9670 | if test -d "$additional_libdir"; then |
| 9671 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir" |
| 9672 | fi |
| 9673 | fi |
| 9674 | haveit= |
| 9675 | for x in $LDFLAGS $LTLIBEXPAT; do |
| 9676 | |
| 9677 | acl_save_prefix="$prefix" |
| 9678 | prefix="$acl_final_prefix" |
| 9679 | acl_save_exec_prefix="$exec_prefix" |
| 9680 | exec_prefix="$acl_final_exec_prefix" |
| 9681 | eval x=\"$x\" |
| 9682 | exec_prefix="$acl_save_exec_prefix" |
| 9683 | prefix="$acl_save_prefix" |
| 9684 | |
| 9685 | if test "X$x" = "X-L$additional_libdir"; then |
| 9686 | haveit=yes |
| 9687 | break |
| 9688 | fi |
| 9689 | done |
| 9690 | if test -z "$haveit"; then |
| 9691 | if test -d "$additional_libdir"; then |
| 9692 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir" |
| 9693 | fi |
| 9694 | fi |
| 9695 | fi |
| 9696 | fi |
| 9697 | ;; |
| 9698 | -R*) |
| 9699 | dir=`echo "X$dep" | sed -e 's/^X-R//'` |
| 9700 | if test "$enable_rpath" != no; then |
| 9701 | haveit= |
| 9702 | for x in $rpathdirs; do |
| 9703 | if test "X$x" = "X$dir"; then |
| 9704 | haveit=yes |
| 9705 | break |
| 9706 | fi |
| 9707 | done |
| 9708 | if test -z "$haveit"; then |
| 9709 | rpathdirs="$rpathdirs $dir" |
| 9710 | fi |
| 9711 | haveit= |
| 9712 | for x in $ltrpathdirs; do |
| 9713 | if test "X$x" = "X$dir"; then |
| 9714 | haveit=yes |
| 9715 | break |
| 9716 | fi |
| 9717 | done |
| 9718 | if test -z "$haveit"; then |
| 9719 | ltrpathdirs="$ltrpathdirs $dir" |
| 9720 | fi |
| 9721 | fi |
| 9722 | ;; |
| 9723 | -l*) |
| 9724 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` |
| 9725 | ;; |
| 9726 | *.la) |
| 9727 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` |
| 9728 | ;; |
| 9729 | *) |
| 9730 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep" |
| 9731 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep" |
| 9732 | ;; |
| 9733 | esac |
| 9734 | done |
| 9735 | fi |
| 9736 | else |
| 9737 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
| 9738 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name" |
| 9739 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name" |
| 9740 | else |
| 9741 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l:lib$name.$libext" |
| 9742 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l:lib$name.$libext" |
| 9743 | fi |
| 9744 | fi |
| 9745 | fi |
| 9746 | fi |
| 9747 | done |
| 9748 | done |
| 9749 | if test "X$rpathdirs" != "X"; then |
| 9750 | if test -n "$hardcode_libdir_separator"; then |
| 9751 | alldirs= |
| 9752 | for found_dir in $rpathdirs; do |
| 9753 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" |
| 9754 | done |
| 9755 | acl_save_libdir="$libdir" |
| 9756 | libdir="$alldirs" |
| 9757 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 9758 | libdir="$acl_save_libdir" |
| 9759 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" |
| 9760 | else |
| 9761 | for found_dir in $rpathdirs; do |
| 9762 | acl_save_libdir="$libdir" |
| 9763 | libdir="$found_dir" |
| 9764 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 9765 | libdir="$acl_save_libdir" |
| 9766 | LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag" |
| 9767 | done |
| 9768 | fi |
| 9769 | fi |
| 9770 | if test "X$ltrpathdirs" != "X"; then |
| 9771 | for found_dir in $ltrpathdirs; do |
| 9772 | LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir" |
| 9773 | done |
| 9774 | fi |
| 9775 | |
| 9776 | |
| 9777 | ac_save_CPPFLAGS="$CPPFLAGS" |
| 9778 | |
| 9779 | for element in $INCEXPAT; do |
| 9780 | haveit= |
| 9781 | for x in $CPPFLAGS; do |
| 9782 | |
| 9783 | acl_save_prefix="$prefix" |
| 9784 | prefix="$acl_final_prefix" |
| 9785 | acl_save_exec_prefix="$exec_prefix" |
| 9786 | exec_prefix="$acl_final_exec_prefix" |
| 9787 | eval x=\"$x\" |
| 9788 | exec_prefix="$acl_save_exec_prefix" |
| 9789 | prefix="$acl_save_prefix" |
| 9790 | |
| 9791 | if test "X$x" = "X$element"; then |
| 9792 | haveit=yes |
| 9793 | break |
| 9794 | fi |
| 9795 | done |
| 9796 | if test -z "$haveit"; then |
| 9797 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" |
| 9798 | fi |
| 9799 | done |
| 9800 | |
| 9801 | |
| 9802 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5 |
| 9803 | $as_echo_n "checking for libexpat... " >&6; } |
| 9804 | if ${ac_cv_libexpat+:} false; then : |
| 9805 | $as_echo_n "(cached) " >&6 |
| 9806 | else |
| 9807 | |
| 9808 | ac_save_LIBS="$LIBS" |
| 9809 | LIBS="$LIBS $LIBEXPAT" |
| 9810 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 9811 | /* end confdefs.h. */ |
| 9812 | #include "expat.h" |
| 9813 | int |
| 9814 | main () |
| 9815 | { |
| 9816 | XML_Parser p = XML_ParserCreate (0); |
| 9817 | ; |
| 9818 | return 0; |
| 9819 | } |
| 9820 | _ACEOF |
| 9821 | if ac_fn_c_try_link "$LINENO"; then : |
| 9822 | ac_cv_libexpat=yes |
| 9823 | else |
| 9824 | ac_cv_libexpat=no |
| 9825 | fi |
| 9826 | rm -f core conftest.err conftest.$ac_objext \ |
| 9827 | conftest$ac_exeext conftest.$ac_ext |
| 9828 | LIBS="$ac_save_LIBS" |
| 9829 | |
| 9830 | fi |
| 9831 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5 |
| 9832 | $as_echo "$ac_cv_libexpat" >&6; } |
| 9833 | if test "$ac_cv_libexpat" = yes; then |
| 9834 | HAVE_LIBEXPAT=yes |
| 9835 | |
| 9836 | $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h |
| 9837 | |
| 9838 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5 |
| 9839 | $as_echo_n "checking how to link with libexpat... " >&6; } |
| 9840 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5 |
| 9841 | $as_echo "$LIBEXPAT" >&6; } |
| 9842 | else |
| 9843 | HAVE_LIBEXPAT=no |
| 9844 | CPPFLAGS="$ac_save_CPPFLAGS" |
| 9845 | LIBEXPAT= |
| 9846 | LTLIBEXPAT= |
| 9847 | fi |
| 9848 | |
| 9849 | |
| 9850 | |
| 9851 | |
| 9852 | |
| 9853 | |
| 9854 | if test "$HAVE_LIBEXPAT" != yes; then |
| 9855 | if test "$with_expat" = yes; then |
| 9856 | as_fn_error $? "expat is missing or unusable" "$LINENO" 5 |
| 9857 | else |
| 9858 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5 |
| 9859 | $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;} |
| 9860 | fi |
| 9861 | else |
| 9862 | save_LIBS=$LIBS |
| 9863 | LIBS="$LIBS $LIBEXPAT" |
| 9864 | for ac_func in XML_StopParser |
| 9865 | do : |
| 9866 | ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser" |
| 9867 | if test "x$ac_cv_func_XML_StopParser" = xyes; then : |
| 9868 | cat >>confdefs.h <<_ACEOF |
| 9869 | #define HAVE_XML_STOPPARSER 1 |
| 9870 | _ACEOF |
| 9871 | |
| 9872 | fi |
| 9873 | done |
| 9874 | |
| 9875 | LIBS=$save_LIBS |
| 9876 | fi |
| 9877 | fi |
| 9878 | |
| 9879 | |
| 9880 | # Check whether --with-mpfr was given. |
| 9881 | if test "${with_mpfr+set}" = set; then : |
| 9882 | withval=$with_mpfr; |
| 9883 | else |
| 9884 | with_mpfr=auto |
| 9885 | fi |
| 9886 | |
| 9887 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5 |
| 9888 | $as_echo_n "checking whether to use MPFR... " >&6; } |
| 9889 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5 |
| 9890 | $as_echo "$with_mpfr" >&6; } |
| 9891 | |
| 9892 | if test "${with_mpfr}" = no; then |
| 9893 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5 |
| 9894 | $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;} |
| 9895 | HAVE_LIBMPFR=no |
| 9896 | else |
| 9897 | |
| 9898 | |
| 9899 | |
| 9900 | |
| 9901 | |
| 9902 | |
| 9903 | |
| 9904 | |
| 9905 | use_additional=yes |
| 9906 | |
| 9907 | acl_save_prefix="$prefix" |
| 9908 | prefix="$acl_final_prefix" |
| 9909 | acl_save_exec_prefix="$exec_prefix" |
| 9910 | exec_prefix="$acl_final_exec_prefix" |
| 9911 | |
| 9912 | eval additional_includedir=\"$includedir\" |
| 9913 | eval additional_libdir=\"$libdir\" |
| 9914 | |
| 9915 | exec_prefix="$acl_save_exec_prefix" |
| 9916 | prefix="$acl_save_prefix" |
| 9917 | |
| 9918 | |
| 9919 | # Check whether --with-libmpfr-prefix was given. |
| 9920 | if test "${with_libmpfr_prefix+set}" = set; then : |
| 9921 | withval=$with_libmpfr_prefix; |
| 9922 | if test "X$withval" = "Xno"; then |
| 9923 | use_additional=no |
| 9924 | else |
| 9925 | if test "X$withval" = "X"; then |
| 9926 | |
| 9927 | acl_save_prefix="$prefix" |
| 9928 | prefix="$acl_final_prefix" |
| 9929 | acl_save_exec_prefix="$exec_prefix" |
| 9930 | exec_prefix="$acl_final_exec_prefix" |
| 9931 | |
| 9932 | eval additional_includedir=\"$includedir\" |
| 9933 | eval additional_libdir=\"$libdir\" |
| 9934 | |
| 9935 | exec_prefix="$acl_save_exec_prefix" |
| 9936 | prefix="$acl_save_prefix" |
| 9937 | |
| 9938 | else |
| 9939 | additional_includedir="$withval/include" |
| 9940 | additional_libdir="$withval/lib" |
| 9941 | fi |
| 9942 | fi |
| 9943 | |
| 9944 | fi |
| 9945 | |
| 9946 | |
| 9947 | # Check whether --with-libmpfr-type was given. |
| 9948 | if test "${with_libmpfr_type+set}" = set; then : |
| 9949 | withval=$with_libmpfr_type; with_libmpfr_type=$withval |
| 9950 | else |
| 9951 | with_libmpfr_type=auto |
| 9952 | fi |
| 9953 | |
| 9954 | lib_type=`eval echo \$with_libmpfr_type` |
| 9955 | |
| 9956 | LIBMPFR= |
| 9957 | LTLIBMPFR= |
| 9958 | INCMPFR= |
| 9959 | rpathdirs= |
| 9960 | ltrpathdirs= |
| 9961 | names_already_handled= |
| 9962 | names_next_round='mpfr gmp' |
| 9963 | while test -n "$names_next_round"; do |
| 9964 | names_this_round="$names_next_round" |
| 9965 | names_next_round= |
| 9966 | for name in $names_this_round; do |
| 9967 | already_handled= |
| 9968 | for n in $names_already_handled; do |
| 9969 | if test "$n" = "$name"; then |
| 9970 | already_handled=yes |
| 9971 | break |
| 9972 | fi |
| 9973 | done |
| 9974 | if test -z "$already_handled"; then |
| 9975 | names_already_handled="$names_already_handled $name" |
| 9976 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` |
| 9977 | eval value=\"\$HAVE_LIB$uppername\" |
| 9978 | if test -n "$value"; then |
| 9979 | if test "$value" = yes; then |
| 9980 | eval value=\"\$LIB$uppername\" |
| 9981 | test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value" |
| 9982 | eval value=\"\$LTLIB$uppername\" |
| 9983 | test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value" |
| 9984 | else |
| 9985 | : |
| 9986 | fi |
| 9987 | else |
| 9988 | found_dir= |
| 9989 | found_la= |
| 9990 | found_so= |
| 9991 | found_a= |
| 9992 | if test $use_additional = yes; then |
| 9993 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
| 9994 | found_dir="$additional_libdir" |
| 9995 | found_so="$additional_libdir/lib$name.$shlibext" |
| 9996 | if test -f "$additional_libdir/lib$name.la"; then |
| 9997 | found_la="$additional_libdir/lib$name.la" |
| 9998 | fi |
| 9999 | elif test x$lib_type != xshared; then |
| 10000 | if test -f "$additional_libdir/lib$name.$libext"; then |
| 10001 | found_dir="$additional_libdir" |
| 10002 | found_a="$additional_libdir/lib$name.$libext" |
| 10003 | if test -f "$additional_libdir/lib$name.la"; then |
| 10004 | found_la="$additional_libdir/lib$name.la" |
| 10005 | fi |
| 10006 | fi |
| 10007 | fi |
| 10008 | fi |
| 10009 | if test "X$found_dir" = "X"; then |
| 10010 | for x in $LDFLAGS $LTLIBMPFR; do |
| 10011 | |
| 10012 | acl_save_prefix="$prefix" |
| 10013 | prefix="$acl_final_prefix" |
| 10014 | acl_save_exec_prefix="$exec_prefix" |
| 10015 | exec_prefix="$acl_final_exec_prefix" |
| 10016 | eval x=\"$x\" |
| 10017 | exec_prefix="$acl_save_exec_prefix" |
| 10018 | prefix="$acl_save_prefix" |
| 10019 | |
| 10020 | case "$x" in |
| 10021 | -L*) |
| 10022 | dir=`echo "X$x" | sed -e 's/^X-L//'` |
| 10023 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
| 10024 | found_dir="$dir" |
| 10025 | found_so="$dir/lib$name.$shlibext" |
| 10026 | if test -f "$dir/lib$name.la"; then |
| 10027 | found_la="$dir/lib$name.la" |
| 10028 | fi |
| 10029 | elif test x$lib_type != xshared; then |
| 10030 | if test -f "$dir/lib$name.$libext"; then |
| 10031 | found_dir="$dir" |
| 10032 | found_a="$dir/lib$name.$libext" |
| 10033 | if test -f "$dir/lib$name.la"; then |
| 10034 | found_la="$dir/lib$name.la" |
| 10035 | fi |
| 10036 | fi |
| 10037 | fi |
| 10038 | ;; |
| 10039 | esac |
| 10040 | if test "X$found_dir" != "X"; then |
| 10041 | break |
| 10042 | fi |
| 10043 | done |
| 10044 | fi |
| 10045 | if test "X$found_dir" != "X"; then |
| 10046 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name" |
| 10047 | if test "X$found_so" != "X"; then |
| 10048 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then |
| 10049 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" |
| 10050 | else |
| 10051 | haveit= |
| 10052 | for x in $ltrpathdirs; do |
| 10053 | if test "X$x" = "X$found_dir"; then |
| 10054 | haveit=yes |
| 10055 | break |
| 10056 | fi |
| 10057 | done |
| 10058 | if test -z "$haveit"; then |
| 10059 | ltrpathdirs="$ltrpathdirs $found_dir" |
| 10060 | fi |
| 10061 | if test "$hardcode_direct" = yes; then |
| 10062 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" |
| 10063 | else |
| 10064 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then |
| 10065 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" |
| 10066 | haveit= |
| 10067 | for x in $rpathdirs; do |
| 10068 | if test "X$x" = "X$found_dir"; then |
| 10069 | haveit=yes |
| 10070 | break |
| 10071 | fi |
| 10072 | done |
| 10073 | if test -z "$haveit"; then |
| 10074 | rpathdirs="$rpathdirs $found_dir" |
| 10075 | fi |
| 10076 | else |
| 10077 | haveit= |
| 10078 | for x in $LDFLAGS $LIBMPFR; do |
| 10079 | |
| 10080 | acl_save_prefix="$prefix" |
| 10081 | prefix="$acl_final_prefix" |
| 10082 | acl_save_exec_prefix="$exec_prefix" |
| 10083 | exec_prefix="$acl_final_exec_prefix" |
| 10084 | eval x=\"$x\" |
| 10085 | exec_prefix="$acl_save_exec_prefix" |
| 10086 | prefix="$acl_save_prefix" |
| 10087 | |
| 10088 | if test "X$x" = "X-L$found_dir"; then |
| 10089 | haveit=yes |
| 10090 | break |
| 10091 | fi |
| 10092 | done |
| 10093 | if test -z "$haveit"; then |
| 10094 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir" |
| 10095 | fi |
| 10096 | if test "$hardcode_minus_L" != no; then |
| 10097 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so" |
| 10098 | else |
| 10099 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" |
| 10100 | fi |
| 10101 | fi |
| 10102 | fi |
| 10103 | fi |
| 10104 | else |
| 10105 | if test "X$found_a" != "X"; then |
| 10106 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a" |
| 10107 | else |
| 10108 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name" |
| 10109 | fi |
| 10110 | fi |
| 10111 | additional_includedir= |
| 10112 | case "$found_dir" in |
| 10113 | */lib | */lib/) |
| 10114 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` |
| 10115 | additional_includedir="$basedir/include" |
| 10116 | ;; |
| 10117 | esac |
| 10118 | if test "X$additional_includedir" != "X"; then |
| 10119 | if test "X$additional_includedir" != "X/usr/include"; then |
| 10120 | haveit= |
| 10121 | if test "X$additional_includedir" = "X/usr/local/include"; then |
| 10122 | if test -n "$GCC"; then |
| 10123 | case $host_os in |
| 10124 | linux*) haveit=yes;; |
| 10125 | esac |
| 10126 | fi |
| 10127 | fi |
| 10128 | if test -z "$haveit"; then |
| 10129 | for x in $CPPFLAGS $INCMPFR; do |
| 10130 | |
| 10131 | acl_save_prefix="$prefix" |
| 10132 | prefix="$acl_final_prefix" |
| 10133 | acl_save_exec_prefix="$exec_prefix" |
| 10134 | exec_prefix="$acl_final_exec_prefix" |
| 10135 | eval x=\"$x\" |
| 10136 | exec_prefix="$acl_save_exec_prefix" |
| 10137 | prefix="$acl_save_prefix" |
| 10138 | |
| 10139 | if test "X$x" = "X-I$additional_includedir"; then |
| 10140 | haveit=yes |
| 10141 | break |
| 10142 | fi |
| 10143 | done |
| 10144 | if test -z "$haveit"; then |
| 10145 | if test -d "$additional_includedir"; then |
| 10146 | INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir" |
| 10147 | fi |
| 10148 | fi |
| 10149 | fi |
| 10150 | fi |
| 10151 | fi |
| 10152 | if test -n "$found_la"; then |
| 10153 | save_libdir="$libdir" |
| 10154 | case "$found_la" in |
| 10155 | */* | *\\*) . "$found_la" ;; |
| 10156 | *) . "./$found_la" ;; |
| 10157 | esac |
| 10158 | libdir="$save_libdir" |
| 10159 | for dep in $dependency_libs; do |
| 10160 | case "$dep" in |
| 10161 | -L*) |
| 10162 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` |
| 10163 | if test "X$additional_libdir" != "X/usr/lib"; then |
| 10164 | haveit= |
| 10165 | if test "X$additional_libdir" = "X/usr/local/lib"; then |
| 10166 | if test -n "$GCC"; then |
| 10167 | case $host_os in |
| 10168 | linux*) haveit=yes;; |
| 10169 | esac |
| 10170 | fi |
| 10171 | fi |
| 10172 | if test -z "$haveit"; then |
| 10173 | haveit= |
| 10174 | for x in $LDFLAGS $LIBMPFR; do |
| 10175 | |
| 10176 | acl_save_prefix="$prefix" |
| 10177 | prefix="$acl_final_prefix" |
| 10178 | acl_save_exec_prefix="$exec_prefix" |
| 10179 | exec_prefix="$acl_final_exec_prefix" |
| 10180 | eval x=\"$x\" |
| 10181 | exec_prefix="$acl_save_exec_prefix" |
| 10182 | prefix="$acl_save_prefix" |
| 10183 | |
| 10184 | if test "X$x" = "X-L$additional_libdir"; then |
| 10185 | haveit=yes |
| 10186 | break |
| 10187 | fi |
| 10188 | done |
| 10189 | if test -z "$haveit"; then |
| 10190 | if test -d "$additional_libdir"; then |
| 10191 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir" |
| 10192 | fi |
| 10193 | fi |
| 10194 | haveit= |
| 10195 | for x in $LDFLAGS $LTLIBMPFR; do |
| 10196 | |
| 10197 | acl_save_prefix="$prefix" |
| 10198 | prefix="$acl_final_prefix" |
| 10199 | acl_save_exec_prefix="$exec_prefix" |
| 10200 | exec_prefix="$acl_final_exec_prefix" |
| 10201 | eval x=\"$x\" |
| 10202 | exec_prefix="$acl_save_exec_prefix" |
| 10203 | prefix="$acl_save_prefix" |
| 10204 | |
| 10205 | if test "X$x" = "X-L$additional_libdir"; then |
| 10206 | haveit=yes |
| 10207 | break |
| 10208 | fi |
| 10209 | done |
| 10210 | if test -z "$haveit"; then |
| 10211 | if test -d "$additional_libdir"; then |
| 10212 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir" |
| 10213 | fi |
| 10214 | fi |
| 10215 | fi |
| 10216 | fi |
| 10217 | ;; |
| 10218 | -R*) |
| 10219 | dir=`echo "X$dep" | sed -e 's/^X-R//'` |
| 10220 | if test "$enable_rpath" != no; then |
| 10221 | haveit= |
| 10222 | for x in $rpathdirs; do |
| 10223 | if test "X$x" = "X$dir"; then |
| 10224 | haveit=yes |
| 10225 | break |
| 10226 | fi |
| 10227 | done |
| 10228 | if test -z "$haveit"; then |
| 10229 | rpathdirs="$rpathdirs $dir" |
| 10230 | fi |
| 10231 | haveit= |
| 10232 | for x in $ltrpathdirs; do |
| 10233 | if test "X$x" = "X$dir"; then |
| 10234 | haveit=yes |
| 10235 | break |
| 10236 | fi |
| 10237 | done |
| 10238 | if test -z "$haveit"; then |
| 10239 | ltrpathdirs="$ltrpathdirs $dir" |
| 10240 | fi |
| 10241 | fi |
| 10242 | ;; |
| 10243 | -l*) |
| 10244 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` |
| 10245 | ;; |
| 10246 | *.la) |
| 10247 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` |
| 10248 | ;; |
| 10249 | *) |
| 10250 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep" |
| 10251 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep" |
| 10252 | ;; |
| 10253 | esac |
| 10254 | done |
| 10255 | fi |
| 10256 | else |
| 10257 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
| 10258 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name" |
| 10259 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name" |
| 10260 | else |
| 10261 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l:lib$name.$libext" |
| 10262 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l:lib$name.$libext" |
| 10263 | fi |
| 10264 | fi |
| 10265 | fi |
| 10266 | fi |
| 10267 | done |
| 10268 | done |
| 10269 | if test "X$rpathdirs" != "X"; then |
| 10270 | if test -n "$hardcode_libdir_separator"; then |
| 10271 | alldirs= |
| 10272 | for found_dir in $rpathdirs; do |
| 10273 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" |
| 10274 | done |
| 10275 | acl_save_libdir="$libdir" |
| 10276 | libdir="$alldirs" |
| 10277 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 10278 | libdir="$acl_save_libdir" |
| 10279 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" |
| 10280 | else |
| 10281 | for found_dir in $rpathdirs; do |
| 10282 | acl_save_libdir="$libdir" |
| 10283 | libdir="$found_dir" |
| 10284 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 10285 | libdir="$acl_save_libdir" |
| 10286 | LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag" |
| 10287 | done |
| 10288 | fi |
| 10289 | fi |
| 10290 | if test "X$ltrpathdirs" != "X"; then |
| 10291 | for found_dir in $ltrpathdirs; do |
| 10292 | LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir" |
| 10293 | done |
| 10294 | fi |
| 10295 | |
| 10296 | |
| 10297 | ac_save_CPPFLAGS="$CPPFLAGS" |
| 10298 | |
| 10299 | for element in $INCMPFR; do |
| 10300 | haveit= |
| 10301 | for x in $CPPFLAGS; do |
| 10302 | |
| 10303 | acl_save_prefix="$prefix" |
| 10304 | prefix="$acl_final_prefix" |
| 10305 | acl_save_exec_prefix="$exec_prefix" |
| 10306 | exec_prefix="$acl_final_exec_prefix" |
| 10307 | eval x=\"$x\" |
| 10308 | exec_prefix="$acl_save_exec_prefix" |
| 10309 | prefix="$acl_save_prefix" |
| 10310 | |
| 10311 | if test "X$x" = "X$element"; then |
| 10312 | haveit=yes |
| 10313 | break |
| 10314 | fi |
| 10315 | done |
| 10316 | if test -z "$haveit"; then |
| 10317 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" |
| 10318 | fi |
| 10319 | done |
| 10320 | |
| 10321 | |
| 10322 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5 |
| 10323 | $as_echo_n "checking for libmpfr... " >&6; } |
| 10324 | if ${ac_cv_libmpfr+:} false; then : |
| 10325 | $as_echo_n "(cached) " >&6 |
| 10326 | else |
| 10327 | |
| 10328 | ac_save_LIBS="$LIBS" |
| 10329 | LIBS="$LIBS $LIBMPFR" |
| 10330 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 10331 | /* end confdefs.h. */ |
| 10332 | #include <mpfr.h> |
| 10333 | int |
| 10334 | main () |
| 10335 | { |
| 10336 | mpfr_exp_t exp; mpfr_t x; |
| 10337 | mpfr_frexp (&exp, x, x, MPFR_RNDN); |
| 10338 | ; |
| 10339 | return 0; |
| 10340 | } |
| 10341 | _ACEOF |
| 10342 | if ac_fn_c_try_link "$LINENO"; then : |
| 10343 | ac_cv_libmpfr=yes |
| 10344 | else |
| 10345 | ac_cv_libmpfr=no |
| 10346 | fi |
| 10347 | rm -f core conftest.err conftest.$ac_objext \ |
| 10348 | conftest$ac_exeext conftest.$ac_ext |
| 10349 | LIBS="$ac_save_LIBS" |
| 10350 | |
| 10351 | fi |
| 10352 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5 |
| 10353 | $as_echo "$ac_cv_libmpfr" >&6; } |
| 10354 | if test "$ac_cv_libmpfr" = yes; then |
| 10355 | HAVE_LIBMPFR=yes |
| 10356 | |
| 10357 | $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h |
| 10358 | |
| 10359 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5 |
| 10360 | $as_echo_n "checking how to link with libmpfr... " >&6; } |
| 10361 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5 |
| 10362 | $as_echo "$LIBMPFR" >&6; } |
| 10363 | else |
| 10364 | HAVE_LIBMPFR=no |
| 10365 | CPPFLAGS="$ac_save_CPPFLAGS" |
| 10366 | LIBMPFR= |
| 10367 | LTLIBMPFR= |
| 10368 | fi |
| 10369 | |
| 10370 | |
| 10371 | |
| 10372 | |
| 10373 | |
| 10374 | |
| 10375 | if test "$HAVE_LIBMPFR" != yes; then |
| 10376 | if test "$with_mpfr" = yes; then |
| 10377 | as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5 |
| 10378 | else |
| 10379 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5 |
| 10380 | $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;} |
| 10381 | fi |
| 10382 | fi |
| 10383 | fi |
| 10384 | |
| 10385 | # --------------------- # |
| 10386 | # Check for libpython. # |
| 10387 | # --------------------- # |
| 10388 | |
| 10389 | |
| 10390 | |
| 10391 | |
| 10392 | |
| 10393 | |
| 10394 | # Check whether --with-python was given. |
| 10395 | if test "${with_python+set}" = set; then : |
| 10396 | withval=$with_python; |
| 10397 | else |
| 10398 | with_python=auto |
| 10399 | fi |
| 10400 | |
| 10401 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5 |
| 10402 | $as_echo_n "checking whether to use python... " >&6; } |
| 10403 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5 |
| 10404 | $as_echo "$with_python" >&6; } |
| 10405 | |
| 10406 | if test "${with_python}" = no; then |
| 10407 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5 |
| 10408 | $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;} |
| 10409 | have_libpython=no |
| 10410 | else |
| 10411 | case "${with_python}" in |
| 10412 | [\\/]* | ?:[\\/]*) |
| 10413 | if test -d "${with_python}"; then |
| 10414 | # Assume the python binary is ${with_python}/bin/python. |
| 10415 | python_prog="${with_python}/bin/python" |
| 10416 | python_prefix= |
| 10417 | # If python does not exit ${with_python}/bin, then try in |
| 10418 | # ${with_python}. On Windows/MinGW, this is where the Python |
| 10419 | # executable is. |
| 10420 | if test ! -x "${python_prog}"; then |
| 10421 | python_prog="${with_python}/python" |
| 10422 | python_prefix= |
| 10423 | fi |
| 10424 | if test ! -x "${python_prog}"; then |
| 10425 | # Fall back to gdb 7.0/7.1 behaviour. |
| 10426 | python_prog=missing |
| 10427 | python_prefix=${with_python} |
| 10428 | fi |
| 10429 | elif test -x "${with_python}"; then |
| 10430 | # While we can't run python compiled for $host (unless host == build), |
| 10431 | # the user could write a script that provides the needed information, |
| 10432 | # so we support that. |
| 10433 | python_prog=${with_python} |
| 10434 | python_prefix= |
| 10435 | else |
| 10436 | as_fn_error $? "invalid value for --with-python" "$LINENO" 5 |
| 10437 | fi |
| 10438 | ;; |
| 10439 | */*) |
| 10440 | # Disallow --with-python=foo/bar. |
| 10441 | as_fn_error $? "invalid value for --with-python" "$LINENO" 5 |
| 10442 | ;; |
| 10443 | *) |
| 10444 | # The user has either specified auto, yes, or the name of the python |
| 10445 | # program assumed to be in $PATH. |
| 10446 | python_prefix= |
| 10447 | case "${with_python}" in |
| 10448 | yes | auto) |
| 10449 | if test "${build}" = "${host}"; then |
| 10450 | # Extract the first word of "python", so it can be a program name with args. |
| 10451 | set dummy python; ac_word=$2 |
| 10452 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 10453 | $as_echo_n "checking for $ac_word... " >&6; } |
| 10454 | if ${ac_cv_path_python_prog_path+:} false; then : |
| 10455 | $as_echo_n "(cached) " >&6 |
| 10456 | else |
| 10457 | case $python_prog_path in |
| 10458 | [\\/]* | ?:[\\/]*) |
| 10459 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. |
| 10460 | ;; |
| 10461 | *) |
| 10462 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 10463 | for as_dir in $PATH |
| 10464 | do |
| 10465 | IFS=$as_save_IFS |
| 10466 | test -z "$as_dir" && as_dir=. |
| 10467 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 10468 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 10469 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" |
| 10470 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 10471 | break 2 |
| 10472 | fi |
| 10473 | done |
| 10474 | done |
| 10475 | IFS=$as_save_IFS |
| 10476 | |
| 10477 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" |
| 10478 | ;; |
| 10479 | esac |
| 10480 | fi |
| 10481 | python_prog_path=$ac_cv_path_python_prog_path |
| 10482 | if test -n "$python_prog_path"; then |
| 10483 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 |
| 10484 | $as_echo "$python_prog_path" >&6; } |
| 10485 | else |
| 10486 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 10487 | $as_echo "no" >&6; } |
| 10488 | fi |
| 10489 | |
| 10490 | |
| 10491 | if test "${python_prog_path}" = missing; then |
| 10492 | python_prog=missing |
| 10493 | else |
| 10494 | python_prog=${python_prog_path} |
| 10495 | fi |
| 10496 | else |
| 10497 | # Not much we can do except assume the cross-compiler will find the |
| 10498 | # right files. |
| 10499 | python_prog=missing |
| 10500 | fi |
| 10501 | ;; |
| 10502 | *) |
| 10503 | # While we can't run python compiled for $host (unless host == build), |
| 10504 | # the user could write a script that provides the needed information, |
| 10505 | # so we support that. |
| 10506 | python_prog="${with_python}" |
| 10507 | # Extract the first word of "${python_prog}", so it can be a program name with args. |
| 10508 | set dummy ${python_prog}; ac_word=$2 |
| 10509 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 10510 | $as_echo_n "checking for $ac_word... " >&6; } |
| 10511 | if ${ac_cv_path_python_prog_path+:} false; then : |
| 10512 | $as_echo_n "(cached) " >&6 |
| 10513 | else |
| 10514 | case $python_prog_path in |
| 10515 | [\\/]* | ?:[\\/]*) |
| 10516 | ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path. |
| 10517 | ;; |
| 10518 | *) |
| 10519 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 10520 | for as_dir in $PATH |
| 10521 | do |
| 10522 | IFS=$as_save_IFS |
| 10523 | test -z "$as_dir" && as_dir=. |
| 10524 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 10525 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 10526 | ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext" |
| 10527 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 10528 | break 2 |
| 10529 | fi |
| 10530 | done |
| 10531 | done |
| 10532 | IFS=$as_save_IFS |
| 10533 | |
| 10534 | test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing" |
| 10535 | ;; |
| 10536 | esac |
| 10537 | fi |
| 10538 | python_prog_path=$ac_cv_path_python_prog_path |
| 10539 | if test -n "$python_prog_path"; then |
| 10540 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5 |
| 10541 | $as_echo "$python_prog_path" >&6; } |
| 10542 | else |
| 10543 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 10544 | $as_echo "no" >&6; } |
| 10545 | fi |
| 10546 | |
| 10547 | |
| 10548 | if test "${python_prog_path}" = missing; then |
| 10549 | as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5 |
| 10550 | fi |
| 10551 | ;; |
| 10552 | esac |
| 10553 | esac |
| 10554 | |
| 10555 | if test "${python_prog}" != missing; then |
| 10556 | # We have a python program to use, but it may be too old. |
| 10557 | # Don't flag an error for --with-python=auto (the default). |
| 10558 | have_python_config=yes |
| 10559 | python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes` |
| 10560 | if test $? != 0; then |
| 10561 | have_python_config=failed |
| 10562 | if test "${with_python}" != auto; then |
| 10563 | as_fn_error $? "failure running python-config --includes" "$LINENO" 5 |
| 10564 | fi |
| 10565 | fi |
| 10566 | python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags` |
| 10567 | if test $? != 0; then |
| 10568 | have_python_config=failed |
| 10569 | if test "${with_python}" != auto; then |
| 10570 | as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5 |
| 10571 | fi |
| 10572 | fi |
| 10573 | python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix` |
| 10574 | if test $? != 0; then |
| 10575 | have_python_config=failed |
| 10576 | if test "${with_python}" != auto; then |
| 10577 | as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5 |
| 10578 | fi |
| 10579 | fi |
| 10580 | else |
| 10581 | # We do not have a python executable we can use to determine where |
| 10582 | # to find the Python headers and libs. We cannot guess the include |
| 10583 | # path from the python_prefix either, because that include path |
| 10584 | # depends on the Python version. So, there is nothing much we can |
| 10585 | # do except assume that the compiler will be able to find those files. |
| 10586 | python_includes= |
| 10587 | python_libs= |
| 10588 | have_python_config=no |
| 10589 | fi |
| 10590 | |
| 10591 | # If we have python-config, only try the configuration it provides. |
| 10592 | # Otherwise fallback on the old way of trying different versions of |
| 10593 | # python in turn. |
| 10594 | |
| 10595 | have_libpython=no |
| 10596 | if test "${have_python_config}" = yes; then |
| 10597 | |
| 10598 | |
| 10599 | new_CPPFLAGS=${python_includes} |
| 10600 | new_LIBS=${python_libs} |
| 10601 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
| 10602 | $as_echo_n "checking for python... " >&6; } |
| 10603 | save_CPPFLAGS=$CPPFLAGS |
| 10604 | save_LIBS=$LIBS |
| 10605 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
| 10606 | LIBS="$new_LIBS $LIBS" |
| 10607 | found_usable_python=no |
| 10608 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 10609 | /* end confdefs.h. */ |
| 10610 | #include "Python.h" |
| 10611 | int |
| 10612 | main () |
| 10613 | { |
| 10614 | Py_Initialize (); |
| 10615 | ; |
| 10616 | return 0; |
| 10617 | } |
| 10618 | _ACEOF |
| 10619 | if ac_fn_c_try_link "$LINENO"; then : |
| 10620 | have_libpython=yes |
| 10621 | found_usable_python=yes |
| 10622 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
| 10623 | PYTHON_LIBS=$new_LIBS |
| 10624 | fi |
| 10625 | rm -f core conftest.err conftest.$ac_objext \ |
| 10626 | conftest$ac_exeext conftest.$ac_ext |
| 10627 | CPPFLAGS=$save_CPPFLAGS |
| 10628 | LIBS=$save_LIBS |
| 10629 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
| 10630 | $as_echo "${found_usable_python}" >&6; } |
| 10631 | |
| 10632 | elif test "${have_python_config}" != failed; then |
| 10633 | if test "${have_libpython}" = no; then |
| 10634 | |
| 10635 | |
| 10636 | new_CPPFLAGS=${python_includes} |
| 10637 | new_LIBS="-lpython2.7 ${python_libs}" |
| 10638 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
| 10639 | $as_echo_n "checking for python... " >&6; } |
| 10640 | save_CPPFLAGS=$CPPFLAGS |
| 10641 | save_LIBS=$LIBS |
| 10642 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
| 10643 | LIBS="$new_LIBS $LIBS" |
| 10644 | found_usable_python=no |
| 10645 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 10646 | /* end confdefs.h. */ |
| 10647 | #include "Python.h" |
| 10648 | int |
| 10649 | main () |
| 10650 | { |
| 10651 | Py_Initialize (); |
| 10652 | ; |
| 10653 | return 0; |
| 10654 | } |
| 10655 | _ACEOF |
| 10656 | if ac_fn_c_try_link "$LINENO"; then : |
| 10657 | have_libpython=yes |
| 10658 | found_usable_python=yes |
| 10659 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
| 10660 | PYTHON_LIBS=$new_LIBS |
| 10661 | fi |
| 10662 | rm -f core conftest.err conftest.$ac_objext \ |
| 10663 | conftest$ac_exeext conftest.$ac_ext |
| 10664 | CPPFLAGS=$save_CPPFLAGS |
| 10665 | LIBS=$save_LIBS |
| 10666 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
| 10667 | $as_echo "${found_usable_python}" >&6; } |
| 10668 | |
| 10669 | fi |
| 10670 | if test "${have_libpython}" = no; then |
| 10671 | |
| 10672 | |
| 10673 | new_CPPFLAGS=${python_includes} |
| 10674 | new_LIBS="-lpython2.6 ${python_libs}" |
| 10675 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5 |
| 10676 | $as_echo_n "checking for python... " >&6; } |
| 10677 | save_CPPFLAGS=$CPPFLAGS |
| 10678 | save_LIBS=$LIBS |
| 10679 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
| 10680 | LIBS="$new_LIBS $LIBS" |
| 10681 | found_usable_python=no |
| 10682 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 10683 | /* end confdefs.h. */ |
| 10684 | #include "Python.h" |
| 10685 | int |
| 10686 | main () |
| 10687 | { |
| 10688 | Py_Initialize (); |
| 10689 | ; |
| 10690 | return 0; |
| 10691 | } |
| 10692 | _ACEOF |
| 10693 | if ac_fn_c_try_link "$LINENO"; then : |
| 10694 | have_libpython=yes |
| 10695 | found_usable_python=yes |
| 10696 | PYTHON_CPPFLAGS=$new_CPPFLAGS |
| 10697 | PYTHON_LIBS=$new_LIBS |
| 10698 | fi |
| 10699 | rm -f core conftest.err conftest.$ac_objext \ |
| 10700 | conftest$ac_exeext conftest.$ac_ext |
| 10701 | CPPFLAGS=$save_CPPFLAGS |
| 10702 | LIBS=$save_LIBS |
| 10703 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5 |
| 10704 | $as_echo "${found_usable_python}" >&6; } |
| 10705 | |
| 10706 | fi |
| 10707 | fi |
| 10708 | |
| 10709 | if test "${have_libpython}" = no; then |
| 10710 | case "${with_python}" in |
| 10711 | yes) |
| 10712 | as_fn_error $? "python is missing or unusable" "$LINENO" 5 |
| 10713 | ;; |
| 10714 | auto) |
| 10715 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5 |
| 10716 | $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;} |
| 10717 | ;; |
| 10718 | *) |
| 10719 | as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5 |
| 10720 | ;; |
| 10721 | esac |
| 10722 | else |
| 10723 | if test -n "${python_prefix}"; then |
| 10724 | |
| 10725 | cat >>confdefs.h <<_ACEOF |
| 10726 | #define WITH_PYTHON_PATH "${python_prefix}" |
| 10727 | _ACEOF |
| 10728 | |
| 10729 | |
| 10730 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
| 10731 | if test "x$prefix" = xNONE; then |
| 10732 | test_prefix=/usr/local |
| 10733 | else |
| 10734 | test_prefix=$prefix |
| 10735 | fi |
| 10736 | else |
| 10737 | test_prefix=$exec_prefix |
| 10738 | fi |
| 10739 | value=0 |
| 10740 | case ${python_prefix} in |
| 10741 | "${test_prefix}"|"${test_prefix}/"*|\ |
| 10742 | '${exec_prefix}'|'${exec_prefix}/'*) |
| 10743 | value=1 |
| 10744 | ;; |
| 10745 | esac |
| 10746 | |
| 10747 | cat >>confdefs.h <<_ACEOF |
| 10748 | #define PYTHON_PATH_RELOCATABLE $value |
| 10749 | _ACEOF |
| 10750 | |
| 10751 | |
| 10752 | fi |
| 10753 | fi |
| 10754 | fi |
| 10755 | |
| 10756 | |
| 10757 | # Check whether --with-python-libdir was given. |
| 10758 | if test "${with_python_libdir+set}" = set; then : |
| 10759 | withval=$with_python_libdir; |
| 10760 | else |
| 10761 | |
| 10762 | # If no python libdir is specified then select one based on |
| 10763 | # python's prefix path. |
| 10764 | if test -n "${python_prefix}"; then |
| 10765 | with_python_libdir=${python_prefix}/lib |
| 10766 | fi |
| 10767 | |
| 10768 | fi |
| 10769 | |
| 10770 | |
| 10771 | if test "${have_libpython}" != no; then |
| 10772 | |
| 10773 | $as_echo "#define HAVE_PYTHON 1" >>confdefs.h |
| 10774 | |
| 10775 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)" |
| 10776 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)" |
| 10777 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)" |
| 10778 | CONFIG_INSTALL="$CONFIG_INSTALL install-python" |
| 10779 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)" |
| 10780 | |
| 10781 | if test -n "${with_python_libdir}"; then |
| 10782 | |
| 10783 | cat >>confdefs.h <<_ACEOF |
| 10784 | #define WITH_PYTHON_LIBDIR "${with_python_libdir}" |
| 10785 | _ACEOF |
| 10786 | |
| 10787 | |
| 10788 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
| 10789 | if test "x$prefix" = xNONE; then |
| 10790 | test_prefix=/usr/local |
| 10791 | else |
| 10792 | test_prefix=$prefix |
| 10793 | fi |
| 10794 | else |
| 10795 | test_prefix=$exec_prefix |
| 10796 | fi |
| 10797 | value=0 |
| 10798 | case ${with_python_libdir} in |
| 10799 | "${test_prefix}"|"${test_prefix}/"*|\ |
| 10800 | '${exec_prefix}'|'${exec_prefix}/'*) |
| 10801 | value=1 |
| 10802 | ;; |
| 10803 | esac |
| 10804 | |
| 10805 | cat >>confdefs.h <<_ACEOF |
| 10806 | #define PYTHON_LIBDIR_RELOCATABLE $value |
| 10807 | _ACEOF |
| 10808 | |
| 10809 | |
| 10810 | fi |
| 10811 | |
| 10812 | # Flags needed to compile Python code (taken from python-config --cflags). |
| 10813 | # We cannot call python-config directly because it will output whatever was |
| 10814 | # used when compiling the Python interpreter itself, including flags which |
| 10815 | # would make the python-related objects be compiled differently from the |
| 10816 | # rest of GDB (e.g., -O2 and -fPIC). |
| 10817 | if test "${GCC}" = yes; then |
| 10818 | tentative_python_cflags="-fno-strict-aliasing -fwrapv" |
| 10819 | # Python headers recommend -DNDEBUG, but it's unclear if that just |
| 10820 | # refers to building Python itself. In release mode, though, it |
| 10821 | # doesn't hurt for the Python code in gdb to follow. |
| 10822 | $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG" |
| 10823 | fi |
| 10824 | |
| 10825 | if test "x${tentative_python_cflags}" != x; then |
| 10826 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5 |
| 10827 | $as_echo_n "checking compiler flags for python code... " >&6; } |
| 10828 | for flag in ${tentative_python_cflags}; do |
| 10829 | # Check that the compiler accepts it |
| 10830 | saved_CFLAGS="$CFLAGS" |
| 10831 | CFLAGS="$CFLAGS $flag" |
| 10832 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 10833 | /* end confdefs.h. */ |
| 10834 | |
| 10835 | int |
| 10836 | main () |
| 10837 | { |
| 10838 | |
| 10839 | ; |
| 10840 | return 0; |
| 10841 | } |
| 10842 | _ACEOF |
| 10843 | if ac_fn_c_try_compile "$LINENO"; then : |
| 10844 | PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag" |
| 10845 | fi |
| 10846 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 10847 | CFLAGS="$saved_CFLAGS" |
| 10848 | done |
| 10849 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5 |
| 10850 | $as_echo "${PYTHON_CFLAGS}" >&6; } |
| 10851 | fi |
| 10852 | |
| 10853 | # On x64 Windows, Python's include headers, and pyconfig.h in |
| 10854 | # particular, rely on MS_WIN64 macro to detect that it's a 64bit |
| 10855 | # version of Windows. Unfortunately, MS_WIN64 is only defined if |
| 10856 | # _MSC_VER, a Microsoft-specific macro, is defined. So, when |
| 10857 | # building on x64 Windows with GCC, we define MS_WIN64 ourselves. |
| 10858 | # The issue was reported to the Python community, but still isn't |
| 10859 | # solved as of 2012-10-02 (http://bugs.python.org/issue4709). |
| 10860 | |
| 10861 | case "$gdb_host" in |
| 10862 | mingw64) |
| 10863 | if test "${GCC}" = yes; then |
| 10864 | CPPFLAGS="$CPPFLAGS -DMS_WIN64" |
| 10865 | fi |
| 10866 | ;; |
| 10867 | esac |
| 10868 | else |
| 10869 | # Even if Python support is not compiled in, we need to have this file |
| 10870 | # included so that the "python" command, et.al., still exists. |
| 10871 | CONFIG_OBS="$CONFIG_OBS python/python.o" |
| 10872 | CONFIG_SRCS="$CONFIG_SRCS python/python.c" |
| 10873 | fi |
| 10874 | |
| 10875 | # Work around Python http://bugs.python.org/issue10112. See also |
| 10876 | # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has |
| 10877 | # no effect. Note that the only test after this that uses Python is |
| 10878 | # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be |
| 10879 | # run without -export-dynamic too. |
| 10880 | PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'` |
| 10881 | |
| 10882 | |
| 10883 | |
| 10884 | |
| 10885 | if test "${have_libpython}" != no; then |
| 10886 | HAVE_PYTHON_TRUE= |
| 10887 | HAVE_PYTHON_FALSE='#' |
| 10888 | else |
| 10889 | HAVE_PYTHON_TRUE='#' |
| 10890 | HAVE_PYTHON_FALSE= |
| 10891 | fi |
| 10892 | |
| 10893 | |
| 10894 | # -------------------- # |
| 10895 | # Check for libguile. # |
| 10896 | # -------------------- # |
| 10897 | |
| 10898 | |
| 10899 | |
| 10900 | |
| 10901 | |
| 10902 | |
| 10903 | # Check whether --with-guile was given. |
| 10904 | if test "${with_guile+set}" = set; then : |
| 10905 | withval=$with_guile; |
| 10906 | else |
| 10907 | with_guile=auto |
| 10908 | fi |
| 10909 | |
| 10910 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5 |
| 10911 | $as_echo_n "checking whether to use guile... " >&6; } |
| 10912 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5 |
| 10913 | $as_echo "$with_guile" >&6; } |
| 10914 | |
| 10915 | # Extract the first word of "pkg-config", so it can be a program name with args. |
| 10916 | set dummy pkg-config; ac_word=$2 |
| 10917 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 10918 | $as_echo_n "checking for $ac_word... " >&6; } |
| 10919 | if ${ac_cv_path_pkg_config_prog_path+:} false; then : |
| 10920 | $as_echo_n "(cached) " >&6 |
| 10921 | else |
| 10922 | case $pkg_config_prog_path in |
| 10923 | [\\/]* | ?:[\\/]*) |
| 10924 | ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path. |
| 10925 | ;; |
| 10926 | *) |
| 10927 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 10928 | for as_dir in $PATH |
| 10929 | do |
| 10930 | IFS=$as_save_IFS |
| 10931 | test -z "$as_dir" && as_dir=. |
| 10932 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 10933 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 10934 | ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext" |
| 10935 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 10936 | break 2 |
| 10937 | fi |
| 10938 | done |
| 10939 | done |
| 10940 | IFS=$as_save_IFS |
| 10941 | |
| 10942 | test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing" |
| 10943 | ;; |
| 10944 | esac |
| 10945 | fi |
| 10946 | pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path |
| 10947 | if test -n "$pkg_config_prog_path"; then |
| 10948 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5 |
| 10949 | $as_echo "$pkg_config_prog_path" >&6; } |
| 10950 | else |
| 10951 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 10952 | $as_echo "no" >&6; } |
| 10953 | fi |
| 10954 | |
| 10955 | |
| 10956 | |
| 10957 | try_guile_versions="guile-2.0" |
| 10958 | have_libguile=no |
| 10959 | case "${with_guile}" in |
| 10960 | no) |
| 10961 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5 |
| 10962 | $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;} |
| 10963 | ;; |
| 10964 | auto) |
| 10965 | if test "${pkg_config_prog_path}" = "missing"; then |
| 10966 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5 |
| 10967 | $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;} |
| 10968 | else |
| 10969 | |
| 10970 | pkg_config=${pkg_config_prog_path} |
| 10971 | guile_version_list=${try_guile_versions} |
| 10972 | flag_errors=no |
| 10973 | |
| 10974 | found_usable_guile=checking |
| 10975 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 |
| 10976 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } |
| 10977 | for guile_version in ${guile_version_list}; do |
| 10978 | ${pkg_config} --exists ${guile_version} 2>/dev/null |
| 10979 | if test $? != 0; then |
| 10980 | continue |
| 10981 | fi |
| 10982 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` |
| 10983 | if test $? != 0; then |
| 10984 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
| 10985 | fi |
| 10986 | new_LIBS=`${pkg_config} --libs ${guile_version}` |
| 10987 | if test $? != 0; then |
| 10988 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
| 10989 | fi |
| 10990 | found_usable_guile=${guile_version} |
| 10991 | break |
| 10992 | done |
| 10993 | if test "${found_usable_guile}" = "checking"; then |
| 10994 | if test "${flag_errors}" = "yes"; then |
| 10995 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
| 10996 | else |
| 10997 | found_usable_guile=no |
| 10998 | fi |
| 10999 | fi |
| 11000 | if test "${found_usable_guile}" != no; then |
| 11001 | save_CPPFLAGS=$CPPFLAGS |
| 11002 | save_LIBS=$LIBS |
| 11003 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
| 11004 | LIBS="$LIBS $new_LIBS" |
| 11005 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 11006 | /* end confdefs.h. */ |
| 11007 | #include "libguile.h" |
| 11008 | int |
| 11009 | main () |
| 11010 | { |
| 11011 | scm_init_guile (); |
| 11012 | ; |
| 11013 | return 0; |
| 11014 | } |
| 11015 | _ACEOF |
| 11016 | if ac_fn_c_try_link "$LINENO"; then : |
| 11017 | have_libguile=yes |
| 11018 | GUILE_CPPFLAGS=$new_CPPFLAGS |
| 11019 | GUILE_LIBS=$new_LIBS |
| 11020 | else |
| 11021 | found_usable_guile=no |
| 11022 | fi |
| 11023 | rm -f core conftest.err conftest.$ac_objext \ |
| 11024 | conftest$ac_exeext conftest.$ac_ext |
| 11025 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
| 11026 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
| 11027 | |
| 11028 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h |
| 11029 | |
| 11030 | |
| 11031 | fi |
| 11032 | |
| 11033 | CPPFLAGS=$save_CPPFLAGS |
| 11034 | LIBS=$save_LIBS |
| 11035 | if test "${found_usable_guile}" = no; then |
| 11036 | if test "${flag_errors}" = yes; then |
| 11037 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 11038 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 11039 | as_fn_error $? "linking guile version ${guile_version} test program failed |
| 11040 | See \`config.log' for more details" "$LINENO" 5; } |
| 11041 | fi |
| 11042 | fi |
| 11043 | fi |
| 11044 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 |
| 11045 | $as_echo "${found_usable_guile}" >&6; } |
| 11046 | |
| 11047 | fi |
| 11048 | ;; |
| 11049 | yes) |
| 11050 | if test "${pkg_config_prog_path}" = "missing"; then |
| 11051 | as_fn_error $? "pkg-config not found" "$LINENO" 5 |
| 11052 | fi |
| 11053 | |
| 11054 | pkg_config=${pkg_config_prog_path} |
| 11055 | guile_version_list=${try_guile_versions} |
| 11056 | flag_errors=yes |
| 11057 | |
| 11058 | found_usable_guile=checking |
| 11059 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 |
| 11060 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } |
| 11061 | for guile_version in ${guile_version_list}; do |
| 11062 | ${pkg_config} --exists ${guile_version} 2>/dev/null |
| 11063 | if test $? != 0; then |
| 11064 | continue |
| 11065 | fi |
| 11066 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` |
| 11067 | if test $? != 0; then |
| 11068 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
| 11069 | fi |
| 11070 | new_LIBS=`${pkg_config} --libs ${guile_version}` |
| 11071 | if test $? != 0; then |
| 11072 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
| 11073 | fi |
| 11074 | found_usable_guile=${guile_version} |
| 11075 | break |
| 11076 | done |
| 11077 | if test "${found_usable_guile}" = "checking"; then |
| 11078 | if test "${flag_errors}" = "yes"; then |
| 11079 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
| 11080 | else |
| 11081 | found_usable_guile=no |
| 11082 | fi |
| 11083 | fi |
| 11084 | if test "${found_usable_guile}" != no; then |
| 11085 | save_CPPFLAGS=$CPPFLAGS |
| 11086 | save_LIBS=$LIBS |
| 11087 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
| 11088 | LIBS="$LIBS $new_LIBS" |
| 11089 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 11090 | /* end confdefs.h. */ |
| 11091 | #include "libguile.h" |
| 11092 | int |
| 11093 | main () |
| 11094 | { |
| 11095 | scm_init_guile (); |
| 11096 | ; |
| 11097 | return 0; |
| 11098 | } |
| 11099 | _ACEOF |
| 11100 | if ac_fn_c_try_link "$LINENO"; then : |
| 11101 | have_libguile=yes |
| 11102 | GUILE_CPPFLAGS=$new_CPPFLAGS |
| 11103 | GUILE_LIBS=$new_LIBS |
| 11104 | else |
| 11105 | found_usable_guile=no |
| 11106 | fi |
| 11107 | rm -f core conftest.err conftest.$ac_objext \ |
| 11108 | conftest$ac_exeext conftest.$ac_ext |
| 11109 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
| 11110 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
| 11111 | |
| 11112 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h |
| 11113 | |
| 11114 | |
| 11115 | fi |
| 11116 | |
| 11117 | CPPFLAGS=$save_CPPFLAGS |
| 11118 | LIBS=$save_LIBS |
| 11119 | if test "${found_usable_guile}" = no; then |
| 11120 | if test "${flag_errors}" = yes; then |
| 11121 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 11122 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 11123 | as_fn_error $? "linking guile version ${guile_version} test program failed |
| 11124 | See \`config.log' for more details" "$LINENO" 5; } |
| 11125 | fi |
| 11126 | fi |
| 11127 | fi |
| 11128 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 |
| 11129 | $as_echo "${found_usable_guile}" >&6; } |
| 11130 | |
| 11131 | ;; |
| 11132 | [\\/]* | ?:[\\/]*) |
| 11133 | if test -x "${with_guile}"; then |
| 11134 | |
| 11135 | pkg_config=${with_guile} |
| 11136 | guile_version_list=${try_guile_versions} |
| 11137 | flag_errors=yes |
| 11138 | |
| 11139 | found_usable_guile=checking |
| 11140 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 |
| 11141 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } |
| 11142 | for guile_version in ${guile_version_list}; do |
| 11143 | ${pkg_config} --exists ${guile_version} 2>/dev/null |
| 11144 | if test $? != 0; then |
| 11145 | continue |
| 11146 | fi |
| 11147 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` |
| 11148 | if test $? != 0; then |
| 11149 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
| 11150 | fi |
| 11151 | new_LIBS=`${pkg_config} --libs ${guile_version}` |
| 11152 | if test $? != 0; then |
| 11153 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
| 11154 | fi |
| 11155 | found_usable_guile=${guile_version} |
| 11156 | break |
| 11157 | done |
| 11158 | if test "${found_usable_guile}" = "checking"; then |
| 11159 | if test "${flag_errors}" = "yes"; then |
| 11160 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
| 11161 | else |
| 11162 | found_usable_guile=no |
| 11163 | fi |
| 11164 | fi |
| 11165 | if test "${found_usable_guile}" != no; then |
| 11166 | save_CPPFLAGS=$CPPFLAGS |
| 11167 | save_LIBS=$LIBS |
| 11168 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
| 11169 | LIBS="$LIBS $new_LIBS" |
| 11170 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 11171 | /* end confdefs.h. */ |
| 11172 | #include "libguile.h" |
| 11173 | int |
| 11174 | main () |
| 11175 | { |
| 11176 | scm_init_guile (); |
| 11177 | ; |
| 11178 | return 0; |
| 11179 | } |
| 11180 | _ACEOF |
| 11181 | if ac_fn_c_try_link "$LINENO"; then : |
| 11182 | have_libguile=yes |
| 11183 | GUILE_CPPFLAGS=$new_CPPFLAGS |
| 11184 | GUILE_LIBS=$new_LIBS |
| 11185 | else |
| 11186 | found_usable_guile=no |
| 11187 | fi |
| 11188 | rm -f core conftest.err conftest.$ac_objext \ |
| 11189 | conftest$ac_exeext conftest.$ac_ext |
| 11190 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
| 11191 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
| 11192 | |
| 11193 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h |
| 11194 | |
| 11195 | |
| 11196 | fi |
| 11197 | |
| 11198 | CPPFLAGS=$save_CPPFLAGS |
| 11199 | LIBS=$save_LIBS |
| 11200 | if test "${found_usable_guile}" = no; then |
| 11201 | if test "${flag_errors}" = yes; then |
| 11202 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 11203 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 11204 | as_fn_error $? "linking guile version ${guile_version} test program failed |
| 11205 | See \`config.log' for more details" "$LINENO" 5; } |
| 11206 | fi |
| 11207 | fi |
| 11208 | fi |
| 11209 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 |
| 11210 | $as_echo "${found_usable_guile}" >&6; } |
| 11211 | |
| 11212 | else |
| 11213 | as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5 |
| 11214 | fi |
| 11215 | ;; |
| 11216 | "" | */*) |
| 11217 | # Disallow --with=guile="" and --with-guile=foo/bar. |
| 11218 | as_fn_error $? "invalid value for --with-guile" "$LINENO" 5 |
| 11219 | ;; |
| 11220 | *) |
| 11221 | # A space separate list of guile versions to try, in order. |
| 11222 | if test "${pkg_config_prog_path}" = "missing"; then |
| 11223 | as_fn_error $? "pkg-config not found" "$LINENO" 5 |
| 11224 | fi |
| 11225 | |
| 11226 | pkg_config=${pkg_config_prog_path} |
| 11227 | guile_version_list=${with_guile} |
| 11228 | flag_errors=yes |
| 11229 | |
| 11230 | found_usable_guile=checking |
| 11231 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5 |
| 11232 | $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; } |
| 11233 | for guile_version in ${guile_version_list}; do |
| 11234 | ${pkg_config} --exists ${guile_version} 2>/dev/null |
| 11235 | if test $? != 0; then |
| 11236 | continue |
| 11237 | fi |
| 11238 | new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}` |
| 11239 | if test $? != 0; then |
| 11240 | as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5 |
| 11241 | fi |
| 11242 | new_LIBS=`${pkg_config} --libs ${guile_version}` |
| 11243 | if test $? != 0; then |
| 11244 | as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5 |
| 11245 | fi |
| 11246 | found_usable_guile=${guile_version} |
| 11247 | break |
| 11248 | done |
| 11249 | if test "${found_usable_guile}" = "checking"; then |
| 11250 | if test "${flag_errors}" = "yes"; then |
| 11251 | as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5 |
| 11252 | else |
| 11253 | found_usable_guile=no |
| 11254 | fi |
| 11255 | fi |
| 11256 | if test "${found_usable_guile}" != no; then |
| 11257 | save_CPPFLAGS=$CPPFLAGS |
| 11258 | save_LIBS=$LIBS |
| 11259 | CPPFLAGS="$CPPFLAGS $new_CPPFLAGS" |
| 11260 | LIBS="$LIBS $new_LIBS" |
| 11261 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 11262 | /* end confdefs.h. */ |
| 11263 | #include "libguile.h" |
| 11264 | int |
| 11265 | main () |
| 11266 | { |
| 11267 | scm_init_guile (); |
| 11268 | ; |
| 11269 | return 0; |
| 11270 | } |
| 11271 | _ACEOF |
| 11272 | if ac_fn_c_try_link "$LINENO"; then : |
| 11273 | have_libguile=yes |
| 11274 | GUILE_CPPFLAGS=$new_CPPFLAGS |
| 11275 | GUILE_LIBS=$new_LIBS |
| 11276 | else |
| 11277 | found_usable_guile=no |
| 11278 | fi |
| 11279 | rm -f core conftest.err conftest.$ac_objext \ |
| 11280 | conftest$ac_exeext conftest.$ac_ext |
| 11281 | ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled" |
| 11282 | if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then : |
| 11283 | |
| 11284 | $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h |
| 11285 | |
| 11286 | |
| 11287 | fi |
| 11288 | |
| 11289 | CPPFLAGS=$save_CPPFLAGS |
| 11290 | LIBS=$save_LIBS |
| 11291 | if test "${found_usable_guile}" = no; then |
| 11292 | if test "${flag_errors}" = yes; then |
| 11293 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 11294 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 11295 | as_fn_error $? "linking guile version ${guile_version} test program failed |
| 11296 | See \`config.log' for more details" "$LINENO" 5; } |
| 11297 | fi |
| 11298 | fi |
| 11299 | fi |
| 11300 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5 |
| 11301 | $as_echo "${found_usable_guile}" >&6; } |
| 11302 | |
| 11303 | ;; |
| 11304 | esac |
| 11305 | |
| 11306 | if test "${have_libguile}" != no; then |
| 11307 | case "${with_guile}" in |
| 11308 | [\\/]* | ?:[\\/]*) |
| 11309 | |
| 11310 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 |
| 11311 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } |
| 11312 | if ${ac_cv_guild_program_name+:} false; then : |
| 11313 | $as_echo_n "(cached) " >&6 |
| 11314 | else |
| 11315 | ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`" |
| 11316 | |
| 11317 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define |
| 11318 | # the 'guild' and 'bindir' variables. In that case, try to guess |
| 11319 | # what the program name is, at the risk of getting it wrong if |
| 11320 | # Guile was configured with '--program-suffix' or similar. |
| 11321 | if test "x$ac_cv_guild_program_name" = "x"; then |
| 11322 | guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`" |
| 11323 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" |
| 11324 | fi |
| 11325 | |
| 11326 | fi |
| 11327 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 |
| 11328 | $as_echo "$ac_cv_guild_program_name" >&6; } |
| 11329 | |
| 11330 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then |
| 11331 | as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 |
| 11332 | fi |
| 11333 | |
| 11334 | GUILD="$ac_cv_guild_program_name" |
| 11335 | |
| 11336 | |
| 11337 | ;; |
| 11338 | *) |
| 11339 | |
| 11340 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5 |
| 11341 | $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; } |
| 11342 | if ${ac_cv_guild_program_name+:} false; then : |
| 11343 | $as_echo_n "(cached) " >&6 |
| 11344 | else |
| 11345 | ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`" |
| 11346 | |
| 11347 | # In Guile up to 2.0.11 included, guile-2.0.pc would not define |
| 11348 | # the 'guild' and 'bindir' variables. In that case, try to guess |
| 11349 | # what the program name is, at the risk of getting it wrong if |
| 11350 | # Guile was configured with '--program-suffix' or similar. |
| 11351 | if test "x$ac_cv_guild_program_name" = "x"; then |
| 11352 | guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`" |
| 11353 | ac_cv_guild_program_name="$guile_exec_prefix/bin/guild" |
| 11354 | fi |
| 11355 | |
| 11356 | fi |
| 11357 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5 |
| 11358 | $as_echo "$ac_cv_guild_program_name" >&6; } |
| 11359 | |
| 11360 | if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then |
| 11361 | as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5 |
| 11362 | fi |
| 11363 | |
| 11364 | GUILD="$ac_cv_guild_program_name" |
| 11365 | |
| 11366 | |
| 11367 | ;; |
| 11368 | esac |
| 11369 | |
| 11370 | |
| 11371 | if test "$cross_compiling" = no; then |
| 11372 | GUILD_TARGET_FLAG= |
| 11373 | else |
| 11374 | GUILD_TARGET_FLAG="--target=$host" |
| 11375 | fi |
| 11376 | |
| 11377 | |
| 11378 | |
| 11379 | |
| 11380 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5 |
| 11381 | $as_echo_n "checking whether guild supports this host... " >&6; } |
| 11382 | if ${ac_cv_guild_ok+:} false; then : |
| 11383 | $as_echo_n "(cached) " >&6 |
| 11384 | else |
| 11385 | echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5 |
| 11386 | if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then |
| 11387 | ac_cv_guild_ok=yes |
| 11388 | else |
| 11389 | ac_cv_guild_ok=no |
| 11390 | fi |
| 11391 | fi |
| 11392 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5 |
| 11393 | $as_echo "$ac_cv_guild_ok" >&6; } |
| 11394 | |
| 11395 | if test "$ac_cv_guild_ok" = no; then |
| 11396 | have_libguile=no |
| 11397 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5 |
| 11398 | $as_echo "$as_me: WARNING: disabling guile support" >&2;} |
| 11399 | fi |
| 11400 | fi |
| 11401 | |
| 11402 | if test "${have_libguile}" != no; then |
| 11403 | |
| 11404 | $as_echo "#define HAVE_GUILE 1" >>confdefs.h |
| 11405 | |
| 11406 | CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)" |
| 11407 | CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)" |
| 11408 | CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)" |
| 11409 | CONFIG_INSTALL="$CONFIG_INSTALL install-guile" |
| 11410 | ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)" |
| 11411 | |
| 11412 | save_LIBS="$LIBS" |
| 11413 | save_CPPFLAGS="$CPPFLAGS" |
| 11414 | LIBS="$GUILE_LIBS" |
| 11415 | CPPFLAGS="$GUILE_CPPFLAGS" |
| 11416 | for ac_func in scm_new_smob |
| 11417 | do : |
| 11418 | ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob" |
| 11419 | if test "x$ac_cv_func_scm_new_smob" = xyes; then : |
| 11420 | cat >>confdefs.h <<_ACEOF |
| 11421 | #define HAVE_SCM_NEW_SMOB 1 |
| 11422 | _ACEOF |
| 11423 | |
| 11424 | fi |
| 11425 | done |
| 11426 | |
| 11427 | LIBS="$save_LIBS" |
| 11428 | CPPFLAGS="$save_CPPFLAGS" |
| 11429 | else |
| 11430 | # Even if Guile support is not compiled in, we need to have these files |
| 11431 | # included. |
| 11432 | CONFIG_OBS="$CONFIG_OBS guile/guile.o" |
| 11433 | CONFIG_SRCS="$CONFIG_SRCS guile/guile.c" |
| 11434 | fi |
| 11435 | |
| 11436 | |
| 11437 | if test "${have_libguile}" != no; then |
| 11438 | HAVE_GUILE_TRUE= |
| 11439 | HAVE_GUILE_FALSE='#' |
| 11440 | else |
| 11441 | HAVE_GUILE_TRUE='#' |
| 11442 | HAVE_GUILE_FALSE= |
| 11443 | fi |
| 11444 | |
| 11445 | |
| 11446 | # ---------------------------- # |
| 11447 | # Check for source highlight. # |
| 11448 | # ---------------------------- # |
| 11449 | |
| 11450 | SRCHIGH_LIBS= |
| 11451 | SRCHIGH_CFLAGS= |
| 11452 | |
| 11453 | # Check whether --enable-source-highlight was given. |
| 11454 | if test "${enable_source_highlight+set}" = set; then : |
| 11455 | enableval=$enable_source_highlight; case "${enableval}" in |
| 11456 | yes) enable_source_highlight=yes ;; |
| 11457 | no) enable_source_highlight=no ;; |
| 11458 | *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;; |
| 11459 | esac |
| 11460 | else |
| 11461 | enable_source_highlight=auto |
| 11462 | fi |
| 11463 | |
| 11464 | |
| 11465 | if test "${enable_source_highlight}" != "no"; then |
| 11466 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5 |
| 11467 | $as_echo_n "checking for the source-highlight library... " >&6; } |
| 11468 | if test "${pkg_config_prog_path}" = "missing"; then |
| 11469 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5 |
| 11470 | $as_echo "no - pkg-config not found" >&6; } |
| 11471 | if test "${enable_source_highlight}" = "yes"; then |
| 11472 | as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5 |
| 11473 | fi |
| 11474 | else |
| 11475 | case "$LDFLAGS" in |
| 11476 | *static-libstdc*) |
| 11477 | as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5 |
| 11478 | ;; |
| 11479 | esac |
| 11480 | |
| 11481 | if ${pkg_config_prog_path} --exists source-highlight; then |
| 11482 | SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight` |
| 11483 | SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight` |
| 11484 | |
| 11485 | $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h |
| 11486 | |
| 11487 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 |
| 11488 | $as_echo "yes" >&6; } |
| 11489 | else |
| 11490 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 11491 | $as_echo "no" >&6; } |
| 11492 | if test "${enable_source_highlight}" = "yes"; then |
| 11493 | as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5 |
| 11494 | fi |
| 11495 | fi |
| 11496 | fi |
| 11497 | fi |
| 11498 | |
| 11499 | |
| 11500 | |
| 11501 | # ------------------------- # |
| 11502 | # Checks for header files. # |
| 11503 | # ------------------------- # |
| 11504 | |
| 11505 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
| 11506 | $as_echo_n "checking for ANSI C header files... " >&6; } |
| 11507 | if ${ac_cv_header_stdc+:} false; then : |
| 11508 | $as_echo_n "(cached) " >&6 |
| 11509 | else |
| 11510 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 11511 | /* end confdefs.h. */ |
| 11512 | #include <stdlib.h> |
| 11513 | #include <stdarg.h> |
| 11514 | #include <string.h> |
| 11515 | #include <float.h> |
| 11516 | |
| 11517 | int |
| 11518 | main () |
| 11519 | { |
| 11520 | |
| 11521 | ; |
| 11522 | return 0; |
| 11523 | } |
| 11524 | _ACEOF |
| 11525 | if ac_fn_c_try_compile "$LINENO"; then : |
| 11526 | ac_cv_header_stdc=yes |
| 11527 | else |
| 11528 | ac_cv_header_stdc=no |
| 11529 | fi |
| 11530 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 11531 | |
| 11532 | if test $ac_cv_header_stdc = yes; then |
| 11533 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 11534 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 11535 | /* end confdefs.h. */ |
| 11536 | #include <string.h> |
| 11537 | |
| 11538 | _ACEOF |
| 11539 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 11540 | $EGREP "memchr" >/dev/null 2>&1; then : |
| 11541 | |
| 11542 | else |
| 11543 | ac_cv_header_stdc=no |
| 11544 | fi |
| 11545 | rm -f conftest* |
| 11546 | |
| 11547 | fi |
| 11548 | |
| 11549 | if test $ac_cv_header_stdc = yes; then |
| 11550 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 11551 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 11552 | /* end confdefs.h. */ |
| 11553 | #include <stdlib.h> |
| 11554 | |
| 11555 | _ACEOF |
| 11556 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 11557 | $EGREP "free" >/dev/null 2>&1; then : |
| 11558 | |
| 11559 | else |
| 11560 | ac_cv_header_stdc=no |
| 11561 | fi |
| 11562 | rm -f conftest* |
| 11563 | |
| 11564 | fi |
| 11565 | |
| 11566 | if test $ac_cv_header_stdc = yes; then |
| 11567 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| 11568 | if test "$cross_compiling" = yes; then : |
| 11569 | : |
| 11570 | else |
| 11571 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 11572 | /* end confdefs.h. */ |
| 11573 | #include <ctype.h> |
| 11574 | #include <stdlib.h> |
| 11575 | #if ((' ' & 0x0FF) == 0x020) |
| 11576 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 11577 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
| 11578 | #else |
| 11579 | # define ISLOWER(c) \ |
| 11580 | (('a' <= (c) && (c) <= 'i') \ |
| 11581 | || ('j' <= (c) && (c) <= 'r') \ |
| 11582 | || ('s' <= (c) && (c) <= 'z')) |
| 11583 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
| 11584 | #endif |
| 11585 | |
| 11586 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
| 11587 | int |
| 11588 | main () |
| 11589 | { |
| 11590 | int i; |
| 11591 | for (i = 0; i < 256; i++) |
| 11592 | if (XOR (islower (i), ISLOWER (i)) |
| 11593 | || toupper (i) != TOUPPER (i)) |
| 11594 | return 2; |
| 11595 | return 0; |
| 11596 | } |
| 11597 | _ACEOF |
| 11598 | if ac_fn_c_try_run "$LINENO"; then : |
| 11599 | |
| 11600 | else |
| 11601 | ac_cv_header_stdc=no |
| 11602 | fi |
| 11603 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 11604 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 11605 | fi |
| 11606 | |
| 11607 | fi |
| 11608 | fi |
| 11609 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
| 11610 | $as_echo "$ac_cv_header_stdc" >&6; } |
| 11611 | if test $ac_cv_header_stdc = yes; then |
| 11612 | |
| 11613 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
| 11614 | |
| 11615 | fi |
| 11616 | |
| 11617 | # elf_hp.h is for HP/UX 64-bit shared library support. |
| 11618 | for ac_header in nlist.h machine/reg.h poll.h sys/poll.h \ |
| 11619 | thread_db.h \ |
| 11620 | sys/file.h sys/filio.h sys/ioctl.h sys/param.h \ |
| 11621 | sys/resource.h sys/ptrace.h ptrace.h \ |
| 11622 | sys/reg.h sys/debugreg.h sys/select.h \ |
| 11623 | termios.h elf_hp.h |
| 11624 | do : |
| 11625 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 11626 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" |
| 11627 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
| 11628 | cat >>confdefs.h <<_ACEOF |
| 11629 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
| 11630 | _ACEOF |
| 11631 | |
| 11632 | fi |
| 11633 | |
| 11634 | done |
| 11635 | |
| 11636 | for ac_header in sys/user.h |
| 11637 | do : |
| 11638 | ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H |
| 11639 | # include <sys/param.h> |
| 11640 | #endif |
| 11641 | |
| 11642 | " |
| 11643 | if test "x$ac_cv_header_sys_user_h" = xyes; then : |
| 11644 | cat >>confdefs.h <<_ACEOF |
| 11645 | #define HAVE_SYS_USER_H 1 |
| 11646 | _ACEOF |
| 11647 | |
| 11648 | fi |
| 11649 | |
| 11650 | done |
| 11651 | |
| 11652 | |
| 11653 | for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h |
| 11654 | do : |
| 11655 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 11656 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" |
| 11657 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
| 11658 | cat >>confdefs.h <<_ACEOF |
| 11659 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
| 11660 | _ACEOF |
| 11661 | |
| 11662 | fi |
| 11663 | |
| 11664 | done |
| 11665 | |
| 11666 | for ac_header in term.h |
| 11667 | do : |
| 11668 | ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H |
| 11669 | # include <curses.h> |
| 11670 | #endif |
| 11671 | |
| 11672 | " |
| 11673 | if test "x$ac_cv_header_term_h" = xyes; then : |
| 11674 | cat >>confdefs.h <<_ACEOF |
| 11675 | #define HAVE_TERM_H 1 |
| 11676 | _ACEOF |
| 11677 | |
| 11678 | fi |
| 11679 | |
| 11680 | done |
| 11681 | |
| 11682 | |
| 11683 | # ------------------------- # |
| 11684 | # Checks for declarations. # |
| 11685 | # ------------------------- # |
| 11686 | |
| 11687 | |
| 11688 | # Check for presence and size of long long. |
| 11689 | ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default" |
| 11690 | if test "x$ac_cv_type_long_long" = xyes; then : |
| 11691 | |
| 11692 | cat >>confdefs.h <<_ACEOF |
| 11693 | #define HAVE_LONG_LONG 1 |
| 11694 | _ACEOF |
| 11695 | |
| 11696 | # The cast to long int works around a bug in the HP C Compiler |
| 11697 | # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects |
| 11698 | # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. |
| 11699 | # This bug is HP SR number 8606223364. |
| 11700 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5 |
| 11701 | $as_echo_n "checking size of long long... " >&6; } |
| 11702 | if ${ac_cv_sizeof_long_long+:} false; then : |
| 11703 | $as_echo_n "(cached) " >&6 |
| 11704 | else |
| 11705 | if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then : |
| 11706 | |
| 11707 | else |
| 11708 | if test "$ac_cv_type_long_long" = yes; then |
| 11709 | { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 |
| 11710 | $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} |
| 11711 | as_fn_error 77 "cannot compute sizeof (long long) |
| 11712 | See \`config.log' for more details" "$LINENO" 5; } |
| 11713 | else |
| 11714 | ac_cv_sizeof_long_long=0 |
| 11715 | fi |
| 11716 | fi |
| 11717 | |
| 11718 | fi |
| 11719 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5 |
| 11720 | $as_echo "$ac_cv_sizeof_long_long" >&6; } |
| 11721 | |
| 11722 | |
| 11723 | |
| 11724 | cat >>confdefs.h <<_ACEOF |
| 11725 | #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long |
| 11726 | _ACEOF |
| 11727 | |
| 11728 | |
| 11729 | fi |
| 11730 | |
| 11731 | |
| 11732 | as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh` |
| 11733 | ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default" |
| 11734 | if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then : |
| 11735 | ac_have_decl=1 |
| 11736 | else |
| 11737 | ac_have_decl=0 |
| 11738 | fi |
| 11739 | |
| 11740 | cat >>confdefs.h <<_ACEOF |
| 11741 | #define HAVE_DECL_BASENAME $ac_have_decl |
| 11742 | _ACEOF |
| 11743 | ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default" |
| 11744 | if test "x$ac_cv_have_decl_ffs" = xyes; then : |
| 11745 | ac_have_decl=1 |
| 11746 | else |
| 11747 | ac_have_decl=0 |
| 11748 | fi |
| 11749 | |
| 11750 | cat >>confdefs.h <<_ACEOF |
| 11751 | #define HAVE_DECL_FFS $ac_have_decl |
| 11752 | _ACEOF |
| 11753 | ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default" |
| 11754 | if test "x$ac_cv_have_decl_asprintf" = xyes; then : |
| 11755 | ac_have_decl=1 |
| 11756 | else |
| 11757 | ac_have_decl=0 |
| 11758 | fi |
| 11759 | |
| 11760 | cat >>confdefs.h <<_ACEOF |
| 11761 | #define HAVE_DECL_ASPRINTF $ac_have_decl |
| 11762 | _ACEOF |
| 11763 | ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default" |
| 11764 | if test "x$ac_cv_have_decl_vasprintf" = xyes; then : |
| 11765 | ac_have_decl=1 |
| 11766 | else |
| 11767 | ac_have_decl=0 |
| 11768 | fi |
| 11769 | |
| 11770 | cat >>confdefs.h <<_ACEOF |
| 11771 | #define HAVE_DECL_VASPRINTF $ac_have_decl |
| 11772 | _ACEOF |
| 11773 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" |
| 11774 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : |
| 11775 | ac_have_decl=1 |
| 11776 | else |
| 11777 | ac_have_decl=0 |
| 11778 | fi |
| 11779 | |
| 11780 | cat >>confdefs.h <<_ACEOF |
| 11781 | #define HAVE_DECL_SNPRINTF $ac_have_decl |
| 11782 | _ACEOF |
| 11783 | ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default" |
| 11784 | if test "x$ac_cv_have_decl_vsnprintf" = xyes; then : |
| 11785 | ac_have_decl=1 |
| 11786 | else |
| 11787 | ac_have_decl=0 |
| 11788 | fi |
| 11789 | |
| 11790 | cat >>confdefs.h <<_ACEOF |
| 11791 | #define HAVE_DECL_VSNPRINTF $ac_have_decl |
| 11792 | _ACEOF |
| 11793 | |
| 11794 | ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default" |
| 11795 | if test "x$ac_cv_have_decl_strtol" = xyes; then : |
| 11796 | ac_have_decl=1 |
| 11797 | else |
| 11798 | ac_have_decl=0 |
| 11799 | fi |
| 11800 | |
| 11801 | cat >>confdefs.h <<_ACEOF |
| 11802 | #define HAVE_DECL_STRTOL $ac_have_decl |
| 11803 | _ACEOF |
| 11804 | ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default" |
| 11805 | if test "x$ac_cv_have_decl_strtoul" = xyes; then : |
| 11806 | ac_have_decl=1 |
| 11807 | else |
| 11808 | ac_have_decl=0 |
| 11809 | fi |
| 11810 | |
| 11811 | cat >>confdefs.h <<_ACEOF |
| 11812 | #define HAVE_DECL_STRTOUL $ac_have_decl |
| 11813 | _ACEOF |
| 11814 | ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default" |
| 11815 | if test "x$ac_cv_have_decl_strtoll" = xyes; then : |
| 11816 | ac_have_decl=1 |
| 11817 | else |
| 11818 | ac_have_decl=0 |
| 11819 | fi |
| 11820 | |
| 11821 | cat >>confdefs.h <<_ACEOF |
| 11822 | #define HAVE_DECL_STRTOLL $ac_have_decl |
| 11823 | _ACEOF |
| 11824 | ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default" |
| 11825 | if test "x$ac_cv_have_decl_strtoull" = xyes; then : |
| 11826 | ac_have_decl=1 |
| 11827 | else |
| 11828 | ac_have_decl=0 |
| 11829 | fi |
| 11830 | |
| 11831 | cat >>confdefs.h <<_ACEOF |
| 11832 | #define HAVE_DECL_STRTOULL $ac_have_decl |
| 11833 | _ACEOF |
| 11834 | |
| 11835 | ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default" |
| 11836 | if test "x$ac_cv_have_decl_strverscmp" = xyes; then : |
| 11837 | ac_have_decl=1 |
| 11838 | else |
| 11839 | ac_have_decl=0 |
| 11840 | fi |
| 11841 | |
| 11842 | cat >>confdefs.h <<_ACEOF |
| 11843 | #define HAVE_DECL_STRVERSCMP $ac_have_decl |
| 11844 | _ACEOF |
| 11845 | |
| 11846 | |
| 11847 | |
| 11848 | ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default" |
| 11849 | if test "x$ac_cv_have_decl_snprintf" = xyes; then : |
| 11850 | ac_have_decl=1 |
| 11851 | else |
| 11852 | ac_have_decl=0 |
| 11853 | fi |
| 11854 | |
| 11855 | cat >>confdefs.h <<_ACEOF |
| 11856 | #define HAVE_DECL_SNPRINTF $ac_have_decl |
| 11857 | _ACEOF |
| 11858 | |
| 11859 | |
| 11860 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5 |
| 11861 | $as_echo_n "checking for LC_MESSAGES... " >&6; } |
| 11862 | if ${am_cv_val_LC_MESSAGES+:} false; then : |
| 11863 | $as_echo_n "(cached) " >&6 |
| 11864 | else |
| 11865 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 11866 | /* end confdefs.h. */ |
| 11867 | #include <locale.h> |
| 11868 | int |
| 11869 | main () |
| 11870 | { |
| 11871 | return LC_MESSAGES |
| 11872 | ; |
| 11873 | return 0; |
| 11874 | } |
| 11875 | _ACEOF |
| 11876 | if ac_fn_c_try_link "$LINENO"; then : |
| 11877 | am_cv_val_LC_MESSAGES=yes |
| 11878 | else |
| 11879 | am_cv_val_LC_MESSAGES=no |
| 11880 | fi |
| 11881 | rm -f core conftest.err conftest.$ac_objext \ |
| 11882 | conftest$ac_exeext conftest.$ac_ext |
| 11883 | fi |
| 11884 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5 |
| 11885 | $as_echo "$am_cv_val_LC_MESSAGES" >&6; } |
| 11886 | if test $am_cv_val_LC_MESSAGES = yes; then |
| 11887 | |
| 11888 | $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h |
| 11889 | |
| 11890 | fi |
| 11891 | |
| 11892 | |
| 11893 | # ------------------ # |
| 11894 | # Checks for types. # |
| 11895 | # ------------------ # |
| 11896 | |
| 11897 | ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h> |
| 11898 | #include <sys/socket.h> |
| 11899 | |
| 11900 | " |
| 11901 | if test "x$ac_cv_type_socklen_t" = xyes; then : |
| 11902 | |
| 11903 | cat >>confdefs.h <<_ACEOF |
| 11904 | #define HAVE_SOCKLEN_T 1 |
| 11905 | _ACEOF |
| 11906 | |
| 11907 | |
| 11908 | fi |
| 11909 | |
| 11910 | |
| 11911 | # ------------------------------------- # |
| 11912 | # Checks for compiler characteristics. # |
| 11913 | # ------------------------------------- # |
| 11914 | |
| 11915 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 |
| 11916 | $as_echo_n "checking for an ANSI C-conforming const... " >&6; } |
| 11917 | if ${ac_cv_c_const+:} false; then : |
| 11918 | $as_echo_n "(cached) " >&6 |
| 11919 | else |
| 11920 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 11921 | /* end confdefs.h. */ |
| 11922 | |
| 11923 | int |
| 11924 | main () |
| 11925 | { |
| 11926 | |
| 11927 | #ifndef __cplusplus |
| 11928 | /* Ultrix mips cc rejects this sort of thing. */ |
| 11929 | typedef int charset[2]; |
| 11930 | const charset cs = { 0, 0 }; |
| 11931 | /* SunOS 4.1.1 cc rejects this. */ |
| 11932 | char const *const *pcpcc; |
| 11933 | char **ppc; |
| 11934 | /* NEC SVR4.0.2 mips cc rejects this. */ |
| 11935 | struct point {int x, y;}; |
| 11936 | static struct point const zero = {0,0}; |
| 11937 | /* AIX XL C 1.02.0.0 rejects this. |
| 11938 | It does not let you subtract one const X* pointer from another in |
| 11939 | an arm of an if-expression whose if-part is not a constant |
| 11940 | expression */ |
| 11941 | const char *g = "string"; |
| 11942 | pcpcc = &g + (g ? g-g : 0); |
| 11943 | /* HPUX 7.0 cc rejects these. */ |
| 11944 | ++pcpcc; |
| 11945 | ppc = (char**) pcpcc; |
| 11946 | pcpcc = (char const *const *) ppc; |
| 11947 | { /* SCO 3.2v4 cc rejects this sort of thing. */ |
| 11948 | char tx; |
| 11949 | char *t = &tx; |
| 11950 | char const *s = 0 ? (char *) 0 : (char const *) 0; |
| 11951 | |
| 11952 | *t++ = 0; |
| 11953 | if (s) return 0; |
| 11954 | } |
| 11955 | { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ |
| 11956 | int x[] = {25, 17}; |
| 11957 | const int *foo = &x[0]; |
| 11958 | ++foo; |
| 11959 | } |
| 11960 | { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ |
| 11961 | typedef const int *iptr; |
| 11962 | iptr p = 0; |
| 11963 | ++p; |
| 11964 | } |
| 11965 | { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying |
| 11966 | "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ |
| 11967 | struct s { int j; const int *ap[3]; } bx; |
| 11968 | struct s *b = &bx; b->j = 5; |
| 11969 | } |
| 11970 | { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ |
| 11971 | const int foo = 10; |
| 11972 | if (!foo) return 0; |
| 11973 | } |
| 11974 | return !cs[0] && !zero.x; |
| 11975 | #endif |
| 11976 | |
| 11977 | ; |
| 11978 | return 0; |
| 11979 | } |
| 11980 | _ACEOF |
| 11981 | if ac_fn_c_try_compile "$LINENO"; then : |
| 11982 | ac_cv_c_const=yes |
| 11983 | else |
| 11984 | ac_cv_c_const=no |
| 11985 | fi |
| 11986 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 11987 | fi |
| 11988 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 |
| 11989 | $as_echo "$ac_cv_c_const" >&6; } |
| 11990 | if test $ac_cv_c_const = no; then |
| 11991 | |
| 11992 | $as_echo "#define const /**/" >>confdefs.h |
| 11993 | |
| 11994 | fi |
| 11995 | |
| 11996 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 |
| 11997 | $as_echo_n "checking for inline... " >&6; } |
| 11998 | if ${ac_cv_c_inline+:} false; then : |
| 11999 | $as_echo_n "(cached) " >&6 |
| 12000 | else |
| 12001 | ac_cv_c_inline=no |
| 12002 | for ac_kw in inline __inline__ __inline; do |
| 12003 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12004 | /* end confdefs.h. */ |
| 12005 | #ifndef __cplusplus |
| 12006 | typedef int foo_t; |
| 12007 | static $ac_kw foo_t static_foo () {return 0; } |
| 12008 | $ac_kw foo_t foo () {return 0; } |
| 12009 | #endif |
| 12010 | |
| 12011 | _ACEOF |
| 12012 | if ac_fn_c_try_compile "$LINENO"; then : |
| 12013 | ac_cv_c_inline=$ac_kw |
| 12014 | fi |
| 12015 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 12016 | test "$ac_cv_c_inline" != no && break |
| 12017 | done |
| 12018 | |
| 12019 | fi |
| 12020 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 |
| 12021 | $as_echo "$ac_cv_c_inline" >&6; } |
| 12022 | |
| 12023 | case $ac_cv_c_inline in |
| 12024 | inline | yes) ;; |
| 12025 | *) |
| 12026 | case $ac_cv_c_inline in |
| 12027 | no) ac_val=;; |
| 12028 | *) ac_val=$ac_cv_c_inline;; |
| 12029 | esac |
| 12030 | cat >>confdefs.h <<_ACEOF |
| 12031 | #ifndef __cplusplus |
| 12032 | #define inline $ac_val |
| 12033 | #endif |
| 12034 | _ACEOF |
| 12035 | ;; |
| 12036 | esac |
| 12037 | |
| 12038 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 |
| 12039 | $as_echo_n "checking whether byte ordering is bigendian... " >&6; } |
| 12040 | if ${ac_cv_c_bigendian+:} false; then : |
| 12041 | $as_echo_n "(cached) " >&6 |
| 12042 | else |
| 12043 | ac_cv_c_bigendian=unknown |
| 12044 | # See if we're dealing with a universal compiler. |
| 12045 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12046 | /* end confdefs.h. */ |
| 12047 | #ifndef __APPLE_CC__ |
| 12048 | not a universal capable compiler |
| 12049 | #endif |
| 12050 | typedef int dummy; |
| 12051 | |
| 12052 | _ACEOF |
| 12053 | if ac_fn_c_try_compile "$LINENO"; then : |
| 12054 | |
| 12055 | # Check for potential -arch flags. It is not universal unless |
| 12056 | # there are at least two -arch flags with different values. |
| 12057 | ac_arch= |
| 12058 | ac_prev= |
| 12059 | for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do |
| 12060 | if test -n "$ac_prev"; then |
| 12061 | case $ac_word in |
| 12062 | i?86 | x86_64 | ppc | ppc64) |
| 12063 | if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then |
| 12064 | ac_arch=$ac_word |
| 12065 | else |
| 12066 | ac_cv_c_bigendian=universal |
| 12067 | break |
| 12068 | fi |
| 12069 | ;; |
| 12070 | esac |
| 12071 | ac_prev= |
| 12072 | elif test "x$ac_word" = "x-arch"; then |
| 12073 | ac_prev=arch |
| 12074 | fi |
| 12075 | done |
| 12076 | fi |
| 12077 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 12078 | if test $ac_cv_c_bigendian = unknown; then |
| 12079 | # See if sys/param.h defines the BYTE_ORDER macro. |
| 12080 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12081 | /* end confdefs.h. */ |
| 12082 | #include <sys/types.h> |
| 12083 | #include <sys/param.h> |
| 12084 | |
| 12085 | int |
| 12086 | main () |
| 12087 | { |
| 12088 | #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ |
| 12089 | && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ |
| 12090 | && LITTLE_ENDIAN) |
| 12091 | bogus endian macros |
| 12092 | #endif |
| 12093 | |
| 12094 | ; |
| 12095 | return 0; |
| 12096 | } |
| 12097 | _ACEOF |
| 12098 | if ac_fn_c_try_compile "$LINENO"; then : |
| 12099 | # It does; now see whether it defined to BIG_ENDIAN or not. |
| 12100 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12101 | /* end confdefs.h. */ |
| 12102 | #include <sys/types.h> |
| 12103 | #include <sys/param.h> |
| 12104 | |
| 12105 | int |
| 12106 | main () |
| 12107 | { |
| 12108 | #if BYTE_ORDER != BIG_ENDIAN |
| 12109 | not big endian |
| 12110 | #endif |
| 12111 | |
| 12112 | ; |
| 12113 | return 0; |
| 12114 | } |
| 12115 | _ACEOF |
| 12116 | if ac_fn_c_try_compile "$LINENO"; then : |
| 12117 | ac_cv_c_bigendian=yes |
| 12118 | else |
| 12119 | ac_cv_c_bigendian=no |
| 12120 | fi |
| 12121 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 12122 | fi |
| 12123 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 12124 | fi |
| 12125 | if test $ac_cv_c_bigendian = unknown; then |
| 12126 | # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). |
| 12127 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12128 | /* end confdefs.h. */ |
| 12129 | #include <limits.h> |
| 12130 | |
| 12131 | int |
| 12132 | main () |
| 12133 | { |
| 12134 | #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) |
| 12135 | bogus endian macros |
| 12136 | #endif |
| 12137 | |
| 12138 | ; |
| 12139 | return 0; |
| 12140 | } |
| 12141 | _ACEOF |
| 12142 | if ac_fn_c_try_compile "$LINENO"; then : |
| 12143 | # It does; now see whether it defined to _BIG_ENDIAN or not. |
| 12144 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12145 | /* end confdefs.h. */ |
| 12146 | #include <limits.h> |
| 12147 | |
| 12148 | int |
| 12149 | main () |
| 12150 | { |
| 12151 | #ifndef _BIG_ENDIAN |
| 12152 | not big endian |
| 12153 | #endif |
| 12154 | |
| 12155 | ; |
| 12156 | return 0; |
| 12157 | } |
| 12158 | _ACEOF |
| 12159 | if ac_fn_c_try_compile "$LINENO"; then : |
| 12160 | ac_cv_c_bigendian=yes |
| 12161 | else |
| 12162 | ac_cv_c_bigendian=no |
| 12163 | fi |
| 12164 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 12165 | fi |
| 12166 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 12167 | fi |
| 12168 | if test $ac_cv_c_bigendian = unknown; then |
| 12169 | # Compile a test program. |
| 12170 | if test "$cross_compiling" = yes; then : |
| 12171 | # Try to guess by grepping values from an object file. |
| 12172 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12173 | /* end confdefs.h. */ |
| 12174 | short int ascii_mm[] = |
| 12175 | { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; |
| 12176 | short int ascii_ii[] = |
| 12177 | { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; |
| 12178 | int use_ascii (int i) { |
| 12179 | return ascii_mm[i] + ascii_ii[i]; |
| 12180 | } |
| 12181 | short int ebcdic_ii[] = |
| 12182 | { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; |
| 12183 | short int ebcdic_mm[] = |
| 12184 | { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; |
| 12185 | int use_ebcdic (int i) { |
| 12186 | return ebcdic_mm[i] + ebcdic_ii[i]; |
| 12187 | } |
| 12188 | extern int foo; |
| 12189 | |
| 12190 | int |
| 12191 | main () |
| 12192 | { |
| 12193 | return use_ascii (foo) == use_ebcdic (foo); |
| 12194 | ; |
| 12195 | return 0; |
| 12196 | } |
| 12197 | _ACEOF |
| 12198 | if ac_fn_c_try_compile "$LINENO"; then : |
| 12199 | if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then |
| 12200 | ac_cv_c_bigendian=yes |
| 12201 | fi |
| 12202 | if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then |
| 12203 | if test "$ac_cv_c_bigendian" = unknown; then |
| 12204 | ac_cv_c_bigendian=no |
| 12205 | else |
| 12206 | # finding both strings is unlikely to happen, but who knows? |
| 12207 | ac_cv_c_bigendian=unknown |
| 12208 | fi |
| 12209 | fi |
| 12210 | fi |
| 12211 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 12212 | else |
| 12213 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12214 | /* end confdefs.h. */ |
| 12215 | $ac_includes_default |
| 12216 | int |
| 12217 | main () |
| 12218 | { |
| 12219 | |
| 12220 | /* Are we little or big endian? From Harbison&Steele. */ |
| 12221 | union |
| 12222 | { |
| 12223 | long int l; |
| 12224 | char c[sizeof (long int)]; |
| 12225 | } u; |
| 12226 | u.l = 1; |
| 12227 | return u.c[sizeof (long int) - 1] == 1; |
| 12228 | |
| 12229 | ; |
| 12230 | return 0; |
| 12231 | } |
| 12232 | _ACEOF |
| 12233 | if ac_fn_c_try_run "$LINENO"; then : |
| 12234 | ac_cv_c_bigendian=no |
| 12235 | else |
| 12236 | ac_cv_c_bigendian=yes |
| 12237 | fi |
| 12238 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 12239 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 12240 | fi |
| 12241 | |
| 12242 | fi |
| 12243 | fi |
| 12244 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 |
| 12245 | $as_echo "$ac_cv_c_bigendian" >&6; } |
| 12246 | case $ac_cv_c_bigendian in #( |
| 12247 | yes) |
| 12248 | $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h |
| 12249 | ;; #( |
| 12250 | no) |
| 12251 | ;; #( |
| 12252 | universal) |
| 12253 | |
| 12254 | $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h |
| 12255 | |
| 12256 | ;; #( |
| 12257 | *) |
| 12258 | as_fn_error $? "unknown endianness |
| 12259 | presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; |
| 12260 | esac |
| 12261 | |
| 12262 | |
| 12263 | # ------------------------------ # |
| 12264 | # Checks for library functions. # |
| 12265 | # ------------------------------ # |
| 12266 | |
| 12267 | for ac_func in getuid getgid \ |
| 12268 | pipe poll pread pread64 pwrite resize_term \ |
| 12269 | getpgid setsid \ |
| 12270 | sigaction sigsetmask socketpair \ |
| 12271 | ttrace wborder wresize setlocale iconvlist libiconvlist btowc \ |
| 12272 | setrlimit getrlimit posix_madvise waitpid \ |
| 12273 | use_default_colors |
| 12274 | do : |
| 12275 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
| 12276 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
| 12277 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
| 12278 | cat >>confdefs.h <<_ACEOF |
| 12279 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
| 12280 | _ACEOF |
| 12281 | |
| 12282 | fi |
| 12283 | done |
| 12284 | |
| 12285 | |
| 12286 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
| 12287 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } |
| 12288 | if ${am_cv_langinfo_codeset+:} false; then : |
| 12289 | $as_echo_n "(cached) " >&6 |
| 12290 | else |
| 12291 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12292 | /* end confdefs.h. */ |
| 12293 | #include <langinfo.h> |
| 12294 | int |
| 12295 | main () |
| 12296 | { |
| 12297 | char* cs = nl_langinfo(CODESET); |
| 12298 | ; |
| 12299 | return 0; |
| 12300 | } |
| 12301 | _ACEOF |
| 12302 | if ac_fn_c_try_link "$LINENO"; then : |
| 12303 | am_cv_langinfo_codeset=yes |
| 12304 | else |
| 12305 | am_cv_langinfo_codeset=no |
| 12306 | fi |
| 12307 | rm -f core conftest.err conftest.$ac_objext \ |
| 12308 | conftest$ac_exeext conftest.$ac_ext |
| 12309 | |
| 12310 | fi |
| 12311 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
| 12312 | $as_echo "$am_cv_langinfo_codeset" >&6; } |
| 12313 | if test $am_cv_langinfo_codeset = yes; then |
| 12314 | |
| 12315 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
| 12316 | |
| 12317 | fi |
| 12318 | |
| 12319 | ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" |
| 12320 | if test "x$ac_cv_type_size_t" = xyes; then : |
| 12321 | |
| 12322 | else |
| 12323 | |
| 12324 | cat >>confdefs.h <<_ACEOF |
| 12325 | #define size_t unsigned int |
| 12326 | _ACEOF |
| 12327 | |
| 12328 | fi |
| 12329 | |
| 12330 | |
| 12331 | |
| 12332 | |
| 12333 | for ac_header in $ac_header_list |
| 12334 | do : |
| 12335 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 12336 | ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default |
| 12337 | " |
| 12338 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
| 12339 | cat >>confdefs.h <<_ACEOF |
| 12340 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
| 12341 | _ACEOF |
| 12342 | |
| 12343 | fi |
| 12344 | |
| 12345 | done |
| 12346 | |
| 12347 | |
| 12348 | |
| 12349 | |
| 12350 | |
| 12351 | |
| 12352 | |
| 12353 | ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" |
| 12354 | if test "x$ac_cv_type_pid_t" = xyes; then : |
| 12355 | |
| 12356 | else |
| 12357 | |
| 12358 | cat >>confdefs.h <<_ACEOF |
| 12359 | #define pid_t int |
| 12360 | _ACEOF |
| 12361 | |
| 12362 | fi |
| 12363 | |
| 12364 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 |
| 12365 | $as_echo_n "checking for a sed that does not truncate output... " >&6; } |
| 12366 | if ${ac_cv_path_SED+:} false; then : |
| 12367 | $as_echo_n "(cached) " >&6 |
| 12368 | else |
| 12369 | ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ |
| 12370 | for ac_i in 1 2 3 4 5 6 7; do |
| 12371 | ac_script="$ac_script$as_nl$ac_script" |
| 12372 | done |
| 12373 | echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed |
| 12374 | { ac_script=; unset ac_script;} |
| 12375 | if test -z "$SED"; then |
| 12376 | ac_path_SED_found=false |
| 12377 | # Loop through the user's path and test for each of PROGNAME-LIST |
| 12378 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 12379 | for as_dir in $PATH |
| 12380 | do |
| 12381 | IFS=$as_save_IFS |
| 12382 | test -z "$as_dir" && as_dir=. |
| 12383 | for ac_prog in sed gsed; do |
| 12384 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 12385 | ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" |
| 12386 | as_fn_executable_p "$ac_path_SED" || continue |
| 12387 | # Check for GNU ac_path_SED and select it if it is found. |
| 12388 | # Check for GNU $ac_path_SED |
| 12389 | case `"$ac_path_SED" --version 2>&1` in |
| 12390 | *GNU*) |
| 12391 | ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; |
| 12392 | *) |
| 12393 | ac_count=0 |
| 12394 | $as_echo_n 0123456789 >"conftest.in" |
| 12395 | while : |
| 12396 | do |
| 12397 | cat "conftest.in" "conftest.in" >"conftest.tmp" |
| 12398 | mv "conftest.tmp" "conftest.in" |
| 12399 | cp "conftest.in" "conftest.nl" |
| 12400 | $as_echo '' >> "conftest.nl" |
| 12401 | "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break |
| 12402 | diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break |
| 12403 | as_fn_arith $ac_count + 1 && ac_count=$as_val |
| 12404 | if test $ac_count -gt ${ac_path_SED_max-0}; then |
| 12405 | # Best one so far, save it but keep looking for a better one |
| 12406 | ac_cv_path_SED="$ac_path_SED" |
| 12407 | ac_path_SED_max=$ac_count |
| 12408 | fi |
| 12409 | # 10*(2^10) chars as input seems more than enough |
| 12410 | test $ac_count -gt 10 && break |
| 12411 | done |
| 12412 | rm -f conftest.in conftest.tmp conftest.nl conftest.out;; |
| 12413 | esac |
| 12414 | |
| 12415 | $ac_path_SED_found && break 3 |
| 12416 | done |
| 12417 | done |
| 12418 | done |
| 12419 | IFS=$as_save_IFS |
| 12420 | if test -z "$ac_cv_path_SED"; then |
| 12421 | as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 |
| 12422 | fi |
| 12423 | else |
| 12424 | ac_cv_path_SED=$SED |
| 12425 | fi |
| 12426 | |
| 12427 | fi |
| 12428 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 |
| 12429 | $as_echo "$ac_cv_path_SED" >&6; } |
| 12430 | SED="$ac_cv_path_SED" |
| 12431 | rm -f conftest.sed |
| 12432 | |
| 12433 | |
| 12434 | # Set the 'development' global. |
| 12435 | . $srcdir/../bfd/development.sh |
| 12436 | |
| 12437 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 |
| 12438 | $as_echo_n "checking for ANSI C header files... " >&6; } |
| 12439 | if ${ac_cv_header_stdc+:} false; then : |
| 12440 | $as_echo_n "(cached) " >&6 |
| 12441 | else |
| 12442 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12443 | /* end confdefs.h. */ |
| 12444 | #include <stdlib.h> |
| 12445 | #include <stdarg.h> |
| 12446 | #include <string.h> |
| 12447 | #include <float.h> |
| 12448 | |
| 12449 | int |
| 12450 | main () |
| 12451 | { |
| 12452 | |
| 12453 | ; |
| 12454 | return 0; |
| 12455 | } |
| 12456 | _ACEOF |
| 12457 | if ac_fn_c_try_compile "$LINENO"; then : |
| 12458 | ac_cv_header_stdc=yes |
| 12459 | else |
| 12460 | ac_cv_header_stdc=no |
| 12461 | fi |
| 12462 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 12463 | |
| 12464 | if test $ac_cv_header_stdc = yes; then |
| 12465 | # SunOS 4.x string.h does not declare mem*, contrary to ANSI. |
| 12466 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12467 | /* end confdefs.h. */ |
| 12468 | #include <string.h> |
| 12469 | |
| 12470 | _ACEOF |
| 12471 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 12472 | $EGREP "memchr" >/dev/null 2>&1; then : |
| 12473 | |
| 12474 | else |
| 12475 | ac_cv_header_stdc=no |
| 12476 | fi |
| 12477 | rm -f conftest* |
| 12478 | |
| 12479 | fi |
| 12480 | |
| 12481 | if test $ac_cv_header_stdc = yes; then |
| 12482 | # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. |
| 12483 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12484 | /* end confdefs.h. */ |
| 12485 | #include <stdlib.h> |
| 12486 | |
| 12487 | _ACEOF |
| 12488 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 12489 | $EGREP "free" >/dev/null 2>&1; then : |
| 12490 | |
| 12491 | else |
| 12492 | ac_cv_header_stdc=no |
| 12493 | fi |
| 12494 | rm -f conftest* |
| 12495 | |
| 12496 | fi |
| 12497 | |
| 12498 | if test $ac_cv_header_stdc = yes; then |
| 12499 | # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. |
| 12500 | if test "$cross_compiling" = yes; then : |
| 12501 | : |
| 12502 | else |
| 12503 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12504 | /* end confdefs.h. */ |
| 12505 | #include <ctype.h> |
| 12506 | #include <stdlib.h> |
| 12507 | #if ((' ' & 0x0FF) == 0x020) |
| 12508 | # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') |
| 12509 | # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) |
| 12510 | #else |
| 12511 | # define ISLOWER(c) \ |
| 12512 | (('a' <= (c) && (c) <= 'i') \ |
| 12513 | || ('j' <= (c) && (c) <= 'r') \ |
| 12514 | || ('s' <= (c) && (c) <= 'z')) |
| 12515 | # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) |
| 12516 | #endif |
| 12517 | |
| 12518 | #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) |
| 12519 | int |
| 12520 | main () |
| 12521 | { |
| 12522 | int i; |
| 12523 | for (i = 0; i < 256; i++) |
| 12524 | if (XOR (islower (i), ISLOWER (i)) |
| 12525 | || toupper (i) != TOUPPER (i)) |
| 12526 | return 2; |
| 12527 | return 0; |
| 12528 | } |
| 12529 | _ACEOF |
| 12530 | if ac_fn_c_try_run "$LINENO"; then : |
| 12531 | |
| 12532 | else |
| 12533 | ac_cv_header_stdc=no |
| 12534 | fi |
| 12535 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 12536 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 12537 | fi |
| 12538 | |
| 12539 | fi |
| 12540 | fi |
| 12541 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 |
| 12542 | $as_echo "$ac_cv_header_stdc" >&6; } |
| 12543 | if test $ac_cv_header_stdc = yes; then |
| 12544 | |
| 12545 | $as_echo "#define STDC_HEADERS 1" >>confdefs.h |
| 12546 | |
| 12547 | fi |
| 12548 | |
| 12549 | # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works |
| 12550 | # for constant arguments. Useless! |
| 12551 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 |
| 12552 | $as_echo_n "checking for working alloca.h... " >&6; } |
| 12553 | if ${ac_cv_working_alloca_h+:} false; then : |
| 12554 | $as_echo_n "(cached) " >&6 |
| 12555 | else |
| 12556 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12557 | /* end confdefs.h. */ |
| 12558 | #include <alloca.h> |
| 12559 | int |
| 12560 | main () |
| 12561 | { |
| 12562 | char *p = (char *) alloca (2 * sizeof (int)); |
| 12563 | if (p) return 0; |
| 12564 | ; |
| 12565 | return 0; |
| 12566 | } |
| 12567 | _ACEOF |
| 12568 | if ac_fn_c_try_link "$LINENO"; then : |
| 12569 | ac_cv_working_alloca_h=yes |
| 12570 | else |
| 12571 | ac_cv_working_alloca_h=no |
| 12572 | fi |
| 12573 | rm -f core conftest.err conftest.$ac_objext \ |
| 12574 | conftest$ac_exeext conftest.$ac_ext |
| 12575 | fi |
| 12576 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 |
| 12577 | $as_echo "$ac_cv_working_alloca_h" >&6; } |
| 12578 | if test $ac_cv_working_alloca_h = yes; then |
| 12579 | |
| 12580 | $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h |
| 12581 | |
| 12582 | fi |
| 12583 | |
| 12584 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 |
| 12585 | $as_echo_n "checking for alloca... " >&6; } |
| 12586 | if ${ac_cv_func_alloca_works+:} false; then : |
| 12587 | $as_echo_n "(cached) " >&6 |
| 12588 | else |
| 12589 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12590 | /* end confdefs.h. */ |
| 12591 | #ifdef __GNUC__ |
| 12592 | # define alloca __builtin_alloca |
| 12593 | #else |
| 12594 | # ifdef _MSC_VER |
| 12595 | # include <malloc.h> |
| 12596 | # define alloca _alloca |
| 12597 | # else |
| 12598 | # ifdef HAVE_ALLOCA_H |
| 12599 | # include <alloca.h> |
| 12600 | # else |
| 12601 | # ifdef _AIX |
| 12602 | #pragma alloca |
| 12603 | # else |
| 12604 | # ifndef alloca /* predefined by HP cc +Olibcalls */ |
| 12605 | void *alloca (size_t); |
| 12606 | # endif |
| 12607 | # endif |
| 12608 | # endif |
| 12609 | # endif |
| 12610 | #endif |
| 12611 | |
| 12612 | int |
| 12613 | main () |
| 12614 | { |
| 12615 | char *p = (char *) alloca (1); |
| 12616 | if (p) return 0; |
| 12617 | ; |
| 12618 | return 0; |
| 12619 | } |
| 12620 | _ACEOF |
| 12621 | if ac_fn_c_try_link "$LINENO"; then : |
| 12622 | ac_cv_func_alloca_works=yes |
| 12623 | else |
| 12624 | ac_cv_func_alloca_works=no |
| 12625 | fi |
| 12626 | rm -f core conftest.err conftest.$ac_objext \ |
| 12627 | conftest$ac_exeext conftest.$ac_ext |
| 12628 | fi |
| 12629 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 |
| 12630 | $as_echo "$ac_cv_func_alloca_works" >&6; } |
| 12631 | |
| 12632 | if test $ac_cv_func_alloca_works = yes; then |
| 12633 | |
| 12634 | $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h |
| 12635 | |
| 12636 | else |
| 12637 | # The SVR3 libPW and SVR4 libucb both contain incompatible functions |
| 12638 | # that cause trouble. Some versions do not even contain alloca or |
| 12639 | # contain a buggy version. If you still want to use their alloca, |
| 12640 | # use ar to extract alloca.o from them instead of compiling alloca.c. |
| 12641 | |
| 12642 | ALLOCA=\${LIBOBJDIR}alloca.$ac_objext |
| 12643 | |
| 12644 | $as_echo "#define C_ALLOCA 1" >>confdefs.h |
| 12645 | |
| 12646 | |
| 12647 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 |
| 12648 | $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } |
| 12649 | if ${ac_cv_os_cray+:} false; then : |
| 12650 | $as_echo_n "(cached) " >&6 |
| 12651 | else |
| 12652 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12653 | /* end confdefs.h. */ |
| 12654 | #if defined CRAY && ! defined CRAY2 |
| 12655 | webecray |
| 12656 | #else |
| 12657 | wenotbecray |
| 12658 | #endif |
| 12659 | |
| 12660 | _ACEOF |
| 12661 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 12662 | $EGREP "webecray" >/dev/null 2>&1; then : |
| 12663 | ac_cv_os_cray=yes |
| 12664 | else |
| 12665 | ac_cv_os_cray=no |
| 12666 | fi |
| 12667 | rm -f conftest* |
| 12668 | |
| 12669 | fi |
| 12670 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 |
| 12671 | $as_echo "$ac_cv_os_cray" >&6; } |
| 12672 | if test $ac_cv_os_cray = yes; then |
| 12673 | for ac_func in _getb67 GETB67 getb67; do |
| 12674 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
| 12675 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
| 12676 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
| 12677 | |
| 12678 | cat >>confdefs.h <<_ACEOF |
| 12679 | #define CRAY_STACKSEG_END $ac_func |
| 12680 | _ACEOF |
| 12681 | |
| 12682 | break |
| 12683 | fi |
| 12684 | |
| 12685 | done |
| 12686 | fi |
| 12687 | |
| 12688 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 |
| 12689 | $as_echo_n "checking stack direction for C alloca... " >&6; } |
| 12690 | if ${ac_cv_c_stack_direction+:} false; then : |
| 12691 | $as_echo_n "(cached) " >&6 |
| 12692 | else |
| 12693 | if test "$cross_compiling" = yes; then : |
| 12694 | ac_cv_c_stack_direction=0 |
| 12695 | else |
| 12696 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12697 | /* end confdefs.h. */ |
| 12698 | $ac_includes_default |
| 12699 | int |
| 12700 | find_stack_direction (int *addr, int depth) |
| 12701 | { |
| 12702 | int dir, dummy = 0; |
| 12703 | if (! addr) |
| 12704 | addr = &dummy; |
| 12705 | *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; |
| 12706 | dir = depth ? find_stack_direction (addr, depth - 1) : 0; |
| 12707 | return dir + dummy; |
| 12708 | } |
| 12709 | |
| 12710 | int |
| 12711 | main (int argc, char **argv) |
| 12712 | { |
| 12713 | return find_stack_direction (0, argc + !argv + 20) < 0; |
| 12714 | } |
| 12715 | _ACEOF |
| 12716 | if ac_fn_c_try_run "$LINENO"; then : |
| 12717 | ac_cv_c_stack_direction=1 |
| 12718 | else |
| 12719 | ac_cv_c_stack_direction=-1 |
| 12720 | fi |
| 12721 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 12722 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 12723 | fi |
| 12724 | |
| 12725 | fi |
| 12726 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 |
| 12727 | $as_echo "$ac_cv_c_stack_direction" >&6; } |
| 12728 | cat >>confdefs.h <<_ACEOF |
| 12729 | #define STACK_DIRECTION $ac_cv_c_stack_direction |
| 12730 | _ACEOF |
| 12731 | |
| 12732 | |
| 12733 | fi |
| 12734 | |
| 12735 | |
| 12736 | WIN32APILIBS= |
| 12737 | case ${host} in |
| 12738 | *mingw32*) |
| 12739 | |
| 12740 | $as_echo "#define USE_WIN32API 1" >>confdefs.h |
| 12741 | |
| 12742 | WIN32APILIBS="-lws2_32" |
| 12743 | ;; |
| 12744 | esac |
| 12745 | |
| 12746 | |
| 12747 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5 |
| 12748 | $as_echo_n "checking for nl_langinfo and CODESET... " >&6; } |
| 12749 | if ${am_cv_langinfo_codeset+:} false; then : |
| 12750 | $as_echo_n "(cached) " >&6 |
| 12751 | else |
| 12752 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12753 | /* end confdefs.h. */ |
| 12754 | #include <langinfo.h> |
| 12755 | int |
| 12756 | main () |
| 12757 | { |
| 12758 | char* cs = nl_langinfo(CODESET); |
| 12759 | ; |
| 12760 | return 0; |
| 12761 | } |
| 12762 | _ACEOF |
| 12763 | if ac_fn_c_try_link "$LINENO"; then : |
| 12764 | am_cv_langinfo_codeset=yes |
| 12765 | else |
| 12766 | am_cv_langinfo_codeset=no |
| 12767 | fi |
| 12768 | rm -f core conftest.err conftest.$ac_objext \ |
| 12769 | conftest$ac_exeext conftest.$ac_ext |
| 12770 | |
| 12771 | fi |
| 12772 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5 |
| 12773 | $as_echo "$am_cv_langinfo_codeset" >&6; } |
| 12774 | if test $am_cv_langinfo_codeset = yes; then |
| 12775 | |
| 12776 | $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h |
| 12777 | |
| 12778 | fi |
| 12779 | |
| 12780 | |
| 12781 | for ac_header in linux/perf_event.h locale.h memory.h signal.h sys/resource.h sys/socket.h sys/un.h sys/wait.h thread_db.h wait.h termios.h dlfcn.h linux/elf.h sys/procfs.h proc_service.h |
| 12782 | do : |
| 12783 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 12784 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" |
| 12785 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
| 12786 | cat >>confdefs.h <<_ACEOF |
| 12787 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
| 12788 | _ACEOF |
| 12789 | |
| 12790 | fi |
| 12791 | |
| 12792 | done |
| 12793 | |
| 12794 | |
| 12795 | |
| 12796 | for ac_func in getpagesize |
| 12797 | do : |
| 12798 | ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" |
| 12799 | if test "x$ac_cv_func_getpagesize" = xyes; then : |
| 12800 | cat >>confdefs.h <<_ACEOF |
| 12801 | #define HAVE_GETPAGESIZE 1 |
| 12802 | _ACEOF |
| 12803 | |
| 12804 | fi |
| 12805 | done |
| 12806 | |
| 12807 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 |
| 12808 | $as_echo_n "checking for working mmap... " >&6; } |
| 12809 | if ${ac_cv_func_mmap_fixed_mapped+:} false; then : |
| 12810 | $as_echo_n "(cached) " >&6 |
| 12811 | else |
| 12812 | if test "$cross_compiling" = yes; then : |
| 12813 | ac_cv_func_mmap_fixed_mapped=no |
| 12814 | else |
| 12815 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 12816 | /* end confdefs.h. */ |
| 12817 | $ac_includes_default |
| 12818 | /* malloc might have been renamed as rpl_malloc. */ |
| 12819 | #undef malloc |
| 12820 | |
| 12821 | /* Thanks to Mike Haertel and Jim Avera for this test. |
| 12822 | Here is a matrix of mmap possibilities: |
| 12823 | mmap private not fixed |
| 12824 | mmap private fixed at somewhere currently unmapped |
| 12825 | mmap private fixed at somewhere already mapped |
| 12826 | mmap shared not fixed |
| 12827 | mmap shared fixed at somewhere currently unmapped |
| 12828 | mmap shared fixed at somewhere already mapped |
| 12829 | For private mappings, we should verify that changes cannot be read() |
| 12830 | back from the file, nor mmap's back from the file at a different |
| 12831 | address. (There have been systems where private was not correctly |
| 12832 | implemented like the infamous i386 svr4.0, and systems where the |
| 12833 | VM page cache was not coherent with the file system buffer cache |
| 12834 | like early versions of FreeBSD and possibly contemporary NetBSD.) |
| 12835 | For shared mappings, we should conversely verify that changes get |
| 12836 | propagated back to all the places they're supposed to be. |
| 12837 | |
| 12838 | Grep wants private fixed already mapped. |
| 12839 | The main things grep needs to know about mmap are: |
| 12840 | * does it exist and is it safe to write into the mmap'd area |
| 12841 | * how to use it (BSD variants) */ |
| 12842 | |
| 12843 | #include <fcntl.h> |
| 12844 | #include <sys/mman.h> |
| 12845 | |
| 12846 | #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H |
| 12847 | char *malloc (); |
| 12848 | #endif |
| 12849 | |
| 12850 | /* This mess was copied from the GNU getpagesize.h. */ |
| 12851 | #ifndef HAVE_GETPAGESIZE |
| 12852 | # ifdef _SC_PAGESIZE |
| 12853 | # define getpagesize() sysconf(_SC_PAGESIZE) |
| 12854 | # else /* no _SC_PAGESIZE */ |
| 12855 | # ifdef HAVE_SYS_PARAM_H |
| 12856 | # include <sys/param.h> |
| 12857 | # ifdef EXEC_PAGESIZE |
| 12858 | # define getpagesize() EXEC_PAGESIZE |
| 12859 | # else /* no EXEC_PAGESIZE */ |
| 12860 | # ifdef NBPG |
| 12861 | # define getpagesize() NBPG * CLSIZE |
| 12862 | # ifndef CLSIZE |
| 12863 | # define CLSIZE 1 |
| 12864 | # endif /* no CLSIZE */ |
| 12865 | # else /* no NBPG */ |
| 12866 | # ifdef NBPC |
| 12867 | # define getpagesize() NBPC |
| 12868 | # else /* no NBPC */ |
| 12869 | # ifdef PAGESIZE |
| 12870 | # define getpagesize() PAGESIZE |
| 12871 | # endif /* PAGESIZE */ |
| 12872 | # endif /* no NBPC */ |
| 12873 | # endif /* no NBPG */ |
| 12874 | # endif /* no EXEC_PAGESIZE */ |
| 12875 | # else /* no HAVE_SYS_PARAM_H */ |
| 12876 | # define getpagesize() 8192 /* punt totally */ |
| 12877 | # endif /* no HAVE_SYS_PARAM_H */ |
| 12878 | # endif /* no _SC_PAGESIZE */ |
| 12879 | |
| 12880 | #endif /* no HAVE_GETPAGESIZE */ |
| 12881 | |
| 12882 | int |
| 12883 | main () |
| 12884 | { |
| 12885 | char *data, *data2, *data3; |
| 12886 | const char *cdata2; |
| 12887 | int i, pagesize; |
| 12888 | int fd, fd2; |
| 12889 | |
| 12890 | pagesize = getpagesize (); |
| 12891 | |
| 12892 | /* First, make a file with some known garbage in it. */ |
| 12893 | data = (char *) malloc (pagesize); |
| 12894 | if (!data) |
| 12895 | return 1; |
| 12896 | for (i = 0; i < pagesize; ++i) |
| 12897 | *(data + i) = rand (); |
| 12898 | umask (0); |
| 12899 | fd = creat ("conftest.mmap", 0600); |
| 12900 | if (fd < 0) |
| 12901 | return 2; |
| 12902 | if (write (fd, data, pagesize) != pagesize) |
| 12903 | return 3; |
| 12904 | close (fd); |
| 12905 | |
| 12906 | /* Next, check that the tail of a page is zero-filled. File must have |
| 12907 | non-zero length, otherwise we risk SIGBUS for entire page. */ |
| 12908 | fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); |
| 12909 | if (fd2 < 0) |
| 12910 | return 4; |
| 12911 | cdata2 = ""; |
| 12912 | if (write (fd2, cdata2, 1) != 1) |
| 12913 | return 5; |
| 12914 | data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); |
| 12915 | if (data2 == MAP_FAILED) |
| 12916 | return 6; |
| 12917 | for (i = 0; i < pagesize; ++i) |
| 12918 | if (*(data2 + i)) |
| 12919 | return 7; |
| 12920 | close (fd2); |
| 12921 | if (munmap (data2, pagesize)) |
| 12922 | return 8; |
| 12923 | |
| 12924 | /* Next, try to mmap the file at a fixed address which already has |
| 12925 | something else allocated at it. If we can, also make sure that |
| 12926 | we see the same garbage. */ |
| 12927 | fd = open ("conftest.mmap", O_RDWR); |
| 12928 | if (fd < 0) |
| 12929 | return 9; |
| 12930 | if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, |
| 12931 | MAP_PRIVATE | MAP_FIXED, fd, 0L)) |
| 12932 | return 10; |
| 12933 | for (i = 0; i < pagesize; ++i) |
| 12934 | if (*(data + i) != *(data2 + i)) |
| 12935 | return 11; |
| 12936 | |
| 12937 | /* Finally, make sure that changes to the mapped area do not |
| 12938 | percolate back to the file as seen by read(). (This is a bug on |
| 12939 | some variants of i386 svr4.0.) */ |
| 12940 | for (i = 0; i < pagesize; ++i) |
| 12941 | *(data2 + i) = *(data2 + i) + 1; |
| 12942 | data3 = (char *) malloc (pagesize); |
| 12943 | if (!data3) |
| 12944 | return 12; |
| 12945 | if (read (fd, data3, pagesize) != pagesize) |
| 12946 | return 13; |
| 12947 | for (i = 0; i < pagesize; ++i) |
| 12948 | if (*(data + i) != *(data3 + i)) |
| 12949 | return 14; |
| 12950 | close (fd); |
| 12951 | return 0; |
| 12952 | } |
| 12953 | _ACEOF |
| 12954 | if ac_fn_c_try_run "$LINENO"; then : |
| 12955 | ac_cv_func_mmap_fixed_mapped=yes |
| 12956 | else |
| 12957 | ac_cv_func_mmap_fixed_mapped=no |
| 12958 | fi |
| 12959 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 12960 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 12961 | fi |
| 12962 | |
| 12963 | fi |
| 12964 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 |
| 12965 | $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } |
| 12966 | if test $ac_cv_func_mmap_fixed_mapped = yes; then |
| 12967 | |
| 12968 | $as_echo "#define HAVE_MMAP 1" >>confdefs.h |
| 12969 | |
| 12970 | fi |
| 12971 | rm -f conftest.mmap conftest.txt |
| 12972 | |
| 12973 | for ac_header in vfork.h |
| 12974 | do : |
| 12975 | ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" |
| 12976 | if test "x$ac_cv_header_vfork_h" = xyes; then : |
| 12977 | cat >>confdefs.h <<_ACEOF |
| 12978 | #define HAVE_VFORK_H 1 |
| 12979 | _ACEOF |
| 12980 | |
| 12981 | fi |
| 12982 | |
| 12983 | done |
| 12984 | |
| 12985 | for ac_func in fork vfork |
| 12986 | do : |
| 12987 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
| 12988 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
| 12989 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
| 12990 | cat >>confdefs.h <<_ACEOF |
| 12991 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
| 12992 | _ACEOF |
| 12993 | |
| 12994 | fi |
| 12995 | done |
| 12996 | |
| 12997 | if test "x$ac_cv_func_fork" = xyes; then |
| 12998 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 |
| 12999 | $as_echo_n "checking for working fork... " >&6; } |
| 13000 | if ${ac_cv_func_fork_works+:} false; then : |
| 13001 | $as_echo_n "(cached) " >&6 |
| 13002 | else |
| 13003 | if test "$cross_compiling" = yes; then : |
| 13004 | ac_cv_func_fork_works=cross |
| 13005 | else |
| 13006 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 13007 | /* end confdefs.h. */ |
| 13008 | $ac_includes_default |
| 13009 | int |
| 13010 | main () |
| 13011 | { |
| 13012 | |
| 13013 | /* By Ruediger Kuhlmann. */ |
| 13014 | return fork () < 0; |
| 13015 | |
| 13016 | ; |
| 13017 | return 0; |
| 13018 | } |
| 13019 | _ACEOF |
| 13020 | if ac_fn_c_try_run "$LINENO"; then : |
| 13021 | ac_cv_func_fork_works=yes |
| 13022 | else |
| 13023 | ac_cv_func_fork_works=no |
| 13024 | fi |
| 13025 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 13026 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 13027 | fi |
| 13028 | |
| 13029 | fi |
| 13030 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 |
| 13031 | $as_echo "$ac_cv_func_fork_works" >&6; } |
| 13032 | |
| 13033 | else |
| 13034 | ac_cv_func_fork_works=$ac_cv_func_fork |
| 13035 | fi |
| 13036 | if test "x$ac_cv_func_fork_works" = xcross; then |
| 13037 | case $host in |
| 13038 | *-*-amigaos* | *-*-msdosdjgpp*) |
| 13039 | # Override, as these systems have only a dummy fork() stub |
| 13040 | ac_cv_func_fork_works=no |
| 13041 | ;; |
| 13042 | *) |
| 13043 | ac_cv_func_fork_works=yes |
| 13044 | ;; |
| 13045 | esac |
| 13046 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 |
| 13047 | $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} |
| 13048 | fi |
| 13049 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
| 13050 | if test "x$ac_cv_func_vfork" = xyes; then |
| 13051 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 |
| 13052 | $as_echo_n "checking for working vfork... " >&6; } |
| 13053 | if ${ac_cv_func_vfork_works+:} false; then : |
| 13054 | $as_echo_n "(cached) " >&6 |
| 13055 | else |
| 13056 | if test "$cross_compiling" = yes; then : |
| 13057 | ac_cv_func_vfork_works=cross |
| 13058 | else |
| 13059 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 13060 | /* end confdefs.h. */ |
| 13061 | /* Thanks to Paul Eggert for this test. */ |
| 13062 | $ac_includes_default |
| 13063 | #include <sys/wait.h> |
| 13064 | #ifdef HAVE_VFORK_H |
| 13065 | # include <vfork.h> |
| 13066 | #endif |
| 13067 | /* On some sparc systems, changes by the child to local and incoming |
| 13068 | argument registers are propagated back to the parent. The compiler |
| 13069 | is told about this with #include <vfork.h>, but some compilers |
| 13070 | (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a |
| 13071 | static variable whose address is put into a register that is |
| 13072 | clobbered by the vfork. */ |
| 13073 | static void |
| 13074 | #ifdef __cplusplus |
| 13075 | sparc_address_test (int arg) |
| 13076 | # else |
| 13077 | sparc_address_test (arg) int arg; |
| 13078 | #endif |
| 13079 | { |
| 13080 | static pid_t child; |
| 13081 | if (!child) { |
| 13082 | child = vfork (); |
| 13083 | if (child < 0) { |
| 13084 | perror ("vfork"); |
| 13085 | _exit(2); |
| 13086 | } |
| 13087 | if (!child) { |
| 13088 | arg = getpid(); |
| 13089 | write(-1, "", 0); |
| 13090 | _exit (arg); |
| 13091 | } |
| 13092 | } |
| 13093 | } |
| 13094 | |
| 13095 | int |
| 13096 | main () |
| 13097 | { |
| 13098 | pid_t parent = getpid (); |
| 13099 | pid_t child; |
| 13100 | |
| 13101 | sparc_address_test (0); |
| 13102 | |
| 13103 | child = vfork (); |
| 13104 | |
| 13105 | if (child == 0) { |
| 13106 | /* Here is another test for sparc vfork register problems. This |
| 13107 | test uses lots of local variables, at least as many local |
| 13108 | variables as main has allocated so far including compiler |
| 13109 | temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris |
| 13110 | 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should |
| 13111 | reuse the register of parent for one of the local variables, |
| 13112 | since it will think that parent can't possibly be used any more |
| 13113 | in this routine. Assigning to the local variable will thus |
| 13114 | munge parent in the parent process. */ |
| 13115 | pid_t |
| 13116 | p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), |
| 13117 | p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); |
| 13118 | /* Convince the compiler that p..p7 are live; otherwise, it might |
| 13119 | use the same hardware register for all 8 local variables. */ |
| 13120 | if (p != p1 || p != p2 || p != p3 || p != p4 |
| 13121 | || p != p5 || p != p6 || p != p7) |
| 13122 | _exit(1); |
| 13123 | |
| 13124 | /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent |
| 13125 | from child file descriptors. If the child closes a descriptor |
| 13126 | before it execs or exits, this munges the parent's descriptor |
| 13127 | as well. Test for this by closing stdout in the child. */ |
| 13128 | _exit(close(fileno(stdout)) != 0); |
| 13129 | } else { |
| 13130 | int status; |
| 13131 | struct stat st; |
| 13132 | |
| 13133 | while (wait(&status) != child) |
| 13134 | ; |
| 13135 | return ( |
| 13136 | /* Was there some problem with vforking? */ |
| 13137 | child < 0 |
| 13138 | |
| 13139 | /* Did the child fail? (This shouldn't happen.) */ |
| 13140 | || status |
| 13141 | |
| 13142 | /* Did the vfork/compiler bug occur? */ |
| 13143 | || parent != getpid() |
| 13144 | |
| 13145 | /* Did the file descriptor bug occur? */ |
| 13146 | || fstat(fileno(stdout), &st) != 0 |
| 13147 | ); |
| 13148 | } |
| 13149 | } |
| 13150 | _ACEOF |
| 13151 | if ac_fn_c_try_run "$LINENO"; then : |
| 13152 | ac_cv_func_vfork_works=yes |
| 13153 | else |
| 13154 | ac_cv_func_vfork_works=no |
| 13155 | fi |
| 13156 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 13157 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 13158 | fi |
| 13159 | |
| 13160 | fi |
| 13161 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 |
| 13162 | $as_echo "$ac_cv_func_vfork_works" >&6; } |
| 13163 | |
| 13164 | fi; |
| 13165 | if test "x$ac_cv_func_fork_works" = xcross; then |
| 13166 | ac_cv_func_vfork_works=$ac_cv_func_vfork |
| 13167 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 |
| 13168 | $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} |
| 13169 | fi |
| 13170 | |
| 13171 | if test "x$ac_cv_func_vfork_works" = xyes; then |
| 13172 | |
| 13173 | $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h |
| 13174 | |
| 13175 | else |
| 13176 | |
| 13177 | $as_echo "#define vfork fork" >>confdefs.h |
| 13178 | |
| 13179 | fi |
| 13180 | if test "x$ac_cv_func_fork_works" = xyes; then |
| 13181 | |
| 13182 | $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h |
| 13183 | |
| 13184 | fi |
| 13185 | |
| 13186 | for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \ |
| 13187 | ptrace64 sbrk setns sigaltstack sigprocmask \ |
| 13188 | setpgid setpgrp getrusage getauxval |
| 13189 | do : |
| 13190 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
| 13191 | ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" |
| 13192 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
| 13193 | cat >>confdefs.h <<_ACEOF |
| 13194 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
| 13195 | _ACEOF |
| 13196 | |
| 13197 | fi |
| 13198 | done |
| 13199 | |
| 13200 | |
| 13201 | ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h> |
| 13202 | " |
| 13203 | if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then : |
| 13204 | ac_have_decl=1 |
| 13205 | else |
| 13206 | ac_have_decl=0 |
| 13207 | fi |
| 13208 | |
| 13209 | cat >>confdefs.h <<_ACEOF |
| 13210 | #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl |
| 13211 | _ACEOF |
| 13212 | |
| 13213 | |
| 13214 | if test "$cross_compiling" = yes; then : |
| 13215 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 13216 | /* end confdefs.h. */ |
| 13217 | #include <sys/personality.h> |
| 13218 | int |
| 13219 | main () |
| 13220 | { |
| 13221 | |
| 13222 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE |
| 13223 | # define ADDR_NO_RANDOMIZE 0x0040000 |
| 13224 | # endif |
| 13225 | /* Test the flag could be set and stays set. */ |
| 13226 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); |
| 13227 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) |
| 13228 | return 1 |
| 13229 | ; |
| 13230 | return 0; |
| 13231 | } |
| 13232 | _ACEOF |
| 13233 | if ac_fn_c_try_link "$LINENO"; then : |
| 13234 | have_personality=true |
| 13235 | else |
| 13236 | have_personality=false |
| 13237 | fi |
| 13238 | rm -f core conftest.err conftest.$ac_objext \ |
| 13239 | conftest$ac_exeext conftest.$ac_ext |
| 13240 | else |
| 13241 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 13242 | /* end confdefs.h. */ |
| 13243 | #include <sys/personality.h> |
| 13244 | int |
| 13245 | main () |
| 13246 | { |
| 13247 | |
| 13248 | # if !HAVE_DECL_ADDR_NO_RANDOMIZE |
| 13249 | # define ADDR_NO_RANDOMIZE 0x0040000 |
| 13250 | # endif |
| 13251 | /* Test the flag could be set and stays set. */ |
| 13252 | personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE); |
| 13253 | if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE)) |
| 13254 | return 1 |
| 13255 | ; |
| 13256 | return 0; |
| 13257 | } |
| 13258 | _ACEOF |
| 13259 | if ac_fn_c_try_run "$LINENO"; then : |
| 13260 | have_personality=true |
| 13261 | else |
| 13262 | have_personality=false |
| 13263 | fi |
| 13264 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 13265 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 13266 | fi |
| 13267 | |
| 13268 | if $have_personality |
| 13269 | then |
| 13270 | |
| 13271 | $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h |
| 13272 | |
| 13273 | fi |
| 13274 | |
| 13275 | ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default" |
| 13276 | if test "x$ac_cv_have_decl_strstr" = xyes; then : |
| 13277 | ac_have_decl=1 |
| 13278 | else |
| 13279 | ac_have_decl=0 |
| 13280 | fi |
| 13281 | |
| 13282 | cat >>confdefs.h <<_ACEOF |
| 13283 | #define HAVE_DECL_STRSTR $ac_have_decl |
| 13284 | _ACEOF |
| 13285 | |
| 13286 | |
| 13287 | # ----------------------- # |
| 13288 | # Checks for structures. # |
| 13289 | # ----------------------- # |
| 13290 | |
| 13291 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default" |
| 13292 | if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then : |
| 13293 | |
| 13294 | cat >>confdefs.h <<_ACEOF |
| 13295 | #define HAVE_STRUCT_STAT_ST_BLOCKS 1 |
| 13296 | _ACEOF |
| 13297 | |
| 13298 | |
| 13299 | fi |
| 13300 | ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default" |
| 13301 | if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then : |
| 13302 | |
| 13303 | cat >>confdefs.h <<_ACEOF |
| 13304 | #define HAVE_STRUCT_STAT_ST_BLKSIZE 1 |
| 13305 | _ACEOF |
| 13306 | |
| 13307 | |
| 13308 | fi |
| 13309 | |
| 13310 | |
| 13311 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5 |
| 13312 | $as_echo_n "checking for library containing kinfo_getfile... " >&6; } |
| 13313 | if ${ac_cv_search_kinfo_getfile+:} false; then : |
| 13314 | $as_echo_n "(cached) " >&6 |
| 13315 | else |
| 13316 | ac_func_search_save_LIBS=$LIBS |
| 13317 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 13318 | /* end confdefs.h. */ |
| 13319 | |
| 13320 | /* Override any GCC internal prototype to avoid an error. |
| 13321 | Use char because int might match the return type of a GCC |
| 13322 | builtin and then its argument prototype would still apply. */ |
| 13323 | #ifdef __cplusplus |
| 13324 | extern "C" |
| 13325 | #endif |
| 13326 | char kinfo_getfile (); |
| 13327 | int |
| 13328 | main () |
| 13329 | { |
| 13330 | return kinfo_getfile (); |
| 13331 | ; |
| 13332 | return 0; |
| 13333 | } |
| 13334 | _ACEOF |
| 13335 | for ac_lib in '' util util-freebsd; do |
| 13336 | if test -z "$ac_lib"; then |
| 13337 | ac_res="none required" |
| 13338 | else |
| 13339 | ac_res=-l$ac_lib |
| 13340 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
| 13341 | fi |
| 13342 | if ac_fn_c_try_link "$LINENO"; then : |
| 13343 | ac_cv_search_kinfo_getfile=$ac_res |
| 13344 | fi |
| 13345 | rm -f core conftest.err conftest.$ac_objext \ |
| 13346 | conftest$ac_exeext |
| 13347 | if ${ac_cv_search_kinfo_getfile+:} false; then : |
| 13348 | break |
| 13349 | fi |
| 13350 | done |
| 13351 | if ${ac_cv_search_kinfo_getfile+:} false; then : |
| 13352 | |
| 13353 | else |
| 13354 | ac_cv_search_kinfo_getfile=no |
| 13355 | fi |
| 13356 | rm conftest.$ac_ext |
| 13357 | LIBS=$ac_func_search_save_LIBS |
| 13358 | fi |
| 13359 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5 |
| 13360 | $as_echo "$ac_cv_search_kinfo_getfile" >&6; } |
| 13361 | ac_res=$ac_cv_search_kinfo_getfile |
| 13362 | if test "$ac_res" != no; then : |
| 13363 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
| 13364 | |
| 13365 | $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h |
| 13366 | |
| 13367 | fi |
| 13368 | |
| 13369 | |
| 13370 | # Check for std::thread. This does not work on some platforms, like |
| 13371 | # mingw and DJGPP. |
| 13372 | ac_ext=cpp |
| 13373 | ac_cpp='$CXXCPP $CPPFLAGS' |
| 13374 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 13375 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 13376 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu |
| 13377 | |
| 13378 | |
| 13379 | |
| 13380 | |
| 13381 | |
| 13382 | ac_ext=c |
| 13383 | ac_cpp='$CPP $CPPFLAGS' |
| 13384 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 13385 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 13386 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 13387 | |
| 13388 | ax_pthread_ok=no |
| 13389 | |
| 13390 | # We used to check for pthread.h first, but this fails if pthread.h |
| 13391 | # requires special compiler flags (e.g. on Tru64 or Sequent). |
| 13392 | # It gets checked for in the link test anyway. |
| 13393 | |
| 13394 | # First of all, check if the user has set any of the PTHREAD_LIBS, |
| 13395 | # etcetera environment variables, and if threads linking works using |
| 13396 | # them: |
| 13397 | if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then |
| 13398 | ax_pthread_save_CC="$CC" |
| 13399 | ax_pthread_save_CFLAGS="$CFLAGS" |
| 13400 | ax_pthread_save_LIBS="$LIBS" |
| 13401 | if test "x$PTHREAD_CC" != "x"; then : |
| 13402 | CC="$PTHREAD_CC" |
| 13403 | fi |
| 13404 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
| 13405 | LIBS="$PTHREAD_LIBS $LIBS" |
| 13406 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5 |
| 13407 | $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; } |
| 13408 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 13409 | /* end confdefs.h. */ |
| 13410 | |
| 13411 | /* Override any GCC internal prototype to avoid an error. |
| 13412 | Use char because int might match the return type of a GCC |
| 13413 | builtin and then its argument prototype would still apply. */ |
| 13414 | #ifdef __cplusplus |
| 13415 | extern "C" |
| 13416 | #endif |
| 13417 | char pthread_join (); |
| 13418 | int |
| 13419 | main () |
| 13420 | { |
| 13421 | return pthread_join (); |
| 13422 | ; |
| 13423 | return 0; |
| 13424 | } |
| 13425 | _ACEOF |
| 13426 | if ac_fn_c_try_link "$LINENO"; then : |
| 13427 | ax_pthread_ok=yes |
| 13428 | fi |
| 13429 | rm -f core conftest.err conftest.$ac_objext \ |
| 13430 | conftest$ac_exeext conftest.$ac_ext |
| 13431 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 |
| 13432 | $as_echo "$ax_pthread_ok" >&6; } |
| 13433 | if test "x$ax_pthread_ok" = "xno"; then |
| 13434 | PTHREAD_LIBS="" |
| 13435 | PTHREAD_CFLAGS="" |
| 13436 | fi |
| 13437 | CC="$ax_pthread_save_CC" |
| 13438 | CFLAGS="$ax_pthread_save_CFLAGS" |
| 13439 | LIBS="$ax_pthread_save_LIBS" |
| 13440 | fi |
| 13441 | |
| 13442 | # We must check for the threads library under a number of different |
| 13443 | # names; the ordering is very important because some systems |
| 13444 | # (e.g. DEC) have both -lpthread and -lpthreads, where one of the |
| 13445 | # libraries is broken (non-POSIX). |
| 13446 | |
| 13447 | # Create a list of thread flags to try. Items starting with a "-" are |
| 13448 | # C compiler flags, and other items are library names, except for "none" |
| 13449 | # which indicates that we try without any flags at all, and "pthread-config" |
| 13450 | # which is a program returning the flags for the Pth emulation library. |
| 13451 | |
| 13452 | ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" |
| 13453 | |
| 13454 | # The ordering *is* (sometimes) important. Some notes on the |
| 13455 | # individual items follow: |
| 13456 | |
| 13457 | # pthreads: AIX (must check this before -lpthread) |
| 13458 | # none: in case threads are in libc; should be tried before -Kthread and |
| 13459 | # other compiler flags to prevent continual compiler warnings |
| 13460 | # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) |
| 13461 | # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64 |
| 13462 | # (Note: HP C rejects this with "bad form for `-t' option") |
| 13463 | # -pthreads: Solaris/gcc (Note: HP C also rejects) |
| 13464 | # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it |
| 13465 | # doesn't hurt to check since this sometimes defines pthreads and |
| 13466 | # -D_REENTRANT too), HP C (must be checked before -lpthread, which |
| 13467 | # is present but should not be used directly; and before -mthreads, |
| 13468 | # because the compiler interprets this as "-mt" + "-hreads") |
| 13469 | # -mthreads: Mingw32/gcc, Lynx/gcc |
| 13470 | # pthread: Linux, etcetera |
| 13471 | # --thread-safe: KAI C++ |
| 13472 | # pthread-config: use pthread-config program (for GNU Pth library) |
| 13473 | |
| 13474 | case $host_os in |
| 13475 | |
| 13476 | freebsd*) |
| 13477 | |
| 13478 | # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) |
| 13479 | # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) |
| 13480 | |
| 13481 | ax_pthread_flags="-kthread lthread $ax_pthread_flags" |
| 13482 | ;; |
| 13483 | |
| 13484 | hpux*) |
| 13485 | |
| 13486 | # From the cc(1) man page: "[-mt] Sets various -D flags to enable |
| 13487 | # multi-threading and also sets -lpthread." |
| 13488 | |
| 13489 | ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags" |
| 13490 | ;; |
| 13491 | |
| 13492 | openedition*) |
| 13493 | |
| 13494 | # IBM z/OS requires a feature-test macro to be defined in order to |
| 13495 | # enable POSIX threads at all, so give the user a hint if this is |
| 13496 | # not set. (We don't define these ourselves, as they can affect |
| 13497 | # other portions of the system API in unpredictable ways.) |
| 13498 | |
| 13499 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 13500 | /* end confdefs.h. */ |
| 13501 | |
| 13502 | # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS) |
| 13503 | AX_PTHREAD_ZOS_MISSING |
| 13504 | # endif |
| 13505 | |
| 13506 | _ACEOF |
| 13507 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 13508 | $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then : |
| 13509 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5 |
| 13510 | $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;} |
| 13511 | fi |
| 13512 | rm -f conftest* |
| 13513 | |
| 13514 | ;; |
| 13515 | |
| 13516 | solaris*) |
| 13517 | |
| 13518 | # On Solaris (at least, for some versions), libc contains stubbed |
| 13519 | # (non-functional) versions of the pthreads routines, so link-based |
| 13520 | # tests will erroneously succeed. (N.B.: The stubs are missing |
| 13521 | # pthread_cleanup_push, or rather a function called by this macro, |
| 13522 | # so we could check for that, but who knows whether they'll stub |
| 13523 | # that too in a future libc.) So we'll check first for the |
| 13524 | # standard Solaris way of linking pthreads (-mt -lpthread). |
| 13525 | |
| 13526 | ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags" |
| 13527 | ;; |
| 13528 | esac |
| 13529 | |
| 13530 | # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC) |
| 13531 | |
| 13532 | if test "x$GCC" = "xyes"; then : |
| 13533 | ax_pthread_flags="-pthread -pthreads $ax_pthread_flags" |
| 13534 | fi |
| 13535 | |
| 13536 | # The presence of a feature test macro requesting re-entrant function |
| 13537 | # definitions is, on some systems, a strong hint that pthreads support is |
| 13538 | # correctly enabled |
| 13539 | |
| 13540 | case $host_os in |
| 13541 | darwin* | hpux* | linux* | osf* | solaris*) |
| 13542 | ax_pthread_check_macro="_REENTRANT" |
| 13543 | ;; |
| 13544 | |
| 13545 | aix*) |
| 13546 | ax_pthread_check_macro="_THREAD_SAFE" |
| 13547 | ;; |
| 13548 | |
| 13549 | *) |
| 13550 | ax_pthread_check_macro="--" |
| 13551 | ;; |
| 13552 | esac |
| 13553 | if test "x$ax_pthread_check_macro" = "x--"; then : |
| 13554 | ax_pthread_check_cond=0 |
| 13555 | else |
| 13556 | ax_pthread_check_cond="!defined($ax_pthread_check_macro)" |
| 13557 | fi |
| 13558 | |
| 13559 | # Are we compiling with Clang? |
| 13560 | |
| 13561 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5 |
| 13562 | $as_echo_n "checking whether $CC is Clang... " >&6; } |
| 13563 | if ${ax_cv_PTHREAD_CLANG+:} false; then : |
| 13564 | $as_echo_n "(cached) " >&6 |
| 13565 | else |
| 13566 | ax_cv_PTHREAD_CLANG=no |
| 13567 | # Note that Autoconf sets GCC=yes for Clang as well as GCC |
| 13568 | if test "x$GCC" = "xyes"; then |
| 13569 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 13570 | /* end confdefs.h. */ |
| 13571 | /* Note: Clang 2.7 lacks __clang_[a-z]+__ */ |
| 13572 | # if defined(__clang__) && defined(__llvm__) |
| 13573 | AX_PTHREAD_CC_IS_CLANG |
| 13574 | # endif |
| 13575 | |
| 13576 | _ACEOF |
| 13577 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 13578 | $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then : |
| 13579 | ax_cv_PTHREAD_CLANG=yes |
| 13580 | fi |
| 13581 | rm -f conftest* |
| 13582 | |
| 13583 | fi |
| 13584 | |
| 13585 | fi |
| 13586 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5 |
| 13587 | $as_echo "$ax_cv_PTHREAD_CLANG" >&6; } |
| 13588 | ax_pthread_clang="$ax_cv_PTHREAD_CLANG" |
| 13589 | |
| 13590 | ax_pthread_clang_warning=no |
| 13591 | |
| 13592 | # Clang needs special handling, because older versions handle the -pthread |
| 13593 | # option in a rather... idiosyncratic way |
| 13594 | |
| 13595 | if test "x$ax_pthread_clang" = "xyes"; then |
| 13596 | |
| 13597 | # Clang takes -pthread; it has never supported any other flag |
| 13598 | |
| 13599 | # (Note 1: This will need to be revisited if a system that Clang |
| 13600 | # supports has POSIX threads in a separate library. This tends not |
| 13601 | # to be the way of modern systems, but it's conceivable.) |
| 13602 | |
| 13603 | # (Note 2: On some systems, notably Darwin, -pthread is not needed |
| 13604 | # to get POSIX threads support; the API is always present and |
| 13605 | # active. We could reasonably leave PTHREAD_CFLAGS empty. But |
| 13606 | # -pthread does define _REENTRANT, and while the Darwin headers |
| 13607 | # ignore this macro, third-party headers might not.) |
| 13608 | |
| 13609 | PTHREAD_CFLAGS="-pthread" |
| 13610 | PTHREAD_LIBS= |
| 13611 | |
| 13612 | ax_pthread_ok=yes |
| 13613 | |
| 13614 | # However, older versions of Clang make a point of warning the user |
| 13615 | # that, in an invocation where only linking and no compilation is |
| 13616 | # taking place, the -pthread option has no effect ("argument unused |
| 13617 | # during compilation"). They expect -pthread to be passed in only |
| 13618 | # when source code is being compiled. |
| 13619 | # |
| 13620 | # Problem is, this is at odds with the way Automake and most other |
| 13621 | # C build frameworks function, which is that the same flags used in |
| 13622 | # compilation (CFLAGS) are also used in linking. Many systems |
| 13623 | # supported by AX_PTHREAD require exactly this for POSIX threads |
| 13624 | # support, and in fact it is often not straightforward to specify a |
| 13625 | # flag that is used only in the compilation phase and not in |
| 13626 | # linking. Such a scenario is extremely rare in practice. |
| 13627 | # |
| 13628 | # Even though use of the -pthread flag in linking would only print |
| 13629 | # a warning, this can be a nuisance for well-run software projects |
| 13630 | # that build with -Werror. So if the active version of Clang has |
| 13631 | # this misfeature, we search for an option to squash it. |
| 13632 | |
| 13633 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5 |
| 13634 | $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; } |
| 13635 | if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then : |
| 13636 | $as_echo_n "(cached) " >&6 |
| 13637 | else |
| 13638 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown |
| 13639 | # Create an alternate version of $ac_link that compiles and |
| 13640 | # links in two steps (.c -> .o, .o -> exe) instead of one |
| 13641 | # (.c -> exe), because the warning occurs only in the second |
| 13642 | # step |
| 13643 | ax_pthread_save_ac_link="$ac_link" |
| 13644 | ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g' |
| 13645 | ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"` |
| 13646 | ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)" |
| 13647 | ax_pthread_save_CFLAGS="$CFLAGS" |
| 13648 | for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do |
| 13649 | if test "x$ax_pthread_try" = "xunknown"; then : |
| 13650 | break |
| 13651 | fi |
| 13652 | CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS" |
| 13653 | ac_link="$ax_pthread_save_ac_link" |
| 13654 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 13655 | /* end confdefs.h. */ |
| 13656 | int main(void){return 0;} |
| 13657 | _ACEOF |
| 13658 | if ac_fn_c_try_link "$LINENO"; then : |
| 13659 | ac_link="$ax_pthread_2step_ac_link" |
| 13660 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 13661 | /* end confdefs.h. */ |
| 13662 | int main(void){return 0;} |
| 13663 | _ACEOF |
| 13664 | if ac_fn_c_try_link "$LINENO"; then : |
| 13665 | break |
| 13666 | fi |
| 13667 | rm -f core conftest.err conftest.$ac_objext \ |
| 13668 | conftest$ac_exeext conftest.$ac_ext |
| 13669 | |
| 13670 | fi |
| 13671 | rm -f core conftest.err conftest.$ac_objext \ |
| 13672 | conftest$ac_exeext conftest.$ac_ext |
| 13673 | done |
| 13674 | ac_link="$ax_pthread_save_ac_link" |
| 13675 | CFLAGS="$ax_pthread_save_CFLAGS" |
| 13676 | if test "x$ax_pthread_try" = "x"; then : |
| 13677 | ax_pthread_try=no |
| 13678 | fi |
| 13679 | ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try" |
| 13680 | |
| 13681 | fi |
| 13682 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5 |
| 13683 | $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; } |
| 13684 | |
| 13685 | case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in |
| 13686 | no | unknown) ;; |
| 13687 | *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;; |
| 13688 | esac |
| 13689 | |
| 13690 | fi # $ax_pthread_clang = yes |
| 13691 | |
| 13692 | if test "x$ax_pthread_ok" = "xno"; then |
| 13693 | for ax_pthread_try_flag in $ax_pthread_flags; do |
| 13694 | |
| 13695 | case $ax_pthread_try_flag in |
| 13696 | none) |
| 13697 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 |
| 13698 | $as_echo_n "checking whether pthreads work without any flags... " >&6; } |
| 13699 | ;; |
| 13700 | |
| 13701 | -mt,pthread) |
| 13702 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5 |
| 13703 | $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; } |
| 13704 | PTHREAD_CFLAGS="-mt" |
| 13705 | PTHREAD_LIBS="-lpthread" |
| 13706 | ;; |
| 13707 | |
| 13708 | -*) |
| 13709 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5 |
| 13710 | $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; } |
| 13711 | PTHREAD_CFLAGS="$ax_pthread_try_flag" |
| 13712 | ;; |
| 13713 | |
| 13714 | pthread-config) |
| 13715 | # Extract the first word of "pthread-config", so it can be a program name with args. |
| 13716 | set dummy pthread-config; ac_word=$2 |
| 13717 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 13718 | $as_echo_n "checking for $ac_word... " >&6; } |
| 13719 | if ${ac_cv_prog_ax_pthread_config+:} false; then : |
| 13720 | $as_echo_n "(cached) " >&6 |
| 13721 | else |
| 13722 | if test -n "$ax_pthread_config"; then |
| 13723 | ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test. |
| 13724 | else |
| 13725 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 13726 | for as_dir in $PATH |
| 13727 | do |
| 13728 | IFS=$as_save_IFS |
| 13729 | test -z "$as_dir" && as_dir=. |
| 13730 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 13731 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 13732 | ac_cv_prog_ax_pthread_config="yes" |
| 13733 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 13734 | break 2 |
| 13735 | fi |
| 13736 | done |
| 13737 | done |
| 13738 | IFS=$as_save_IFS |
| 13739 | |
| 13740 | test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no" |
| 13741 | fi |
| 13742 | fi |
| 13743 | ax_pthread_config=$ac_cv_prog_ax_pthread_config |
| 13744 | if test -n "$ax_pthread_config"; then |
| 13745 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5 |
| 13746 | $as_echo "$ax_pthread_config" >&6; } |
| 13747 | else |
| 13748 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 13749 | $as_echo "no" >&6; } |
| 13750 | fi |
| 13751 | |
| 13752 | |
| 13753 | if test "x$ax_pthread_config" = "xno"; then : |
| 13754 | continue |
| 13755 | fi |
| 13756 | PTHREAD_CFLAGS="`pthread-config --cflags`" |
| 13757 | PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" |
| 13758 | ;; |
| 13759 | |
| 13760 | *) |
| 13761 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5 |
| 13762 | $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; } |
| 13763 | PTHREAD_LIBS="-l$ax_pthread_try_flag" |
| 13764 | ;; |
| 13765 | esac |
| 13766 | |
| 13767 | ax_pthread_save_CFLAGS="$CFLAGS" |
| 13768 | ax_pthread_save_LIBS="$LIBS" |
| 13769 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
| 13770 | LIBS="$PTHREAD_LIBS $LIBS" |
| 13771 | |
| 13772 | # Check for various functions. We must include pthread.h, |
| 13773 | # since some functions may be macros. (On the Sequent, we |
| 13774 | # need a special flag -Kthread to make this header compile.) |
| 13775 | # We check for pthread_join because it is in -lpthread on IRIX |
| 13776 | # while pthread_create is in libc. We check for pthread_attr_init |
| 13777 | # due to DEC craziness with -lpthreads. We check for |
| 13778 | # pthread_cleanup_push because it is one of the few pthread |
| 13779 | # functions on Solaris that doesn't have a non-functional libc stub. |
| 13780 | # We try pthread_create on general principles. |
| 13781 | |
| 13782 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 13783 | /* end confdefs.h. */ |
| 13784 | #include <pthread.h> |
| 13785 | # if $ax_pthread_check_cond |
| 13786 | # error "$ax_pthread_check_macro must be defined" |
| 13787 | # endif |
| 13788 | static void routine(void *a) { a = 0; } |
| 13789 | static void *start_routine(void *a) { return a; } |
| 13790 | int |
| 13791 | main () |
| 13792 | { |
| 13793 | pthread_t th; pthread_attr_t attr; |
| 13794 | pthread_create(&th, 0, start_routine, 0); |
| 13795 | pthread_join(th, 0); |
| 13796 | pthread_attr_init(&attr); |
| 13797 | pthread_cleanup_push(routine, 0); |
| 13798 | pthread_cleanup_pop(0) /* ; */ |
| 13799 | ; |
| 13800 | return 0; |
| 13801 | } |
| 13802 | _ACEOF |
| 13803 | if ac_fn_c_try_link "$LINENO"; then : |
| 13804 | ax_pthread_ok=yes |
| 13805 | fi |
| 13806 | rm -f core conftest.err conftest.$ac_objext \ |
| 13807 | conftest$ac_exeext conftest.$ac_ext |
| 13808 | |
| 13809 | CFLAGS="$ax_pthread_save_CFLAGS" |
| 13810 | LIBS="$ax_pthread_save_LIBS" |
| 13811 | |
| 13812 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5 |
| 13813 | $as_echo "$ax_pthread_ok" >&6; } |
| 13814 | if test "x$ax_pthread_ok" = "xyes"; then : |
| 13815 | break |
| 13816 | fi |
| 13817 | |
| 13818 | PTHREAD_LIBS="" |
| 13819 | PTHREAD_CFLAGS="" |
| 13820 | done |
| 13821 | fi |
| 13822 | |
| 13823 | # Various other checks: |
| 13824 | if test "x$ax_pthread_ok" = "xyes"; then |
| 13825 | ax_pthread_save_CFLAGS="$CFLAGS" |
| 13826 | ax_pthread_save_LIBS="$LIBS" |
| 13827 | CFLAGS="$CFLAGS $PTHREAD_CFLAGS" |
| 13828 | LIBS="$PTHREAD_LIBS $LIBS" |
| 13829 | |
| 13830 | # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. |
| 13831 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 |
| 13832 | $as_echo_n "checking for joinable pthread attribute... " >&6; } |
| 13833 | if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then : |
| 13834 | $as_echo_n "(cached) " >&6 |
| 13835 | else |
| 13836 | ax_cv_PTHREAD_JOINABLE_ATTR=unknown |
| 13837 | for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do |
| 13838 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 13839 | /* end confdefs.h. */ |
| 13840 | #include <pthread.h> |
| 13841 | int |
| 13842 | main () |
| 13843 | { |
| 13844 | int attr = $ax_pthread_attr; return attr /* ; */ |
| 13845 | ; |
| 13846 | return 0; |
| 13847 | } |
| 13848 | _ACEOF |
| 13849 | if ac_fn_c_try_link "$LINENO"; then : |
| 13850 | ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break |
| 13851 | fi |
| 13852 | rm -f core conftest.err conftest.$ac_objext \ |
| 13853 | conftest$ac_exeext conftest.$ac_ext |
| 13854 | done |
| 13855 | |
| 13856 | fi |
| 13857 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5 |
| 13858 | $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; } |
| 13859 | if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \ |
| 13860 | test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \ |
| 13861 | test "x$ax_pthread_joinable_attr_defined" != "xyes"; then : |
| 13862 | |
| 13863 | cat >>confdefs.h <<_ACEOF |
| 13864 | #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR |
| 13865 | _ACEOF |
| 13866 | |
| 13867 | ax_pthread_joinable_attr_defined=yes |
| 13868 | |
| 13869 | fi |
| 13870 | |
| 13871 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5 |
| 13872 | $as_echo_n "checking whether more special flags are required for pthreads... " >&6; } |
| 13873 | if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then : |
| 13874 | $as_echo_n "(cached) " >&6 |
| 13875 | else |
| 13876 | ax_cv_PTHREAD_SPECIAL_FLAGS=no |
| 13877 | case $host_os in |
| 13878 | solaris*) |
| 13879 | ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS" |
| 13880 | ;; |
| 13881 | esac |
| 13882 | |
| 13883 | fi |
| 13884 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5 |
| 13885 | $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; } |
| 13886 | if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \ |
| 13887 | test "x$ax_pthread_special_flags_added" != "xyes"; then : |
| 13888 | PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS" |
| 13889 | ax_pthread_special_flags_added=yes |
| 13890 | fi |
| 13891 | |
| 13892 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5 |
| 13893 | $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; } |
| 13894 | if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then : |
| 13895 | $as_echo_n "(cached) " >&6 |
| 13896 | else |
| 13897 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 13898 | /* end confdefs.h. */ |
| 13899 | #include <pthread.h> |
| 13900 | int |
| 13901 | main () |
| 13902 | { |
| 13903 | int i = PTHREAD_PRIO_INHERIT; |
| 13904 | ; |
| 13905 | return 0; |
| 13906 | } |
| 13907 | _ACEOF |
| 13908 | if ac_fn_c_try_link "$LINENO"; then : |
| 13909 | ax_cv_PTHREAD_PRIO_INHERIT=yes |
| 13910 | else |
| 13911 | ax_cv_PTHREAD_PRIO_INHERIT=no |
| 13912 | fi |
| 13913 | rm -f core conftest.err conftest.$ac_objext \ |
| 13914 | conftest$ac_exeext conftest.$ac_ext |
| 13915 | |
| 13916 | fi |
| 13917 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5 |
| 13918 | $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; } |
| 13919 | if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \ |
| 13920 | test "x$ax_pthread_prio_inherit_defined" != "xyes"; then : |
| 13921 | |
| 13922 | $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h |
| 13923 | |
| 13924 | ax_pthread_prio_inherit_defined=yes |
| 13925 | |
| 13926 | fi |
| 13927 | |
| 13928 | CFLAGS="$ax_pthread_save_CFLAGS" |
| 13929 | LIBS="$ax_pthread_save_LIBS" |
| 13930 | |
| 13931 | # More AIX lossage: compile with *_r variant |
| 13932 | if test "x$GCC" != "xyes"; then |
| 13933 | case $host_os in |
| 13934 | aix*) |
| 13935 | case "x/$CC" in #( |
| 13936 | x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) : |
| 13937 | #handle absolute path differently from PATH based program lookup |
| 13938 | case "x$CC" in #( |
| 13939 | x/*) : |
| 13940 | if as_fn_executable_p ${CC}_r; then : |
| 13941 | PTHREAD_CC="${CC}_r" |
| 13942 | fi ;; #( |
| 13943 | *) : |
| 13944 | for ac_prog in ${CC}_r |
| 13945 | do |
| 13946 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 13947 | set dummy $ac_prog; ac_word=$2 |
| 13948 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 13949 | $as_echo_n "checking for $ac_word... " >&6; } |
| 13950 | if ${ac_cv_prog_PTHREAD_CC+:} false; then : |
| 13951 | $as_echo_n "(cached) " >&6 |
| 13952 | else |
| 13953 | if test -n "$PTHREAD_CC"; then |
| 13954 | ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. |
| 13955 | else |
| 13956 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 13957 | for as_dir in $PATH |
| 13958 | do |
| 13959 | IFS=$as_save_IFS |
| 13960 | test -z "$as_dir" && as_dir=. |
| 13961 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 13962 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 13963 | ac_cv_prog_PTHREAD_CC="$ac_prog" |
| 13964 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 13965 | break 2 |
| 13966 | fi |
| 13967 | done |
| 13968 | done |
| 13969 | IFS=$as_save_IFS |
| 13970 | |
| 13971 | fi |
| 13972 | fi |
| 13973 | PTHREAD_CC=$ac_cv_prog_PTHREAD_CC |
| 13974 | if test -n "$PTHREAD_CC"; then |
| 13975 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 |
| 13976 | $as_echo "$PTHREAD_CC" >&6; } |
| 13977 | else |
| 13978 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 13979 | $as_echo "no" >&6; } |
| 13980 | fi |
| 13981 | |
| 13982 | |
| 13983 | test -n "$PTHREAD_CC" && break |
| 13984 | done |
| 13985 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" |
| 13986 | ;; |
| 13987 | esac ;; #( |
| 13988 | *) : |
| 13989 | ;; |
| 13990 | esac |
| 13991 | ;; |
| 13992 | esac |
| 13993 | fi |
| 13994 | fi |
| 13995 | |
| 13996 | test -n "$PTHREAD_CC" || PTHREAD_CC="$CC" |
| 13997 | |
| 13998 | |
| 13999 | |
| 14000 | |
| 14001 | |
| 14002 | # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: |
| 14003 | if test "x$ax_pthread_ok" = "xyes"; then |
| 14004 | threads=yes |
| 14005 | : |
| 14006 | else |
| 14007 | ax_pthread_ok=no |
| 14008 | threads=no |
| 14009 | fi |
| 14010 | ac_ext=cpp |
| 14011 | ac_cpp='$CXXCPP $CPPFLAGS' |
| 14012 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 14013 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 14014 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu |
| 14015 | |
| 14016 | |
| 14017 | if test "$threads" = "yes"; then |
| 14018 | save_LIBS="$LIBS" |
| 14019 | LIBS="$PTHREAD_LIBS $LIBS" |
| 14020 | save_CXXFLAGS="$CXXFLAGS" |
| 14021 | CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS" |
| 14022 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5 |
| 14023 | $as_echo_n "checking for std::thread... " >&6; } |
| 14024 | if ${gdb_cv_cxx_std_thread+:} false; then : |
| 14025 | $as_echo_n "(cached) " >&6 |
| 14026 | else |
| 14027 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14028 | /* end confdefs.h. */ |
| 14029 | #include <thread> |
| 14030 | void callback() { } |
| 14031 | int |
| 14032 | main () |
| 14033 | { |
| 14034 | std::thread t(callback); |
| 14035 | ; |
| 14036 | return 0; |
| 14037 | } |
| 14038 | _ACEOF |
| 14039 | if ac_fn_cxx_try_compile "$LINENO"; then : |
| 14040 | gdb_cv_cxx_std_thread=yes |
| 14041 | else |
| 14042 | gdb_cv_cxx_std_thread=no |
| 14043 | fi |
| 14044 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14045 | fi |
| 14046 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5 |
| 14047 | $as_echo "$gdb_cv_cxx_std_thread" >&6; } |
| 14048 | |
| 14049 | # This check must be here, while LIBS includes any necessary |
| 14050 | # threading library. |
| 14051 | for ac_func in pthread_sigmask pthread_setname_np |
| 14052 | do : |
| 14053 | as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` |
| 14054 | ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" |
| 14055 | if eval test \"x\$"$as_ac_var"\" = x"yes"; then : |
| 14056 | cat >>confdefs.h <<_ACEOF |
| 14057 | #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 |
| 14058 | _ACEOF |
| 14059 | |
| 14060 | fi |
| 14061 | done |
| 14062 | |
| 14063 | |
| 14064 | LIBS="$save_LIBS" |
| 14065 | CXXFLAGS="$save_CXXFLAGS" |
| 14066 | fi |
| 14067 | if test "$gdb_cv_cxx_std_thread" = "yes"; then |
| 14068 | |
| 14069 | $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h |
| 14070 | |
| 14071 | fi |
| 14072 | ac_ext=c |
| 14073 | ac_cpp='$CPP $CPPFLAGS' |
| 14074 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 14075 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 14076 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 14077 | |
| 14078 | |
| 14079 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5 |
| 14080 | $as_echo_n "checking for sigsetjmp... " >&6; } |
| 14081 | if ${gdb_cv_func_sigsetjmp+:} false; then : |
| 14082 | $as_echo_n "(cached) " >&6 |
| 14083 | else |
| 14084 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14085 | /* end confdefs.h. */ |
| 14086 | |
| 14087 | #include <setjmp.h> |
| 14088 | |
| 14089 | int |
| 14090 | main () |
| 14091 | { |
| 14092 | sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1); |
| 14093 | ; |
| 14094 | return 0; |
| 14095 | } |
| 14096 | _ACEOF |
| 14097 | if ac_fn_c_try_compile "$LINENO"; then : |
| 14098 | gdb_cv_func_sigsetjmp=yes |
| 14099 | else |
| 14100 | gdb_cv_func_sigsetjmp=no |
| 14101 | fi |
| 14102 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14103 | fi |
| 14104 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5 |
| 14105 | $as_echo "$gdb_cv_func_sigsetjmp" >&6; } |
| 14106 | if test "$gdb_cv_func_sigsetjmp" = "yes"; then |
| 14107 | |
| 14108 | $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h |
| 14109 | |
| 14110 | fi |
| 14111 | |
| 14112 | |
| 14113 | # Check whether --with-intel_pt was given. |
| 14114 | if test "${with_intel_pt+set}" = set; then : |
| 14115 | withval=$with_intel_pt; |
| 14116 | else |
| 14117 | with_intel_pt=auto |
| 14118 | fi |
| 14119 | |
| 14120 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5 |
| 14121 | $as_echo_n "checking whether to use intel pt... " >&6; } |
| 14122 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5 |
| 14123 | $as_echo "$with_intel_pt" >&6; } |
| 14124 | |
| 14125 | if test "${with_intel_pt}" = no; then |
| 14126 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5 |
| 14127 | $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;} |
| 14128 | HAVE_LIBIPT=no |
| 14129 | else |
| 14130 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14131 | /* end confdefs.h. */ |
| 14132 | |
| 14133 | #include <linux/perf_event.h> |
| 14134 | #ifndef PERF_ATTR_SIZE_VER5 |
| 14135 | # error |
| 14136 | #endif |
| 14137 | |
| 14138 | _ACEOF |
| 14139 | if ac_fn_c_try_cpp "$LINENO"; then : |
| 14140 | perf_event=yes |
| 14141 | else |
| 14142 | perf_event=no |
| 14143 | fi |
| 14144 | rm -f conftest.err conftest.i conftest.$ac_ext |
| 14145 | if test "$perf_event" != yes; then |
| 14146 | if test "$with_intel_pt" = yes; then |
| 14147 | as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5 |
| 14148 | else |
| 14149 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5 |
| 14150 | $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;} |
| 14151 | fi |
| 14152 | fi |
| 14153 | |
| 14154 | |
| 14155 | |
| 14156 | |
| 14157 | |
| 14158 | |
| 14159 | |
| 14160 | |
| 14161 | |
| 14162 | use_additional=yes |
| 14163 | |
| 14164 | acl_save_prefix="$prefix" |
| 14165 | prefix="$acl_final_prefix" |
| 14166 | acl_save_exec_prefix="$exec_prefix" |
| 14167 | exec_prefix="$acl_final_exec_prefix" |
| 14168 | |
| 14169 | eval additional_includedir=\"$includedir\" |
| 14170 | eval additional_libdir=\"$libdir\" |
| 14171 | |
| 14172 | exec_prefix="$acl_save_exec_prefix" |
| 14173 | prefix="$acl_save_prefix" |
| 14174 | |
| 14175 | |
| 14176 | # Check whether --with-libipt-prefix was given. |
| 14177 | if test "${with_libipt_prefix+set}" = set; then : |
| 14178 | withval=$with_libipt_prefix; |
| 14179 | if test "X$withval" = "Xno"; then |
| 14180 | use_additional=no |
| 14181 | else |
| 14182 | if test "X$withval" = "X"; then |
| 14183 | |
| 14184 | acl_save_prefix="$prefix" |
| 14185 | prefix="$acl_final_prefix" |
| 14186 | acl_save_exec_prefix="$exec_prefix" |
| 14187 | exec_prefix="$acl_final_exec_prefix" |
| 14188 | |
| 14189 | eval additional_includedir=\"$includedir\" |
| 14190 | eval additional_libdir=\"$libdir\" |
| 14191 | |
| 14192 | exec_prefix="$acl_save_exec_prefix" |
| 14193 | prefix="$acl_save_prefix" |
| 14194 | |
| 14195 | else |
| 14196 | additional_includedir="$withval/include" |
| 14197 | additional_libdir="$withval/lib" |
| 14198 | fi |
| 14199 | fi |
| 14200 | |
| 14201 | fi |
| 14202 | |
| 14203 | |
| 14204 | # Check whether --with-libipt-type was given. |
| 14205 | if test "${with_libipt_type+set}" = set; then : |
| 14206 | withval=$with_libipt_type; with_libipt_type=$withval |
| 14207 | else |
| 14208 | with_libipt_type=auto |
| 14209 | fi |
| 14210 | |
| 14211 | lib_type=`eval echo \$with_libipt_type` |
| 14212 | |
| 14213 | LIBIPT= |
| 14214 | LTLIBIPT= |
| 14215 | INCIPT= |
| 14216 | rpathdirs= |
| 14217 | ltrpathdirs= |
| 14218 | names_already_handled= |
| 14219 | names_next_round='ipt ' |
| 14220 | while test -n "$names_next_round"; do |
| 14221 | names_this_round="$names_next_round" |
| 14222 | names_next_round= |
| 14223 | for name in $names_this_round; do |
| 14224 | already_handled= |
| 14225 | for n in $names_already_handled; do |
| 14226 | if test "$n" = "$name"; then |
| 14227 | already_handled=yes |
| 14228 | break |
| 14229 | fi |
| 14230 | done |
| 14231 | if test -z "$already_handled"; then |
| 14232 | names_already_handled="$names_already_handled $name" |
| 14233 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` |
| 14234 | eval value=\"\$HAVE_LIB$uppername\" |
| 14235 | if test -n "$value"; then |
| 14236 | if test "$value" = yes; then |
| 14237 | eval value=\"\$LIB$uppername\" |
| 14238 | test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value" |
| 14239 | eval value=\"\$LTLIB$uppername\" |
| 14240 | test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value" |
| 14241 | else |
| 14242 | : |
| 14243 | fi |
| 14244 | else |
| 14245 | found_dir= |
| 14246 | found_la= |
| 14247 | found_so= |
| 14248 | found_a= |
| 14249 | if test $use_additional = yes; then |
| 14250 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
| 14251 | found_dir="$additional_libdir" |
| 14252 | found_so="$additional_libdir/lib$name.$shlibext" |
| 14253 | if test -f "$additional_libdir/lib$name.la"; then |
| 14254 | found_la="$additional_libdir/lib$name.la" |
| 14255 | fi |
| 14256 | elif test x$lib_type != xshared; then |
| 14257 | if test -f "$additional_libdir/lib$name.$libext"; then |
| 14258 | found_dir="$additional_libdir" |
| 14259 | found_a="$additional_libdir/lib$name.$libext" |
| 14260 | if test -f "$additional_libdir/lib$name.la"; then |
| 14261 | found_la="$additional_libdir/lib$name.la" |
| 14262 | fi |
| 14263 | fi |
| 14264 | fi |
| 14265 | fi |
| 14266 | if test "X$found_dir" = "X"; then |
| 14267 | for x in $LDFLAGS $LTLIBIPT; do |
| 14268 | |
| 14269 | acl_save_prefix="$prefix" |
| 14270 | prefix="$acl_final_prefix" |
| 14271 | acl_save_exec_prefix="$exec_prefix" |
| 14272 | exec_prefix="$acl_final_exec_prefix" |
| 14273 | eval x=\"$x\" |
| 14274 | exec_prefix="$acl_save_exec_prefix" |
| 14275 | prefix="$acl_save_prefix" |
| 14276 | |
| 14277 | case "$x" in |
| 14278 | -L*) |
| 14279 | dir=`echo "X$x" | sed -e 's/^X-L//'` |
| 14280 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
| 14281 | found_dir="$dir" |
| 14282 | found_so="$dir/lib$name.$shlibext" |
| 14283 | if test -f "$dir/lib$name.la"; then |
| 14284 | found_la="$dir/lib$name.la" |
| 14285 | fi |
| 14286 | elif test x$lib_type != xshared; then |
| 14287 | if test -f "$dir/lib$name.$libext"; then |
| 14288 | found_dir="$dir" |
| 14289 | found_a="$dir/lib$name.$libext" |
| 14290 | if test -f "$dir/lib$name.la"; then |
| 14291 | found_la="$dir/lib$name.la" |
| 14292 | fi |
| 14293 | fi |
| 14294 | fi |
| 14295 | ;; |
| 14296 | esac |
| 14297 | if test "X$found_dir" != "X"; then |
| 14298 | break |
| 14299 | fi |
| 14300 | done |
| 14301 | fi |
| 14302 | if test "X$found_dir" != "X"; then |
| 14303 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name" |
| 14304 | if test "X$found_so" != "X"; then |
| 14305 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then |
| 14306 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" |
| 14307 | else |
| 14308 | haveit= |
| 14309 | for x in $ltrpathdirs; do |
| 14310 | if test "X$x" = "X$found_dir"; then |
| 14311 | haveit=yes |
| 14312 | break |
| 14313 | fi |
| 14314 | done |
| 14315 | if test -z "$haveit"; then |
| 14316 | ltrpathdirs="$ltrpathdirs $found_dir" |
| 14317 | fi |
| 14318 | if test "$hardcode_direct" = yes; then |
| 14319 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" |
| 14320 | else |
| 14321 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then |
| 14322 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" |
| 14323 | haveit= |
| 14324 | for x in $rpathdirs; do |
| 14325 | if test "X$x" = "X$found_dir"; then |
| 14326 | haveit=yes |
| 14327 | break |
| 14328 | fi |
| 14329 | done |
| 14330 | if test -z "$haveit"; then |
| 14331 | rpathdirs="$rpathdirs $found_dir" |
| 14332 | fi |
| 14333 | else |
| 14334 | haveit= |
| 14335 | for x in $LDFLAGS $LIBIPT; do |
| 14336 | |
| 14337 | acl_save_prefix="$prefix" |
| 14338 | prefix="$acl_final_prefix" |
| 14339 | acl_save_exec_prefix="$exec_prefix" |
| 14340 | exec_prefix="$acl_final_exec_prefix" |
| 14341 | eval x=\"$x\" |
| 14342 | exec_prefix="$acl_save_exec_prefix" |
| 14343 | prefix="$acl_save_prefix" |
| 14344 | |
| 14345 | if test "X$x" = "X-L$found_dir"; then |
| 14346 | haveit=yes |
| 14347 | break |
| 14348 | fi |
| 14349 | done |
| 14350 | if test -z "$haveit"; then |
| 14351 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir" |
| 14352 | fi |
| 14353 | if test "$hardcode_minus_L" != no; then |
| 14354 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so" |
| 14355 | else |
| 14356 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" |
| 14357 | fi |
| 14358 | fi |
| 14359 | fi |
| 14360 | fi |
| 14361 | else |
| 14362 | if test "X$found_a" != "X"; then |
| 14363 | LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a" |
| 14364 | else |
| 14365 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name" |
| 14366 | fi |
| 14367 | fi |
| 14368 | additional_includedir= |
| 14369 | case "$found_dir" in |
| 14370 | */lib | */lib/) |
| 14371 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` |
| 14372 | additional_includedir="$basedir/include" |
| 14373 | ;; |
| 14374 | esac |
| 14375 | if test "X$additional_includedir" != "X"; then |
| 14376 | if test "X$additional_includedir" != "X/usr/include"; then |
| 14377 | haveit= |
| 14378 | if test "X$additional_includedir" = "X/usr/local/include"; then |
| 14379 | if test -n "$GCC"; then |
| 14380 | case $host_os in |
| 14381 | linux*) haveit=yes;; |
| 14382 | esac |
| 14383 | fi |
| 14384 | fi |
| 14385 | if test -z "$haveit"; then |
| 14386 | for x in $CPPFLAGS $INCIPT; do |
| 14387 | |
| 14388 | acl_save_prefix="$prefix" |
| 14389 | prefix="$acl_final_prefix" |
| 14390 | acl_save_exec_prefix="$exec_prefix" |
| 14391 | exec_prefix="$acl_final_exec_prefix" |
| 14392 | eval x=\"$x\" |
| 14393 | exec_prefix="$acl_save_exec_prefix" |
| 14394 | prefix="$acl_save_prefix" |
| 14395 | |
| 14396 | if test "X$x" = "X-I$additional_includedir"; then |
| 14397 | haveit=yes |
| 14398 | break |
| 14399 | fi |
| 14400 | done |
| 14401 | if test -z "$haveit"; then |
| 14402 | if test -d "$additional_includedir"; then |
| 14403 | INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir" |
| 14404 | fi |
| 14405 | fi |
| 14406 | fi |
| 14407 | fi |
| 14408 | fi |
| 14409 | if test -n "$found_la"; then |
| 14410 | save_libdir="$libdir" |
| 14411 | case "$found_la" in |
| 14412 | */* | *\\*) . "$found_la" ;; |
| 14413 | *) . "./$found_la" ;; |
| 14414 | esac |
| 14415 | libdir="$save_libdir" |
| 14416 | for dep in $dependency_libs; do |
| 14417 | case "$dep" in |
| 14418 | -L*) |
| 14419 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` |
| 14420 | if test "X$additional_libdir" != "X/usr/lib"; then |
| 14421 | haveit= |
| 14422 | if test "X$additional_libdir" = "X/usr/local/lib"; then |
| 14423 | if test -n "$GCC"; then |
| 14424 | case $host_os in |
| 14425 | linux*) haveit=yes;; |
| 14426 | esac |
| 14427 | fi |
| 14428 | fi |
| 14429 | if test -z "$haveit"; then |
| 14430 | haveit= |
| 14431 | for x in $LDFLAGS $LIBIPT; do |
| 14432 | |
| 14433 | acl_save_prefix="$prefix" |
| 14434 | prefix="$acl_final_prefix" |
| 14435 | acl_save_exec_prefix="$exec_prefix" |
| 14436 | exec_prefix="$acl_final_exec_prefix" |
| 14437 | eval x=\"$x\" |
| 14438 | exec_prefix="$acl_save_exec_prefix" |
| 14439 | prefix="$acl_save_prefix" |
| 14440 | |
| 14441 | if test "X$x" = "X-L$additional_libdir"; then |
| 14442 | haveit=yes |
| 14443 | break |
| 14444 | fi |
| 14445 | done |
| 14446 | if test -z "$haveit"; then |
| 14447 | if test -d "$additional_libdir"; then |
| 14448 | LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir" |
| 14449 | fi |
| 14450 | fi |
| 14451 | haveit= |
| 14452 | for x in $LDFLAGS $LTLIBIPT; do |
| 14453 | |
| 14454 | acl_save_prefix="$prefix" |
| 14455 | prefix="$acl_final_prefix" |
| 14456 | acl_save_exec_prefix="$exec_prefix" |
| 14457 | exec_prefix="$acl_final_exec_prefix" |
| 14458 | eval x=\"$x\" |
| 14459 | exec_prefix="$acl_save_exec_prefix" |
| 14460 | prefix="$acl_save_prefix" |
| 14461 | |
| 14462 | if test "X$x" = "X-L$additional_libdir"; then |
| 14463 | haveit=yes |
| 14464 | break |
| 14465 | fi |
| 14466 | done |
| 14467 | if test -z "$haveit"; then |
| 14468 | if test -d "$additional_libdir"; then |
| 14469 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir" |
| 14470 | fi |
| 14471 | fi |
| 14472 | fi |
| 14473 | fi |
| 14474 | ;; |
| 14475 | -R*) |
| 14476 | dir=`echo "X$dep" | sed -e 's/^X-R//'` |
| 14477 | if test "$enable_rpath" != no; then |
| 14478 | haveit= |
| 14479 | for x in $rpathdirs; do |
| 14480 | if test "X$x" = "X$dir"; then |
| 14481 | haveit=yes |
| 14482 | break |
| 14483 | fi |
| 14484 | done |
| 14485 | if test -z "$haveit"; then |
| 14486 | rpathdirs="$rpathdirs $dir" |
| 14487 | fi |
| 14488 | haveit= |
| 14489 | for x in $ltrpathdirs; do |
| 14490 | if test "X$x" = "X$dir"; then |
| 14491 | haveit=yes |
| 14492 | break |
| 14493 | fi |
| 14494 | done |
| 14495 | if test -z "$haveit"; then |
| 14496 | ltrpathdirs="$ltrpathdirs $dir" |
| 14497 | fi |
| 14498 | fi |
| 14499 | ;; |
| 14500 | -l*) |
| 14501 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` |
| 14502 | ;; |
| 14503 | *.la) |
| 14504 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` |
| 14505 | ;; |
| 14506 | *) |
| 14507 | LIBIPT="${LIBIPT}${LIBIPT:+ }$dep" |
| 14508 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep" |
| 14509 | ;; |
| 14510 | esac |
| 14511 | done |
| 14512 | fi |
| 14513 | else |
| 14514 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
| 14515 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name" |
| 14516 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name" |
| 14517 | else |
| 14518 | LIBIPT="${LIBIPT}${LIBIPT:+ }-l:lib$name.$libext" |
| 14519 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l:lib$name.$libext" |
| 14520 | fi |
| 14521 | fi |
| 14522 | fi |
| 14523 | fi |
| 14524 | done |
| 14525 | done |
| 14526 | if test "X$rpathdirs" != "X"; then |
| 14527 | if test -n "$hardcode_libdir_separator"; then |
| 14528 | alldirs= |
| 14529 | for found_dir in $rpathdirs; do |
| 14530 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" |
| 14531 | done |
| 14532 | acl_save_libdir="$libdir" |
| 14533 | libdir="$alldirs" |
| 14534 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 14535 | libdir="$acl_save_libdir" |
| 14536 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" |
| 14537 | else |
| 14538 | for found_dir in $rpathdirs; do |
| 14539 | acl_save_libdir="$libdir" |
| 14540 | libdir="$found_dir" |
| 14541 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 14542 | libdir="$acl_save_libdir" |
| 14543 | LIBIPT="${LIBIPT}${LIBIPT:+ }$flag" |
| 14544 | done |
| 14545 | fi |
| 14546 | fi |
| 14547 | if test "X$ltrpathdirs" != "X"; then |
| 14548 | for found_dir in $ltrpathdirs; do |
| 14549 | LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir" |
| 14550 | done |
| 14551 | fi |
| 14552 | |
| 14553 | |
| 14554 | ac_save_CPPFLAGS="$CPPFLAGS" |
| 14555 | |
| 14556 | for element in $INCIPT; do |
| 14557 | haveit= |
| 14558 | for x in $CPPFLAGS; do |
| 14559 | |
| 14560 | acl_save_prefix="$prefix" |
| 14561 | prefix="$acl_final_prefix" |
| 14562 | acl_save_exec_prefix="$exec_prefix" |
| 14563 | exec_prefix="$acl_final_exec_prefix" |
| 14564 | eval x=\"$x\" |
| 14565 | exec_prefix="$acl_save_exec_prefix" |
| 14566 | prefix="$acl_save_prefix" |
| 14567 | |
| 14568 | if test "X$x" = "X$element"; then |
| 14569 | haveit=yes |
| 14570 | break |
| 14571 | fi |
| 14572 | done |
| 14573 | if test -z "$haveit"; then |
| 14574 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" |
| 14575 | fi |
| 14576 | done |
| 14577 | |
| 14578 | |
| 14579 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5 |
| 14580 | $as_echo_n "checking for libipt... " >&6; } |
| 14581 | if ${ac_cv_libipt+:} false; then : |
| 14582 | $as_echo_n "(cached) " >&6 |
| 14583 | else |
| 14584 | |
| 14585 | ac_save_LIBS="$LIBS" |
| 14586 | LIBS="$LIBS $LIBIPT" |
| 14587 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14588 | /* end confdefs.h. */ |
| 14589 | #include "intel-pt.h" |
| 14590 | int |
| 14591 | main () |
| 14592 | { |
| 14593 | pt_insn_alloc_decoder (0); |
| 14594 | ; |
| 14595 | return 0; |
| 14596 | } |
| 14597 | _ACEOF |
| 14598 | if ac_fn_c_try_link "$LINENO"; then : |
| 14599 | ac_cv_libipt=yes |
| 14600 | else |
| 14601 | ac_cv_libipt=no |
| 14602 | fi |
| 14603 | rm -f core conftest.err conftest.$ac_objext \ |
| 14604 | conftest$ac_exeext conftest.$ac_ext |
| 14605 | LIBS="$ac_save_LIBS" |
| 14606 | |
| 14607 | fi |
| 14608 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5 |
| 14609 | $as_echo "$ac_cv_libipt" >&6; } |
| 14610 | if test "$ac_cv_libipt" = yes; then |
| 14611 | HAVE_LIBIPT=yes |
| 14612 | |
| 14613 | $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h |
| 14614 | |
| 14615 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5 |
| 14616 | $as_echo_n "checking how to link with libipt... " >&6; } |
| 14617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5 |
| 14618 | $as_echo "$LIBIPT" >&6; } |
| 14619 | else |
| 14620 | HAVE_LIBIPT=no |
| 14621 | CPPFLAGS="$ac_save_CPPFLAGS" |
| 14622 | LIBIPT= |
| 14623 | LTLIBIPT= |
| 14624 | fi |
| 14625 | |
| 14626 | |
| 14627 | |
| 14628 | |
| 14629 | |
| 14630 | |
| 14631 | if test "$HAVE_LIBIPT" != yes; then |
| 14632 | if test "$with_intel_pt" = yes; then |
| 14633 | as_fn_error $? "libipt is missing or unusable" "$LINENO" 5 |
| 14634 | else |
| 14635 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5 |
| 14636 | $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;} |
| 14637 | fi |
| 14638 | else |
| 14639 | save_LIBS=$LIBS |
| 14640 | LIBS="$LIBS $LIBIPT" |
| 14641 | for ac_func in pt_insn_event |
| 14642 | do : |
| 14643 | ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event" |
| 14644 | if test "x$ac_cv_func_pt_insn_event" = xyes; then : |
| 14645 | cat >>confdefs.h <<_ACEOF |
| 14646 | #define HAVE_PT_INSN_EVENT 1 |
| 14647 | _ACEOF |
| 14648 | |
| 14649 | fi |
| 14650 | done |
| 14651 | |
| 14652 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h> |
| 14653 | " |
| 14654 | if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then : |
| 14655 | |
| 14656 | cat >>confdefs.h <<_ACEOF |
| 14657 | #define HAVE_STRUCT_PT_INSN_ENABLED 1 |
| 14658 | _ACEOF |
| 14659 | |
| 14660 | |
| 14661 | fi |
| 14662 | ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h> |
| 14663 | " |
| 14664 | if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then : |
| 14665 | |
| 14666 | cat >>confdefs.h <<_ACEOF |
| 14667 | #define HAVE_STRUCT_PT_INSN_RESYNCED 1 |
| 14668 | _ACEOF |
| 14669 | |
| 14670 | |
| 14671 | fi |
| 14672 | |
| 14673 | LIBS=$save_LIBS |
| 14674 | fi |
| 14675 | fi |
| 14676 | |
| 14677 | if test "$ac_cv_header_sys_procfs_h" = yes; then |
| 14678 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5 |
| 14679 | $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; } |
| 14680 | if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then : |
| 14681 | $as_echo_n "(cached) " >&6 |
| 14682 | else |
| 14683 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14684 | /* end confdefs.h. */ |
| 14685 | |
| 14686 | #define _SYSCALL32 |
| 14687 | /* Needed for new procfs interface on sparc-solaris. */ |
| 14688 | #define _STRUCTURED_PROC 1 |
| 14689 | #include <sys/procfs.h> |
| 14690 | int |
| 14691 | main () |
| 14692 | { |
| 14693 | gregset_t avar |
| 14694 | ; |
| 14695 | return 0; |
| 14696 | } |
| 14697 | _ACEOF |
| 14698 | if ac_fn_c_try_compile "$LINENO"; then : |
| 14699 | bfd_cv_have_sys_procfs_type_gregset_t=yes |
| 14700 | else |
| 14701 | bfd_cv_have_sys_procfs_type_gregset_t=no |
| 14702 | |
| 14703 | fi |
| 14704 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14705 | fi |
| 14706 | |
| 14707 | if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then |
| 14708 | |
| 14709 | $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h |
| 14710 | |
| 14711 | fi |
| 14712 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5 |
| 14713 | $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; } |
| 14714 | |
| 14715 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5 |
| 14716 | $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; } |
| 14717 | if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then : |
| 14718 | $as_echo_n "(cached) " >&6 |
| 14719 | else |
| 14720 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14721 | /* end confdefs.h. */ |
| 14722 | |
| 14723 | #define _SYSCALL32 |
| 14724 | /* Needed for new procfs interface on sparc-solaris. */ |
| 14725 | #define _STRUCTURED_PROC 1 |
| 14726 | #include <sys/procfs.h> |
| 14727 | int |
| 14728 | main () |
| 14729 | { |
| 14730 | fpregset_t avar |
| 14731 | ; |
| 14732 | return 0; |
| 14733 | } |
| 14734 | _ACEOF |
| 14735 | if ac_fn_c_try_compile "$LINENO"; then : |
| 14736 | bfd_cv_have_sys_procfs_type_fpregset_t=yes |
| 14737 | else |
| 14738 | bfd_cv_have_sys_procfs_type_fpregset_t=no |
| 14739 | |
| 14740 | fi |
| 14741 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14742 | fi |
| 14743 | |
| 14744 | if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then |
| 14745 | |
| 14746 | $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h |
| 14747 | |
| 14748 | fi |
| 14749 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5 |
| 14750 | $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; } |
| 14751 | |
| 14752 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5 |
| 14753 | $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; } |
| 14754 | if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then : |
| 14755 | $as_echo_n "(cached) " >&6 |
| 14756 | else |
| 14757 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14758 | /* end confdefs.h. */ |
| 14759 | |
| 14760 | #define _SYSCALL32 |
| 14761 | /* Needed for new procfs interface on sparc-solaris. */ |
| 14762 | #define _STRUCTURED_PROC 1 |
| 14763 | #include <sys/procfs.h> |
| 14764 | int |
| 14765 | main () |
| 14766 | { |
| 14767 | prgregset_t avar |
| 14768 | ; |
| 14769 | return 0; |
| 14770 | } |
| 14771 | _ACEOF |
| 14772 | if ac_fn_c_try_compile "$LINENO"; then : |
| 14773 | bfd_cv_have_sys_procfs_type_prgregset_t=yes |
| 14774 | else |
| 14775 | bfd_cv_have_sys_procfs_type_prgregset_t=no |
| 14776 | |
| 14777 | fi |
| 14778 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14779 | fi |
| 14780 | |
| 14781 | if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then |
| 14782 | |
| 14783 | $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h |
| 14784 | |
| 14785 | fi |
| 14786 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5 |
| 14787 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; } |
| 14788 | |
| 14789 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5 |
| 14790 | $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; } |
| 14791 | if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then : |
| 14792 | $as_echo_n "(cached) " >&6 |
| 14793 | else |
| 14794 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14795 | /* end confdefs.h. */ |
| 14796 | |
| 14797 | #define _SYSCALL32 |
| 14798 | /* Needed for new procfs interface on sparc-solaris. */ |
| 14799 | #define _STRUCTURED_PROC 1 |
| 14800 | #include <sys/procfs.h> |
| 14801 | int |
| 14802 | main () |
| 14803 | { |
| 14804 | prfpregset_t avar |
| 14805 | ; |
| 14806 | return 0; |
| 14807 | } |
| 14808 | _ACEOF |
| 14809 | if ac_fn_c_try_compile "$LINENO"; then : |
| 14810 | bfd_cv_have_sys_procfs_type_prfpregset_t=yes |
| 14811 | else |
| 14812 | bfd_cv_have_sys_procfs_type_prfpregset_t=no |
| 14813 | |
| 14814 | fi |
| 14815 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14816 | fi |
| 14817 | |
| 14818 | if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then |
| 14819 | |
| 14820 | $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h |
| 14821 | |
| 14822 | fi |
| 14823 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5 |
| 14824 | $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; } |
| 14825 | |
| 14826 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5 |
| 14827 | $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; } |
| 14828 | if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then : |
| 14829 | $as_echo_n "(cached) " >&6 |
| 14830 | else |
| 14831 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14832 | /* end confdefs.h. */ |
| 14833 | |
| 14834 | #define _SYSCALL32 |
| 14835 | /* Needed for new procfs interface on sparc-solaris. */ |
| 14836 | #define _STRUCTURED_PROC 1 |
| 14837 | #include <sys/procfs.h> |
| 14838 | int |
| 14839 | main () |
| 14840 | { |
| 14841 | prgregset32_t avar |
| 14842 | ; |
| 14843 | return 0; |
| 14844 | } |
| 14845 | _ACEOF |
| 14846 | if ac_fn_c_try_compile "$LINENO"; then : |
| 14847 | bfd_cv_have_sys_procfs_type_prgregset32_t=yes |
| 14848 | else |
| 14849 | bfd_cv_have_sys_procfs_type_prgregset32_t=no |
| 14850 | |
| 14851 | fi |
| 14852 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14853 | fi |
| 14854 | |
| 14855 | if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then |
| 14856 | |
| 14857 | $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h |
| 14858 | |
| 14859 | fi |
| 14860 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5 |
| 14861 | $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; } |
| 14862 | |
| 14863 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5 |
| 14864 | $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; } |
| 14865 | if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then : |
| 14866 | $as_echo_n "(cached) " >&6 |
| 14867 | else |
| 14868 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14869 | /* end confdefs.h. */ |
| 14870 | |
| 14871 | #define _SYSCALL32 |
| 14872 | /* Needed for new procfs interface on sparc-solaris. */ |
| 14873 | #define _STRUCTURED_PROC 1 |
| 14874 | #include <sys/procfs.h> |
| 14875 | int |
| 14876 | main () |
| 14877 | { |
| 14878 | lwpid_t avar |
| 14879 | ; |
| 14880 | return 0; |
| 14881 | } |
| 14882 | _ACEOF |
| 14883 | if ac_fn_c_try_compile "$LINENO"; then : |
| 14884 | bfd_cv_have_sys_procfs_type_lwpid_t=yes |
| 14885 | else |
| 14886 | bfd_cv_have_sys_procfs_type_lwpid_t=no |
| 14887 | |
| 14888 | fi |
| 14889 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14890 | fi |
| 14891 | |
| 14892 | if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then |
| 14893 | |
| 14894 | $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h |
| 14895 | |
| 14896 | fi |
| 14897 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5 |
| 14898 | $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; } |
| 14899 | |
| 14900 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5 |
| 14901 | $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; } |
| 14902 | if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then : |
| 14903 | $as_echo_n "(cached) " >&6 |
| 14904 | else |
| 14905 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14906 | /* end confdefs.h. */ |
| 14907 | |
| 14908 | #define _SYSCALL32 |
| 14909 | /* Needed for new procfs interface on sparc-solaris. */ |
| 14910 | #define _STRUCTURED_PROC 1 |
| 14911 | #include <sys/procfs.h> |
| 14912 | int |
| 14913 | main () |
| 14914 | { |
| 14915 | psaddr_t avar |
| 14916 | ; |
| 14917 | return 0; |
| 14918 | } |
| 14919 | _ACEOF |
| 14920 | if ac_fn_c_try_compile "$LINENO"; then : |
| 14921 | bfd_cv_have_sys_procfs_type_psaddr_t=yes |
| 14922 | else |
| 14923 | bfd_cv_have_sys_procfs_type_psaddr_t=no |
| 14924 | |
| 14925 | fi |
| 14926 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14927 | fi |
| 14928 | |
| 14929 | if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then |
| 14930 | |
| 14931 | $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h |
| 14932 | |
| 14933 | fi |
| 14934 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5 |
| 14935 | $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; } |
| 14936 | |
| 14937 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5 |
| 14938 | $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; } |
| 14939 | if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then : |
| 14940 | $as_echo_n "(cached) " >&6 |
| 14941 | else |
| 14942 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 14943 | /* end confdefs.h. */ |
| 14944 | |
| 14945 | #define _SYSCALL32 |
| 14946 | /* Needed for new procfs interface on sparc-solaris. */ |
| 14947 | #define _STRUCTURED_PROC 1 |
| 14948 | #include <sys/procfs.h> |
| 14949 | int |
| 14950 | main () |
| 14951 | { |
| 14952 | elf_fpregset_t avar |
| 14953 | ; |
| 14954 | return 0; |
| 14955 | } |
| 14956 | _ACEOF |
| 14957 | if ac_fn_c_try_compile "$LINENO"; then : |
| 14958 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes |
| 14959 | else |
| 14960 | bfd_cv_have_sys_procfs_type_elf_fpregset_t=no |
| 14961 | |
| 14962 | fi |
| 14963 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 14964 | fi |
| 14965 | |
| 14966 | if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then |
| 14967 | |
| 14968 | $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h |
| 14969 | |
| 14970 | fi |
| 14971 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5 |
| 14972 | $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; } |
| 14973 | |
| 14974 | fi |
| 14975 | |
| 14976 | |
| 14977 | # Check the return and argument types of ptrace. |
| 14978 | |
| 14979 | |
| 14980 | for ac_header in sys/ptrace.h ptrace.h |
| 14981 | do : |
| 14982 | as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` |
| 14983 | ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" |
| 14984 | if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : |
| 14985 | cat >>confdefs.h <<_ACEOF |
| 14986 | #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 |
| 14987 | _ACEOF |
| 14988 | |
| 14989 | fi |
| 14990 | |
| 14991 | done |
| 14992 | |
| 14993 | |
| 14994 | gdb_ptrace_headers=' |
| 14995 | #include <sys/types.h> |
| 14996 | #if HAVE_SYS_PTRACE_H |
| 14997 | # include <sys/ptrace.h> |
| 14998 | #endif |
| 14999 | #if HAVE_UNISTD_H |
| 15000 | # include <unistd.h> |
| 15001 | #endif |
| 15002 | ' |
| 15003 | |
| 15004 | # Check return type. Varargs (used on GNU/Linux) conflict with the |
| 15005 | # empty argument list, so check for that explicitly. |
| 15006 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5 |
| 15007 | $as_echo_n "checking return type of ptrace... " >&6; } |
| 15008 | if ${gdb_cv_func_ptrace_ret+:} false; then : |
| 15009 | $as_echo_n "(cached) " >&6 |
| 15010 | else |
| 15011 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15012 | /* end confdefs.h. */ |
| 15013 | $gdb_ptrace_headers |
| 15014 | int |
| 15015 | main () |
| 15016 | { |
| 15017 | extern long ptrace (enum __ptrace_request, ...); |
| 15018 | ; |
| 15019 | return 0; |
| 15020 | } |
| 15021 | _ACEOF |
| 15022 | if ac_fn_c_try_compile "$LINENO"; then : |
| 15023 | gdb_cv_func_ptrace_ret='long' |
| 15024 | else |
| 15025 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15026 | /* end confdefs.h. */ |
| 15027 | $gdb_ptrace_headers |
| 15028 | int |
| 15029 | main () |
| 15030 | { |
| 15031 | extern int ptrace (); |
| 15032 | ; |
| 15033 | return 0; |
| 15034 | } |
| 15035 | _ACEOF |
| 15036 | if ac_fn_c_try_compile "$LINENO"; then : |
| 15037 | gdb_cv_func_ptrace_ret='int' |
| 15038 | else |
| 15039 | gdb_cv_func_ptrace_ret='long' |
| 15040 | fi |
| 15041 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15042 | fi |
| 15043 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15044 | fi |
| 15045 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5 |
| 15046 | $as_echo "$gdb_cv_func_ptrace_ret" >&6; } |
| 15047 | |
| 15048 | cat >>confdefs.h <<_ACEOF |
| 15049 | #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret |
| 15050 | _ACEOF |
| 15051 | |
| 15052 | # Check argument types. |
| 15053 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5 |
| 15054 | $as_echo_n "checking types of arguments for ptrace... " >&6; } |
| 15055 | if ${gdb_cv_func_ptrace_args+:} false; then : |
| 15056 | $as_echo_n "(cached) " >&6 |
| 15057 | else |
| 15058 | |
| 15059 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15060 | /* end confdefs.h. */ |
| 15061 | $gdb_ptrace_headers |
| 15062 | int |
| 15063 | main () |
| 15064 | { |
| 15065 | extern long ptrace (enum __ptrace_request, ...); |
| 15066 | ; |
| 15067 | return 0; |
| 15068 | } |
| 15069 | _ACEOF |
| 15070 | if ac_fn_c_try_compile "$LINENO"; then : |
| 15071 | gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long' |
| 15072 | else |
| 15073 | |
| 15074 | for gdb_arg1 in 'int' 'long'; do |
| 15075 | for gdb_arg2 in 'pid_t' 'int' 'long'; do |
| 15076 | for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do |
| 15077 | for gdb_arg4 in 'int' 'long' 'void *'; do |
| 15078 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15079 | /* end confdefs.h. */ |
| 15080 | $gdb_ptrace_headers |
| 15081 | int |
| 15082 | main () |
| 15083 | { |
| 15084 | |
| 15085 | extern $gdb_cv_func_ptrace_ret |
| 15086 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4); |
| 15087 | |
| 15088 | ; |
| 15089 | return 0; |
| 15090 | } |
| 15091 | _ACEOF |
| 15092 | if ac_fn_c_try_compile "$LINENO"; then : |
| 15093 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4"; |
| 15094 | break 4; |
| 15095 | fi |
| 15096 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15097 | for gdb_arg5 in 'int *' 'int' 'long'; do |
| 15098 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15099 | /* end confdefs.h. */ |
| 15100 | $gdb_ptrace_headers |
| 15101 | int |
| 15102 | main () |
| 15103 | { |
| 15104 | |
| 15105 | extern $gdb_cv_func_ptrace_ret |
| 15106 | ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5); |
| 15107 | |
| 15108 | ; |
| 15109 | return 0; |
| 15110 | } |
| 15111 | _ACEOF |
| 15112 | if ac_fn_c_try_compile "$LINENO"; then : |
| 15113 | |
| 15114 | gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5"; |
| 15115 | break 5; |
| 15116 | fi |
| 15117 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15118 | done |
| 15119 | done |
| 15120 | done |
| 15121 | done |
| 15122 | done |
| 15123 | # Provide a safe default value. |
| 15124 | : ${gdb_cv_func_ptrace_args='int,int,long,long'} |
| 15125 | |
| 15126 | fi |
| 15127 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15128 | fi |
| 15129 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5 |
| 15130 | $as_echo "$gdb_cv_func_ptrace_args" >&6; } |
| 15131 | ac_save_IFS=$IFS; IFS=',' |
| 15132 | set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'` |
| 15133 | IFS=$ac_save_IFS |
| 15134 | shift |
| 15135 | |
| 15136 | cat >>confdefs.h <<_ACEOF |
| 15137 | #define PTRACE_TYPE_ARG1 $1 |
| 15138 | _ACEOF |
| 15139 | |
| 15140 | |
| 15141 | cat >>confdefs.h <<_ACEOF |
| 15142 | #define PTRACE_TYPE_ARG3 $3 |
| 15143 | _ACEOF |
| 15144 | |
| 15145 | |
| 15146 | cat >>confdefs.h <<_ACEOF |
| 15147 | #define PTRACE_TYPE_ARG4 $4 |
| 15148 | _ACEOF |
| 15149 | |
| 15150 | if test -n "$5"; then |
| 15151 | |
| 15152 | cat >>confdefs.h <<_ACEOF |
| 15153 | #define PTRACE_TYPE_ARG5 $5 |
| 15154 | _ACEOF |
| 15155 | |
| 15156 | fi |
| 15157 | |
| 15158 | |
| 15159 | if test "$cross_compiling" = no; then |
| 15160 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
| 15161 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } |
| 15162 | if ${ac_cv_func_setpgrp_void+:} false; then : |
| 15163 | $as_echo_n "(cached) " >&6 |
| 15164 | else |
| 15165 | if test "$cross_compiling" = yes; then : |
| 15166 | as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5 |
| 15167 | else |
| 15168 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15169 | /* end confdefs.h. */ |
| 15170 | $ac_includes_default |
| 15171 | int |
| 15172 | main () |
| 15173 | { |
| 15174 | /* If this system has a BSD-style setpgrp which takes arguments, |
| 15175 | setpgrp(1, 1) will fail with ESRCH and return -1, in that case |
| 15176 | exit successfully. */ |
| 15177 | return setpgrp (1,1) != -1; |
| 15178 | ; |
| 15179 | return 0; |
| 15180 | } |
| 15181 | _ACEOF |
| 15182 | if ac_fn_c_try_run "$LINENO"; then : |
| 15183 | ac_cv_func_setpgrp_void=no |
| 15184 | else |
| 15185 | ac_cv_func_setpgrp_void=yes |
| 15186 | fi |
| 15187 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 15188 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 15189 | fi |
| 15190 | |
| 15191 | fi |
| 15192 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
| 15193 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } |
| 15194 | if test $ac_cv_func_setpgrp_void = yes; then |
| 15195 | |
| 15196 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
| 15197 | |
| 15198 | fi |
| 15199 | |
| 15200 | else |
| 15201 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5 |
| 15202 | $as_echo_n "checking whether setpgrp takes no argument... " >&6; } |
| 15203 | if ${ac_cv_func_setpgrp_void+:} false; then : |
| 15204 | $as_echo_n "(cached) " >&6 |
| 15205 | else |
| 15206 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15207 | /* end confdefs.h. */ |
| 15208 | |
| 15209 | #include <unistd.h> |
| 15210 | |
| 15211 | int |
| 15212 | main () |
| 15213 | { |
| 15214 | |
| 15215 | if (setpgrp(1,1) == -1) |
| 15216 | exit (0); |
| 15217 | else |
| 15218 | exit (1); |
| 15219 | |
| 15220 | ; |
| 15221 | return 0; |
| 15222 | } |
| 15223 | _ACEOF |
| 15224 | if ac_fn_c_try_compile "$LINENO"; then : |
| 15225 | ac_cv_func_setpgrp_void=no |
| 15226 | else |
| 15227 | ac_cv_func_setpgrp_void=yes |
| 15228 | fi |
| 15229 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15230 | fi |
| 15231 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5 |
| 15232 | $as_echo "$ac_cv_func_setpgrp_void" >&6; } |
| 15233 | if test "$ac_cv_func_setpgrp_void" = yes; then |
| 15234 | $as_echo "#define SETPGRP_VOID 1" >>confdefs.h |
| 15235 | |
| 15236 | fi |
| 15237 | fi |
| 15238 | |
| 15239 | # Assume we'll default to using the included libiberty regex. |
| 15240 | gdb_use_included_regex=yes |
| 15241 | |
| 15242 | # However, if the system regex is GNU regex, then default to *not* |
| 15243 | # using the included regex. |
| 15244 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5 |
| 15245 | $as_echo_n "checking for GNU regex... " >&6; } |
| 15246 | if ${gdb_cv_have_gnu_regex+:} false; then : |
| 15247 | $as_echo_n "(cached) " >&6 |
| 15248 | else |
| 15249 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15250 | /* end confdefs.h. */ |
| 15251 | #include <gnu-versions.h> |
| 15252 | int |
| 15253 | main () |
| 15254 | { |
| 15255 | #define REGEX_INTERFACE_VERSION 1 |
| 15256 | #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION |
| 15257 | # error "Version mismatch" |
| 15258 | #endif |
| 15259 | ; |
| 15260 | return 0; |
| 15261 | } |
| 15262 | _ACEOF |
| 15263 | if ac_fn_c_try_compile "$LINENO"; then : |
| 15264 | gdb_cv_have_gnu_regex=yes |
| 15265 | else |
| 15266 | gdb_cv_have_gnu_regex=no |
| 15267 | fi |
| 15268 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15269 | fi |
| 15270 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5 |
| 15271 | $as_echo "$gdb_cv_have_gnu_regex" >&6; } |
| 15272 | if test "$gdb_cv_have_gnu_regex" = yes; then |
| 15273 | gdb_use_included_regex=no |
| 15274 | fi |
| 15275 | |
| 15276 | |
| 15277 | # Check whether --with-included-regex was given. |
| 15278 | if test "${with_included_regex+set}" = set; then : |
| 15279 | withval=$with_included_regex; gdb_with_regex=$withval |
| 15280 | else |
| 15281 | gdb_with_regex=$gdb_use_included_regex |
| 15282 | fi |
| 15283 | |
| 15284 | if test "$gdb_with_regex" = yes; then |
| 15285 | |
| 15286 | $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h |
| 15287 | |
| 15288 | fi |
| 15289 | |
| 15290 | # Check if <sys/proc.h> defines `struct thread' with a td_pcb member. |
| 15291 | ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h> |
| 15292 | #include <sys/proc.h> |
| 15293 | |
| 15294 | " |
| 15295 | if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then : |
| 15296 | |
| 15297 | cat >>confdefs.h <<_ACEOF |
| 15298 | #define HAVE_STRUCT_THREAD_TD_PCB 1 |
| 15299 | _ACEOF |
| 15300 | |
| 15301 | |
| 15302 | fi |
| 15303 | |
| 15304 | |
| 15305 | # See if <sys/lwp.h> defines `struct lwp`. |
| 15306 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5 |
| 15307 | $as_echo_n "checking for struct lwp... " >&6; } |
| 15308 | if ${gdb_cv_struct_lwp+:} false; then : |
| 15309 | $as_echo_n "(cached) " >&6 |
| 15310 | else |
| 15311 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15312 | /* end confdefs.h. */ |
| 15313 | #include <sys/param.h> |
| 15314 | #define _KMEMUSER |
| 15315 | #include <sys/lwp.h> |
| 15316 | int |
| 15317 | main () |
| 15318 | { |
| 15319 | struct lwp l; |
| 15320 | ; |
| 15321 | return 0; |
| 15322 | } |
| 15323 | _ACEOF |
| 15324 | if ac_fn_c_try_compile "$LINENO"; then : |
| 15325 | gdb_cv_struct_lwp=yes |
| 15326 | else |
| 15327 | gdb_cv_struct_lwp=no |
| 15328 | fi |
| 15329 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15330 | fi |
| 15331 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5 |
| 15332 | $as_echo "$gdb_cv_struct_lwp" >&6; } |
| 15333 | if test "$gdb_cv_struct_lwp" = yes; then |
| 15334 | |
| 15335 | $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h |
| 15336 | |
| 15337 | fi |
| 15338 | |
| 15339 | # See if <machine/reg.h> degines `struct reg'. |
| 15340 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5 |
| 15341 | $as_echo_n "checking for struct reg in machine/reg.h... " >&6; } |
| 15342 | if ${gdb_cv_struct_reg+:} false; then : |
| 15343 | $as_echo_n "(cached) " >&6 |
| 15344 | else |
| 15345 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15346 | /* end confdefs.h. */ |
| 15347 | #include <sys/types.h> |
| 15348 | #include <machine/reg.h> |
| 15349 | int |
| 15350 | main () |
| 15351 | { |
| 15352 | struct reg r; |
| 15353 | ; |
| 15354 | return 0; |
| 15355 | } |
| 15356 | _ACEOF |
| 15357 | if ac_fn_c_try_compile "$LINENO"; then : |
| 15358 | gdb_cv_struct_reg=yes |
| 15359 | else |
| 15360 | gdb_cv_struct_reg=no |
| 15361 | fi |
| 15362 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15363 | fi |
| 15364 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5 |
| 15365 | $as_echo "$gdb_cv_struct_reg" >&6; } |
| 15366 | if test "$gdb_cv_struct_reg" = yes; then |
| 15367 | |
| 15368 | $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h |
| 15369 | |
| 15370 | fi |
| 15371 | |
| 15372 | # See if <machine/reg.h> supports the %fs and %gs i386 segment registers. |
| 15373 | # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'. |
| 15374 | ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h> |
| 15375 | #include <machine/reg.h> |
| 15376 | " |
| 15377 | if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then : |
| 15378 | |
| 15379 | cat >>confdefs.h <<_ACEOF |
| 15380 | #define HAVE_STRUCT_REG_R_FS 1 |
| 15381 | _ACEOF |
| 15382 | |
| 15383 | |
| 15384 | fi |
| 15385 | ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h> |
| 15386 | #include <machine/reg.h> |
| 15387 | " |
| 15388 | if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then : |
| 15389 | |
| 15390 | cat >>confdefs.h <<_ACEOF |
| 15391 | #define HAVE_STRUCT_REG_R_GS 1 |
| 15392 | _ACEOF |
| 15393 | |
| 15394 | |
| 15395 | fi |
| 15396 | |
| 15397 | |
| 15398 | # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers. |
| 15399 | # Older amd64 Linux's don't have the fs_base and gs_base members of |
| 15400 | # `struct user_regs_struct'. |
| 15401 | ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "fs_base" "ac_cv_member_struct_user_regs_struct_fs_base" "#include <sys/types.h> |
| 15402 | #include <sys/user.h> |
| 15403 | " |
| 15404 | if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then : |
| 15405 | |
| 15406 | cat >>confdefs.h <<_ACEOF |
| 15407 | #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1 |
| 15408 | _ACEOF |
| 15409 | |
| 15410 | |
| 15411 | fi |
| 15412 | ac_fn_c_check_member "$LINENO" "struct user_regs_struct" "gs_base" "ac_cv_member_struct_user_regs_struct_gs_base" "#include <sys/types.h> |
| 15413 | #include <sys/user.h> |
| 15414 | " |
| 15415 | if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then : |
| 15416 | |
| 15417 | cat >>confdefs.h <<_ACEOF |
| 15418 | #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1 |
| 15419 | _ACEOF |
| 15420 | |
| 15421 | |
| 15422 | fi |
| 15423 | |
| 15424 | |
| 15425 | # See if <sys/ptrace.h> provides the PTRACE_GETREGS request. |
| 15426 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5 |
| 15427 | $as_echo_n "checking for PTRACE_GETREGS... " >&6; } |
| 15428 | if ${gdb_cv_have_ptrace_getregs+:} false; then : |
| 15429 | $as_echo_n "(cached) " >&6 |
| 15430 | else |
| 15431 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15432 | /* end confdefs.h. */ |
| 15433 | #include <sys/ptrace.h> |
| 15434 | int |
| 15435 | main () |
| 15436 | { |
| 15437 | PTRACE_GETREGS; |
| 15438 | ; |
| 15439 | return 0; |
| 15440 | } |
| 15441 | _ACEOF |
| 15442 | if ac_fn_c_try_compile "$LINENO"; then : |
| 15443 | gdb_cv_have_ptrace_getregs=yes |
| 15444 | else |
| 15445 | gdb_cv_have_ptrace_getregs=no |
| 15446 | fi |
| 15447 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15448 | fi |
| 15449 | |
| 15450 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5 |
| 15451 | $as_echo "$gdb_cv_have_ptrace_getregs" >&6; } |
| 15452 | if test "$gdb_cv_have_ptrace_getregs" = yes; then |
| 15453 | |
| 15454 | $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h |
| 15455 | |
| 15456 | fi |
| 15457 | |
| 15458 | # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request. |
| 15459 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5 |
| 15460 | $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; } |
| 15461 | if ${gdb_cv_have_ptrace_getfpxregs+:} false; then : |
| 15462 | $as_echo_n "(cached) " >&6 |
| 15463 | else |
| 15464 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15465 | /* end confdefs.h. */ |
| 15466 | #include <sys/ptrace.h> |
| 15467 | int |
| 15468 | main () |
| 15469 | { |
| 15470 | PTRACE_GETFPXREGS; |
| 15471 | ; |
| 15472 | return 0; |
| 15473 | } |
| 15474 | _ACEOF |
| 15475 | if ac_fn_c_try_compile "$LINENO"; then : |
| 15476 | gdb_cv_have_ptrace_getfpxregs=yes |
| 15477 | else |
| 15478 | gdb_cv_have_ptrace_getfpxregs=no |
| 15479 | fi |
| 15480 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15481 | fi |
| 15482 | |
| 15483 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5 |
| 15484 | $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; } |
| 15485 | if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then |
| 15486 | |
| 15487 | $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h |
| 15488 | |
| 15489 | fi |
| 15490 | |
| 15491 | # See if <sys/ptrace.h> provides the PT_GETDBREGS request. |
| 15492 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5 |
| 15493 | $as_echo_n "checking for PT_GETDBREGS... " >&6; } |
| 15494 | if ${gdb_cv_have_pt_getdbregs+:} false; then : |
| 15495 | $as_echo_n "(cached) " >&6 |
| 15496 | else |
| 15497 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15498 | /* end confdefs.h. */ |
| 15499 | #include <sys/types.h> |
| 15500 | #include <sys/ptrace.h> |
| 15501 | int |
| 15502 | main () |
| 15503 | { |
| 15504 | PT_GETDBREGS; |
| 15505 | ; |
| 15506 | return 0; |
| 15507 | } |
| 15508 | _ACEOF |
| 15509 | if ac_fn_c_try_compile "$LINENO"; then : |
| 15510 | gdb_cv_have_pt_getdbregs=yes |
| 15511 | else |
| 15512 | gdb_cv_have_pt_getdbregs=no |
| 15513 | fi |
| 15514 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15515 | fi |
| 15516 | |
| 15517 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5 |
| 15518 | $as_echo "$gdb_cv_have_pt_getdbregs" >&6; } |
| 15519 | if test "$gdb_cv_have_pt_getdbregs" = yes; then |
| 15520 | |
| 15521 | $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h |
| 15522 | |
| 15523 | fi |
| 15524 | |
| 15525 | # See if <sys/ptrace.h> provides the PT_GETXMMREGS request. |
| 15526 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5 |
| 15527 | $as_echo_n "checking for PT_GETXMMREGS... " >&6; } |
| 15528 | if ${gdb_cv_have_pt_getxmmregs+:} false; then : |
| 15529 | $as_echo_n "(cached) " >&6 |
| 15530 | else |
| 15531 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15532 | /* end confdefs.h. */ |
| 15533 | #include <sys/types.h> |
| 15534 | #include <sys/ptrace.h> |
| 15535 | int |
| 15536 | main () |
| 15537 | { |
| 15538 | PT_GETXMMREGS; |
| 15539 | ; |
| 15540 | return 0; |
| 15541 | } |
| 15542 | _ACEOF |
| 15543 | if ac_fn_c_try_compile "$LINENO"; then : |
| 15544 | gdb_cv_have_pt_getxmmregs=yes |
| 15545 | else |
| 15546 | gdb_cv_have_pt_getxmmregs=no |
| 15547 | fi |
| 15548 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15549 | fi |
| 15550 | |
| 15551 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5 |
| 15552 | $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; } |
| 15553 | if test "$gdb_cv_have_pt_getxmmregs" = yes; then |
| 15554 | |
| 15555 | $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h |
| 15556 | |
| 15557 | fi |
| 15558 | |
| 15559 | # See if <sys/ptrace.h> supports LWP names on FreeBSD |
| 15560 | # Older FreeBSD versions don't have the pl_tdname member of |
| 15561 | # `struct ptrace_lwpinfo'. |
| 15562 | ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h> |
| 15563 | " |
| 15564 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then : |
| 15565 | |
| 15566 | cat >>confdefs.h <<_ACEOF |
| 15567 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1 |
| 15568 | _ACEOF |
| 15569 | |
| 15570 | |
| 15571 | fi |
| 15572 | |
| 15573 | |
| 15574 | # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The |
| 15575 | # pl_syscall_code member of `struct ptrace_lwpinfo' was added in |
| 15576 | # FreeBSD 10.3. |
| 15577 | ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_syscall_code" "ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" "#include <sys/ptrace.h> |
| 15578 | " |
| 15579 | if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then : |
| 15580 | |
| 15581 | cat >>confdefs.h <<_ACEOF |
| 15582 | #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1 |
| 15583 | _ACEOF |
| 15584 | |
| 15585 | |
| 15586 | fi |
| 15587 | |
| 15588 | |
| 15589 | # Check if the compiler supports the `long long' type. |
| 15590 | |
| 15591 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5 |
| 15592 | $as_echo_n "checking for long long support in compiler... " >&6; } |
| 15593 | if ${gdb_cv_c_long_long+:} false; then : |
| 15594 | $as_echo_n "(cached) " >&6 |
| 15595 | else |
| 15596 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15597 | /* end confdefs.h. */ |
| 15598 | extern long long foo; |
| 15599 | int |
| 15600 | main () |
| 15601 | { |
| 15602 | switch (foo & 2) { case 0: return 1; } |
| 15603 | ; |
| 15604 | return 0; |
| 15605 | } |
| 15606 | _ACEOF |
| 15607 | if ac_fn_c_try_compile "$LINENO"; then : |
| 15608 | gdb_cv_c_long_long=yes |
| 15609 | else |
| 15610 | gdb_cv_c_long_long=no |
| 15611 | fi |
| 15612 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15613 | fi |
| 15614 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5 |
| 15615 | $as_echo "$gdb_cv_c_long_long" >&6; } |
| 15616 | if test "$gdb_cv_c_long_long" != yes; then |
| 15617 | # libdecnumber requires long long. |
| 15618 | as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5 |
| 15619 | fi |
| 15620 | |
| 15621 | # Check if the compiler and runtime support printing long longs. |
| 15622 | |
| 15623 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5 |
| 15624 | $as_echo_n "checking for long long support in printf... " >&6; } |
| 15625 | if ${gdb_cv_printf_has_long_long+:} false; then : |
| 15626 | $as_echo_n "(cached) " >&6 |
| 15627 | else |
| 15628 | if test "$cross_compiling" = yes; then : |
| 15629 | gdb_cv_printf_has_long_long=no |
| 15630 | else |
| 15631 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15632 | /* end confdefs.h. */ |
| 15633 | $ac_includes_default |
| 15634 | int |
| 15635 | main () |
| 15636 | { |
| 15637 | char buf[32]; |
| 15638 | long long l = 0; |
| 15639 | l = (l << 16) + 0x0123; |
| 15640 | l = (l << 16) + 0x4567; |
| 15641 | l = (l << 16) + 0x89ab; |
| 15642 | l = (l << 16) + 0xcdef; |
| 15643 | sprintf (buf, "0x%016llx", l); |
| 15644 | return (strcmp ("0x0123456789abcdef", buf)); |
| 15645 | ; |
| 15646 | return 0; |
| 15647 | } |
| 15648 | _ACEOF |
| 15649 | if ac_fn_c_try_run "$LINENO"; then : |
| 15650 | gdb_cv_printf_has_long_long=yes |
| 15651 | else |
| 15652 | gdb_cv_printf_has_long_long=no |
| 15653 | fi |
| 15654 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 15655 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 15656 | fi |
| 15657 | |
| 15658 | fi |
| 15659 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5 |
| 15660 | $as_echo "$gdb_cv_printf_has_long_long" >&6; } |
| 15661 | if test "$gdb_cv_printf_has_long_long" = yes; then |
| 15662 | |
| 15663 | $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h |
| 15664 | |
| 15665 | fi |
| 15666 | |
| 15667 | # Check if the compiler and runtime support printing decfloats. |
| 15668 | |
| 15669 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5 |
| 15670 | $as_echo_n "checking for decfloat support in printf... " >&6; } |
| 15671 | if ${gdb_cv_printf_has_decfloat+:} false; then : |
| 15672 | $as_echo_n "(cached) " >&6 |
| 15673 | else |
| 15674 | if test "$cross_compiling" = yes; then : |
| 15675 | gdb_cv_printf_has_decfloat=no |
| 15676 | else |
| 15677 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15678 | /* end confdefs.h. */ |
| 15679 | $ac_includes_default |
| 15680 | int |
| 15681 | main () |
| 15682 | { |
| 15683 | char buf[64]; |
| 15684 | _Decimal32 d32 = 1.2345df; |
| 15685 | _Decimal64 d64 = 1.2345dd; |
| 15686 | _Decimal128 d128 = 1.2345dl; |
| 15687 | sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128); |
| 15688 | return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf)); |
| 15689 | ; |
| 15690 | return 0; |
| 15691 | } |
| 15692 | _ACEOF |
| 15693 | if ac_fn_c_try_run "$LINENO"; then : |
| 15694 | gdb_cv_printf_has_decfloat=yes |
| 15695 | else |
| 15696 | gdb_cv_printf_has_decfloat=no |
| 15697 | fi |
| 15698 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 15699 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 15700 | fi |
| 15701 | |
| 15702 | fi |
| 15703 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5 |
| 15704 | $as_echo "$gdb_cv_printf_has_decfloat" >&6; } |
| 15705 | if test "$gdb_cv_printf_has_decfloat" = yes; then |
| 15706 | |
| 15707 | $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h |
| 15708 | |
| 15709 | fi |
| 15710 | |
| 15711 | # Check if the compiler supports the `long double' type. We can't use |
| 15712 | # AC_C_LONG_DOUBLE because that one does additional checks on the |
| 15713 | # constants defined in <float.h> that fail on some systems, |
| 15714 | # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6. |
| 15715 | |
| 15716 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5 |
| 15717 | $as_echo_n "checking for long double support in compiler... " >&6; } |
| 15718 | if ${gdb_cv_c_long_double+:} false; then : |
| 15719 | $as_echo_n "(cached) " >&6 |
| 15720 | else |
| 15721 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15722 | /* end confdefs.h. */ |
| 15723 | long double foo; |
| 15724 | _ACEOF |
| 15725 | if ac_fn_c_try_compile "$LINENO"; then : |
| 15726 | gdb_cv_c_long_double=yes |
| 15727 | else |
| 15728 | gdb_cv_c_long_double=no |
| 15729 | fi |
| 15730 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15731 | fi |
| 15732 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5 |
| 15733 | $as_echo "$gdb_cv_c_long_double" >&6; } |
| 15734 | if test "$gdb_cv_c_long_double" = yes; then |
| 15735 | |
| 15736 | $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h |
| 15737 | |
| 15738 | fi |
| 15739 | |
| 15740 | # Check if the compiler and runtime support printing long doubles. |
| 15741 | |
| 15742 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5 |
| 15743 | $as_echo_n "checking for long double support in printf... " >&6; } |
| 15744 | if ${gdb_cv_printf_has_long_double+:} false; then : |
| 15745 | $as_echo_n "(cached) " >&6 |
| 15746 | else |
| 15747 | if test "$cross_compiling" = yes; then : |
| 15748 | gdb_cv_printf_has_long_double=no |
| 15749 | else |
| 15750 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15751 | /* end confdefs.h. */ |
| 15752 | $ac_includes_default |
| 15753 | int |
| 15754 | main () |
| 15755 | { |
| 15756 | char buf[16]; |
| 15757 | long double f = 3.141592653; |
| 15758 | sprintf (buf, "%Lg", f); |
| 15759 | return (strncmp ("3.14159", buf, 7)); |
| 15760 | ; |
| 15761 | return 0; |
| 15762 | } |
| 15763 | _ACEOF |
| 15764 | if ac_fn_c_try_run "$LINENO"; then : |
| 15765 | gdb_cv_printf_has_long_double=yes |
| 15766 | else |
| 15767 | gdb_cv_printf_has_long_double=no |
| 15768 | fi |
| 15769 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 15770 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 15771 | fi |
| 15772 | |
| 15773 | fi |
| 15774 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5 |
| 15775 | $as_echo "$gdb_cv_printf_has_long_double" >&6; } |
| 15776 | if test "$gdb_cv_printf_has_long_double" = yes; then |
| 15777 | |
| 15778 | $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h |
| 15779 | |
| 15780 | fi |
| 15781 | |
| 15782 | # Check if the compiler and runtime support scanning long doubles. |
| 15783 | |
| 15784 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5 |
| 15785 | $as_echo_n "checking for long double support in scanf... " >&6; } |
| 15786 | if ${gdb_cv_scanf_has_long_double+:} false; then : |
| 15787 | $as_echo_n "(cached) " >&6 |
| 15788 | else |
| 15789 | if test "$cross_compiling" = yes; then : |
| 15790 | gdb_cv_scanf_has_long_double=no |
| 15791 | else |
| 15792 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15793 | /* end confdefs.h. */ |
| 15794 | #include <stdio.h> |
| 15795 | int |
| 15796 | main () |
| 15797 | { |
| 15798 | char *buf = "3.141592653"; |
| 15799 | long double f = 0; |
| 15800 | sscanf (buf, "%Lg", &f); |
| 15801 | return !(f > 3.14159 && f < 3.14160); |
| 15802 | ; |
| 15803 | return 0; |
| 15804 | } |
| 15805 | _ACEOF |
| 15806 | if ac_fn_c_try_run "$LINENO"; then : |
| 15807 | gdb_cv_scanf_has_long_double=yes |
| 15808 | else |
| 15809 | gdb_cv_scanf_has_long_double=no |
| 15810 | fi |
| 15811 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 15812 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 15813 | fi |
| 15814 | |
| 15815 | fi |
| 15816 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5 |
| 15817 | $as_echo "$gdb_cv_scanf_has_long_double" >&6; } |
| 15818 | if test "$gdb_cv_scanf_has_long_double" = yes; then |
| 15819 | |
| 15820 | $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h |
| 15821 | |
| 15822 | fi |
| 15823 | |
| 15824 | case ${host_os} in |
| 15825 | aix*) |
| 15826 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5 |
| 15827 | $as_echo_n "checking for -bbigtoc option... " >&6; } |
| 15828 | if ${gdb_cv_bigtoc+:} false; then : |
| 15829 | $as_echo_n "(cached) " >&6 |
| 15830 | else |
| 15831 | |
| 15832 | SAVE_LDFLAGS=$LDFLAGS |
| 15833 | |
| 15834 | case $GCC in |
| 15835 | yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;; |
| 15836 | *) gdb_cv_bigtoc=-bbigtoc ;; |
| 15837 | esac |
| 15838 | |
| 15839 | LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc |
| 15840 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15841 | /* end confdefs.h. */ |
| 15842 | |
| 15843 | int |
| 15844 | main () |
| 15845 | { |
| 15846 | int i; |
| 15847 | ; |
| 15848 | return 0; |
| 15849 | } |
| 15850 | _ACEOF |
| 15851 | if ac_fn_c_try_link "$LINENO"; then : |
| 15852 | |
| 15853 | else |
| 15854 | gdb_cv_bigtoc= |
| 15855 | fi |
| 15856 | rm -f core conftest.err conftest.$ac_objext \ |
| 15857 | conftest$ac_exeext conftest.$ac_ext |
| 15858 | LDFLAGS="${SAVE_LDFLAGS}" |
| 15859 | |
| 15860 | fi |
| 15861 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5 |
| 15862 | $as_echo "$gdb_cv_bigtoc" >&6; } |
| 15863 | CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}" |
| 15864 | ;; |
| 15865 | esac |
| 15866 | |
| 15867 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5 |
| 15868 | $as_echo_n "checking for the dynamic export flag... " >&6; } |
| 15869 | dynamic_list=false |
| 15870 | if test "${gdb_native}" = yes; then |
| 15871 | # The dynamically loaded libthread_db needs access to symbols in the gdb |
| 15872 | # executable. Older GNU ld supports --export-dynamic but --dynamic-list |
| 15873 | # may not be supported there. |
| 15874 | old_LDFLAGS="$LDFLAGS" |
| 15875 | # Older GNU ld supports --export-dynamic but --dynamic-list it does not. |
| 15876 | RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list" |
| 15877 | LDFLAGS="$LDFLAGS $RDYNAMIC" |
| 15878 | if test "${have_libpython}" = no; then |
| 15879 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15880 | /* end confdefs.h. */ |
| 15881 | |
| 15882 | int |
| 15883 | main () |
| 15884 | { |
| 15885 | |
| 15886 | ; |
| 15887 | return 0; |
| 15888 | } |
| 15889 | _ACEOF |
| 15890 | if ac_fn_c_try_link "$LINENO"; then : |
| 15891 | dynamic_list=true |
| 15892 | fi |
| 15893 | rm -f core conftest.err conftest.$ac_objext \ |
| 15894 | conftest$ac_exeext conftest.$ac_ext |
| 15895 | else |
| 15896 | # Workaround http://bugs.python.org/issue4434 where static |
| 15897 | # libpythonX.Y.a would get its symbols required for |
| 15898 | # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list. |
| 15899 | # Problem does not happen for the recommended libpythonX.Y.so linkage. |
| 15900 | |
| 15901 | # Note the workaround for Python |
| 15902 | # http://bugs.python.org/issue10112 earlier has removed |
| 15903 | # -export-dynamic from PYTHON_LIBS. That's exactly what we want |
| 15904 | # here too, as otherwise it'd make this -Wl,--dynamic-list test |
| 15905 | # always pass. |
| 15906 | old_CFLAGS="$CFLAGS" |
| 15907 | CFLAGS="$CFLAGS $PYTHON_CFLAGS" |
| 15908 | old_LIBS="$LIBS" |
| 15909 | LIBS="$LIBS $PYTHON_LIBS" |
| 15910 | old_CPPFLAGS="$CPPFLAGS" |
| 15911 | CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS" |
| 15912 | if test "$cross_compiling" = yes; then : |
| 15913 | true |
| 15914 | else |
| 15915 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15916 | /* end confdefs.h. */ |
| 15917 | #include "Python.h" |
| 15918 | int |
| 15919 | main () |
| 15920 | { |
| 15921 | int err; |
| 15922 | Py_Initialize (); |
| 15923 | err = PyRun_SimpleString ("import itertools\n"); |
| 15924 | Py_Finalize (); |
| 15925 | return err == 0 ? 0 : 1; |
| 15926 | ; |
| 15927 | return 0; |
| 15928 | } |
| 15929 | _ACEOF |
| 15930 | if ac_fn_c_try_run "$LINENO"; then : |
| 15931 | dynamic_list=true |
| 15932 | fi |
| 15933 | rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ |
| 15934 | conftest.$ac_objext conftest.beam conftest.$ac_ext |
| 15935 | fi |
| 15936 | |
| 15937 | LIBS="$old_LIBS" |
| 15938 | CFLAGS="$old_CFLAGS" |
| 15939 | CPPFLAGS="$old_CPPFLAGS" |
| 15940 | fi |
| 15941 | LDFLAGS="$old_LDFLAGS" |
| 15942 | fi |
| 15943 | if $dynamic_list; then |
| 15944 | found="-Wl,--dynamic-list" |
| 15945 | RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list' |
| 15946 | else |
| 15947 | found="-rdynamic" |
| 15948 | RDYNAMIC="-rdynamic" |
| 15949 | fi |
| 15950 | |
| 15951 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5 |
| 15952 | $as_echo "$found" >&6; } |
| 15953 | |
| 15954 | |
| 15955 | if test "${build}" = "${host}" -a "${host}" = "${target}" ; then |
| 15956 | case ${host_os} in |
| 15957 | aix*) |
| 15958 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5 |
| 15959 | $as_echo_n "checking for AiX thread debugging library... " >&6; } |
| 15960 | if ${gdb_cv_have_aix_thread_debug+:} false; then : |
| 15961 | $as_echo_n "(cached) " >&6 |
| 15962 | else |
| 15963 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 15964 | /* end confdefs.h. */ |
| 15965 | #include <sys/pthdebug.h> |
| 15966 | int |
| 15967 | main () |
| 15968 | { |
| 15969 | #ifndef PTHDB_VERSION_3 |
| 15970 | #error |
| 15971 | #endif |
| 15972 | ; |
| 15973 | return 0; |
| 15974 | } |
| 15975 | _ACEOF |
| 15976 | if ac_fn_c_try_compile "$LINENO"; then : |
| 15977 | gdb_cv_have_aix_thread_debug=yes |
| 15978 | else |
| 15979 | gdb_cv_have_aix_thread_debug=no |
| 15980 | fi |
| 15981 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 15982 | fi |
| 15983 | |
| 15984 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5 |
| 15985 | $as_echo "$gdb_cv_have_aix_thread_debug" >&6; } |
| 15986 | if test "$gdb_cv_have_aix_thread_debug" = yes; then |
| 15987 | CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c" |
| 15988 | CONFIG_OBS="${CONFIG_OBS} aix-thread.o" |
| 15989 | LIBS="$LIBS -lpthdebug" |
| 15990 | |
| 15991 | # Older versions of AIX do not provide the declaration for |
| 15992 | # the getthrds function (it appears that it was introduced |
| 15993 | # with AIX 6.x). |
| 15994 | ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h> |
| 15995 | " |
| 15996 | if test "x$ac_cv_have_decl_getthrds" = xyes; then : |
| 15997 | ac_have_decl=1 |
| 15998 | else |
| 15999 | ac_have_decl=0 |
| 16000 | fi |
| 16001 | |
| 16002 | cat >>confdefs.h <<_ACEOF |
| 16003 | #define HAVE_DECL_GETTHRDS $ac_have_decl |
| 16004 | _ACEOF |
| 16005 | |
| 16006 | fi |
| 16007 | ;; |
| 16008 | esac |
| 16009 | |
| 16010 | fi |
| 16011 | |
| 16012 | if test "x$ac_cv_header_thread_db_h" = "xyes"; then |
| 16013 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5 |
| 16014 | $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; } |
| 16015 | if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then : |
| 16016 | $as_echo_n "(cached) " >&6 |
| 16017 | else |
| 16018 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16019 | /* end confdefs.h. */ |
| 16020 | #include <thread_db.h> |
| 16021 | int |
| 16022 | main () |
| 16023 | { |
| 16024 | int i = TD_NOTALLOC; |
| 16025 | ; |
| 16026 | return 0; |
| 16027 | } |
| 16028 | _ACEOF |
| 16029 | if ac_fn_c_try_compile "$LINENO"; then : |
| 16030 | gdb_cv_thread_db_h_has_td_notalloc=yes |
| 16031 | else |
| 16032 | gdb_cv_thread_db_h_has_td_notalloc=no |
| 16033 | |
| 16034 | fi |
| 16035 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 16036 | |
| 16037 | fi |
| 16038 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5 |
| 16039 | $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; } |
| 16040 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5 |
| 16041 | $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; } |
| 16042 | if ${gdb_cv_thread_db_h_has_td_version+:} false; then : |
| 16043 | $as_echo_n "(cached) " >&6 |
| 16044 | else |
| 16045 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16046 | /* end confdefs.h. */ |
| 16047 | #include <thread_db.h> |
| 16048 | int |
| 16049 | main () |
| 16050 | { |
| 16051 | int i = TD_VERSION; |
| 16052 | ; |
| 16053 | return 0; |
| 16054 | } |
| 16055 | _ACEOF |
| 16056 | if ac_fn_c_try_compile "$LINENO"; then : |
| 16057 | gdb_cv_thread_db_h_has_td_version=yes |
| 16058 | else |
| 16059 | gdb_cv_thread_db_h_has_td_version=no |
| 16060 | |
| 16061 | fi |
| 16062 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 16063 | |
| 16064 | fi |
| 16065 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5 |
| 16066 | $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; } |
| 16067 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5 |
| 16068 | $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; } |
| 16069 | if ${gdb_cv_thread_db_h_has_td_notls+:} false; then : |
| 16070 | $as_echo_n "(cached) " >&6 |
| 16071 | else |
| 16072 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16073 | /* end confdefs.h. */ |
| 16074 | #include <thread_db.h> |
| 16075 | int |
| 16076 | main () |
| 16077 | { |
| 16078 | int i = TD_NOTLS; |
| 16079 | ; |
| 16080 | return 0; |
| 16081 | } |
| 16082 | _ACEOF |
| 16083 | if ac_fn_c_try_compile "$LINENO"; then : |
| 16084 | gdb_cv_thread_db_h_has_td_notls=yes |
| 16085 | else |
| 16086 | gdb_cv_thread_db_h_has_td_notls=no |
| 16087 | |
| 16088 | fi |
| 16089 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 16090 | |
| 16091 | fi |
| 16092 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5 |
| 16093 | $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; } |
| 16094 | fi |
| 16095 | if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then |
| 16096 | |
| 16097 | $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h |
| 16098 | |
| 16099 | fi |
| 16100 | if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then |
| 16101 | |
| 16102 | $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h |
| 16103 | |
| 16104 | fi |
| 16105 | if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then |
| 16106 | |
| 16107 | $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h |
| 16108 | |
| 16109 | fi |
| 16110 | |
| 16111 | case $host_os in |
| 16112 | go32* | *djgpp*) |
| 16113 | gdbinit=gdb.ini |
| 16114 | ;; |
| 16115 | *) |
| 16116 | gdbinit=.gdbinit |
| 16117 | ;; |
| 16118 | esac |
| 16119 | |
| 16120 | cat >>confdefs.h <<_ACEOF |
| 16121 | #define GDBINIT "$gdbinit" |
| 16122 | _ACEOF |
| 16123 | |
| 16124 | |
| 16125 | |
| 16126 | # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR, |
| 16127 | # except that the argument to --with-sysroot is optional. |
| 16128 | # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path. |
| 16129 | if test "x$with_sysroot" = xyes; then |
| 16130 | with_sysroot="${exec_prefix}/${target_alias}/sys-root" |
| 16131 | fi |
| 16132 | |
| 16133 | # Check whether --with-sysroot was given. |
| 16134 | if test "${with_sysroot+set}" = set; then : |
| 16135 | withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval |
| 16136 | else |
| 16137 | TARGET_SYSTEM_ROOT= |
| 16138 | fi |
| 16139 | |
| 16140 | |
| 16141 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
| 16142 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
| 16143 | ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT` |
| 16144 | ac_define_dir=`eval echo $ac_define_dir` |
| 16145 | |
| 16146 | cat >>confdefs.h <<_ACEOF |
| 16147 | #define TARGET_SYSTEM_ROOT "$ac_define_dir" |
| 16148 | _ACEOF |
| 16149 | |
| 16150 | |
| 16151 | |
| 16152 | |
| 16153 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
| 16154 | if test "x$prefix" = xNONE; then |
| 16155 | test_prefix=/usr/local |
| 16156 | else |
| 16157 | test_prefix=$prefix |
| 16158 | fi |
| 16159 | else |
| 16160 | test_prefix=$exec_prefix |
| 16161 | fi |
| 16162 | value=0 |
| 16163 | case ${ac_define_dir} in |
| 16164 | "${test_prefix}"|"${test_prefix}/"*|\ |
| 16165 | '${exec_prefix}'|'${exec_prefix}/'*) |
| 16166 | value=1 |
| 16167 | ;; |
| 16168 | esac |
| 16169 | |
| 16170 | cat >>confdefs.h <<_ACEOF |
| 16171 | #define TARGET_SYSTEM_ROOT_RELOCATABLE $value |
| 16172 | _ACEOF |
| 16173 | |
| 16174 | |
| 16175 | |
| 16176 | |
| 16177 | |
| 16178 | # Check whether --with-system-gdbinit was given. |
| 16179 | if test "${with_system_gdbinit+set}" = set; then : |
| 16180 | withval=$with_system_gdbinit; |
| 16181 | SYSTEM_GDBINIT=$withval |
| 16182 | else |
| 16183 | SYSTEM_GDBINIT= |
| 16184 | fi |
| 16185 | |
| 16186 | |
| 16187 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
| 16188 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
| 16189 | ac_define_dir=`eval echo $SYSTEM_GDBINIT` |
| 16190 | ac_define_dir=`eval echo $ac_define_dir` |
| 16191 | |
| 16192 | cat >>confdefs.h <<_ACEOF |
| 16193 | #define SYSTEM_GDBINIT "$ac_define_dir" |
| 16194 | _ACEOF |
| 16195 | |
| 16196 | |
| 16197 | |
| 16198 | |
| 16199 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
| 16200 | if test "x$prefix" = xNONE; then |
| 16201 | test_prefix=/usr/local |
| 16202 | else |
| 16203 | test_prefix=$prefix |
| 16204 | fi |
| 16205 | else |
| 16206 | test_prefix=$exec_prefix |
| 16207 | fi |
| 16208 | value=0 |
| 16209 | case ${ac_define_dir} in |
| 16210 | "${test_prefix}"|"${test_prefix}/"*|\ |
| 16211 | '${exec_prefix}'|'${exec_prefix}/'*) |
| 16212 | value=1 |
| 16213 | ;; |
| 16214 | esac |
| 16215 | |
| 16216 | cat >>confdefs.h <<_ACEOF |
| 16217 | #define SYSTEM_GDBINIT_RELOCATABLE $value |
| 16218 | _ACEOF |
| 16219 | |
| 16220 | |
| 16221 | |
| 16222 | |
| 16223 | |
| 16224 | # Check whether --with-system-gdbinit-dir was given. |
| 16225 | if test "${with_system_gdbinit_dir+set}" = set; then : |
| 16226 | withval=$with_system_gdbinit_dir; |
| 16227 | SYSTEM_GDBINIT_DIR=$withval |
| 16228 | else |
| 16229 | SYSTEM_GDBINIT_DIR= |
| 16230 | fi |
| 16231 | |
| 16232 | |
| 16233 | test "x$prefix" = xNONE && prefix="$ac_default_prefix" |
| 16234 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
| 16235 | ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR` |
| 16236 | ac_define_dir=`eval echo $ac_define_dir` |
| 16237 | |
| 16238 | cat >>confdefs.h <<_ACEOF |
| 16239 | #define SYSTEM_GDBINIT_DIR "$ac_define_dir" |
| 16240 | _ACEOF |
| 16241 | |
| 16242 | |
| 16243 | |
| 16244 | |
| 16245 | if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then |
| 16246 | if test "x$prefix" = xNONE; then |
| 16247 | test_prefix=/usr/local |
| 16248 | else |
| 16249 | test_prefix=$prefix |
| 16250 | fi |
| 16251 | else |
| 16252 | test_prefix=$exec_prefix |
| 16253 | fi |
| 16254 | value=0 |
| 16255 | case ${ac_define_dir} in |
| 16256 | "${test_prefix}"|"${test_prefix}/"*|\ |
| 16257 | '${exec_prefix}'|'${exec_prefix}/'*) |
| 16258 | value=1 |
| 16259 | ;; |
| 16260 | esac |
| 16261 | |
| 16262 | cat >>confdefs.h <<_ACEOF |
| 16263 | #define SYSTEM_GDBINIT_DIR_RELOCATABLE $value |
| 16264 | _ACEOF |
| 16265 | |
| 16266 | |
| 16267 | |
| 16268 | |
| 16269 | |
| 16270 | # Check whether --enable-werror was given. |
| 16271 | if test "${enable_werror+set}" = set; then : |
| 16272 | enableval=$enable_werror; case "${enableval}" in |
| 16273 | yes | y) ERROR_ON_WARNING="yes" ;; |
| 16274 | no | n) ERROR_ON_WARNING="no" ;; |
| 16275 | *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;; |
| 16276 | esac |
| 16277 | fi |
| 16278 | |
| 16279 | |
| 16280 | # Enable -Werror by default when using gcc. Turn it off for releases. |
| 16281 | if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then |
| 16282 | ERROR_ON_WARNING=yes |
| 16283 | fi |
| 16284 | |
| 16285 | WERROR_CFLAGS="" |
| 16286 | if test "${ERROR_ON_WARNING}" = yes ; then |
| 16287 | WERROR_CFLAGS="-Werror" |
| 16288 | fi |
| 16289 | |
| 16290 | # The options we'll try to enable. |
| 16291 | build_warnings="-Wall -Wpointer-arith \ |
| 16292 | -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \ |
| 16293 | -Wno-switch -Wno-char-subscripts \ |
| 16294 | -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \ |
| 16295 | -Wno-sign-compare -Wno-error=maybe-uninitialized \ |
| 16296 | -Wno-mismatched-tags \ |
| 16297 | -Wno-error=deprecated-register \ |
| 16298 | -Wsuggest-override \ |
| 16299 | -Wimplicit-fallthrough=3 \ |
| 16300 | -Wduplicated-cond \ |
| 16301 | -Wshadow=local \ |
| 16302 | -Wdeprecated-copy \ |
| 16303 | -Wdeprecated-copy-dtor \ |
| 16304 | -Wredundant-move \ |
| 16305 | -Wmissing-declarations \ |
| 16306 | -Wmissing-prototypes \ |
| 16307 | -Wstrict-null-sentinel \ |
| 16308 | " |
| 16309 | |
| 16310 | case "${host}" in |
| 16311 | *-*-mingw32*) |
| 16312 | # Enable -Wno-format by default when using gcc on mingw since many |
| 16313 | # GCC versions complain about %I64. |
| 16314 | build_warnings="$build_warnings -Wno-format" ;; |
| 16315 | *-*-solaris*) |
| 16316 | # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC |
| 16317 | # doesn't understand. |
| 16318 | build_warnings="$build_warnings -Wno-unknown-pragmas" |
| 16319 | # Solaris 11 <unistd.h> marks vfork deprecated. |
| 16320 | build_warnings="$build_warnings -Wno-deprecated-declarations" ;; |
| 16321 | *) |
| 16322 | # Note that gcc requires -Wformat for -Wformat-nonliteral to work, |
| 16323 | # but there's a special case for this below. |
| 16324 | build_warnings="$build_warnings -Wformat-nonliteral" ;; |
| 16325 | esac |
| 16326 | |
| 16327 | # Check whether --enable-build-warnings was given. |
| 16328 | if test "${enable_build_warnings+set}" = set; then : |
| 16329 | enableval=$enable_build_warnings; case "${enableval}" in |
| 16330 | yes) ;; |
| 16331 | no) build_warnings="-w";; |
| 16332 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` |
| 16333 | build_warnings="${build_warnings} ${t}";; |
| 16334 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` |
| 16335 | build_warnings="${t} ${build_warnings}";; |
| 16336 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; |
| 16337 | esac |
| 16338 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
| 16339 | echo "Setting compiler warning flags = $build_warnings" 6>&1 |
| 16340 | fi |
| 16341 | fi |
| 16342 | # Check whether --enable-gdb-build-warnings was given. |
| 16343 | if test "${enable_gdb_build_warnings+set}" = set; then : |
| 16344 | enableval=$enable_gdb_build_warnings; case "${enableval}" in |
| 16345 | yes) ;; |
| 16346 | no) build_warnings="-w";; |
| 16347 | ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"` |
| 16348 | build_warnings="${build_warnings} ${t}";; |
| 16349 | *,) t=`echo "${enableval}" | sed -e "s/,/ /g"` |
| 16350 | build_warnings="${t} ${build_warnings}";; |
| 16351 | *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;; |
| 16352 | esac |
| 16353 | if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then |
| 16354 | echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1 |
| 16355 | fi |
| 16356 | fi |
| 16357 | |
| 16358 | # The set of warnings supported by a C++ compiler is not the same as |
| 16359 | # of the C compiler. |
| 16360 | ac_ext=cpp |
| 16361 | ac_cpp='$CXXCPP $CPPFLAGS' |
| 16362 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 16363 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 16364 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu |
| 16365 | |
| 16366 | |
| 16367 | WARN_CFLAGS="" |
| 16368 | if test "x${build_warnings}" != x -a "x$GCC" = xyes |
| 16369 | then |
| 16370 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5 |
| 16371 | $as_echo_n "checking compiler warning flags... " >&6; } |
| 16372 | # Separate out the -Werror flag as some files just cannot be |
| 16373 | # compiled with it enabled. |
| 16374 | for w in ${build_warnings}; do |
| 16375 | # GCC does not complain about -Wno-unknown-warning. Invert |
| 16376 | # and test -Wunknown-warning instead. |
| 16377 | case $w in |
| 16378 | -Wno-*) |
| 16379 | wtest=`echo $w | sed 's/-Wno-/-W/g'` ;; |
| 16380 | -Wformat-nonliteral) |
| 16381 | # gcc requires -Wformat before -Wformat-nonliteral |
| 16382 | # will work, so stick them together. |
| 16383 | w="-Wformat $w" |
| 16384 | wtest="$w" |
| 16385 | ;; |
| 16386 | *) |
| 16387 | wtest=$w ;; |
| 16388 | esac |
| 16389 | |
| 16390 | case $w in |
| 16391 | -Werr*) WERROR_CFLAGS=-Werror ;; |
| 16392 | *) |
| 16393 | # Check whether GCC accepts it. |
| 16394 | saved_CFLAGS="$CFLAGS" |
| 16395 | CFLAGS="$CFLAGS -Werror $wtest" |
| 16396 | saved_CXXFLAGS="$CXXFLAGS" |
| 16397 | CXXFLAGS="$CXXFLAGS -Werror $wtest" |
| 16398 | if test "x$w" = "x-Wunused-variable"; then |
| 16399 | # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958, |
| 16400 | # fixed in GCC 4.9. This test is derived from the gdb |
| 16401 | # source code that triggered this bug in GCC. |
| 16402 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16403 | /* end confdefs.h. */ |
| 16404 | struct scoped_restore_base {}; |
| 16405 | struct scoped_restore_tmpl : public scoped_restore_base { |
| 16406 | ~scoped_restore_tmpl() {} |
| 16407 | }; |
| 16408 | int |
| 16409 | main () |
| 16410 | { |
| 16411 | const scoped_restore_base &b = scoped_restore_tmpl(); |
| 16412 | ; |
| 16413 | return 0; |
| 16414 | } |
| 16415 | _ACEOF |
| 16416 | if ac_fn_cxx_try_compile "$LINENO"; then : |
| 16417 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
| 16418 | fi |
| 16419 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 16420 | else |
| 16421 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16422 | /* end confdefs.h. */ |
| 16423 | |
| 16424 | int |
| 16425 | main () |
| 16426 | { |
| 16427 | |
| 16428 | ; |
| 16429 | return 0; |
| 16430 | } |
| 16431 | _ACEOF |
| 16432 | if ac_fn_cxx_try_compile "$LINENO"; then : |
| 16433 | WARN_CFLAGS="${WARN_CFLAGS} $w" |
| 16434 | fi |
| 16435 | rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext |
| 16436 | fi |
| 16437 | CFLAGS="$saved_CFLAGS" |
| 16438 | CXXFLAGS="$saved_CXXFLAGS" |
| 16439 | esac |
| 16440 | done |
| 16441 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5 |
| 16442 | $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; } |
| 16443 | fi |
| 16444 | |
| 16445 | |
| 16446 | |
| 16447 | ac_ext=c |
| 16448 | ac_cpp='$CPP $CPPFLAGS' |
| 16449 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 16450 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 16451 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 16452 | |
| 16453 | |
| 16454 | |
| 16455 | # Check whether --enable-ubsan was given. |
| 16456 | if test "${enable_ubsan+set}" = set; then : |
| 16457 | enableval=$enable_ubsan; |
| 16458 | else |
| 16459 | enable_ubsan=no |
| 16460 | fi |
| 16461 | |
| 16462 | if test "x$enable_ubsan" = xauto; then |
| 16463 | if $development; then |
| 16464 | enable_ubsan=yes |
| 16465 | fi |
| 16466 | fi |
| 16467 | ac_ext=cpp |
| 16468 | ac_cpp='$CXXCPP $CPPFLAGS' |
| 16469 | ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 16470 | ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 16471 | ac_compiler_gnu=$ac_cv_cxx_compiler_gnu |
| 16472 | |
| 16473 | if test "x$enable_ubsan" = xyes; then |
| 16474 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5 |
| 16475 | $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; } |
| 16476 | saved_CXXFLAGS="$CXXFLAGS" |
| 16477 | CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" |
| 16478 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16479 | /* end confdefs.h. */ |
| 16480 | |
| 16481 | int |
| 16482 | main () |
| 16483 | { |
| 16484 | |
| 16485 | ; |
| 16486 | return 0; |
| 16487 | } |
| 16488 | _ACEOF |
| 16489 | if ac_fn_cxx_try_link "$LINENO"; then : |
| 16490 | enable_ubsan=yes |
| 16491 | else |
| 16492 | enable_ubsan=no |
| 16493 | fi |
| 16494 | rm -f core conftest.err conftest.$ac_objext \ |
| 16495 | conftest$ac_exeext conftest.$ac_ext |
| 16496 | CXXFLAGS="$saved_CXXFLAGS" |
| 16497 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5 |
| 16498 | $as_echo "$enable_ubsan" >&6; } |
| 16499 | if test "x$enable_ubsan" = xyes; then |
| 16500 | WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined" |
| 16501 | CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined" |
| 16502 | fi |
| 16503 | fi |
| 16504 | ac_ext=c |
| 16505 | ac_cpp='$CPP $CPPFLAGS' |
| 16506 | ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' |
| 16507 | ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' |
| 16508 | ac_compiler_gnu=$ac_cv_c_compiler_gnu |
| 16509 | |
| 16510 | |
| 16511 | |
| 16512 | # In the Cygwin environment, we need some additional flags. |
| 16513 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5 |
| 16514 | $as_echo_n "checking for cygwin... " >&6; } |
| 16515 | if ${gdb_cv_os_cygwin+:} false; then : |
| 16516 | $as_echo_n "(cached) " >&6 |
| 16517 | else |
| 16518 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16519 | /* end confdefs.h. */ |
| 16520 | |
| 16521 | #if defined (__CYGWIN__) || defined (__CYGWIN32__) |
| 16522 | lose |
| 16523 | #endif |
| 16524 | _ACEOF |
| 16525 | if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | |
| 16526 | $EGREP "^lose$" >/dev/null 2>&1; then : |
| 16527 | gdb_cv_os_cygwin=yes |
| 16528 | else |
| 16529 | gdb_cv_os_cygwin=no |
| 16530 | fi |
| 16531 | rm -f conftest* |
| 16532 | |
| 16533 | fi |
| 16534 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5 |
| 16535 | $as_echo "$gdb_cv_os_cygwin" >&6; } |
| 16536 | |
| 16537 | |
| 16538 | SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o" |
| 16539 | case ${host} in |
| 16540 | *go32* ) SER_HARDWIRE=ser-go32.o ;; |
| 16541 | *djgpp* ) SER_HARDWIRE=ser-go32.o ;; |
| 16542 | *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;; |
| 16543 | *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;; |
| 16544 | esac |
| 16545 | |
| 16546 | |
| 16547 | # libreadline needs libuser32.a in a cygwin environment |
| 16548 | WIN32LIBS= |
| 16549 | if test x"$gdb_cv_os_cygwin" = xyes; then |
| 16550 | WIN32LIBS="-luser32" |
| 16551 | case "${target}" in |
| 16552 | *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp" |
| 16553 | ;; |
| 16554 | esac |
| 16555 | fi |
| 16556 | |
| 16557 | # The ser-tcp.c module requires sockets. |
| 16558 | # Note that WIN32APILIBS is set by GDB_AC_COMMON. |
| 16559 | WIN32LIBS="$WIN32LIBS $WIN32APILIBS" |
| 16560 | |
| 16561 | # Add ELF support to GDB, but only if BFD includes ELF support. |
| 16562 | |
| 16563 | OLD_CFLAGS=$CFLAGS |
| 16564 | OLD_LDFLAGS=$LDFLAGS |
| 16565 | OLD_LIBS=$LIBS |
| 16566 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS |
| 16567 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We |
| 16568 | # always want our bfd. |
| 16569 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" |
| 16570 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
| 16571 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" |
| 16572 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
| 16573 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
| 16574 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5 |
| 16575 | $as_echo_n "checking for ELF support in BFD... " >&6; } |
| 16576 | if ${gdb_cv_var_elf+:} false; then : |
| 16577 | $as_echo_n "(cached) " >&6 |
| 16578 | else |
| 16579 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16580 | /* end confdefs.h. */ |
| 16581 | #include <stdlib.h> |
| 16582 | #include "bfd.h" |
| 16583 | #include "elf-bfd.h" |
| 16584 | |
| 16585 | int |
| 16586 | main () |
| 16587 | { |
| 16588 | return bfd_get_elf_phdr_upper_bound (NULL); |
| 16589 | ; |
| 16590 | return 0; |
| 16591 | } |
| 16592 | _ACEOF |
| 16593 | if ac_fn_c_try_link "$LINENO"; then : |
| 16594 | gdb_cv_var_elf=yes |
| 16595 | else |
| 16596 | gdb_cv_var_elf=no |
| 16597 | fi |
| 16598 | rm -f core conftest.err conftest.$ac_objext \ |
| 16599 | conftest$ac_exeext conftest.$ac_ext |
| 16600 | fi |
| 16601 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5 |
| 16602 | $as_echo "$gdb_cv_var_elf" >&6; } |
| 16603 | CFLAGS=$OLD_CFLAGS |
| 16604 | LDFLAGS=$OLD_LDFLAGS |
| 16605 | LIBS=$OLD_LIBS |
| 16606 | if test "$gdb_cv_var_elf" = yes; then |
| 16607 | CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o" |
| 16608 | |
| 16609 | $as_echo "#define HAVE_ELF 1" >>confdefs.h |
| 16610 | |
| 16611 | # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>. |
| 16612 | if test "$plugins" = "yes"; then |
| 16613 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 |
| 16614 | $as_echo_n "checking for library containing dlopen... " >&6; } |
| 16615 | if ${ac_cv_search_dlopen+:} false; then : |
| 16616 | $as_echo_n "(cached) " >&6 |
| 16617 | else |
| 16618 | ac_func_search_save_LIBS=$LIBS |
| 16619 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16620 | /* end confdefs.h. */ |
| 16621 | |
| 16622 | /* Override any GCC internal prototype to avoid an error. |
| 16623 | Use char because int might match the return type of a GCC |
| 16624 | builtin and then its argument prototype would still apply. */ |
| 16625 | #ifdef __cplusplus |
| 16626 | extern "C" |
| 16627 | #endif |
| 16628 | char dlopen (); |
| 16629 | int |
| 16630 | main () |
| 16631 | { |
| 16632 | return dlopen (); |
| 16633 | ; |
| 16634 | return 0; |
| 16635 | } |
| 16636 | _ACEOF |
| 16637 | for ac_lib in '' dl; do |
| 16638 | if test -z "$ac_lib"; then |
| 16639 | ac_res="none required" |
| 16640 | else |
| 16641 | ac_res=-l$ac_lib |
| 16642 | LIBS="-l$ac_lib $ac_func_search_save_LIBS" |
| 16643 | fi |
| 16644 | if ac_fn_c_try_link "$LINENO"; then : |
| 16645 | ac_cv_search_dlopen=$ac_res |
| 16646 | fi |
| 16647 | rm -f core conftest.err conftest.$ac_objext \ |
| 16648 | conftest$ac_exeext |
| 16649 | if ${ac_cv_search_dlopen+:} false; then : |
| 16650 | break |
| 16651 | fi |
| 16652 | done |
| 16653 | if ${ac_cv_search_dlopen+:} false; then : |
| 16654 | |
| 16655 | else |
| 16656 | ac_cv_search_dlopen=no |
| 16657 | fi |
| 16658 | rm conftest.$ac_ext |
| 16659 | LIBS=$ac_func_search_save_LIBS |
| 16660 | fi |
| 16661 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 |
| 16662 | $as_echo "$ac_cv_search_dlopen" >&6; } |
| 16663 | ac_res=$ac_cv_search_dlopen |
| 16664 | if test "$ac_res" != no; then : |
| 16665 | test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" |
| 16666 | |
| 16667 | fi |
| 16668 | |
| 16669 | fi |
| 16670 | fi |
| 16671 | |
| 16672 | # Add macho support to GDB, but only if BFD includes it. |
| 16673 | |
| 16674 | OLD_CFLAGS=$CFLAGS |
| 16675 | OLD_LDFLAGS=$LDFLAGS |
| 16676 | OLD_LIBS=$LIBS |
| 16677 | # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS |
| 16678 | # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We |
| 16679 | # always want our bfd. |
| 16680 | CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS" |
| 16681 | ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'` |
| 16682 | LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS" |
| 16683 | intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'` |
| 16684 | LIBS="-lbfd -liberty -lz $intl $LIBS" |
| 16685 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5 |
| 16686 | $as_echo_n "checking for Mach-O support in BFD... " >&6; } |
| 16687 | if ${gdb_cv_var_macho+:} false; then : |
| 16688 | $as_echo_n "(cached) " >&6 |
| 16689 | else |
| 16690 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 16691 | /* end confdefs.h. */ |
| 16692 | #include <stdlib.h> |
| 16693 | #include "bfd.h" |
| 16694 | #include "mach-o.h" |
| 16695 | |
| 16696 | int |
| 16697 | main () |
| 16698 | { |
| 16699 | return bfd_mach_o_lookup_command (NULL, 0, NULL); |
| 16700 | ; |
| 16701 | return 0; |
| 16702 | } |
| 16703 | _ACEOF |
| 16704 | if ac_fn_c_try_link "$LINENO"; then : |
| 16705 | gdb_cv_var_macho=yes |
| 16706 | else |
| 16707 | gdb_cv_var_macho=no |
| 16708 | fi |
| 16709 | rm -f core conftest.err conftest.$ac_objext \ |
| 16710 | conftest$ac_exeext conftest.$ac_ext |
| 16711 | fi |
| 16712 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5 |
| 16713 | $as_echo "$gdb_cv_var_macho" >&6; } |
| 16714 | CFLAGS=$OLD_CFLAGS |
| 16715 | LDFLAGS=$OLD_LDFLAGS |
| 16716 | LIBS=$OLD_LIBS |
| 16717 | if test "$gdb_cv_var_macho" = yes; then |
| 16718 | CONFIG_OBS="$CONFIG_OBS machoread.o" |
| 16719 | fi |
| 16720 | |
| 16721 | # Add any host-specific objects to GDB. |
| 16722 | CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}" |
| 16723 | |
| 16724 | # If building on ELF, look for lzma support for embedded compressed debug info. |
| 16725 | if test "$gdb_cv_var_elf" = yes; then |
| 16726 | |
| 16727 | # Check whether --with-lzma was given. |
| 16728 | if test "${with_lzma+set}" = set; then : |
| 16729 | withval=$with_lzma; |
| 16730 | else |
| 16731 | with_lzma=auto |
| 16732 | fi |
| 16733 | |
| 16734 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5 |
| 16735 | $as_echo_n "checking whether to use lzma... " >&6; } |
| 16736 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5 |
| 16737 | $as_echo "$with_lzma" >&6; } |
| 16738 | |
| 16739 | if test "${with_lzma}" != no; then |
| 16740 | |
| 16741 | |
| 16742 | |
| 16743 | |
| 16744 | |
| 16745 | |
| 16746 | |
| 16747 | |
| 16748 | use_additional=yes |
| 16749 | |
| 16750 | acl_save_prefix="$prefix" |
| 16751 | prefix="$acl_final_prefix" |
| 16752 | acl_save_exec_prefix="$exec_prefix" |
| 16753 | exec_prefix="$acl_final_exec_prefix" |
| 16754 | |
| 16755 | eval additional_includedir=\"$includedir\" |
| 16756 | eval additional_libdir=\"$libdir\" |
| 16757 | |
| 16758 | exec_prefix="$acl_save_exec_prefix" |
| 16759 | prefix="$acl_save_prefix" |
| 16760 | |
| 16761 | |
| 16762 | # Check whether --with-liblzma-prefix was given. |
| 16763 | if test "${with_liblzma_prefix+set}" = set; then : |
| 16764 | withval=$with_liblzma_prefix; |
| 16765 | if test "X$withval" = "Xno"; then |
| 16766 | use_additional=no |
| 16767 | else |
| 16768 | if test "X$withval" = "X"; then |
| 16769 | |
| 16770 | acl_save_prefix="$prefix" |
| 16771 | prefix="$acl_final_prefix" |
| 16772 | acl_save_exec_prefix="$exec_prefix" |
| 16773 | exec_prefix="$acl_final_exec_prefix" |
| 16774 | |
| 16775 | eval additional_includedir=\"$includedir\" |
| 16776 | eval additional_libdir=\"$libdir\" |
| 16777 | |
| 16778 | exec_prefix="$acl_save_exec_prefix" |
| 16779 | prefix="$acl_save_prefix" |
| 16780 | |
| 16781 | else |
| 16782 | additional_includedir="$withval/include" |
| 16783 | additional_libdir="$withval/lib" |
| 16784 | fi |
| 16785 | fi |
| 16786 | |
| 16787 | fi |
| 16788 | |
| 16789 | |
| 16790 | # Check whether --with-liblzma-type was given. |
| 16791 | if test "${with_liblzma_type+set}" = set; then : |
| 16792 | withval=$with_liblzma_type; with_liblzma_type=$withval |
| 16793 | else |
| 16794 | with_liblzma_type=auto |
| 16795 | fi |
| 16796 | |
| 16797 | lib_type=`eval echo \$with_liblzma_type` |
| 16798 | |
| 16799 | LIBLZMA= |
| 16800 | LTLIBLZMA= |
| 16801 | INCLZMA= |
| 16802 | rpathdirs= |
| 16803 | ltrpathdirs= |
| 16804 | names_already_handled= |
| 16805 | names_next_round='lzma ' |
| 16806 | while test -n "$names_next_round"; do |
| 16807 | names_this_round="$names_next_round" |
| 16808 | names_next_round= |
| 16809 | for name in $names_this_round; do |
| 16810 | already_handled= |
| 16811 | for n in $names_already_handled; do |
| 16812 | if test "$n" = "$name"; then |
| 16813 | already_handled=yes |
| 16814 | break |
| 16815 | fi |
| 16816 | done |
| 16817 | if test -z "$already_handled"; then |
| 16818 | names_already_handled="$names_already_handled $name" |
| 16819 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` |
| 16820 | eval value=\"\$HAVE_LIB$uppername\" |
| 16821 | if test -n "$value"; then |
| 16822 | if test "$value" = yes; then |
| 16823 | eval value=\"\$LIB$uppername\" |
| 16824 | test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value" |
| 16825 | eval value=\"\$LTLIB$uppername\" |
| 16826 | test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value" |
| 16827 | else |
| 16828 | : |
| 16829 | fi |
| 16830 | else |
| 16831 | found_dir= |
| 16832 | found_la= |
| 16833 | found_so= |
| 16834 | found_a= |
| 16835 | if test $use_additional = yes; then |
| 16836 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
| 16837 | found_dir="$additional_libdir" |
| 16838 | found_so="$additional_libdir/lib$name.$shlibext" |
| 16839 | if test -f "$additional_libdir/lib$name.la"; then |
| 16840 | found_la="$additional_libdir/lib$name.la" |
| 16841 | fi |
| 16842 | elif test x$lib_type != xshared; then |
| 16843 | if test -f "$additional_libdir/lib$name.$libext"; then |
| 16844 | found_dir="$additional_libdir" |
| 16845 | found_a="$additional_libdir/lib$name.$libext" |
| 16846 | if test -f "$additional_libdir/lib$name.la"; then |
| 16847 | found_la="$additional_libdir/lib$name.la" |
| 16848 | fi |
| 16849 | fi |
| 16850 | fi |
| 16851 | fi |
| 16852 | if test "X$found_dir" = "X"; then |
| 16853 | for x in $LDFLAGS $LTLIBLZMA; do |
| 16854 | |
| 16855 | acl_save_prefix="$prefix" |
| 16856 | prefix="$acl_final_prefix" |
| 16857 | acl_save_exec_prefix="$exec_prefix" |
| 16858 | exec_prefix="$acl_final_exec_prefix" |
| 16859 | eval x=\"$x\" |
| 16860 | exec_prefix="$acl_save_exec_prefix" |
| 16861 | prefix="$acl_save_prefix" |
| 16862 | |
| 16863 | case "$x" in |
| 16864 | -L*) |
| 16865 | dir=`echo "X$x" | sed -e 's/^X-L//'` |
| 16866 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
| 16867 | found_dir="$dir" |
| 16868 | found_so="$dir/lib$name.$shlibext" |
| 16869 | if test -f "$dir/lib$name.la"; then |
| 16870 | found_la="$dir/lib$name.la" |
| 16871 | fi |
| 16872 | elif test x$lib_type != xshared; then |
| 16873 | if test -f "$dir/lib$name.$libext"; then |
| 16874 | found_dir="$dir" |
| 16875 | found_a="$dir/lib$name.$libext" |
| 16876 | if test -f "$dir/lib$name.la"; then |
| 16877 | found_la="$dir/lib$name.la" |
| 16878 | fi |
| 16879 | fi |
| 16880 | fi |
| 16881 | ;; |
| 16882 | esac |
| 16883 | if test "X$found_dir" != "X"; then |
| 16884 | break |
| 16885 | fi |
| 16886 | done |
| 16887 | fi |
| 16888 | if test "X$found_dir" != "X"; then |
| 16889 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name" |
| 16890 | if test "X$found_so" != "X"; then |
| 16891 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then |
| 16892 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" |
| 16893 | else |
| 16894 | haveit= |
| 16895 | for x in $ltrpathdirs; do |
| 16896 | if test "X$x" = "X$found_dir"; then |
| 16897 | haveit=yes |
| 16898 | break |
| 16899 | fi |
| 16900 | done |
| 16901 | if test -z "$haveit"; then |
| 16902 | ltrpathdirs="$ltrpathdirs $found_dir" |
| 16903 | fi |
| 16904 | if test "$hardcode_direct" = yes; then |
| 16905 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" |
| 16906 | else |
| 16907 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then |
| 16908 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" |
| 16909 | haveit= |
| 16910 | for x in $rpathdirs; do |
| 16911 | if test "X$x" = "X$found_dir"; then |
| 16912 | haveit=yes |
| 16913 | break |
| 16914 | fi |
| 16915 | done |
| 16916 | if test -z "$haveit"; then |
| 16917 | rpathdirs="$rpathdirs $found_dir" |
| 16918 | fi |
| 16919 | else |
| 16920 | haveit= |
| 16921 | for x in $LDFLAGS $LIBLZMA; do |
| 16922 | |
| 16923 | acl_save_prefix="$prefix" |
| 16924 | prefix="$acl_final_prefix" |
| 16925 | acl_save_exec_prefix="$exec_prefix" |
| 16926 | exec_prefix="$acl_final_exec_prefix" |
| 16927 | eval x=\"$x\" |
| 16928 | exec_prefix="$acl_save_exec_prefix" |
| 16929 | prefix="$acl_save_prefix" |
| 16930 | |
| 16931 | if test "X$x" = "X-L$found_dir"; then |
| 16932 | haveit=yes |
| 16933 | break |
| 16934 | fi |
| 16935 | done |
| 16936 | if test -z "$haveit"; then |
| 16937 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir" |
| 16938 | fi |
| 16939 | if test "$hardcode_minus_L" != no; then |
| 16940 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so" |
| 16941 | else |
| 16942 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" |
| 16943 | fi |
| 16944 | fi |
| 16945 | fi |
| 16946 | fi |
| 16947 | else |
| 16948 | if test "X$found_a" != "X"; then |
| 16949 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a" |
| 16950 | else |
| 16951 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name" |
| 16952 | fi |
| 16953 | fi |
| 16954 | additional_includedir= |
| 16955 | case "$found_dir" in |
| 16956 | */lib | */lib/) |
| 16957 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` |
| 16958 | additional_includedir="$basedir/include" |
| 16959 | ;; |
| 16960 | esac |
| 16961 | if test "X$additional_includedir" != "X"; then |
| 16962 | if test "X$additional_includedir" != "X/usr/include"; then |
| 16963 | haveit= |
| 16964 | if test "X$additional_includedir" = "X/usr/local/include"; then |
| 16965 | if test -n "$GCC"; then |
| 16966 | case $host_os in |
| 16967 | linux*) haveit=yes;; |
| 16968 | esac |
| 16969 | fi |
| 16970 | fi |
| 16971 | if test -z "$haveit"; then |
| 16972 | for x in $CPPFLAGS $INCLZMA; do |
| 16973 | |
| 16974 | acl_save_prefix="$prefix" |
| 16975 | prefix="$acl_final_prefix" |
| 16976 | acl_save_exec_prefix="$exec_prefix" |
| 16977 | exec_prefix="$acl_final_exec_prefix" |
| 16978 | eval x=\"$x\" |
| 16979 | exec_prefix="$acl_save_exec_prefix" |
| 16980 | prefix="$acl_save_prefix" |
| 16981 | |
| 16982 | if test "X$x" = "X-I$additional_includedir"; then |
| 16983 | haveit=yes |
| 16984 | break |
| 16985 | fi |
| 16986 | done |
| 16987 | if test -z "$haveit"; then |
| 16988 | if test -d "$additional_includedir"; then |
| 16989 | INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir" |
| 16990 | fi |
| 16991 | fi |
| 16992 | fi |
| 16993 | fi |
| 16994 | fi |
| 16995 | if test -n "$found_la"; then |
| 16996 | save_libdir="$libdir" |
| 16997 | case "$found_la" in |
| 16998 | */* | *\\*) . "$found_la" ;; |
| 16999 | *) . "./$found_la" ;; |
| 17000 | esac |
| 17001 | libdir="$save_libdir" |
| 17002 | for dep in $dependency_libs; do |
| 17003 | case "$dep" in |
| 17004 | -L*) |
| 17005 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` |
| 17006 | if test "X$additional_libdir" != "X/usr/lib"; then |
| 17007 | haveit= |
| 17008 | if test "X$additional_libdir" = "X/usr/local/lib"; then |
| 17009 | if test -n "$GCC"; then |
| 17010 | case $host_os in |
| 17011 | linux*) haveit=yes;; |
| 17012 | esac |
| 17013 | fi |
| 17014 | fi |
| 17015 | if test -z "$haveit"; then |
| 17016 | haveit= |
| 17017 | for x in $LDFLAGS $LIBLZMA; do |
| 17018 | |
| 17019 | acl_save_prefix="$prefix" |
| 17020 | prefix="$acl_final_prefix" |
| 17021 | acl_save_exec_prefix="$exec_prefix" |
| 17022 | exec_prefix="$acl_final_exec_prefix" |
| 17023 | eval x=\"$x\" |
| 17024 | exec_prefix="$acl_save_exec_prefix" |
| 17025 | prefix="$acl_save_prefix" |
| 17026 | |
| 17027 | if test "X$x" = "X-L$additional_libdir"; then |
| 17028 | haveit=yes |
| 17029 | break |
| 17030 | fi |
| 17031 | done |
| 17032 | if test -z "$haveit"; then |
| 17033 | if test -d "$additional_libdir"; then |
| 17034 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir" |
| 17035 | fi |
| 17036 | fi |
| 17037 | haveit= |
| 17038 | for x in $LDFLAGS $LTLIBLZMA; do |
| 17039 | |
| 17040 | acl_save_prefix="$prefix" |
| 17041 | prefix="$acl_final_prefix" |
| 17042 | acl_save_exec_prefix="$exec_prefix" |
| 17043 | exec_prefix="$acl_final_exec_prefix" |
| 17044 | eval x=\"$x\" |
| 17045 | exec_prefix="$acl_save_exec_prefix" |
| 17046 | prefix="$acl_save_prefix" |
| 17047 | |
| 17048 | if test "X$x" = "X-L$additional_libdir"; then |
| 17049 | haveit=yes |
| 17050 | break |
| 17051 | fi |
| 17052 | done |
| 17053 | if test -z "$haveit"; then |
| 17054 | if test -d "$additional_libdir"; then |
| 17055 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir" |
| 17056 | fi |
| 17057 | fi |
| 17058 | fi |
| 17059 | fi |
| 17060 | ;; |
| 17061 | -R*) |
| 17062 | dir=`echo "X$dep" | sed -e 's/^X-R//'` |
| 17063 | if test "$enable_rpath" != no; then |
| 17064 | haveit= |
| 17065 | for x in $rpathdirs; do |
| 17066 | if test "X$x" = "X$dir"; then |
| 17067 | haveit=yes |
| 17068 | break |
| 17069 | fi |
| 17070 | done |
| 17071 | if test -z "$haveit"; then |
| 17072 | rpathdirs="$rpathdirs $dir" |
| 17073 | fi |
| 17074 | haveit= |
| 17075 | for x in $ltrpathdirs; do |
| 17076 | if test "X$x" = "X$dir"; then |
| 17077 | haveit=yes |
| 17078 | break |
| 17079 | fi |
| 17080 | done |
| 17081 | if test -z "$haveit"; then |
| 17082 | ltrpathdirs="$ltrpathdirs $dir" |
| 17083 | fi |
| 17084 | fi |
| 17085 | ;; |
| 17086 | -l*) |
| 17087 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` |
| 17088 | ;; |
| 17089 | *.la) |
| 17090 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` |
| 17091 | ;; |
| 17092 | *) |
| 17093 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep" |
| 17094 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep" |
| 17095 | ;; |
| 17096 | esac |
| 17097 | done |
| 17098 | fi |
| 17099 | else |
| 17100 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
| 17101 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name" |
| 17102 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name" |
| 17103 | else |
| 17104 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l:lib$name.$libext" |
| 17105 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l:lib$name.$libext" |
| 17106 | fi |
| 17107 | fi |
| 17108 | fi |
| 17109 | fi |
| 17110 | done |
| 17111 | done |
| 17112 | if test "X$rpathdirs" != "X"; then |
| 17113 | if test -n "$hardcode_libdir_separator"; then |
| 17114 | alldirs= |
| 17115 | for found_dir in $rpathdirs; do |
| 17116 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" |
| 17117 | done |
| 17118 | acl_save_libdir="$libdir" |
| 17119 | libdir="$alldirs" |
| 17120 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 17121 | libdir="$acl_save_libdir" |
| 17122 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" |
| 17123 | else |
| 17124 | for found_dir in $rpathdirs; do |
| 17125 | acl_save_libdir="$libdir" |
| 17126 | libdir="$found_dir" |
| 17127 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 17128 | libdir="$acl_save_libdir" |
| 17129 | LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag" |
| 17130 | done |
| 17131 | fi |
| 17132 | fi |
| 17133 | if test "X$ltrpathdirs" != "X"; then |
| 17134 | for found_dir in $ltrpathdirs; do |
| 17135 | LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir" |
| 17136 | done |
| 17137 | fi |
| 17138 | |
| 17139 | |
| 17140 | ac_save_CPPFLAGS="$CPPFLAGS" |
| 17141 | |
| 17142 | for element in $INCLZMA; do |
| 17143 | haveit= |
| 17144 | for x in $CPPFLAGS; do |
| 17145 | |
| 17146 | acl_save_prefix="$prefix" |
| 17147 | prefix="$acl_final_prefix" |
| 17148 | acl_save_exec_prefix="$exec_prefix" |
| 17149 | exec_prefix="$acl_final_exec_prefix" |
| 17150 | eval x=\"$x\" |
| 17151 | exec_prefix="$acl_save_exec_prefix" |
| 17152 | prefix="$acl_save_prefix" |
| 17153 | |
| 17154 | if test "X$x" = "X$element"; then |
| 17155 | haveit=yes |
| 17156 | break |
| 17157 | fi |
| 17158 | done |
| 17159 | if test -z "$haveit"; then |
| 17160 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" |
| 17161 | fi |
| 17162 | done |
| 17163 | |
| 17164 | |
| 17165 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5 |
| 17166 | $as_echo_n "checking for liblzma... " >&6; } |
| 17167 | if ${ac_cv_liblzma+:} false; then : |
| 17168 | $as_echo_n "(cached) " >&6 |
| 17169 | else |
| 17170 | |
| 17171 | ac_save_LIBS="$LIBS" |
| 17172 | LIBS="$LIBS $LIBLZMA" |
| 17173 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 17174 | /* end confdefs.h. */ |
| 17175 | #include "lzma.h" |
| 17176 | int |
| 17177 | main () |
| 17178 | { |
| 17179 | lzma_index_iter iter; |
| 17180 | lzma_index_iter_init (&iter, 0); |
| 17181 | lzma_mf_is_supported (LZMA_MF_HC3); |
| 17182 | ; |
| 17183 | return 0; |
| 17184 | } |
| 17185 | _ACEOF |
| 17186 | if ac_fn_c_try_link "$LINENO"; then : |
| 17187 | ac_cv_liblzma=yes |
| 17188 | else |
| 17189 | ac_cv_liblzma=no |
| 17190 | fi |
| 17191 | rm -f core conftest.err conftest.$ac_objext \ |
| 17192 | conftest$ac_exeext conftest.$ac_ext |
| 17193 | LIBS="$ac_save_LIBS" |
| 17194 | |
| 17195 | fi |
| 17196 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5 |
| 17197 | $as_echo "$ac_cv_liblzma" >&6; } |
| 17198 | if test "$ac_cv_liblzma" = yes; then |
| 17199 | HAVE_LIBLZMA=yes |
| 17200 | |
| 17201 | $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h |
| 17202 | |
| 17203 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5 |
| 17204 | $as_echo_n "checking how to link with liblzma... " >&6; } |
| 17205 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5 |
| 17206 | $as_echo "$LIBLZMA" >&6; } |
| 17207 | else |
| 17208 | HAVE_LIBLZMA=no |
| 17209 | CPPFLAGS="$ac_save_CPPFLAGS" |
| 17210 | LIBLZMA= |
| 17211 | LTLIBLZMA= |
| 17212 | fi |
| 17213 | |
| 17214 | |
| 17215 | |
| 17216 | |
| 17217 | |
| 17218 | |
| 17219 | if test "$HAVE_LIBLZMA" != yes; then |
| 17220 | if test "$with_lzma" = yes; then |
| 17221 | as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5 |
| 17222 | fi |
| 17223 | fi |
| 17224 | fi |
| 17225 | fi |
| 17226 | |
| 17227 | LIBGUI="../libgui/src/libgui.a" |
| 17228 | GUI_CFLAGS_X="-I${srcdir}/../libgui/src" |
| 17229 | |
| 17230 | |
| 17231 | |
| 17232 | WIN32LDAPP= |
| 17233 | |
| 17234 | |
| 17235 | |
| 17236 | case "${host}" in |
| 17237 | *-*-cygwin* | *-*-mingw* ) |
| 17238 | configdir="win" |
| 17239 | ;; |
| 17240 | *) |
| 17241 | configdir="unix" |
| 17242 | ;; |
| 17243 | esac |
| 17244 | |
| 17245 | GDBTKLIBS= |
| 17246 | if test "${enable_gdbtk}" = "yes"; then |
| 17247 | |
| 17248 | # Gdbtk must have an absolute path to srcdir in order to run |
| 17249 | # properly when not installed. |
| 17250 | here=`pwd` |
| 17251 | cd ${srcdir} |
| 17252 | GDBTK_SRC_DIR=`pwd` |
| 17253 | cd $here |
| 17254 | |
| 17255 | |
| 17256 | # |
| 17257 | # Ok, lets find the tcl configuration |
| 17258 | # First, look for one uninstalled. |
| 17259 | # the alternative search directory is invoked by --with-tcl |
| 17260 | # |
| 17261 | |
| 17262 | if test x"${no_tcl}" = x ; then |
| 17263 | # we reset no_tcl in case something fails here |
| 17264 | no_tcl=true |
| 17265 | |
| 17266 | # Check whether --with-tcl was given. |
| 17267 | if test "${with_tcl+set}" = set; then : |
| 17268 | withval=$with_tcl; with_tclconfig=${withval} |
| 17269 | fi |
| 17270 | |
| 17271 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5 |
| 17272 | $as_echo_n "checking for Tcl configuration... " >&6; } |
| 17273 | if ${ac_cv_c_tclconfig+:} false; then : |
| 17274 | $as_echo_n "(cached) " >&6 |
| 17275 | else |
| 17276 | |
| 17277 | |
| 17278 | # First check to see if --with-tcl was specified. |
| 17279 | case "${host}" in |
| 17280 | *-*-cygwin*) platDir="win" ;; |
| 17281 | *) platDir="unix" ;; |
| 17282 | esac |
| 17283 | if test x"${with_tclconfig}" != x ; then |
| 17284 | if test -f "${with_tclconfig}/tclConfig.sh" ; then |
| 17285 | ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)` |
| 17286 | else |
| 17287 | as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5 |
| 17288 | fi |
| 17289 | fi |
| 17290 | |
| 17291 | # then check for a private Tcl installation |
| 17292 | if test x"${ac_cv_c_tclconfig}" = x ; then |
| 17293 | for i in \ |
| 17294 | ../tcl \ |
| 17295 | `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ |
| 17296 | `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \ |
| 17297 | `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \ |
| 17298 | ../../tcl \ |
| 17299 | `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ |
| 17300 | `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \ |
| 17301 | `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \ |
| 17302 | ../../../tcl \ |
| 17303 | `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ |
| 17304 | `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \ |
| 17305 | `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do |
| 17306 | if test -f "$i/$platDir/tclConfig.sh" ; then |
| 17307 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` |
| 17308 | break |
| 17309 | fi |
| 17310 | done |
| 17311 | fi |
| 17312 | |
| 17313 | # on Darwin, check in Framework installation locations |
| 17314 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then |
| 17315 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ |
| 17316 | `ls -d /Library/Frameworks 2>/dev/null` \ |
| 17317 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ |
| 17318 | `ls -d /System/Library/Frameworks 2>/dev/null` \ |
| 17319 | ; do |
| 17320 | if test -f "$i/Tcl.framework/tclConfig.sh" ; then |
| 17321 | ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)` |
| 17322 | break |
| 17323 | fi |
| 17324 | done |
| 17325 | fi |
| 17326 | |
| 17327 | # check in a few common install locations |
| 17328 | if test x"${ac_cv_c_tclconfig}" = x ; then |
| 17329 | for i in `ls -d ${libdir} 2>/dev/null` \ |
| 17330 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ |
| 17331 | `ls -d ${prefix}/lib 2>/dev/null` \ |
| 17332 | `ls -d /usr/local/lib 2>/dev/null` \ |
| 17333 | `ls -d /usr/contrib/lib 2>/dev/null` \ |
| 17334 | `ls -d /usr/lib 2>/dev/null` \ |
| 17335 | ; do |
| 17336 | if test -f "$i/tclConfig.sh" ; then |
| 17337 | ac_cv_c_tclconfig=`(cd $i; pwd)` |
| 17338 | break |
| 17339 | fi |
| 17340 | done |
| 17341 | fi |
| 17342 | |
| 17343 | # check in a few other private locations |
| 17344 | if test x"${ac_cv_c_tclconfig}" = x ; then |
| 17345 | for i in \ |
| 17346 | ${srcdir}/../tcl \ |
| 17347 | `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \ |
| 17348 | `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \ |
| 17349 | `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do |
| 17350 | if test -f "$i/$platDir/tclConfig.sh" ; then |
| 17351 | ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)` |
| 17352 | break |
| 17353 | fi |
| 17354 | done |
| 17355 | fi |
| 17356 | |
| 17357 | fi |
| 17358 | |
| 17359 | |
| 17360 | if test x"${ac_cv_c_tclconfig}" = x ; then |
| 17361 | TCL_BIN_DIR="# no Tcl configs found" |
| 17362 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5 |
| 17363 | $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;} |
| 17364 | else |
| 17365 | no_tcl= |
| 17366 | TCL_BIN_DIR=${ac_cv_c_tclconfig} |
| 17367 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
| 17368 | $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; } |
| 17369 | fi |
| 17370 | fi |
| 17371 | |
| 17372 | |
| 17373 | # If $no_tk is nonempty, then we can't do Tk, and there is no |
| 17374 | # point to doing Tcl. |
| 17375 | |
| 17376 | # |
| 17377 | # Ok, lets find the tk configuration |
| 17378 | # First, look for one uninstalled. |
| 17379 | # the alternative search directory is invoked by --with-tk |
| 17380 | # |
| 17381 | |
| 17382 | if test x"${no_tk}" = x ; then |
| 17383 | # we reset no_tk in case something fails here |
| 17384 | no_tk=true |
| 17385 | |
| 17386 | # Check whether --with-tk was given. |
| 17387 | if test "${with_tk+set}" = set; then : |
| 17388 | withval=$with_tk; with_tkconfig=${withval} |
| 17389 | fi |
| 17390 | |
| 17391 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5 |
| 17392 | $as_echo_n "checking for Tk configuration... " >&6; } |
| 17393 | if ${ac_cv_c_tkconfig+:} false; then : |
| 17394 | $as_echo_n "(cached) " >&6 |
| 17395 | else |
| 17396 | |
| 17397 | |
| 17398 | # First check to see if --with-tkconfig was specified. |
| 17399 | if test x"${with_tkconfig}" != x ; then |
| 17400 | if test -f "${with_tkconfig}/tkConfig.sh" ; then |
| 17401 | ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)` |
| 17402 | else |
| 17403 | as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5 |
| 17404 | fi |
| 17405 | fi |
| 17406 | |
| 17407 | # then check for a private Tk library |
| 17408 | case "${host}" in |
| 17409 | *-*-cygwin*) platDir="win" ;; |
| 17410 | *) platDir="unix" ;; |
| 17411 | esac |
| 17412 | if test x"${ac_cv_c_tkconfig}" = x ; then |
| 17413 | for i in \ |
| 17414 | ../tk \ |
| 17415 | `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ |
| 17416 | `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \ |
| 17417 | `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \ |
| 17418 | ../../tk \ |
| 17419 | `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ |
| 17420 | `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \ |
| 17421 | `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \ |
| 17422 | ../../../tk \ |
| 17423 | `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ |
| 17424 | `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \ |
| 17425 | `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do |
| 17426 | if test -f "$i/$platDir/tkConfig.sh" ; then |
| 17427 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` |
| 17428 | break |
| 17429 | fi |
| 17430 | done |
| 17431 | fi |
| 17432 | |
| 17433 | # on Darwin, check in Framework installation locations |
| 17434 | if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then |
| 17435 | for i in `ls -d ~/Library/Frameworks 2>/dev/null` \ |
| 17436 | `ls -d /Library/Frameworks 2>/dev/null` \ |
| 17437 | `ls -d /Network/Library/Frameworks 2>/dev/null` \ |
| 17438 | `ls -d /System/Library/Frameworks 2>/dev/null` \ |
| 17439 | ; do |
| 17440 | if test -f "$i/Tk.framework/tkConfig.sh" ; then |
| 17441 | ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)` |
| 17442 | break |
| 17443 | fi |
| 17444 | done |
| 17445 | fi |
| 17446 | |
| 17447 | # check in a few common install locations |
| 17448 | if test x"${ac_cv_c_tkconfig}" = x ; then |
| 17449 | for i in `ls -d ${libdir} 2>/dev/null` \ |
| 17450 | `ls -d ${exec_prefix}/lib 2>/dev/null` \ |
| 17451 | `ls -d ${prefix}/lib 2>/dev/null` \ |
| 17452 | `ls -d /usr/local/lib 2>/dev/null` \ |
| 17453 | `ls -d /usr/contrib/lib 2>/dev/null` \ |
| 17454 | `ls -d /usr/lib 2>/dev/null` \ |
| 17455 | ; do |
| 17456 | if test -f "$i/tkConfig.sh" ; then |
| 17457 | ac_cv_c_tkconfig=`(cd $i; pwd)` |
| 17458 | break |
| 17459 | fi |
| 17460 | done |
| 17461 | fi |
| 17462 | # check in a few other private locations |
| 17463 | if test x"${ac_cv_c_tkconfig}" = x ; then |
| 17464 | for i in \ |
| 17465 | ${srcdir}/../tk \ |
| 17466 | `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \ |
| 17467 | `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \ |
| 17468 | `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do |
| 17469 | if test -f "$i/$platDir/tkConfig.sh" ; then |
| 17470 | ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)` |
| 17471 | break |
| 17472 | fi |
| 17473 | done |
| 17474 | fi |
| 17475 | |
| 17476 | fi |
| 17477 | |
| 17478 | |
| 17479 | if test x"${ac_cv_c_tkconfig}" = x ; then |
| 17480 | TK_BIN_DIR="# no Tk configs found" |
| 17481 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5 |
| 17482 | $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;} |
| 17483 | else |
| 17484 | no_tk= |
| 17485 | TK_BIN_DIR=${ac_cv_c_tkconfig} |
| 17486 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5 |
| 17487 | $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; } |
| 17488 | fi |
| 17489 | fi |
| 17490 | |
| 17491 | |
| 17492 | if test -z "${no_tcl}" -a -z "${no_tk}"; then |
| 17493 | |
| 17494 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
| 17495 | $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; } |
| 17496 | |
| 17497 | if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then |
| 17498 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
| 17499 | $as_echo "loading" >&6; } |
| 17500 | . ${TCL_BIN_DIR}/tclConfig.sh |
| 17501 | else |
| 17502 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5 |
| 17503 | $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; } |
| 17504 | fi |
| 17505 | |
| 17506 | # eval is required to do the TCL_DBGX substitution |
| 17507 | eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\"" |
| 17508 | eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\"" |
| 17509 | |
| 17510 | # If the TCL_BIN_DIR is the build directory (not the install directory), |
| 17511 | # then set the common variable name to the value of the build variables. |
| 17512 | # For example, the variable TCL_LIB_SPEC will be set to the value |
| 17513 | # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC |
| 17514 | # instead of TCL_BUILD_LIB_SPEC since it will work with both an |
| 17515 | # installed and uninstalled version of Tcl. |
| 17516 | if test -f "${TCL_BIN_DIR}/Makefile" ; then |
| 17517 | TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC} |
| 17518 | TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC} |
| 17519 | TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH} |
| 17520 | elif test "`uname -s`" = "Darwin"; then |
| 17521 | # If Tcl was built as a framework, attempt to use the libraries |
| 17522 | # from the framework at the given location so that linking works |
| 17523 | # against Tcl.framework installed in an arbitrary location. |
| 17524 | case ${TCL_DEFS} in |
| 17525 | *TCL_FRAMEWORK*) |
| 17526 | if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then |
| 17527 | for i in "`cd ${TCL_BIN_DIR}; pwd`" \ |
| 17528 | "`cd ${TCL_BIN_DIR}/../..; pwd`"; do |
| 17529 | if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then |
| 17530 | TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}" |
| 17531 | break |
| 17532 | fi |
| 17533 | done |
| 17534 | fi |
| 17535 | if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then |
| 17536 | TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}" |
| 17537 | TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}" |
| 17538 | fi |
| 17539 | ;; |
| 17540 | esac |
| 17541 | fi |
| 17542 | |
| 17543 | # eval is required to do the TCL_DBGX substitution |
| 17544 | eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\"" |
| 17545 | eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\"" |
| 17546 | eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\"" |
| 17547 | eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\"" |
| 17548 | |
| 17549 | |
| 17550 | |
| 17551 | |
| 17552 | |
| 17553 | |
| 17554 | |
| 17555 | |
| 17556 | |
| 17557 | |
| 17558 | |
| 17559 | |
| 17560 | |
| 17561 | |
| 17562 | |
| 17563 | # Check for in-tree tcl |
| 17564 | here=`pwd` |
| 17565 | cd ${srcdir}/.. |
| 17566 | topdir=`pwd` |
| 17567 | cd ${here} |
| 17568 | |
| 17569 | intree="no" |
| 17570 | if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then |
| 17571 | intree="yes" |
| 17572 | fi |
| 17573 | |
| 17574 | # Find Tcl private headers |
| 17575 | if test x"${intree}" = xno; then |
| 17576 | |
| 17577 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5 |
| 17578 | $as_echo_n "checking for Tcl private headers... " >&6; } |
| 17579 | private_dir="" |
| 17580 | dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//` |
| 17581 | if test -f ${dir}/tclInt.h ; then |
| 17582 | private_dir=${dir} |
| 17583 | fi |
| 17584 | |
| 17585 | if test x"${private_dir}" = x; then |
| 17586 | as_fn_error $? "could not find private Tcl headers" "$LINENO" 5 |
| 17587 | else |
| 17588 | TCL_PRIVATE_INCLUDE="-I${private_dir}" |
| 17589 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
| 17590 | $as_echo "${private_dir}" >&6; } |
| 17591 | fi |
| 17592 | |
| 17593 | TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}" |
| 17594 | TCL_LIBRARY="${TCL_LIB_SPEC}" |
| 17595 | TCL_DEPS="" |
| 17596 | else |
| 17597 | # If building tcl in the same src tree, private headers |
| 17598 | # are not needed, but we need to be sure to use the right |
| 17599 | # headers library |
| 17600 | TCL_INCLUDE="-I${TCL_SRC_DIR}/generic" |
| 17601 | TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}" |
| 17602 | TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}" |
| 17603 | fi |
| 17604 | |
| 17605 | |
| 17606 | |
| 17607 | |
| 17608 | |
| 17609 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5 |
| 17610 | $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; } |
| 17611 | |
| 17612 | if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then |
| 17613 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5 |
| 17614 | $as_echo "loading" >&6; } |
| 17615 | . ${TK_BIN_DIR}/tkConfig.sh |
| 17616 | else |
| 17617 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5 |
| 17618 | $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; } |
| 17619 | fi |
| 17620 | |
| 17621 | # eval is required to do the TK_DBGX substitution |
| 17622 | eval "TK_LIB_FILE=\"${TK_LIB_FILE}\"" |
| 17623 | eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\"" |
| 17624 | |
| 17625 | # If the TK_BIN_DIR is the build directory (not the install directory), |
| 17626 | # then set the common variable name to the value of the build variables. |
| 17627 | # For example, the variable TK_LIB_SPEC will be set to the value |
| 17628 | # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC |
| 17629 | # instead of TK_BUILD_LIB_SPEC since it will work with both an |
| 17630 | # installed and uninstalled version of Tcl. |
| 17631 | if test -f "${TK_BIN_DIR}/Makefile" ; then |
| 17632 | TK_LIB_SPEC=${TK_BUILD_LIB_SPEC} |
| 17633 | TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC} |
| 17634 | TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH} |
| 17635 | elif test "`uname -s`" = "Darwin"; then |
| 17636 | # If Tk was built as a framework, attempt to use the libraries |
| 17637 | # from the framework at the given location so that linking works |
| 17638 | # against Tk.framework installed in an arbitrary location. |
| 17639 | case ${TK_DEFS} in |
| 17640 | *TK_FRAMEWORK*) |
| 17641 | if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then |
| 17642 | for i in "`cd ${TK_BIN_DIR}; pwd`" \ |
| 17643 | "`cd ${TK_BIN_DIR}/../..; pwd`"; do |
| 17644 | if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then |
| 17645 | TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}" |
| 17646 | break |
| 17647 | fi |
| 17648 | done |
| 17649 | fi |
| 17650 | if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then |
| 17651 | TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}" |
| 17652 | TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}" |
| 17653 | fi |
| 17654 | ;; |
| 17655 | esac |
| 17656 | fi |
| 17657 | |
| 17658 | # eval is required to do the TK_DBGX substitution |
| 17659 | eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\"" |
| 17660 | eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\"" |
| 17661 | eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\"" |
| 17662 | eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\"" |
| 17663 | |
| 17664 | |
| 17665 | |
| 17666 | |
| 17667 | |
| 17668 | |
| 17669 | |
| 17670 | |
| 17671 | |
| 17672 | |
| 17673 | |
| 17674 | |
| 17675 | |
| 17676 | |
| 17677 | # Check for in-tree Tk |
| 17678 | intree="no" |
| 17679 | if test "${TK_SRC_DIR}" = "${topdir}/tk"; then |
| 17680 | intree="yes" |
| 17681 | fi |
| 17682 | |
| 17683 | # Find Tk private headers |
| 17684 | if test x"${intree}" = xno; then |
| 17685 | |
| 17686 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5 |
| 17687 | $as_echo_n "checking for Tk private headers... " >&6; } |
| 17688 | private_dir="" |
| 17689 | dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//` |
| 17690 | if test -f ${dir}/tkInt.h; then |
| 17691 | private_dir=${dir} |
| 17692 | fi |
| 17693 | |
| 17694 | if test x"${private_dir}" = x; then |
| 17695 | as_fn_error $? "could not find Tk private headers" "$LINENO" 5 |
| 17696 | else |
| 17697 | TK_PRIVATE_INCLUDE="-I${private_dir}" |
| 17698 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5 |
| 17699 | $as_echo "${private_dir}" >&6; } |
| 17700 | fi |
| 17701 | |
| 17702 | TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}" |
| 17703 | TK_LIBRARY=${TK_LIB_SPEC} |
| 17704 | TK_DEPS="" |
| 17705 | else |
| 17706 | TK_INCLUDE="-I${TK_SRC_DIR}/generic" |
| 17707 | TK_LIBRARY="${TK_BUILD_LIB_SPEC}" |
| 17708 | TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}" |
| 17709 | fi |
| 17710 | |
| 17711 | |
| 17712 | |
| 17713 | |
| 17714 | |
| 17715 | ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)" |
| 17716 | |
| 17717 | # Include some libraries that Tcl and Tk want. |
| 17718 | TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)' |
| 17719 | # Yes, the ordering seems wrong here. But it isn't. |
| 17720 | # TK_LIBS is the list of libraries that need to be linked |
| 17721 | # after Tcl/Tk. Note that this isn't put into LIBS. If it |
| 17722 | # were in LIBS then any link tests after this point would |
| 17723 | # try to include things like `$(LIBGUI)', which wouldn't work. |
| 17724 | GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}" |
| 17725 | |
| 17726 | CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)" |
| 17727 | CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)" |
| 17728 | CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)" |
| 17729 | CONFIG_ALL="${CONFIG_ALL} all-gdbtk" |
| 17730 | CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk" |
| 17731 | CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk" |
| 17732 | CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk" |
| 17733 | |
| 17734 | if test x"$gdb_cv_os_cygwin" = xyes; then |
| 17735 | WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32" |
| 17736 | WIN32LDAPP="-Wl,--subsystem,console" |
| 17737 | CONFIG_OBS="${CONFIG_OBS} gdbres.o" |
| 17738 | fi |
| 17739 | |
| 17740 | subdirs="$subdirs gdbtk" |
| 17741 | |
| 17742 | fi |
| 17743 | fi |
| 17744 | |
| 17745 | |
| 17746 | |
| 17747 | |
| 17748 | |
| 17749 | |
| 17750 | |
| 17751 | |
| 17752 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5 |
| 17753 | $as_echo_n "checking for X... " >&6; } |
| 17754 | |
| 17755 | |
| 17756 | # Check whether --with-x was given. |
| 17757 | if test "${with_x+set}" = set; then : |
| 17758 | withval=$with_x; |
| 17759 | fi |
| 17760 | |
| 17761 | # $have_x is `yes', `no', `disabled', or empty when we do not yet know. |
| 17762 | if test "x$with_x" = xno; then |
| 17763 | # The user explicitly disabled X. |
| 17764 | have_x=disabled |
| 17765 | else |
| 17766 | case $x_includes,$x_libraries in #( |
| 17767 | *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #( |
| 17768 | *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then : |
| 17769 | $as_echo_n "(cached) " >&6 |
| 17770 | else |
| 17771 | # One or both of the vars are not set, and there is no cached value. |
| 17772 | ac_x_includes=no ac_x_libraries=no |
| 17773 | rm -f -r conftest.dir |
| 17774 | if mkdir conftest.dir; then |
| 17775 | cd conftest.dir |
| 17776 | cat >Imakefile <<'_ACEOF' |
| 17777 | incroot: |
| 17778 | @echo incroot='${INCROOT}' |
| 17779 | usrlibdir: |
| 17780 | @echo usrlibdir='${USRLIBDIR}' |
| 17781 | libdir: |
| 17782 | @echo libdir='${LIBDIR}' |
| 17783 | _ACEOF |
| 17784 | if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then |
| 17785 | # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. |
| 17786 | for ac_var in incroot usrlibdir libdir; do |
| 17787 | eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`" |
| 17788 | done |
| 17789 | # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR. |
| 17790 | for ac_extension in a so sl dylib la dll; do |
| 17791 | if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" && |
| 17792 | test -f "$ac_im_libdir/libX11.$ac_extension"; then |
| 17793 | ac_im_usrlibdir=$ac_im_libdir; break |
| 17794 | fi |
| 17795 | done |
| 17796 | # Screen out bogus values from the imake configuration. They are |
| 17797 | # bogus both because they are the default anyway, and because |
| 17798 | # using them would break gcc on systems where it needs fixed includes. |
| 17799 | case $ac_im_incroot in |
| 17800 | /usr/include) ac_x_includes= ;; |
| 17801 | *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;; |
| 17802 | esac |
| 17803 | case $ac_im_usrlibdir in |
| 17804 | /usr/lib | /usr/lib64 | /lib | /lib64) ;; |
| 17805 | *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;; |
| 17806 | esac |
| 17807 | fi |
| 17808 | cd .. |
| 17809 | rm -f -r conftest.dir |
| 17810 | fi |
| 17811 | |
| 17812 | # Standard set of common directories for X headers. |
| 17813 | # Check X11 before X11Rn because it is often a symlink to the current release. |
| 17814 | ac_x_header_dirs=' |
| 17815 | /usr/X11/include |
| 17816 | /usr/X11R7/include |
| 17817 | /usr/X11R6/include |
| 17818 | /usr/X11R5/include |
| 17819 | /usr/X11R4/include |
| 17820 | |
| 17821 | /usr/include/X11 |
| 17822 | /usr/include/X11R7 |
| 17823 | /usr/include/X11R6 |
| 17824 | /usr/include/X11R5 |
| 17825 | /usr/include/X11R4 |
| 17826 | |
| 17827 | /usr/local/X11/include |
| 17828 | /usr/local/X11R7/include |
| 17829 | /usr/local/X11R6/include |
| 17830 | /usr/local/X11R5/include |
| 17831 | /usr/local/X11R4/include |
| 17832 | |
| 17833 | /usr/local/include/X11 |
| 17834 | /usr/local/include/X11R7 |
| 17835 | /usr/local/include/X11R6 |
| 17836 | /usr/local/include/X11R5 |
| 17837 | /usr/local/include/X11R4 |
| 17838 | |
| 17839 | /usr/X386/include |
| 17840 | /usr/x386/include |
| 17841 | /usr/XFree86/include/X11 |
| 17842 | |
| 17843 | /usr/include |
| 17844 | /usr/local/include |
| 17845 | /usr/unsupported/include |
| 17846 | /usr/athena/include |
| 17847 | /usr/local/x11r5/include |
| 17848 | /usr/lpp/Xamples/include |
| 17849 | |
| 17850 | /usr/openwin/include |
| 17851 | /usr/openwin/share/include' |
| 17852 | |
| 17853 | if test "$ac_x_includes" = no; then |
| 17854 | # Guess where to find include files, by looking for Xlib.h. |
| 17855 | # First, try using that file with no special directory specified. |
| 17856 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 17857 | /* end confdefs.h. */ |
| 17858 | #include <X11/Xlib.h> |
| 17859 | _ACEOF |
| 17860 | if ac_fn_c_try_cpp "$LINENO"; then : |
| 17861 | # We can compile using X headers with no special include directory. |
| 17862 | ac_x_includes= |
| 17863 | else |
| 17864 | for ac_dir in $ac_x_header_dirs; do |
| 17865 | if test -r "$ac_dir/X11/Xlib.h"; then |
| 17866 | ac_x_includes=$ac_dir |
| 17867 | break |
| 17868 | fi |
| 17869 | done |
| 17870 | fi |
| 17871 | rm -f conftest.err conftest.i conftest.$ac_ext |
| 17872 | fi # $ac_x_includes = no |
| 17873 | |
| 17874 | if test "$ac_x_libraries" = no; then |
| 17875 | # Check for the libraries. |
| 17876 | # See if we find them without any special options. |
| 17877 | # Don't add to $LIBS permanently. |
| 17878 | ac_save_LIBS=$LIBS |
| 17879 | LIBS="-lX11 $LIBS" |
| 17880 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 17881 | /* end confdefs.h. */ |
| 17882 | #include <X11/Xlib.h> |
| 17883 | int |
| 17884 | main () |
| 17885 | { |
| 17886 | XrmInitialize () |
| 17887 | ; |
| 17888 | return 0; |
| 17889 | } |
| 17890 | _ACEOF |
| 17891 | if ac_fn_c_try_link "$LINENO"; then : |
| 17892 | LIBS=$ac_save_LIBS |
| 17893 | # We can link X programs with no special library path. |
| 17894 | ac_x_libraries= |
| 17895 | else |
| 17896 | LIBS=$ac_save_LIBS |
| 17897 | for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g` |
| 17898 | do |
| 17899 | # Don't even attempt the hair of trying to link an X program! |
| 17900 | for ac_extension in a so sl dylib la dll; do |
| 17901 | if test -r "$ac_dir/libX11.$ac_extension"; then |
| 17902 | ac_x_libraries=$ac_dir |
| 17903 | break 2 |
| 17904 | fi |
| 17905 | done |
| 17906 | done |
| 17907 | fi |
| 17908 | rm -f core conftest.err conftest.$ac_objext \ |
| 17909 | conftest$ac_exeext conftest.$ac_ext |
| 17910 | fi # $ac_x_libraries = no |
| 17911 | |
| 17912 | case $ac_x_includes,$ac_x_libraries in #( |
| 17913 | no,* | *,no | *\'*) |
| 17914 | # Didn't find X, or a directory has "'" in its name. |
| 17915 | ac_cv_have_x="have_x=no";; #( |
| 17916 | *) |
| 17917 | # Record where we found X for the cache. |
| 17918 | ac_cv_have_x="have_x=yes\ |
| 17919 | ac_x_includes='$ac_x_includes'\ |
| 17920 | ac_x_libraries='$ac_x_libraries'" |
| 17921 | esac |
| 17922 | fi |
| 17923 | ;; #( |
| 17924 | *) have_x=yes;; |
| 17925 | esac |
| 17926 | eval "$ac_cv_have_x" |
| 17927 | fi # $with_x != no |
| 17928 | |
| 17929 | if test "$have_x" != yes; then |
| 17930 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5 |
| 17931 | $as_echo "$have_x" >&6; } |
| 17932 | no_x=yes |
| 17933 | else |
| 17934 | # If each of the values was on the command line, it overrides each guess. |
| 17935 | test "x$x_includes" = xNONE && x_includes=$ac_x_includes |
| 17936 | test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries |
| 17937 | # Update the cache value to reflect the command line values. |
| 17938 | ac_cv_have_x="have_x=yes\ |
| 17939 | ac_x_includes='$x_includes'\ |
| 17940 | ac_x_libraries='$x_libraries'" |
| 17941 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5 |
| 17942 | $as_echo "libraries $x_libraries, headers $x_includes" >&6; } |
| 17943 | fi |
| 17944 | |
| 17945 | |
| 17946 | # Unlike the sim directory, whether a simulator is linked is controlled by |
| 17947 | # presence of a gdb_sim definition in the target configure.tgt entry. |
| 17948 | # This code just checks for a few cases where we'd like to ignore those |
| 17949 | # definitions, even when they're present in the '.mt' file. These cases |
| 17950 | # are when --disable-sim is specified, or if the simulator directory is |
| 17951 | # not part of the source tree. |
| 17952 | # |
| 17953 | # Check whether --enable-sim was given. |
| 17954 | if test "${enable_sim+set}" = set; then : |
| 17955 | enableval=$enable_sim; echo "enable_sim = $enable_sim"; |
| 17956 | echo "enableval = ${enableval}"; |
| 17957 | case "${enableval}" in |
| 17958 | yes) ignore_sim=false ;; |
| 17959 | no) ignore_sim=true ;; |
| 17960 | *) ignore_sim=false ;; |
| 17961 | esac |
| 17962 | else |
| 17963 | ignore_sim=false |
| 17964 | fi |
| 17965 | |
| 17966 | |
| 17967 | if test ! -d "${srcdir}/../sim"; then |
| 17968 | ignore_sim=true |
| 17969 | fi |
| 17970 | |
| 17971 | SIM= |
| 17972 | SIM_OBS= |
| 17973 | if test "${ignore_sim}" = "false"; then |
| 17974 | if test x"${gdb_sim}" != x ; then |
| 17975 | SIM="${gdb_sim}" |
| 17976 | SIM_OBS="remote-sim.o" |
| 17977 | |
| 17978 | $as_echo "#define WITH_SIM 1" >>confdefs.h |
| 17979 | |
| 17980 | |
| 17981 | # Some tdep code should only be compiled in when the ppc sim is |
| 17982 | # built. PR sim/13418. |
| 17983 | case $target in |
| 17984 | powerpc*-*-*) |
| 17985 | |
| 17986 | $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h |
| 17987 | |
| 17988 | ;; |
| 17989 | esac |
| 17990 | fi |
| 17991 | fi |
| 17992 | |
| 17993 | |
| 17994 | |
| 17995 | |
| 17996 | |
| 17997 | |
| 17998 | |
| 17999 | |
| 18000 | |
| 18001 | |
| 18002 | |
| 18003 | |
| 18004 | |
| 18005 | |
| 18006 | # List of host floatformats. |
| 18007 | |
| 18008 | cat >>confdefs.h <<_ACEOF |
| 18009 | #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format |
| 18010 | _ACEOF |
| 18011 | |
| 18012 | |
| 18013 | cat >>confdefs.h <<_ACEOF |
| 18014 | #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format |
| 18015 | _ACEOF |
| 18016 | |
| 18017 | |
| 18018 | cat >>confdefs.h <<_ACEOF |
| 18019 | #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format |
| 18020 | _ACEOF |
| 18021 | |
| 18022 | |
| 18023 | # target_subdir is used by the testsuite to find the target libraries. |
| 18024 | target_subdir= |
| 18025 | if test "${host}" != "${target}"; then |
| 18026 | target_subdir="${target_alias}/" |
| 18027 | fi |
| 18028 | |
| 18029 | |
| 18030 | # Import nat definitions. |
| 18031 | nat_makefile_frag=/dev/null |
| 18032 | if test "${gdb_native}" = "yes"; then |
| 18033 | . ${srcdir}/configure.nat |
| 18034 | nativefile=$NAT_FILE |
| 18035 | fi |
| 18036 | |
| 18037 | |
| 18038 | |
| 18039 | |
| 18040 | |
| 18041 | |
| 18042 | |
| 18043 | |
| 18044 | |
| 18045 | |
| 18046 | |
| 18047 | if test x"${gdb_osabi}" != x ; then |
| 18048 | |
| 18049 | cat >>confdefs.h <<_ACEOF |
| 18050 | #define GDB_OSABI_DEFAULT $gdb_osabi |
| 18051 | _ACEOF |
| 18052 | |
| 18053 | fi |
| 18054 | |
| 18055 | # Check for babeltrace and babeltrace-ctf |
| 18056 | |
| 18057 | # Check whether --with-babeltrace was given. |
| 18058 | if test "${with_babeltrace+set}" = set; then : |
| 18059 | withval=$with_babeltrace; |
| 18060 | else |
| 18061 | with_babeltrace=auto |
| 18062 | fi |
| 18063 | |
| 18064 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5 |
| 18065 | $as_echo_n "checking whether to use babeltrace... " >&6; } |
| 18066 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5 |
| 18067 | $as_echo "$with_babeltrace" >&6; } |
| 18068 | |
| 18069 | if test "x$with_babeltrace" = "xno"; then |
| 18070 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5 |
| 18071 | $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;} |
| 18072 | else |
| 18073 | # Append -Werror to CFLAGS so that configure can catch the warning |
| 18074 | # "assignment from incompatible pointer type", which is related to |
| 18075 | # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works |
| 18076 | # in GDB, while babeltrace 1.0.3 is broken. |
| 18077 | # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be |
| 18078 | # safe to save and restore CFLAGS here. |
| 18079 | saved_CFLAGS=$CFLAGS |
| 18080 | CFLAGS="$CFLAGS -Werror" |
| 18081 | |
| 18082 | |
| 18083 | |
| 18084 | |
| 18085 | |
| 18086 | |
| 18087 | |
| 18088 | |
| 18089 | use_additional=yes |
| 18090 | |
| 18091 | acl_save_prefix="$prefix" |
| 18092 | prefix="$acl_final_prefix" |
| 18093 | acl_save_exec_prefix="$exec_prefix" |
| 18094 | exec_prefix="$acl_final_exec_prefix" |
| 18095 | |
| 18096 | eval additional_includedir=\"$includedir\" |
| 18097 | eval additional_libdir=\"$libdir\" |
| 18098 | |
| 18099 | exec_prefix="$acl_save_exec_prefix" |
| 18100 | prefix="$acl_save_prefix" |
| 18101 | |
| 18102 | |
| 18103 | # Check whether --with-libbabeltrace-prefix was given. |
| 18104 | if test "${with_libbabeltrace_prefix+set}" = set; then : |
| 18105 | withval=$with_libbabeltrace_prefix; |
| 18106 | if test "X$withval" = "Xno"; then |
| 18107 | use_additional=no |
| 18108 | else |
| 18109 | if test "X$withval" = "X"; then |
| 18110 | |
| 18111 | acl_save_prefix="$prefix" |
| 18112 | prefix="$acl_final_prefix" |
| 18113 | acl_save_exec_prefix="$exec_prefix" |
| 18114 | exec_prefix="$acl_final_exec_prefix" |
| 18115 | |
| 18116 | eval additional_includedir=\"$includedir\" |
| 18117 | eval additional_libdir=\"$libdir\" |
| 18118 | |
| 18119 | exec_prefix="$acl_save_exec_prefix" |
| 18120 | prefix="$acl_save_prefix" |
| 18121 | |
| 18122 | else |
| 18123 | additional_includedir="$withval/include" |
| 18124 | additional_libdir="$withval/lib" |
| 18125 | fi |
| 18126 | fi |
| 18127 | |
| 18128 | fi |
| 18129 | |
| 18130 | |
| 18131 | # Check whether --with-libbabeltrace-type was given. |
| 18132 | if test "${with_libbabeltrace_type+set}" = set; then : |
| 18133 | withval=$with_libbabeltrace_type; with_libbabeltrace_type=$withval |
| 18134 | else |
| 18135 | with_libbabeltrace_type=auto |
| 18136 | fi |
| 18137 | |
| 18138 | lib_type=`eval echo \$with_libbabeltrace_type` |
| 18139 | |
| 18140 | LIBBABELTRACE= |
| 18141 | LTLIBBABELTRACE= |
| 18142 | INCBABELTRACE= |
| 18143 | rpathdirs= |
| 18144 | ltrpathdirs= |
| 18145 | names_already_handled= |
| 18146 | names_next_round='babeltrace babeltrace-ctf' |
| 18147 | while test -n "$names_next_round"; do |
| 18148 | names_this_round="$names_next_round" |
| 18149 | names_next_round= |
| 18150 | for name in $names_this_round; do |
| 18151 | already_handled= |
| 18152 | for n in $names_already_handled; do |
| 18153 | if test "$n" = "$name"; then |
| 18154 | already_handled=yes |
| 18155 | break |
| 18156 | fi |
| 18157 | done |
| 18158 | if test -z "$already_handled"; then |
| 18159 | names_already_handled="$names_already_handled $name" |
| 18160 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` |
| 18161 | eval value=\"\$HAVE_LIB$uppername\" |
| 18162 | if test -n "$value"; then |
| 18163 | if test "$value" = yes; then |
| 18164 | eval value=\"\$LIB$uppername\" |
| 18165 | test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value" |
| 18166 | eval value=\"\$LTLIB$uppername\" |
| 18167 | test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value" |
| 18168 | else |
| 18169 | : |
| 18170 | fi |
| 18171 | else |
| 18172 | found_dir= |
| 18173 | found_la= |
| 18174 | found_so= |
| 18175 | found_a= |
| 18176 | if test $use_additional = yes; then |
| 18177 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
| 18178 | found_dir="$additional_libdir" |
| 18179 | found_so="$additional_libdir/lib$name.$shlibext" |
| 18180 | if test -f "$additional_libdir/lib$name.la"; then |
| 18181 | found_la="$additional_libdir/lib$name.la" |
| 18182 | fi |
| 18183 | elif test x$lib_type != xshared; then |
| 18184 | if test -f "$additional_libdir/lib$name.$libext"; then |
| 18185 | found_dir="$additional_libdir" |
| 18186 | found_a="$additional_libdir/lib$name.$libext" |
| 18187 | if test -f "$additional_libdir/lib$name.la"; then |
| 18188 | found_la="$additional_libdir/lib$name.la" |
| 18189 | fi |
| 18190 | fi |
| 18191 | fi |
| 18192 | fi |
| 18193 | if test "X$found_dir" = "X"; then |
| 18194 | for x in $LDFLAGS $LTLIBBABELTRACE; do |
| 18195 | |
| 18196 | acl_save_prefix="$prefix" |
| 18197 | prefix="$acl_final_prefix" |
| 18198 | acl_save_exec_prefix="$exec_prefix" |
| 18199 | exec_prefix="$acl_final_exec_prefix" |
| 18200 | eval x=\"$x\" |
| 18201 | exec_prefix="$acl_save_exec_prefix" |
| 18202 | prefix="$acl_save_prefix" |
| 18203 | |
| 18204 | case "$x" in |
| 18205 | -L*) |
| 18206 | dir=`echo "X$x" | sed -e 's/^X-L//'` |
| 18207 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
| 18208 | found_dir="$dir" |
| 18209 | found_so="$dir/lib$name.$shlibext" |
| 18210 | if test -f "$dir/lib$name.la"; then |
| 18211 | found_la="$dir/lib$name.la" |
| 18212 | fi |
| 18213 | elif test x$lib_type != xshared; then |
| 18214 | if test -f "$dir/lib$name.$libext"; then |
| 18215 | found_dir="$dir" |
| 18216 | found_a="$dir/lib$name.$libext" |
| 18217 | if test -f "$dir/lib$name.la"; then |
| 18218 | found_la="$dir/lib$name.la" |
| 18219 | fi |
| 18220 | fi |
| 18221 | fi |
| 18222 | ;; |
| 18223 | esac |
| 18224 | if test "X$found_dir" != "X"; then |
| 18225 | break |
| 18226 | fi |
| 18227 | done |
| 18228 | fi |
| 18229 | if test "X$found_dir" != "X"; then |
| 18230 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name" |
| 18231 | if test "X$found_so" != "X"; then |
| 18232 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then |
| 18233 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" |
| 18234 | else |
| 18235 | haveit= |
| 18236 | for x in $ltrpathdirs; do |
| 18237 | if test "X$x" = "X$found_dir"; then |
| 18238 | haveit=yes |
| 18239 | break |
| 18240 | fi |
| 18241 | done |
| 18242 | if test -z "$haveit"; then |
| 18243 | ltrpathdirs="$ltrpathdirs $found_dir" |
| 18244 | fi |
| 18245 | if test "$hardcode_direct" = yes; then |
| 18246 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" |
| 18247 | else |
| 18248 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then |
| 18249 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" |
| 18250 | haveit= |
| 18251 | for x in $rpathdirs; do |
| 18252 | if test "X$x" = "X$found_dir"; then |
| 18253 | haveit=yes |
| 18254 | break |
| 18255 | fi |
| 18256 | done |
| 18257 | if test -z "$haveit"; then |
| 18258 | rpathdirs="$rpathdirs $found_dir" |
| 18259 | fi |
| 18260 | else |
| 18261 | haveit= |
| 18262 | for x in $LDFLAGS $LIBBABELTRACE; do |
| 18263 | |
| 18264 | acl_save_prefix="$prefix" |
| 18265 | prefix="$acl_final_prefix" |
| 18266 | acl_save_exec_prefix="$exec_prefix" |
| 18267 | exec_prefix="$acl_final_exec_prefix" |
| 18268 | eval x=\"$x\" |
| 18269 | exec_prefix="$acl_save_exec_prefix" |
| 18270 | prefix="$acl_save_prefix" |
| 18271 | |
| 18272 | if test "X$x" = "X-L$found_dir"; then |
| 18273 | haveit=yes |
| 18274 | break |
| 18275 | fi |
| 18276 | done |
| 18277 | if test -z "$haveit"; then |
| 18278 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir" |
| 18279 | fi |
| 18280 | if test "$hardcode_minus_L" != no; then |
| 18281 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so" |
| 18282 | else |
| 18283 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" |
| 18284 | fi |
| 18285 | fi |
| 18286 | fi |
| 18287 | fi |
| 18288 | else |
| 18289 | if test "X$found_a" != "X"; then |
| 18290 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a" |
| 18291 | else |
| 18292 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name" |
| 18293 | fi |
| 18294 | fi |
| 18295 | additional_includedir= |
| 18296 | case "$found_dir" in |
| 18297 | */lib | */lib/) |
| 18298 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` |
| 18299 | additional_includedir="$basedir/include" |
| 18300 | ;; |
| 18301 | esac |
| 18302 | if test "X$additional_includedir" != "X"; then |
| 18303 | if test "X$additional_includedir" != "X/usr/include"; then |
| 18304 | haveit= |
| 18305 | if test "X$additional_includedir" = "X/usr/local/include"; then |
| 18306 | if test -n "$GCC"; then |
| 18307 | case $host_os in |
| 18308 | linux*) haveit=yes;; |
| 18309 | esac |
| 18310 | fi |
| 18311 | fi |
| 18312 | if test -z "$haveit"; then |
| 18313 | for x in $CPPFLAGS $INCBABELTRACE; do |
| 18314 | |
| 18315 | acl_save_prefix="$prefix" |
| 18316 | prefix="$acl_final_prefix" |
| 18317 | acl_save_exec_prefix="$exec_prefix" |
| 18318 | exec_prefix="$acl_final_exec_prefix" |
| 18319 | eval x=\"$x\" |
| 18320 | exec_prefix="$acl_save_exec_prefix" |
| 18321 | prefix="$acl_save_prefix" |
| 18322 | |
| 18323 | if test "X$x" = "X-I$additional_includedir"; then |
| 18324 | haveit=yes |
| 18325 | break |
| 18326 | fi |
| 18327 | done |
| 18328 | if test -z "$haveit"; then |
| 18329 | if test -d "$additional_includedir"; then |
| 18330 | INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir" |
| 18331 | fi |
| 18332 | fi |
| 18333 | fi |
| 18334 | fi |
| 18335 | fi |
| 18336 | if test -n "$found_la"; then |
| 18337 | save_libdir="$libdir" |
| 18338 | case "$found_la" in |
| 18339 | */* | *\\*) . "$found_la" ;; |
| 18340 | *) . "./$found_la" ;; |
| 18341 | esac |
| 18342 | libdir="$save_libdir" |
| 18343 | for dep in $dependency_libs; do |
| 18344 | case "$dep" in |
| 18345 | -L*) |
| 18346 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` |
| 18347 | if test "X$additional_libdir" != "X/usr/lib"; then |
| 18348 | haveit= |
| 18349 | if test "X$additional_libdir" = "X/usr/local/lib"; then |
| 18350 | if test -n "$GCC"; then |
| 18351 | case $host_os in |
| 18352 | linux*) haveit=yes;; |
| 18353 | esac |
| 18354 | fi |
| 18355 | fi |
| 18356 | if test -z "$haveit"; then |
| 18357 | haveit= |
| 18358 | for x in $LDFLAGS $LIBBABELTRACE; do |
| 18359 | |
| 18360 | acl_save_prefix="$prefix" |
| 18361 | prefix="$acl_final_prefix" |
| 18362 | acl_save_exec_prefix="$exec_prefix" |
| 18363 | exec_prefix="$acl_final_exec_prefix" |
| 18364 | eval x=\"$x\" |
| 18365 | exec_prefix="$acl_save_exec_prefix" |
| 18366 | prefix="$acl_save_prefix" |
| 18367 | |
| 18368 | if test "X$x" = "X-L$additional_libdir"; then |
| 18369 | haveit=yes |
| 18370 | break |
| 18371 | fi |
| 18372 | done |
| 18373 | if test -z "$haveit"; then |
| 18374 | if test -d "$additional_libdir"; then |
| 18375 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir" |
| 18376 | fi |
| 18377 | fi |
| 18378 | haveit= |
| 18379 | for x in $LDFLAGS $LTLIBBABELTRACE; do |
| 18380 | |
| 18381 | acl_save_prefix="$prefix" |
| 18382 | prefix="$acl_final_prefix" |
| 18383 | acl_save_exec_prefix="$exec_prefix" |
| 18384 | exec_prefix="$acl_final_exec_prefix" |
| 18385 | eval x=\"$x\" |
| 18386 | exec_prefix="$acl_save_exec_prefix" |
| 18387 | prefix="$acl_save_prefix" |
| 18388 | |
| 18389 | if test "X$x" = "X-L$additional_libdir"; then |
| 18390 | haveit=yes |
| 18391 | break |
| 18392 | fi |
| 18393 | done |
| 18394 | if test -z "$haveit"; then |
| 18395 | if test -d "$additional_libdir"; then |
| 18396 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir" |
| 18397 | fi |
| 18398 | fi |
| 18399 | fi |
| 18400 | fi |
| 18401 | ;; |
| 18402 | -R*) |
| 18403 | dir=`echo "X$dep" | sed -e 's/^X-R//'` |
| 18404 | if test "$enable_rpath" != no; then |
| 18405 | haveit= |
| 18406 | for x in $rpathdirs; do |
| 18407 | if test "X$x" = "X$dir"; then |
| 18408 | haveit=yes |
| 18409 | break |
| 18410 | fi |
| 18411 | done |
| 18412 | if test -z "$haveit"; then |
| 18413 | rpathdirs="$rpathdirs $dir" |
| 18414 | fi |
| 18415 | haveit= |
| 18416 | for x in $ltrpathdirs; do |
| 18417 | if test "X$x" = "X$dir"; then |
| 18418 | haveit=yes |
| 18419 | break |
| 18420 | fi |
| 18421 | done |
| 18422 | if test -z "$haveit"; then |
| 18423 | ltrpathdirs="$ltrpathdirs $dir" |
| 18424 | fi |
| 18425 | fi |
| 18426 | ;; |
| 18427 | -l*) |
| 18428 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` |
| 18429 | ;; |
| 18430 | *.la) |
| 18431 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` |
| 18432 | ;; |
| 18433 | *) |
| 18434 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep" |
| 18435 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep" |
| 18436 | ;; |
| 18437 | esac |
| 18438 | done |
| 18439 | fi |
| 18440 | else |
| 18441 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
| 18442 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name" |
| 18443 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name" |
| 18444 | else |
| 18445 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l:lib$name.$libext" |
| 18446 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l:lib$name.$libext" |
| 18447 | fi |
| 18448 | fi |
| 18449 | fi |
| 18450 | fi |
| 18451 | done |
| 18452 | done |
| 18453 | if test "X$rpathdirs" != "X"; then |
| 18454 | if test -n "$hardcode_libdir_separator"; then |
| 18455 | alldirs= |
| 18456 | for found_dir in $rpathdirs; do |
| 18457 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" |
| 18458 | done |
| 18459 | acl_save_libdir="$libdir" |
| 18460 | libdir="$alldirs" |
| 18461 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 18462 | libdir="$acl_save_libdir" |
| 18463 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" |
| 18464 | else |
| 18465 | for found_dir in $rpathdirs; do |
| 18466 | acl_save_libdir="$libdir" |
| 18467 | libdir="$found_dir" |
| 18468 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 18469 | libdir="$acl_save_libdir" |
| 18470 | LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag" |
| 18471 | done |
| 18472 | fi |
| 18473 | fi |
| 18474 | if test "X$ltrpathdirs" != "X"; then |
| 18475 | for found_dir in $ltrpathdirs; do |
| 18476 | LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir" |
| 18477 | done |
| 18478 | fi |
| 18479 | |
| 18480 | |
| 18481 | ac_save_CPPFLAGS="$CPPFLAGS" |
| 18482 | |
| 18483 | for element in $INCBABELTRACE; do |
| 18484 | haveit= |
| 18485 | for x in $CPPFLAGS; do |
| 18486 | |
| 18487 | acl_save_prefix="$prefix" |
| 18488 | prefix="$acl_final_prefix" |
| 18489 | acl_save_exec_prefix="$exec_prefix" |
| 18490 | exec_prefix="$acl_final_exec_prefix" |
| 18491 | eval x=\"$x\" |
| 18492 | exec_prefix="$acl_save_exec_prefix" |
| 18493 | prefix="$acl_save_prefix" |
| 18494 | |
| 18495 | if test "X$x" = "X$element"; then |
| 18496 | haveit=yes |
| 18497 | break |
| 18498 | fi |
| 18499 | done |
| 18500 | if test -z "$haveit"; then |
| 18501 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" |
| 18502 | fi |
| 18503 | done |
| 18504 | |
| 18505 | |
| 18506 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5 |
| 18507 | $as_echo_n "checking for libbabeltrace... " >&6; } |
| 18508 | if ${ac_cv_libbabeltrace+:} false; then : |
| 18509 | $as_echo_n "(cached) " >&6 |
| 18510 | else |
| 18511 | |
| 18512 | ac_save_LIBS="$LIBS" |
| 18513 | LIBS="$LIBS $LIBBABELTRACE" |
| 18514 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 18515 | /* end confdefs.h. */ |
| 18516 | #include <babeltrace/babeltrace.h> |
| 18517 | #include <babeltrace/ctf/events.h> |
| 18518 | #include <babeltrace/ctf/iterator.h> |
| 18519 | int |
| 18520 | main () |
| 18521 | { |
| 18522 | struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL)); |
| 18523 | struct bt_ctf_event *event = NULL; |
| 18524 | const struct bt_definition *scope; |
| 18525 | |
| 18526 | pos->type = BT_SEEK_BEGIN; |
| 18527 | bt_iter_set_pos (bt_ctf_get_iter (NULL), pos); |
| 18528 | scope = bt_ctf_get_top_level_scope (event, |
| 18529 | BT_STREAM_EVENT_HEADER); |
| 18530 | bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id")); |
| 18531 | |
| 18532 | ; |
| 18533 | return 0; |
| 18534 | } |
| 18535 | _ACEOF |
| 18536 | if ac_fn_c_try_link "$LINENO"; then : |
| 18537 | ac_cv_libbabeltrace=yes |
| 18538 | else |
| 18539 | ac_cv_libbabeltrace=no |
| 18540 | fi |
| 18541 | rm -f core conftest.err conftest.$ac_objext \ |
| 18542 | conftest$ac_exeext conftest.$ac_ext |
| 18543 | LIBS="$ac_save_LIBS" |
| 18544 | |
| 18545 | fi |
| 18546 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5 |
| 18547 | $as_echo "$ac_cv_libbabeltrace" >&6; } |
| 18548 | if test "$ac_cv_libbabeltrace" = yes; then |
| 18549 | HAVE_LIBBABELTRACE=yes |
| 18550 | |
| 18551 | $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h |
| 18552 | |
| 18553 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5 |
| 18554 | $as_echo_n "checking how to link with libbabeltrace... " >&6; } |
| 18555 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5 |
| 18556 | $as_echo "$LIBBABELTRACE" >&6; } |
| 18557 | else |
| 18558 | HAVE_LIBBABELTRACE=no |
| 18559 | CPPFLAGS="$ac_save_CPPFLAGS" |
| 18560 | LIBBABELTRACE= |
| 18561 | LTLIBBABELTRACE= |
| 18562 | fi |
| 18563 | |
| 18564 | |
| 18565 | |
| 18566 | |
| 18567 | |
| 18568 | |
| 18569 | CFLAGS=$saved_CFLAGS |
| 18570 | |
| 18571 | if test "$HAVE_LIBBABELTRACE" != yes; then |
| 18572 | if test "$with_babeltrace" = yes; then |
| 18573 | as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5 |
| 18574 | else |
| 18575 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5 |
| 18576 | $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;} |
| 18577 | fi |
| 18578 | fi |
| 18579 | fi |
| 18580 | |
| 18581 | # Check for xxhash |
| 18582 | |
| 18583 | # Check whether --with-xxhash was given. |
| 18584 | if test "${with_xxhash+set}" = set; then : |
| 18585 | withval=$with_xxhash; |
| 18586 | else |
| 18587 | with_xxhash=auto |
| 18588 | fi |
| 18589 | |
| 18590 | |
| 18591 | if test "x$with_xxhash" != "xno"; then |
| 18592 | |
| 18593 | |
| 18594 | |
| 18595 | |
| 18596 | |
| 18597 | |
| 18598 | |
| 18599 | |
| 18600 | use_additional=yes |
| 18601 | |
| 18602 | acl_save_prefix="$prefix" |
| 18603 | prefix="$acl_final_prefix" |
| 18604 | acl_save_exec_prefix="$exec_prefix" |
| 18605 | exec_prefix="$acl_final_exec_prefix" |
| 18606 | |
| 18607 | eval additional_includedir=\"$includedir\" |
| 18608 | eval additional_libdir=\"$libdir\" |
| 18609 | |
| 18610 | exec_prefix="$acl_save_exec_prefix" |
| 18611 | prefix="$acl_save_prefix" |
| 18612 | |
| 18613 | |
| 18614 | # Check whether --with-libxxhash-prefix was given. |
| 18615 | if test "${with_libxxhash_prefix+set}" = set; then : |
| 18616 | withval=$with_libxxhash_prefix; |
| 18617 | if test "X$withval" = "Xno"; then |
| 18618 | use_additional=no |
| 18619 | else |
| 18620 | if test "X$withval" = "X"; then |
| 18621 | |
| 18622 | acl_save_prefix="$prefix" |
| 18623 | prefix="$acl_final_prefix" |
| 18624 | acl_save_exec_prefix="$exec_prefix" |
| 18625 | exec_prefix="$acl_final_exec_prefix" |
| 18626 | |
| 18627 | eval additional_includedir=\"$includedir\" |
| 18628 | eval additional_libdir=\"$libdir\" |
| 18629 | |
| 18630 | exec_prefix="$acl_save_exec_prefix" |
| 18631 | prefix="$acl_save_prefix" |
| 18632 | |
| 18633 | else |
| 18634 | additional_includedir="$withval/include" |
| 18635 | additional_libdir="$withval/lib" |
| 18636 | fi |
| 18637 | fi |
| 18638 | |
| 18639 | fi |
| 18640 | |
| 18641 | |
| 18642 | # Check whether --with-libxxhash-type was given. |
| 18643 | if test "${with_libxxhash_type+set}" = set; then : |
| 18644 | withval=$with_libxxhash_type; with_libxxhash_type=$withval |
| 18645 | else |
| 18646 | with_libxxhash_type=auto |
| 18647 | fi |
| 18648 | |
| 18649 | lib_type=`eval echo \$with_libxxhash_type` |
| 18650 | |
| 18651 | LIBXXHASH= |
| 18652 | LTLIBXXHASH= |
| 18653 | INCXXHASH= |
| 18654 | rpathdirs= |
| 18655 | ltrpathdirs= |
| 18656 | names_already_handled= |
| 18657 | names_next_round='xxhash ' |
| 18658 | while test -n "$names_next_round"; do |
| 18659 | names_this_round="$names_next_round" |
| 18660 | names_next_round= |
| 18661 | for name in $names_this_round; do |
| 18662 | already_handled= |
| 18663 | for n in $names_already_handled; do |
| 18664 | if test "$n" = "$name"; then |
| 18665 | already_handled=yes |
| 18666 | break |
| 18667 | fi |
| 18668 | done |
| 18669 | if test -z "$already_handled"; then |
| 18670 | names_already_handled="$names_already_handled $name" |
| 18671 | uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'` |
| 18672 | eval value=\"\$HAVE_LIB$uppername\" |
| 18673 | if test -n "$value"; then |
| 18674 | if test "$value" = yes; then |
| 18675 | eval value=\"\$LIB$uppername\" |
| 18676 | test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value" |
| 18677 | eval value=\"\$LTLIB$uppername\" |
| 18678 | test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value" |
| 18679 | else |
| 18680 | : |
| 18681 | fi |
| 18682 | else |
| 18683 | found_dir= |
| 18684 | found_la= |
| 18685 | found_so= |
| 18686 | found_a= |
| 18687 | if test $use_additional = yes; then |
| 18688 | if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
| 18689 | found_dir="$additional_libdir" |
| 18690 | found_so="$additional_libdir/lib$name.$shlibext" |
| 18691 | if test -f "$additional_libdir/lib$name.la"; then |
| 18692 | found_la="$additional_libdir/lib$name.la" |
| 18693 | fi |
| 18694 | elif test x$lib_type != xshared; then |
| 18695 | if test -f "$additional_libdir/lib$name.$libext"; then |
| 18696 | found_dir="$additional_libdir" |
| 18697 | found_a="$additional_libdir/lib$name.$libext" |
| 18698 | if test -f "$additional_libdir/lib$name.la"; then |
| 18699 | found_la="$additional_libdir/lib$name.la" |
| 18700 | fi |
| 18701 | fi |
| 18702 | fi |
| 18703 | fi |
| 18704 | if test "X$found_dir" = "X"; then |
| 18705 | for x in $LDFLAGS $LTLIBXXHASH; do |
| 18706 | |
| 18707 | acl_save_prefix="$prefix" |
| 18708 | prefix="$acl_final_prefix" |
| 18709 | acl_save_exec_prefix="$exec_prefix" |
| 18710 | exec_prefix="$acl_final_exec_prefix" |
| 18711 | eval x=\"$x\" |
| 18712 | exec_prefix="$acl_save_exec_prefix" |
| 18713 | prefix="$acl_save_prefix" |
| 18714 | |
| 18715 | case "$x" in |
| 18716 | -L*) |
| 18717 | dir=`echo "X$x" | sed -e 's/^X-L//'` |
| 18718 | if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext" && test x$lib_type != xstatic; then |
| 18719 | found_dir="$dir" |
| 18720 | found_so="$dir/lib$name.$shlibext" |
| 18721 | if test -f "$dir/lib$name.la"; then |
| 18722 | found_la="$dir/lib$name.la" |
| 18723 | fi |
| 18724 | elif test x$lib_type != xshared; then |
| 18725 | if test -f "$dir/lib$name.$libext"; then |
| 18726 | found_dir="$dir" |
| 18727 | found_a="$dir/lib$name.$libext" |
| 18728 | if test -f "$dir/lib$name.la"; then |
| 18729 | found_la="$dir/lib$name.la" |
| 18730 | fi |
| 18731 | fi |
| 18732 | fi |
| 18733 | ;; |
| 18734 | esac |
| 18735 | if test "X$found_dir" != "X"; then |
| 18736 | break |
| 18737 | fi |
| 18738 | done |
| 18739 | fi |
| 18740 | if test "X$found_dir" != "X"; then |
| 18741 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name" |
| 18742 | if test "X$found_so" != "X"; then |
| 18743 | if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then |
| 18744 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" |
| 18745 | else |
| 18746 | haveit= |
| 18747 | for x in $ltrpathdirs; do |
| 18748 | if test "X$x" = "X$found_dir"; then |
| 18749 | haveit=yes |
| 18750 | break |
| 18751 | fi |
| 18752 | done |
| 18753 | if test -z "$haveit"; then |
| 18754 | ltrpathdirs="$ltrpathdirs $found_dir" |
| 18755 | fi |
| 18756 | if test "$hardcode_direct" = yes; then |
| 18757 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" |
| 18758 | else |
| 18759 | if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then |
| 18760 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" |
| 18761 | haveit= |
| 18762 | for x in $rpathdirs; do |
| 18763 | if test "X$x" = "X$found_dir"; then |
| 18764 | haveit=yes |
| 18765 | break |
| 18766 | fi |
| 18767 | done |
| 18768 | if test -z "$haveit"; then |
| 18769 | rpathdirs="$rpathdirs $found_dir" |
| 18770 | fi |
| 18771 | else |
| 18772 | haveit= |
| 18773 | for x in $LDFLAGS $LIBXXHASH; do |
| 18774 | |
| 18775 | acl_save_prefix="$prefix" |
| 18776 | prefix="$acl_final_prefix" |
| 18777 | acl_save_exec_prefix="$exec_prefix" |
| 18778 | exec_prefix="$acl_final_exec_prefix" |
| 18779 | eval x=\"$x\" |
| 18780 | exec_prefix="$acl_save_exec_prefix" |
| 18781 | prefix="$acl_save_prefix" |
| 18782 | |
| 18783 | if test "X$x" = "X-L$found_dir"; then |
| 18784 | haveit=yes |
| 18785 | break |
| 18786 | fi |
| 18787 | done |
| 18788 | if test -z "$haveit"; then |
| 18789 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir" |
| 18790 | fi |
| 18791 | if test "$hardcode_minus_L" != no; then |
| 18792 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so" |
| 18793 | else |
| 18794 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name" |
| 18795 | fi |
| 18796 | fi |
| 18797 | fi |
| 18798 | fi |
| 18799 | else |
| 18800 | if test "X$found_a" != "X"; then |
| 18801 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a" |
| 18802 | else |
| 18803 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name" |
| 18804 | fi |
| 18805 | fi |
| 18806 | additional_includedir= |
| 18807 | case "$found_dir" in |
| 18808 | */lib | */lib/) |
| 18809 | basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'` |
| 18810 | additional_includedir="$basedir/include" |
| 18811 | ;; |
| 18812 | esac |
| 18813 | if test "X$additional_includedir" != "X"; then |
| 18814 | if test "X$additional_includedir" != "X/usr/include"; then |
| 18815 | haveit= |
| 18816 | if test "X$additional_includedir" = "X/usr/local/include"; then |
| 18817 | if test -n "$GCC"; then |
| 18818 | case $host_os in |
| 18819 | linux*) haveit=yes;; |
| 18820 | esac |
| 18821 | fi |
| 18822 | fi |
| 18823 | if test -z "$haveit"; then |
| 18824 | for x in $CPPFLAGS $INCXXHASH; do |
| 18825 | |
| 18826 | acl_save_prefix="$prefix" |
| 18827 | prefix="$acl_final_prefix" |
| 18828 | acl_save_exec_prefix="$exec_prefix" |
| 18829 | exec_prefix="$acl_final_exec_prefix" |
| 18830 | eval x=\"$x\" |
| 18831 | exec_prefix="$acl_save_exec_prefix" |
| 18832 | prefix="$acl_save_prefix" |
| 18833 | |
| 18834 | if test "X$x" = "X-I$additional_includedir"; then |
| 18835 | haveit=yes |
| 18836 | break |
| 18837 | fi |
| 18838 | done |
| 18839 | if test -z "$haveit"; then |
| 18840 | if test -d "$additional_includedir"; then |
| 18841 | INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir" |
| 18842 | fi |
| 18843 | fi |
| 18844 | fi |
| 18845 | fi |
| 18846 | fi |
| 18847 | if test -n "$found_la"; then |
| 18848 | save_libdir="$libdir" |
| 18849 | case "$found_la" in |
| 18850 | */* | *\\*) . "$found_la" ;; |
| 18851 | *) . "./$found_la" ;; |
| 18852 | esac |
| 18853 | libdir="$save_libdir" |
| 18854 | for dep in $dependency_libs; do |
| 18855 | case "$dep" in |
| 18856 | -L*) |
| 18857 | additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'` |
| 18858 | if test "X$additional_libdir" != "X/usr/lib"; then |
| 18859 | haveit= |
| 18860 | if test "X$additional_libdir" = "X/usr/local/lib"; then |
| 18861 | if test -n "$GCC"; then |
| 18862 | case $host_os in |
| 18863 | linux*) haveit=yes;; |
| 18864 | esac |
| 18865 | fi |
| 18866 | fi |
| 18867 | if test -z "$haveit"; then |
| 18868 | haveit= |
| 18869 | for x in $LDFLAGS $LIBXXHASH; do |
| 18870 | |
| 18871 | acl_save_prefix="$prefix" |
| 18872 | prefix="$acl_final_prefix" |
| 18873 | acl_save_exec_prefix="$exec_prefix" |
| 18874 | exec_prefix="$acl_final_exec_prefix" |
| 18875 | eval x=\"$x\" |
| 18876 | exec_prefix="$acl_save_exec_prefix" |
| 18877 | prefix="$acl_save_prefix" |
| 18878 | |
| 18879 | if test "X$x" = "X-L$additional_libdir"; then |
| 18880 | haveit=yes |
| 18881 | break |
| 18882 | fi |
| 18883 | done |
| 18884 | if test -z "$haveit"; then |
| 18885 | if test -d "$additional_libdir"; then |
| 18886 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir" |
| 18887 | fi |
| 18888 | fi |
| 18889 | haveit= |
| 18890 | for x in $LDFLAGS $LTLIBXXHASH; do |
| 18891 | |
| 18892 | acl_save_prefix="$prefix" |
| 18893 | prefix="$acl_final_prefix" |
| 18894 | acl_save_exec_prefix="$exec_prefix" |
| 18895 | exec_prefix="$acl_final_exec_prefix" |
| 18896 | eval x=\"$x\" |
| 18897 | exec_prefix="$acl_save_exec_prefix" |
| 18898 | prefix="$acl_save_prefix" |
| 18899 | |
| 18900 | if test "X$x" = "X-L$additional_libdir"; then |
| 18901 | haveit=yes |
| 18902 | break |
| 18903 | fi |
| 18904 | done |
| 18905 | if test -z "$haveit"; then |
| 18906 | if test -d "$additional_libdir"; then |
| 18907 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir" |
| 18908 | fi |
| 18909 | fi |
| 18910 | fi |
| 18911 | fi |
| 18912 | ;; |
| 18913 | -R*) |
| 18914 | dir=`echo "X$dep" | sed -e 's/^X-R//'` |
| 18915 | if test "$enable_rpath" != no; then |
| 18916 | haveit= |
| 18917 | for x in $rpathdirs; do |
| 18918 | if test "X$x" = "X$dir"; then |
| 18919 | haveit=yes |
| 18920 | break |
| 18921 | fi |
| 18922 | done |
| 18923 | if test -z "$haveit"; then |
| 18924 | rpathdirs="$rpathdirs $dir" |
| 18925 | fi |
| 18926 | haveit= |
| 18927 | for x in $ltrpathdirs; do |
| 18928 | if test "X$x" = "X$dir"; then |
| 18929 | haveit=yes |
| 18930 | break |
| 18931 | fi |
| 18932 | done |
| 18933 | if test -z "$haveit"; then |
| 18934 | ltrpathdirs="$ltrpathdirs $dir" |
| 18935 | fi |
| 18936 | fi |
| 18937 | ;; |
| 18938 | -l*) |
| 18939 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'` |
| 18940 | ;; |
| 18941 | *.la) |
| 18942 | names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'` |
| 18943 | ;; |
| 18944 | *) |
| 18945 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep" |
| 18946 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep" |
| 18947 | ;; |
| 18948 | esac |
| 18949 | done |
| 18950 | fi |
| 18951 | else |
| 18952 | if test "x$lib_type" = "xauto" || test "x$lib_type" = "xshared"; then |
| 18953 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name" |
| 18954 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name" |
| 18955 | else |
| 18956 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l:lib$name.$libext" |
| 18957 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l:lib$name.$libext" |
| 18958 | fi |
| 18959 | fi |
| 18960 | fi |
| 18961 | fi |
| 18962 | done |
| 18963 | done |
| 18964 | if test "X$rpathdirs" != "X"; then |
| 18965 | if test -n "$hardcode_libdir_separator"; then |
| 18966 | alldirs= |
| 18967 | for found_dir in $rpathdirs; do |
| 18968 | alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir" |
| 18969 | done |
| 18970 | acl_save_libdir="$libdir" |
| 18971 | libdir="$alldirs" |
| 18972 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 18973 | libdir="$acl_save_libdir" |
| 18974 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag" |
| 18975 | else |
| 18976 | for found_dir in $rpathdirs; do |
| 18977 | acl_save_libdir="$libdir" |
| 18978 | libdir="$found_dir" |
| 18979 | eval flag=\"$hardcode_libdir_flag_spec\" |
| 18980 | libdir="$acl_save_libdir" |
| 18981 | LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag" |
| 18982 | done |
| 18983 | fi |
| 18984 | fi |
| 18985 | if test "X$ltrpathdirs" != "X"; then |
| 18986 | for found_dir in $ltrpathdirs; do |
| 18987 | LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir" |
| 18988 | done |
| 18989 | fi |
| 18990 | |
| 18991 | |
| 18992 | ac_save_CPPFLAGS="$CPPFLAGS" |
| 18993 | |
| 18994 | for element in $INCXXHASH; do |
| 18995 | haveit= |
| 18996 | for x in $CPPFLAGS; do |
| 18997 | |
| 18998 | acl_save_prefix="$prefix" |
| 18999 | prefix="$acl_final_prefix" |
| 19000 | acl_save_exec_prefix="$exec_prefix" |
| 19001 | exec_prefix="$acl_final_exec_prefix" |
| 19002 | eval x=\"$x\" |
| 19003 | exec_prefix="$acl_save_exec_prefix" |
| 19004 | prefix="$acl_save_prefix" |
| 19005 | |
| 19006 | if test "X$x" = "X$element"; then |
| 19007 | haveit=yes |
| 19008 | break |
| 19009 | fi |
| 19010 | done |
| 19011 | if test -z "$haveit"; then |
| 19012 | CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element" |
| 19013 | fi |
| 19014 | done |
| 19015 | |
| 19016 | |
| 19017 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5 |
| 19018 | $as_echo_n "checking for libxxhash... " >&6; } |
| 19019 | if ${ac_cv_libxxhash+:} false; then : |
| 19020 | $as_echo_n "(cached) " >&6 |
| 19021 | else |
| 19022 | |
| 19023 | ac_save_LIBS="$LIBS" |
| 19024 | LIBS="$LIBS $LIBXXHASH" |
| 19025 | cat confdefs.h - <<_ACEOF >conftest.$ac_ext |
| 19026 | /* end confdefs.h. */ |
| 19027 | #include <xxhash.h> |
| 19028 | int |
| 19029 | main () |
| 19030 | { |
| 19031 | XXH32("foo", 3, 0); |
| 19032 | |
| 19033 | ; |
| 19034 | return 0; |
| 19035 | } |
| 19036 | _ACEOF |
| 19037 | if ac_fn_c_try_link "$LINENO"; then : |
| 19038 | ac_cv_libxxhash=yes |
| 19039 | else |
| 19040 | ac_cv_libxxhash=no |
| 19041 | fi |
| 19042 | rm -f core conftest.err conftest.$ac_objext \ |
| 19043 | conftest$ac_exeext conftest.$ac_ext |
| 19044 | LIBS="$ac_save_LIBS" |
| 19045 | |
| 19046 | fi |
| 19047 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5 |
| 19048 | $as_echo "$ac_cv_libxxhash" >&6; } |
| 19049 | if test "$ac_cv_libxxhash" = yes; then |
| 19050 | HAVE_LIBXXHASH=yes |
| 19051 | |
| 19052 | $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h |
| 19053 | |
| 19054 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5 |
| 19055 | $as_echo_n "checking how to link with libxxhash... " >&6; } |
| 19056 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5 |
| 19057 | $as_echo "$LIBXXHASH" >&6; } |
| 19058 | else |
| 19059 | HAVE_LIBXXHASH=no |
| 19060 | CPPFLAGS="$ac_save_CPPFLAGS" |
| 19061 | LIBXXHASH= |
| 19062 | LTLIBXXHASH= |
| 19063 | fi |
| 19064 | |
| 19065 | |
| 19066 | |
| 19067 | |
| 19068 | |
| 19069 | |
| 19070 | if test "$HAVE_LIBXXHASH" != yes; then |
| 19071 | if test "$with_xxhash" = yes; then |
| 19072 | as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5 |
| 19073 | fi |
| 19074 | fi |
| 19075 | if test "x$with_xxhash" = "xauto"; then |
| 19076 | with_xxhash="$HAVE_LIBXXHASH" |
| 19077 | fi |
| 19078 | fi |
| 19079 | |
| 19080 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5 |
| 19081 | $as_echo_n "checking whether to use xxhash... " >&6; } |
| 19082 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5 |
| 19083 | $as_echo "$with_xxhash" >&6; } |
| 19084 | |
| 19085 | NM_H= |
| 19086 | rm -f nm.h |
| 19087 | if test "${nativefile}" != ""; then |
| 19088 | case "${nativefile}" in |
| 19089 | nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;; |
| 19090 | * ) GDB_NM_FILE="${nativefile}" |
| 19091 | esac |
| 19092 | ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE" |
| 19093 | |
| 19094 | |
| 19095 | cat >>confdefs.h <<_ACEOF |
| 19096 | #define GDB_NM_FILE "${GDB_NM_FILE}" |
| 19097 | _ACEOF |
| 19098 | |
| 19099 | NM_H=nm.h |
| 19100 | fi |
| 19101 | |
| 19102 | |
| 19103 | |
| 19104 | for ac_prog in xsltproc |
| 19105 | do |
| 19106 | # Extract the first word of "$ac_prog", so it can be a program name with args. |
| 19107 | set dummy $ac_prog; ac_word=$2 |
| 19108 | { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 |
| 19109 | $as_echo_n "checking for $ac_word... " >&6; } |
| 19110 | if ${ac_cv_path_XSLTPROC+:} false; then : |
| 19111 | $as_echo_n "(cached) " >&6 |
| 19112 | else |
| 19113 | case $XSLTPROC in |
| 19114 | [\\/]* | ?:[\\/]*) |
| 19115 | ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path. |
| 19116 | ;; |
| 19117 | *) |
| 19118 | as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 19119 | for as_dir in $PATH |
| 19120 | do |
| 19121 | IFS=$as_save_IFS |
| 19122 | test -z "$as_dir" && as_dir=. |
| 19123 | for ac_exec_ext in '' $ac_executable_extensions; do |
| 19124 | if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then |
| 19125 | ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext" |
| 19126 | $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 |
| 19127 | break 2 |
| 19128 | fi |
| 19129 | done |
| 19130 | done |
| 19131 | IFS=$as_save_IFS |
| 19132 | |
| 19133 | ;; |
| 19134 | esac |
| 19135 | fi |
| 19136 | XSLTPROC=$ac_cv_path_XSLTPROC |
| 19137 | if test -n "$XSLTPROC"; then |
| 19138 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5 |
| 19139 | $as_echo "$XSLTPROC" >&6; } |
| 19140 | else |
| 19141 | { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 |
| 19142 | $as_echo "no" >&6; } |
| 19143 | fi |
| 19144 | |
| 19145 | |
| 19146 | test -n "$XSLTPROC" && break |
| 19147 | done |
| 19148 | test -n "$XSLTPROC" || XSLTPROC="missing" |
| 19149 | |
| 19150 | if test "x$USE_MAINTAINER_MODE" = xyes; then |
| 19151 | if test "${XSLTPROC}" = missing; then |
| 19152 | as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5 |
| 19153 | fi |
| 19154 | fi |
| 19155 | |
| 19156 | |
| 19157 | |
| 19158 | |
| 19159 | |
| 19160 | $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h |
| 19161 | |
| 19162 | |
| 19163 | |
| 19164 | # Check whether we will enable the inclusion of unit tests when |
| 19165 | # compiling GDB. |
| 19166 | # |
| 19167 | # The default value of this option changes depending whether we're on |
| 19168 | # development mode (in which case it's "true") or not (in which case |
| 19169 | # it's "false"). The $development variable is set by the GDB_AC_COMMON |
| 19170 | # macro, which must therefore be used before GDB_AC_SELFTEST. |
| 19171 | |
| 19172 | if test "x$development" != xtrue && test "x$development" != xfalse; then : |
| 19173 | as_fn_error $? "Invalid value for \$development, got \"$development\", expecting \"true\" or \"false\"." "$LINENO" 5 |
| 19174 | fi |
| 19175 | |
| 19176 | # Check whether --enable-unit-tests was given. |
| 19177 | if test "${enable_unit_tests+set}" = set; then : |
| 19178 | enableval=$enable_unit_tests; case "${enableval}" in |
| 19179 | yes) enable_unittests=true ;; |
| 19180 | no) enable_unittests=false ;; |
| 19181 | *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;; |
| 19182 | esac |
| 19183 | else |
| 19184 | enable_unittests=$development |
| 19185 | fi |
| 19186 | |
| 19187 | |
| 19188 | if $enable_unittests; then |
| 19189 | |
| 19190 | $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h |
| 19191 | |
| 19192 | |
| 19193 | CONFIG_OBS="$CONFIG_OBS \$(SELFTESTS_OBS)" |
| 19194 | CONFIG_SRCS="$CONFIG_SRCS \$(SELFTESTS_SRCS)" |
| 19195 | |
| 19196 | fi |
| 19197 | |
| 19198 | |
| 19199 | |
| 19200 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` |
| 19201 | GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"` |
| 19202 | if test "x$GDB_TRANSFORM_NAME" = x; then |
| 19203 | GDB_TRANSFORM_NAME=gdb |
| 19204 | fi |
| 19205 | |
| 19206 | |
| 19207 | |
| 19208 | gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'` |
| 19209 | GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"` |
| 19210 | if test "x$GCORE_TRANSFORM_NAME" = x; then |
| 19211 | GCORE_TRANSFORM_NAME=gcore |
| 19212 | fi |
| 19213 | |
| 19214 | |
| 19215 | ac_config_files="$ac_config_files gcore" |
| 19216 | |
| 19217 | ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile" |
| 19218 | |
| 19219 | |
| 19220 | cat >confcache <<\_ACEOF |
| 19221 | # This file is a shell script that caches the results of configure |
| 19222 | # tests run on this system so they can be shared between configure |
| 19223 | # scripts and configure runs, see configure's option --config-cache. |
| 19224 | # It is not useful on other systems. If it contains results you don't |
| 19225 | # want to keep, you may remove or edit it. |
| 19226 | # |
| 19227 | # config.status only pays attention to the cache file if you give it |
| 19228 | # the --recheck option to rerun configure. |
| 19229 | # |
| 19230 | # `ac_cv_env_foo' variables (set or unset) will be overridden when |
| 19231 | # loading this file, other *unset* `ac_cv_foo' will be assigned the |
| 19232 | # following values. |
| 19233 | |
| 19234 | _ACEOF |
| 19235 | |
| 19236 | # The following way of writing the cache mishandles newlines in values, |
| 19237 | # but we know of no workaround that is simple, portable, and efficient. |
| 19238 | # So, we kill variables containing newlines. |
| 19239 | # Ultrix sh set writes to stderr and can't be redirected directly, |
| 19240 | # and sets the high bit in the cache file unless we assign to the vars. |
| 19241 | ( |
| 19242 | for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do |
| 19243 | eval ac_val=\$$ac_var |
| 19244 | case $ac_val in #( |
| 19245 | *${as_nl}*) |
| 19246 | case $ac_var in #( |
| 19247 | *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 |
| 19248 | $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; |
| 19249 | esac |
| 19250 | case $ac_var in #( |
| 19251 | _ | IFS | as_nl) ;; #( |
| 19252 | BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( |
| 19253 | *) { eval $ac_var=; unset $ac_var;} ;; |
| 19254 | esac ;; |
| 19255 | esac |
| 19256 | done |
| 19257 | |
| 19258 | (set) 2>&1 | |
| 19259 | case $as_nl`(ac_space=' '; set) 2>&1` in #( |
| 19260 | *${as_nl}ac_space=\ *) |
| 19261 | # `set' does not quote correctly, so add quotes: double-quote |
| 19262 | # substitution turns \\\\ into \\, and sed turns \\ into \. |
| 19263 | sed -n \ |
| 19264 | "s/'/'\\\\''/g; |
| 19265 | s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" |
| 19266 | ;; #( |
| 19267 | *) |
| 19268 | # `set' quotes correctly as required by POSIX, so do not add quotes. |
| 19269 | sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" |
| 19270 | ;; |
| 19271 | esac | |
| 19272 | sort |
| 19273 | ) | |
| 19274 | sed ' |
| 19275 | /^ac_cv_env_/b end |
| 19276 | t clear |
| 19277 | :clear |
| 19278 | s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ |
| 19279 | t end |
| 19280 | s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ |
| 19281 | :end' >>confcache |
| 19282 | if diff "$cache_file" confcache >/dev/null 2>&1; then :; else |
| 19283 | if test -w "$cache_file"; then |
| 19284 | if test "x$cache_file" != "x/dev/null"; then |
| 19285 | { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 |
| 19286 | $as_echo "$as_me: updating cache $cache_file" >&6;} |
| 19287 | if test ! -f "$cache_file" || test -h "$cache_file"; then |
| 19288 | cat confcache >"$cache_file" |
| 19289 | else |
| 19290 | case $cache_file in #( |
| 19291 | */* | ?:*) |
| 19292 | mv -f confcache "$cache_file"$$ && |
| 19293 | mv -f "$cache_file"$$ "$cache_file" ;; #( |
| 19294 | *) |
| 19295 | mv -f confcache "$cache_file" ;; |
| 19296 | esac |
| 19297 | fi |
| 19298 | fi |
| 19299 | else |
| 19300 | { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 |
| 19301 | $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} |
| 19302 | fi |
| 19303 | fi |
| 19304 | rm -f confcache |
| 19305 | |
| 19306 | test "x$prefix" = xNONE && prefix=$ac_default_prefix |
| 19307 | # Let make expand exec_prefix. |
| 19308 | test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' |
| 19309 | |
| 19310 | DEFS=-DHAVE_CONFIG_H |
| 19311 | |
| 19312 | ac_libobjs= |
| 19313 | ac_ltlibobjs= |
| 19314 | U= |
| 19315 | for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue |
| 19316 | # 1. Remove the extension, and $U if already installed. |
| 19317 | ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' |
| 19318 | ac_i=`$as_echo "$ac_i" | sed "$ac_script"` |
| 19319 | # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR |
| 19320 | # will be set to the directory where LIBOBJS objects are built. |
| 19321 | as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" |
| 19322 | as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' |
| 19323 | done |
| 19324 | LIBOBJS=$ac_libobjs |
| 19325 | |
| 19326 | LTLIBOBJS=$ac_ltlibobjs |
| 19327 | |
| 19328 | |
| 19329 | if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then |
| 19330 | as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. |
| 19331 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
| 19332 | fi |
| 19333 | if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then |
| 19334 | as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined. |
| 19335 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
| 19336 | fi |
| 19337 | if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then |
| 19338 | as_fn_error $? "conditional \"HAVE_GUILE\" was never defined. |
| 19339 | Usually this means the macro was only invoked conditionally." "$LINENO" 5 |
| 19340 | fi |
| 19341 | |
| 19342 | |
| 19343 | : "${CONFIG_STATUS=./config.status}" |
| 19344 | ac_write_fail=0 |
| 19345 | ac_clean_files_save=$ac_clean_files |
| 19346 | ac_clean_files="$ac_clean_files $CONFIG_STATUS" |
| 19347 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 |
| 19348 | $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} |
| 19349 | as_write_fail=0 |
| 19350 | cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 |
| 19351 | #! $SHELL |
| 19352 | # Generated by $as_me. |
| 19353 | # Run this file to recreate the current configuration. |
| 19354 | # Compiler output produced by configure, useful for debugging |
| 19355 | # configure, is in config.log if it exists. |
| 19356 | |
| 19357 | debug=false |
| 19358 | ac_cs_recheck=false |
| 19359 | ac_cs_silent=false |
| 19360 | |
| 19361 | SHELL=\${CONFIG_SHELL-$SHELL} |
| 19362 | export SHELL |
| 19363 | _ASEOF |
| 19364 | cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 |
| 19365 | ## -------------------- ## |
| 19366 | ## M4sh Initialization. ## |
| 19367 | ## -------------------- ## |
| 19368 | |
| 19369 | # Be more Bourne compatible |
| 19370 | DUALCASE=1; export DUALCASE # for MKS sh |
| 19371 | if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : |
| 19372 | emulate sh |
| 19373 | NULLCMD=: |
| 19374 | # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which |
| 19375 | # is contrary to our usage. Disable this feature. |
| 19376 | alias -g '${1+"$@"}'='"$@"' |
| 19377 | setopt NO_GLOB_SUBST |
| 19378 | else |
| 19379 | case `(set -o) 2>/dev/null` in #( |
| 19380 | *posix*) : |
| 19381 | set -o posix ;; #( |
| 19382 | *) : |
| 19383 | ;; |
| 19384 | esac |
| 19385 | fi |
| 19386 | |
| 19387 | |
| 19388 | as_nl=' |
| 19389 | ' |
| 19390 | export as_nl |
| 19391 | # Printing a long string crashes Solaris 7 /usr/bin/printf. |
| 19392 | as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' |
| 19393 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo |
| 19394 | as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo |
| 19395 | # Prefer a ksh shell builtin over an external printf program on Solaris, |
| 19396 | # but without wasting forks for bash or zsh. |
| 19397 | if test -z "$BASH_VERSION$ZSH_VERSION" \ |
| 19398 | && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then |
| 19399 | as_echo='print -r --' |
| 19400 | as_echo_n='print -rn --' |
| 19401 | elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then |
| 19402 | as_echo='printf %s\n' |
| 19403 | as_echo_n='printf %s' |
| 19404 | else |
| 19405 | if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then |
| 19406 | as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' |
| 19407 | as_echo_n='/usr/ucb/echo -n' |
| 19408 | else |
| 19409 | as_echo_body='eval expr "X$1" : "X\\(.*\\)"' |
| 19410 | as_echo_n_body='eval |
| 19411 | arg=$1; |
| 19412 | case $arg in #( |
| 19413 | *"$as_nl"*) |
| 19414 | expr "X$arg" : "X\\(.*\\)$as_nl"; |
| 19415 | arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; |
| 19416 | esac; |
| 19417 | expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" |
| 19418 | ' |
| 19419 | export as_echo_n_body |
| 19420 | as_echo_n='sh -c $as_echo_n_body as_echo' |
| 19421 | fi |
| 19422 | export as_echo_body |
| 19423 | as_echo='sh -c $as_echo_body as_echo' |
| 19424 | fi |
| 19425 | |
| 19426 | # The user is always right. |
| 19427 | if test "${PATH_SEPARATOR+set}" != set; then |
| 19428 | PATH_SEPARATOR=: |
| 19429 | (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { |
| 19430 | (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || |
| 19431 | PATH_SEPARATOR=';' |
| 19432 | } |
| 19433 | fi |
| 19434 | |
| 19435 | |
| 19436 | # IFS |
| 19437 | # We need space, tab and new line, in precisely that order. Quoting is |
| 19438 | # there to prevent editors from complaining about space-tab. |
| 19439 | # (If _AS_PATH_WALK were called with IFS unset, it would disable word |
| 19440 | # splitting by setting IFS to empty value.) |
| 19441 | IFS=" "" $as_nl" |
| 19442 | |
| 19443 | # Find who we are. Look in the path if we contain no directory separator. |
| 19444 | as_myself= |
| 19445 | case $0 in #(( |
| 19446 | *[\\/]* ) as_myself=$0 ;; |
| 19447 | *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR |
| 19448 | for as_dir in $PATH |
| 19449 | do |
| 19450 | IFS=$as_save_IFS |
| 19451 | test -z "$as_dir" && as_dir=. |
| 19452 | test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break |
| 19453 | done |
| 19454 | IFS=$as_save_IFS |
| 19455 | |
| 19456 | ;; |
| 19457 | esac |
| 19458 | # We did not find ourselves, most probably we were run as `sh COMMAND' |
| 19459 | # in which case we are not to be found in the path. |
| 19460 | if test "x$as_myself" = x; then |
| 19461 | as_myself=$0 |
| 19462 | fi |
| 19463 | if test ! -f "$as_myself"; then |
| 19464 | $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 |
| 19465 | exit 1 |
| 19466 | fi |
| 19467 | |
| 19468 | # Unset variables that we do not need and which cause bugs (e.g. in |
| 19469 | # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" |
| 19470 | # suppresses any "Segmentation fault" message there. '((' could |
| 19471 | # trigger a bug in pdksh 5.2.14. |
| 19472 | for as_var in BASH_ENV ENV MAIL MAILPATH |
| 19473 | do eval test x\${$as_var+set} = xset \ |
| 19474 | && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : |
| 19475 | done |
| 19476 | PS1='$ ' |
| 19477 | PS2='> ' |
| 19478 | PS4='+ ' |
| 19479 | |
| 19480 | # NLS nuisances. |
| 19481 | LC_ALL=C |
| 19482 | export LC_ALL |
| 19483 | LANGUAGE=C |
| 19484 | export LANGUAGE |
| 19485 | |
| 19486 | # CDPATH. |
| 19487 | (unset CDPATH) >/dev/null 2>&1 && unset CDPATH |
| 19488 | |
| 19489 | |
| 19490 | # as_fn_error STATUS ERROR [LINENO LOG_FD] |
| 19491 | # ---------------------------------------- |
| 19492 | # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are |
| 19493 | # provided, also output the error to LOG_FD, referencing LINENO. Then exit the |
| 19494 | # script with STATUS, using 1 if that was 0. |
| 19495 | as_fn_error () |
| 19496 | { |
| 19497 | as_status=$1; test $as_status -eq 0 && as_status=1 |
| 19498 | if test "$4"; then |
| 19499 | as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack |
| 19500 | $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 |
| 19501 | fi |
| 19502 | $as_echo "$as_me: error: $2" >&2 |
| 19503 | as_fn_exit $as_status |
| 19504 | } # as_fn_error |
| 19505 | |
| 19506 | |
| 19507 | # as_fn_set_status STATUS |
| 19508 | # ----------------------- |
| 19509 | # Set $? to STATUS, without forking. |
| 19510 | as_fn_set_status () |
| 19511 | { |
| 19512 | return $1 |
| 19513 | } # as_fn_set_status |
| 19514 | |
| 19515 | # as_fn_exit STATUS |
| 19516 | # ----------------- |
| 19517 | # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. |
| 19518 | as_fn_exit () |
| 19519 | { |
| 19520 | set +e |
| 19521 | as_fn_set_status $1 |
| 19522 | exit $1 |
| 19523 | } # as_fn_exit |
| 19524 | |
| 19525 | # as_fn_unset VAR |
| 19526 | # --------------- |
| 19527 | # Portably unset VAR. |
| 19528 | as_fn_unset () |
| 19529 | { |
| 19530 | { eval $1=; unset $1;} |
| 19531 | } |
| 19532 | as_unset=as_fn_unset |
| 19533 | # as_fn_append VAR VALUE |
| 19534 | # ---------------------- |
| 19535 | # Append the text in VALUE to the end of the definition contained in VAR. Take |
| 19536 | # advantage of any shell optimizations that allow amortized linear growth over |
| 19537 | # repeated appends, instead of the typical quadratic growth present in naive |
| 19538 | # implementations. |
| 19539 | if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : |
| 19540 | eval 'as_fn_append () |
| 19541 | { |
| 19542 | eval $1+=\$2 |
| 19543 | }' |
| 19544 | else |
| 19545 | as_fn_append () |
| 19546 | { |
| 19547 | eval $1=\$$1\$2 |
| 19548 | } |
| 19549 | fi # as_fn_append |
| 19550 | |
| 19551 | # as_fn_arith ARG... |
| 19552 | # ------------------ |
| 19553 | # Perform arithmetic evaluation on the ARGs, and store the result in the |
| 19554 | # global $as_val. Take advantage of shells that can avoid forks. The arguments |
| 19555 | # must be portable across $(()) and expr. |
| 19556 | if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : |
| 19557 | eval 'as_fn_arith () |
| 19558 | { |
| 19559 | as_val=$(( $* )) |
| 19560 | }' |
| 19561 | else |
| 19562 | as_fn_arith () |
| 19563 | { |
| 19564 | as_val=`expr "$@" || test $? -eq 1` |
| 19565 | } |
| 19566 | fi # as_fn_arith |
| 19567 | |
| 19568 | |
| 19569 | if expr a : '\(a\)' >/dev/null 2>&1 && |
| 19570 | test "X`expr 00001 : '.*\(...\)'`" = X001; then |
| 19571 | as_expr=expr |
| 19572 | else |
| 19573 | as_expr=false |
| 19574 | fi |
| 19575 | |
| 19576 | if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then |
| 19577 | as_basename=basename |
| 19578 | else |
| 19579 | as_basename=false |
| 19580 | fi |
| 19581 | |
| 19582 | if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then |
| 19583 | as_dirname=dirname |
| 19584 | else |
| 19585 | as_dirname=false |
| 19586 | fi |
| 19587 | |
| 19588 | as_me=`$as_basename -- "$0" || |
| 19589 | $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ |
| 19590 | X"$0" : 'X\(//\)$' \| \ |
| 19591 | X"$0" : 'X\(/\)' \| . 2>/dev/null || |
| 19592 | $as_echo X/"$0" | |
| 19593 | sed '/^.*\/\([^/][^/]*\)\/*$/{ |
| 19594 | s//\1/ |
| 19595 | q |
| 19596 | } |
| 19597 | /^X\/\(\/\/\)$/{ |
| 19598 | s//\1/ |
| 19599 | q |
| 19600 | } |
| 19601 | /^X\/\(\/\).*/{ |
| 19602 | s//\1/ |
| 19603 | q |
| 19604 | } |
| 19605 | s/.*/./; q'` |
| 19606 | |
| 19607 | # Avoid depending upon Character Ranges. |
| 19608 | as_cr_letters='abcdefghijklmnopqrstuvwxyz' |
| 19609 | as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' |
| 19610 | as_cr_Letters=$as_cr_letters$as_cr_LETTERS |
| 19611 | as_cr_digits='0123456789' |
| 19612 | as_cr_alnum=$as_cr_Letters$as_cr_digits |
| 19613 | |
| 19614 | ECHO_C= ECHO_N= ECHO_T= |
| 19615 | case `echo -n x` in #((((( |
| 19616 | -n*) |
| 19617 | case `echo 'xy\c'` in |
| 19618 | *c*) ECHO_T=' ';; # ECHO_T is single tab character. |
| 19619 | xy) ECHO_C='\c';; |
| 19620 | *) echo `echo ksh88 bug on AIX 6.1` > /dev/null |
| 19621 | ECHO_T=' ';; |
| 19622 | esac;; |
| 19623 | *) |
| 19624 | ECHO_N='-n';; |
| 19625 | esac |
| 19626 | |
| 19627 | rm -f conf$$ conf$$.exe conf$$.file |
| 19628 | if test -d conf$$.dir; then |
| 19629 | rm -f conf$$.dir/conf$$.file |
| 19630 | else |
| 19631 | rm -f conf$$.dir |
| 19632 | mkdir conf$$.dir 2>/dev/null |
| 19633 | fi |
| 19634 | if (echo >conf$$.file) 2>/dev/null; then |
| 19635 | if ln -s conf$$.file conf$$ 2>/dev/null; then |
| 19636 | as_ln_s='ln -s' |
| 19637 | # ... but there are two gotchas: |
| 19638 | # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. |
| 19639 | # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. |
| 19640 | # In both cases, we have to default to `cp -pR'. |
| 19641 | ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || |
| 19642 | as_ln_s='cp -pR' |
| 19643 | elif ln conf$$.file conf$$ 2>/dev/null; then |
| 19644 | as_ln_s=ln |
| 19645 | else |
| 19646 | as_ln_s='cp -pR' |
| 19647 | fi |
| 19648 | else |
| 19649 | as_ln_s='cp -pR' |
| 19650 | fi |
| 19651 | rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file |
| 19652 | rmdir conf$$.dir 2>/dev/null |
| 19653 | |
| 19654 | |
| 19655 | # as_fn_mkdir_p |
| 19656 | # ------------- |
| 19657 | # Create "$as_dir" as a directory, including parents if necessary. |
| 19658 | as_fn_mkdir_p () |
| 19659 | { |
| 19660 | |
| 19661 | case $as_dir in #( |
| 19662 | -*) as_dir=./$as_dir;; |
| 19663 | esac |
| 19664 | test -d "$as_dir" || eval $as_mkdir_p || { |
| 19665 | as_dirs= |
| 19666 | while :; do |
| 19667 | case $as_dir in #( |
| 19668 | *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( |
| 19669 | *) as_qdir=$as_dir;; |
| 19670 | esac |
| 19671 | as_dirs="'$as_qdir' $as_dirs" |
| 19672 | as_dir=`$as_dirname -- "$as_dir" || |
| 19673 | $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
| 19674 | X"$as_dir" : 'X\(//\)[^/]' \| \ |
| 19675 | X"$as_dir" : 'X\(//\)$' \| \ |
| 19676 | X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || |
| 19677 | $as_echo X"$as_dir" | |
| 19678 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
| 19679 | s//\1/ |
| 19680 | q |
| 19681 | } |
| 19682 | /^X\(\/\/\)[^/].*/{ |
| 19683 | s//\1/ |
| 19684 | q |
| 19685 | } |
| 19686 | /^X\(\/\/\)$/{ |
| 19687 | s//\1/ |
| 19688 | q |
| 19689 | } |
| 19690 | /^X\(\/\).*/{ |
| 19691 | s//\1/ |
| 19692 | q |
| 19693 | } |
| 19694 | s/.*/./; q'` |
| 19695 | test -d "$as_dir" && break |
| 19696 | done |
| 19697 | test -z "$as_dirs" || eval "mkdir $as_dirs" |
| 19698 | } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" |
| 19699 | |
| 19700 | |
| 19701 | } # as_fn_mkdir_p |
| 19702 | if mkdir -p . 2>/dev/null; then |
| 19703 | as_mkdir_p='mkdir -p "$as_dir"' |
| 19704 | else |
| 19705 | test -d ./-p && rmdir ./-p |
| 19706 | as_mkdir_p=false |
| 19707 | fi |
| 19708 | |
| 19709 | |
| 19710 | # as_fn_executable_p FILE |
| 19711 | # ----------------------- |
| 19712 | # Test if FILE is an executable regular file. |
| 19713 | as_fn_executable_p () |
| 19714 | { |
| 19715 | test -f "$1" && test -x "$1" |
| 19716 | } # as_fn_executable_p |
| 19717 | as_test_x='test -x' |
| 19718 | as_executable_p=as_fn_executable_p |
| 19719 | |
| 19720 | # Sed expression to map a string onto a valid CPP name. |
| 19721 | as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" |
| 19722 | |
| 19723 | # Sed expression to map a string onto a valid variable name. |
| 19724 | as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" |
| 19725 | |
| 19726 | |
| 19727 | exec 6>&1 |
| 19728 | ## ----------------------------------- ## |
| 19729 | ## Main body of $CONFIG_STATUS script. ## |
| 19730 | ## ----------------------------------- ## |
| 19731 | _ASEOF |
| 19732 | test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 |
| 19733 | |
| 19734 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 19735 | # Save the log message, to keep $0 and so on meaningful, and to |
| 19736 | # report actual input values of CONFIG_FILES etc. instead of their |
| 19737 | # values after options handling. |
| 19738 | ac_log=" |
| 19739 | This file was extended by $as_me, which was |
| 19740 | generated by GNU Autoconf 2.69. Invocation command line was |
| 19741 | |
| 19742 | CONFIG_FILES = $CONFIG_FILES |
| 19743 | CONFIG_HEADERS = $CONFIG_HEADERS |
| 19744 | CONFIG_LINKS = $CONFIG_LINKS |
| 19745 | CONFIG_COMMANDS = $CONFIG_COMMANDS |
| 19746 | $ $0 $@ |
| 19747 | |
| 19748 | on `(hostname || uname -n) 2>/dev/null | sed 1q` |
| 19749 | " |
| 19750 | |
| 19751 | _ACEOF |
| 19752 | |
| 19753 | case $ac_config_files in *" |
| 19754 | "*) set x $ac_config_files; shift; ac_config_files=$*;; |
| 19755 | esac |
| 19756 | |
| 19757 | case $ac_config_headers in *" |
| 19758 | "*) set x $ac_config_headers; shift; ac_config_headers=$*;; |
| 19759 | esac |
| 19760 | |
| 19761 | |
| 19762 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 19763 | # Files that config.status was made for. |
| 19764 | config_files="$ac_config_files" |
| 19765 | config_headers="$ac_config_headers" |
| 19766 | config_links="$ac_config_links" |
| 19767 | config_commands="$ac_config_commands" |
| 19768 | |
| 19769 | _ACEOF |
| 19770 | |
| 19771 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 19772 | ac_cs_usage="\ |
| 19773 | \`$as_me' instantiates files and other configuration actions |
| 19774 | from templates according to the current configuration. Unless the files |
| 19775 | and actions are specified as TAGs, all are instantiated by default. |
| 19776 | |
| 19777 | Usage: $0 [OPTION]... [TAG]... |
| 19778 | |
| 19779 | -h, --help print this help, then exit |
| 19780 | -V, --version print version number and configuration settings, then exit |
| 19781 | --config print configuration, then exit |
| 19782 | -q, --quiet, --silent |
| 19783 | do not print progress messages |
| 19784 | -d, --debug don't remove temporary files |
| 19785 | --recheck update $as_me by reconfiguring in the same conditions |
| 19786 | --file=FILE[:TEMPLATE] |
| 19787 | instantiate the configuration file FILE |
| 19788 | --header=FILE[:TEMPLATE] |
| 19789 | instantiate the configuration header FILE |
| 19790 | |
| 19791 | Configuration files: |
| 19792 | $config_files |
| 19793 | |
| 19794 | Configuration headers: |
| 19795 | $config_headers |
| 19796 | |
| 19797 | Configuration links: |
| 19798 | $config_links |
| 19799 | |
| 19800 | Configuration commands: |
| 19801 | $config_commands |
| 19802 | |
| 19803 | Report bugs to the package provider." |
| 19804 | |
| 19805 | _ACEOF |
| 19806 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 19807 | ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" |
| 19808 | ac_cs_version="\\ |
| 19809 | config.status |
| 19810 | configured by $0, generated by GNU Autoconf 2.69, |
| 19811 | with options \\"\$ac_cs_config\\" |
| 19812 | |
| 19813 | Copyright (C) 2012 Free Software Foundation, Inc. |
| 19814 | This config.status script is free software; the Free Software Foundation |
| 19815 | gives unlimited permission to copy, distribute and modify it." |
| 19816 | |
| 19817 | ac_pwd='$ac_pwd' |
| 19818 | srcdir='$srcdir' |
| 19819 | INSTALL='$INSTALL' |
| 19820 | AWK='$AWK' |
| 19821 | test -n "\$AWK" || AWK=awk |
| 19822 | _ACEOF |
| 19823 | |
| 19824 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 19825 | # The default lists apply if the user does not specify any file. |
| 19826 | ac_need_defaults=: |
| 19827 | while test $# != 0 |
| 19828 | do |
| 19829 | case $1 in |
| 19830 | --*=?*) |
| 19831 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
| 19832 | ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` |
| 19833 | ac_shift=: |
| 19834 | ;; |
| 19835 | --*=) |
| 19836 | ac_option=`expr "X$1" : 'X\([^=]*\)='` |
| 19837 | ac_optarg= |
| 19838 | ac_shift=: |
| 19839 | ;; |
| 19840 | *) |
| 19841 | ac_option=$1 |
| 19842 | ac_optarg=$2 |
| 19843 | ac_shift=shift |
| 19844 | ;; |
| 19845 | esac |
| 19846 | |
| 19847 | case $ac_option in |
| 19848 | # Handling of the options. |
| 19849 | -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) |
| 19850 | ac_cs_recheck=: ;; |
| 19851 | --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) |
| 19852 | $as_echo "$ac_cs_version"; exit ;; |
| 19853 | --config | --confi | --conf | --con | --co | --c ) |
| 19854 | $as_echo "$ac_cs_config"; exit ;; |
| 19855 | --debug | --debu | --deb | --de | --d | -d ) |
| 19856 | debug=: ;; |
| 19857 | --file | --fil | --fi | --f ) |
| 19858 | $ac_shift |
| 19859 | case $ac_optarg in |
| 19860 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; |
| 19861 | '') as_fn_error $? "missing file argument" ;; |
| 19862 | esac |
| 19863 | as_fn_append CONFIG_FILES " '$ac_optarg'" |
| 19864 | ac_need_defaults=false;; |
| 19865 | --header | --heade | --head | --hea ) |
| 19866 | $ac_shift |
| 19867 | case $ac_optarg in |
| 19868 | *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; |
| 19869 | esac |
| 19870 | as_fn_append CONFIG_HEADERS " '$ac_optarg'" |
| 19871 | ac_need_defaults=false;; |
| 19872 | --he | --h) |
| 19873 | # Conflict between --help and --header |
| 19874 | as_fn_error $? "ambiguous option: \`$1' |
| 19875 | Try \`$0 --help' for more information.";; |
| 19876 | --help | --hel | -h ) |
| 19877 | $as_echo "$ac_cs_usage"; exit ;; |
| 19878 | -q | -quiet | --quiet | --quie | --qui | --qu | --q \ |
| 19879 | | -silent | --silent | --silen | --sile | --sil | --si | --s) |
| 19880 | ac_cs_silent=: ;; |
| 19881 | |
| 19882 | # This is an error. |
| 19883 | -*) as_fn_error $? "unrecognized option: \`$1' |
| 19884 | Try \`$0 --help' for more information." ;; |
| 19885 | |
| 19886 | *) as_fn_append ac_config_targets " $1" |
| 19887 | ac_need_defaults=false ;; |
| 19888 | |
| 19889 | esac |
| 19890 | shift |
| 19891 | done |
| 19892 | |
| 19893 | ac_configure_extra_args= |
| 19894 | |
| 19895 | if $ac_cs_silent; then |
| 19896 | exec 6>/dev/null |
| 19897 | ac_configure_extra_args="$ac_configure_extra_args --silent" |
| 19898 | fi |
| 19899 | |
| 19900 | _ACEOF |
| 19901 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 19902 | if \$ac_cs_recheck; then |
| 19903 | set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion |
| 19904 | shift |
| 19905 | \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 |
| 19906 | CONFIG_SHELL='$SHELL' |
| 19907 | export CONFIG_SHELL |
| 19908 | exec "\$@" |
| 19909 | fi |
| 19910 | |
| 19911 | _ACEOF |
| 19912 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 19913 | exec 5>>config.log |
| 19914 | { |
| 19915 | echo |
| 19916 | sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX |
| 19917 | ## Running $as_me. ## |
| 19918 | _ASBOX |
| 19919 | $as_echo "$ac_log" |
| 19920 | } >&5 |
| 19921 | |
| 19922 | _ACEOF |
| 19923 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 19924 | # |
| 19925 | # INIT-COMMANDS |
| 19926 | # |
| 19927 | ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR |
| 19928 | GDB_NM_FILE=$GDB_NM_FILE |
| 19929 | |
| 19930 | _ACEOF |
| 19931 | |
| 19932 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 19933 | |
| 19934 | # Handling of arguments. |
| 19935 | for ac_config_target in $ac_config_targets |
| 19936 | do |
| 19937 | case $ac_config_target in |
| 19938 | "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;; |
| 19939 | "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;; |
| 19940 | "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;; |
| 19941 | "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;; |
| 19942 | "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;; |
| 19943 | "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; |
| 19944 | "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;; |
| 19945 | "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;; |
| 19946 | "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; |
| 19947 | "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;; |
| 19948 | |
| 19949 | *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; |
| 19950 | esac |
| 19951 | done |
| 19952 | |
| 19953 | |
| 19954 | # If the user did not use the arguments to specify the items to instantiate, |
| 19955 | # then the envvar interface is used. Set only those that are not. |
| 19956 | # We use the long form for the default assignment because of an extremely |
| 19957 | # bizarre bug on SunOS 4.1.3. |
| 19958 | if $ac_need_defaults; then |
| 19959 | test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files |
| 19960 | test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers |
| 19961 | test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links |
| 19962 | test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands |
| 19963 | fi |
| 19964 | |
| 19965 | # Have a temporary directory for convenience. Make it in the build tree |
| 19966 | # simply because there is no reason against having it here, and in addition, |
| 19967 | # creating and moving files from /tmp can sometimes cause problems. |
| 19968 | # Hook for its removal unless debugging. |
| 19969 | # Note that there is a small window in which the directory will not be cleaned: |
| 19970 | # after its creation but before its name has been assigned to `$tmp'. |
| 19971 | $debug || |
| 19972 | { |
| 19973 | tmp= ac_tmp= |
| 19974 | trap 'exit_status=$? |
| 19975 | : "${ac_tmp:=$tmp}" |
| 19976 | { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status |
| 19977 | ' 0 |
| 19978 | trap 'as_fn_exit 1' 1 2 13 15 |
| 19979 | } |
| 19980 | # Create a (secure) tmp directory for tmp files. |
| 19981 | |
| 19982 | { |
| 19983 | tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && |
| 19984 | test -d "$tmp" |
| 19985 | } || |
| 19986 | { |
| 19987 | tmp=./conf$$-$RANDOM |
| 19988 | (umask 077 && mkdir "$tmp") |
| 19989 | } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 |
| 19990 | ac_tmp=$tmp |
| 19991 | |
| 19992 | # Set up the scripts for CONFIG_FILES section. |
| 19993 | # No need to generate them if there are no CONFIG_FILES. |
| 19994 | # This happens for instance with `./config.status config.h'. |
| 19995 | if test -n "$CONFIG_FILES"; then |
| 19996 | |
| 19997 | if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then |
| 19998 | ac_cs_awk_getline=: |
| 19999 | ac_cs_awk_pipe_init= |
| 20000 | ac_cs_awk_read_file=' |
| 20001 | while ((getline aline < (F[key])) > 0) |
| 20002 | print(aline) |
| 20003 | close(F[key])' |
| 20004 | ac_cs_awk_pipe_fini= |
| 20005 | else |
| 20006 | ac_cs_awk_getline=false |
| 20007 | ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\"" |
| 20008 | ac_cs_awk_read_file=' |
| 20009 | print "|#_!!_#|" |
| 20010 | print "cat " F[key] " &&" |
| 20011 | '$ac_cs_awk_pipe_init |
| 20012 | # The final `:' finishes the AND list. |
| 20013 | ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }' |
| 20014 | fi |
| 20015 | ac_cr=`echo X | tr X '\015'` |
| 20016 | # On cygwin, bash can eat \r inside `` if the user requested igncr. |
| 20017 | # But we know of no other shell where ac_cr would be empty at this |
| 20018 | # point, so we can use a bashism as a fallback. |
| 20019 | if test "x$ac_cr" = x; then |
| 20020 | eval ac_cr=\$\'\\r\' |
| 20021 | fi |
| 20022 | ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null` |
| 20023 | if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then |
| 20024 | ac_cs_awk_cr='\\r' |
| 20025 | else |
| 20026 | ac_cs_awk_cr=$ac_cr |
| 20027 | fi |
| 20028 | |
| 20029 | echo 'BEGIN {' >"$ac_tmp/subs1.awk" && |
| 20030 | _ACEOF |
| 20031 | |
| 20032 | # Create commands to substitute file output variables. |
| 20033 | { |
| 20034 | echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" && |
| 20035 | echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' && |
| 20036 | echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' && |
| 20037 | echo "_ACAWK" && |
| 20038 | echo "_ACEOF" |
| 20039 | } >conf$$files.sh && |
| 20040 | . ./conf$$files.sh || |
| 20041 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
| 20042 | rm -f conf$$files.sh |
| 20043 | |
| 20044 | { |
| 20045 | echo "cat >conf$$subs.awk <<_ACEOF" && |
| 20046 | echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && |
| 20047 | echo "_ACEOF" |
| 20048 | } >conf$$subs.sh || |
| 20049 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
| 20050 | ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` |
| 20051 | ac_delim='%!_!# ' |
| 20052 | for ac_last_try in false false false false false :; do |
| 20053 | . ./conf$$subs.sh || |
| 20054 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
| 20055 | |
| 20056 | ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` |
| 20057 | if test $ac_delim_n = $ac_delim_num; then |
| 20058 | break |
| 20059 | elif $ac_last_try; then |
| 20060 | as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 |
| 20061 | else |
| 20062 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " |
| 20063 | fi |
| 20064 | done |
| 20065 | rm -f conf$$subs.sh |
| 20066 | |
| 20067 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 20068 | cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && |
| 20069 | _ACEOF |
| 20070 | sed -n ' |
| 20071 | h |
| 20072 | s/^/S["/; s/!.*/"]=/ |
| 20073 | p |
| 20074 | g |
| 20075 | s/^[^!]*!// |
| 20076 | :repl |
| 20077 | t repl |
| 20078 | s/'"$ac_delim"'$// |
| 20079 | t delim |
| 20080 | :nl |
| 20081 | h |
| 20082 | s/\(.\{148\}\)..*/\1/ |
| 20083 | t more1 |
| 20084 | s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ |
| 20085 | p |
| 20086 | n |
| 20087 | b repl |
| 20088 | :more1 |
| 20089 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ |
| 20090 | p |
| 20091 | g |
| 20092 | s/.\{148\}// |
| 20093 | t nl |
| 20094 | :delim |
| 20095 | h |
| 20096 | s/\(.\{148\}\)..*/\1/ |
| 20097 | t more2 |
| 20098 | s/["\\]/\\&/g; s/^/"/; s/$/"/ |
| 20099 | p |
| 20100 | b |
| 20101 | :more2 |
| 20102 | s/["\\]/\\&/g; s/^/"/; s/$/"\\/ |
| 20103 | p |
| 20104 | g |
| 20105 | s/.\{148\}// |
| 20106 | t delim |
| 20107 | ' <conf$$subs.awk | sed ' |
| 20108 | /^[^""]/{ |
| 20109 | N |
| 20110 | s/\n// |
| 20111 | } |
| 20112 | ' >>$CONFIG_STATUS || ac_write_fail=1 |
| 20113 | rm -f conf$$subs.awk |
| 20114 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 20115 | _ACAWK |
| 20116 | cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && |
| 20117 | for (key in S) S_is_set[key] = 1 |
| 20118 | FS = "\a" |
| 20119 | \$ac_cs_awk_pipe_init |
| 20120 | } |
| 20121 | { |
| 20122 | line = $ 0 |
| 20123 | nfields = split(line, field, "@") |
| 20124 | substed = 0 |
| 20125 | len = length(field[1]) |
| 20126 | for (i = 2; i < nfields; i++) { |
| 20127 | key = field[i] |
| 20128 | keylen = length(key) |
| 20129 | if (S_is_set[key]) { |
| 20130 | value = S[key] |
| 20131 | line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) |
| 20132 | len += length(value) + length(field[++i]) |
| 20133 | substed = 1 |
| 20134 | } else |
| 20135 | len += 1 + keylen |
| 20136 | } |
| 20137 | if (nfields == 3 && !substed) { |
| 20138 | key = field[2] |
| 20139 | if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) { |
| 20140 | \$ac_cs_awk_read_file |
| 20141 | next |
| 20142 | } |
| 20143 | } |
| 20144 | print line |
| 20145 | } |
| 20146 | \$ac_cs_awk_pipe_fini |
| 20147 | _ACAWK |
| 20148 | _ACEOF |
| 20149 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 20150 | if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then |
| 20151 | sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" |
| 20152 | else |
| 20153 | cat |
| 20154 | fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ |
| 20155 | || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 |
| 20156 | _ACEOF |
| 20157 | |
| 20158 | # VPATH may cause trouble with some makes, so we remove sole $(srcdir), |
| 20159 | # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and |
| 20160 | # trailing colons and then remove the whole line if VPATH becomes empty |
| 20161 | # (actually we leave an empty line to preserve line numbers). |
| 20162 | if test "x$srcdir" = x.; then |
| 20163 | ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ |
| 20164 | h |
| 20165 | s/// |
| 20166 | s/^/:/ |
| 20167 | s/[ ]*$/:/ |
| 20168 | s/:\$(srcdir):/:/g |
| 20169 | s/:\${srcdir}:/:/g |
| 20170 | s/:@srcdir@:/:/g |
| 20171 | s/^:*// |
| 20172 | s/:*$// |
| 20173 | x |
| 20174 | s/\(=[ ]*\).*/\1/ |
| 20175 | G |
| 20176 | s/\n// |
| 20177 | s/^[^=]*=[ ]*$// |
| 20178 | }' |
| 20179 | fi |
| 20180 | |
| 20181 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 20182 | fi # test -n "$CONFIG_FILES" |
| 20183 | |
| 20184 | # Set up the scripts for CONFIG_HEADERS section. |
| 20185 | # No need to generate them if there are no CONFIG_HEADERS. |
| 20186 | # This happens for instance with `./config.status Makefile'. |
| 20187 | if test -n "$CONFIG_HEADERS"; then |
| 20188 | cat >"$ac_tmp/defines.awk" <<\_ACAWK || |
| 20189 | BEGIN { |
| 20190 | _ACEOF |
| 20191 | |
| 20192 | # Transform confdefs.h into an awk script `defines.awk', embedded as |
| 20193 | # here-document in config.status, that substitutes the proper values into |
| 20194 | # config.h.in to produce config.h. |
| 20195 | |
| 20196 | # Create a delimiter string that does not exist in confdefs.h, to ease |
| 20197 | # handling of long lines. |
| 20198 | ac_delim='%!_!# ' |
| 20199 | for ac_last_try in false false :; do |
| 20200 | ac_tt=`sed -n "/$ac_delim/p" confdefs.h` |
| 20201 | if test -z "$ac_tt"; then |
| 20202 | break |
| 20203 | elif $ac_last_try; then |
| 20204 | as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 |
| 20205 | else |
| 20206 | ac_delim="$ac_delim!$ac_delim _$ac_delim!! " |
| 20207 | fi |
| 20208 | done |
| 20209 | |
| 20210 | # For the awk script, D is an array of macro values keyed by name, |
| 20211 | # likewise P contains macro parameters if any. Preserve backslash |
| 20212 | # newline sequences. |
| 20213 | |
| 20214 | ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* |
| 20215 | sed -n ' |
| 20216 | s/.\{148\}/&'"$ac_delim"'/g |
| 20217 | t rset |
| 20218 | :rset |
| 20219 | s/^[ ]*#[ ]*define[ ][ ]*/ / |
| 20220 | t def |
| 20221 | d |
| 20222 | :def |
| 20223 | s/\\$// |
| 20224 | t bsnl |
| 20225 | s/["\\]/\\&/g |
| 20226 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ |
| 20227 | D["\1"]=" \3"/p |
| 20228 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p |
| 20229 | d |
| 20230 | :bsnl |
| 20231 | s/["\\]/\\&/g |
| 20232 | s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ |
| 20233 | D["\1"]=" \3\\\\\\n"\\/p |
| 20234 | t cont |
| 20235 | s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p |
| 20236 | t cont |
| 20237 | d |
| 20238 | :cont |
| 20239 | n |
| 20240 | s/.\{148\}/&'"$ac_delim"'/g |
| 20241 | t clear |
| 20242 | :clear |
| 20243 | s/\\$// |
| 20244 | t bsnlc |
| 20245 | s/["\\]/\\&/g; s/^/"/; s/$/"/p |
| 20246 | d |
| 20247 | :bsnlc |
| 20248 | s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p |
| 20249 | b cont |
| 20250 | ' <confdefs.h | sed ' |
| 20251 | s/'"$ac_delim"'/"\\\ |
| 20252 | "/g' >>$CONFIG_STATUS || ac_write_fail=1 |
| 20253 | |
| 20254 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 20255 | for (key in D) D_is_set[key] = 1 |
| 20256 | FS = "\a" |
| 20257 | } |
| 20258 | /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { |
| 20259 | line = \$ 0 |
| 20260 | split(line, arg, " ") |
| 20261 | if (arg[1] == "#") { |
| 20262 | defundef = arg[2] |
| 20263 | mac1 = arg[3] |
| 20264 | } else { |
| 20265 | defundef = substr(arg[1], 2) |
| 20266 | mac1 = arg[2] |
| 20267 | } |
| 20268 | split(mac1, mac2, "(") #) |
| 20269 | macro = mac2[1] |
| 20270 | prefix = substr(line, 1, index(line, defundef) - 1) |
| 20271 | if (D_is_set[macro]) { |
| 20272 | # Preserve the white space surrounding the "#". |
| 20273 | print prefix "define", macro P[macro] D[macro] |
| 20274 | next |
| 20275 | } else { |
| 20276 | # Replace #undef with comments. This is necessary, for example, |
| 20277 | # in the case of _POSIX_SOURCE, which is predefined and required |
| 20278 | # on some systems where configure will not decide to define it. |
| 20279 | if (defundef == "undef") { |
| 20280 | print "/*", prefix defundef, macro, "*/" |
| 20281 | next |
| 20282 | } |
| 20283 | } |
| 20284 | } |
| 20285 | { print } |
| 20286 | _ACAWK |
| 20287 | _ACEOF |
| 20288 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 20289 | as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 |
| 20290 | fi # test -n "$CONFIG_HEADERS" |
| 20291 | |
| 20292 | |
| 20293 | eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" |
| 20294 | shift |
| 20295 | for ac_tag |
| 20296 | do |
| 20297 | case $ac_tag in |
| 20298 | :[FHLC]) ac_mode=$ac_tag; continue;; |
| 20299 | esac |
| 20300 | case $ac_mode$ac_tag in |
| 20301 | :[FHL]*:*);; |
| 20302 | :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; |
| 20303 | :[FH]-) ac_tag=-:-;; |
| 20304 | :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; |
| 20305 | esac |
| 20306 | ac_save_IFS=$IFS |
| 20307 | IFS=: |
| 20308 | set x $ac_tag |
| 20309 | IFS=$ac_save_IFS |
| 20310 | shift |
| 20311 | ac_file=$1 |
| 20312 | shift |
| 20313 | |
| 20314 | case $ac_mode in |
| 20315 | :L) ac_source=$1;; |
| 20316 | :[FH]) |
| 20317 | ac_file_inputs= |
| 20318 | for ac_f |
| 20319 | do |
| 20320 | case $ac_f in |
| 20321 | -) ac_f="$ac_tmp/stdin";; |
| 20322 | *) # Look for the file first in the build tree, then in the source tree |
| 20323 | # (if the path is not absolute). The absolute path cannot be DOS-style, |
| 20324 | # because $ac_f cannot contain `:'. |
| 20325 | test -f "$ac_f" || |
| 20326 | case $ac_f in |
| 20327 | [\\/$]*) false;; |
| 20328 | *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; |
| 20329 | esac || |
| 20330 | as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; |
| 20331 | esac |
| 20332 | case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac |
| 20333 | as_fn_append ac_file_inputs " '$ac_f'" |
| 20334 | done |
| 20335 | |
| 20336 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
| 20337 | # use $as_me), people would be surprised to read: |
| 20338 | # /* config.h. Generated by config.status. */ |
| 20339 | configure_input='Generated from '` |
| 20340 | $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' |
| 20341 | `' by configure.' |
| 20342 | if test x"$ac_file" != x-; then |
| 20343 | configure_input="$ac_file. $configure_input" |
| 20344 | { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 |
| 20345 | $as_echo "$as_me: creating $ac_file" >&6;} |
| 20346 | fi |
| 20347 | # Neutralize special characters interpreted by sed in replacement strings. |
| 20348 | case $configure_input in #( |
| 20349 | *\&* | *\|* | *\\* ) |
| 20350 | ac_sed_conf_input=`$as_echo "$configure_input" | |
| 20351 | sed 's/[\\\\&|]/\\\\&/g'`;; #( |
| 20352 | *) ac_sed_conf_input=$configure_input;; |
| 20353 | esac |
| 20354 | |
| 20355 | case $ac_tag in |
| 20356 | *:-:* | *:-) cat >"$ac_tmp/stdin" \ |
| 20357 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; |
| 20358 | esac |
| 20359 | ;; |
| 20360 | esac |
| 20361 | |
| 20362 | ac_dir=`$as_dirname -- "$ac_file" || |
| 20363 | $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ |
| 20364 | X"$ac_file" : 'X\(//\)[^/]' \| \ |
| 20365 | X"$ac_file" : 'X\(//\)$' \| \ |
| 20366 | X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || |
| 20367 | $as_echo X"$ac_file" | |
| 20368 | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ |
| 20369 | s//\1/ |
| 20370 | q |
| 20371 | } |
| 20372 | /^X\(\/\/\)[^/].*/{ |
| 20373 | s//\1/ |
| 20374 | q |
| 20375 | } |
| 20376 | /^X\(\/\/\)$/{ |
| 20377 | s//\1/ |
| 20378 | q |
| 20379 | } |
| 20380 | /^X\(\/\).*/{ |
| 20381 | s//\1/ |
| 20382 | q |
| 20383 | } |
| 20384 | s/.*/./; q'` |
| 20385 | as_dir="$ac_dir"; as_fn_mkdir_p |
| 20386 | ac_builddir=. |
| 20387 | |
| 20388 | case "$ac_dir" in |
| 20389 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; |
| 20390 | *) |
| 20391 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` |
| 20392 | # A ".." for each directory in $ac_dir_suffix. |
| 20393 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` |
| 20394 | case $ac_top_builddir_sub in |
| 20395 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; |
| 20396 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; |
| 20397 | esac ;; |
| 20398 | esac |
| 20399 | ac_abs_top_builddir=$ac_pwd |
| 20400 | ac_abs_builddir=$ac_pwd$ac_dir_suffix |
| 20401 | # for backward compatibility: |
| 20402 | ac_top_builddir=$ac_top_build_prefix |
| 20403 | |
| 20404 | case $srcdir in |
| 20405 | .) # We are building in place. |
| 20406 | ac_srcdir=. |
| 20407 | ac_top_srcdir=$ac_top_builddir_sub |
| 20408 | ac_abs_top_srcdir=$ac_pwd ;; |
| 20409 | [\\/]* | ?:[\\/]* ) # Absolute name. |
| 20410 | ac_srcdir=$srcdir$ac_dir_suffix; |
| 20411 | ac_top_srcdir=$srcdir |
| 20412 | ac_abs_top_srcdir=$srcdir ;; |
| 20413 | *) # Relative name. |
| 20414 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix |
| 20415 | ac_top_srcdir=$ac_top_build_prefix$srcdir |
| 20416 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; |
| 20417 | esac |
| 20418 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
| 20419 | |
| 20420 | |
| 20421 | case $ac_mode in |
| 20422 | :F) |
| 20423 | # |
| 20424 | # CONFIG_FILE |
| 20425 | # |
| 20426 | |
| 20427 | case $INSTALL in |
| 20428 | [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; |
| 20429 | *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; |
| 20430 | esac |
| 20431 | _ACEOF |
| 20432 | |
| 20433 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 20434 | # If the template does not know about datarootdir, expand it. |
| 20435 | # FIXME: This hack should be removed a few years after 2.60. |
| 20436 | ac_datarootdir_hack=; ac_datarootdir_seen= |
| 20437 | ac_sed_dataroot=' |
| 20438 | /datarootdir/ { |
| 20439 | p |
| 20440 | q |
| 20441 | } |
| 20442 | /@datadir@/p |
| 20443 | /@docdir@/p |
| 20444 | /@infodir@/p |
| 20445 | /@localedir@/p |
| 20446 | /@mandir@/p' |
| 20447 | case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in |
| 20448 | *datarootdir*) ac_datarootdir_seen=yes;; |
| 20449 | *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) |
| 20450 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 |
| 20451 | $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} |
| 20452 | _ACEOF |
| 20453 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 20454 | ac_datarootdir_hack=' |
| 20455 | s&@datadir@&$datadir&g |
| 20456 | s&@docdir@&$docdir&g |
| 20457 | s&@infodir@&$infodir&g |
| 20458 | s&@localedir@&$localedir&g |
| 20459 | s&@mandir@&$mandir&g |
| 20460 | s&\\\${datarootdir}&$datarootdir&g' ;; |
| 20461 | esac |
| 20462 | _ACEOF |
| 20463 | |
| 20464 | # Neutralize VPATH when `$srcdir' = `.'. |
| 20465 | # Shell code in configure.ac might set extrasub. |
| 20466 | # FIXME: do we really want to maintain this feature? |
| 20467 | cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 |
| 20468 | ac_sed_extra="$ac_vpsub |
| 20469 | $extrasub |
| 20470 | _ACEOF |
| 20471 | cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 |
| 20472 | :t |
| 20473 | /@[a-zA-Z_][a-zA-Z_0-9]*@/!b |
| 20474 | s|@configure_input@|$ac_sed_conf_input|;t t |
| 20475 | s&@top_builddir@&$ac_top_builddir_sub&;t t |
| 20476 | s&@top_build_prefix@&$ac_top_build_prefix&;t t |
| 20477 | s&@srcdir@&$ac_srcdir&;t t |
| 20478 | s&@abs_srcdir@&$ac_abs_srcdir&;t t |
| 20479 | s&@top_srcdir@&$ac_top_srcdir&;t t |
| 20480 | s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t |
| 20481 | s&@builddir@&$ac_builddir&;t t |
| 20482 | s&@abs_builddir@&$ac_abs_builddir&;t t |
| 20483 | s&@abs_top_builddir@&$ac_abs_top_builddir&;t t |
| 20484 | s&@INSTALL@&$ac_INSTALL&;t t |
| 20485 | $ac_datarootdir_hack |
| 20486 | " |
| 20487 | eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | |
| 20488 | if $ac_cs_awk_getline; then |
| 20489 | $AWK -f "$ac_tmp/subs.awk" |
| 20490 | else |
| 20491 | $AWK -f "$ac_tmp/subs.awk" | $SHELL |
| 20492 | fi \ |
| 20493 | >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
| 20494 | |
| 20495 | test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && |
| 20496 | { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && |
| 20497 | { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ |
| 20498 | "$ac_tmp/out"`; test -z "$ac_out"; } && |
| 20499 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
| 20500 | which seems to be undefined. Please make sure it is defined" >&5 |
| 20501 | $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' |
| 20502 | which seems to be undefined. Please make sure it is defined" >&2;} |
| 20503 | |
| 20504 | rm -f "$ac_tmp/stdin" |
| 20505 | case $ac_file in |
| 20506 | -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; |
| 20507 | *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; |
| 20508 | esac \ |
| 20509 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
| 20510 | ;; |
| 20511 | :H) |
| 20512 | # |
| 20513 | # CONFIG_HEADER |
| 20514 | # |
| 20515 | if test x"$ac_file" != x-; then |
| 20516 | { |
| 20517 | $as_echo "/* $configure_input */" \ |
| 20518 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" |
| 20519 | } >"$ac_tmp/config.h" \ |
| 20520 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
| 20521 | if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then |
| 20522 | { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 |
| 20523 | $as_echo "$as_me: $ac_file is unchanged" >&6;} |
| 20524 | else |
| 20525 | rm -f "$ac_file" |
| 20526 | mv "$ac_tmp/config.h" "$ac_file" \ |
| 20527 | || as_fn_error $? "could not create $ac_file" "$LINENO" 5 |
| 20528 | fi |
| 20529 | else |
| 20530 | $as_echo "/* $configure_input */" \ |
| 20531 | && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ |
| 20532 | || as_fn_error $? "could not create -" "$LINENO" 5 |
| 20533 | fi |
| 20534 | ;; |
| 20535 | :L) |
| 20536 | # |
| 20537 | # CONFIG_LINK |
| 20538 | # |
| 20539 | |
| 20540 | if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then |
| 20541 | : |
| 20542 | else |
| 20543 | # Prefer the file from the source tree if names are identical. |
| 20544 | if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then |
| 20545 | ac_source=$srcdir/$ac_source |
| 20546 | fi |
| 20547 | |
| 20548 | { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 |
| 20549 | $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} |
| 20550 | |
| 20551 | if test ! -r "$ac_source"; then |
| 20552 | as_fn_error $? "$ac_source: file not found" "$LINENO" 5 |
| 20553 | fi |
| 20554 | rm -f "$ac_file" |
| 20555 | |
| 20556 | # Try a relative symlink, then a hard link, then a copy. |
| 20557 | case $ac_source in |
| 20558 | [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; |
| 20559 | *) ac_rel_source=$ac_top_build_prefix$ac_source ;; |
| 20560 | esac |
| 20561 | ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || |
| 20562 | ln "$ac_source" "$ac_file" 2>/dev/null || |
| 20563 | cp -p "$ac_source" "$ac_file" || |
| 20564 | as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 |
| 20565 | fi |
| 20566 | ;; |
| 20567 | :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 |
| 20568 | $as_echo "$as_me: executing $ac_file commands" >&6;} |
| 20569 | ;; |
| 20570 | esac |
| 20571 | |
| 20572 | |
| 20573 | case $ac_file$ac_mode in |
| 20574 | "config.h":H) echo > stamp-h ;; |
| 20575 | "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;; |
| 20576 | "nm.h":L) echo > stamp-nmh ;; |
| 20577 | "gcore":F) chmod +x gcore ;; |
| 20578 | |
| 20579 | esac |
| 20580 | done # for ac_tag |
| 20581 | |
| 20582 | |
| 20583 | as_fn_exit 0 |
| 20584 | _ACEOF |
| 20585 | ac_clean_files=$ac_clean_files_save |
| 20586 | |
| 20587 | test $ac_write_fail = 0 || |
| 20588 | as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 |
| 20589 | |
| 20590 | |
| 20591 | # configure is writing to config.log, and then calls config.status. |
| 20592 | # config.status does its own redirection, appending to config.log. |
| 20593 | # Unfortunately, on DOS this fails, as config.log is still kept open |
| 20594 | # by configure, so config.status won't be able to write to it; its |
| 20595 | # output is simply discarded. So we exec the FD to /dev/null, |
| 20596 | # effectively closing config.log, so it can be properly (re)opened and |
| 20597 | # appended to by config.status. When coming back to configure, we |
| 20598 | # need to make the FD available again. |
| 20599 | if test "$no_create" != yes; then |
| 20600 | ac_cs_success=: |
| 20601 | ac_config_status_args= |
| 20602 | test "$silent" = yes && |
| 20603 | ac_config_status_args="$ac_config_status_args --quiet" |
| 20604 | exec 5>/dev/null |
| 20605 | $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false |
| 20606 | exec 5>>config.log |
| 20607 | # Use ||, not &&, to avoid exiting from the if with $? = 1, which |
| 20608 | # would make configure fail if this is the last instruction. |
| 20609 | $ac_cs_success || as_fn_exit 1 |
| 20610 | fi |
| 20611 | |
| 20612 | # |
| 20613 | # CONFIG_SUBDIRS section. |
| 20614 | # |
| 20615 | if test "$no_recursion" != yes; then |
| 20616 | |
| 20617 | # Remove --cache-file, --srcdir, and --disable-option-checking arguments |
| 20618 | # so they do not pile up. |
| 20619 | ac_sub_configure_args= |
| 20620 | ac_prev= |
| 20621 | eval "set x $ac_configure_args" |
| 20622 | shift |
| 20623 | for ac_arg |
| 20624 | do |
| 20625 | if test -n "$ac_prev"; then |
| 20626 | ac_prev= |
| 20627 | continue |
| 20628 | fi |
| 20629 | case $ac_arg in |
| 20630 | -cache-file | --cache-file | --cache-fil | --cache-fi \ |
| 20631 | | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) |
| 20632 | ac_prev=cache_file ;; |
| 20633 | -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ |
| 20634 | | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \ |
| 20635 | | --c=*) |
| 20636 | ;; |
| 20637 | --config-cache | -C) |
| 20638 | ;; |
| 20639 | -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) |
| 20640 | ac_prev=srcdir ;; |
| 20641 | -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) |
| 20642 | ;; |
| 20643 | -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) |
| 20644 | ac_prev=prefix ;; |
| 20645 | -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) |
| 20646 | ;; |
| 20647 | --disable-option-checking) |
| 20648 | ;; |
| 20649 | *) |
| 20650 | case $ac_arg in |
| 20651 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
| 20652 | esac |
| 20653 | as_fn_append ac_sub_configure_args " '$ac_arg'" ;; |
| 20654 | esac |
| 20655 | done |
| 20656 | |
| 20657 | # Always prepend --prefix to ensure using the same prefix |
| 20658 | # in subdir configurations. |
| 20659 | ac_arg="--prefix=$prefix" |
| 20660 | case $ac_arg in |
| 20661 | *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; |
| 20662 | esac |
| 20663 | ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args" |
| 20664 | |
| 20665 | # Pass --silent |
| 20666 | if test "$silent" = yes; then |
| 20667 | ac_sub_configure_args="--silent $ac_sub_configure_args" |
| 20668 | fi |
| 20669 | |
| 20670 | # Always prepend --disable-option-checking to silence warnings, since |
| 20671 | # different subdirs can have different --enable and --with options. |
| 20672 | ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args" |
| 20673 | |
| 20674 | ac_popdir=`pwd` |
| 20675 | for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue |
| 20676 | |
| 20677 | # Do not complain, so a configure script can configure whichever |
| 20678 | # parts of a large source tree are present. |
| 20679 | test -d "$srcdir/$ac_dir" || continue |
| 20680 | |
| 20681 | ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)" |
| 20682 | $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5 |
| 20683 | $as_echo "$ac_msg" >&6 |
| 20684 | as_dir="$ac_dir"; as_fn_mkdir_p |
| 20685 | ac_builddir=. |
| 20686 | |
| 20687 | case "$ac_dir" in |
| 20688 | .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; |
| 20689 | *) |
| 20690 | ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` |
| 20691 | # A ".." for each directory in $ac_dir_suffix. |
| 20692 | ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` |
| 20693 | case $ac_top_builddir_sub in |
| 20694 | "") ac_top_builddir_sub=. ac_top_build_prefix= ;; |
| 20695 | *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; |
| 20696 | esac ;; |
| 20697 | esac |
| 20698 | ac_abs_top_builddir=$ac_pwd |
| 20699 | ac_abs_builddir=$ac_pwd$ac_dir_suffix |
| 20700 | # for backward compatibility: |
| 20701 | ac_top_builddir=$ac_top_build_prefix |
| 20702 | |
| 20703 | case $srcdir in |
| 20704 | .) # We are building in place. |
| 20705 | ac_srcdir=. |
| 20706 | ac_top_srcdir=$ac_top_builddir_sub |
| 20707 | ac_abs_top_srcdir=$ac_pwd ;; |
| 20708 | [\\/]* | ?:[\\/]* ) # Absolute name. |
| 20709 | ac_srcdir=$srcdir$ac_dir_suffix; |
| 20710 | ac_top_srcdir=$srcdir |
| 20711 | ac_abs_top_srcdir=$srcdir ;; |
| 20712 | *) # Relative name. |
| 20713 | ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix |
| 20714 | ac_top_srcdir=$ac_top_build_prefix$srcdir |
| 20715 | ac_abs_top_srcdir=$ac_pwd/$srcdir ;; |
| 20716 | esac |
| 20717 | ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix |
| 20718 | |
| 20719 | |
| 20720 | cd "$ac_dir" |
| 20721 | |
| 20722 | # Check for guested configure; otherwise get Cygnus style configure. |
| 20723 | if test -f "$ac_srcdir/configure.gnu"; then |
| 20724 | ac_sub_configure=$ac_srcdir/configure.gnu |
| 20725 | elif test -f "$ac_srcdir/configure"; then |
| 20726 | ac_sub_configure=$ac_srcdir/configure |
| 20727 | elif test -f "$ac_srcdir/configure.in"; then |
| 20728 | # This should be Cygnus configure. |
| 20729 | ac_sub_configure=$ac_aux_dir/configure |
| 20730 | else |
| 20731 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5 |
| 20732 | $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;} |
| 20733 | ac_sub_configure= |
| 20734 | fi |
| 20735 | |
| 20736 | # The recursion is here. |
| 20737 | if test -n "$ac_sub_configure"; then |
| 20738 | # Make the cache file name correct relative to the subdirectory. |
| 20739 | case $cache_file in |
| 20740 | [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;; |
| 20741 | *) # Relative name. |
| 20742 | ac_sub_cache_file=$ac_top_build_prefix$cache_file ;; |
| 20743 | esac |
| 20744 | |
| 20745 | { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5 |
| 20746 | $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;} |
| 20747 | # The eval makes quoting arguments work. |
| 20748 | eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \ |
| 20749 | --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" || |
| 20750 | as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5 |
| 20751 | fi |
| 20752 | |
| 20753 | cd "$ac_popdir" |
| 20754 | done |
| 20755 | fi |
| 20756 | if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then |
| 20757 | { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 |
| 20758 | $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} |
| 20759 | fi |
| 20760 | |