]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blob - gdb/configure
Add -Wstrict-null-sentinel to gdbsupport/warning.m4
[thirdparty/binutils-gdb.git] / gdb / configure
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 HAVE_NATIVE_GCORE_TARGET
762 TARGET_OBS
763 subdirs
764 GDB_DATADIR
765 DEBUGDIR
766 MAKEINFO_EXTRA_FLAGS
767 MAKEINFOFLAGS
768 MAKEINFO
769 PACKAGE
770 CATOBJEXT
771 GENCAT
772 INSTOBJEXT
773 DATADIRNAME
774 CATALOGS
775 POSUB
776 GMSGFMT
777 XGETTEXT
778 INCINTL
779 LIBINTL_DEP
780 LIBINTL
781 USE_NLS
782 CCDEPMODE
783 DEPDIR
784 am__leading_dot
785 CXX_DIALECT
786 HAVE_CXX11
787 INSTALL_STRIP_PROGRAM
788 STRIP
789 install_sh
790 target_os
791 target_vendor
792 target_cpu
793 target
794 host_os
795 host_vendor
796 host_cpu
797 host
798 build_os
799 build_vendor
800 build_cpu
801 build
802 EGREP
803 GREP
804 CPP
805 ac_ct_CXX
806 CXXFLAGS
807 CXX
808 OBJEXT
809 EXEEXT
810 ac_ct_CC
811 CPPFLAGS
812 LDFLAGS
813 CFLAGS
814 CC
815 MAINT
816 MAINTAINER_MODE_FALSE
817 MAINTAINER_MODE_TRUE
818 target_alias
819 host_alias
820 build_alias
821 LIBS
822 ECHO_T
823 ECHO_N
824 ECHO_C
825 DEFS
826 mandir
827 localedir
828 libdir
829 psdir
830 pdfdir
831 dvidir
832 htmldir
833 infodir
834 docdir
835 oldincludedir
836 includedir
837 localstatedir
838 sharedstatedir
839 sysconfdir
840 datadir
841 datarootdir
842 libexecdir
843 sbindir
844 bindir
845 program_transform_name
846 prefix
847 exec_prefix
848 PACKAGE_URL
849 PACKAGE_BUGREPORT
850 PACKAGE_STRING
851 PACKAGE_VERSION
852 PACKAGE_TARNAME
853 PACKAGE_NAME
854 PATH_SEPARATOR
855 SHELL'
856 ac_subst_files='nat_makefile_frag'
857 ac_user_opts='
858 enable_option_checking
859 enable_maintainer_mode
860 enable_plugins
861 enable_largefile
862 with_separate_debug_dir
863 with_gdb_datadir
864 with_relocated_sources
865 with_auto_load_dir
866 with_auto_load_safe_path
867 enable_targets
868 enable_64_bit_bfd
869 enable_gdbmi
870 enable_tui
871 enable_gdbtk
872 with_libunwind_ia64
873 with_curses
874 enable_profiling
875 enable_codesign
876 with_pkgversion
877 with_bugurl
878 with_system_zlib
879 with_gnu_ld
880 enable_rpath
881 with_libiconv_prefix
882 with_iconv_bin
883 with_system_readline
884 with_jit_reader_dir
885 with_expat
886 with_libexpat_prefix
887 with_mpfr
888 with_libmpfr_prefix
889 with_python
890 with_guile
891 enable_source_highlight
892 with_intel_pt
893 with_libipt_prefix
894 with_included_regex
895 with_sysroot
896 with_system_gdbinit
897 with_system_gdbinit_dir
898 enable_werror
899 enable_build_warnings
900 enable_gdb_build_warnings
901 enable_ubsan
902 with_lzma
903 with_liblzma_prefix
904 with_tcl
905 with_tk
906 with_x
907 enable_sim
908 with_babeltrace
909 with_libbabeltrace_prefix
910 with_xxhash
911 with_libxxhash_prefix
912 enable_unit_tests
913 '
914 ac_precious_vars='build_alias
915 host_alias
916 target_alias
917 CC
918 CFLAGS
919 LDFLAGS
920 LIBS
921 CPPFLAGS
922 CXX
923 CXXFLAGS
924 CCC
925 CPP
926 MAKEINFO
927 MAKEINFOFLAGS
928 YACC
929 YFLAGS
930 XMKMF'
931 ac_subdirs_all='testsuite
932 gdbtk'
933
934 # Initialize some variables set by options.
935 ac_init_help=
936 ac_init_version=false
937 ac_unrecognized_opts=
938 ac_unrecognized_sep=
939 # The variables have the same names as the options, with
940 # dashes changed to underlines.
941 cache_file=/dev/null
942 exec_prefix=NONE
943 no_create=
944 no_recursion=
945 prefix=NONE
946 program_prefix=NONE
947 program_suffix=NONE
948 program_transform_name=s,x,x,
949 silent=
950 site=
951 srcdir=
952 verbose=
953 x_includes=NONE
954 x_libraries=NONE
955
956 # Installation directory options.
957 # These are left unexpanded so users can "make install exec_prefix=/foo"
958 # and all the variables that are supposed to be based on exec_prefix
959 # by default will actually change.
960 # Use braces instead of parens because sh, perl, etc. also accept them.
961 # (The list follows the same order as the GNU Coding Standards.)
962 bindir='${exec_prefix}/bin'
963 sbindir='${exec_prefix}/sbin'
964 libexecdir='${exec_prefix}/libexec'
965 datarootdir='${prefix}/share'
966 datadir='${datarootdir}'
967 sysconfdir='${prefix}/etc'
968 sharedstatedir='${prefix}/com'
969 localstatedir='${prefix}/var'
970 includedir='${prefix}/include'
971 oldincludedir='/usr/include'
972 docdir='${datarootdir}/doc/${PACKAGE}'
973 infodir='${datarootdir}/info'
974 htmldir='${docdir}'
975 dvidir='${docdir}'
976 pdfdir='${docdir}'
977 psdir='${docdir}'
978 libdir='${exec_prefix}/lib'
979 localedir='${datarootdir}/locale'
980 mandir='${datarootdir}/man'
981
982 ac_prev=
983 ac_dashdash=
984 for ac_option
985 do
986 # If the previous option needs an argument, assign it.
987 if test -n "$ac_prev"; then
988 eval $ac_prev=\$ac_option
989 ac_prev=
990 continue
991 fi
992
993 case $ac_option in
994 *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
995 *=) ac_optarg= ;;
996 *) ac_optarg=yes ;;
997 esac
998
999 # Accept the important Cygnus configure options, so we can diagnose typos.
1000
1001 case $ac_dashdash$ac_option in
1002 --)
1003 ac_dashdash=yes ;;
1004
1005 -bindir | --bindir | --bindi | --bind | --bin | --bi)
1006 ac_prev=bindir ;;
1007 -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1008 bindir=$ac_optarg ;;
1009
1010 -build | --build | --buil | --bui | --bu)
1011 ac_prev=build_alias ;;
1012 -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1013 build_alias=$ac_optarg ;;
1014
1015 -cache-file | --cache-file | --cache-fil | --cache-fi \
1016 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1017 ac_prev=cache_file ;;
1018 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1019 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1020 cache_file=$ac_optarg ;;
1021
1022 --config-cache | -C)
1023 cache_file=config.cache ;;
1024
1025 -datadir | --datadir | --datadi | --datad)
1026 ac_prev=datadir ;;
1027 -datadir=* | --datadir=* | --datadi=* | --datad=*)
1028 datadir=$ac_optarg ;;
1029
1030 -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1031 | --dataroo | --dataro | --datar)
1032 ac_prev=datarootdir ;;
1033 -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1034 | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1035 datarootdir=$ac_optarg ;;
1036
1037 -disable-* | --disable-*)
1038 ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1039 # Reject names that are not valid shell variable names.
1040 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1041 as_fn_error $? "invalid feature name: $ac_useropt"
1042 ac_useropt_orig=$ac_useropt
1043 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1044 case $ac_user_opts in
1045 *"
1046 "enable_$ac_useropt"
1047 "*) ;;
1048 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1049 ac_unrecognized_sep=', ';;
1050 esac
1051 eval enable_$ac_useropt=no ;;
1052
1053 -docdir | --docdir | --docdi | --doc | --do)
1054 ac_prev=docdir ;;
1055 -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1056 docdir=$ac_optarg ;;
1057
1058 -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1059 ac_prev=dvidir ;;
1060 -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1061 dvidir=$ac_optarg ;;
1062
1063 -enable-* | --enable-*)
1064 ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1065 # Reject names that are not valid shell variable names.
1066 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1067 as_fn_error $? "invalid feature name: $ac_useropt"
1068 ac_useropt_orig=$ac_useropt
1069 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1070 case $ac_user_opts in
1071 *"
1072 "enable_$ac_useropt"
1073 "*) ;;
1074 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1075 ac_unrecognized_sep=', ';;
1076 esac
1077 eval enable_$ac_useropt=\$ac_optarg ;;
1078
1079 -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1080 | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1081 | --exec | --exe | --ex)
1082 ac_prev=exec_prefix ;;
1083 -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1084 | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1085 | --exec=* | --exe=* | --ex=*)
1086 exec_prefix=$ac_optarg ;;
1087
1088 -gas | --gas | --ga | --g)
1089 # Obsolete; use --with-gas.
1090 with_gas=yes ;;
1091
1092 -help | --help | --hel | --he | -h)
1093 ac_init_help=long ;;
1094 -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1095 ac_init_help=recursive ;;
1096 -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1097 ac_init_help=short ;;
1098
1099 -host | --host | --hos | --ho)
1100 ac_prev=host_alias ;;
1101 -host=* | --host=* | --hos=* | --ho=*)
1102 host_alias=$ac_optarg ;;
1103
1104 -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1105 ac_prev=htmldir ;;
1106 -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1107 | --ht=*)
1108 htmldir=$ac_optarg ;;
1109
1110 -includedir | --includedir | --includedi | --included | --include \
1111 | --includ | --inclu | --incl | --inc)
1112 ac_prev=includedir ;;
1113 -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1114 | --includ=* | --inclu=* | --incl=* | --inc=*)
1115 includedir=$ac_optarg ;;
1116
1117 -infodir | --infodir | --infodi | --infod | --info | --inf)
1118 ac_prev=infodir ;;
1119 -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1120 infodir=$ac_optarg ;;
1121
1122 -libdir | --libdir | --libdi | --libd)
1123 ac_prev=libdir ;;
1124 -libdir=* | --libdir=* | --libdi=* | --libd=*)
1125 libdir=$ac_optarg ;;
1126
1127 -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1128 | --libexe | --libex | --libe)
1129 ac_prev=libexecdir ;;
1130 -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1131 | --libexe=* | --libex=* | --libe=*)
1132 libexecdir=$ac_optarg ;;
1133
1134 -localedir | --localedir | --localedi | --localed | --locale)
1135 ac_prev=localedir ;;
1136 -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1137 localedir=$ac_optarg ;;
1138
1139 -localstatedir | --localstatedir | --localstatedi | --localstated \
1140 | --localstate | --localstat | --localsta | --localst | --locals)
1141 ac_prev=localstatedir ;;
1142 -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1143 | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1144 localstatedir=$ac_optarg ;;
1145
1146 -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1147 ac_prev=mandir ;;
1148 -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1149 mandir=$ac_optarg ;;
1150
1151 -nfp | --nfp | --nf)
1152 # Obsolete; use --without-fp.
1153 with_fp=no ;;
1154
1155 -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1156 | --no-cr | --no-c | -n)
1157 no_create=yes ;;
1158
1159 -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1160 | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1161 no_recursion=yes ;;
1162
1163 -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1164 | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1165 | --oldin | --oldi | --old | --ol | --o)
1166 ac_prev=oldincludedir ;;
1167 -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1168 | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1169 | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1170 oldincludedir=$ac_optarg ;;
1171
1172 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1173 ac_prev=prefix ;;
1174 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1175 prefix=$ac_optarg ;;
1176
1177 -program-prefix | --program-prefix | --program-prefi | --program-pref \
1178 | --program-pre | --program-pr | --program-p)
1179 ac_prev=program_prefix ;;
1180 -program-prefix=* | --program-prefix=* | --program-prefi=* \
1181 | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1182 program_prefix=$ac_optarg ;;
1183
1184 -program-suffix | --program-suffix | --program-suffi | --program-suff \
1185 | --program-suf | --program-su | --program-s)
1186 ac_prev=program_suffix ;;
1187 -program-suffix=* | --program-suffix=* | --program-suffi=* \
1188 | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1189 program_suffix=$ac_optarg ;;
1190
1191 -program-transform-name | --program-transform-name \
1192 | --program-transform-nam | --program-transform-na \
1193 | --program-transform-n | --program-transform- \
1194 | --program-transform | --program-transfor \
1195 | --program-transfo | --program-transf \
1196 | --program-trans | --program-tran \
1197 | --progr-tra | --program-tr | --program-t)
1198 ac_prev=program_transform_name ;;
1199 -program-transform-name=* | --program-transform-name=* \
1200 | --program-transform-nam=* | --program-transform-na=* \
1201 | --program-transform-n=* | --program-transform-=* \
1202 | --program-transform=* | --program-transfor=* \
1203 | --program-transfo=* | --program-transf=* \
1204 | --program-trans=* | --program-tran=* \
1205 | --progr-tra=* | --program-tr=* | --program-t=*)
1206 program_transform_name=$ac_optarg ;;
1207
1208 -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1209 ac_prev=pdfdir ;;
1210 -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1211 pdfdir=$ac_optarg ;;
1212
1213 -psdir | --psdir | --psdi | --psd | --ps)
1214 ac_prev=psdir ;;
1215 -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1216 psdir=$ac_optarg ;;
1217
1218 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1219 | -silent | --silent | --silen | --sile | --sil)
1220 silent=yes ;;
1221
1222 -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1223 ac_prev=sbindir ;;
1224 -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1225 | --sbi=* | --sb=*)
1226 sbindir=$ac_optarg ;;
1227
1228 -sharedstatedir | --sharedstatedir | --sharedstatedi \
1229 | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1230 | --sharedst | --shareds | --shared | --share | --shar \
1231 | --sha | --sh)
1232 ac_prev=sharedstatedir ;;
1233 -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1234 | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1235 | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1236 | --sha=* | --sh=*)
1237 sharedstatedir=$ac_optarg ;;
1238
1239 -site | --site | --sit)
1240 ac_prev=site ;;
1241 -site=* | --site=* | --sit=*)
1242 site=$ac_optarg ;;
1243
1244 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1245 ac_prev=srcdir ;;
1246 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1247 srcdir=$ac_optarg ;;
1248
1249 -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1250 | --syscon | --sysco | --sysc | --sys | --sy)
1251 ac_prev=sysconfdir ;;
1252 -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1253 | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1254 sysconfdir=$ac_optarg ;;
1255
1256 -target | --target | --targe | --targ | --tar | --ta | --t)
1257 ac_prev=target_alias ;;
1258 -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1259 target_alias=$ac_optarg ;;
1260
1261 -v | -verbose | --verbose | --verbos | --verbo | --verb)
1262 verbose=yes ;;
1263
1264 -version | --version | --versio | --versi | --vers | -V)
1265 ac_init_version=: ;;
1266
1267 -with-* | --with-*)
1268 ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1269 # Reject names that are not valid shell variable names.
1270 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1271 as_fn_error $? "invalid package name: $ac_useropt"
1272 ac_useropt_orig=$ac_useropt
1273 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1274 case $ac_user_opts in
1275 *"
1276 "with_$ac_useropt"
1277 "*) ;;
1278 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1279 ac_unrecognized_sep=', ';;
1280 esac
1281 eval with_$ac_useropt=\$ac_optarg ;;
1282
1283 -without-* | --without-*)
1284 ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1285 # Reject names that are not valid shell variable names.
1286 expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1287 as_fn_error $? "invalid package name: $ac_useropt"
1288 ac_useropt_orig=$ac_useropt
1289 ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1290 case $ac_user_opts in
1291 *"
1292 "with_$ac_useropt"
1293 "*) ;;
1294 *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1295 ac_unrecognized_sep=', ';;
1296 esac
1297 eval with_$ac_useropt=no ;;
1298
1299 --x)
1300 # Obsolete; use --with-x.
1301 with_x=yes ;;
1302
1303 -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1304 | --x-incl | --x-inc | --x-in | --x-i)
1305 ac_prev=x_includes ;;
1306 -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1307 | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1308 x_includes=$ac_optarg ;;
1309
1310 -x-libraries | --x-libraries | --x-librarie | --x-librari \
1311 | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1312 ac_prev=x_libraries ;;
1313 -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1314 | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1315 x_libraries=$ac_optarg ;;
1316
1317 -*) as_fn_error $? "unrecognized option: \`$ac_option'
1318 Try \`$0 --help' for more information"
1319 ;;
1320
1321 *=*)
1322 ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1323 # Reject names that are not valid shell variable names.
1324 case $ac_envvar in #(
1325 '' | [0-9]* | *[!_$as_cr_alnum]* )
1326 as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1327 esac
1328 eval $ac_envvar=\$ac_optarg
1329 export $ac_envvar ;;
1330
1331 *)
1332 # FIXME: should be removed in autoconf 3.0.
1333 $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1334 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1335 $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1336 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1337 ;;
1338
1339 esac
1340 done
1341
1342 if test -n "$ac_prev"; then
1343 ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1344 as_fn_error $? "missing argument to $ac_option"
1345 fi
1346
1347 if test -n "$ac_unrecognized_opts"; then
1348 case $enable_option_checking in
1349 no) ;;
1350 fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1351 *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1352 esac
1353 fi
1354
1355 # Check all directory arguments for consistency.
1356 for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \
1357 datadir sysconfdir sharedstatedir localstatedir includedir \
1358 oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1359 libdir localedir mandir
1360 do
1361 eval ac_val=\$$ac_var
1362 # Remove trailing slashes.
1363 case $ac_val in
1364 */ )
1365 ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1366 eval $ac_var=\$ac_val;;
1367 esac
1368 # Be sure to have absolute directory names.
1369 case $ac_val in
1370 [\\/$]* | ?:[\\/]* ) continue;;
1371 NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1372 esac
1373 as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1374 done
1375
1376 # There might be people who depend on the old broken behavior: `$host'
1377 # used to hold the argument of --host etc.
1378 # FIXME: To remove some day.
1379 build=$build_alias
1380 host=$host_alias
1381 target=$target_alias
1382
1383 # FIXME: To remove some day.
1384 if test "x$host_alias" != x; then
1385 if test "x$build_alias" = x; then
1386 cross_compiling=maybe
1387 elif test "x$build_alias" != "x$host_alias"; then
1388 cross_compiling=yes
1389 fi
1390 fi
1391
1392 ac_tool_prefix=
1393 test -n "$host_alias" && ac_tool_prefix=$host_alias-
1394
1395 test "$silent" = yes && exec 6>/dev/null
1396
1397
1398 ac_pwd=`pwd` && test -n "$ac_pwd" &&
1399 ac_ls_di=`ls -di .` &&
1400 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1401 as_fn_error $? "working directory cannot be determined"
1402 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1403 as_fn_error $? "pwd does not report name of working directory"
1404
1405
1406 # Find the source files, if location was not specified.
1407 if test -z "$srcdir"; then
1408 ac_srcdir_defaulted=yes
1409 # Try the directory containing this script, then the parent directory.
1410 ac_confdir=`$as_dirname -- "$as_myself" ||
1411 $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1412 X"$as_myself" : 'X\(//\)[^/]' \| \
1413 X"$as_myself" : 'X\(//\)$' \| \
1414 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1415 $as_echo X"$as_myself" |
1416 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1417 s//\1/
1418 q
1419 }
1420 /^X\(\/\/\)[^/].*/{
1421 s//\1/
1422 q
1423 }
1424 /^X\(\/\/\)$/{
1425 s//\1/
1426 q
1427 }
1428 /^X\(\/\).*/{
1429 s//\1/
1430 q
1431 }
1432 s/.*/./; q'`
1433 srcdir=$ac_confdir
1434 if test ! -r "$srcdir/$ac_unique_file"; then
1435 srcdir=..
1436 fi
1437 else
1438 ac_srcdir_defaulted=no
1439 fi
1440 if test ! -r "$srcdir/$ac_unique_file"; then
1441 test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1442 as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1443 fi
1444 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1445 ac_abs_confdir=`(
1446 cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1447 pwd)`
1448 # When building in place, set srcdir=.
1449 if test "$ac_abs_confdir" = "$ac_pwd"; then
1450 srcdir=.
1451 fi
1452 # Remove unnecessary trailing slashes from srcdir.
1453 # Double slashes in file names in object file debugging info
1454 # mess up M-x gdb in Emacs.
1455 case $srcdir in
1456 */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1457 esac
1458 for ac_var in $ac_precious_vars; do
1459 eval ac_env_${ac_var}_set=\${${ac_var}+set}
1460 eval ac_env_${ac_var}_value=\$${ac_var}
1461 eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1462 eval ac_cv_env_${ac_var}_value=\$${ac_var}
1463 done
1464
1465 #
1466 # Report the --help message.
1467 #
1468 if test "$ac_init_help" = "long"; then
1469 # Omit some internal or obsolete options to make the list less imposing.
1470 # This message is too long to be a string in the A/UX 3.1 sh.
1471 cat <<_ACEOF
1472 \`configure' configures this package to adapt to many kinds of systems.
1473
1474 Usage: $0 [OPTION]... [VAR=VALUE]...
1475
1476 To assign environment variables (e.g., CC, CFLAGS...), specify them as
1477 VAR=VALUE. See below for descriptions of some of the useful variables.
1478
1479 Defaults for the options are specified in brackets.
1480
1481 Configuration:
1482 -h, --help display this help and exit
1483 --help=short display options specific to this package
1484 --help=recursive display the short help of all the included packages
1485 -V, --version display version information and exit
1486 -q, --quiet, --silent do not print \`checking ...' messages
1487 --cache-file=FILE cache test results in FILE [disabled]
1488 -C, --config-cache alias for \`--cache-file=config.cache'
1489 -n, --no-create do not create output files
1490 --srcdir=DIR find the sources in DIR [configure dir or \`..']
1491
1492 Installation directories:
1493 --prefix=PREFIX install architecture-independent files in PREFIX
1494 [$ac_default_prefix]
1495 --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
1496 [PREFIX]
1497
1498 By default, \`make install' will install all the files in
1499 \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
1500 an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1501 for instance \`--prefix=\$HOME'.
1502
1503 For better control, use the options below.
1504
1505 Fine tuning of the installation directories:
1506 --bindir=DIR user executables [EPREFIX/bin]
1507 --sbindir=DIR system admin executables [EPREFIX/sbin]
1508 --libexecdir=DIR program executables [EPREFIX/libexec]
1509 --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
1510 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
1511 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
1512 --libdir=DIR object code libraries [EPREFIX/lib]
1513 --includedir=DIR C header files [PREFIX/include]
1514 --oldincludedir=DIR C header files for non-gcc [/usr/include]
1515 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
1516 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
1517 --infodir=DIR info documentation [DATAROOTDIR/info]
1518 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
1519 --mandir=DIR man documentation [DATAROOTDIR/man]
1520 --docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
1521 --htmldir=DIR html documentation [DOCDIR]
1522 --dvidir=DIR dvi documentation [DOCDIR]
1523 --pdfdir=DIR pdf documentation [DOCDIR]
1524 --psdir=DIR ps documentation [DOCDIR]
1525 _ACEOF
1526
1527 cat <<\_ACEOF
1528
1529 Program names:
1530 --program-prefix=PREFIX prepend PREFIX to installed program names
1531 --program-suffix=SUFFIX append SUFFIX to installed program names
1532 --program-transform-name=PROGRAM run sed PROGRAM on installed program names
1533
1534 X features:
1535 --x-includes=DIR X include files are in DIR
1536 --x-libraries=DIR X library files are in DIR
1537
1538 System types:
1539 --build=BUILD configure for building on BUILD [guessed]
1540 --host=HOST cross-compile to build programs to run on HOST [BUILD]
1541 --target=TARGET configure for building compilers for TARGET [HOST]
1542 _ACEOF
1543 fi
1544
1545 if test -n "$ac_init_help"; then
1546
1547 cat <<\_ACEOF
1548
1549 Optional Features:
1550 --disable-option-checking ignore unrecognized --enable/--with options
1551 --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
1552 --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
1553 --enable-maintainer-mode
1554 enable make rules and dependencies not useful (and
1555 sometimes confusing) to the casual installer
1556 --enable-plugins Enable support for plugins
1557 --disable-largefile omit support for large files
1558 --enable-targets=TARGETS
1559 alternative target configurations
1560 --enable-64-bit-bfd 64-bit support (on hosts with narrower word sizes)
1561 --disable-gdbmi disable machine-interface (MI)
1562 --enable-tui enable full-screen terminal user interface (TUI)
1563 --enable-gdbtk enable gdbtk graphical user interface (GUI)
1564 --enable-profiling enable profiling of GDB
1565 --enable-codesign=CERT sign gdb with 'codesign -s CERT'
1566 --disable-rpath do not hardcode runtime library paths
1567 --enable-source-highlight
1568 enable source-highlight for source listings
1569 --enable-werror treat compile warnings as errors
1570 --enable-build-warnings enable build-time compiler warnings if gcc is used
1571 --enable-gdb-build-warnings
1572 enable GDB specific build-time compiler warnings if
1573 gcc is used
1574 --enable-ubsan enable undefined behavior sanitizer (auto/yes/no)
1575 --enable-sim link gdb with simulator
1576 --enable-unit-tests Enable the inclusion of unit tests when compiling
1577 GDB
1578
1579 Optional Packages:
1580 --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
1581 --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
1582 --with-separate-debug-dir=PATH
1583 look for global separate debug info in this path
1584 [LIBDIR/debug]
1585 --with-gdb-datadir=PATH look for global separate data files in this path
1586 [DATADIR/gdb]
1587 --with-relocated-sources=PATH
1588 automatically relocate this path for source files
1589 --with-auto-load-dir=PATH
1590 directories from which to load auto-loaded scripts
1591 [$debugdir:$datadir/auto-load]
1592 --with-auto-load-safe-path=PATH
1593 directories safe to hold auto-loaded files
1594 [--with-auto-load-dir]
1595 --without-auto-load-safe-path
1596 do not restrict auto-loaded files locations
1597 --with-libunwind-ia64 use libunwind frame unwinding for ia64 targets
1598 --with-curses use the curses library instead of the termcap
1599 library
1600 --with-pkgversion=PKG Use PKG in the version string in place of "GDB"
1601 --with-bugurl=URL Direct users to URL to report a bug
1602 --with-system-zlib use installed libz
1603 --with-gnu-ld assume the C compiler uses GNU ld default=no
1604 --with-libiconv-prefix[=DIR] search for libiconv in DIR/include and DIR/lib
1605 --without-libiconv-prefix don't search for libiconv in includedir and libdir
1606 --with-iconv-bin=PATH specify where to find the iconv program
1607 --with-system-readline use installed readline library
1608 --with-jit-reader-dir=PATH
1609 directory to load the JIT readers from
1610 --with-expat include expat support (auto/yes/no)
1611 --with-libexpat-prefix[=DIR] search for libexpat in DIR/include and DIR/lib
1612 --without-libexpat-prefix don't search for libexpat in includedir and libdir
1613 --with-mpfr include MPFR support (auto/yes/no)
1614 --with-libmpfr-prefix[=DIR] search for libmpfr in DIR/include and DIR/lib
1615 --without-libmpfr-prefix don't search for libmpfr in includedir and libdir
1616 --with-python[=PYTHON] include python support
1617 (auto/yes/no/<python-program>)
1618 --with-guile[=GUILE] include guile support
1619 (auto/yes/no/<guile-version>/<pkg-config-program>)
1620 --with-intel-pt include Intel Processor Trace support (auto/yes/no)
1621 --with-libipt-prefix[=DIR] search for libipt in DIR/include and DIR/lib
1622 --without-libipt-prefix don't search for libipt in includedir and libdir
1623 --without-included-regex
1624 don't use included regex; this is the default on
1625 systems with version 2 of the GNU C library (use
1626 with caution on other system)
1627 --with-sysroot[=DIR] search for usr/lib et al within DIR
1628 --with-system-gdbinit=PATH
1629 automatically load a system-wide gdbinit file
1630 --with-system-gdbinit-dir=PATH
1631 automatically load system-wide gdbinit files from
1632 this directory
1633 --with-lzma support lzma compression (auto/yes/no)
1634 --with-liblzma-prefix[=DIR] search for liblzma in DIR/include and DIR/lib
1635 --without-liblzma-prefix don't search for liblzma in includedir and libdir
1636 --with-tcl directory containing tcl configuration (tclConfig.sh)
1637 --with-tk directory containing tk configuration (tkConfig.sh)
1638 --with-x use the X Window System
1639 --with-babeltrace include babeltrace support (auto/yes/no)
1640 --with-libbabeltrace-prefix[=DIR] search for libbabeltrace in DIR/include and DIR/lib
1641 --without-libbabeltrace-prefix don't search for libbabeltrace in includedir and libdir
1642 --with-xxhash use libxxhash for hashing (faster) (auto/yes/no)
1643 --with-libxxhash-prefix[=DIR] search for libxxhash in DIR/include and DIR/lib
1644 --without-libxxhash-prefix don't search for libxxhash in includedir and libdir
1645
1646 Some influential environment variables:
1647 CC C compiler command
1648 CFLAGS C compiler flags
1649 LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
1650 nonstandard directory <lib dir>
1651 LIBS libraries to pass to the linker, e.g. -l<library>
1652 CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
1653 you have headers in a nonstandard directory <include dir>
1654 CXX C++ compiler command
1655 CXXFLAGS C++ compiler flags
1656 CPP C preprocessor
1657 MAKEINFO Parent configure detects if it is of sufficient version.
1658 MAKEINFOFLAGS
1659 Parameters for MAKEINFO.
1660 YACC The `Yet Another Compiler Compiler' implementation to use.
1661 Defaults to the first program found out of: `bison -y', `byacc',
1662 `yacc'.
1663 YFLAGS The list of arguments that will be passed by default to $YACC.
1664 This script will default YFLAGS to the empty string to avoid a
1665 default value of `-d' given by some make applications.
1666 XMKMF Path to xmkmf, Makefile generator for X Window System
1667
1668 Use these variables to override the choices made by `configure' or to help
1669 it to find libraries and programs with nonstandard names/locations.
1670
1671 Report bugs to the package provider.
1672 _ACEOF
1673 ac_status=$?
1674 fi
1675
1676 if test "$ac_init_help" = "recursive"; then
1677 # If there are subdirs, report their specific --help.
1678 for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
1679 test -d "$ac_dir" ||
1680 { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
1681 continue
1682 ac_builddir=.
1683
1684 case "$ac_dir" in
1685 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
1686 *)
1687 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
1688 # A ".." for each directory in $ac_dir_suffix.
1689 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
1690 case $ac_top_builddir_sub in
1691 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
1692 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
1693 esac ;;
1694 esac
1695 ac_abs_top_builddir=$ac_pwd
1696 ac_abs_builddir=$ac_pwd$ac_dir_suffix
1697 # for backward compatibility:
1698 ac_top_builddir=$ac_top_build_prefix
1699
1700 case $srcdir in
1701 .) # We are building in place.
1702 ac_srcdir=.
1703 ac_top_srcdir=$ac_top_builddir_sub
1704 ac_abs_top_srcdir=$ac_pwd ;;
1705 [\\/]* | ?:[\\/]* ) # Absolute name.
1706 ac_srcdir=$srcdir$ac_dir_suffix;
1707 ac_top_srcdir=$srcdir
1708 ac_abs_top_srcdir=$srcdir ;;
1709 *) # Relative name.
1710 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
1711 ac_top_srcdir=$ac_top_build_prefix$srcdir
1712 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
1713 esac
1714 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
1715
1716 cd "$ac_dir" || { ac_status=$?; continue; }
1717 # Check for guested configure.
1718 if test -f "$ac_srcdir/configure.gnu"; then
1719 echo &&
1720 $SHELL "$ac_srcdir/configure.gnu" --help=recursive
1721 elif test -f "$ac_srcdir/configure"; then
1722 echo &&
1723 $SHELL "$ac_srcdir/configure" --help=recursive
1724 else
1725 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
1726 fi || ac_status=$?
1727 cd "$ac_pwd" || { ac_status=$?; break; }
1728 done
1729 fi
1730
1731 test -n "$ac_init_help" && exit $ac_status
1732 if $ac_init_version; then
1733 cat <<\_ACEOF
1734 configure
1735 generated by GNU Autoconf 2.69
1736
1737 Copyright (C) 2012 Free Software Foundation, Inc.
1738 This configure script is free software; the Free Software Foundation
1739 gives unlimited permission to copy, distribute and modify it.
1740 _ACEOF
1741 exit
1742 fi
1743
1744 ## ------------------------ ##
1745 ## Autoconf initialization. ##
1746 ## ------------------------ ##
1747
1748 # ac_fn_c_try_compile LINENO
1749 # --------------------------
1750 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1751 ac_fn_c_try_compile ()
1752 {
1753 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1754 rm -f conftest.$ac_objext
1755 if { { ac_try="$ac_compile"
1756 case "(($ac_try" in
1757 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1758 *) ac_try_echo=$ac_try;;
1759 esac
1760 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1761 $as_echo "$ac_try_echo"; } >&5
1762 (eval "$ac_compile") 2>conftest.err
1763 ac_status=$?
1764 if test -s conftest.err; then
1765 grep -v '^ *+' conftest.err >conftest.er1
1766 cat conftest.er1 >&5
1767 mv -f conftest.er1 conftest.err
1768 fi
1769 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1770 test $ac_status = 0; } && {
1771 test -z "$ac_c_werror_flag" ||
1772 test ! -s conftest.err
1773 } && test -s conftest.$ac_objext; then :
1774 ac_retval=0
1775 else
1776 $as_echo "$as_me: failed program was:" >&5
1777 sed 's/^/| /' conftest.$ac_ext >&5
1778
1779 ac_retval=1
1780 fi
1781 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1782 as_fn_set_status $ac_retval
1783
1784 } # ac_fn_c_try_compile
1785
1786 # ac_fn_cxx_try_compile LINENO
1787 # ----------------------------
1788 # Try to compile conftest.$ac_ext, and return whether this succeeded.
1789 ac_fn_cxx_try_compile ()
1790 {
1791 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1792 rm -f conftest.$ac_objext
1793 if { { ac_try="$ac_compile"
1794 case "(($ac_try" in
1795 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1796 *) ac_try_echo=$ac_try;;
1797 esac
1798 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1799 $as_echo "$ac_try_echo"; } >&5
1800 (eval "$ac_compile") 2>conftest.err
1801 ac_status=$?
1802 if test -s conftest.err; then
1803 grep -v '^ *+' conftest.err >conftest.er1
1804 cat conftest.er1 >&5
1805 mv -f conftest.er1 conftest.err
1806 fi
1807 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1808 test $ac_status = 0; } && {
1809 test -z "$ac_cxx_werror_flag" ||
1810 test ! -s conftest.err
1811 } && test -s conftest.$ac_objext; then :
1812 ac_retval=0
1813 else
1814 $as_echo "$as_me: failed program was:" >&5
1815 sed 's/^/| /' conftest.$ac_ext >&5
1816
1817 ac_retval=1
1818 fi
1819 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1820 as_fn_set_status $ac_retval
1821
1822 } # ac_fn_cxx_try_compile
1823
1824 # ac_fn_c_try_cpp LINENO
1825 # ----------------------
1826 # Try to preprocess conftest.$ac_ext, and return whether this succeeded.
1827 ac_fn_c_try_cpp ()
1828 {
1829 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1830 if { { ac_try="$ac_cpp conftest.$ac_ext"
1831 case "(($ac_try" in
1832 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1833 *) ac_try_echo=$ac_try;;
1834 esac
1835 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1836 $as_echo "$ac_try_echo"; } >&5
1837 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
1838 ac_status=$?
1839 if test -s conftest.err; then
1840 grep -v '^ *+' conftest.err >conftest.er1
1841 cat conftest.er1 >&5
1842 mv -f conftest.er1 conftest.err
1843 fi
1844 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1845 test $ac_status = 0; } > conftest.i && {
1846 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
1847 test ! -s conftest.err
1848 }; then :
1849 ac_retval=0
1850 else
1851 $as_echo "$as_me: failed program was:" >&5
1852 sed 's/^/| /' conftest.$ac_ext >&5
1853
1854 ac_retval=1
1855 fi
1856 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1857 as_fn_set_status $ac_retval
1858
1859 } # ac_fn_c_try_cpp
1860
1861 # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES
1862 # -------------------------------------------------------
1863 # Tests whether HEADER exists, giving a warning if it cannot be compiled using
1864 # the include files in INCLUDES and setting the cache variable VAR
1865 # accordingly.
1866 ac_fn_c_check_header_mongrel ()
1867 {
1868 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1869 if eval \${$3+:} false; then :
1870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1871 $as_echo_n "checking for $2... " >&6; }
1872 if eval \${$3+:} false; then :
1873 $as_echo_n "(cached) " >&6
1874 fi
1875 eval ac_res=\$$3
1876 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1877 $as_echo "$ac_res" >&6; }
1878 else
1879 # Is the header compilable?
1880 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
1881 $as_echo_n "checking $2 usability... " >&6; }
1882 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1883 /* end confdefs.h. */
1884 $4
1885 #include <$2>
1886 _ACEOF
1887 if ac_fn_c_try_compile "$LINENO"; then :
1888 ac_header_compiler=yes
1889 else
1890 ac_header_compiler=no
1891 fi
1892 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
1893 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
1894 $as_echo "$ac_header_compiler" >&6; }
1895
1896 # Is the header present?
1897 { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
1898 $as_echo_n "checking $2 presence... " >&6; }
1899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
1900 /* end confdefs.h. */
1901 #include <$2>
1902 _ACEOF
1903 if ac_fn_c_try_cpp "$LINENO"; then :
1904 ac_header_preproc=yes
1905 else
1906 ac_header_preproc=no
1907 fi
1908 rm -f conftest.err conftest.i conftest.$ac_ext
1909 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
1910 $as_echo "$ac_header_preproc" >&6; }
1911
1912 # So? What about this header?
1913 case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #((
1914 yes:no: )
1915 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
1916 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
1917 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1918 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1919 ;;
1920 no:yes:* )
1921 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
1922 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
1923 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5
1924 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;}
1925 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
1926 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
1927 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5
1928 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;}
1929 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
1930 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
1931 ;;
1932 esac
1933 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1934 $as_echo_n "checking for $2... " >&6; }
1935 if eval \${$3+:} false; then :
1936 $as_echo_n "(cached) " >&6
1937 else
1938 eval "$3=\$ac_header_compiler"
1939 fi
1940 eval ac_res=\$$3
1941 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
1942 $as_echo "$ac_res" >&6; }
1943 fi
1944 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1945
1946 } # ac_fn_c_check_header_mongrel
1947
1948 # ac_fn_c_try_run LINENO
1949 # ----------------------
1950 # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
1951 # that executables *can* be run.
1952 ac_fn_c_try_run ()
1953 {
1954 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1955 if { { ac_try="$ac_link"
1956 case "(($ac_try" in
1957 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1958 *) ac_try_echo=$ac_try;;
1959 esac
1960 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1961 $as_echo "$ac_try_echo"; } >&5
1962 (eval "$ac_link") 2>&5
1963 ac_status=$?
1964 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1965 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
1966 { { case "(($ac_try" in
1967 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
1968 *) ac_try_echo=$ac_try;;
1969 esac
1970 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
1971 $as_echo "$ac_try_echo"; } >&5
1972 (eval "$ac_try") 2>&5
1973 ac_status=$?
1974 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
1975 test $ac_status = 0; }; }; then :
1976 ac_retval=0
1977 else
1978 $as_echo "$as_me: program exited with status $ac_status" >&5
1979 $as_echo "$as_me: failed program was:" >&5
1980 sed 's/^/| /' conftest.$ac_ext >&5
1981
1982 ac_retval=$ac_status
1983 fi
1984 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
1985 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
1986 as_fn_set_status $ac_retval
1987
1988 } # ac_fn_c_try_run
1989
1990 # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
1991 # -------------------------------------------------------
1992 # Tests whether HEADER exists and can be compiled using the include files in
1993 # INCLUDES, setting the cache variable VAR accordingly.
1994 ac_fn_c_check_header_compile ()
1995 {
1996 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
1997 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
1998 $as_echo_n "checking for $2... " >&6; }
1999 if eval \${$3+:} false; then :
2000 $as_echo_n "(cached) " >&6
2001 else
2002 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2003 /* end confdefs.h. */
2004 $4
2005 #include <$2>
2006 _ACEOF
2007 if ac_fn_c_try_compile "$LINENO"; then :
2008 eval "$3=yes"
2009 else
2010 eval "$3=no"
2011 fi
2012 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2013 fi
2014 eval ac_res=\$$3
2015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2016 $as_echo "$ac_res" >&6; }
2017 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2018
2019 } # ac_fn_c_check_header_compile
2020
2021 # ac_fn_c_try_link LINENO
2022 # -----------------------
2023 # Try to link conftest.$ac_ext, and return whether this succeeded.
2024 ac_fn_c_try_link ()
2025 {
2026 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2027 rm -f conftest.$ac_objext conftest$ac_exeext
2028 if { { ac_try="$ac_link"
2029 case "(($ac_try" in
2030 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2031 *) ac_try_echo=$ac_try;;
2032 esac
2033 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2034 $as_echo "$ac_try_echo"; } >&5
2035 (eval "$ac_link") 2>conftest.err
2036 ac_status=$?
2037 if test -s conftest.err; then
2038 grep -v '^ *+' conftest.err >conftest.er1
2039 cat conftest.er1 >&5
2040 mv -f conftest.er1 conftest.err
2041 fi
2042 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2043 test $ac_status = 0; } && {
2044 test -z "$ac_c_werror_flag" ||
2045 test ! -s conftest.err
2046 } && test -s conftest$ac_exeext && {
2047 test "$cross_compiling" = yes ||
2048 test -x conftest$ac_exeext
2049 }; then :
2050 ac_retval=0
2051 else
2052 $as_echo "$as_me: failed program was:" >&5
2053 sed 's/^/| /' conftest.$ac_ext >&5
2054
2055 ac_retval=1
2056 fi
2057 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2058 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2059 # interfere with the next link command; also delete a directory that is
2060 # left behind by Apple's compiler. We do this before executing the actions.
2061 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2062 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2063 as_fn_set_status $ac_retval
2064
2065 } # ac_fn_c_try_link
2066
2067 # ac_fn_c_compute_int LINENO EXPR VAR INCLUDES
2068 # --------------------------------------------
2069 # Tries to find the compile-time value of EXPR in a program that includes
2070 # INCLUDES, setting VAR accordingly. Returns whether the value could be
2071 # computed
2072 ac_fn_c_compute_int ()
2073 {
2074 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2075 if test "$cross_compiling" = yes; then
2076 # Depending upon the size, compute the lo and hi bounds.
2077 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2078 /* end confdefs.h. */
2079 $4
2080 int
2081 main ()
2082 {
2083 static int test_array [1 - 2 * !(($2) >= 0)];
2084 test_array [0] = 0;
2085 return test_array [0];
2086
2087 ;
2088 return 0;
2089 }
2090 _ACEOF
2091 if ac_fn_c_try_compile "$LINENO"; then :
2092 ac_lo=0 ac_mid=0
2093 while :; do
2094 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2095 /* end confdefs.h. */
2096 $4
2097 int
2098 main ()
2099 {
2100 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2101 test_array [0] = 0;
2102 return test_array [0];
2103
2104 ;
2105 return 0;
2106 }
2107 _ACEOF
2108 if ac_fn_c_try_compile "$LINENO"; then :
2109 ac_hi=$ac_mid; break
2110 else
2111 as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2112 if test $ac_lo -le $ac_mid; then
2113 ac_lo= ac_hi=
2114 break
2115 fi
2116 as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2117 fi
2118 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2119 done
2120 else
2121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2122 /* end confdefs.h. */
2123 $4
2124 int
2125 main ()
2126 {
2127 static int test_array [1 - 2 * !(($2) < 0)];
2128 test_array [0] = 0;
2129 return test_array [0];
2130
2131 ;
2132 return 0;
2133 }
2134 _ACEOF
2135 if ac_fn_c_try_compile "$LINENO"; then :
2136 ac_hi=-1 ac_mid=-1
2137 while :; do
2138 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2139 /* end confdefs.h. */
2140 $4
2141 int
2142 main ()
2143 {
2144 static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2145 test_array [0] = 0;
2146 return test_array [0];
2147
2148 ;
2149 return 0;
2150 }
2151 _ACEOF
2152 if ac_fn_c_try_compile "$LINENO"; then :
2153 ac_lo=$ac_mid; break
2154 else
2155 as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2156 if test $ac_mid -le $ac_hi; then
2157 ac_lo= ac_hi=
2158 break
2159 fi
2160 as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2161 fi
2162 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2163 done
2164 else
2165 ac_lo= ac_hi=
2166 fi
2167 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2168 fi
2169 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2170 # Binary search between lo and hi bounds.
2171 while test "x$ac_lo" != "x$ac_hi"; do
2172 as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2173 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2174 /* end confdefs.h. */
2175 $4
2176 int
2177 main ()
2178 {
2179 static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2180 test_array [0] = 0;
2181 return test_array [0];
2182
2183 ;
2184 return 0;
2185 }
2186 _ACEOF
2187 if ac_fn_c_try_compile "$LINENO"; then :
2188 ac_hi=$ac_mid
2189 else
2190 as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2191 fi
2192 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2193 done
2194 case $ac_lo in #((
2195 ?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2196 '') ac_retval=1 ;;
2197 esac
2198 else
2199 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2200 /* end confdefs.h. */
2201 $4
2202 static long int longval () { return $2; }
2203 static unsigned long int ulongval () { return $2; }
2204 #include <stdio.h>
2205 #include <stdlib.h>
2206 int
2207 main ()
2208 {
2209
2210 FILE *f = fopen ("conftest.val", "w");
2211 if (! f)
2212 return 1;
2213 if (($2) < 0)
2214 {
2215 long int i = longval ();
2216 if (i != ($2))
2217 return 1;
2218 fprintf (f, "%ld", i);
2219 }
2220 else
2221 {
2222 unsigned long int i = ulongval ();
2223 if (i != ($2))
2224 return 1;
2225 fprintf (f, "%lu", i);
2226 }
2227 /* Do not output a trailing newline, as this causes \r\n confusion
2228 on some platforms. */
2229 return ferror (f) || fclose (f) != 0;
2230
2231 ;
2232 return 0;
2233 }
2234 _ACEOF
2235 if ac_fn_c_try_run "$LINENO"; then :
2236 echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2237 else
2238 ac_retval=1
2239 fi
2240 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2241 conftest.$ac_objext conftest.beam conftest.$ac_ext
2242 rm -f conftest.val
2243
2244 fi
2245 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2246 as_fn_set_status $ac_retval
2247
2248 } # ac_fn_c_compute_int
2249
2250 # ac_fn_c_check_func LINENO FUNC VAR
2251 # ----------------------------------
2252 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2253 ac_fn_c_check_func ()
2254 {
2255 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2256 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2257 $as_echo_n "checking for $2... " >&6; }
2258 if eval \${$3+:} false; then :
2259 $as_echo_n "(cached) " >&6
2260 else
2261 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2262 /* end confdefs.h. */
2263 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2264 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2265 #define $2 innocuous_$2
2266
2267 /* System header to define __stub macros and hopefully few prototypes,
2268 which can conflict with char $2 (); below.
2269 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2270 <limits.h> exists even on freestanding compilers. */
2271
2272 #ifdef __STDC__
2273 # include <limits.h>
2274 #else
2275 # include <assert.h>
2276 #endif
2277
2278 #undef $2
2279
2280 /* Override any GCC internal prototype to avoid an error.
2281 Use char because int might match the return type of a GCC
2282 builtin and then its argument prototype would still apply. */
2283 #ifdef __cplusplus
2284 extern "C"
2285 #endif
2286 char $2 ();
2287 /* The GNU C library defines this for functions which it implements
2288 to always fail with ENOSYS. Some functions are actually named
2289 something starting with __ and the normal name is an alias. */
2290 #if defined __stub_$2 || defined __stub___$2
2291 choke me
2292 #endif
2293
2294 int
2295 main ()
2296 {
2297 return $2 ();
2298 ;
2299 return 0;
2300 }
2301 _ACEOF
2302 if ac_fn_c_try_link "$LINENO"; then :
2303 eval "$3=yes"
2304 else
2305 eval "$3=no"
2306 fi
2307 rm -f core conftest.err conftest.$ac_objext \
2308 conftest$ac_exeext 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_func
2316
2317 # ac_fn_c_check_type LINENO TYPE VAR INCLUDES
2318 # -------------------------------------------
2319 # Tests whether TYPE exists after having included INCLUDES, setting cache
2320 # variable VAR accordingly.
2321 ac_fn_c_check_type ()
2322 {
2323 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2324 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2325 $as_echo_n "checking for $2... " >&6; }
2326 if eval \${$3+:} false; then :
2327 $as_echo_n "(cached) " >&6
2328 else
2329 eval "$3=no"
2330 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2331 /* end confdefs.h. */
2332 $4
2333 int
2334 main ()
2335 {
2336 if (sizeof ($2))
2337 return 0;
2338 ;
2339 return 0;
2340 }
2341 _ACEOF
2342 if ac_fn_c_try_compile "$LINENO"; then :
2343 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2344 /* end confdefs.h. */
2345 $4
2346 int
2347 main ()
2348 {
2349 if (sizeof (($2)))
2350 return 0;
2351 ;
2352 return 0;
2353 }
2354 _ACEOF
2355 if ac_fn_c_try_compile "$LINENO"; then :
2356
2357 else
2358 eval "$3=yes"
2359 fi
2360 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2361 fi
2362 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2363 fi
2364 eval ac_res=\$$3
2365 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2366 $as_echo "$ac_res" >&6; }
2367 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2368
2369 } # ac_fn_c_check_type
2370
2371 # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES
2372 # ---------------------------------------------
2373 # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR
2374 # accordingly.
2375 ac_fn_c_check_decl ()
2376 {
2377 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2378 as_decl_name=`echo $2|sed 's/ *(.*//'`
2379 as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'`
2380 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5
2381 $as_echo_n "checking whether $as_decl_name is declared... " >&6; }
2382 if eval \${$3+:} false; then :
2383 $as_echo_n "(cached) " >&6
2384 else
2385 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2386 /* end confdefs.h. */
2387 $4
2388 int
2389 main ()
2390 {
2391 #ifndef $as_decl_name
2392 #ifdef __cplusplus
2393 (void) $as_decl_use;
2394 #else
2395 (void) $as_decl_name;
2396 #endif
2397 #endif
2398
2399 ;
2400 return 0;
2401 }
2402 _ACEOF
2403 if ac_fn_c_try_compile "$LINENO"; then :
2404 eval "$3=yes"
2405 else
2406 eval "$3=no"
2407 fi
2408 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2409 fi
2410 eval ac_res=\$$3
2411 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2412 $as_echo "$ac_res" >&6; }
2413 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2414
2415 } # ac_fn_c_check_decl
2416
2417 # ac_fn_c_check_member LINENO AGGR MEMBER VAR INCLUDES
2418 # ----------------------------------------------------
2419 # Tries to find if the field MEMBER exists in type AGGR, after including
2420 # INCLUDES, setting cache variable VAR accordingly.
2421 ac_fn_c_check_member ()
2422 {
2423 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2424 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5
2425 $as_echo_n "checking for $2.$3... " >&6; }
2426 if eval \${$4+:} false; then :
2427 $as_echo_n "(cached) " >&6
2428 else
2429 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2430 /* end confdefs.h. */
2431 $5
2432 int
2433 main ()
2434 {
2435 static $2 ac_aggr;
2436 if (ac_aggr.$3)
2437 return 0;
2438 ;
2439 return 0;
2440 }
2441 _ACEOF
2442 if ac_fn_c_try_compile "$LINENO"; then :
2443 eval "$4=yes"
2444 else
2445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2446 /* end confdefs.h. */
2447 $5
2448 int
2449 main ()
2450 {
2451 static $2 ac_aggr;
2452 if (sizeof ac_aggr.$3)
2453 return 0;
2454 ;
2455 return 0;
2456 }
2457 _ACEOF
2458 if ac_fn_c_try_compile "$LINENO"; then :
2459 eval "$4=yes"
2460 else
2461 eval "$4=no"
2462 fi
2463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2464 fi
2465 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2466 fi
2467 eval ac_res=\$$4
2468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2469 $as_echo "$ac_res" >&6; }
2470 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2471
2472 } # ac_fn_c_check_member
2473
2474 # ac_fn_cxx_try_link LINENO
2475 # -------------------------
2476 # Try to link conftest.$ac_ext, and return whether this succeeded.
2477 ac_fn_cxx_try_link ()
2478 {
2479 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2480 rm -f conftest.$ac_objext conftest$ac_exeext
2481 if { { ac_try="$ac_link"
2482 case "(($ac_try" in
2483 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2484 *) ac_try_echo=$ac_try;;
2485 esac
2486 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2487 $as_echo "$ac_try_echo"; } >&5
2488 (eval "$ac_link") 2>conftest.err
2489 ac_status=$?
2490 if test -s conftest.err; then
2491 grep -v '^ *+' conftest.err >conftest.er1
2492 cat conftest.er1 >&5
2493 mv -f conftest.er1 conftest.err
2494 fi
2495 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2496 test $ac_status = 0; } && {
2497 test -z "$ac_cxx_werror_flag" ||
2498 test ! -s conftest.err
2499 } && test -s conftest$ac_exeext && {
2500 test "$cross_compiling" = yes ||
2501 test -x conftest$ac_exeext
2502 }; then :
2503 ac_retval=0
2504 else
2505 $as_echo "$as_me: failed program was:" >&5
2506 sed 's/^/| /' conftest.$ac_ext >&5
2507
2508 ac_retval=1
2509 fi
2510 # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2511 # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2512 # interfere with the next link command; also delete a directory that is
2513 # left behind by Apple's compiler. We do this before executing the actions.
2514 rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2515 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2516 as_fn_set_status $ac_retval
2517
2518 } # ac_fn_cxx_try_link
2519
2520 # ac_fn_cxx_check_func LINENO FUNC VAR
2521 # ------------------------------------
2522 # Tests whether FUNC exists, setting the cache variable VAR accordingly
2523 ac_fn_cxx_check_func ()
2524 {
2525 as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2526 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2527 $as_echo_n "checking for $2... " >&6; }
2528 if eval \${$3+:} false; then :
2529 $as_echo_n "(cached) " >&6
2530 else
2531 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2532 /* end confdefs.h. */
2533 /* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2534 For example, HP-UX 11i <limits.h> declares gettimeofday. */
2535 #define $2 innocuous_$2
2536
2537 /* System header to define __stub macros and hopefully few prototypes,
2538 which can conflict with char $2 (); below.
2539 Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2540 <limits.h> exists even on freestanding compilers. */
2541
2542 #ifdef __STDC__
2543 # include <limits.h>
2544 #else
2545 # include <assert.h>
2546 #endif
2547
2548 #undef $2
2549
2550 /* Override any GCC internal prototype to avoid an error.
2551 Use char because int might match the return type of a GCC
2552 builtin and then its argument prototype would still apply. */
2553 #ifdef __cplusplus
2554 extern "C"
2555 #endif
2556 char $2 ();
2557 /* The GNU C library defines this for functions which it implements
2558 to always fail with ENOSYS. Some functions are actually named
2559 something starting with __ and the normal name is an alias. */
2560 #if defined __stub_$2 || defined __stub___$2
2561 choke me
2562 #endif
2563
2564 int
2565 main ()
2566 {
2567 return $2 ();
2568 ;
2569 return 0;
2570 }
2571 _ACEOF
2572 if ac_fn_cxx_try_link "$LINENO"; then :
2573 eval "$3=yes"
2574 else
2575 eval "$3=no"
2576 fi
2577 rm -f core conftest.err conftest.$ac_objext \
2578 conftest$ac_exeext conftest.$ac_ext
2579 fi
2580 eval ac_res=\$$3
2581 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2582 $as_echo "$ac_res" >&6; }
2583 eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2584
2585 } # ac_fn_cxx_check_func
2586 cat >config.log <<_ACEOF
2587 This file contains any messages produced by compilers while
2588 running configure, to aid debugging if configure makes a mistake.
2589
2590 It was created by $as_me, which was
2591 generated by GNU Autoconf 2.69. Invocation command line was
2592
2593 $ $0 $@
2594
2595 _ACEOF
2596 exec 5>>config.log
2597 {
2598 cat <<_ASUNAME
2599 ## --------- ##
2600 ## Platform. ##
2601 ## --------- ##
2602
2603 hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
2604 uname -m = `(uname -m) 2>/dev/null || echo unknown`
2605 uname -r = `(uname -r) 2>/dev/null || echo unknown`
2606 uname -s = `(uname -s) 2>/dev/null || echo unknown`
2607 uname -v = `(uname -v) 2>/dev/null || echo unknown`
2608
2609 /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
2610 /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
2611
2612 /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
2613 /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
2614 /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
2615 /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown`
2616 /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
2617 /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
2618 /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
2619
2620 _ASUNAME
2621
2622 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2623 for as_dir in $PATH
2624 do
2625 IFS=$as_save_IFS
2626 test -z "$as_dir" && as_dir=.
2627 $as_echo "PATH: $as_dir"
2628 done
2629 IFS=$as_save_IFS
2630
2631 } >&5
2632
2633 cat >&5 <<_ACEOF
2634
2635
2636 ## ----------- ##
2637 ## Core tests. ##
2638 ## ----------- ##
2639
2640 _ACEOF
2641
2642
2643 # Keep a trace of the command line.
2644 # Strip out --no-create and --no-recursion so they do not pile up.
2645 # Strip out --silent because we don't want to record it for future runs.
2646 # Also quote any args containing shell meta-characters.
2647 # Make two passes to allow for proper duplicate-argument suppression.
2648 ac_configure_args=
2649 ac_configure_args0=
2650 ac_configure_args1=
2651 ac_must_keep_next=false
2652 for ac_pass in 1 2
2653 do
2654 for ac_arg
2655 do
2656 case $ac_arg in
2657 -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
2658 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
2659 | -silent | --silent | --silen | --sile | --sil)
2660 continue ;;
2661 *\'*)
2662 ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
2663 esac
2664 case $ac_pass in
2665 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
2666 2)
2667 as_fn_append ac_configure_args1 " '$ac_arg'"
2668 if test $ac_must_keep_next = true; then
2669 ac_must_keep_next=false # Got value, back to normal.
2670 else
2671 case $ac_arg in
2672 *=* | --config-cache | -C | -disable-* | --disable-* \
2673 | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
2674 | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
2675 | -with-* | --with-* | -without-* | --without-* | --x)
2676 case "$ac_configure_args0 " in
2677 "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
2678 esac
2679 ;;
2680 -* ) ac_must_keep_next=true ;;
2681 esac
2682 fi
2683 as_fn_append ac_configure_args " '$ac_arg'"
2684 ;;
2685 esac
2686 done
2687 done
2688 { ac_configure_args0=; unset ac_configure_args0;}
2689 { ac_configure_args1=; unset ac_configure_args1;}
2690
2691 # When interrupted or exit'd, cleanup temporary files, and complete
2692 # config.log. We remove comments because anyway the quotes in there
2693 # would cause problems or look ugly.
2694 # WARNING: Use '\'' to represent an apostrophe within the trap.
2695 # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
2696 trap 'exit_status=$?
2697 # Save into config.log some information that might help in debugging.
2698 {
2699 echo
2700
2701 $as_echo "## ---------------- ##
2702 ## Cache variables. ##
2703 ## ---------------- ##"
2704 echo
2705 # The following way of writing the cache mishandles newlines in values,
2706 (
2707 for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
2708 eval ac_val=\$$ac_var
2709 case $ac_val in #(
2710 *${as_nl}*)
2711 case $ac_var in #(
2712 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
2713 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
2714 esac
2715 case $ac_var in #(
2716 _ | IFS | as_nl) ;; #(
2717 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
2718 *) { eval $ac_var=; unset $ac_var;} ;;
2719 esac ;;
2720 esac
2721 done
2722 (set) 2>&1 |
2723 case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
2724 *${as_nl}ac_space=\ *)
2725 sed -n \
2726 "s/'\''/'\''\\\\'\'''\''/g;
2727 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
2728 ;; #(
2729 *)
2730 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
2731 ;;
2732 esac |
2733 sort
2734 )
2735 echo
2736
2737 $as_echo "## ----------------- ##
2738 ## Output variables. ##
2739 ## ----------------- ##"
2740 echo
2741 for ac_var in $ac_subst_vars
2742 do
2743 eval ac_val=\$$ac_var
2744 case $ac_val in
2745 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2746 esac
2747 $as_echo "$ac_var='\''$ac_val'\''"
2748 done | sort
2749 echo
2750
2751 if test -n "$ac_subst_files"; then
2752 $as_echo "## ------------------- ##
2753 ## File substitutions. ##
2754 ## ------------------- ##"
2755 echo
2756 for ac_var in $ac_subst_files
2757 do
2758 eval ac_val=\$$ac_var
2759 case $ac_val in
2760 *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
2761 esac
2762 $as_echo "$ac_var='\''$ac_val'\''"
2763 done | sort
2764 echo
2765 fi
2766
2767 if test -s confdefs.h; then
2768 $as_echo "## ----------- ##
2769 ## confdefs.h. ##
2770 ## ----------- ##"
2771 echo
2772 cat confdefs.h
2773 echo
2774 fi
2775 test "$ac_signal" != 0 &&
2776 $as_echo "$as_me: caught signal $ac_signal"
2777 $as_echo "$as_me: exit $exit_status"
2778 } >&5
2779 rm -f core *.core core.conftest.* &&
2780 rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
2781 exit $exit_status
2782 ' 0
2783 for ac_signal in 1 2 13 15; do
2784 trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
2785 done
2786 ac_signal=0
2787
2788 # confdefs.h avoids OS command line length limits that DEFS can exceed.
2789 rm -f -r conftest* confdefs.h
2790
2791 $as_echo "/* confdefs.h */" > confdefs.h
2792
2793 # Predefined preprocessor variables.
2794
2795 cat >>confdefs.h <<_ACEOF
2796 #define PACKAGE_NAME "$PACKAGE_NAME"
2797 _ACEOF
2798
2799 cat >>confdefs.h <<_ACEOF
2800 #define PACKAGE_TARNAME "$PACKAGE_TARNAME"
2801 _ACEOF
2802
2803 cat >>confdefs.h <<_ACEOF
2804 #define PACKAGE_VERSION "$PACKAGE_VERSION"
2805 _ACEOF
2806
2807 cat >>confdefs.h <<_ACEOF
2808 #define PACKAGE_STRING "$PACKAGE_STRING"
2809 _ACEOF
2810
2811 cat >>confdefs.h <<_ACEOF
2812 #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
2813 _ACEOF
2814
2815 cat >>confdefs.h <<_ACEOF
2816 #define PACKAGE_URL "$PACKAGE_URL"
2817 _ACEOF
2818
2819
2820 # Let the site file select an alternate cache file if it wants to.
2821 # Prefer an explicitly selected file to automatically selected ones.
2822 ac_site_file1=NONE
2823 ac_site_file2=NONE
2824 if test -n "$CONFIG_SITE"; then
2825 # We do not want a PATH search for config.site.
2826 case $CONFIG_SITE in #((
2827 -*) ac_site_file1=./$CONFIG_SITE;;
2828 */*) ac_site_file1=$CONFIG_SITE;;
2829 *) ac_site_file1=./$CONFIG_SITE;;
2830 esac
2831 elif test "x$prefix" != xNONE; then
2832 ac_site_file1=$prefix/share/config.site
2833 ac_site_file2=$prefix/etc/config.site
2834 else
2835 ac_site_file1=$ac_default_prefix/share/config.site
2836 ac_site_file2=$ac_default_prefix/etc/config.site
2837 fi
2838 for ac_site_file in "$ac_site_file1" "$ac_site_file2"
2839 do
2840 test "x$ac_site_file" = xNONE && continue
2841 if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
2842 { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
2843 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
2844 sed 's/^/| /' "$ac_site_file" >&5
2845 . "$ac_site_file" \
2846 || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2847 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2848 as_fn_error $? "failed to load site script $ac_site_file
2849 See \`config.log' for more details" "$LINENO" 5; }
2850 fi
2851 done
2852
2853 if test -r "$cache_file"; then
2854 # Some versions of bash will fail to source /dev/null (special files
2855 # actually), so we avoid doing that. DJGPP emulates it as a regular file.
2856 if test /dev/null != "$cache_file" && test -f "$cache_file"; then
2857 { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
2858 $as_echo "$as_me: loading cache $cache_file" >&6;}
2859 case $cache_file in
2860 [\\/]* | ?:[\\/]* ) . "$cache_file";;
2861 *) . "./$cache_file";;
2862 esac
2863 fi
2864 else
2865 { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
2866 $as_echo "$as_me: creating cache $cache_file" >&6;}
2867 >$cache_file
2868 fi
2869
2870 as_fn_append ac_header_list " stdlib.h"
2871 as_fn_append ac_header_list " unistd.h"
2872 as_fn_append ac_header_list " sys/param.h"
2873 # Check that the precious variables saved in the cache have kept the same
2874 # value.
2875 ac_cache_corrupted=false
2876 for ac_var in $ac_precious_vars; do
2877 eval ac_old_set=\$ac_cv_env_${ac_var}_set
2878 eval ac_new_set=\$ac_env_${ac_var}_set
2879 eval ac_old_val=\$ac_cv_env_${ac_var}_value
2880 eval ac_new_val=\$ac_env_${ac_var}_value
2881 case $ac_old_set,$ac_new_set in
2882 set,)
2883 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
2884 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
2885 ac_cache_corrupted=: ;;
2886 ,set)
2887 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
2888 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
2889 ac_cache_corrupted=: ;;
2890 ,);;
2891 *)
2892 if test "x$ac_old_val" != "x$ac_new_val"; then
2893 # differences in whitespace do not lead to failure.
2894 ac_old_val_w=`echo x $ac_old_val`
2895 ac_new_val_w=`echo x $ac_new_val`
2896 if test "$ac_old_val_w" != "$ac_new_val_w"; then
2897 { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
2898 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
2899 ac_cache_corrupted=:
2900 else
2901 { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
2902 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
2903 eval $ac_var=\$ac_old_val
2904 fi
2905 { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5
2906 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;}
2907 { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5
2908 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;}
2909 fi;;
2910 esac
2911 # Pass precious variables to config.status.
2912 if test "$ac_new_set" = set; then
2913 case $ac_new_val in
2914 *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
2915 *) ac_arg=$ac_var=$ac_new_val ;;
2916 esac
2917 case " $ac_configure_args " in
2918 *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
2919 *) as_fn_append ac_configure_args " '$ac_arg'" ;;
2920 esac
2921 fi
2922 done
2923 if $ac_cache_corrupted; then
2924 { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
2925 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
2926 { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
2927 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
2928 as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
2929 fi
2930 ## -------------------- ##
2931 ## Main body of script. ##
2932 ## -------------------- ##
2933
2934 ac_ext=c
2935 ac_cpp='$CPP $CPPFLAGS'
2936 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2937 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2938 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2939
2940
2941
2942
2943
2944 ac_config_headers="$ac_config_headers config.h:config.in"
2945
2946
2947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to enable maintainer-specific portions of Makefiles" >&5
2948 $as_echo_n "checking whether to enable maintainer-specific portions of Makefiles... " >&6; }
2949 # Check whether --enable-maintainer-mode was given.
2950 if test "${enable_maintainer_mode+set}" = set; then :
2951 enableval=$enable_maintainer_mode; USE_MAINTAINER_MODE=$enableval
2952 else
2953 USE_MAINTAINER_MODE=no
2954 fi
2955
2956 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $USE_MAINTAINER_MODE" >&5
2957 $as_echo "$USE_MAINTAINER_MODE" >&6; }
2958 if test $USE_MAINTAINER_MODE = yes; then
2959 MAINTAINER_MODE_TRUE=
2960 MAINTAINER_MODE_FALSE='#'
2961 else
2962 MAINTAINER_MODE_TRUE='#'
2963 MAINTAINER_MODE_FALSE=
2964 fi
2965
2966 MAINT=$MAINTAINER_MODE_TRUE
2967
2968
2969
2970 # Set the 'development' global.
2971 . $srcdir/../bfd/development.sh
2972
2973 ac_ext=c
2974 ac_cpp='$CPP $CPPFLAGS'
2975 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2976 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2977 ac_compiler_gnu=$ac_cv_c_compiler_gnu
2978 if test -n "$ac_tool_prefix"; then
2979 # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
2980 set dummy ${ac_tool_prefix}gcc; ac_word=$2
2981 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
2982 $as_echo_n "checking for $ac_word... " >&6; }
2983 if ${ac_cv_prog_CC+:} false; then :
2984 $as_echo_n "(cached) " >&6
2985 else
2986 if test -n "$CC"; then
2987 ac_cv_prog_CC="$CC" # Let the user override the test.
2988 else
2989 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
2990 for as_dir in $PATH
2991 do
2992 IFS=$as_save_IFS
2993 test -z "$as_dir" && as_dir=.
2994 for ac_exec_ext in '' $ac_executable_extensions; do
2995 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
2996 ac_cv_prog_CC="${ac_tool_prefix}gcc"
2997 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
2998 break 2
2999 fi
3000 done
3001 done
3002 IFS=$as_save_IFS
3003
3004 fi
3005 fi
3006 CC=$ac_cv_prog_CC
3007 if test -n "$CC"; then
3008 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3009 $as_echo "$CC" >&6; }
3010 else
3011 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3012 $as_echo "no" >&6; }
3013 fi
3014
3015
3016 fi
3017 if test -z "$ac_cv_prog_CC"; then
3018 ac_ct_CC=$CC
3019 # Extract the first word of "gcc", so it can be a program name with args.
3020 set dummy gcc; ac_word=$2
3021 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3022 $as_echo_n "checking for $ac_word... " >&6; }
3023 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3024 $as_echo_n "(cached) " >&6
3025 else
3026 if test -n "$ac_ct_CC"; then
3027 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3028 else
3029 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3030 for as_dir in $PATH
3031 do
3032 IFS=$as_save_IFS
3033 test -z "$as_dir" && as_dir=.
3034 for ac_exec_ext in '' $ac_executable_extensions; do
3035 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3036 ac_cv_prog_ac_ct_CC="gcc"
3037 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3038 break 2
3039 fi
3040 done
3041 done
3042 IFS=$as_save_IFS
3043
3044 fi
3045 fi
3046 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3047 if test -n "$ac_ct_CC"; then
3048 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3049 $as_echo "$ac_ct_CC" >&6; }
3050 else
3051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3052 $as_echo "no" >&6; }
3053 fi
3054
3055 if test "x$ac_ct_CC" = x; then
3056 CC=""
3057 else
3058 case $cross_compiling:$ac_tool_warned in
3059 yes:)
3060 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3061 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3062 ac_tool_warned=yes ;;
3063 esac
3064 CC=$ac_ct_CC
3065 fi
3066 else
3067 CC="$ac_cv_prog_CC"
3068 fi
3069
3070 if test -z "$CC"; then
3071 if test -n "$ac_tool_prefix"; then
3072 # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
3073 set dummy ${ac_tool_prefix}cc; ac_word=$2
3074 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3075 $as_echo_n "checking for $ac_word... " >&6; }
3076 if ${ac_cv_prog_CC+:} false; then :
3077 $as_echo_n "(cached) " >&6
3078 else
3079 if test -n "$CC"; then
3080 ac_cv_prog_CC="$CC" # Let the user override the test.
3081 else
3082 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3083 for as_dir in $PATH
3084 do
3085 IFS=$as_save_IFS
3086 test -z "$as_dir" && as_dir=.
3087 for ac_exec_ext in '' $ac_executable_extensions; do
3088 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3089 ac_cv_prog_CC="${ac_tool_prefix}cc"
3090 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3091 break 2
3092 fi
3093 done
3094 done
3095 IFS=$as_save_IFS
3096
3097 fi
3098 fi
3099 CC=$ac_cv_prog_CC
3100 if test -n "$CC"; then
3101 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3102 $as_echo "$CC" >&6; }
3103 else
3104 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3105 $as_echo "no" >&6; }
3106 fi
3107
3108
3109 fi
3110 fi
3111 if test -z "$CC"; then
3112 # Extract the first word of "cc", so it can be a program name with args.
3113 set dummy cc; ac_word=$2
3114 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3115 $as_echo_n "checking for $ac_word... " >&6; }
3116 if ${ac_cv_prog_CC+:} false; then :
3117 $as_echo_n "(cached) " >&6
3118 else
3119 if test -n "$CC"; then
3120 ac_cv_prog_CC="$CC" # Let the user override the test.
3121 else
3122 ac_prog_rejected=no
3123 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3124 for as_dir in $PATH
3125 do
3126 IFS=$as_save_IFS
3127 test -z "$as_dir" && as_dir=.
3128 for ac_exec_ext in '' $ac_executable_extensions; do
3129 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3130 if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
3131 ac_prog_rejected=yes
3132 continue
3133 fi
3134 ac_cv_prog_CC="cc"
3135 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3136 break 2
3137 fi
3138 done
3139 done
3140 IFS=$as_save_IFS
3141
3142 if test $ac_prog_rejected = yes; then
3143 # We found a bogon in the path, so make sure we never use it.
3144 set dummy $ac_cv_prog_CC
3145 shift
3146 if test $# != 0; then
3147 # We chose a different compiler from the bogus one.
3148 # However, it has the same basename, so the bogon will be chosen
3149 # first if we set CC to just the basename; use the full file name.
3150 shift
3151 ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@"
3152 fi
3153 fi
3154 fi
3155 fi
3156 CC=$ac_cv_prog_CC
3157 if test -n "$CC"; then
3158 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3159 $as_echo "$CC" >&6; }
3160 else
3161 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3162 $as_echo "no" >&6; }
3163 fi
3164
3165
3166 fi
3167 if test -z "$CC"; then
3168 if test -n "$ac_tool_prefix"; then
3169 for ac_prog in cl.exe
3170 do
3171 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3172 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3173 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3174 $as_echo_n "checking for $ac_word... " >&6; }
3175 if ${ac_cv_prog_CC+:} false; then :
3176 $as_echo_n "(cached) " >&6
3177 else
3178 if test -n "$CC"; then
3179 ac_cv_prog_CC="$CC" # Let the user override the test.
3180 else
3181 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3182 for as_dir in $PATH
3183 do
3184 IFS=$as_save_IFS
3185 test -z "$as_dir" && as_dir=.
3186 for ac_exec_ext in '' $ac_executable_extensions; do
3187 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3188 ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
3189 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3190 break 2
3191 fi
3192 done
3193 done
3194 IFS=$as_save_IFS
3195
3196 fi
3197 fi
3198 CC=$ac_cv_prog_CC
3199 if test -n "$CC"; then
3200 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
3201 $as_echo "$CC" >&6; }
3202 else
3203 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3204 $as_echo "no" >&6; }
3205 fi
3206
3207
3208 test -n "$CC" && break
3209 done
3210 fi
3211 if test -z "$CC"; then
3212 ac_ct_CC=$CC
3213 for ac_prog in cl.exe
3214 do
3215 # Extract the first word of "$ac_prog", so it can be a program name with args.
3216 set dummy $ac_prog; ac_word=$2
3217 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3218 $as_echo_n "checking for $ac_word... " >&6; }
3219 if ${ac_cv_prog_ac_ct_CC+:} false; then :
3220 $as_echo_n "(cached) " >&6
3221 else
3222 if test -n "$ac_ct_CC"; then
3223 ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
3224 else
3225 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3226 for as_dir in $PATH
3227 do
3228 IFS=$as_save_IFS
3229 test -z "$as_dir" && as_dir=.
3230 for ac_exec_ext in '' $ac_executable_extensions; do
3231 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3232 ac_cv_prog_ac_ct_CC="$ac_prog"
3233 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3234 break 2
3235 fi
3236 done
3237 done
3238 IFS=$as_save_IFS
3239
3240 fi
3241 fi
3242 ac_ct_CC=$ac_cv_prog_ac_ct_CC
3243 if test -n "$ac_ct_CC"; then
3244 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
3245 $as_echo "$ac_ct_CC" >&6; }
3246 else
3247 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3248 $as_echo "no" >&6; }
3249 fi
3250
3251
3252 test -n "$ac_ct_CC" && break
3253 done
3254
3255 if test "x$ac_ct_CC" = x; then
3256 CC=""
3257 else
3258 case $cross_compiling:$ac_tool_warned in
3259 yes:)
3260 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3261 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3262 ac_tool_warned=yes ;;
3263 esac
3264 CC=$ac_ct_CC
3265 fi
3266 fi
3267
3268 fi
3269
3270
3271 test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3272 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3273 as_fn_error $? "no acceptable C compiler found in \$PATH
3274 See \`config.log' for more details" "$LINENO" 5; }
3275
3276 # Provide some information about the compiler.
3277 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
3278 set X $ac_compile
3279 ac_compiler=$2
3280 for ac_option in --version -v -V -qversion; do
3281 { { ac_try="$ac_compiler $ac_option >&5"
3282 case "(($ac_try" in
3283 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3284 *) ac_try_echo=$ac_try;;
3285 esac
3286 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3287 $as_echo "$ac_try_echo"; } >&5
3288 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3289 ac_status=$?
3290 if test -s conftest.err; then
3291 sed '10a\
3292 ... rest of stderr output deleted ...
3293 10q' conftest.err >conftest.er1
3294 cat conftest.er1 >&5
3295 fi
3296 rm -f conftest.er1 conftest.err
3297 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3298 test $ac_status = 0; }
3299 done
3300
3301 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3302 /* end confdefs.h. */
3303
3304 int
3305 main ()
3306 {
3307
3308 ;
3309 return 0;
3310 }
3311 _ACEOF
3312 ac_clean_files_save=$ac_clean_files
3313 ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
3314 # Try to create an executable without -o first, disregard a.out.
3315 # It will help us diagnose broken compilers, and finding out an intuition
3316 # of exeext.
3317 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
3318 $as_echo_n "checking whether the C compiler works... " >&6; }
3319 ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
3320
3321 # The possible output files:
3322 ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
3323
3324 ac_rmfiles=
3325 for ac_file in $ac_files
3326 do
3327 case $ac_file in
3328 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3329 * ) ac_rmfiles="$ac_rmfiles $ac_file";;
3330 esac
3331 done
3332 rm -f $ac_rmfiles
3333
3334 if { { ac_try="$ac_link_default"
3335 case "(($ac_try" in
3336 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3337 *) ac_try_echo=$ac_try;;
3338 esac
3339 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3340 $as_echo "$ac_try_echo"; } >&5
3341 (eval "$ac_link_default") 2>&5
3342 ac_status=$?
3343 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3344 test $ac_status = 0; }; then :
3345 # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
3346 # So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
3347 # in a Makefile. We should not override ac_cv_exeext if it was cached,
3348 # so that the user can short-circuit this test for compilers unknown to
3349 # Autoconf.
3350 for ac_file in $ac_files ''
3351 do
3352 test -f "$ac_file" || continue
3353 case $ac_file in
3354 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
3355 ;;
3356 [ab].out )
3357 # We found the default executable, but exeext='' is most
3358 # certainly right.
3359 break;;
3360 *.* )
3361 if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
3362 then :; else
3363 ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3364 fi
3365 # We set ac_cv_exeext here because the later test for it is not
3366 # safe: cross compilers may not add the suffix if given an `-o'
3367 # argument, so we may need to know it at that point already.
3368 # Even if this section looks crufty: it has the advantage of
3369 # actually working.
3370 break;;
3371 * )
3372 break;;
3373 esac
3374 done
3375 test "$ac_cv_exeext" = no && ac_cv_exeext=
3376
3377 else
3378 ac_file=''
3379 fi
3380 if test -z "$ac_file"; then :
3381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3382 $as_echo "no" >&6; }
3383 $as_echo "$as_me: failed program was:" >&5
3384 sed 's/^/| /' conftest.$ac_ext >&5
3385
3386 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3387 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3388 as_fn_error 77 "C compiler cannot create executables
3389 See \`config.log' for more details" "$LINENO" 5; }
3390 else
3391 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
3392 $as_echo "yes" >&6; }
3393 fi
3394 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
3395 $as_echo_n "checking for C compiler default output file name... " >&6; }
3396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
3397 $as_echo "$ac_file" >&6; }
3398 ac_exeext=$ac_cv_exeext
3399
3400 rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
3401 ac_clean_files=$ac_clean_files_save
3402 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
3403 $as_echo_n "checking for suffix of executables... " >&6; }
3404 if { { ac_try="$ac_link"
3405 case "(($ac_try" in
3406 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3407 *) ac_try_echo=$ac_try;;
3408 esac
3409 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3410 $as_echo "$ac_try_echo"; } >&5
3411 (eval "$ac_link") 2>&5
3412 ac_status=$?
3413 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3414 test $ac_status = 0; }; then :
3415 # If both `conftest.exe' and `conftest' are `present' (well, observable)
3416 # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
3417 # work properly (i.e., refer to `conftest.exe'), while it won't with
3418 # `rm'.
3419 for ac_file in conftest.exe conftest conftest.*; do
3420 test -f "$ac_file" || continue
3421 case $ac_file in
3422 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
3423 *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
3424 break;;
3425 * ) break;;
3426 esac
3427 done
3428 else
3429 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3430 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3431 as_fn_error $? "cannot compute suffix of executables: cannot compile and link
3432 See \`config.log' for more details" "$LINENO" 5; }
3433 fi
3434 rm -f conftest conftest$ac_cv_exeext
3435 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
3436 $as_echo "$ac_cv_exeext" >&6; }
3437
3438 rm -f conftest.$ac_ext
3439 EXEEXT=$ac_cv_exeext
3440 ac_exeext=$EXEEXT
3441 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3442 /* end confdefs.h. */
3443 #include <stdio.h>
3444 int
3445 main ()
3446 {
3447 FILE *f = fopen ("conftest.out", "w");
3448 return ferror (f) || fclose (f) != 0;
3449
3450 ;
3451 return 0;
3452 }
3453 _ACEOF
3454 ac_clean_files="$ac_clean_files conftest.out"
3455 # Check that the compiler produces executables we can run. If not, either
3456 # the compiler is broken, or we cross compile.
3457 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
3458 $as_echo_n "checking whether we are cross compiling... " >&6; }
3459 if test "$cross_compiling" != yes; then
3460 { { ac_try="$ac_link"
3461 case "(($ac_try" in
3462 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3463 *) ac_try_echo=$ac_try;;
3464 esac
3465 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3466 $as_echo "$ac_try_echo"; } >&5
3467 (eval "$ac_link") 2>&5
3468 ac_status=$?
3469 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3470 test $ac_status = 0; }
3471 if { ac_try='./conftest$ac_cv_exeext'
3472 { { case "(($ac_try" in
3473 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3474 *) ac_try_echo=$ac_try;;
3475 esac
3476 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3477 $as_echo "$ac_try_echo"; } >&5
3478 (eval "$ac_try") 2>&5
3479 ac_status=$?
3480 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3481 test $ac_status = 0; }; }; then
3482 cross_compiling=no
3483 else
3484 if test "$cross_compiling" = maybe; then
3485 cross_compiling=yes
3486 else
3487 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3488 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3489 as_fn_error $? "cannot run C compiled programs.
3490 If you meant to cross compile, use \`--host'.
3491 See \`config.log' for more details" "$LINENO" 5; }
3492 fi
3493 fi
3494 fi
3495 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
3496 $as_echo "$cross_compiling" >&6; }
3497
3498 rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
3499 ac_clean_files=$ac_clean_files_save
3500 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
3501 $as_echo_n "checking for suffix of object files... " >&6; }
3502 if ${ac_cv_objext+:} false; then :
3503 $as_echo_n "(cached) " >&6
3504 else
3505 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3506 /* end confdefs.h. */
3507
3508 int
3509 main ()
3510 {
3511
3512 ;
3513 return 0;
3514 }
3515 _ACEOF
3516 rm -f conftest.o conftest.obj
3517 if { { ac_try="$ac_compile"
3518 case "(($ac_try" in
3519 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3520 *) ac_try_echo=$ac_try;;
3521 esac
3522 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3523 $as_echo "$ac_try_echo"; } >&5
3524 (eval "$ac_compile") 2>&5
3525 ac_status=$?
3526 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3527 test $ac_status = 0; }; then :
3528 for ac_file in conftest.o conftest.obj conftest.*; do
3529 test -f "$ac_file" || continue;
3530 case $ac_file in
3531 *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
3532 *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
3533 break;;
3534 esac
3535 done
3536 else
3537 $as_echo "$as_me: failed program was:" >&5
3538 sed 's/^/| /' conftest.$ac_ext >&5
3539
3540 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3541 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3542 as_fn_error $? "cannot compute suffix of object files: cannot compile
3543 See \`config.log' for more details" "$LINENO" 5; }
3544 fi
3545 rm -f conftest.$ac_cv_objext conftest.$ac_ext
3546 fi
3547 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
3548 $as_echo "$ac_cv_objext" >&6; }
3549 OBJEXT=$ac_cv_objext
3550 ac_objext=$OBJEXT
3551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
3552 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
3553 if ${ac_cv_c_compiler_gnu+:} false; then :
3554 $as_echo_n "(cached) " >&6
3555 else
3556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3557 /* end confdefs.h. */
3558
3559 int
3560 main ()
3561 {
3562 #ifndef __GNUC__
3563 choke me
3564 #endif
3565
3566 ;
3567 return 0;
3568 }
3569 _ACEOF
3570 if ac_fn_c_try_compile "$LINENO"; then :
3571 ac_compiler_gnu=yes
3572 else
3573 ac_compiler_gnu=no
3574 fi
3575 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3576 ac_cv_c_compiler_gnu=$ac_compiler_gnu
3577
3578 fi
3579 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
3580 $as_echo "$ac_cv_c_compiler_gnu" >&6; }
3581 if test $ac_compiler_gnu = yes; then
3582 GCC=yes
3583 else
3584 GCC=
3585 fi
3586 ac_test_CFLAGS=${CFLAGS+set}
3587 ac_save_CFLAGS=$CFLAGS
3588 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
3589 $as_echo_n "checking whether $CC accepts -g... " >&6; }
3590 if ${ac_cv_prog_cc_g+:} false; then :
3591 $as_echo_n "(cached) " >&6
3592 else
3593 ac_save_c_werror_flag=$ac_c_werror_flag
3594 ac_c_werror_flag=yes
3595 ac_cv_prog_cc_g=no
3596 CFLAGS="-g"
3597 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3598 /* end confdefs.h. */
3599
3600 int
3601 main ()
3602 {
3603
3604 ;
3605 return 0;
3606 }
3607 _ACEOF
3608 if ac_fn_c_try_compile "$LINENO"; then :
3609 ac_cv_prog_cc_g=yes
3610 else
3611 CFLAGS=""
3612 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3613 /* end confdefs.h. */
3614
3615 int
3616 main ()
3617 {
3618
3619 ;
3620 return 0;
3621 }
3622 _ACEOF
3623 if ac_fn_c_try_compile "$LINENO"; then :
3624
3625 else
3626 ac_c_werror_flag=$ac_save_c_werror_flag
3627 CFLAGS="-g"
3628 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3629 /* end confdefs.h. */
3630
3631 int
3632 main ()
3633 {
3634
3635 ;
3636 return 0;
3637 }
3638 _ACEOF
3639 if ac_fn_c_try_compile "$LINENO"; then :
3640 ac_cv_prog_cc_g=yes
3641 fi
3642 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3643 fi
3644 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3645 fi
3646 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3647 ac_c_werror_flag=$ac_save_c_werror_flag
3648 fi
3649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
3650 $as_echo "$ac_cv_prog_cc_g" >&6; }
3651 if test "$ac_test_CFLAGS" = set; then
3652 CFLAGS=$ac_save_CFLAGS
3653 elif test $ac_cv_prog_cc_g = yes; then
3654 if test "$GCC" = yes; then
3655 CFLAGS="-g -O2"
3656 else
3657 CFLAGS="-g"
3658 fi
3659 else
3660 if test "$GCC" = yes; then
3661 CFLAGS="-O2"
3662 else
3663 CFLAGS=
3664 fi
3665 fi
3666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
3667 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
3668 if ${ac_cv_prog_cc_c89+:} false; then :
3669 $as_echo_n "(cached) " >&6
3670 else
3671 ac_cv_prog_cc_c89=no
3672 ac_save_CC=$CC
3673 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3674 /* end confdefs.h. */
3675 #include <stdarg.h>
3676 #include <stdio.h>
3677 struct stat;
3678 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
3679 struct buf { int x; };
3680 FILE * (*rcsopen) (struct buf *, struct stat *, int);
3681 static char *e (p, i)
3682 char **p;
3683 int i;
3684 {
3685 return p[i];
3686 }
3687 static char *f (char * (*g) (char **, int), char **p, ...)
3688 {
3689 char *s;
3690 va_list v;
3691 va_start (v,p);
3692 s = g (p, va_arg (v,int));
3693 va_end (v);
3694 return s;
3695 }
3696
3697 /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has
3698 function prototypes and stuff, but not '\xHH' hex character constants.
3699 These don't provoke an error unfortunately, instead are silently treated
3700 as 'x'. The following induces an error, until -std is added to get
3701 proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an
3702 array size at least. It's necessary to write '\x00'==0 to get something
3703 that's true only with -std. */
3704 int osf4_cc_array ['\x00' == 0 ? 1 : -1];
3705
3706 /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
3707 inside strings and character constants. */
3708 #define FOO(x) 'x'
3709 int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
3710
3711 int test (int i, double x);
3712 struct s1 {int (*f) (int a);};
3713 struct s2 {int (*f) (double a);};
3714 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
3715 int argc;
3716 char **argv;
3717 int
3718 main ()
3719 {
3720 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
3721 ;
3722 return 0;
3723 }
3724 _ACEOF
3725 for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
3726 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
3727 do
3728 CC="$ac_save_CC $ac_arg"
3729 if ac_fn_c_try_compile "$LINENO"; then :
3730 ac_cv_prog_cc_c89=$ac_arg
3731 fi
3732 rm -f core conftest.err conftest.$ac_objext
3733 test "x$ac_cv_prog_cc_c89" != "xno" && break
3734 done
3735 rm -f conftest.$ac_ext
3736 CC=$ac_save_CC
3737
3738 fi
3739 # AC_CACHE_VAL
3740 case "x$ac_cv_prog_cc_c89" in
3741 x)
3742 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
3743 $as_echo "none needed" >&6; } ;;
3744 xno)
3745 { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
3746 $as_echo "unsupported" >&6; } ;;
3747 *)
3748 CC="$CC $ac_cv_prog_cc_c89"
3749 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
3750 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
3751 esac
3752 if test "x$ac_cv_prog_cc_c89" != xno; then :
3753
3754 fi
3755
3756 ac_ext=c
3757 ac_cpp='$CPP $CPPFLAGS'
3758 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3759 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3760 ac_compiler_gnu=$ac_cv_c_compiler_gnu
3761
3762 ac_ext=cpp
3763 ac_cpp='$CXXCPP $CPPFLAGS'
3764 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3765 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3766 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
3767 if test -z "$CXX"; then
3768 if test -n "$CCC"; then
3769 CXX=$CCC
3770 else
3771 if test -n "$ac_tool_prefix"; then
3772 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3773 do
3774 # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
3775 set dummy $ac_tool_prefix$ac_prog; ac_word=$2
3776 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3777 $as_echo_n "checking for $ac_word... " >&6; }
3778 if ${ac_cv_prog_CXX+:} false; then :
3779 $as_echo_n "(cached) " >&6
3780 else
3781 if test -n "$CXX"; then
3782 ac_cv_prog_CXX="$CXX" # Let the user override the test.
3783 else
3784 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3785 for as_dir in $PATH
3786 do
3787 IFS=$as_save_IFS
3788 test -z "$as_dir" && as_dir=.
3789 for ac_exec_ext in '' $ac_executable_extensions; do
3790 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3791 ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
3792 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3793 break 2
3794 fi
3795 done
3796 done
3797 IFS=$as_save_IFS
3798
3799 fi
3800 fi
3801 CXX=$ac_cv_prog_CXX
3802 if test -n "$CXX"; then
3803 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
3804 $as_echo "$CXX" >&6; }
3805 else
3806 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3807 $as_echo "no" >&6; }
3808 fi
3809
3810
3811 test -n "$CXX" && break
3812 done
3813 fi
3814 if test -z "$CXX"; then
3815 ac_ct_CXX=$CXX
3816 for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC
3817 do
3818 # Extract the first word of "$ac_prog", so it can be a program name with args.
3819 set dummy $ac_prog; ac_word=$2
3820 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
3821 $as_echo_n "checking for $ac_word... " >&6; }
3822 if ${ac_cv_prog_ac_ct_CXX+:} false; then :
3823 $as_echo_n "(cached) " >&6
3824 else
3825 if test -n "$ac_ct_CXX"; then
3826 ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
3827 else
3828 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3829 for as_dir in $PATH
3830 do
3831 IFS=$as_save_IFS
3832 test -z "$as_dir" && as_dir=.
3833 for ac_exec_ext in '' $ac_executable_extensions; do
3834 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
3835 ac_cv_prog_ac_ct_CXX="$ac_prog"
3836 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
3837 break 2
3838 fi
3839 done
3840 done
3841 IFS=$as_save_IFS
3842
3843 fi
3844 fi
3845 ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
3846 if test -n "$ac_ct_CXX"; then
3847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
3848 $as_echo "$ac_ct_CXX" >&6; }
3849 else
3850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
3851 $as_echo "no" >&6; }
3852 fi
3853
3854
3855 test -n "$ac_ct_CXX" && break
3856 done
3857
3858 if test "x$ac_ct_CXX" = x; then
3859 CXX="g++"
3860 else
3861 case $cross_compiling:$ac_tool_warned in
3862 yes:)
3863 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
3864 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
3865 ac_tool_warned=yes ;;
3866 esac
3867 CXX=$ac_ct_CXX
3868 fi
3869 fi
3870
3871 fi
3872 fi
3873 # Provide some information about the compiler.
3874 $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
3875 set X $ac_compile
3876 ac_compiler=$2
3877 for ac_option in --version -v -V -qversion; do
3878 { { ac_try="$ac_compiler $ac_option >&5"
3879 case "(($ac_try" in
3880 *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
3881 *) ac_try_echo=$ac_try;;
3882 esac
3883 eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
3884 $as_echo "$ac_try_echo"; } >&5
3885 (eval "$ac_compiler $ac_option >&5") 2>conftest.err
3886 ac_status=$?
3887 if test -s conftest.err; then
3888 sed '10a\
3889 ... rest of stderr output deleted ...
3890 10q' conftest.err >conftest.er1
3891 cat conftest.er1 >&5
3892 fi
3893 rm -f conftest.er1 conftest.err
3894 $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
3895 test $ac_status = 0; }
3896 done
3897
3898 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
3899 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
3900 if ${ac_cv_cxx_compiler_gnu+:} false; then :
3901 $as_echo_n "(cached) " >&6
3902 else
3903 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3904 /* end confdefs.h. */
3905
3906 int
3907 main ()
3908 {
3909 #ifndef __GNUC__
3910 choke me
3911 #endif
3912
3913 ;
3914 return 0;
3915 }
3916 _ACEOF
3917 if ac_fn_cxx_try_compile "$LINENO"; then :
3918 ac_compiler_gnu=yes
3919 else
3920 ac_compiler_gnu=no
3921 fi
3922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3923 ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
3924
3925 fi
3926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
3927 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
3928 if test $ac_compiler_gnu = yes; then
3929 GXX=yes
3930 else
3931 GXX=
3932 fi
3933 ac_test_CXXFLAGS=${CXXFLAGS+set}
3934 ac_save_CXXFLAGS=$CXXFLAGS
3935 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
3936 $as_echo_n "checking whether $CXX accepts -g... " >&6; }
3937 if ${ac_cv_prog_cxx_g+:} false; then :
3938 $as_echo_n "(cached) " >&6
3939 else
3940 ac_save_cxx_werror_flag=$ac_cxx_werror_flag
3941 ac_cxx_werror_flag=yes
3942 ac_cv_prog_cxx_g=no
3943 CXXFLAGS="-g"
3944 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3945 /* end confdefs.h. */
3946
3947 int
3948 main ()
3949 {
3950
3951 ;
3952 return 0;
3953 }
3954 _ACEOF
3955 if ac_fn_cxx_try_compile "$LINENO"; then :
3956 ac_cv_prog_cxx_g=yes
3957 else
3958 CXXFLAGS=""
3959 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3960 /* end confdefs.h. */
3961
3962 int
3963 main ()
3964 {
3965
3966 ;
3967 return 0;
3968 }
3969 _ACEOF
3970 if ac_fn_cxx_try_compile "$LINENO"; then :
3971
3972 else
3973 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3974 CXXFLAGS="-g"
3975 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3976 /* end confdefs.h. */
3977
3978 int
3979 main ()
3980 {
3981
3982 ;
3983 return 0;
3984 }
3985 _ACEOF
3986 if ac_fn_cxx_try_compile "$LINENO"; then :
3987 ac_cv_prog_cxx_g=yes
3988 fi
3989 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3990 fi
3991 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3992 fi
3993 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3994 ac_cxx_werror_flag=$ac_save_cxx_werror_flag
3995 fi
3996 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
3997 $as_echo "$ac_cv_prog_cxx_g" >&6; }
3998 if test "$ac_test_CXXFLAGS" = set; then
3999 CXXFLAGS=$ac_save_CXXFLAGS
4000 elif test $ac_cv_prog_cxx_g = yes; then
4001 if test "$GXX" = yes; then
4002 CXXFLAGS="-g -O2"
4003 else
4004 CXXFLAGS="-g"
4005 fi
4006 else
4007 if test "$GXX" = yes; then
4008 CXXFLAGS="-O2"
4009 else
4010 CXXFLAGS=
4011 fi
4012 fi
4013 ac_ext=c
4014 ac_cpp='$CPP $CPPFLAGS'
4015 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4016 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4017 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4018
4019
4020
4021 ac_ext=c
4022 ac_cpp='$CPP $CPPFLAGS'
4023 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4024 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4025 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4026 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
4027 $as_echo_n "checking how to run the C preprocessor... " >&6; }
4028 # On Suns, sometimes $CPP names a directory.
4029 if test -n "$CPP" && test -d "$CPP"; then
4030 CPP=
4031 fi
4032 if test -z "$CPP"; then
4033 if ${ac_cv_prog_CPP+:} false; then :
4034 $as_echo_n "(cached) " >&6
4035 else
4036 # Double quotes because CPP needs to be expanded
4037 for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
4038 do
4039 ac_preproc_ok=false
4040 for ac_c_preproc_warn_flag in '' yes
4041 do
4042 # Use a header file that comes with gcc, so configuring glibc
4043 # with a fresh cross-compiler works.
4044 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4045 # <limits.h> exists even on freestanding compilers.
4046 # On the NeXT, cc -E runs the code through the compiler's parser,
4047 # not just through cpp. "Syntax error" is here to catch this case.
4048 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4049 /* end confdefs.h. */
4050 #ifdef __STDC__
4051 # include <limits.h>
4052 #else
4053 # include <assert.h>
4054 #endif
4055 Syntax error
4056 _ACEOF
4057 if ac_fn_c_try_cpp "$LINENO"; then :
4058
4059 else
4060 # Broken: fails on valid input.
4061 continue
4062 fi
4063 rm -f conftest.err conftest.i conftest.$ac_ext
4064
4065 # OK, works on sane cases. Now check whether nonexistent headers
4066 # can be detected and how.
4067 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4068 /* end confdefs.h. */
4069 #include <ac_nonexistent.h>
4070 _ACEOF
4071 if ac_fn_c_try_cpp "$LINENO"; then :
4072 # Broken: success on invalid input.
4073 continue
4074 else
4075 # Passes both tests.
4076 ac_preproc_ok=:
4077 break
4078 fi
4079 rm -f conftest.err conftest.i conftest.$ac_ext
4080
4081 done
4082 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4083 rm -f conftest.i conftest.err conftest.$ac_ext
4084 if $ac_preproc_ok; then :
4085 break
4086 fi
4087
4088 done
4089 ac_cv_prog_CPP=$CPP
4090
4091 fi
4092 CPP=$ac_cv_prog_CPP
4093 else
4094 ac_cv_prog_CPP=$CPP
4095 fi
4096 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
4097 $as_echo "$CPP" >&6; }
4098 ac_preproc_ok=false
4099 for ac_c_preproc_warn_flag in '' yes
4100 do
4101 # Use a header file that comes with gcc, so configuring glibc
4102 # with a fresh cross-compiler works.
4103 # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
4104 # <limits.h> exists even on freestanding compilers.
4105 # On the NeXT, cc -E runs the code through the compiler's parser,
4106 # not just through cpp. "Syntax error" is here to catch this case.
4107 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4108 /* end confdefs.h. */
4109 #ifdef __STDC__
4110 # include <limits.h>
4111 #else
4112 # include <assert.h>
4113 #endif
4114 Syntax error
4115 _ACEOF
4116 if ac_fn_c_try_cpp "$LINENO"; then :
4117
4118 else
4119 # Broken: fails on valid input.
4120 continue
4121 fi
4122 rm -f conftest.err conftest.i conftest.$ac_ext
4123
4124 # OK, works on sane cases. Now check whether nonexistent headers
4125 # can be detected and how.
4126 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4127 /* end confdefs.h. */
4128 #include <ac_nonexistent.h>
4129 _ACEOF
4130 if ac_fn_c_try_cpp "$LINENO"; then :
4131 # Broken: success on invalid input.
4132 continue
4133 else
4134 # Passes both tests.
4135 ac_preproc_ok=:
4136 break
4137 fi
4138 rm -f conftest.err conftest.i conftest.$ac_ext
4139
4140 done
4141 # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
4142 rm -f conftest.i conftest.err conftest.$ac_ext
4143 if $ac_preproc_ok; then :
4144
4145 else
4146 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
4147 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
4148 as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
4149 See \`config.log' for more details" "$LINENO" 5; }
4150 fi
4151
4152 ac_ext=c
4153 ac_cpp='$CPP $CPPFLAGS'
4154 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
4155 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
4156 ac_compiler_gnu=$ac_cv_c_compiler_gnu
4157
4158
4159 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
4160 $as_echo_n "checking for grep that handles long lines and -e... " >&6; }
4161 if ${ac_cv_path_GREP+:} false; then :
4162 $as_echo_n "(cached) " >&6
4163 else
4164 if test -z "$GREP"; then
4165 ac_path_GREP_found=false
4166 # Loop through the user's path and test for each of PROGNAME-LIST
4167 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4168 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4169 do
4170 IFS=$as_save_IFS
4171 test -z "$as_dir" && as_dir=.
4172 for ac_prog in grep ggrep; do
4173 for ac_exec_ext in '' $ac_executable_extensions; do
4174 ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
4175 as_fn_executable_p "$ac_path_GREP" || continue
4176 # Check for GNU ac_path_GREP and select it if it is found.
4177 # Check for GNU $ac_path_GREP
4178 case `"$ac_path_GREP" --version 2>&1` in
4179 *GNU*)
4180 ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
4181 *)
4182 ac_count=0
4183 $as_echo_n 0123456789 >"conftest.in"
4184 while :
4185 do
4186 cat "conftest.in" "conftest.in" >"conftest.tmp"
4187 mv "conftest.tmp" "conftest.in"
4188 cp "conftest.in" "conftest.nl"
4189 $as_echo 'GREP' >> "conftest.nl"
4190 "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4191 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4192 as_fn_arith $ac_count + 1 && ac_count=$as_val
4193 if test $ac_count -gt ${ac_path_GREP_max-0}; then
4194 # Best one so far, save it but keep looking for a better one
4195 ac_cv_path_GREP="$ac_path_GREP"
4196 ac_path_GREP_max=$ac_count
4197 fi
4198 # 10*(2^10) chars as input seems more than enough
4199 test $ac_count -gt 10 && break
4200 done
4201 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4202 esac
4203
4204 $ac_path_GREP_found && break 3
4205 done
4206 done
4207 done
4208 IFS=$as_save_IFS
4209 if test -z "$ac_cv_path_GREP"; then
4210 as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4211 fi
4212 else
4213 ac_cv_path_GREP=$GREP
4214 fi
4215
4216 fi
4217 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
4218 $as_echo "$ac_cv_path_GREP" >&6; }
4219 GREP="$ac_cv_path_GREP"
4220
4221
4222 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
4223 $as_echo_n "checking for egrep... " >&6; }
4224 if ${ac_cv_path_EGREP+:} false; then :
4225 $as_echo_n "(cached) " >&6
4226 else
4227 if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
4228 then ac_cv_path_EGREP="$GREP -E"
4229 else
4230 if test -z "$EGREP"; then
4231 ac_path_EGREP_found=false
4232 # Loop through the user's path and test for each of PROGNAME-LIST
4233 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
4234 for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
4235 do
4236 IFS=$as_save_IFS
4237 test -z "$as_dir" && as_dir=.
4238 for ac_prog in egrep; do
4239 for ac_exec_ext in '' $ac_executable_extensions; do
4240 ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
4241 as_fn_executable_p "$ac_path_EGREP" || continue
4242 # Check for GNU ac_path_EGREP and select it if it is found.
4243 # Check for GNU $ac_path_EGREP
4244 case `"$ac_path_EGREP" --version 2>&1` in
4245 *GNU*)
4246 ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
4247 *)
4248 ac_count=0
4249 $as_echo_n 0123456789 >"conftest.in"
4250 while :
4251 do
4252 cat "conftest.in" "conftest.in" >"conftest.tmp"
4253 mv "conftest.tmp" "conftest.in"
4254 cp "conftest.in" "conftest.nl"
4255 $as_echo 'EGREP' >> "conftest.nl"
4256 "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
4257 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
4258 as_fn_arith $ac_count + 1 && ac_count=$as_val
4259 if test $ac_count -gt ${ac_path_EGREP_max-0}; then
4260 # Best one so far, save it but keep looking for a better one
4261 ac_cv_path_EGREP="$ac_path_EGREP"
4262 ac_path_EGREP_max=$ac_count
4263 fi
4264 # 10*(2^10) chars as input seems more than enough
4265 test $ac_count -gt 10 && break
4266 done
4267 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
4268 esac
4269
4270 $ac_path_EGREP_found && break 3
4271 done
4272 done
4273 done
4274 IFS=$as_save_IFS
4275 if test -z "$ac_cv_path_EGREP"; then
4276 as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
4277 fi
4278 else
4279 ac_cv_path_EGREP=$EGREP
4280 fi
4281
4282 fi
4283 fi
4284 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
4285 $as_echo "$ac_cv_path_EGREP" >&6; }
4286 EGREP="$ac_cv_path_EGREP"
4287
4288
4289 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
4290 $as_echo_n "checking for ANSI C header files... " >&6; }
4291 if ${ac_cv_header_stdc+:} false; then :
4292 $as_echo_n "(cached) " >&6
4293 else
4294 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4295 /* end confdefs.h. */
4296 #include <stdlib.h>
4297 #include <stdarg.h>
4298 #include <string.h>
4299 #include <float.h>
4300
4301 int
4302 main ()
4303 {
4304
4305 ;
4306 return 0;
4307 }
4308 _ACEOF
4309 if ac_fn_c_try_compile "$LINENO"; then :
4310 ac_cv_header_stdc=yes
4311 else
4312 ac_cv_header_stdc=no
4313 fi
4314 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4315
4316 if test $ac_cv_header_stdc = yes; then
4317 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4318 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4319 /* end confdefs.h. */
4320 #include <string.h>
4321
4322 _ACEOF
4323 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4324 $EGREP "memchr" >/dev/null 2>&1; then :
4325
4326 else
4327 ac_cv_header_stdc=no
4328 fi
4329 rm -f conftest*
4330
4331 fi
4332
4333 if test $ac_cv_header_stdc = yes; then
4334 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4335 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4336 /* end confdefs.h. */
4337 #include <stdlib.h>
4338
4339 _ACEOF
4340 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4341 $EGREP "free" >/dev/null 2>&1; then :
4342
4343 else
4344 ac_cv_header_stdc=no
4345 fi
4346 rm -f conftest*
4347
4348 fi
4349
4350 if test $ac_cv_header_stdc = yes; then
4351 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4352 if test "$cross_compiling" = yes; then :
4353 :
4354 else
4355 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4356 /* end confdefs.h. */
4357 #include <ctype.h>
4358 #include <stdlib.h>
4359 #if ((' ' & 0x0FF) == 0x020)
4360 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4361 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4362 #else
4363 # define ISLOWER(c) \
4364 (('a' <= (c) && (c) <= 'i') \
4365 || ('j' <= (c) && (c) <= 'r') \
4366 || ('s' <= (c) && (c) <= 'z'))
4367 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4368 #endif
4369
4370 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4371 int
4372 main ()
4373 {
4374 int i;
4375 for (i = 0; i < 256; i++)
4376 if (XOR (islower (i), ISLOWER (i))
4377 || toupper (i) != TOUPPER (i))
4378 return 2;
4379 return 0;
4380 }
4381 _ACEOF
4382 if ac_fn_c_try_run "$LINENO"; then :
4383
4384 else
4385 ac_cv_header_stdc=no
4386 fi
4387 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
4388 conftest.$ac_objext conftest.beam conftest.$ac_ext
4389 fi
4390
4391 fi
4392 fi
4393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
4394 $as_echo "$ac_cv_header_stdc" >&6; }
4395 if test $ac_cv_header_stdc = yes; then
4396
4397 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
4398
4399 fi
4400
4401 # On IRIX 5.3, sys/types and inttypes.h are conflicting.
4402 for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4403 inttypes.h stdint.h unistd.h
4404 do :
4405 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
4406 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
4407 "
4408 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
4409 cat >>confdefs.h <<_ACEOF
4410 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
4411 _ACEOF
4412
4413 fi
4414
4415 done
4416
4417
4418
4419 ac_fn_c_check_header_mongrel "$LINENO" "minix/config.h" "ac_cv_header_minix_config_h" "$ac_includes_default"
4420 if test "x$ac_cv_header_minix_config_h" = xyes; then :
4421 MINIX=yes
4422 else
4423 MINIX=
4424 fi
4425
4426
4427 if test "$MINIX" = yes; then
4428
4429 $as_echo "#define _POSIX_SOURCE 1" >>confdefs.h
4430
4431
4432 $as_echo "#define _POSIX_1_SOURCE 2" >>confdefs.h
4433
4434
4435 $as_echo "#define _MINIX 1" >>confdefs.h
4436
4437 fi
4438
4439
4440 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether it is safe to define __EXTENSIONS__" >&5
4441 $as_echo_n "checking whether it is safe to define __EXTENSIONS__... " >&6; }
4442 if ${ac_cv_safe_to_define___extensions__+:} false; then :
4443 $as_echo_n "(cached) " >&6
4444 else
4445 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4446 /* end confdefs.h. */
4447
4448 # define __EXTENSIONS__ 1
4449 $ac_includes_default
4450 int
4451 main ()
4452 {
4453
4454 ;
4455 return 0;
4456 }
4457 _ACEOF
4458 if ac_fn_c_try_compile "$LINENO"; then :
4459 ac_cv_safe_to_define___extensions__=yes
4460 else
4461 ac_cv_safe_to_define___extensions__=no
4462 fi
4463 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4464 fi
4465 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_safe_to_define___extensions__" >&5
4466 $as_echo "$ac_cv_safe_to_define___extensions__" >&6; }
4467 test $ac_cv_safe_to_define___extensions__ = yes &&
4468 $as_echo "#define __EXTENSIONS__ 1" >>confdefs.h
4469
4470 $as_echo "#define _ALL_SOURCE 1" >>confdefs.h
4471
4472 $as_echo "#define _GNU_SOURCE 1" >>confdefs.h
4473
4474 $as_echo "#define _POSIX_PTHREAD_SEMANTICS 1" >>confdefs.h
4475
4476 $as_echo "#define _TANDEM_SOURCE 1" >>confdefs.h
4477
4478
4479 ac_aux_dir=
4480 for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
4481 if test -f "$ac_dir/install-sh"; then
4482 ac_aux_dir=$ac_dir
4483 ac_install_sh="$ac_aux_dir/install-sh -c"
4484 break
4485 elif test -f "$ac_dir/install.sh"; then
4486 ac_aux_dir=$ac_dir
4487 ac_install_sh="$ac_aux_dir/install.sh -c"
4488 break
4489 elif test -f "$ac_dir/shtool"; then
4490 ac_aux_dir=$ac_dir
4491 ac_install_sh="$ac_aux_dir/shtool install -c"
4492 break
4493 fi
4494 done
4495 if test -z "$ac_aux_dir"; then
4496 as_fn_error $? "cannot find install-sh, install.sh, or shtool in \"$srcdir\" \"$srcdir/..\" \"$srcdir/../..\"" "$LINENO" 5
4497 fi
4498
4499 # These three variables are undocumented and unsupported,
4500 # and are intended to be withdrawn in a future Autoconf release.
4501 # They can cause serious problems if a builder's source tree is in a directory
4502 # whose full name contains unusual characters.
4503 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
4504 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
4505 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
4506
4507
4508 # Make sure we can run config.sub.
4509 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
4510 as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
4511
4512 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
4513 $as_echo_n "checking build system type... " >&6; }
4514 if ${ac_cv_build+:} false; then :
4515 $as_echo_n "(cached) " >&6
4516 else
4517 ac_build_alias=$build_alias
4518 test "x$ac_build_alias" = x &&
4519 ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
4520 test "x$ac_build_alias" = x &&
4521 as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
4522 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
4523 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
4524
4525 fi
4526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
4527 $as_echo "$ac_cv_build" >&6; }
4528 case $ac_cv_build in
4529 *-*-*) ;;
4530 *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
4531 esac
4532 build=$ac_cv_build
4533 ac_save_IFS=$IFS; IFS='-'
4534 set x $ac_cv_build
4535 shift
4536 build_cpu=$1
4537 build_vendor=$2
4538 shift; shift
4539 # Remember, the first character of IFS is used to create $*,
4540 # except with old shells:
4541 build_os=$*
4542 IFS=$ac_save_IFS
4543 case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
4544
4545
4546 { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
4547 $as_echo_n "checking host system type... " >&6; }
4548 if ${ac_cv_host+:} false; then :
4549 $as_echo_n "(cached) " >&6
4550 else
4551 if test "x$host_alias" = x; then
4552 ac_cv_host=$ac_cv_build
4553 else
4554 ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
4555 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
4556 fi
4557
4558 fi
4559 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
4560 $as_echo "$ac_cv_host" >&6; }
4561 case $ac_cv_host in
4562 *-*-*) ;;
4563 *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
4564 esac
4565 host=$ac_cv_host
4566 ac_save_IFS=$IFS; IFS='-'
4567 set x $ac_cv_host
4568 shift
4569 host_cpu=$1
4570 host_vendor=$2
4571 shift; shift
4572 # Remember, the first character of IFS is used to create $*,
4573 # except with old shells:
4574 host_os=$*
4575 IFS=$ac_save_IFS
4576 case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
4577
4578
4579 { $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
4580 $as_echo_n "checking target system type... " >&6; }
4581 if ${ac_cv_target+:} false; then :
4582 $as_echo_n "(cached) " >&6
4583 else
4584 if test "x$target_alias" = x; then
4585 ac_cv_target=$ac_cv_host
4586 else
4587 ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
4588 as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
4589 fi
4590
4591 fi
4592 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
4593 $as_echo "$ac_cv_target" >&6; }
4594 case $ac_cv_target in
4595 *-*-*) ;;
4596 *) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
4597 esac
4598 target=$ac_cv_target
4599 ac_save_IFS=$IFS; IFS='-'
4600 set x $ac_cv_target
4601 shift
4602 target_cpu=$1
4603 target_vendor=$2
4604 shift; shift
4605 # Remember, the first character of IFS is used to create $*,
4606 # except with old shells:
4607 target_os=$*
4608 IFS=$ac_save_IFS
4609 case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
4610
4611
4612 # The aliases save the names the user supplied, while $host etc.
4613 # will get canonicalized.
4614 test -n "$target_alias" &&
4615 test "$program_prefix$program_suffix$program_transform_name" = \
4616 NONENONEs,x,x, &&
4617 program_prefix=${target_alias}-
4618
4619 # The tests for host and target for $enable_largefile require
4620 # canonical names.
4621
4622
4623
4624 # As the $enable_largefile decision depends on --enable-plugins we must set it
4625 # even in directories otherwise not depending on the $plugins option.
4626
4627
4628 maybe_plugins=no
4629 for ac_header in dlfcn.h
4630 do :
4631 ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default
4632 "
4633 if test "x$ac_cv_header_dlfcn_h" = xyes; then :
4634 cat >>confdefs.h <<_ACEOF
4635 #define HAVE_DLFCN_H 1
4636 _ACEOF
4637 maybe_plugins=yes
4638 fi
4639
4640 done
4641
4642 for ac_header in windows.h
4643 do :
4644 ac_fn_c_check_header_compile "$LINENO" "windows.h" "ac_cv_header_windows_h" "$ac_includes_default
4645 "
4646 if test "x$ac_cv_header_windows_h" = xyes; then :
4647 cat >>confdefs.h <<_ACEOF
4648 #define HAVE_WINDOWS_H 1
4649 _ACEOF
4650 maybe_plugins=yes
4651 fi
4652
4653 done
4654
4655
4656 # Check whether --enable-plugins was given.
4657 if test "${enable_plugins+set}" = set; then :
4658 enableval=$enable_plugins; case "${enableval}" in
4659 no) plugins=no ;;
4660 *) plugins=yes
4661 if test "$maybe_plugins" != "yes" ; then
4662 as_fn_error $? "Building with plugin support requires a host that supports dlopen." "$LINENO" 5
4663 fi ;;
4664 esac
4665 else
4666 plugins=$maybe_plugins
4667
4668 fi
4669
4670 if test "$plugins" = "yes"; then
4671 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlsym" >&5
4672 $as_echo_n "checking for library containing dlsym... " >&6; }
4673 if ${ac_cv_search_dlsym+:} false; then :
4674 $as_echo_n "(cached) " >&6
4675 else
4676 ac_func_search_save_LIBS=$LIBS
4677 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4678 /* end confdefs.h. */
4679
4680 /* Override any GCC internal prototype to avoid an error.
4681 Use char because int might match the return type of a GCC
4682 builtin and then its argument prototype would still apply. */
4683 #ifdef __cplusplus
4684 extern "C"
4685 #endif
4686 char dlsym ();
4687 int
4688 main ()
4689 {
4690 return dlsym ();
4691 ;
4692 return 0;
4693 }
4694 _ACEOF
4695 for ac_lib in '' dl; do
4696 if test -z "$ac_lib"; then
4697 ac_res="none required"
4698 else
4699 ac_res=-l$ac_lib
4700 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
4701 fi
4702 if ac_fn_c_try_link "$LINENO"; then :
4703 ac_cv_search_dlsym=$ac_res
4704 fi
4705 rm -f core conftest.err conftest.$ac_objext \
4706 conftest$ac_exeext
4707 if ${ac_cv_search_dlsym+:} false; then :
4708 break
4709 fi
4710 done
4711 if ${ac_cv_search_dlsym+:} false; then :
4712
4713 else
4714 ac_cv_search_dlsym=no
4715 fi
4716 rm conftest.$ac_ext
4717 LIBS=$ac_func_search_save_LIBS
4718 fi
4719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlsym" >&5
4720 $as_echo "$ac_cv_search_dlsym" >&6; }
4721 ac_res=$ac_cv_search_dlsym
4722 if test "$ac_res" != no; then :
4723 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
4724
4725 fi
4726
4727 fi
4728
4729
4730 case "${host}" in
4731 sparc-*-solaris*|i[3-7]86-*-solaris*)
4732 # On native 32bit sparc and ia32 solaris, large-file and procfs support
4733 # are mutually exclusive; and without procfs support, the bfd/ elf module
4734 # cannot provide certain routines such as elfcore_write_prpsinfo
4735 # or elfcore_write_prstatus. So unless the user explicitly requested
4736 # large-file support through the --enable-largefile switch, disable
4737 # large-file support in favor of procfs support.
4738 test "${target}" = "${host}" -a "x$plugins" = xno \
4739 && : ${enable_largefile="no"}
4740 ;;
4741 esac
4742
4743 # Check whether --enable-largefile was given.
4744 if test "${enable_largefile+set}" = set; then :
4745 enableval=$enable_largefile;
4746 fi
4747
4748 if test "$enable_largefile" != no; then
4749
4750 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for special C compiler options needed for large files" >&5
4751 $as_echo_n "checking for special C compiler options needed for large files... " >&6; }
4752 if ${ac_cv_sys_largefile_CC+:} false; then :
4753 $as_echo_n "(cached) " >&6
4754 else
4755 ac_cv_sys_largefile_CC=no
4756 if test "$GCC" != yes; then
4757 ac_save_CC=$CC
4758 while :; do
4759 # IRIX 6.2 and later do not support large files by default,
4760 # so use the C compiler's -n32 option if that helps.
4761 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4762 /* end confdefs.h. */
4763 #include <sys/types.h>
4764 /* Check that off_t can represent 2**63 - 1 correctly.
4765 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4766 since some C++ compilers masquerading as C compilers
4767 incorrectly reject 9223372036854775807. */
4768 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4769 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4770 && LARGE_OFF_T % 2147483647 == 1)
4771 ? 1 : -1];
4772 int
4773 main ()
4774 {
4775
4776 ;
4777 return 0;
4778 }
4779 _ACEOF
4780 if ac_fn_c_try_compile "$LINENO"; then :
4781 break
4782 fi
4783 rm -f core conftest.err conftest.$ac_objext
4784 CC="$CC -n32"
4785 if ac_fn_c_try_compile "$LINENO"; then :
4786 ac_cv_sys_largefile_CC=' -n32'; break
4787 fi
4788 rm -f core conftest.err conftest.$ac_objext
4789 break
4790 done
4791 CC=$ac_save_CC
4792 rm -f conftest.$ac_ext
4793 fi
4794 fi
4795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_largefile_CC" >&5
4796 $as_echo "$ac_cv_sys_largefile_CC" >&6; }
4797 if test "$ac_cv_sys_largefile_CC" != no; then
4798 CC=$CC$ac_cv_sys_largefile_CC
4799 fi
4800
4801 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _FILE_OFFSET_BITS value needed for large files" >&5
4802 $as_echo_n "checking for _FILE_OFFSET_BITS value needed for large files... " >&6; }
4803 if ${ac_cv_sys_file_offset_bits+:} false; then :
4804 $as_echo_n "(cached) " >&6
4805 else
4806 while :; do
4807 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4808 /* end confdefs.h. */
4809 #include <sys/types.h>
4810 /* Check that off_t can represent 2**63 - 1 correctly.
4811 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4812 since some C++ compilers masquerading as C compilers
4813 incorrectly reject 9223372036854775807. */
4814 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4815 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4816 && LARGE_OFF_T % 2147483647 == 1)
4817 ? 1 : -1];
4818 int
4819 main ()
4820 {
4821
4822 ;
4823 return 0;
4824 }
4825 _ACEOF
4826 if ac_fn_c_try_compile "$LINENO"; then :
4827 ac_cv_sys_file_offset_bits=no; break
4828 fi
4829 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4830 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4831 /* end confdefs.h. */
4832 #define _FILE_OFFSET_BITS 64
4833 #include <sys/types.h>
4834 /* Check that off_t can represent 2**63 - 1 correctly.
4835 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4836 since some C++ compilers masquerading as C compilers
4837 incorrectly reject 9223372036854775807. */
4838 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4839 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4840 && LARGE_OFF_T % 2147483647 == 1)
4841 ? 1 : -1];
4842 int
4843 main ()
4844 {
4845
4846 ;
4847 return 0;
4848 }
4849 _ACEOF
4850 if ac_fn_c_try_compile "$LINENO"; then :
4851 ac_cv_sys_file_offset_bits=64; break
4852 fi
4853 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4854 ac_cv_sys_file_offset_bits=unknown
4855 break
4856 done
4857 fi
4858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_file_offset_bits" >&5
4859 $as_echo "$ac_cv_sys_file_offset_bits" >&6; }
4860 case $ac_cv_sys_file_offset_bits in #(
4861 no | unknown) ;;
4862 *)
4863 cat >>confdefs.h <<_ACEOF
4864 #define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
4865 _ACEOF
4866 ;;
4867 esac
4868 rm -rf conftest*
4869 if test $ac_cv_sys_file_offset_bits = unknown; then
4870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _LARGE_FILES value needed for large files" >&5
4871 $as_echo_n "checking for _LARGE_FILES value needed for large files... " >&6; }
4872 if ${ac_cv_sys_large_files+:} false; then :
4873 $as_echo_n "(cached) " >&6
4874 else
4875 while :; do
4876 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4877 /* end confdefs.h. */
4878 #include <sys/types.h>
4879 /* Check that off_t can represent 2**63 - 1 correctly.
4880 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4881 since some C++ compilers masquerading as C compilers
4882 incorrectly reject 9223372036854775807. */
4883 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4884 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4885 && LARGE_OFF_T % 2147483647 == 1)
4886 ? 1 : -1];
4887 int
4888 main ()
4889 {
4890
4891 ;
4892 return 0;
4893 }
4894 _ACEOF
4895 if ac_fn_c_try_compile "$LINENO"; then :
4896 ac_cv_sys_large_files=no; break
4897 fi
4898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4899 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4900 /* end confdefs.h. */
4901 #define _LARGE_FILES 1
4902 #include <sys/types.h>
4903 /* Check that off_t can represent 2**63 - 1 correctly.
4904 We can't simply define LARGE_OFF_T to be 9223372036854775807,
4905 since some C++ compilers masquerading as C compilers
4906 incorrectly reject 9223372036854775807. */
4907 #define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
4908 int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
4909 && LARGE_OFF_T % 2147483647 == 1)
4910 ? 1 : -1];
4911 int
4912 main ()
4913 {
4914
4915 ;
4916 return 0;
4917 }
4918 _ACEOF
4919 if ac_fn_c_try_compile "$LINENO"; then :
4920 ac_cv_sys_large_files=1; break
4921 fi
4922 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
4923 ac_cv_sys_large_files=unknown
4924 break
4925 done
4926 fi
4927 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sys_large_files" >&5
4928 $as_echo "$ac_cv_sys_large_files" >&6; }
4929 case $ac_cv_sys_large_files in #(
4930 no | unknown) ;;
4931 *)
4932 cat >>confdefs.h <<_ACEOF
4933 #define _LARGE_FILES $ac_cv_sys_large_files
4934 _ACEOF
4935 ;;
4936 esac
4937 rm -rf conftest*
4938 fi
4939
4940
4941 fi
4942
4943
4944
4945
4946
4947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${CC-cc} option to accept ANSI C" >&5
4948 $as_echo_n "checking for ${CC-cc} option to accept ANSI C... " >&6; }
4949 if ${am_cv_prog_cc_stdc+:} false; then :
4950 $as_echo_n "(cached) " >&6
4951 else
4952 am_cv_prog_cc_stdc=no
4953 ac_save_CC="$CC"
4954 # Don't try gcc -ansi; that turns off useful extensions and
4955 # breaks some systems' header files.
4956 # AIX -qlanglvl=ansi
4957 # Ultrix and OSF/1 -std1
4958 # HP-UX 10.20 and later -Ae
4959 # HP-UX older versions -Aa -D_HPUX_SOURCE
4960 # SVR4 -Xc -D__EXTENSIONS__
4961 for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
4962 do
4963 CC="$ac_save_CC $ac_arg"
4964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
4965 /* end confdefs.h. */
4966 #include <stdarg.h>
4967 #include <stdio.h>
4968 #include <sys/types.h>
4969 #include <sys/stat.h>
4970 /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */
4971 struct buf { int x; };
4972 FILE * (*rcsopen) (struct buf *, struct stat *, int);
4973 static char *e (p, i)
4974 char **p;
4975 int i;
4976 {
4977 return p[i];
4978 }
4979 static char *f (char * (*g) (char **, int), char **p, ...)
4980 {
4981 char *s;
4982 va_list v;
4983 va_start (v,p);
4984 s = g (p, va_arg (v,int));
4985 va_end (v);
4986 return s;
4987 }
4988 int test (int i, double x);
4989 struct s1 {int (*f) (int a);};
4990 struct s2 {int (*f) (double a);};
4991 int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
4992 int argc;
4993 char **argv;
4994
4995 int
4996 main ()
4997 {
4998
4999 return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1];
5000
5001 ;
5002 return 0;
5003 }
5004 _ACEOF
5005 if ac_fn_c_try_compile "$LINENO"; then :
5006 am_cv_prog_cc_stdc="$ac_arg"; break
5007 fi
5008 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5009 done
5010 CC="$ac_save_CC"
5011
5012 fi
5013
5014 if test -z "$am_cv_prog_cc_stdc"; then
5015 { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
5016 $as_echo "none needed" >&6; }
5017 else
5018 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_stdc" >&5
5019 $as_echo "$am_cv_prog_cc_stdc" >&6; }
5020 fi
5021 case "x$am_cv_prog_cc_stdc" in
5022 x|xno) ;;
5023 *) CC="$CC $am_cv_prog_cc_stdc" ;;
5024 esac
5025
5026 # Expand $ac_aux_dir to an absolute path.
5027 am_aux_dir=`cd "$ac_aux_dir" && pwd`
5028
5029 if test x"${install_sh+set}" != xset; then
5030 case $am_aux_dir in
5031 *\ * | *\ *)
5032 install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
5033 *)
5034 install_sh="\${SHELL} $am_aux_dir/install-sh"
5035 esac
5036 fi
5037
5038 # Installed binaries are usually stripped using 'strip' when the user
5039 # run "make install-strip". However 'strip' might not be the right
5040 # tool to use in cross-compilation environments, therefore Automake
5041 # will honor the 'STRIP' environment variable to overrule this program.
5042 if test "$cross_compiling" != no; then
5043 if test -n "$ac_tool_prefix"; then
5044 # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args.
5045 set dummy ${ac_tool_prefix}strip; ac_word=$2
5046 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5047 $as_echo_n "checking for $ac_word... " >&6; }
5048 if ${ac_cv_prog_STRIP+:} false; then :
5049 $as_echo_n "(cached) " >&6
5050 else
5051 if test -n "$STRIP"; then
5052 ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
5053 else
5054 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5055 for as_dir in $PATH
5056 do
5057 IFS=$as_save_IFS
5058 test -z "$as_dir" && as_dir=.
5059 for ac_exec_ext in '' $ac_executable_extensions; do
5060 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5061 ac_cv_prog_STRIP="${ac_tool_prefix}strip"
5062 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5063 break 2
5064 fi
5065 done
5066 done
5067 IFS=$as_save_IFS
5068
5069 fi
5070 fi
5071 STRIP=$ac_cv_prog_STRIP
5072 if test -n "$STRIP"; then
5073 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
5074 $as_echo "$STRIP" >&6; }
5075 else
5076 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5077 $as_echo "no" >&6; }
5078 fi
5079
5080
5081 fi
5082 if test -z "$ac_cv_prog_STRIP"; then
5083 ac_ct_STRIP=$STRIP
5084 # Extract the first word of "strip", so it can be a program name with args.
5085 set dummy strip; ac_word=$2
5086 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5087 $as_echo_n "checking for $ac_word... " >&6; }
5088 if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
5089 $as_echo_n "(cached) " >&6
5090 else
5091 if test -n "$ac_ct_STRIP"; then
5092 ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
5093 else
5094 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5095 for as_dir in $PATH
5096 do
5097 IFS=$as_save_IFS
5098 test -z "$as_dir" && as_dir=.
5099 for ac_exec_ext in '' $ac_executable_extensions; do
5100 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5101 ac_cv_prog_ac_ct_STRIP="strip"
5102 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5103 break 2
5104 fi
5105 done
5106 done
5107 IFS=$as_save_IFS
5108
5109 fi
5110 fi
5111 ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
5112 if test -n "$ac_ct_STRIP"; then
5113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
5114 $as_echo "$ac_ct_STRIP" >&6; }
5115 else
5116 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5117 $as_echo "no" >&6; }
5118 fi
5119
5120 if test "x$ac_ct_STRIP" = x; then
5121 STRIP=":"
5122 else
5123 case $cross_compiling:$ac_tool_warned in
5124 yes:)
5125 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
5126 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
5127 ac_tool_warned=yes ;;
5128 esac
5129 STRIP=$ac_ct_STRIP
5130 fi
5131 else
5132 STRIP="$ac_cv_prog_STRIP"
5133 fi
5134
5135 fi
5136 INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
5137
5138
5139 ac_aux_dir=
5140 for ac_dir in .. "$srcdir"/..; do
5141 if test -f "$ac_dir/install-sh"; then
5142 ac_aux_dir=$ac_dir
5143 ac_install_sh="$ac_aux_dir/install-sh -c"
5144 break
5145 elif test -f "$ac_dir/install.sh"; then
5146 ac_aux_dir=$ac_dir
5147 ac_install_sh="$ac_aux_dir/install.sh -c"
5148 break
5149 elif test -f "$ac_dir/shtool"; then
5150 ac_aux_dir=$ac_dir
5151 ac_install_sh="$ac_aux_dir/shtool install -c"
5152 break
5153 fi
5154 done
5155 if test -z "$ac_aux_dir"; then
5156 as_fn_error $? "cannot find install-sh, install.sh, or shtool in .. \"$srcdir\"/.." "$LINENO" 5
5157 fi
5158
5159 # These three variables are undocumented and unsupported,
5160 # and are intended to be withdrawn in a future Autoconf release.
5161 # They can cause serious problems if a builder's source tree is in a directory
5162 # whose full name contains unusual characters.
5163 ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var.
5164 ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var.
5165 ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var.
5166
5167
5168
5169 test "$program_prefix" != NONE &&
5170 program_transform_name="s&^&$program_prefix&;$program_transform_name"
5171 # Use a double $ so make ignores it.
5172 test "$program_suffix" != NONE &&
5173 program_transform_name="s&\$&$program_suffix&;$program_transform_name"
5174 # Double any \ or $.
5175 # By default was `s,x,x', remove it if useless.
5176 ac_script='s/[\\$]/&&/g;s/;s,x,x,$//'
5177 program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"`
5178
5179
5180 # We require a C++11 compiler. Check if one is available, and if
5181 # necessary, set CXX_DIALECT to some -std=xxx switch.
5182
5183 ax_cxx_compile_alternatives="11 0x" ax_cxx_compile_cxx11_required=true
5184 ac_ext=cpp
5185 ac_cpp='$CXXCPP $CPPFLAGS'
5186 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
5187 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
5188 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
5189 CXX_DIALECT=""
5190 ac_success=no
5191 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features by default" >&5
5192 $as_echo_n "checking whether $CXX supports C++11 features by default... " >&6; }
5193 if ${ax_cv_cxx_compile_cxx11+:} false; then :
5194 $as_echo_n "(cached) " >&6
5195 else
5196 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5197 /* end confdefs.h. */
5198
5199
5200 // If the compiler admits that it is not ready for C++11, why torture it?
5201 // Hopefully, this will speed up the test.
5202
5203 #ifndef __cplusplus
5204
5205 #error "This is not a C++ compiler"
5206
5207 #elif __cplusplus < 201103L
5208
5209 #error "This is not a C++11 compiler"
5210
5211 #else
5212
5213 namespace cxx11
5214 {
5215
5216 namespace test_static_assert
5217 {
5218
5219 template <typename T>
5220 struct check
5221 {
5222 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5223 };
5224
5225 }
5226
5227 namespace test_final_override
5228 {
5229
5230 struct Base
5231 {
5232 virtual void f() {}
5233 };
5234
5235 struct Derived : public Base
5236 {
5237 virtual void f() override {}
5238 };
5239
5240 }
5241
5242 namespace test_double_right_angle_brackets
5243 {
5244
5245 template < typename T >
5246 struct check {};
5247
5248 typedef check<void> single_type;
5249 typedef check<check<void>> double_type;
5250 typedef check<check<check<void>>> triple_type;
5251 typedef check<check<check<check<void>>>> quadruple_type;
5252
5253 }
5254
5255 namespace test_decltype
5256 {
5257
5258 int
5259 f()
5260 {
5261 int a = 1;
5262 decltype(a) b = 2;
5263 return a + b;
5264 }
5265
5266 }
5267
5268 namespace test_type_deduction
5269 {
5270
5271 template < typename T1, typename T2 >
5272 struct is_same
5273 {
5274 static const bool value = false;
5275 };
5276
5277 template < typename T >
5278 struct is_same<T, T>
5279 {
5280 static const bool value = true;
5281 };
5282
5283 template < typename T1, typename T2 >
5284 auto
5285 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5286 {
5287 return a1 + a2;
5288 }
5289
5290 int
5291 test(const int c, volatile int v)
5292 {
5293 static_assert(is_same<int, decltype(0)>::value == true, "");
5294 static_assert(is_same<int, decltype(c)>::value == false, "");
5295 static_assert(is_same<int, decltype(v)>::value == false, "");
5296 auto ac = c;
5297 auto av = v;
5298 auto sumi = ac + av + 'x';
5299 auto sumf = ac + av + 1.0;
5300 static_assert(is_same<int, decltype(ac)>::value == true, "");
5301 static_assert(is_same<int, decltype(av)>::value == true, "");
5302 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5303 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5304 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5305 return (sumf > 0.0) ? sumi : add(c, v);
5306 }
5307
5308 }
5309
5310 namespace test_noexcept
5311 {
5312
5313 int f() { return 0; }
5314 int g() noexcept { return 0; }
5315
5316 static_assert(noexcept(f()) == false, "");
5317 static_assert(noexcept(g()) == true, "");
5318
5319 }
5320
5321 namespace test_constexpr
5322 {
5323
5324 template < typename CharT >
5325 unsigned long constexpr
5326 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5327 {
5328 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5329 }
5330
5331 template < typename CharT >
5332 unsigned long constexpr
5333 strlen_c(const CharT *const s) noexcept
5334 {
5335 return strlen_c_r(s, 0UL);
5336 }
5337
5338 static_assert(strlen_c("") == 0UL, "");
5339 static_assert(strlen_c("1") == 1UL, "");
5340 static_assert(strlen_c("example") == 7UL, "");
5341 static_assert(strlen_c("another\0example") == 7UL, "");
5342
5343 }
5344
5345 namespace test_rvalue_references
5346 {
5347
5348 template < int N >
5349 struct answer
5350 {
5351 static constexpr int value = N;
5352 };
5353
5354 answer<1> f(int&) { return answer<1>(); }
5355 answer<2> f(const int&) { return answer<2>(); }
5356 answer<3> f(int&&) { return answer<3>(); }
5357
5358 void
5359 test()
5360 {
5361 int i = 0;
5362 const int c = 0;
5363 static_assert(decltype(f(i))::value == 1, "");
5364 static_assert(decltype(f(c))::value == 2, "");
5365 static_assert(decltype(f(0))::value == 3, "");
5366 }
5367
5368 }
5369
5370 namespace test_uniform_initialization
5371 {
5372
5373 struct test
5374 {
5375 static const int zero {};
5376 static const int one {1};
5377 };
5378
5379 static_assert(test::zero == 0, "");
5380 static_assert(test::one == 1, "");
5381
5382 }
5383
5384 namespace test_lambdas
5385 {
5386
5387 void
5388 test1()
5389 {
5390 auto lambda1 = [](){};
5391 auto lambda2 = lambda1;
5392 lambda1();
5393 lambda2();
5394 }
5395
5396 int
5397 test2()
5398 {
5399 auto a = [](int i, int j){ return i + j; }(1, 2);
5400 auto b = []() -> int { return '0'; }();
5401 auto c = [=](){ return a + b; }();
5402 auto d = [&](){ return c; }();
5403 auto e = [a, &b](int x) mutable {
5404 const auto identity = [](int y){ return y; };
5405 for (auto i = 0; i < a; ++i)
5406 a += b--;
5407 return x + identity(a + b);
5408 }(0);
5409 return a + b + c + d + e;
5410 }
5411
5412 int
5413 test3()
5414 {
5415 const auto nullary = [](){ return 0; };
5416 const auto unary = [](int x){ return x; };
5417 using nullary_t = decltype(nullary);
5418 using unary_t = decltype(unary);
5419 const auto higher1st = [](nullary_t f){ return f(); };
5420 const auto higher2nd = [unary](nullary_t f1){
5421 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5422 };
5423 return higher1st(nullary) + higher2nd(nullary)(unary);
5424 }
5425
5426 }
5427
5428 namespace test_variadic_templates
5429 {
5430
5431 template <int...>
5432 struct sum;
5433
5434 template <int N0, int... N1toN>
5435 struct sum<N0, N1toN...>
5436 {
5437 static constexpr auto value = N0 + sum<N1toN...>::value;
5438 };
5439
5440 template <>
5441 struct sum<>
5442 {
5443 static constexpr auto value = 0;
5444 };
5445
5446 static_assert(sum<>::value == 0, "");
5447 static_assert(sum<1>::value == 1, "");
5448 static_assert(sum<23>::value == 23, "");
5449 static_assert(sum<1, 2>::value == 3, "");
5450 static_assert(sum<5, 5, 11>::value == 21, "");
5451 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5452
5453 }
5454
5455 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5456 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5457 // because of this.
5458 namespace test_template_alias_sfinae
5459 {
5460
5461 struct foo {};
5462
5463 template<typename T>
5464 using member = typename T::member_type;
5465
5466 template<typename T>
5467 void func(...) {}
5468
5469 template<typename T>
5470 void func(member<T>*) {}
5471
5472 void test();
5473
5474 void test() { func<foo>(0); }
5475
5476 }
5477
5478 } // namespace cxx11
5479
5480 #endif // __cplusplus >= 201103L
5481
5482
5483
5484 _ACEOF
5485 if ac_fn_cxx_try_compile "$LINENO"; then :
5486 ax_cv_cxx_compile_cxx11=yes
5487 else
5488 ax_cv_cxx_compile_cxx11=no
5489 fi
5490 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5491 fi
5492 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_cxx_compile_cxx11" >&5
5493 $as_echo "$ax_cv_cxx_compile_cxx11" >&6; }
5494 if test x$ax_cv_cxx_compile_cxx11 = xyes; then
5495 ac_success=yes
5496 fi
5497
5498 if test x$ac_success = xno; then
5499 for alternative in ${ax_cxx_compile_alternatives}; do
5500 switch="-std=gnu++${alternative}"
5501 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5502 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5503 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5504 if eval \${$cachevar+:} false; then :
5505 $as_echo_n "(cached) " >&6
5506 else
5507 ac_save_CXX="$CXX"
5508 CXX="$CXX $switch"
5509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5510 /* end confdefs.h. */
5511
5512
5513 // If the compiler admits that it is not ready for C++11, why torture it?
5514 // Hopefully, this will speed up the test.
5515
5516 #ifndef __cplusplus
5517
5518 #error "This is not a C++ compiler"
5519
5520 #elif __cplusplus < 201103L
5521
5522 #error "This is not a C++11 compiler"
5523
5524 #else
5525
5526 namespace cxx11
5527 {
5528
5529 namespace test_static_assert
5530 {
5531
5532 template <typename T>
5533 struct check
5534 {
5535 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5536 };
5537
5538 }
5539
5540 namespace test_final_override
5541 {
5542
5543 struct Base
5544 {
5545 virtual void f() {}
5546 };
5547
5548 struct Derived : public Base
5549 {
5550 virtual void f() override {}
5551 };
5552
5553 }
5554
5555 namespace test_double_right_angle_brackets
5556 {
5557
5558 template < typename T >
5559 struct check {};
5560
5561 typedef check<void> single_type;
5562 typedef check<check<void>> double_type;
5563 typedef check<check<check<void>>> triple_type;
5564 typedef check<check<check<check<void>>>> quadruple_type;
5565
5566 }
5567
5568 namespace test_decltype
5569 {
5570
5571 int
5572 f()
5573 {
5574 int a = 1;
5575 decltype(a) b = 2;
5576 return a + b;
5577 }
5578
5579 }
5580
5581 namespace test_type_deduction
5582 {
5583
5584 template < typename T1, typename T2 >
5585 struct is_same
5586 {
5587 static const bool value = false;
5588 };
5589
5590 template < typename T >
5591 struct is_same<T, T>
5592 {
5593 static const bool value = true;
5594 };
5595
5596 template < typename T1, typename T2 >
5597 auto
5598 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5599 {
5600 return a1 + a2;
5601 }
5602
5603 int
5604 test(const int c, volatile int v)
5605 {
5606 static_assert(is_same<int, decltype(0)>::value == true, "");
5607 static_assert(is_same<int, decltype(c)>::value == false, "");
5608 static_assert(is_same<int, decltype(v)>::value == false, "");
5609 auto ac = c;
5610 auto av = v;
5611 auto sumi = ac + av + 'x';
5612 auto sumf = ac + av + 1.0;
5613 static_assert(is_same<int, decltype(ac)>::value == true, "");
5614 static_assert(is_same<int, decltype(av)>::value == true, "");
5615 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5616 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5617 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5618 return (sumf > 0.0) ? sumi : add(c, v);
5619 }
5620
5621 }
5622
5623 namespace test_noexcept
5624 {
5625
5626 int f() { return 0; }
5627 int g() noexcept { return 0; }
5628
5629 static_assert(noexcept(f()) == false, "");
5630 static_assert(noexcept(g()) == true, "");
5631
5632 }
5633
5634 namespace test_constexpr
5635 {
5636
5637 template < typename CharT >
5638 unsigned long constexpr
5639 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5640 {
5641 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5642 }
5643
5644 template < typename CharT >
5645 unsigned long constexpr
5646 strlen_c(const CharT *const s) noexcept
5647 {
5648 return strlen_c_r(s, 0UL);
5649 }
5650
5651 static_assert(strlen_c("") == 0UL, "");
5652 static_assert(strlen_c("1") == 1UL, "");
5653 static_assert(strlen_c("example") == 7UL, "");
5654 static_assert(strlen_c("another\0example") == 7UL, "");
5655
5656 }
5657
5658 namespace test_rvalue_references
5659 {
5660
5661 template < int N >
5662 struct answer
5663 {
5664 static constexpr int value = N;
5665 };
5666
5667 answer<1> f(int&) { return answer<1>(); }
5668 answer<2> f(const int&) { return answer<2>(); }
5669 answer<3> f(int&&) { return answer<3>(); }
5670
5671 void
5672 test()
5673 {
5674 int i = 0;
5675 const int c = 0;
5676 static_assert(decltype(f(i))::value == 1, "");
5677 static_assert(decltype(f(c))::value == 2, "");
5678 static_assert(decltype(f(0))::value == 3, "");
5679 }
5680
5681 }
5682
5683 namespace test_uniform_initialization
5684 {
5685
5686 struct test
5687 {
5688 static const int zero {};
5689 static const int one {1};
5690 };
5691
5692 static_assert(test::zero == 0, "");
5693 static_assert(test::one == 1, "");
5694
5695 }
5696
5697 namespace test_lambdas
5698 {
5699
5700 void
5701 test1()
5702 {
5703 auto lambda1 = [](){};
5704 auto lambda2 = lambda1;
5705 lambda1();
5706 lambda2();
5707 }
5708
5709 int
5710 test2()
5711 {
5712 auto a = [](int i, int j){ return i + j; }(1, 2);
5713 auto b = []() -> int { return '0'; }();
5714 auto c = [=](){ return a + b; }();
5715 auto d = [&](){ return c; }();
5716 auto e = [a, &b](int x) mutable {
5717 const auto identity = [](int y){ return y; };
5718 for (auto i = 0; i < a; ++i)
5719 a += b--;
5720 return x + identity(a + b);
5721 }(0);
5722 return a + b + c + d + e;
5723 }
5724
5725 int
5726 test3()
5727 {
5728 const auto nullary = [](){ return 0; };
5729 const auto unary = [](int x){ return x; };
5730 using nullary_t = decltype(nullary);
5731 using unary_t = decltype(unary);
5732 const auto higher1st = [](nullary_t f){ return f(); };
5733 const auto higher2nd = [unary](nullary_t f1){
5734 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
5735 };
5736 return higher1st(nullary) + higher2nd(nullary)(unary);
5737 }
5738
5739 }
5740
5741 namespace test_variadic_templates
5742 {
5743
5744 template <int...>
5745 struct sum;
5746
5747 template <int N0, int... N1toN>
5748 struct sum<N0, N1toN...>
5749 {
5750 static constexpr auto value = N0 + sum<N1toN...>::value;
5751 };
5752
5753 template <>
5754 struct sum<>
5755 {
5756 static constexpr auto value = 0;
5757 };
5758
5759 static_assert(sum<>::value == 0, "");
5760 static_assert(sum<1>::value == 1, "");
5761 static_assert(sum<23>::value == 23, "");
5762 static_assert(sum<1, 2>::value == 3, "");
5763 static_assert(sum<5, 5, 11>::value == 21, "");
5764 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
5765
5766 }
5767
5768 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
5769 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
5770 // because of this.
5771 namespace test_template_alias_sfinae
5772 {
5773
5774 struct foo {};
5775
5776 template<typename T>
5777 using member = typename T::member_type;
5778
5779 template<typename T>
5780 void func(...) {}
5781
5782 template<typename T>
5783 void func(member<T>*) {}
5784
5785 void test();
5786
5787 void test() { func<foo>(0); }
5788
5789 }
5790
5791 } // namespace cxx11
5792
5793 #endif // __cplusplus >= 201103L
5794
5795
5796
5797 _ACEOF
5798 if ac_fn_cxx_try_compile "$LINENO"; then :
5799 eval $cachevar=yes
5800 else
5801 eval $cachevar=no
5802 fi
5803 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
5804 CXX="$ac_save_CXX"
5805 fi
5806 eval ac_res=\$$cachevar
5807 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
5808 $as_echo "$ac_res" >&6; }
5809 if eval test x\$$cachevar = xyes; then
5810 CXX_DIALECT="$switch"
5811 ac_success=yes
5812 break
5813 fi
5814 done
5815 fi
5816
5817 if test x$ac_success = xno; then
5818 for alternative in ${ax_cxx_compile_alternatives}; do
5819 for switch in -std=c++${alternative} +std=c++${alternative} "-h std=c++${alternative}"; do
5820 cachevar=`$as_echo "ax_cv_cxx_compile_cxx11_$switch" | $as_tr_sh`
5821 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX supports C++11 features with $switch" >&5
5822 $as_echo_n "checking whether $CXX supports C++11 features with $switch... " >&6; }
5823 if eval \${$cachevar+:} false; then :
5824 $as_echo_n "(cached) " >&6
5825 else
5826 ac_save_CXX="$CXX"
5827 CXX="$CXX $switch"
5828 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
5829 /* end confdefs.h. */
5830
5831
5832 // If the compiler admits that it is not ready for C++11, why torture it?
5833 // Hopefully, this will speed up the test.
5834
5835 #ifndef __cplusplus
5836
5837 #error "This is not a C++ compiler"
5838
5839 #elif __cplusplus < 201103L
5840
5841 #error "This is not a C++11 compiler"
5842
5843 #else
5844
5845 namespace cxx11
5846 {
5847
5848 namespace test_static_assert
5849 {
5850
5851 template <typename T>
5852 struct check
5853 {
5854 static_assert(sizeof(int) <= sizeof(T), "not big enough");
5855 };
5856
5857 }
5858
5859 namespace test_final_override
5860 {
5861
5862 struct Base
5863 {
5864 virtual void f() {}
5865 };
5866
5867 struct Derived : public Base
5868 {
5869 virtual void f() override {}
5870 };
5871
5872 }
5873
5874 namespace test_double_right_angle_brackets
5875 {
5876
5877 template < typename T >
5878 struct check {};
5879
5880 typedef check<void> single_type;
5881 typedef check<check<void>> double_type;
5882 typedef check<check<check<void>>> triple_type;
5883 typedef check<check<check<check<void>>>> quadruple_type;
5884
5885 }
5886
5887 namespace test_decltype
5888 {
5889
5890 int
5891 f()
5892 {
5893 int a = 1;
5894 decltype(a) b = 2;
5895 return a + b;
5896 }
5897
5898 }
5899
5900 namespace test_type_deduction
5901 {
5902
5903 template < typename T1, typename T2 >
5904 struct is_same
5905 {
5906 static const bool value = false;
5907 };
5908
5909 template < typename T >
5910 struct is_same<T, T>
5911 {
5912 static const bool value = true;
5913 };
5914
5915 template < typename T1, typename T2 >
5916 auto
5917 add(T1 a1, T2 a2) -> decltype(a1 + a2)
5918 {
5919 return a1 + a2;
5920 }
5921
5922 int
5923 test(const int c, volatile int v)
5924 {
5925 static_assert(is_same<int, decltype(0)>::value == true, "");
5926 static_assert(is_same<int, decltype(c)>::value == false, "");
5927 static_assert(is_same<int, decltype(v)>::value == false, "");
5928 auto ac = c;
5929 auto av = v;
5930 auto sumi = ac + av + 'x';
5931 auto sumf = ac + av + 1.0;
5932 static_assert(is_same<int, decltype(ac)>::value == true, "");
5933 static_assert(is_same<int, decltype(av)>::value == true, "");
5934 static_assert(is_same<int, decltype(sumi)>::value == true, "");
5935 static_assert(is_same<int, decltype(sumf)>::value == false, "");
5936 static_assert(is_same<int, decltype(add(c, v))>::value == true, "");
5937 return (sumf > 0.0) ? sumi : add(c, v);
5938 }
5939
5940 }
5941
5942 namespace test_noexcept
5943 {
5944
5945 int f() { return 0; }
5946 int g() noexcept { return 0; }
5947
5948 static_assert(noexcept(f()) == false, "");
5949 static_assert(noexcept(g()) == true, "");
5950
5951 }
5952
5953 namespace test_constexpr
5954 {
5955
5956 template < typename CharT >
5957 unsigned long constexpr
5958 strlen_c_r(const CharT *const s, const unsigned long acc) noexcept
5959 {
5960 return *s ? strlen_c_r(s + 1, acc + 1) : acc;
5961 }
5962
5963 template < typename CharT >
5964 unsigned long constexpr
5965 strlen_c(const CharT *const s) noexcept
5966 {
5967 return strlen_c_r(s, 0UL);
5968 }
5969
5970 static_assert(strlen_c("") == 0UL, "");
5971 static_assert(strlen_c("1") == 1UL, "");
5972 static_assert(strlen_c("example") == 7UL, "");
5973 static_assert(strlen_c("another\0example") == 7UL, "");
5974
5975 }
5976
5977 namespace test_rvalue_references
5978 {
5979
5980 template < int N >
5981 struct answer
5982 {
5983 static constexpr int value = N;
5984 };
5985
5986 answer<1> f(int&) { return answer<1>(); }
5987 answer<2> f(const int&) { return answer<2>(); }
5988 answer<3> f(int&&) { return answer<3>(); }
5989
5990 void
5991 test()
5992 {
5993 int i = 0;
5994 const int c = 0;
5995 static_assert(decltype(f(i))::value == 1, "");
5996 static_assert(decltype(f(c))::value == 2, "");
5997 static_assert(decltype(f(0))::value == 3, "");
5998 }
5999
6000 }
6001
6002 namespace test_uniform_initialization
6003 {
6004
6005 struct test
6006 {
6007 static const int zero {};
6008 static const int one {1};
6009 };
6010
6011 static_assert(test::zero == 0, "");
6012 static_assert(test::one == 1, "");
6013
6014 }
6015
6016 namespace test_lambdas
6017 {
6018
6019 void
6020 test1()
6021 {
6022 auto lambda1 = [](){};
6023 auto lambda2 = lambda1;
6024 lambda1();
6025 lambda2();
6026 }
6027
6028 int
6029 test2()
6030 {
6031 auto a = [](int i, int j){ return i + j; }(1, 2);
6032 auto b = []() -> int { return '0'; }();
6033 auto c = [=](){ return a + b; }();
6034 auto d = [&](){ return c; }();
6035 auto e = [a, &b](int x) mutable {
6036 const auto identity = [](int y){ return y; };
6037 for (auto i = 0; i < a; ++i)
6038 a += b--;
6039 return x + identity(a + b);
6040 }(0);
6041 return a + b + c + d + e;
6042 }
6043
6044 int
6045 test3()
6046 {
6047 const auto nullary = [](){ return 0; };
6048 const auto unary = [](int x){ return x; };
6049 using nullary_t = decltype(nullary);
6050 using unary_t = decltype(unary);
6051 const auto higher1st = [](nullary_t f){ return f(); };
6052 const auto higher2nd = [unary](nullary_t f1){
6053 return [unary, f1](unary_t f2){ return f2(unary(f1())); };
6054 };
6055 return higher1st(nullary) + higher2nd(nullary)(unary);
6056 }
6057
6058 }
6059
6060 namespace test_variadic_templates
6061 {
6062
6063 template <int...>
6064 struct sum;
6065
6066 template <int N0, int... N1toN>
6067 struct sum<N0, N1toN...>
6068 {
6069 static constexpr auto value = N0 + sum<N1toN...>::value;
6070 };
6071
6072 template <>
6073 struct sum<>
6074 {
6075 static constexpr auto value = 0;
6076 };
6077
6078 static_assert(sum<>::value == 0, "");
6079 static_assert(sum<1>::value == 1, "");
6080 static_assert(sum<23>::value == 23, "");
6081 static_assert(sum<1, 2>::value == 3, "");
6082 static_assert(sum<5, 5, 11>::value == 21, "");
6083 static_assert(sum<2, 3, 5, 7, 11, 13>::value == 41, "");
6084
6085 }
6086
6087 // http://stackoverflow.com/questions/13728184/template-aliases-and-sfinae
6088 // Clang 3.1 fails with headers of libstd++ 4.8.3 when using std::function
6089 // because of this.
6090 namespace test_template_alias_sfinae
6091 {
6092
6093 struct foo {};
6094
6095 template<typename T>
6096 using member = typename T::member_type;
6097
6098 template<typename T>
6099 void func(...) {}
6100
6101 template<typename T>
6102 void func(member<T>*) {}
6103
6104 void test();
6105
6106 void test() { func<foo>(0); }
6107
6108 }
6109
6110 } // namespace cxx11
6111
6112 #endif // __cplusplus >= 201103L
6113
6114
6115
6116 _ACEOF
6117 if ac_fn_cxx_try_compile "$LINENO"; then :
6118 eval $cachevar=yes
6119 else
6120 eval $cachevar=no
6121 fi
6122 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
6123 CXX="$ac_save_CXX"
6124 fi
6125 eval ac_res=\$$cachevar
6126 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
6127 $as_echo "$ac_res" >&6; }
6128 if eval test x\$$cachevar = xyes; then
6129 CXX_DIALECT="$switch"
6130 ac_success=yes
6131 break
6132 fi
6133 done
6134 if test x$ac_success = xyes; then
6135 break
6136 fi
6137 done
6138 fi
6139 ac_ext=c
6140 ac_cpp='$CPP $CPPFLAGS'
6141 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
6142 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
6143 ac_compiler_gnu=$ac_cv_c_compiler_gnu
6144
6145 if test x$ax_cxx_compile_cxx11_required = xtrue; then
6146 if test x$ac_success = xno; then
6147 as_fn_error $? "*** A compiler with support for C++11 language features is required." "$LINENO" 5
6148 fi
6149 fi
6150 if test x$ac_success = xno; then
6151 HAVE_CXX11=0
6152 { $as_echo "$as_me:${as_lineno-$LINENO}: No compiler with C++11 support was found" >&5
6153 $as_echo "$as_me: No compiler with C++11 support was found" >&6;}
6154 else
6155 HAVE_CXX11=1
6156
6157 $as_echo "#define HAVE_CXX11 1" >>confdefs.h
6158
6159 fi
6160
6161
6162
6163
6164 # Dependency checking.
6165 rm -rf .tst 2>/dev/null
6166 mkdir .tst 2>/dev/null
6167 if test -d .tst; then
6168 am__leading_dot=.
6169 else
6170 am__leading_dot=_
6171 fi
6172 rmdir .tst 2>/dev/null
6173
6174 DEPDIR="${am__leading_dot}deps"
6175
6176 ac_config_commands="$ac_config_commands depdir"
6177
6178
6179 depcc="$CC" am_compiler_list=
6180
6181 am_depcomp=$ac_aux_dir/depcomp
6182 { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5
6183 $as_echo_n "checking dependency style of $depcc... " >&6; }
6184 if ${am_cv_CC_dependencies_compiler_type+:} false; then :
6185 $as_echo_n "(cached) " >&6
6186 else
6187 if test -f "$am_depcomp"; then
6188 # We make a subdir and do the tests there. Otherwise we can end up
6189 # making bogus files that we don't know about and never remove. For
6190 # instance it was reported that on HP-UX the gcc test will end up
6191 # making a dummy file named `D' -- because `-MD' means `put the output
6192 # in D'.
6193 mkdir conftest.dir
6194 # Copy depcomp to subdir because otherwise we won't find it if we're
6195 # using a relative directory.
6196 cp "$am_depcomp" conftest.dir
6197 cd conftest.dir
6198 # We will build objects and dependencies in a subdirectory because
6199 # it helps to detect inapplicable dependency modes. For instance
6200 # both Tru64's cc and ICC support -MD to output dependencies as a
6201 # side effect of compilation, but ICC will put the dependencies in
6202 # the current directory while Tru64 will put them in the object
6203 # directory.
6204 mkdir sub
6205
6206 am_cv_CC_dependencies_compiler_type=none
6207 if test "$am_compiler_list" = ""; then
6208 am_compiler_list=`sed -n 's/^\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp`
6209 fi
6210 for depmode in $am_compiler_list; do
6211 if test $depmode = none; then break; fi
6212
6213 $as_echo "$as_me:$LINENO: trying $depmode" >&5
6214 # Setup a source with many dependencies, because some compilers
6215 # like to wrap large dependency lists on column 80 (with \), and
6216 # we should not choose a depcomp mode which is confused by this.
6217 #
6218 # We need to recreate these files for each test, as the compiler may
6219 # overwrite some of them when testing with obscure command lines.
6220 # This happens at least with the AIX C compiler.
6221 : > sub/conftest.c
6222 for i in 1 2 3 4 5 6; do
6223 echo '#include "conftst'$i'.h"' >> sub/conftest.c
6224 # Using `: > sub/conftst$i.h' creates only sub/conftst1.h with
6225 # Solaris 8's {/usr,}/bin/sh.
6226 touch sub/conftst$i.h
6227 done
6228 echo "include sub/conftest.Po" > confmf
6229
6230 # We check with `-c' and `-o' for the sake of the "dashmstdout"
6231 # mode. It turns out that the SunPro C++ compiler does not properly
6232 # handle `-M -o', and we need to detect this.
6233 depcmd="depmode=$depmode \
6234 source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
6235 depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
6236 $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c"
6237 echo "| $depcmd" | sed -e 's/ */ /g' >&5
6238 if env $depcmd > conftest.err 2>&1 &&
6239 grep sub/conftst6.h sub/conftest.Po >>conftest.err 2>&1 &&
6240 grep sub/conftest.${OBJEXT-o} sub/conftest.Po >>conftest.err 2>&1 &&
6241 ${MAKE-make} -s -f confmf >>conftest.err 2>&1; then
6242 # icc doesn't choke on unknown options, it will just issue warnings
6243 # or remarks (even with -Werror). So we grep stderr for any message
6244 # that says an option was ignored or not supported.
6245 # When given -MP, icc 7.0 and 7.1 complain thusly:
6246 # icc: Command line warning: ignoring option '-M'; no argument required
6247 # The diagnosis changed in icc 8.0:
6248 # icc: Command line remark: option '-MP' not supported
6249 if (grep 'ignoring option' conftest.err ||
6250 grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else
6251 am_cv_CC_dependencies_compiler_type=$depmode
6252 $as_echo "$as_me:$LINENO: success" >&5
6253 break
6254 fi
6255 fi
6256 $as_echo "$as_me:$LINENO: failure, diagnostics are:" >&5
6257 sed -e 's/^/| /' < conftest.err >&5
6258 done
6259
6260 cd ..
6261 rm -rf conftest.dir
6262 else
6263 am_cv_CC_dependencies_compiler_type=none
6264 fi
6265
6266 fi
6267 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5
6268 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; }
6269 if test x${am_cv_CC_dependencies_compiler_type-none} = xnone
6270 then as_fn_error $? "no usable dependency style found" "$LINENO" 5
6271 else CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type
6272
6273 fi
6274
6275
6276
6277 CONFIG_OBS=
6278 CONFIG_DEPS=
6279 CONFIG_SRCS=
6280 ENABLE_CFLAGS=
6281
6282 CONFIG_ALL=
6283 CONFIG_CLEAN=
6284 CONFIG_INSTALL=
6285 CONFIG_UNINSTALL=
6286
6287 # If we haven't got the data from the intl directory,
6288 # assume NLS is disabled.
6289 USE_NLS=no
6290 LIBINTL=
6291 LIBINTL_DEP=
6292 INCINTL=
6293 XGETTEXT=
6294 GMSGFMT=
6295 POSUB=
6296
6297 if test -f ../intl/config.intl; then
6298 . ../intl/config.intl
6299 fi
6300 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether NLS is requested" >&5
6301 $as_echo_n "checking whether NLS is requested... " >&6; }
6302 if test x"$USE_NLS" != xyes; then
6303 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6304 $as_echo "no" >&6; }
6305 else
6306 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
6307 $as_echo "yes" >&6; }
6308
6309 $as_echo "#define ENABLE_NLS 1" >>confdefs.h
6310
6311
6312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for catalogs to be installed" >&5
6313 $as_echo_n "checking for catalogs to be installed... " >&6; }
6314 # Look for .po and .gmo files in the source directory.
6315 CATALOGS=
6316 XLINGUAS=
6317 for cat in $srcdir/po/*.gmo $srcdir/po/*.po; do
6318 # If there aren't any .gmo files the shell will give us the
6319 # literal string "../path/to/srcdir/po/*.gmo" which has to be
6320 # weeded out.
6321 case "$cat" in *\**)
6322 continue;;
6323 esac
6324 # The quadruple backslash is collapsed to a double backslash
6325 # by the backticks, then collapsed again by the double quotes,
6326 # leaving us with one backslash in the sed expression (right
6327 # before the dot that mustn't act as a wildcard).
6328 cat=`echo $cat | sed -e "s!$srcdir/po/!!" -e "s!\\\\.po!.gmo!"`
6329 lang=`echo $cat | sed -e "s!\\\\.gmo!!"`
6330 # The user is allowed to set LINGUAS to a list of languages to
6331 # install catalogs for. If it's empty that means "all of them."
6332 if test "x$LINGUAS" = x; then
6333 CATALOGS="$CATALOGS $cat"
6334 XLINGUAS="$XLINGUAS $lang"
6335 else
6336 case "$LINGUAS" in *$lang*)
6337 CATALOGS="$CATALOGS $cat"
6338 XLINGUAS="$XLINGUAS $lang"
6339 ;;
6340 esac
6341 fi
6342 done
6343 LINGUAS="$XLINGUAS"
6344 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LINGUAS" >&5
6345 $as_echo "$LINGUAS" >&6; }
6346
6347
6348 DATADIRNAME=share
6349
6350 INSTOBJEXT=.mo
6351
6352 GENCAT=gencat
6353
6354 CATOBJEXT=.gmo
6355
6356 fi
6357
6358 localedir='${datadir}/locale'
6359
6360
6361 if test x"$USE_NLS" = xyes; then
6362 CONFIG_ALL="$CONFIG_ALL all-po"
6363 CONFIG_CLEAN="$CONFIG_CLEAN clean-po"
6364 CONFIG_INSTALL="$CONFIG_INSTALL install-po"
6365 CONFIG_UNINSTALL="$CONFIG_UNINSTALL uninstall-po"
6366 fi
6367
6368 PACKAGE=gdb
6369
6370 cat >>confdefs.h <<_ACEOF
6371 #define PACKAGE "$PACKAGE"
6372 _ACEOF
6373
6374
6375
6376 # We never need to detect it in this sub-configure.
6377 # But preserve it for config.status --recheck.
6378
6379
6380
6381 MAKEINFO_EXTRA_FLAGS=""
6382 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $MAKEINFO supports @click" >&5
6383 $as_echo_n "checking whether $MAKEINFO supports @click... " >&6; }
6384 if ${gdb_cv_have_makeinfo_click+:} false; then :
6385 $as_echo_n "(cached) " >&6
6386 else
6387 echo '@clicksequence{a @click{} b}' >conftest.texinfo
6388 if eval "$MAKEINFO conftest.texinfo >&5 2>&5"; then
6389 gdb_cv_have_makeinfo_click=yes
6390 else
6391 gdb_cv_have_makeinfo_click=no
6392 fi
6393 fi
6394 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_makeinfo_click" >&5
6395 $as_echo "$gdb_cv_have_makeinfo_click" >&6; }
6396 if test x"$gdb_cv_have_makeinfo_click" = xyes; then
6397 MAKEINFO_EXTRA_FLAGS="$MAKEINFO_EXTRA_FLAGS -DHAVE_MAKEINFO_CLICK"
6398 fi
6399
6400
6401
6402
6403 # Check whether --with-separate-debug-dir was given.
6404 if test "${with_separate_debug_dir+set}" = set; then :
6405 withval=$with_separate_debug_dir;
6406 DEBUGDIR=$withval
6407 else
6408 DEBUGDIR=${libdir}/debug
6409 fi
6410
6411
6412 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6413 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6414 ac_define_dir=`eval echo $DEBUGDIR`
6415 ac_define_dir=`eval echo $ac_define_dir`
6416
6417 cat >>confdefs.h <<_ACEOF
6418 #define DEBUGDIR "$ac_define_dir"
6419 _ACEOF
6420
6421
6422
6423
6424 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6425 if test "x$prefix" = xNONE; then
6426 test_prefix=/usr/local
6427 else
6428 test_prefix=$prefix
6429 fi
6430 else
6431 test_prefix=$exec_prefix
6432 fi
6433 value=0
6434 case ${ac_define_dir} in
6435 "${test_prefix}"|"${test_prefix}/"*|\
6436 '${exec_prefix}'|'${exec_prefix}/'*)
6437 value=1
6438 ;;
6439 esac
6440
6441 cat >>confdefs.h <<_ACEOF
6442 #define DEBUGDIR_RELOCATABLE $value
6443 _ACEOF
6444
6445
6446
6447
6448 # We can't pass paths as command line arguments.
6449 # Mingw32 tries to be clever and will convert the paths for us.
6450 # For example -DBINDIR="/usr/local/bin" passed on the command line may get
6451 # converted to -DBINDIR="E:/msys/mingw32/msys/1.0/local/bin".
6452 # This breaks GDB's relocatable path conversions since paths passed in
6453 # config.h would not get so translated, the path prefixes no longer match.
6454
6455 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6456 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6457 ac_define_dir=`eval echo $bindir`
6458 ac_define_dir=`eval echo $ac_define_dir`
6459
6460 cat >>confdefs.h <<_ACEOF
6461 #define BINDIR "$ac_define_dir"
6462 _ACEOF
6463
6464
6465
6466 # GDB's datadir relocation
6467
6468
6469
6470 # Check whether --with-gdb-datadir was given.
6471 if test "${with_gdb_datadir+set}" = set; then :
6472 withval=$with_gdb_datadir;
6473 GDB_DATADIR=$withval
6474 else
6475 GDB_DATADIR=${datadir}/gdb
6476 fi
6477
6478
6479 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6480 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6481 ac_define_dir=`eval echo $GDB_DATADIR`
6482 ac_define_dir=`eval echo $ac_define_dir`
6483
6484 cat >>confdefs.h <<_ACEOF
6485 #define GDB_DATADIR "$ac_define_dir"
6486 _ACEOF
6487
6488
6489
6490
6491 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
6492 if test "x$prefix" = xNONE; then
6493 test_prefix=/usr/local
6494 else
6495 test_prefix=$prefix
6496 fi
6497 else
6498 test_prefix=$exec_prefix
6499 fi
6500 value=0
6501 case ${ac_define_dir} in
6502 "${test_prefix}"|"${test_prefix}/"*|\
6503 '${exec_prefix}'|'${exec_prefix}/'*)
6504 value=1
6505 ;;
6506 esac
6507
6508 cat >>confdefs.h <<_ACEOF
6509 #define GDB_DATADIR_RELOCATABLE $value
6510 _ACEOF
6511
6512
6513
6514
6515
6516 # Check whether --with-relocated-sources was given.
6517 if test "${with_relocated_sources+set}" = set; then :
6518 withval=$with_relocated_sources; reloc_srcdir="${withval}"
6519
6520 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6521 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6522 ac_define_dir=`eval echo $reloc_srcdir`
6523 ac_define_dir=`eval echo $ac_define_dir`
6524
6525 cat >>confdefs.h <<_ACEOF
6526 #define RELOC_SRCDIR "$ac_define_dir"
6527 _ACEOF
6528
6529
6530
6531 fi
6532
6533
6534 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load directory" >&5
6535 $as_echo_n "checking for default auto-load directory... " >&6; }
6536
6537 # Check whether --with-auto-load-dir was given.
6538 if test "${with_auto_load_dir+set}" = set; then :
6539 withval=$with_auto_load_dir;
6540 else
6541 with_auto_load_dir='$debugdir:$datadir/auto-load'
6542 fi
6543
6544 escape_dir=`echo $with_auto_load_dir | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6545
6546 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6547 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6548 ac_define_dir=`eval echo $escape_dir`
6549 ac_define_dir=`eval echo $ac_define_dir`
6550
6551 cat >>confdefs.h <<_ACEOF
6552 #define AUTO_LOAD_DIR "$ac_define_dir"
6553 _ACEOF
6554
6555
6556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_dir" >&5
6557 $as_echo "$with_auto_load_dir" >&6; }
6558
6559 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for default auto-load safe-path" >&5
6560 $as_echo_n "checking for default auto-load safe-path... " >&6; }
6561
6562 # Check whether --with-auto-load-safe-path was given.
6563 if test "${with_auto_load_safe_path+set}" = set; then :
6564 withval=$with_auto_load_safe_path; if test "$with_auto_load_safe_path" = "no"; then
6565 with_auto_load_safe_path="/"
6566 fi
6567 else
6568 with_auto_load_safe_path="$with_auto_load_dir"
6569 fi
6570
6571 escape_dir=`echo $with_auto_load_safe_path | sed -e 's/[$]datadir\>/\\\\\\\\\\\\&/g' -e 's/[$]debugdir\>/\\\\\\\\\\\\&/g'`
6572
6573 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
6574 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
6575 ac_define_dir=`eval echo $escape_dir`
6576 ac_define_dir=`eval echo $ac_define_dir`
6577
6578 cat >>confdefs.h <<_ACEOF
6579 #define AUTO_LOAD_SAFE_PATH "$ac_define_dir"
6580 _ACEOF
6581
6582
6583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_auto_load_safe_path" >&5
6584 $as_echo "$with_auto_load_safe_path" >&6; }
6585
6586
6587
6588 subdirs="$subdirs testsuite"
6589
6590
6591 # Check whether to support alternative target configurations
6592 # Check whether --enable-targets was given.
6593 if test "${enable_targets+set}" = set; then :
6594 enableval=$enable_targets; case "${enableval}" in
6595 yes | "") as_fn_error $? "enable-targets option must specify target names or 'all'" "$LINENO" 5
6596 ;;
6597 no) enable_targets= ;;
6598 *) enable_targets=$enableval ;;
6599 esac
6600 fi
6601
6602
6603 # Check whether to enable 64-bit support on 32-bit hosts
6604 # Check whether --enable-64-bit-bfd was given.
6605 if test "${enable_64_bit_bfd+set}" = set; then :
6606 enableval=$enable_64_bit_bfd; case "${enableval}" in
6607 yes) want64=true ;;
6608 no) want64=false ;;
6609 *) as_fn_error $? "bad value ${enableval} for 64-bit-bfd option" "$LINENO" 5 ;;
6610 esac
6611 else
6612 want64=false
6613 fi
6614
6615 # Provide defaults for some variables set by the per-host and per-target
6616 # configuration.
6617 gdb_host_obs=posix-hdep.o
6618
6619 if test "${target}" = "${host}"; then
6620 gdb_native=yes
6621 else
6622 gdb_native=no
6623 fi
6624
6625 . $srcdir/configure.host
6626
6627 # Accumulate some settings from configure.tgt over all enabled targets
6628
6629 TARGET_OBS=
6630 all_targets=
6631 HAVE_NATIVE_GCORE_TARGET=
6632
6633 for targ_alias in `echo $target_alias $enable_targets | sed 's/,/ /g'`
6634 do
6635 if test "$targ_alias" = "all"; then
6636 all_targets=true
6637 else
6638 # Canonicalize the secondary target names.
6639 result=`$ac_config_sub $targ_alias 2>/dev/null`
6640 if test -n "$result"; then
6641 targ=$result
6642 else
6643 targ=$targ_alias
6644 fi
6645
6646 . ${srcdir}/configure.tgt
6647
6648 if test -z "${gdb_target_obs}"; then :
6649 as_fn_error $? "configuration ${targ} is unsupported." "$LINENO" 5
6650 fi
6651
6652 # Target-specific object files
6653 for i in ${gdb_target_obs}; do
6654 case " $TARGET_OBS " in
6655 *" ${i} "*) ;;
6656 *)
6657 TARGET_OBS="$TARGET_OBS ${i}"
6658 ;;
6659 esac
6660 done
6661
6662 # Check whether this target needs 64-bit CORE_ADDR
6663 if test x${want64} = xfalse; then
6664 . ${srcdir}/../bfd/config.bfd
6665 fi
6666
6667 # Check whether this target is native and supports gcore.
6668 if test $gdb_native = yes -a "$targ_alias" = "$target_alias" \
6669 && $gdb_have_gcore; then
6670 HAVE_NATIVE_GCORE_TARGET=1
6671 fi
6672 fi
6673 done
6674
6675 if test x${all_targets} = xtrue; then
6676
6677 # We want all 64-bit targets if we either:
6678 # - run on a 64-bit host or
6679 # - already require 64-bit support for some other target or
6680 # - the --enable-64-bit-bfd option was supplied
6681 # Otherwise we only support all 32-bit targets.
6682 #
6683 # NOTE: This test must be in sync with the corresponding
6684 # tests in BFD!
6685
6686 if test x${want64} = xfalse; then
6687 # The cast to long int works around a bug in the HP C Compiler
6688 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
6689 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
6690 # This bug is HP SR number 8606223364.
6691 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long" >&5
6692 $as_echo_n "checking size of long... " >&6; }
6693 if ${ac_cv_sizeof_long+:} false; then :
6694 $as_echo_n "(cached) " >&6
6695 else
6696 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long))" "ac_cv_sizeof_long" "$ac_includes_default"; then :
6697
6698 else
6699 if test "$ac_cv_type_long" = yes; then
6700 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
6701 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
6702 as_fn_error 77 "cannot compute sizeof (long)
6703 See \`config.log' for more details" "$LINENO" 5; }
6704 else
6705 ac_cv_sizeof_long=0
6706 fi
6707 fi
6708
6709 fi
6710 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long" >&5
6711 $as_echo "$ac_cv_sizeof_long" >&6; }
6712
6713
6714
6715 cat >>confdefs.h <<_ACEOF
6716 #define SIZEOF_LONG $ac_cv_sizeof_long
6717 _ACEOF
6718
6719
6720 if test "x${ac_cv_sizeof_long}" = "x8"; then
6721 want64=true
6722 fi
6723 fi
6724 if test x${want64} = xtrue; then
6725 TARGET_OBS='$(ALL_TARGET_OBS) $(ALL_64_TARGET_OBS)'
6726 else
6727 TARGET_OBS='$(ALL_TARGET_OBS)'
6728 fi
6729 fi
6730
6731
6732
6733
6734 # For other settings, only the main target counts.
6735 gdb_sim=
6736 gdb_osabi=
6737 targ=$target; . ${srcdir}/configure.tgt
6738
6739 # Fetch the default architecture and default target vector from BFD.
6740 targ=$target; . $srcdir/../bfd/config.bfd
6741
6742 # We only want the first architecture, so strip off the others if
6743 # there is more than one.
6744 targ_archs=`echo $targ_archs | sed 's/ .*//'`
6745
6746 if test "x$targ_archs" != x; then
6747
6748 cat >>confdefs.h <<_ACEOF
6749 #define DEFAULT_BFD_ARCH $targ_archs
6750 _ACEOF
6751
6752 fi
6753 if test "x$targ_defvec" != x; then
6754
6755 cat >>confdefs.h <<_ACEOF
6756 #define DEFAULT_BFD_VEC $targ_defvec
6757 _ACEOF
6758
6759 fi
6760
6761 # Enable MI.
6762 # Check whether --enable-gdbmi was given.
6763 if test "${enable_gdbmi+set}" = set; then :
6764 enableval=$enable_gdbmi; case $enableval in
6765 yes | no)
6766 ;;
6767 *)
6768 as_fn_error $? "bad value $enableval for --enable-gdbmi" "$LINENO" 5 ;;
6769 esac
6770 else
6771 enable_gdbmi=yes
6772 fi
6773
6774 if test x"$enable_gdbmi" = xyes; then
6775 if test -d "$srcdir/mi"; then
6776 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_MI_OBS)"
6777 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_MI_DEPS)"
6778 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_MI_SRCS)"
6779 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_MI_CFLAGS)"
6780 fi
6781 fi
6782
6783 # Enable TUI.
6784 # Check whether --enable-tui was given.
6785 if test "${enable_tui+set}" = set; then :
6786 enableval=$enable_tui; case $enableval in
6787 yes | no | auto)
6788 ;;
6789 *)
6790 as_fn_error $? "bad value $enableval for --enable-tui" "$LINENO" 5 ;;
6791 esac
6792 else
6793 enable_tui=auto
6794 fi
6795
6796
6797 # Enable gdbtk.
6798 # Check whether --enable-gdbtk was given.
6799 if test "${enable_gdbtk+set}" = set; then :
6800 enableval=$enable_gdbtk; case $enableval in
6801 yes | no)
6802 ;;
6803 *)
6804 as_fn_error $? "bad value $enableval for --enable-gdbtk" "$LINENO" 5 ;;
6805 esac
6806 else
6807 if test -d "$srcdir/gdbtk"; then
6808 enable_gdbtk=yes
6809 else
6810 enable_gdbtk=no
6811 fi
6812 fi
6813
6814 # We unconditionally disable gdbtk tests on selected platforms.
6815 case $host_os in
6816 go32* | windows*)
6817 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: gdbtk isn't supported on $host; disabling" >&5
6818 $as_echo "$as_me: WARNING: gdbtk isn't supported on $host; disabling" >&2;}
6819 enable_gdbtk=no ;;
6820 esac
6821
6822 # Libunwind support for ia64.
6823
6824
6825 # Check whether --with-libunwind-ia64 was given.
6826 if test "${with_libunwind_ia64+set}" = set; then :
6827 withval=$with_libunwind_ia64;
6828 else
6829 with_libunwind_ia64=auto
6830 fi
6831
6832
6833 # Backward compatibility option.
6834 if test "${with_libunwind+set}" = set; then
6835 if test x"$with_libunwind_ia64" != xauto; then
6836 as_fn_error $? "option --with-libunwind is deprecated, use --with-libunwind-ia64" "$LINENO" 5
6837 fi
6838 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&5
6839 $as_echo "$as_me: WARNING: option --with-libunwind is deprecated, use --with-libunwind-ia64" >&2;}
6840 with_libunwind_ia64="$with_libunwind"
6841 fi
6842
6843 case "$with_libunwind_ia64" in
6844 yes | no)
6845 ;;
6846 auto)
6847 for ac_header in libunwind-ia64.h
6848 do :
6849 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6850 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6851 cat >>confdefs.h <<_ACEOF
6852 #define HAVE_LIBUNWIND_IA64_H 1
6853 _ACEOF
6854
6855 fi
6856
6857 done
6858
6859 with_libunwind_ia64=$ac_cv_header_libunwind_ia64_h
6860 ;;
6861 *)
6862 as_fn_error $? "bad value $with_libunwind_ia64 for GDB --with-libunwind-ia64 option" "$LINENO" 5
6863 ;;
6864 esac
6865
6866 if test x"$with_libunwind_ia64" = xyes; then
6867 for ac_header in libunwind-ia64.h
6868 do :
6869 ac_fn_c_check_header_mongrel "$LINENO" "libunwind-ia64.h" "ac_cv_header_libunwind_ia64_h" "$ac_includes_default"
6870 if test "x$ac_cv_header_libunwind_ia64_h" = xyes; then :
6871 cat >>confdefs.h <<_ACEOF
6872 #define HAVE_LIBUNWIND_IA64_H 1
6873 _ACEOF
6874
6875 fi
6876
6877 done
6878
6879 if test x"$ac_cv_header_libunwind_ia64_h" != xyes; then
6880 as_fn_error $? "GDB option --with-libunwind-ia64 requires libunwind-ia64.h" "$LINENO" 5
6881 fi
6882 CONFIG_OBS="$CONFIG_OBS ia64-libunwind-tdep.o"
6883 CONFIG_DEPS="$CONFIG_DEPS ia64-libunwind-tdep.o"
6884 CONFIG_SRCS="$CONFIG_SRCS ia64-libunwind-tdep.c"
6885 fi
6886
6887 opt_curses=no
6888
6889 # Check whether --with-curses was given.
6890 if test "${with_curses+set}" = set; then :
6891 withval=$with_curses; opt_curses=$withval
6892 fi
6893
6894
6895 prefer_curses=no
6896 if test "$opt_curses" = "yes"; then
6897 prefer_curses=yes
6898 fi
6899
6900 # Profiling support.
6901 # Check whether --enable-profiling was given.
6902 if test "${enable_profiling+set}" = set; then :
6903 enableval=$enable_profiling; case $enableval in
6904 yes | no)
6905 ;;
6906 *)
6907 as_fn_error $? "bad value $enableval for --enable-profile" "$LINENO" 5 ;;
6908 esac
6909 else
6910 enable_profiling=no
6911 fi
6912
6913
6914 for ac_func in monstartup _mcleanup
6915 do :
6916 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
6917 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
6918 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
6919 cat >>confdefs.h <<_ACEOF
6920 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
6921 _ACEOF
6922
6923 fi
6924 done
6925
6926 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for _etext" >&5
6927 $as_echo_n "checking for _etext... " >&6; }
6928 if ${ac_cv_var__etext+:} false; then :
6929 $as_echo_n "(cached) " >&6
6930 else
6931 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6932 /* end confdefs.h. */
6933 #include <stdlib.h>
6934 extern char _etext;
6935
6936 int
6937 main ()
6938 {
6939 free (&_etext);
6940 ;
6941 return 0;
6942 }
6943 _ACEOF
6944 if ac_fn_c_try_link "$LINENO"; then :
6945 ac_cv_var__etext=yes
6946 else
6947 ac_cv_var__etext=no
6948 fi
6949 rm -f core conftest.err conftest.$ac_objext \
6950 conftest$ac_exeext conftest.$ac_ext
6951 fi
6952 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var__etext" >&5
6953 $as_echo "$ac_cv_var__etext" >&6; }
6954 if test "$ac_cv_var__etext" = yes; then
6955
6956 $as_echo "#define HAVE__ETEXT 1" >>confdefs.h
6957
6958 fi
6959 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for etext" >&5
6960 $as_echo_n "checking for etext... " >&6; }
6961 if ${ac_cv_var_etext+:} false; then :
6962 $as_echo_n "(cached) " >&6
6963 else
6964 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
6965 /* end confdefs.h. */
6966 #include <stdlib.h>
6967 extern char etext;
6968
6969 int
6970 main ()
6971 {
6972 free (&etext);
6973 ;
6974 return 0;
6975 }
6976 _ACEOF
6977 if ac_fn_c_try_link "$LINENO"; then :
6978 ac_cv_var_etext=yes
6979 else
6980 ac_cv_var_etext=no
6981 fi
6982 rm -f core conftest.err conftest.$ac_objext \
6983 conftest$ac_exeext conftest.$ac_ext
6984 fi
6985 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_var_etext" >&5
6986 $as_echo "$ac_cv_var_etext" >&6; }
6987 if test "$ac_cv_var_etext" = yes; then
6988
6989 $as_echo "#define HAVE_ETEXT 1" >>confdefs.h
6990
6991 fi
6992 if test "$enable_profiling" = yes ; then
6993 if test "$ac_cv_func_monstartup" = no || test "$ac_cv_func__mcleanup" = no; then
6994 as_fn_error $? "--enable-profiling requires monstartup and _mcleanup" "$LINENO" 5
6995 fi
6996 PROFILE_CFLAGS=-pg
6997 OLD_CFLAGS="$CFLAGS"
6998 CFLAGS="$CFLAGS $PROFILE_CFLAGS"
6999
7000 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -pg" >&5
7001 $as_echo_n "checking whether $CC supports -pg... " >&6; }
7002 if ${ac_cv_cc_supports_pg+:} false; then :
7003 $as_echo_n "(cached) " >&6
7004 else
7005 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7006 /* end confdefs.h. */
7007
7008 int
7009 main ()
7010 {
7011 int x;
7012 ;
7013 return 0;
7014 }
7015 _ACEOF
7016 if ac_fn_c_try_compile "$LINENO"; then :
7017 ac_cv_cc_supports_pg=yes
7018 else
7019 ac_cv_cc_supports_pg=no
7020 fi
7021 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
7022 fi
7023 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cc_supports_pg" >&5
7024 $as_echo "$ac_cv_cc_supports_pg" >&6; }
7025
7026 if test "$ac_cv_cc_supports_pg" = no; then
7027 as_fn_error $? "--enable-profiling requires a compiler which supports -pg" "$LINENO" 5
7028 fi
7029
7030 CFLAGS="$OLD_CFLAGS"
7031 fi
7032
7033 CODESIGN_CERT=
7034 # Check whether --enable-codesign was given.
7035 if test "${enable_codesign+set}" = set; then :
7036 enableval=$enable_codesign; CODESIGN_CERT=$enableval
7037 fi
7038
7039
7040
7041
7042
7043 # Check whether --with-pkgversion was given.
7044 if test "${with_pkgversion+set}" = set; then :
7045 withval=$with_pkgversion; case "$withval" in
7046 yes) as_fn_error $? "package version not specified" "$LINENO" 5 ;;
7047 no) PKGVERSION= ;;
7048 *) PKGVERSION="($withval) " ;;
7049 esac
7050 else
7051 PKGVERSION="(GDB) "
7052
7053 fi
7054
7055
7056
7057
7058
7059 # Check whether --with-bugurl was given.
7060 if test "${with_bugurl+set}" = set; then :
7061 withval=$with_bugurl; case "$withval" in
7062 yes) as_fn_error $? "bug URL not specified" "$LINENO" 5 ;;
7063 no) BUGURL=
7064 ;;
7065 *) BUGURL="$withval"
7066 ;;
7067 esac
7068 else
7069 BUGURL="http://www.gnu.org/software/gdb/bugs/"
7070
7071 fi
7072
7073 case ${BUGURL} in
7074 "")
7075 REPORT_BUGS_TO=
7076 REPORT_BUGS_TEXI=
7077 ;;
7078 *)
7079 REPORT_BUGS_TO="<$BUGURL>"
7080 REPORT_BUGS_TEXI=@uref{`echo "$BUGURL" | sed 's/@/@@/g'`}
7081 ;;
7082 esac;
7083
7084
7085
7086
7087 cat >>confdefs.h <<_ACEOF
7088 #define PKGVERSION "$PKGVERSION"
7089 _ACEOF
7090
7091
7092 cat >>confdefs.h <<_ACEOF
7093 #define REPORT_BUGS_TO "$REPORT_BUGS_TO"
7094 _ACEOF
7095
7096
7097 # --------------------- #
7098 # Checks for programs. #
7099 # --------------------- #
7100
7101 for ac_prog in gawk mawk nawk awk
7102 do
7103 # Extract the first word of "$ac_prog", so it can be a program name with args.
7104 set dummy $ac_prog; ac_word=$2
7105 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7106 $as_echo_n "checking for $ac_word... " >&6; }
7107 if ${ac_cv_prog_AWK+:} false; then :
7108 $as_echo_n "(cached) " >&6
7109 else
7110 if test -n "$AWK"; then
7111 ac_cv_prog_AWK="$AWK" # Let the user override the test.
7112 else
7113 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7114 for as_dir in $PATH
7115 do
7116 IFS=$as_save_IFS
7117 test -z "$as_dir" && as_dir=.
7118 for ac_exec_ext in '' $ac_executable_extensions; do
7119 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7120 ac_cv_prog_AWK="$ac_prog"
7121 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7122 break 2
7123 fi
7124 done
7125 done
7126 IFS=$as_save_IFS
7127
7128 fi
7129 fi
7130 AWK=$ac_cv_prog_AWK
7131 if test -n "$AWK"; then
7132 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
7133 $as_echo "$AWK" >&6; }
7134 else
7135 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7136 $as_echo "no" >&6; }
7137 fi
7138
7139
7140 test -n "$AWK" && break
7141 done
7142
7143 # Find a good install program. We prefer a C program (faster),
7144 # so one script is as good as another. But avoid the broken or
7145 # incompatible versions:
7146 # SysV /etc/install, /usr/sbin/install
7147 # SunOS /usr/etc/install
7148 # IRIX /sbin/install
7149 # AIX /bin/install
7150 # AmigaOS /C/install, which installs bootblocks on floppy discs
7151 # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
7152 # AFS /usr/afsws/bin/install, which mishandles nonexistent args
7153 # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
7154 # OS/2's system install, which has a completely different semantic
7155 # ./install, which can be erroneously created by make from ./install.sh.
7156 # Reject install programs that cannot install multiple files.
7157 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5
7158 $as_echo_n "checking for a BSD-compatible install... " >&6; }
7159 if test -z "$INSTALL"; then
7160 if ${ac_cv_path_install+:} false; then :
7161 $as_echo_n "(cached) " >&6
7162 else
7163 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7164 for as_dir in $PATH
7165 do
7166 IFS=$as_save_IFS
7167 test -z "$as_dir" && as_dir=.
7168 # Account for people who put trailing slashes in PATH elements.
7169 case $as_dir/ in #((
7170 ./ | .// | /[cC]/* | \
7171 /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \
7172 ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \
7173 /usr/ucb/* ) ;;
7174 *)
7175 # OSF1 and SCO ODT 3.0 have their own names for install.
7176 # Don't use installbsd from OSF since it installs stuff as root
7177 # by default.
7178 for ac_prog in ginstall scoinst install; do
7179 for ac_exec_ext in '' $ac_executable_extensions; do
7180 if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then
7181 if test $ac_prog = install &&
7182 grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7183 # AIX install. It has an incompatible calling convention.
7184 :
7185 elif test $ac_prog = install &&
7186 grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then
7187 # program-specific install script used by HP pwplus--don't use.
7188 :
7189 else
7190 rm -rf conftest.one conftest.two conftest.dir
7191 echo one > conftest.one
7192 echo two > conftest.two
7193 mkdir conftest.dir
7194 if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" &&
7195 test -s conftest.one && test -s conftest.two &&
7196 test -s conftest.dir/conftest.one &&
7197 test -s conftest.dir/conftest.two
7198 then
7199 ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c"
7200 break 3
7201 fi
7202 fi
7203 fi
7204 done
7205 done
7206 ;;
7207 esac
7208
7209 done
7210 IFS=$as_save_IFS
7211
7212 rm -rf conftest.one conftest.two conftest.dir
7213
7214 fi
7215 if test "${ac_cv_path_install+set}" = set; then
7216 INSTALL=$ac_cv_path_install
7217 else
7218 # As a last resort, use the slow shell script. Don't cache a
7219 # value for INSTALL within a source directory, because that will
7220 # break other packages using the cache if that directory is
7221 # removed, or if the value is a relative name.
7222 INSTALL=$ac_install_sh
7223 fi
7224 fi
7225 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5
7226 $as_echo "$INSTALL" >&6; }
7227
7228 # Use test -z because SunOS4 sh mishandles braces in ${var-val}.
7229 # It thinks the first close brace ends the variable substitution.
7230 test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
7231
7232 test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
7233
7234 test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
7235
7236 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5
7237 $as_echo_n "checking whether ln -s works... " >&6; }
7238 LN_S=$as_ln_s
7239 if test "$LN_S" = "ln -s"; then
7240 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7241 $as_echo "yes" >&6; }
7242 else
7243 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5
7244 $as_echo "no, using $LN_S" >&6; }
7245 fi
7246
7247 if test -n "$ac_tool_prefix"; then
7248 # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7249 set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7251 $as_echo_n "checking for $ac_word... " >&6; }
7252 if ${ac_cv_prog_RANLIB+:} false; then :
7253 $as_echo_n "(cached) " >&6
7254 else
7255 if test -n "$RANLIB"; then
7256 ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7257 else
7258 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7259 for as_dir in $PATH
7260 do
7261 IFS=$as_save_IFS
7262 test -z "$as_dir" && as_dir=.
7263 for ac_exec_ext in '' $ac_executable_extensions; do
7264 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7265 ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7266 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7267 break 2
7268 fi
7269 done
7270 done
7271 IFS=$as_save_IFS
7272
7273 fi
7274 fi
7275 RANLIB=$ac_cv_prog_RANLIB
7276 if test -n "$RANLIB"; then
7277 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5
7278 $as_echo "$RANLIB" >&6; }
7279 else
7280 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7281 $as_echo "no" >&6; }
7282 fi
7283
7284
7285 fi
7286 if test -z "$ac_cv_prog_RANLIB"; then
7287 ac_ct_RANLIB=$RANLIB
7288 # Extract the first word of "ranlib", so it can be a program name with args.
7289 set dummy ranlib; ac_word=$2
7290 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7291 $as_echo_n "checking for $ac_word... " >&6; }
7292 if ${ac_cv_prog_ac_ct_RANLIB+:} false; then :
7293 $as_echo_n "(cached) " >&6
7294 else
7295 if test -n "$ac_ct_RANLIB"; then
7296 ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7297 else
7298 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7299 for as_dir in $PATH
7300 do
7301 IFS=$as_save_IFS
7302 test -z "$as_dir" && as_dir=.
7303 for ac_exec_ext in '' $ac_executable_extensions; do
7304 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7305 ac_cv_prog_ac_ct_RANLIB="ranlib"
7306 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7307 break 2
7308 fi
7309 done
7310 done
7311 IFS=$as_save_IFS
7312
7313 fi
7314 fi
7315 ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7316 if test -n "$ac_ct_RANLIB"; then
7317 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5
7318 $as_echo "$ac_ct_RANLIB" >&6; }
7319 else
7320 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7321 $as_echo "no" >&6; }
7322 fi
7323
7324 if test "x$ac_ct_RANLIB" = x; then
7325 RANLIB=":"
7326 else
7327 case $cross_compiling:$ac_tool_warned in
7328 yes:)
7329 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7330 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7331 ac_tool_warned=yes ;;
7332 esac
7333 RANLIB=$ac_ct_RANLIB
7334 fi
7335 else
7336 RANLIB="$ac_cv_prog_RANLIB"
7337 fi
7338
7339 for ac_prog in 'bison -y' byacc
7340 do
7341 # Extract the first word of "$ac_prog", so it can be a program name with args.
7342 set dummy $ac_prog; ac_word=$2
7343 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7344 $as_echo_n "checking for $ac_word... " >&6; }
7345 if ${ac_cv_prog_YACC+:} false; then :
7346 $as_echo_n "(cached) " >&6
7347 else
7348 if test -n "$YACC"; then
7349 ac_cv_prog_YACC="$YACC" # Let the user override the test.
7350 else
7351 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7352 for as_dir in $PATH
7353 do
7354 IFS=$as_save_IFS
7355 test -z "$as_dir" && as_dir=.
7356 for ac_exec_ext in '' $ac_executable_extensions; do
7357 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7358 ac_cv_prog_YACC="$ac_prog"
7359 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7360 break 2
7361 fi
7362 done
7363 done
7364 IFS=$as_save_IFS
7365
7366 fi
7367 fi
7368 YACC=$ac_cv_prog_YACC
7369 if test -n "$YACC"; then
7370 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $YACC" >&5
7371 $as_echo "$YACC" >&6; }
7372 else
7373 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7374 $as_echo "no" >&6; }
7375 fi
7376
7377
7378 test -n "$YACC" && break
7379 done
7380 test -n "$YACC" || YACC="yacc"
7381
7382
7383 if test -n "$ac_tool_prefix"; then
7384 # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
7385 set dummy ${ac_tool_prefix}ar; ac_word=$2
7386 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7387 $as_echo_n "checking for $ac_word... " >&6; }
7388 if ${ac_cv_prog_AR+:} false; then :
7389 $as_echo_n "(cached) " >&6
7390 else
7391 if test -n "$AR"; then
7392 ac_cv_prog_AR="$AR" # Let the user override the test.
7393 else
7394 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7395 for as_dir in $PATH
7396 do
7397 IFS=$as_save_IFS
7398 test -z "$as_dir" && as_dir=.
7399 for ac_exec_ext in '' $ac_executable_extensions; do
7400 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7401 ac_cv_prog_AR="${ac_tool_prefix}ar"
7402 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7403 break 2
7404 fi
7405 done
7406 done
7407 IFS=$as_save_IFS
7408
7409 fi
7410 fi
7411 AR=$ac_cv_prog_AR
7412 if test -n "$AR"; then
7413 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
7414 $as_echo "$AR" >&6; }
7415 else
7416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7417 $as_echo "no" >&6; }
7418 fi
7419
7420
7421 fi
7422 if test -z "$ac_cv_prog_AR"; then
7423 ac_ct_AR=$AR
7424 # Extract the first word of "ar", so it can be a program name with args.
7425 set dummy ar; ac_word=$2
7426 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7427 $as_echo_n "checking for $ac_word... " >&6; }
7428 if ${ac_cv_prog_ac_ct_AR+:} false; then :
7429 $as_echo_n "(cached) " >&6
7430 else
7431 if test -n "$ac_ct_AR"; then
7432 ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
7433 else
7434 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7435 for as_dir in $PATH
7436 do
7437 IFS=$as_save_IFS
7438 test -z "$as_dir" && as_dir=.
7439 for ac_exec_ext in '' $ac_executable_extensions; do
7440 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7441 ac_cv_prog_ac_ct_AR="ar"
7442 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7443 break 2
7444 fi
7445 done
7446 done
7447 IFS=$as_save_IFS
7448
7449 fi
7450 fi
7451 ac_ct_AR=$ac_cv_prog_ac_ct_AR
7452 if test -n "$ac_ct_AR"; then
7453 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
7454 $as_echo "$ac_ct_AR" >&6; }
7455 else
7456 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7457 $as_echo "no" >&6; }
7458 fi
7459
7460 if test "x$ac_ct_AR" = x; then
7461 AR=""
7462 else
7463 case $cross_compiling:$ac_tool_warned in
7464 yes:)
7465 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7466 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7467 ac_tool_warned=yes ;;
7468 esac
7469 AR=$ac_ct_AR
7470 fi
7471 else
7472 AR="$ac_cv_prog_AR"
7473 fi
7474
7475 if test -n "$ac_tool_prefix"; then
7476 # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args.
7477 set dummy ${ac_tool_prefix}dlltool; ac_word=$2
7478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7479 $as_echo_n "checking for $ac_word... " >&6; }
7480 if ${ac_cv_prog_DLLTOOL+:} false; then :
7481 $as_echo_n "(cached) " >&6
7482 else
7483 if test -n "$DLLTOOL"; then
7484 ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test.
7485 else
7486 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7487 for as_dir in $PATH
7488 do
7489 IFS=$as_save_IFS
7490 test -z "$as_dir" && as_dir=.
7491 for ac_exec_ext in '' $ac_executable_extensions; do
7492 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7493 ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool"
7494 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7495 break 2
7496 fi
7497 done
7498 done
7499 IFS=$as_save_IFS
7500
7501 fi
7502 fi
7503 DLLTOOL=$ac_cv_prog_DLLTOOL
7504 if test -n "$DLLTOOL"; then
7505 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5
7506 $as_echo "$DLLTOOL" >&6; }
7507 else
7508 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7509 $as_echo "no" >&6; }
7510 fi
7511
7512
7513 fi
7514 if test -z "$ac_cv_prog_DLLTOOL"; then
7515 ac_ct_DLLTOOL=$DLLTOOL
7516 # Extract the first word of "dlltool", so it can be a program name with args.
7517 set dummy dlltool; ac_word=$2
7518 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7519 $as_echo_n "checking for $ac_word... " >&6; }
7520 if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then :
7521 $as_echo_n "(cached) " >&6
7522 else
7523 if test -n "$ac_ct_DLLTOOL"; then
7524 ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test.
7525 else
7526 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7527 for as_dir in $PATH
7528 do
7529 IFS=$as_save_IFS
7530 test -z "$as_dir" && as_dir=.
7531 for ac_exec_ext in '' $ac_executable_extensions; do
7532 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7533 ac_cv_prog_ac_ct_DLLTOOL="dlltool"
7534 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7535 break 2
7536 fi
7537 done
7538 done
7539 IFS=$as_save_IFS
7540
7541 fi
7542 fi
7543 ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL
7544 if test -n "$ac_ct_DLLTOOL"; then
7545 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5
7546 $as_echo "$ac_ct_DLLTOOL" >&6; }
7547 else
7548 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7549 $as_echo "no" >&6; }
7550 fi
7551
7552 if test "x$ac_ct_DLLTOOL" = x; then
7553 DLLTOOL=""
7554 else
7555 case $cross_compiling:$ac_tool_warned in
7556 yes:)
7557 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7558 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7559 ac_tool_warned=yes ;;
7560 esac
7561 DLLTOOL=$ac_ct_DLLTOOL
7562 fi
7563 else
7564 DLLTOOL="$ac_cv_prog_DLLTOOL"
7565 fi
7566
7567 if test -n "$ac_tool_prefix"; then
7568 # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
7569 set dummy ${ac_tool_prefix}windres; ac_word=$2
7570 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7571 $as_echo_n "checking for $ac_word... " >&6; }
7572 if ${ac_cv_prog_WINDRES+:} false; then :
7573 $as_echo_n "(cached) " >&6
7574 else
7575 if test -n "$WINDRES"; then
7576 ac_cv_prog_WINDRES="$WINDRES" # Let the user override the test.
7577 else
7578 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7579 for as_dir in $PATH
7580 do
7581 IFS=$as_save_IFS
7582 test -z "$as_dir" && as_dir=.
7583 for ac_exec_ext in '' $ac_executable_extensions; do
7584 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7585 ac_cv_prog_WINDRES="${ac_tool_prefix}windres"
7586 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7587 break 2
7588 fi
7589 done
7590 done
7591 IFS=$as_save_IFS
7592
7593 fi
7594 fi
7595 WINDRES=$ac_cv_prog_WINDRES
7596 if test -n "$WINDRES"; then
7597 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WINDRES" >&5
7598 $as_echo "$WINDRES" >&6; }
7599 else
7600 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7601 $as_echo "no" >&6; }
7602 fi
7603
7604
7605 fi
7606 if test -z "$ac_cv_prog_WINDRES"; then
7607 ac_ct_WINDRES=$WINDRES
7608 # Extract the first word of "windres", so it can be a program name with args.
7609 set dummy windres; ac_word=$2
7610 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7611 $as_echo_n "checking for $ac_word... " >&6; }
7612 if ${ac_cv_prog_ac_ct_WINDRES+:} false; then :
7613 $as_echo_n "(cached) " >&6
7614 else
7615 if test -n "$ac_ct_WINDRES"; then
7616 ac_cv_prog_ac_ct_WINDRES="$ac_ct_WINDRES" # Let the user override the test.
7617 else
7618 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7619 for as_dir in $PATH
7620 do
7621 IFS=$as_save_IFS
7622 test -z "$as_dir" && as_dir=.
7623 for ac_exec_ext in '' $ac_executable_extensions; do
7624 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7625 ac_cv_prog_ac_ct_WINDRES="windres"
7626 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7627 break 2
7628 fi
7629 done
7630 done
7631 IFS=$as_save_IFS
7632
7633 fi
7634 fi
7635 ac_ct_WINDRES=$ac_cv_prog_ac_ct_WINDRES
7636 if test -n "$ac_ct_WINDRES"; then
7637 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_WINDRES" >&5
7638 $as_echo "$ac_ct_WINDRES" >&6; }
7639 else
7640 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7641 $as_echo "no" >&6; }
7642 fi
7643
7644 if test "x$ac_ct_WINDRES" = x; then
7645 WINDRES=""
7646 else
7647 case $cross_compiling:$ac_tool_warned in
7648 yes:)
7649 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7650 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7651 ac_tool_warned=yes ;;
7652 esac
7653 WINDRES=$ac_ct_WINDRES
7654 fi
7655 else
7656 WINDRES="$ac_cv_prog_WINDRES"
7657 fi
7658
7659
7660 case $host_os in
7661 gnu*)
7662 # Needed for GNU Hurd hosts.
7663 if test -n "$ac_tool_prefix"; then
7664 # Extract the first word of "${ac_tool_prefix}mig", so it can be a program name with args.
7665 set dummy ${ac_tool_prefix}mig; ac_word=$2
7666 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7667 $as_echo_n "checking for $ac_word... " >&6; }
7668 if ${ac_cv_prog_MIG+:} false; then :
7669 $as_echo_n "(cached) " >&6
7670 else
7671 if test -n "$MIG"; then
7672 ac_cv_prog_MIG="$MIG" # Let the user override the test.
7673 else
7674 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7675 for as_dir in $PATH
7676 do
7677 IFS=$as_save_IFS
7678 test -z "$as_dir" && as_dir=.
7679 for ac_exec_ext in '' $ac_executable_extensions; do
7680 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7681 ac_cv_prog_MIG="${ac_tool_prefix}mig"
7682 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7683 break 2
7684 fi
7685 done
7686 done
7687 IFS=$as_save_IFS
7688
7689 fi
7690 fi
7691 MIG=$ac_cv_prog_MIG
7692 if test -n "$MIG"; then
7693 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MIG" >&5
7694 $as_echo "$MIG" >&6; }
7695 else
7696 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7697 $as_echo "no" >&6; }
7698 fi
7699
7700
7701 fi
7702 if test -z "$ac_cv_prog_MIG"; then
7703 ac_ct_MIG=$MIG
7704 # Extract the first word of "mig", so it can be a program name with args.
7705 set dummy mig; ac_word=$2
7706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7707 $as_echo_n "checking for $ac_word... " >&6; }
7708 if ${ac_cv_prog_ac_ct_MIG+:} false; then :
7709 $as_echo_n "(cached) " >&6
7710 else
7711 if test -n "$ac_ct_MIG"; then
7712 ac_cv_prog_ac_ct_MIG="$ac_ct_MIG" # Let the user override the test.
7713 else
7714 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7715 for as_dir in $PATH
7716 do
7717 IFS=$as_save_IFS
7718 test -z "$as_dir" && as_dir=.
7719 for ac_exec_ext in '' $ac_executable_extensions; do
7720 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7721 ac_cv_prog_ac_ct_MIG="mig"
7722 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7723 break 2
7724 fi
7725 done
7726 done
7727 IFS=$as_save_IFS
7728
7729 fi
7730 fi
7731 ac_ct_MIG=$ac_cv_prog_ac_ct_MIG
7732 if test -n "$ac_ct_MIG"; then
7733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MIG" >&5
7734 $as_echo "$ac_ct_MIG" >&6; }
7735 else
7736 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7737 $as_echo "no" >&6; }
7738 fi
7739
7740 if test "x$ac_ct_MIG" = x; then
7741 MIG=""
7742 else
7743 case $cross_compiling:$ac_tool_warned in
7744 yes:)
7745 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
7746 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
7747 ac_tool_warned=yes ;;
7748 esac
7749 MIG=$ac_ct_MIG
7750 fi
7751 else
7752 MIG="$ac_cv_prog_MIG"
7753 fi
7754
7755 if test x"$MIG" = x; then
7756 as_fn_error $? "MIG not found but required for $host hosts" "$LINENO" 5
7757 fi
7758 ;;
7759 esac
7760
7761 # ---------------------- #
7762 # Checks for libraries. #
7763 # ---------------------- #
7764
7765 # We might need to link with -lm; most simulators need it.
7766 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lm" >&5
7767 $as_echo_n "checking for main in -lm... " >&6; }
7768 if ${ac_cv_lib_m_main+:} false; then :
7769 $as_echo_n "(cached) " >&6
7770 else
7771 ac_check_lib_save_LIBS=$LIBS
7772 LIBS="-lm $LIBS"
7773 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7774 /* end confdefs.h. */
7775
7776
7777 int
7778 main ()
7779 {
7780 return main ();
7781 ;
7782 return 0;
7783 }
7784 _ACEOF
7785 if ac_fn_c_try_link "$LINENO"; then :
7786 ac_cv_lib_m_main=yes
7787 else
7788 ac_cv_lib_m_main=no
7789 fi
7790 rm -f core conftest.err conftest.$ac_objext \
7791 conftest$ac_exeext conftest.$ac_ext
7792 LIBS=$ac_check_lib_save_LIBS
7793 fi
7794 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_main" >&5
7795 $as_echo "$ac_cv_lib_m_main" >&6; }
7796 if test "x$ac_cv_lib_m_main" = xyes; then :
7797 cat >>confdefs.h <<_ACEOF
7798 #define HAVE_LIBM 1
7799 _ACEOF
7800
7801 LIBS="-lm $LIBS"
7802
7803 fi
7804
7805
7806 # Some systems (e.g. Solaris) have `gethostbyname' in libnsl.
7807 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing gethostbyname" >&5
7808 $as_echo_n "checking for library containing gethostbyname... " >&6; }
7809 if ${ac_cv_search_gethostbyname+:} false; then :
7810 $as_echo_n "(cached) " >&6
7811 else
7812 ac_func_search_save_LIBS=$LIBS
7813 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7814 /* end confdefs.h. */
7815
7816 /* Override any GCC internal prototype to avoid an error.
7817 Use char because int might match the return type of a GCC
7818 builtin and then its argument prototype would still apply. */
7819 #ifdef __cplusplus
7820 extern "C"
7821 #endif
7822 char gethostbyname ();
7823 int
7824 main ()
7825 {
7826 return gethostbyname ();
7827 ;
7828 return 0;
7829 }
7830 _ACEOF
7831 for ac_lib in '' nsl; do
7832 if test -z "$ac_lib"; then
7833 ac_res="none required"
7834 else
7835 ac_res=-l$ac_lib
7836 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7837 fi
7838 if ac_fn_c_try_link "$LINENO"; then :
7839 ac_cv_search_gethostbyname=$ac_res
7840 fi
7841 rm -f core conftest.err conftest.$ac_objext \
7842 conftest$ac_exeext
7843 if ${ac_cv_search_gethostbyname+:} false; then :
7844 break
7845 fi
7846 done
7847 if ${ac_cv_search_gethostbyname+:} false; then :
7848
7849 else
7850 ac_cv_search_gethostbyname=no
7851 fi
7852 rm conftest.$ac_ext
7853 LIBS=$ac_func_search_save_LIBS
7854 fi
7855 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_gethostbyname" >&5
7856 $as_echo "$ac_cv_search_gethostbyname" >&6; }
7857 ac_res=$ac_cv_search_gethostbyname
7858 if test "$ac_res" != no; then :
7859 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7860
7861 fi
7862
7863
7864 # Some systems (e.g. Solaris) have `socketpair' in libsocket.
7865 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing socketpair" >&5
7866 $as_echo_n "checking for library containing socketpair... " >&6; }
7867 if ${ac_cv_search_socketpair+:} false; then :
7868 $as_echo_n "(cached) " >&6
7869 else
7870 ac_func_search_save_LIBS=$LIBS
7871 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7872 /* end confdefs.h. */
7873
7874 /* Override any GCC internal prototype to avoid an error.
7875 Use char because int might match the return type of a GCC
7876 builtin and then its argument prototype would still apply. */
7877 #ifdef __cplusplus
7878 extern "C"
7879 #endif
7880 char socketpair ();
7881 int
7882 main ()
7883 {
7884 return socketpair ();
7885 ;
7886 return 0;
7887 }
7888 _ACEOF
7889 for ac_lib in '' socket; do
7890 if test -z "$ac_lib"; then
7891 ac_res="none required"
7892 else
7893 ac_res=-l$ac_lib
7894 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7895 fi
7896 if ac_fn_c_try_link "$LINENO"; then :
7897 ac_cv_search_socketpair=$ac_res
7898 fi
7899 rm -f core conftest.err conftest.$ac_objext \
7900 conftest$ac_exeext
7901 if ${ac_cv_search_socketpair+:} false; then :
7902 break
7903 fi
7904 done
7905 if ${ac_cv_search_socketpair+:} false; then :
7906
7907 else
7908 ac_cv_search_socketpair=no
7909 fi
7910 rm conftest.$ac_ext
7911 LIBS=$ac_func_search_save_LIBS
7912 fi
7913 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_socketpair" >&5
7914 $as_echo "$ac_cv_search_socketpair" >&6; }
7915 ac_res=$ac_cv_search_socketpair
7916 if test "$ac_res" != no; then :
7917 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7918
7919 fi
7920
7921
7922 # Link in zlib if we can. This allows us to read compressed debug sections.
7923
7924 # Use the system's zlib library.
7925 zlibdir="-L\$(top_builddir)/../zlib"
7926 zlibinc="-I\$(top_srcdir)/../zlib"
7927
7928 # Check whether --with-system-zlib was given.
7929 if test "${with_system_zlib+set}" = set; then :
7930 withval=$with_system_zlib; if test x$with_system_zlib = xyes ; then
7931 zlibdir=
7932 zlibinc=
7933 fi
7934
7935 fi
7936
7937
7938
7939
7940
7941 # On FreeBSD we may need libutil for kinfo_getvmmap (used by fbsd-nat.c).
7942 # On GNU/kFreeBSD systems, FreeBSD libutil is renamed to libutil-freebsd.
7943 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getvmmap" >&5
7944 $as_echo_n "checking for library containing kinfo_getvmmap... " >&6; }
7945 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7946 $as_echo_n "(cached) " >&6
7947 else
7948 ac_func_search_save_LIBS=$LIBS
7949 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
7950 /* end confdefs.h. */
7951
7952 /* Override any GCC internal prototype to avoid an error.
7953 Use char because int might match the return type of a GCC
7954 builtin and then its argument prototype would still apply. */
7955 #ifdef __cplusplus
7956 extern "C"
7957 #endif
7958 char kinfo_getvmmap ();
7959 int
7960 main ()
7961 {
7962 return kinfo_getvmmap ();
7963 ;
7964 return 0;
7965 }
7966 _ACEOF
7967 for ac_lib in '' util util-freebsd; do
7968 if test -z "$ac_lib"; then
7969 ac_res="none required"
7970 else
7971 ac_res=-l$ac_lib
7972 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
7973 fi
7974 if ac_fn_c_try_link "$LINENO"; then :
7975 ac_cv_search_kinfo_getvmmap=$ac_res
7976 fi
7977 rm -f core conftest.err conftest.$ac_objext \
7978 conftest$ac_exeext
7979 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7980 break
7981 fi
7982 done
7983 if ${ac_cv_search_kinfo_getvmmap+:} false; then :
7984
7985 else
7986 ac_cv_search_kinfo_getvmmap=no
7987 fi
7988 rm conftest.$ac_ext
7989 LIBS=$ac_func_search_save_LIBS
7990 fi
7991 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getvmmap" >&5
7992 $as_echo "$ac_cv_search_kinfo_getvmmap" >&6; }
7993 ac_res=$ac_cv_search_kinfo_getvmmap
7994 if test "$ac_res" != no; then :
7995 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
7996
7997 $as_echo "#define HAVE_KINFO_GETVMMAP 1" >>confdefs.h
7998
7999 fi
8000
8001
8002
8003 if test "X$prefix" = "XNONE"; then
8004 acl_final_prefix="$ac_default_prefix"
8005 else
8006 acl_final_prefix="$prefix"
8007 fi
8008 if test "X$exec_prefix" = "XNONE"; then
8009 acl_final_exec_prefix='${prefix}'
8010 else
8011 acl_final_exec_prefix="$exec_prefix"
8012 fi
8013 acl_save_prefix="$prefix"
8014 prefix="$acl_final_prefix"
8015 eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
8016 prefix="$acl_save_prefix"
8017
8018
8019 # Check whether --with-gnu-ld was given.
8020 if test "${with_gnu_ld+set}" = set; then :
8021 withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes
8022 else
8023 with_gnu_ld=no
8024 fi
8025
8026 # Prepare PATH_SEPARATOR.
8027 # The user is always right.
8028 if test "${PATH_SEPARATOR+set}" != set; then
8029 echo "#! /bin/sh" >conf$$.sh
8030 echo "exit 0" >>conf$$.sh
8031 chmod +x conf$$.sh
8032 if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
8033 PATH_SEPARATOR=';'
8034 else
8035 PATH_SEPARATOR=:
8036 fi
8037 rm -f conf$$.sh
8038 fi
8039 ac_prog=ld
8040 if test "$GCC" = yes; then
8041 # Check if gcc -print-prog-name=ld gives a path.
8042 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by GCC" >&5
8043 $as_echo_n "checking for ld used by GCC... " >&6; }
8044 case $host in
8045 *-*-mingw*)
8046 # gcc leaves a trailing carriage return which upsets mingw
8047 ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
8048 *)
8049 ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
8050 esac
8051 case $ac_prog in
8052 # Accept absolute paths.
8053 [\\/]* | [A-Za-z]:[\\/]*)
8054 re_direlt='/[^/][^/]*/\.\./'
8055 # Canonicalize the path of ld
8056 ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
8057 while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
8058 ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
8059 done
8060 test -z "$LD" && LD="$ac_prog"
8061 ;;
8062 "")
8063 # If it fails, then pretend we aren't using GCC.
8064 ac_prog=ld
8065 ;;
8066 *)
8067 # If it is relative, then search for the first ld in PATH.
8068 with_gnu_ld=unknown
8069 ;;
8070 esac
8071 elif test "$with_gnu_ld" = yes; then
8072 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5
8073 $as_echo_n "checking for GNU ld... " >&6; }
8074 else
8075 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5
8076 $as_echo_n "checking for non-GNU ld... " >&6; }
8077 fi
8078 if ${acl_cv_path_LD+:} false; then :
8079 $as_echo_n "(cached) " >&6
8080 else
8081 if test -z "$LD"; then
8082 IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
8083 for ac_dir in $PATH; do
8084 test -z "$ac_dir" && ac_dir=.
8085 if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
8086 acl_cv_path_LD="$ac_dir/$ac_prog"
8087 # Check to see if the program is GNU ld. I'd rather use --version,
8088 # but apparently some GNU ld's only accept -v.
8089 # Break only if it was the GNU/non-GNU ld that we prefer.
8090 if "$acl_cv_path_LD" -v 2>&1 < /dev/null | egrep '(GNU|with BFD)' > /dev/null; then
8091 test "$with_gnu_ld" != no && break
8092 else
8093 test "$with_gnu_ld" != yes && break
8094 fi
8095 fi
8096 done
8097 IFS="$ac_save_ifs"
8098 else
8099 acl_cv_path_LD="$LD" # Let the user override the test with a path.
8100 fi
8101 fi
8102
8103 LD="$acl_cv_path_LD"
8104 if test -n "$LD"; then
8105 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
8106 $as_echo "$LD" >&6; }
8107 else
8108 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8109 $as_echo "no" >&6; }
8110 fi
8111 test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5
8112 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5
8113 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; }
8114 if ${acl_cv_prog_gnu_ld+:} false; then :
8115 $as_echo_n "(cached) " >&6
8116 else
8117 # I'd rather use --version here, but apparently some GNU ld's only accept -v.
8118 if $LD -v 2>&1 </dev/null | egrep '(GNU|with BFD)' 1>&5; then
8119 acl_cv_prog_gnu_ld=yes
8120 else
8121 acl_cv_prog_gnu_ld=no
8122 fi
8123 fi
8124 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_prog_gnu_ld" >&5
8125 $as_echo "$acl_cv_prog_gnu_ld" >&6; }
8126 with_gnu_ld=$acl_cv_prog_gnu_ld
8127
8128
8129
8130 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shared library run path origin" >&5
8131 $as_echo_n "checking for shared library run path origin... " >&6; }
8132 if ${acl_cv_rpath+:} false; then :
8133 $as_echo_n "(cached) " >&6
8134 else
8135
8136 CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
8137 ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
8138 . ./conftest.sh
8139 rm -f ./conftest.sh
8140 acl_cv_rpath=done
8141
8142 fi
8143 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acl_cv_rpath" >&5
8144 $as_echo "$acl_cv_rpath" >&6; }
8145 wl="$acl_cv_wl"
8146 libext="$acl_cv_libext"
8147 shlibext="$acl_cv_shlibext"
8148 hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
8149 hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
8150 hardcode_direct="$acl_cv_hardcode_direct"
8151 hardcode_minus_L="$acl_cv_hardcode_minus_L"
8152 # Check whether --enable-rpath was given.
8153 if test "${enable_rpath+set}" = set; then :
8154 enableval=$enable_rpath; :
8155 else
8156 enable_rpath=yes
8157 fi
8158
8159
8160
8161
8162
8163
8164
8165
8166 use_additional=yes
8167
8168 acl_save_prefix="$prefix"
8169 prefix="$acl_final_prefix"
8170 acl_save_exec_prefix="$exec_prefix"
8171 exec_prefix="$acl_final_exec_prefix"
8172
8173 eval additional_includedir=\"$includedir\"
8174 eval additional_libdir=\"$libdir\"
8175
8176 exec_prefix="$acl_save_exec_prefix"
8177 prefix="$acl_save_prefix"
8178
8179
8180 # Check whether --with-libiconv-prefix was given.
8181 if test "${with_libiconv_prefix+set}" = set; then :
8182 withval=$with_libiconv_prefix;
8183 if test "X$withval" = "Xno"; then
8184 use_additional=no
8185 else
8186 if test "X$withval" = "X"; then
8187
8188 acl_save_prefix="$prefix"
8189 prefix="$acl_final_prefix"
8190 acl_save_exec_prefix="$exec_prefix"
8191 exec_prefix="$acl_final_exec_prefix"
8192
8193 eval additional_includedir=\"$includedir\"
8194 eval additional_libdir=\"$libdir\"
8195
8196 exec_prefix="$acl_save_exec_prefix"
8197 prefix="$acl_save_prefix"
8198
8199 else
8200 additional_includedir="$withval/include"
8201 additional_libdir="$withval/lib"
8202 fi
8203 fi
8204
8205 fi
8206
8207 LIBICONV=
8208 LTLIBICONV=
8209 INCICONV=
8210 rpathdirs=
8211 ltrpathdirs=
8212 names_already_handled=
8213 names_next_round='iconv '
8214 while test -n "$names_next_round"; do
8215 names_this_round="$names_next_round"
8216 names_next_round=
8217 for name in $names_this_round; do
8218 already_handled=
8219 for n in $names_already_handled; do
8220 if test "$n" = "$name"; then
8221 already_handled=yes
8222 break
8223 fi
8224 done
8225 if test -z "$already_handled"; then
8226 names_already_handled="$names_already_handled $name"
8227 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
8228 eval value=\"\$HAVE_LIB$uppername\"
8229 if test -n "$value"; then
8230 if test "$value" = yes; then
8231 eval value=\"\$LIB$uppername\"
8232 test -z "$value" || LIBICONV="${LIBICONV}${LIBICONV:+ }$value"
8233 eval value=\"\$LTLIB$uppername\"
8234 test -z "$value" || LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$value"
8235 else
8236 :
8237 fi
8238 else
8239 found_dir=
8240 found_la=
8241 found_so=
8242 found_a=
8243 if test $use_additional = yes; then
8244 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
8245 found_dir="$additional_libdir"
8246 found_so="$additional_libdir/lib$name.$shlibext"
8247 if test -f "$additional_libdir/lib$name.la"; then
8248 found_la="$additional_libdir/lib$name.la"
8249 fi
8250 else
8251 if test -f "$additional_libdir/lib$name.$libext"; then
8252 found_dir="$additional_libdir"
8253 found_a="$additional_libdir/lib$name.$libext"
8254 if test -f "$additional_libdir/lib$name.la"; then
8255 found_la="$additional_libdir/lib$name.la"
8256 fi
8257 fi
8258 fi
8259 fi
8260 if test "X$found_dir" = "X"; then
8261 for x in $LDFLAGS $LTLIBICONV; do
8262
8263 acl_save_prefix="$prefix"
8264 prefix="$acl_final_prefix"
8265 acl_save_exec_prefix="$exec_prefix"
8266 exec_prefix="$acl_final_exec_prefix"
8267 eval x=\"$x\"
8268 exec_prefix="$acl_save_exec_prefix"
8269 prefix="$acl_save_prefix"
8270
8271 case "$x" in
8272 -L*)
8273 dir=`echo "X$x" | sed -e 's/^X-L//'`
8274 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
8275 found_dir="$dir"
8276 found_so="$dir/lib$name.$shlibext"
8277 if test -f "$dir/lib$name.la"; then
8278 found_la="$dir/lib$name.la"
8279 fi
8280 else
8281 if test -f "$dir/lib$name.$libext"; then
8282 found_dir="$dir"
8283 found_a="$dir/lib$name.$libext"
8284 if test -f "$dir/lib$name.la"; then
8285 found_la="$dir/lib$name.la"
8286 fi
8287 fi
8288 fi
8289 ;;
8290 esac
8291 if test "X$found_dir" != "X"; then
8292 break
8293 fi
8294 done
8295 fi
8296 if test "X$found_dir" != "X"; then
8297 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$found_dir -l$name"
8298 if test "X$found_so" != "X"; then
8299 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
8300 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8301 else
8302 haveit=
8303 for x in $ltrpathdirs; do
8304 if test "X$x" = "X$found_dir"; then
8305 haveit=yes
8306 break
8307 fi
8308 done
8309 if test -z "$haveit"; then
8310 ltrpathdirs="$ltrpathdirs $found_dir"
8311 fi
8312 if test "$hardcode_direct" = yes; then
8313 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8314 else
8315 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
8316 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8317 haveit=
8318 for x in $rpathdirs; do
8319 if test "X$x" = "X$found_dir"; then
8320 haveit=yes
8321 break
8322 fi
8323 done
8324 if test -z "$haveit"; then
8325 rpathdirs="$rpathdirs $found_dir"
8326 fi
8327 else
8328 haveit=
8329 for x in $LDFLAGS $LIBICONV; do
8330
8331 acl_save_prefix="$prefix"
8332 prefix="$acl_final_prefix"
8333 acl_save_exec_prefix="$exec_prefix"
8334 exec_prefix="$acl_final_exec_prefix"
8335 eval x=\"$x\"
8336 exec_prefix="$acl_save_exec_prefix"
8337 prefix="$acl_save_prefix"
8338
8339 if test "X$x" = "X-L$found_dir"; then
8340 haveit=yes
8341 break
8342 fi
8343 done
8344 if test -z "$haveit"; then
8345 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir"
8346 fi
8347 if test "$hardcode_minus_L" != no; then
8348 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_so"
8349 else
8350 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8351 fi
8352 fi
8353 fi
8354 fi
8355 else
8356 if test "X$found_a" != "X"; then
8357 LIBICONV="${LIBICONV}${LIBICONV:+ }$found_a"
8358 else
8359 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$found_dir -l$name"
8360 fi
8361 fi
8362 additional_includedir=
8363 case "$found_dir" in
8364 */lib | */lib/)
8365 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
8366 additional_includedir="$basedir/include"
8367 ;;
8368 esac
8369 if test "X$additional_includedir" != "X"; then
8370 if test "X$additional_includedir" != "X/usr/include"; then
8371 haveit=
8372 if test "X$additional_includedir" = "X/usr/local/include"; then
8373 if test -n "$GCC"; then
8374 case $host_os in
8375 linux*) haveit=yes;;
8376 esac
8377 fi
8378 fi
8379 if test -z "$haveit"; then
8380 for x in $CPPFLAGS $INCICONV; do
8381
8382 acl_save_prefix="$prefix"
8383 prefix="$acl_final_prefix"
8384 acl_save_exec_prefix="$exec_prefix"
8385 exec_prefix="$acl_final_exec_prefix"
8386 eval x=\"$x\"
8387 exec_prefix="$acl_save_exec_prefix"
8388 prefix="$acl_save_prefix"
8389
8390 if test "X$x" = "X-I$additional_includedir"; then
8391 haveit=yes
8392 break
8393 fi
8394 done
8395 if test -z "$haveit"; then
8396 if test -d "$additional_includedir"; then
8397 INCICONV="${INCICONV}${INCICONV:+ }-I$additional_includedir"
8398 fi
8399 fi
8400 fi
8401 fi
8402 fi
8403 if test -n "$found_la"; then
8404 save_libdir="$libdir"
8405 case "$found_la" in
8406 */* | *\\*) . "$found_la" ;;
8407 *) . "./$found_la" ;;
8408 esac
8409 libdir="$save_libdir"
8410 for dep in $dependency_libs; do
8411 case "$dep" in
8412 -L*)
8413 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
8414 if test "X$additional_libdir" != "X/usr/lib"; then
8415 haveit=
8416 if test "X$additional_libdir" = "X/usr/local/lib"; then
8417 if test -n "$GCC"; then
8418 case $host_os in
8419 linux*) haveit=yes;;
8420 esac
8421 fi
8422 fi
8423 if test -z "$haveit"; then
8424 haveit=
8425 for x in $LDFLAGS $LIBICONV; do
8426
8427 acl_save_prefix="$prefix"
8428 prefix="$acl_final_prefix"
8429 acl_save_exec_prefix="$exec_prefix"
8430 exec_prefix="$acl_final_exec_prefix"
8431 eval x=\"$x\"
8432 exec_prefix="$acl_save_exec_prefix"
8433 prefix="$acl_save_prefix"
8434
8435 if test "X$x" = "X-L$additional_libdir"; then
8436 haveit=yes
8437 break
8438 fi
8439 done
8440 if test -z "$haveit"; then
8441 if test -d "$additional_libdir"; then
8442 LIBICONV="${LIBICONV}${LIBICONV:+ }-L$additional_libdir"
8443 fi
8444 fi
8445 haveit=
8446 for x in $LDFLAGS $LTLIBICONV; do
8447
8448 acl_save_prefix="$prefix"
8449 prefix="$acl_final_prefix"
8450 acl_save_exec_prefix="$exec_prefix"
8451 exec_prefix="$acl_final_exec_prefix"
8452 eval x=\"$x\"
8453 exec_prefix="$acl_save_exec_prefix"
8454 prefix="$acl_save_prefix"
8455
8456 if test "X$x" = "X-L$additional_libdir"; then
8457 haveit=yes
8458 break
8459 fi
8460 done
8461 if test -z "$haveit"; then
8462 if test -d "$additional_libdir"; then
8463 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-L$additional_libdir"
8464 fi
8465 fi
8466 fi
8467 fi
8468 ;;
8469 -R*)
8470 dir=`echo "X$dep" | sed -e 's/^X-R//'`
8471 if test "$enable_rpath" != no; then
8472 haveit=
8473 for x in $rpathdirs; do
8474 if test "X$x" = "X$dir"; then
8475 haveit=yes
8476 break
8477 fi
8478 done
8479 if test -z "$haveit"; then
8480 rpathdirs="$rpathdirs $dir"
8481 fi
8482 haveit=
8483 for x in $ltrpathdirs; do
8484 if test "X$x" = "X$dir"; then
8485 haveit=yes
8486 break
8487 fi
8488 done
8489 if test -z "$haveit"; then
8490 ltrpathdirs="$ltrpathdirs $dir"
8491 fi
8492 fi
8493 ;;
8494 -l*)
8495 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
8496 ;;
8497 *.la)
8498 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
8499 ;;
8500 *)
8501 LIBICONV="${LIBICONV}${LIBICONV:+ }$dep"
8502 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }$dep"
8503 ;;
8504 esac
8505 done
8506 fi
8507 else
8508 LIBICONV="${LIBICONV}${LIBICONV:+ }-l$name"
8509 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-l$name"
8510 fi
8511 fi
8512 fi
8513 done
8514 done
8515 if test "X$rpathdirs" != "X"; then
8516 if test -n "$hardcode_libdir_separator"; then
8517 alldirs=
8518 for found_dir in $rpathdirs; do
8519 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
8520 done
8521 acl_save_libdir="$libdir"
8522 libdir="$alldirs"
8523 eval flag=\"$hardcode_libdir_flag_spec\"
8524 libdir="$acl_save_libdir"
8525 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8526 else
8527 for found_dir in $rpathdirs; do
8528 acl_save_libdir="$libdir"
8529 libdir="$found_dir"
8530 eval flag=\"$hardcode_libdir_flag_spec\"
8531 libdir="$acl_save_libdir"
8532 LIBICONV="${LIBICONV}${LIBICONV:+ }$flag"
8533 done
8534 fi
8535 fi
8536 if test "X$ltrpathdirs" != "X"; then
8537 for found_dir in $ltrpathdirs; do
8538 LTLIBICONV="${LTLIBICONV}${LTLIBICONV:+ }-R$found_dir"
8539 done
8540 fi
8541
8542
8543
8544
8545
8546
8547
8548 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv" >&5
8549 $as_echo_n "checking for iconv... " >&6; }
8550 if ${am_cv_func_iconv+:} false; then :
8551 $as_echo_n "(cached) " >&6
8552 else
8553
8554 am_cv_func_iconv="no, consider installing GNU libiconv"
8555 am_cv_lib_iconv=no
8556 am_save_CPPFLAGS="$CPPFLAGS"
8557 CPPFLAGS="$CPPFLAGS $INCICONV"
8558 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8559 /* end confdefs.h. */
8560 #include <stdlib.h>
8561 #include <iconv.h>
8562 int
8563 main ()
8564 {
8565 iconv_t cd = iconv_open("","");
8566 iconv(cd,NULL,NULL,NULL,NULL);
8567 iconv_close(cd);
8568 ;
8569 return 0;
8570 }
8571 _ACEOF
8572 if ac_fn_c_try_link "$LINENO"; then :
8573 am_cv_func_iconv=yes
8574 fi
8575 rm -f core conftest.err conftest.$ac_objext \
8576 conftest$ac_exeext conftest.$ac_ext
8577 CPPFLAGS="$am_save_CPPFLAGS"
8578
8579 if test "$am_cv_func_iconv" != yes && test -d ../libiconv; then
8580 for _libs in .libs _libs; do
8581 am_save_CPPFLAGS="$CPPFLAGS"
8582 am_save_LIBS="$LIBS"
8583 CPPFLAGS="$CPPFLAGS -I../libiconv/include"
8584 LIBS="$LIBS ../libiconv/lib/$_libs/libiconv.a"
8585 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8586 /* end confdefs.h. */
8587 #include <stdlib.h>
8588 #include <iconv.h>
8589 int
8590 main ()
8591 {
8592 iconv_t cd = iconv_open("","");
8593 iconv(cd,NULL,NULL,NULL,NULL);
8594 iconv_close(cd);
8595 ;
8596 return 0;
8597 }
8598 _ACEOF
8599 if ac_fn_c_try_link "$LINENO"; then :
8600 INCICONV="-I../libiconv/include"
8601 LIBICONV='${top_builddir}'/../libiconv/lib/$_libs/libiconv.a
8602 LTLIBICONV='${top_builddir}'/../libiconv/lib/libiconv.la
8603 am_cv_lib_iconv=yes
8604 am_cv_func_iconv=yes
8605 fi
8606 rm -f core conftest.err conftest.$ac_objext \
8607 conftest$ac_exeext conftest.$ac_ext
8608 CPPFLAGS="$am_save_CPPFLAGS"
8609 LIBS="$am_save_LIBS"
8610 if test "$am_cv_func_iconv" = "yes"; then
8611 break
8612 fi
8613 done
8614 fi
8615
8616 if test "$am_cv_func_iconv" != yes; then
8617 am_save_CPPFLAGS="$CPPFLAGS"
8618 am_save_LIBS="$LIBS"
8619 CPPFLAGS="$CPPFLAGS $INCICONV"
8620 LIBS="$LIBS $LIBICONV"
8621 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8622 /* end confdefs.h. */
8623 #include <stdlib.h>
8624 #include <iconv.h>
8625 int
8626 main ()
8627 {
8628 iconv_t cd = iconv_open("","");
8629 iconv(cd,NULL,NULL,NULL,NULL);
8630 iconv_close(cd);
8631 ;
8632 return 0;
8633 }
8634 _ACEOF
8635 if ac_fn_c_try_link "$LINENO"; then :
8636 am_cv_lib_iconv=yes
8637 am_cv_func_iconv=yes
8638 fi
8639 rm -f core conftest.err conftest.$ac_objext \
8640 conftest$ac_exeext conftest.$ac_ext
8641 CPPFLAGS="$am_save_CPPFLAGS"
8642 LIBS="$am_save_LIBS"
8643 fi
8644
8645 fi
8646 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_func_iconv" >&5
8647 $as_echo "$am_cv_func_iconv" >&6; }
8648 if test "$am_cv_func_iconv" = yes; then
8649
8650 $as_echo "#define HAVE_ICONV 1" >>confdefs.h
8651
8652 fi
8653 if test "$am_cv_lib_iconv" = yes; then
8654
8655 for element in $INCICONV; do
8656 haveit=
8657 for x in $CPPFLAGS; do
8658
8659 acl_save_prefix="$prefix"
8660 prefix="$acl_final_prefix"
8661 acl_save_exec_prefix="$exec_prefix"
8662 exec_prefix="$acl_final_exec_prefix"
8663 eval x=\"$x\"
8664 exec_prefix="$acl_save_exec_prefix"
8665 prefix="$acl_save_prefix"
8666
8667 if test "X$x" = "X$element"; then
8668 haveit=yes
8669 break
8670 fi
8671 done
8672 if test -z "$haveit"; then
8673 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
8674 fi
8675 done
8676
8677 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libiconv" >&5
8678 $as_echo_n "checking how to link with libiconv... " >&6; }
8679 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBICONV" >&5
8680 $as_echo "$LIBICONV" >&6; }
8681 else
8682 LIBICONV=
8683 LTLIBICONV=
8684 fi
8685
8686
8687
8688 if test "$am_cv_func_iconv" = yes; then
8689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for iconv declaration" >&5
8690 $as_echo_n "checking for iconv declaration... " >&6; }
8691 if ${am_cv_proto_iconv+:} false; then :
8692 $as_echo_n "(cached) " >&6
8693 else
8694
8695 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8696 /* end confdefs.h. */
8697
8698 #include <stdlib.h>
8699 #include <iconv.h>
8700 extern
8701 #ifdef __cplusplus
8702 "C"
8703 #endif
8704 #if defined(__STDC__) || defined(__cplusplus)
8705 size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
8706 #else
8707 size_t iconv();
8708 #endif
8709
8710 int
8711 main ()
8712 {
8713
8714 ;
8715 return 0;
8716 }
8717 _ACEOF
8718 if ac_fn_c_try_compile "$LINENO"; then :
8719 am_cv_proto_iconv_arg1=""
8720 else
8721 am_cv_proto_iconv_arg1="const"
8722 fi
8723 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8724 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);"
8725 fi
8726
8727 am_cv_proto_iconv=`echo "$am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
8728 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_t:-
8729 }$am_cv_proto_iconv" >&5
8730 $as_echo "${ac_t:-
8731 }$am_cv_proto_iconv" >&6; }
8732
8733 cat >>confdefs.h <<_ACEOF
8734 #define ICONV_CONST $am_cv_proto_iconv_arg1
8735 _ACEOF
8736
8737 fi
8738
8739
8740 # GDB may fork/exec the iconv program to get the list of supported character
8741 # sets. Allow the user to specify where to find it.
8742 # There are several factors affecting the choice of option name:
8743 # - There is already --with-libiconv-prefix but we can't use it, it specifies
8744 # the build-time location of libiconv files.
8745 # - The program we need to find is iconv, which comes with glibc. The user
8746 # doesn't necessarily have libiconv installed. Therefore naming this
8747 # --with-libiconv-foo feels wrong.
8748 # - We want the path to be relocatable, but GDB_AC_DEFINE_RELOCATABLE is
8749 # defined to work on directories not files (though it really doesn't know
8750 # the difference).
8751 # - Calling this --with-iconv-prefix is perceived to cause too much confusion
8752 # with --with-libiconv-prefix.
8753 # Putting these together is why the option name is --with-iconv-bin.
8754
8755
8756 # Check whether --with-iconv-bin was given.
8757 if test "${with_iconv_bin+set}" = set; then :
8758 withval=$with_iconv_bin; iconv_bin="${withval}"
8759
8760 cat >>confdefs.h <<_ACEOF
8761 #define ICONV_BIN "${iconv_bin}"
8762 _ACEOF
8763
8764
8765 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
8766 if test "x$prefix" = xNONE; then
8767 test_prefix=/usr/local
8768 else
8769 test_prefix=$prefix
8770 fi
8771 else
8772 test_prefix=$exec_prefix
8773 fi
8774 value=0
8775 case ${iconv_bin} in
8776 "${test_prefix}"|"${test_prefix}/"*|\
8777 '${exec_prefix}'|'${exec_prefix}/'*)
8778 value=1
8779 ;;
8780 esac
8781
8782 cat >>confdefs.h <<_ACEOF
8783 #define ICONV_BIN_RELOCATABLE $value
8784 _ACEOF
8785
8786
8787
8788 fi
8789
8790
8791 # For the TUI, we need enhanced curses functionality.
8792 if test x"$enable_tui" != xno; then
8793 prefer_curses=yes
8794 fi
8795
8796 curses_found=no
8797 if test x"$prefer_curses" = xyes; then
8798 # FIXME: kettenis/20040905: We prefer ncurses over the vendor-supplied
8799 # curses library because the latter might not provide all the
8800 # functionality we need. However, this leads to problems on systems
8801 # where the linker searches /usr/local/lib, but the compiler doesn't
8802 # search /usr/local/include, if ncurses is installed in /usr/local. A
8803 # default installation of ncurses on alpha*-dec-osf* will lead to such
8804 # a situation.
8805 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing waddstr" >&5
8806 $as_echo_n "checking for library containing waddstr... " >&6; }
8807 if ${ac_cv_search_waddstr+:} false; then :
8808 $as_echo_n "(cached) " >&6
8809 else
8810 ac_func_search_save_LIBS=$LIBS
8811 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8812 /* end confdefs.h. */
8813
8814 /* Override any GCC internal prototype to avoid an error.
8815 Use char because int might match the return type of a GCC
8816 builtin and then its argument prototype would still apply. */
8817 #ifdef __cplusplus
8818 extern "C"
8819 #endif
8820 char waddstr ();
8821 int
8822 main ()
8823 {
8824 return waddstr ();
8825 ;
8826 return 0;
8827 }
8828 _ACEOF
8829 for ac_lib in '' ncursesw ncurses cursesX curses; do
8830 if test -z "$ac_lib"; then
8831 ac_res="none required"
8832 else
8833 ac_res=-l$ac_lib
8834 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8835 fi
8836 if ac_fn_c_try_link "$LINENO"; then :
8837 ac_cv_search_waddstr=$ac_res
8838 fi
8839 rm -f core conftest.err conftest.$ac_objext \
8840 conftest$ac_exeext
8841 if ${ac_cv_search_waddstr+:} false; then :
8842 break
8843 fi
8844 done
8845 if ${ac_cv_search_waddstr+:} false; then :
8846
8847 else
8848 ac_cv_search_waddstr=no
8849 fi
8850 rm conftest.$ac_ext
8851 LIBS=$ac_func_search_save_LIBS
8852 fi
8853 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_waddstr" >&5
8854 $as_echo "$ac_cv_search_waddstr" >&6; }
8855 ac_res=$ac_cv_search_waddstr
8856 if test "$ac_res" != no; then :
8857 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8858
8859 fi
8860
8861
8862 if test "$ac_cv_search_waddstr" != no; then
8863 curses_found=yes
8864 fi
8865 fi
8866
8867 # Check whether we should enable the TUI, but only do so if we really
8868 # can.
8869 if test x"$enable_tui" != xno; then
8870 if test -d "$srcdir/tui"; then
8871 if test "$curses_found" != no; then
8872 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_TUI_OBS)"
8873 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_TUI_DEPS)"
8874 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_TUI_SRCS)"
8875 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_TUI_CFLAGS)"
8876 else
8877 if test x"$enable_tui" = xyes; then
8878 as_fn_error $? "no enhanced curses library found; disable TUI" "$LINENO" 5
8879 else
8880 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no enhanced curses library found; disabling TUI" >&5
8881 $as_echo "$as_me: WARNING: no enhanced curses library found; disabling TUI" >&2;}
8882 fi
8883 fi
8884 fi
8885 fi
8886
8887 # Since GDB uses Readline, we need termcap functionality. In many
8888 # cases this will be provided by the curses library, but some systems
8889 # have a separate termcap library, or no curses library at all.
8890
8891 case $host_os in
8892 cygwin*)
8893 if test -d "$srcdir/libtermcap"; then
8894 LIBS="../libtermcap/libtermcap.a $LIBS"
8895 ac_cv_search_tgetent="../libtermcap/libtermcap.a"
8896 fi ;;
8897 go32* | *djgpp*)
8898 ac_cv_search_tgetent="none required"
8899 ;;
8900 esac
8901
8902 # These are the libraries checked by Readline.
8903 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing tgetent" >&5
8904 $as_echo_n "checking for library containing tgetent... " >&6; }
8905 if ${ac_cv_search_tgetent+:} false; then :
8906 $as_echo_n "(cached) " >&6
8907 else
8908 ac_func_search_save_LIBS=$LIBS
8909 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8910 /* end confdefs.h. */
8911
8912 /* Override any GCC internal prototype to avoid an error.
8913 Use char because int might match the return type of a GCC
8914 builtin and then its argument prototype would still apply. */
8915 #ifdef __cplusplus
8916 extern "C"
8917 #endif
8918 char tgetent ();
8919 int
8920 main ()
8921 {
8922 return tgetent ();
8923 ;
8924 return 0;
8925 }
8926 _ACEOF
8927 for ac_lib in '' termcap tinfow tinfo curses ncursesw ncurses; do
8928 if test -z "$ac_lib"; then
8929 ac_res="none required"
8930 else
8931 ac_res=-l$ac_lib
8932 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
8933 fi
8934 if ac_fn_c_try_link "$LINENO"; then :
8935 ac_cv_search_tgetent=$ac_res
8936 fi
8937 rm -f core conftest.err conftest.$ac_objext \
8938 conftest$ac_exeext
8939 if ${ac_cv_search_tgetent+:} false; then :
8940 break
8941 fi
8942 done
8943 if ${ac_cv_search_tgetent+:} false; then :
8944
8945 else
8946 ac_cv_search_tgetent=no
8947 fi
8948 rm conftest.$ac_ext
8949 LIBS=$ac_func_search_save_LIBS
8950 fi
8951 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_tgetent" >&5
8952 $as_echo "$ac_cv_search_tgetent" >&6; }
8953 ac_res=$ac_cv_search_tgetent
8954 if test "$ac_res" != no; then :
8955 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
8956
8957 fi
8958
8959
8960 if test "$ac_cv_search_tgetent" = no; then
8961 CONFIG_OBS="$CONFIG_OBS stub-termcap.o"
8962 fi
8963
8964
8965 # Check whether --with-system-readline was given.
8966 if test "${with_system_readline+set}" = set; then :
8967 withval=$with_system_readline;
8968 fi
8969
8970
8971 if test "$with_system_readline" = yes; then
8972 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether system readline is new enough" >&5
8973 $as_echo_n "checking whether system readline is new enough... " >&6; }
8974 if ${gdb_cv_readline_ok+:} false; then :
8975 $as_echo_n "(cached) " >&6
8976 else
8977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
8978 /* end confdefs.h. */
8979 #include <stdio.h>
8980 #include <readline/readline.h>
8981 int
8982 main ()
8983 {
8984 #if RL_VERSION_MAJOR < 7
8985 # error "readline version 7 required"
8986 #endif
8987 ;
8988 return 0;
8989 }
8990 _ACEOF
8991 if ac_fn_c_try_compile "$LINENO"; then :
8992 gdb_cv_readline_ok=yes
8993 else
8994 gdb_cv_readline_ok=no
8995 fi
8996 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
8997 fi
8998 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_readline_ok" >&5
8999 $as_echo "$gdb_cv_readline_ok" >&6; }
9000 if test "$gdb_cv_readline_ok" != yes; then
9001 as_fn_error $? "system readline is not new enough" "$LINENO" 5
9002 fi
9003
9004 READLINE=-lreadline
9005 READLINE_DEPS=
9006 READLINE_CFLAGS=
9007 READLINE_TEXI_INCFLAG=
9008 else
9009 READLINE='$(READLINE_DIR)/libreadline.a'
9010 READLINE_DEPS='$(READLINE)'
9011 READLINE_CFLAGS='-I$(READLINE_SRC)/..'
9012 READLINE_TEXI_INCFLAG='-I $(READLINE_DIR)'
9013 fi
9014
9015
9016
9017
9018
9019 # Generate jit-reader.h
9020
9021 # This is typedeffed to GDB_CORE_ADDR in jit-reader.h
9022 TARGET_PTR=
9023
9024 # The cast to long int works around a bug in the HP C Compiler
9025 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9026 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9027 # This bug is HP SR number 8606223364.
9028 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long long" >&5
9029 $as_echo_n "checking size of unsigned long long... " >&6; }
9030 if ${ac_cv_sizeof_unsigned_long_long+:} false; then :
9031 $as_echo_n "(cached) " >&6
9032 else
9033 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long long))" "ac_cv_sizeof_unsigned_long_long" "$ac_includes_default"; then :
9034
9035 else
9036 if test "$ac_cv_type_unsigned_long_long" = yes; then
9037 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9038 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9039 as_fn_error 77 "cannot compute sizeof (unsigned long long)
9040 See \`config.log' for more details" "$LINENO" 5; }
9041 else
9042 ac_cv_sizeof_unsigned_long_long=0
9043 fi
9044 fi
9045
9046 fi
9047 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long_long" >&5
9048 $as_echo "$ac_cv_sizeof_unsigned_long_long" >&6; }
9049
9050
9051
9052 cat >>confdefs.h <<_ACEOF
9053 #define SIZEOF_UNSIGNED_LONG_LONG $ac_cv_sizeof_unsigned_long_long
9054 _ACEOF
9055
9056
9057 # The cast to long int works around a bug in the HP C Compiler
9058 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9059 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9060 # This bug is HP SR number 8606223364.
9061 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned long" >&5
9062 $as_echo_n "checking size of unsigned long... " >&6; }
9063 if ${ac_cv_sizeof_unsigned_long+:} false; then :
9064 $as_echo_n "(cached) " >&6
9065 else
9066 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned long))" "ac_cv_sizeof_unsigned_long" "$ac_includes_default"; then :
9067
9068 else
9069 if test "$ac_cv_type_unsigned_long" = yes; then
9070 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9071 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9072 as_fn_error 77 "cannot compute sizeof (unsigned long)
9073 See \`config.log' for more details" "$LINENO" 5; }
9074 else
9075 ac_cv_sizeof_unsigned_long=0
9076 fi
9077 fi
9078
9079 fi
9080 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned_long" >&5
9081 $as_echo "$ac_cv_sizeof_unsigned_long" >&6; }
9082
9083
9084
9085 cat >>confdefs.h <<_ACEOF
9086 #define SIZEOF_UNSIGNED_LONG $ac_cv_sizeof_unsigned_long
9087 _ACEOF
9088
9089
9090 # The cast to long int works around a bug in the HP C Compiler
9091 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
9092 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
9093 # This bug is HP SR number 8606223364.
9094 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of unsigned __int128" >&5
9095 $as_echo_n "checking size of unsigned __int128... " >&6; }
9096 if ${ac_cv_sizeof_unsigned___int128+:} false; then :
9097 $as_echo_n "(cached) " >&6
9098 else
9099 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (unsigned __int128))" "ac_cv_sizeof_unsigned___int128" "$ac_includes_default"; then :
9100
9101 else
9102 if test "$ac_cv_type_unsigned___int128" = yes; then
9103 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
9104 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
9105 as_fn_error 77 "cannot compute sizeof (unsigned __int128)
9106 See \`config.log' for more details" "$LINENO" 5; }
9107 else
9108 ac_cv_sizeof_unsigned___int128=0
9109 fi
9110 fi
9111
9112 fi
9113 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_unsigned___int128" >&5
9114 $as_echo "$ac_cv_sizeof_unsigned___int128" >&6; }
9115
9116
9117
9118 cat >>confdefs.h <<_ACEOF
9119 #define SIZEOF_UNSIGNED___INT128 $ac_cv_sizeof_unsigned___int128
9120 _ACEOF
9121
9122
9123
9124 if test "x${ac_cv_sizeof_unsigned_long}" = "x8"; then
9125 TARGET_PTR="unsigned long"
9126 elif test "x${ac_cv_sizeof_unsigned_long_long}" = "x8"; then
9127 TARGET_PTR="unsigned long long"
9128 elif test "x${ac_cv_sizeof_unsigned___int128}" = "x16"; then
9129 TARGET_PTR="unsigned __int128"
9130 else
9131 TARGET_PTR="unsigned long"
9132 fi
9133
9134
9135 ac_config_files="$ac_config_files jit-reader.h:jit-reader.in"
9136
9137
9138 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
9139 $as_echo_n "checking for library containing dlopen... " >&6; }
9140 if ${ac_cv_search_dlopen+:} false; then :
9141 $as_echo_n "(cached) " >&6
9142 else
9143 ac_func_search_save_LIBS=$LIBS
9144 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9145 /* end confdefs.h. */
9146
9147 /* Override any GCC internal prototype to avoid an error.
9148 Use char because int might match the return type of a GCC
9149 builtin and then its argument prototype would still apply. */
9150 #ifdef __cplusplus
9151 extern "C"
9152 #endif
9153 char dlopen ();
9154 int
9155 main ()
9156 {
9157 return dlopen ();
9158 ;
9159 return 0;
9160 }
9161 _ACEOF
9162 for ac_lib in '' dl; do
9163 if test -z "$ac_lib"; then
9164 ac_res="none required"
9165 else
9166 ac_res=-l$ac_lib
9167 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
9168 fi
9169 if ac_fn_c_try_link "$LINENO"; then :
9170 ac_cv_search_dlopen=$ac_res
9171 fi
9172 rm -f core conftest.err conftest.$ac_objext \
9173 conftest$ac_exeext
9174 if ${ac_cv_search_dlopen+:} false; then :
9175 break
9176 fi
9177 done
9178 if ${ac_cv_search_dlopen+:} false; then :
9179
9180 else
9181 ac_cv_search_dlopen=no
9182 fi
9183 rm conftest.$ac_ext
9184 LIBS=$ac_func_search_save_LIBS
9185 fi
9186 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
9187 $as_echo "$ac_cv_search_dlopen" >&6; }
9188 ac_res=$ac_cv_search_dlopen
9189 if test "$ac_res" != no; then :
9190 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
9191
9192 fi
9193
9194
9195
9196
9197 # Check whether --with-jit-reader-dir was given.
9198 if test "${with_jit_reader_dir+set}" = set; then :
9199 withval=$with_jit_reader_dir;
9200 JIT_READER_DIR=$withval
9201 else
9202 JIT_READER_DIR=${libdir}/gdb
9203 fi
9204
9205
9206 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
9207 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
9208 ac_define_dir=`eval echo $JIT_READER_DIR`
9209 ac_define_dir=`eval echo $ac_define_dir`
9210
9211 cat >>confdefs.h <<_ACEOF
9212 #define JIT_READER_DIR "$ac_define_dir"
9213 _ACEOF
9214
9215
9216
9217
9218 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
9219 if test "x$prefix" = xNONE; then
9220 test_prefix=/usr/local
9221 else
9222 test_prefix=$prefix
9223 fi
9224 else
9225 test_prefix=$exec_prefix
9226 fi
9227 value=0
9228 case ${ac_define_dir} in
9229 "${test_prefix}"|"${test_prefix}/"*|\
9230 '${exec_prefix}'|'${exec_prefix}/'*)
9231 value=1
9232 ;;
9233 esac
9234
9235 cat >>confdefs.h <<_ACEOF
9236 #define JIT_READER_DIR_RELOCATABLE $value
9237 _ACEOF
9238
9239
9240
9241
9242
9243 # Check whether --with-expat was given.
9244 if test "${with_expat+set}" = set; then :
9245 withval=$with_expat;
9246 else
9247 with_expat=auto
9248 fi
9249
9250 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use expat" >&5
9251 $as_echo_n "checking whether to use expat... " >&6; }
9252 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_expat" >&5
9253 $as_echo "$with_expat" >&6; }
9254
9255 if test "${with_expat}" = no; then
9256 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat support disabled; some features may be unavailable." >&5
9257 $as_echo "$as_me: WARNING: expat support disabled; some features may be unavailable." >&2;}
9258 HAVE_LIBEXPAT=no
9259 else
9260
9261
9262
9263
9264
9265
9266
9267
9268 use_additional=yes
9269
9270 acl_save_prefix="$prefix"
9271 prefix="$acl_final_prefix"
9272 acl_save_exec_prefix="$exec_prefix"
9273 exec_prefix="$acl_final_exec_prefix"
9274
9275 eval additional_includedir=\"$includedir\"
9276 eval additional_libdir=\"$libdir\"
9277
9278 exec_prefix="$acl_save_exec_prefix"
9279 prefix="$acl_save_prefix"
9280
9281
9282 # Check whether --with-libexpat-prefix was given.
9283 if test "${with_libexpat_prefix+set}" = set; then :
9284 withval=$with_libexpat_prefix;
9285 if test "X$withval" = "Xno"; then
9286 use_additional=no
9287 else
9288 if test "X$withval" = "X"; then
9289
9290 acl_save_prefix="$prefix"
9291 prefix="$acl_final_prefix"
9292 acl_save_exec_prefix="$exec_prefix"
9293 exec_prefix="$acl_final_exec_prefix"
9294
9295 eval additional_includedir=\"$includedir\"
9296 eval additional_libdir=\"$libdir\"
9297
9298 exec_prefix="$acl_save_exec_prefix"
9299 prefix="$acl_save_prefix"
9300
9301 else
9302 additional_includedir="$withval/include"
9303 additional_libdir="$withval/lib"
9304 fi
9305 fi
9306
9307 fi
9308
9309 LIBEXPAT=
9310 LTLIBEXPAT=
9311 INCEXPAT=
9312 rpathdirs=
9313 ltrpathdirs=
9314 names_already_handled=
9315 names_next_round='expat '
9316 while test -n "$names_next_round"; do
9317 names_this_round="$names_next_round"
9318 names_next_round=
9319 for name in $names_this_round; do
9320 already_handled=
9321 for n in $names_already_handled; do
9322 if test "$n" = "$name"; then
9323 already_handled=yes
9324 break
9325 fi
9326 done
9327 if test -z "$already_handled"; then
9328 names_already_handled="$names_already_handled $name"
9329 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9330 eval value=\"\$HAVE_LIB$uppername\"
9331 if test -n "$value"; then
9332 if test "$value" = yes; then
9333 eval value=\"\$LIB$uppername\"
9334 test -z "$value" || LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$value"
9335 eval value=\"\$LTLIB$uppername\"
9336 test -z "$value" || LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$value"
9337 else
9338 :
9339 fi
9340 else
9341 found_dir=
9342 found_la=
9343 found_so=
9344 found_a=
9345 if test $use_additional = yes; then
9346 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9347 found_dir="$additional_libdir"
9348 found_so="$additional_libdir/lib$name.$shlibext"
9349 if test -f "$additional_libdir/lib$name.la"; then
9350 found_la="$additional_libdir/lib$name.la"
9351 fi
9352 else
9353 if test -f "$additional_libdir/lib$name.$libext"; then
9354 found_dir="$additional_libdir"
9355 found_a="$additional_libdir/lib$name.$libext"
9356 if test -f "$additional_libdir/lib$name.la"; then
9357 found_la="$additional_libdir/lib$name.la"
9358 fi
9359 fi
9360 fi
9361 fi
9362 if test "X$found_dir" = "X"; then
9363 for x in $LDFLAGS $LTLIBEXPAT; do
9364
9365 acl_save_prefix="$prefix"
9366 prefix="$acl_final_prefix"
9367 acl_save_exec_prefix="$exec_prefix"
9368 exec_prefix="$acl_final_exec_prefix"
9369 eval x=\"$x\"
9370 exec_prefix="$acl_save_exec_prefix"
9371 prefix="$acl_save_prefix"
9372
9373 case "$x" in
9374 -L*)
9375 dir=`echo "X$x" | sed -e 's/^X-L//'`
9376 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9377 found_dir="$dir"
9378 found_so="$dir/lib$name.$shlibext"
9379 if test -f "$dir/lib$name.la"; then
9380 found_la="$dir/lib$name.la"
9381 fi
9382 else
9383 if test -f "$dir/lib$name.$libext"; then
9384 found_dir="$dir"
9385 found_a="$dir/lib$name.$libext"
9386 if test -f "$dir/lib$name.la"; then
9387 found_la="$dir/lib$name.la"
9388 fi
9389 fi
9390 fi
9391 ;;
9392 esac
9393 if test "X$found_dir" != "X"; then
9394 break
9395 fi
9396 done
9397 fi
9398 if test "X$found_dir" != "X"; then
9399 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$found_dir -l$name"
9400 if test "X$found_so" != "X"; then
9401 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9402 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9403 else
9404 haveit=
9405 for x in $ltrpathdirs; do
9406 if test "X$x" = "X$found_dir"; then
9407 haveit=yes
9408 break
9409 fi
9410 done
9411 if test -z "$haveit"; then
9412 ltrpathdirs="$ltrpathdirs $found_dir"
9413 fi
9414 if test "$hardcode_direct" = yes; then
9415 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9416 else
9417 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9418 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9419 haveit=
9420 for x in $rpathdirs; do
9421 if test "X$x" = "X$found_dir"; then
9422 haveit=yes
9423 break
9424 fi
9425 done
9426 if test -z "$haveit"; then
9427 rpathdirs="$rpathdirs $found_dir"
9428 fi
9429 else
9430 haveit=
9431 for x in $LDFLAGS $LIBEXPAT; do
9432
9433 acl_save_prefix="$prefix"
9434 prefix="$acl_final_prefix"
9435 acl_save_exec_prefix="$exec_prefix"
9436 exec_prefix="$acl_final_exec_prefix"
9437 eval x=\"$x\"
9438 exec_prefix="$acl_save_exec_prefix"
9439 prefix="$acl_save_prefix"
9440
9441 if test "X$x" = "X-L$found_dir"; then
9442 haveit=yes
9443 break
9444 fi
9445 done
9446 if test -z "$haveit"; then
9447 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir"
9448 fi
9449 if test "$hardcode_minus_L" != no; then
9450 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_so"
9451 else
9452 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9453 fi
9454 fi
9455 fi
9456 fi
9457 else
9458 if test "X$found_a" != "X"; then
9459 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$found_a"
9460 else
9461 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$found_dir -l$name"
9462 fi
9463 fi
9464 additional_includedir=
9465 case "$found_dir" in
9466 */lib | */lib/)
9467 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9468 additional_includedir="$basedir/include"
9469 ;;
9470 esac
9471 if test "X$additional_includedir" != "X"; then
9472 if test "X$additional_includedir" != "X/usr/include"; then
9473 haveit=
9474 if test "X$additional_includedir" = "X/usr/local/include"; then
9475 if test -n "$GCC"; then
9476 case $host_os in
9477 linux*) haveit=yes;;
9478 esac
9479 fi
9480 fi
9481 if test -z "$haveit"; then
9482 for x in $CPPFLAGS $INCEXPAT; do
9483
9484 acl_save_prefix="$prefix"
9485 prefix="$acl_final_prefix"
9486 acl_save_exec_prefix="$exec_prefix"
9487 exec_prefix="$acl_final_exec_prefix"
9488 eval x=\"$x\"
9489 exec_prefix="$acl_save_exec_prefix"
9490 prefix="$acl_save_prefix"
9491
9492 if test "X$x" = "X-I$additional_includedir"; then
9493 haveit=yes
9494 break
9495 fi
9496 done
9497 if test -z "$haveit"; then
9498 if test -d "$additional_includedir"; then
9499 INCEXPAT="${INCEXPAT}${INCEXPAT:+ }-I$additional_includedir"
9500 fi
9501 fi
9502 fi
9503 fi
9504 fi
9505 if test -n "$found_la"; then
9506 save_libdir="$libdir"
9507 case "$found_la" in
9508 */* | *\\*) . "$found_la" ;;
9509 *) . "./$found_la" ;;
9510 esac
9511 libdir="$save_libdir"
9512 for dep in $dependency_libs; do
9513 case "$dep" in
9514 -L*)
9515 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
9516 if test "X$additional_libdir" != "X/usr/lib"; then
9517 haveit=
9518 if test "X$additional_libdir" = "X/usr/local/lib"; then
9519 if test -n "$GCC"; then
9520 case $host_os in
9521 linux*) haveit=yes;;
9522 esac
9523 fi
9524 fi
9525 if test -z "$haveit"; then
9526 haveit=
9527 for x in $LDFLAGS $LIBEXPAT; do
9528
9529 acl_save_prefix="$prefix"
9530 prefix="$acl_final_prefix"
9531 acl_save_exec_prefix="$exec_prefix"
9532 exec_prefix="$acl_final_exec_prefix"
9533 eval x=\"$x\"
9534 exec_prefix="$acl_save_exec_prefix"
9535 prefix="$acl_save_prefix"
9536
9537 if test "X$x" = "X-L$additional_libdir"; then
9538 haveit=yes
9539 break
9540 fi
9541 done
9542 if test -z "$haveit"; then
9543 if test -d "$additional_libdir"; then
9544 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-L$additional_libdir"
9545 fi
9546 fi
9547 haveit=
9548 for x in $LDFLAGS $LTLIBEXPAT; do
9549
9550 acl_save_prefix="$prefix"
9551 prefix="$acl_final_prefix"
9552 acl_save_exec_prefix="$exec_prefix"
9553 exec_prefix="$acl_final_exec_prefix"
9554 eval x=\"$x\"
9555 exec_prefix="$acl_save_exec_prefix"
9556 prefix="$acl_save_prefix"
9557
9558 if test "X$x" = "X-L$additional_libdir"; then
9559 haveit=yes
9560 break
9561 fi
9562 done
9563 if test -z "$haveit"; then
9564 if test -d "$additional_libdir"; then
9565 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-L$additional_libdir"
9566 fi
9567 fi
9568 fi
9569 fi
9570 ;;
9571 -R*)
9572 dir=`echo "X$dep" | sed -e 's/^X-R//'`
9573 if test "$enable_rpath" != no; then
9574 haveit=
9575 for x in $rpathdirs; do
9576 if test "X$x" = "X$dir"; then
9577 haveit=yes
9578 break
9579 fi
9580 done
9581 if test -z "$haveit"; then
9582 rpathdirs="$rpathdirs $dir"
9583 fi
9584 haveit=
9585 for x in $ltrpathdirs; do
9586 if test "X$x" = "X$dir"; then
9587 haveit=yes
9588 break
9589 fi
9590 done
9591 if test -z "$haveit"; then
9592 ltrpathdirs="$ltrpathdirs $dir"
9593 fi
9594 fi
9595 ;;
9596 -l*)
9597 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
9598 ;;
9599 *.la)
9600 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
9601 ;;
9602 *)
9603 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$dep"
9604 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }$dep"
9605 ;;
9606 esac
9607 done
9608 fi
9609 else
9610 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }-l$name"
9611 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-l$name"
9612 fi
9613 fi
9614 fi
9615 done
9616 done
9617 if test "X$rpathdirs" != "X"; then
9618 if test -n "$hardcode_libdir_separator"; then
9619 alldirs=
9620 for found_dir in $rpathdirs; do
9621 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
9622 done
9623 acl_save_libdir="$libdir"
9624 libdir="$alldirs"
9625 eval flag=\"$hardcode_libdir_flag_spec\"
9626 libdir="$acl_save_libdir"
9627 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9628 else
9629 for found_dir in $rpathdirs; do
9630 acl_save_libdir="$libdir"
9631 libdir="$found_dir"
9632 eval flag=\"$hardcode_libdir_flag_spec\"
9633 libdir="$acl_save_libdir"
9634 LIBEXPAT="${LIBEXPAT}${LIBEXPAT:+ }$flag"
9635 done
9636 fi
9637 fi
9638 if test "X$ltrpathdirs" != "X"; then
9639 for found_dir in $ltrpathdirs; do
9640 LTLIBEXPAT="${LTLIBEXPAT}${LTLIBEXPAT:+ }-R$found_dir"
9641 done
9642 fi
9643
9644
9645 ac_save_CPPFLAGS="$CPPFLAGS"
9646
9647 for element in $INCEXPAT; do
9648 haveit=
9649 for x in $CPPFLAGS; do
9650
9651 acl_save_prefix="$prefix"
9652 prefix="$acl_final_prefix"
9653 acl_save_exec_prefix="$exec_prefix"
9654 exec_prefix="$acl_final_exec_prefix"
9655 eval x=\"$x\"
9656 exec_prefix="$acl_save_exec_prefix"
9657 prefix="$acl_save_prefix"
9658
9659 if test "X$x" = "X$element"; then
9660 haveit=yes
9661 break
9662 fi
9663 done
9664 if test -z "$haveit"; then
9665 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
9666 fi
9667 done
9668
9669
9670 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libexpat" >&5
9671 $as_echo_n "checking for libexpat... " >&6; }
9672 if ${ac_cv_libexpat+:} false; then :
9673 $as_echo_n "(cached) " >&6
9674 else
9675
9676 ac_save_LIBS="$LIBS"
9677 LIBS="$LIBS $LIBEXPAT"
9678 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
9679 /* end confdefs.h. */
9680 #include "expat.h"
9681 int
9682 main ()
9683 {
9684 XML_Parser p = XML_ParserCreate (0);
9685 ;
9686 return 0;
9687 }
9688 _ACEOF
9689 if ac_fn_c_try_link "$LINENO"; then :
9690 ac_cv_libexpat=yes
9691 else
9692 ac_cv_libexpat=no
9693 fi
9694 rm -f core conftest.err conftest.$ac_objext \
9695 conftest$ac_exeext conftest.$ac_ext
9696 LIBS="$ac_save_LIBS"
9697
9698 fi
9699 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libexpat" >&5
9700 $as_echo "$ac_cv_libexpat" >&6; }
9701 if test "$ac_cv_libexpat" = yes; then
9702 HAVE_LIBEXPAT=yes
9703
9704 $as_echo "#define HAVE_LIBEXPAT 1" >>confdefs.h
9705
9706 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libexpat" >&5
9707 $as_echo_n "checking how to link with libexpat... " >&6; }
9708 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBEXPAT" >&5
9709 $as_echo "$LIBEXPAT" >&6; }
9710 else
9711 HAVE_LIBEXPAT=no
9712 CPPFLAGS="$ac_save_CPPFLAGS"
9713 LIBEXPAT=
9714 LTLIBEXPAT=
9715 fi
9716
9717
9718
9719
9720
9721
9722 if test "$HAVE_LIBEXPAT" != yes; then
9723 if test "$with_expat" = yes; then
9724 as_fn_error $? "expat is missing or unusable" "$LINENO" 5
9725 else
9726 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: expat is missing or unusable; some features may be unavailable." >&5
9727 $as_echo "$as_me: WARNING: expat is missing or unusable; some features may be unavailable." >&2;}
9728 fi
9729 else
9730 save_LIBS=$LIBS
9731 LIBS="$LIBS $LIBEXPAT"
9732 for ac_func in XML_StopParser
9733 do :
9734 ac_fn_c_check_func "$LINENO" "XML_StopParser" "ac_cv_func_XML_StopParser"
9735 if test "x$ac_cv_func_XML_StopParser" = xyes; then :
9736 cat >>confdefs.h <<_ACEOF
9737 #define HAVE_XML_STOPPARSER 1
9738 _ACEOF
9739
9740 fi
9741 done
9742
9743 LIBS=$save_LIBS
9744 fi
9745 fi
9746
9747
9748 # Check whether --with-mpfr was given.
9749 if test "${with_mpfr+set}" = set; then :
9750 withval=$with_mpfr;
9751 else
9752 with_mpfr=auto
9753 fi
9754
9755 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use MPFR" >&5
9756 $as_echo_n "checking whether to use MPFR... " >&6; }
9757 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_mpfr" >&5
9758 $as_echo "$with_mpfr" >&6; }
9759
9760 if test "${with_mpfr}" = no; then
9761 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR support disabled; some features may be unavailable." >&5
9762 $as_echo "$as_me: WARNING: MPFR support disabled; some features may be unavailable." >&2;}
9763 HAVE_LIBMPFR=no
9764 else
9765
9766
9767
9768
9769
9770
9771
9772
9773 use_additional=yes
9774
9775 acl_save_prefix="$prefix"
9776 prefix="$acl_final_prefix"
9777 acl_save_exec_prefix="$exec_prefix"
9778 exec_prefix="$acl_final_exec_prefix"
9779
9780 eval additional_includedir=\"$includedir\"
9781 eval additional_libdir=\"$libdir\"
9782
9783 exec_prefix="$acl_save_exec_prefix"
9784 prefix="$acl_save_prefix"
9785
9786
9787 # Check whether --with-libmpfr-prefix was given.
9788 if test "${with_libmpfr_prefix+set}" = set; then :
9789 withval=$with_libmpfr_prefix;
9790 if test "X$withval" = "Xno"; then
9791 use_additional=no
9792 else
9793 if test "X$withval" = "X"; then
9794
9795 acl_save_prefix="$prefix"
9796 prefix="$acl_final_prefix"
9797 acl_save_exec_prefix="$exec_prefix"
9798 exec_prefix="$acl_final_exec_prefix"
9799
9800 eval additional_includedir=\"$includedir\"
9801 eval additional_libdir=\"$libdir\"
9802
9803 exec_prefix="$acl_save_exec_prefix"
9804 prefix="$acl_save_prefix"
9805
9806 else
9807 additional_includedir="$withval/include"
9808 additional_libdir="$withval/lib"
9809 fi
9810 fi
9811
9812 fi
9813
9814 LIBMPFR=
9815 LTLIBMPFR=
9816 INCMPFR=
9817 rpathdirs=
9818 ltrpathdirs=
9819 names_already_handled=
9820 names_next_round='mpfr gmp'
9821 while test -n "$names_next_round"; do
9822 names_this_round="$names_next_round"
9823 names_next_round=
9824 for name in $names_this_round; do
9825 already_handled=
9826 for n in $names_already_handled; do
9827 if test "$n" = "$name"; then
9828 already_handled=yes
9829 break
9830 fi
9831 done
9832 if test -z "$already_handled"; then
9833 names_already_handled="$names_already_handled $name"
9834 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
9835 eval value=\"\$HAVE_LIB$uppername\"
9836 if test -n "$value"; then
9837 if test "$value" = yes; then
9838 eval value=\"\$LIB$uppername\"
9839 test -z "$value" || LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$value"
9840 eval value=\"\$LTLIB$uppername\"
9841 test -z "$value" || LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$value"
9842 else
9843 :
9844 fi
9845 else
9846 found_dir=
9847 found_la=
9848 found_so=
9849 found_a=
9850 if test $use_additional = yes; then
9851 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
9852 found_dir="$additional_libdir"
9853 found_so="$additional_libdir/lib$name.$shlibext"
9854 if test -f "$additional_libdir/lib$name.la"; then
9855 found_la="$additional_libdir/lib$name.la"
9856 fi
9857 else
9858 if test -f "$additional_libdir/lib$name.$libext"; then
9859 found_dir="$additional_libdir"
9860 found_a="$additional_libdir/lib$name.$libext"
9861 if test -f "$additional_libdir/lib$name.la"; then
9862 found_la="$additional_libdir/lib$name.la"
9863 fi
9864 fi
9865 fi
9866 fi
9867 if test "X$found_dir" = "X"; then
9868 for x in $LDFLAGS $LTLIBMPFR; do
9869
9870 acl_save_prefix="$prefix"
9871 prefix="$acl_final_prefix"
9872 acl_save_exec_prefix="$exec_prefix"
9873 exec_prefix="$acl_final_exec_prefix"
9874 eval x=\"$x\"
9875 exec_prefix="$acl_save_exec_prefix"
9876 prefix="$acl_save_prefix"
9877
9878 case "$x" in
9879 -L*)
9880 dir=`echo "X$x" | sed -e 's/^X-L//'`
9881 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
9882 found_dir="$dir"
9883 found_so="$dir/lib$name.$shlibext"
9884 if test -f "$dir/lib$name.la"; then
9885 found_la="$dir/lib$name.la"
9886 fi
9887 else
9888 if test -f "$dir/lib$name.$libext"; then
9889 found_dir="$dir"
9890 found_a="$dir/lib$name.$libext"
9891 if test -f "$dir/lib$name.la"; then
9892 found_la="$dir/lib$name.la"
9893 fi
9894 fi
9895 fi
9896 ;;
9897 esac
9898 if test "X$found_dir" != "X"; then
9899 break
9900 fi
9901 done
9902 fi
9903 if test "X$found_dir" != "X"; then
9904 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$found_dir -l$name"
9905 if test "X$found_so" != "X"; then
9906 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
9907 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9908 else
9909 haveit=
9910 for x in $ltrpathdirs; do
9911 if test "X$x" = "X$found_dir"; then
9912 haveit=yes
9913 break
9914 fi
9915 done
9916 if test -z "$haveit"; then
9917 ltrpathdirs="$ltrpathdirs $found_dir"
9918 fi
9919 if test "$hardcode_direct" = yes; then
9920 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9921 else
9922 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
9923 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9924 haveit=
9925 for x in $rpathdirs; do
9926 if test "X$x" = "X$found_dir"; then
9927 haveit=yes
9928 break
9929 fi
9930 done
9931 if test -z "$haveit"; then
9932 rpathdirs="$rpathdirs $found_dir"
9933 fi
9934 else
9935 haveit=
9936 for x in $LDFLAGS $LIBMPFR; do
9937
9938 acl_save_prefix="$prefix"
9939 prefix="$acl_final_prefix"
9940 acl_save_exec_prefix="$exec_prefix"
9941 exec_prefix="$acl_final_exec_prefix"
9942 eval x=\"$x\"
9943 exec_prefix="$acl_save_exec_prefix"
9944 prefix="$acl_save_prefix"
9945
9946 if test "X$x" = "X-L$found_dir"; then
9947 haveit=yes
9948 break
9949 fi
9950 done
9951 if test -z "$haveit"; then
9952 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir"
9953 fi
9954 if test "$hardcode_minus_L" != no; then
9955 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_so"
9956 else
9957 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
9958 fi
9959 fi
9960 fi
9961 fi
9962 else
9963 if test "X$found_a" != "X"; then
9964 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$found_a"
9965 else
9966 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$found_dir -l$name"
9967 fi
9968 fi
9969 additional_includedir=
9970 case "$found_dir" in
9971 */lib | */lib/)
9972 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
9973 additional_includedir="$basedir/include"
9974 ;;
9975 esac
9976 if test "X$additional_includedir" != "X"; then
9977 if test "X$additional_includedir" != "X/usr/include"; then
9978 haveit=
9979 if test "X$additional_includedir" = "X/usr/local/include"; then
9980 if test -n "$GCC"; then
9981 case $host_os in
9982 linux*) haveit=yes;;
9983 esac
9984 fi
9985 fi
9986 if test -z "$haveit"; then
9987 for x in $CPPFLAGS $INCMPFR; do
9988
9989 acl_save_prefix="$prefix"
9990 prefix="$acl_final_prefix"
9991 acl_save_exec_prefix="$exec_prefix"
9992 exec_prefix="$acl_final_exec_prefix"
9993 eval x=\"$x\"
9994 exec_prefix="$acl_save_exec_prefix"
9995 prefix="$acl_save_prefix"
9996
9997 if test "X$x" = "X-I$additional_includedir"; then
9998 haveit=yes
9999 break
10000 fi
10001 done
10002 if test -z "$haveit"; then
10003 if test -d "$additional_includedir"; then
10004 INCMPFR="${INCMPFR}${INCMPFR:+ }-I$additional_includedir"
10005 fi
10006 fi
10007 fi
10008 fi
10009 fi
10010 if test -n "$found_la"; then
10011 save_libdir="$libdir"
10012 case "$found_la" in
10013 */* | *\\*) . "$found_la" ;;
10014 *) . "./$found_la" ;;
10015 esac
10016 libdir="$save_libdir"
10017 for dep in $dependency_libs; do
10018 case "$dep" in
10019 -L*)
10020 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
10021 if test "X$additional_libdir" != "X/usr/lib"; then
10022 haveit=
10023 if test "X$additional_libdir" = "X/usr/local/lib"; then
10024 if test -n "$GCC"; then
10025 case $host_os in
10026 linux*) haveit=yes;;
10027 esac
10028 fi
10029 fi
10030 if test -z "$haveit"; then
10031 haveit=
10032 for x in $LDFLAGS $LIBMPFR; do
10033
10034 acl_save_prefix="$prefix"
10035 prefix="$acl_final_prefix"
10036 acl_save_exec_prefix="$exec_prefix"
10037 exec_prefix="$acl_final_exec_prefix"
10038 eval x=\"$x\"
10039 exec_prefix="$acl_save_exec_prefix"
10040 prefix="$acl_save_prefix"
10041
10042 if test "X$x" = "X-L$additional_libdir"; then
10043 haveit=yes
10044 break
10045 fi
10046 done
10047 if test -z "$haveit"; then
10048 if test -d "$additional_libdir"; then
10049 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-L$additional_libdir"
10050 fi
10051 fi
10052 haveit=
10053 for x in $LDFLAGS $LTLIBMPFR; do
10054
10055 acl_save_prefix="$prefix"
10056 prefix="$acl_final_prefix"
10057 acl_save_exec_prefix="$exec_prefix"
10058 exec_prefix="$acl_final_exec_prefix"
10059 eval x=\"$x\"
10060 exec_prefix="$acl_save_exec_prefix"
10061 prefix="$acl_save_prefix"
10062
10063 if test "X$x" = "X-L$additional_libdir"; then
10064 haveit=yes
10065 break
10066 fi
10067 done
10068 if test -z "$haveit"; then
10069 if test -d "$additional_libdir"; then
10070 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-L$additional_libdir"
10071 fi
10072 fi
10073 fi
10074 fi
10075 ;;
10076 -R*)
10077 dir=`echo "X$dep" | sed -e 's/^X-R//'`
10078 if test "$enable_rpath" != no; then
10079 haveit=
10080 for x in $rpathdirs; do
10081 if test "X$x" = "X$dir"; then
10082 haveit=yes
10083 break
10084 fi
10085 done
10086 if test -z "$haveit"; then
10087 rpathdirs="$rpathdirs $dir"
10088 fi
10089 haveit=
10090 for x in $ltrpathdirs; do
10091 if test "X$x" = "X$dir"; then
10092 haveit=yes
10093 break
10094 fi
10095 done
10096 if test -z "$haveit"; then
10097 ltrpathdirs="$ltrpathdirs $dir"
10098 fi
10099 fi
10100 ;;
10101 -l*)
10102 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
10103 ;;
10104 *.la)
10105 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
10106 ;;
10107 *)
10108 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$dep"
10109 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }$dep"
10110 ;;
10111 esac
10112 done
10113 fi
10114 else
10115 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }-l$name"
10116 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-l$name"
10117 fi
10118 fi
10119 fi
10120 done
10121 done
10122 if test "X$rpathdirs" != "X"; then
10123 if test -n "$hardcode_libdir_separator"; then
10124 alldirs=
10125 for found_dir in $rpathdirs; do
10126 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
10127 done
10128 acl_save_libdir="$libdir"
10129 libdir="$alldirs"
10130 eval flag=\"$hardcode_libdir_flag_spec\"
10131 libdir="$acl_save_libdir"
10132 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10133 else
10134 for found_dir in $rpathdirs; do
10135 acl_save_libdir="$libdir"
10136 libdir="$found_dir"
10137 eval flag=\"$hardcode_libdir_flag_spec\"
10138 libdir="$acl_save_libdir"
10139 LIBMPFR="${LIBMPFR}${LIBMPFR:+ }$flag"
10140 done
10141 fi
10142 fi
10143 if test "X$ltrpathdirs" != "X"; then
10144 for found_dir in $ltrpathdirs; do
10145 LTLIBMPFR="${LTLIBMPFR}${LTLIBMPFR:+ }-R$found_dir"
10146 done
10147 fi
10148
10149
10150 ac_save_CPPFLAGS="$CPPFLAGS"
10151
10152 for element in $INCMPFR; do
10153 haveit=
10154 for x in $CPPFLAGS; do
10155
10156 acl_save_prefix="$prefix"
10157 prefix="$acl_final_prefix"
10158 acl_save_exec_prefix="$exec_prefix"
10159 exec_prefix="$acl_final_exec_prefix"
10160 eval x=\"$x\"
10161 exec_prefix="$acl_save_exec_prefix"
10162 prefix="$acl_save_prefix"
10163
10164 if test "X$x" = "X$element"; then
10165 haveit=yes
10166 break
10167 fi
10168 done
10169 if test -z "$haveit"; then
10170 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
10171 fi
10172 done
10173
10174
10175 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmpfr" >&5
10176 $as_echo_n "checking for libmpfr... " >&6; }
10177 if ${ac_cv_libmpfr+:} false; then :
10178 $as_echo_n "(cached) " >&6
10179 else
10180
10181 ac_save_LIBS="$LIBS"
10182 LIBS="$LIBS $LIBMPFR"
10183 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10184 /* end confdefs.h. */
10185 #include <mpfr.h>
10186 int
10187 main ()
10188 {
10189 mpfr_exp_t exp; mpfr_t x;
10190 mpfr_frexp (&exp, x, x, MPFR_RNDN);
10191 ;
10192 return 0;
10193 }
10194 _ACEOF
10195 if ac_fn_c_try_link "$LINENO"; then :
10196 ac_cv_libmpfr=yes
10197 else
10198 ac_cv_libmpfr=no
10199 fi
10200 rm -f core conftest.err conftest.$ac_objext \
10201 conftest$ac_exeext conftest.$ac_ext
10202 LIBS="$ac_save_LIBS"
10203
10204 fi
10205 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libmpfr" >&5
10206 $as_echo "$ac_cv_libmpfr" >&6; }
10207 if test "$ac_cv_libmpfr" = yes; then
10208 HAVE_LIBMPFR=yes
10209
10210 $as_echo "#define HAVE_LIBMPFR 1" >>confdefs.h
10211
10212 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libmpfr" >&5
10213 $as_echo_n "checking how to link with libmpfr... " >&6; }
10214 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBMPFR" >&5
10215 $as_echo "$LIBMPFR" >&6; }
10216 else
10217 HAVE_LIBMPFR=no
10218 CPPFLAGS="$ac_save_CPPFLAGS"
10219 LIBMPFR=
10220 LTLIBMPFR=
10221 fi
10222
10223
10224
10225
10226
10227
10228 if test "$HAVE_LIBMPFR" != yes; then
10229 if test "$with_mpfr" = yes; then
10230 as_fn_error $? "MPFR is missing or unusable" "$LINENO" 5
10231 else
10232 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: MPFR is missing or unusable; some features may be unavailable." >&5
10233 $as_echo "$as_me: WARNING: MPFR is missing or unusable; some features may be unavailable." >&2;}
10234 fi
10235 fi
10236 fi
10237
10238 # --------------------- #
10239 # Check for libpython. #
10240 # --------------------- #
10241
10242
10243
10244
10245
10246
10247 # Check whether --with-python was given.
10248 if test "${with_python+set}" = set; then :
10249 withval=$with_python;
10250 else
10251 with_python=auto
10252 fi
10253
10254 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use python" >&5
10255 $as_echo_n "checking whether to use python... " >&6; }
10256 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_python" >&5
10257 $as_echo "$with_python" >&6; }
10258
10259 if test "${with_python}" = no; then
10260 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python support disabled; some features may be unavailable." >&5
10261 $as_echo "$as_me: WARNING: python support disabled; some features may be unavailable." >&2;}
10262 have_libpython=no
10263 else
10264 case "${with_python}" in
10265 [\\/]* | ?:[\\/]*)
10266 if test -d "${with_python}"; then
10267 # Assume the python binary is ${with_python}/bin/python.
10268 python_prog="${with_python}/bin/python"
10269 python_prefix=
10270 # If python does not exit ${with_python}/bin, then try in
10271 # ${with_python}. On Windows/MinGW, this is where the Python
10272 # executable is.
10273 if test ! -x "${python_prog}"; then
10274 python_prog="${with_python}/python"
10275 python_prefix=
10276 fi
10277 if test ! -x "${python_prog}"; then
10278 # Fall back to gdb 7.0/7.1 behaviour.
10279 python_prog=missing
10280 python_prefix=${with_python}
10281 fi
10282 elif test -x "${with_python}"; then
10283 # While we can't run python compiled for $host (unless host == build),
10284 # the user could write a script that provides the needed information,
10285 # so we support that.
10286 python_prog=${with_python}
10287 python_prefix=
10288 else
10289 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10290 fi
10291 ;;
10292 */*)
10293 # Disallow --with-python=foo/bar.
10294 as_fn_error $? "invalid value for --with-python" "$LINENO" 5
10295 ;;
10296 *)
10297 # The user has either specified auto, yes, or the name of the python
10298 # program assumed to be in $PATH.
10299 python_prefix=
10300 case "${with_python}" in
10301 yes | auto)
10302 if test "${build}" = "${host}"; then
10303 # Extract the first word of "python", so it can be a program name with args.
10304 set dummy python; ac_word=$2
10305 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10306 $as_echo_n "checking for $ac_word... " >&6; }
10307 if ${ac_cv_path_python_prog_path+:} false; then :
10308 $as_echo_n "(cached) " >&6
10309 else
10310 case $python_prog_path in
10311 [\\/]* | ?:[\\/]*)
10312 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10313 ;;
10314 *)
10315 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10316 for as_dir in $PATH
10317 do
10318 IFS=$as_save_IFS
10319 test -z "$as_dir" && as_dir=.
10320 for ac_exec_ext in '' $ac_executable_extensions; do
10321 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10322 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10323 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10324 break 2
10325 fi
10326 done
10327 done
10328 IFS=$as_save_IFS
10329
10330 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10331 ;;
10332 esac
10333 fi
10334 python_prog_path=$ac_cv_path_python_prog_path
10335 if test -n "$python_prog_path"; then
10336 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10337 $as_echo "$python_prog_path" >&6; }
10338 else
10339 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10340 $as_echo "no" >&6; }
10341 fi
10342
10343
10344 if test "${python_prog_path}" = missing; then
10345 python_prog=missing
10346 else
10347 python_prog=${python_prog_path}
10348 fi
10349 else
10350 # Not much we can do except assume the cross-compiler will find the
10351 # right files.
10352 python_prog=missing
10353 fi
10354 ;;
10355 *)
10356 # While we can't run python compiled for $host (unless host == build),
10357 # the user could write a script that provides the needed information,
10358 # so we support that.
10359 python_prog="${with_python}"
10360 # Extract the first word of "${python_prog}", so it can be a program name with args.
10361 set dummy ${python_prog}; ac_word=$2
10362 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10363 $as_echo_n "checking for $ac_word... " >&6; }
10364 if ${ac_cv_path_python_prog_path+:} false; then :
10365 $as_echo_n "(cached) " >&6
10366 else
10367 case $python_prog_path in
10368 [\\/]* | ?:[\\/]*)
10369 ac_cv_path_python_prog_path="$python_prog_path" # Let the user override the test with a path.
10370 ;;
10371 *)
10372 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10373 for as_dir in $PATH
10374 do
10375 IFS=$as_save_IFS
10376 test -z "$as_dir" && as_dir=.
10377 for ac_exec_ext in '' $ac_executable_extensions; do
10378 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10379 ac_cv_path_python_prog_path="$as_dir/$ac_word$ac_exec_ext"
10380 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10381 break 2
10382 fi
10383 done
10384 done
10385 IFS=$as_save_IFS
10386
10387 test -z "$ac_cv_path_python_prog_path" && ac_cv_path_python_prog_path="missing"
10388 ;;
10389 esac
10390 fi
10391 python_prog_path=$ac_cv_path_python_prog_path
10392 if test -n "$python_prog_path"; then
10393 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $python_prog_path" >&5
10394 $as_echo "$python_prog_path" >&6; }
10395 else
10396 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10397 $as_echo "no" >&6; }
10398 fi
10399
10400
10401 if test "${python_prog_path}" = missing; then
10402 as_fn_error $? "unable to find python program ${python_prog}" "$LINENO" 5
10403 fi
10404 ;;
10405 esac
10406 esac
10407
10408 if test "${python_prog}" != missing; then
10409 # We have a python program to use, but it may be too old.
10410 # Don't flag an error for --with-python=auto (the default).
10411 have_python_config=yes
10412 python_includes=`${python_prog} ${srcdir}/python/python-config.py --includes`
10413 if test $? != 0; then
10414 have_python_config=failed
10415 if test "${with_python}" != auto; then
10416 as_fn_error $? "failure running python-config --includes" "$LINENO" 5
10417 fi
10418 fi
10419 python_libs=`${python_prog} ${srcdir}/python/python-config.py --ldflags`
10420 if test $? != 0; then
10421 have_python_config=failed
10422 if test "${with_python}" != auto; then
10423 as_fn_error $? "failure running python-config --ldflags" "$LINENO" 5
10424 fi
10425 fi
10426 python_prefix=`${python_prog} ${srcdir}/python/python-config.py --exec-prefix`
10427 if test $? != 0; then
10428 have_python_config=failed
10429 if test "${with_python}" != auto; then
10430 as_fn_error $? "failure running python-config --exec-prefix" "$LINENO" 5
10431 fi
10432 fi
10433 else
10434 # We do not have a python executable we can use to determine where
10435 # to find the Python headers and libs. We cannot guess the include
10436 # path from the python_prefix either, because that include path
10437 # depends on the Python version. So, there is nothing much we can
10438 # do except assume that the compiler will be able to find those files.
10439 python_includes=
10440 python_libs=
10441 have_python_config=no
10442 fi
10443
10444 # If we have python-config, only try the configuration it provides.
10445 # Otherwise fallback on the old way of trying different versions of
10446 # python in turn.
10447
10448 have_libpython=no
10449 if test "${have_python_config}" = yes; then
10450
10451
10452 new_CPPFLAGS=${python_includes}
10453 new_LIBS=${python_libs}
10454 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10455 $as_echo_n "checking for python... " >&6; }
10456 save_CPPFLAGS=$CPPFLAGS
10457 save_LIBS=$LIBS
10458 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10459 LIBS="$new_LIBS $LIBS"
10460 found_usable_python=no
10461 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10462 /* end confdefs.h. */
10463 #include "Python.h"
10464 int
10465 main ()
10466 {
10467 Py_Initialize ();
10468 ;
10469 return 0;
10470 }
10471 _ACEOF
10472 if ac_fn_c_try_link "$LINENO"; then :
10473 have_libpython=yes
10474 found_usable_python=yes
10475 PYTHON_CPPFLAGS=$new_CPPFLAGS
10476 PYTHON_LIBS=$new_LIBS
10477 fi
10478 rm -f core conftest.err conftest.$ac_objext \
10479 conftest$ac_exeext conftest.$ac_ext
10480 CPPFLAGS=$save_CPPFLAGS
10481 LIBS=$save_LIBS
10482 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10483 $as_echo "${found_usable_python}" >&6; }
10484
10485 elif test "${have_python_config}" != failed; then
10486 if test "${have_libpython}" = no; then
10487
10488
10489 new_CPPFLAGS=${python_includes}
10490 new_LIBS="-lpython2.7 ${python_libs}"
10491 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10492 $as_echo_n "checking for python... " >&6; }
10493 save_CPPFLAGS=$CPPFLAGS
10494 save_LIBS=$LIBS
10495 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10496 LIBS="$new_LIBS $LIBS"
10497 found_usable_python=no
10498 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10499 /* end confdefs.h. */
10500 #include "Python.h"
10501 int
10502 main ()
10503 {
10504 Py_Initialize ();
10505 ;
10506 return 0;
10507 }
10508 _ACEOF
10509 if ac_fn_c_try_link "$LINENO"; then :
10510 have_libpython=yes
10511 found_usable_python=yes
10512 PYTHON_CPPFLAGS=$new_CPPFLAGS
10513 PYTHON_LIBS=$new_LIBS
10514 fi
10515 rm -f core conftest.err conftest.$ac_objext \
10516 conftest$ac_exeext conftest.$ac_ext
10517 CPPFLAGS=$save_CPPFLAGS
10518 LIBS=$save_LIBS
10519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10520 $as_echo "${found_usable_python}" >&6; }
10521
10522 fi
10523 if test "${have_libpython}" = no; then
10524
10525
10526 new_CPPFLAGS=${python_includes}
10527 new_LIBS="-lpython2.6 ${python_libs}"
10528 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for python" >&5
10529 $as_echo_n "checking for python... " >&6; }
10530 save_CPPFLAGS=$CPPFLAGS
10531 save_LIBS=$LIBS
10532 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10533 LIBS="$new_LIBS $LIBS"
10534 found_usable_python=no
10535 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10536 /* end confdefs.h. */
10537 #include "Python.h"
10538 int
10539 main ()
10540 {
10541 Py_Initialize ();
10542 ;
10543 return 0;
10544 }
10545 _ACEOF
10546 if ac_fn_c_try_link "$LINENO"; then :
10547 have_libpython=yes
10548 found_usable_python=yes
10549 PYTHON_CPPFLAGS=$new_CPPFLAGS
10550 PYTHON_LIBS=$new_LIBS
10551 fi
10552 rm -f core conftest.err conftest.$ac_objext \
10553 conftest$ac_exeext conftest.$ac_ext
10554 CPPFLAGS=$save_CPPFLAGS
10555 LIBS=$save_LIBS
10556 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_python}" >&5
10557 $as_echo "${found_usable_python}" >&6; }
10558
10559 fi
10560 fi
10561
10562 if test "${have_libpython}" = no; then
10563 case "${with_python}" in
10564 yes)
10565 as_fn_error $? "python is missing or unusable" "$LINENO" 5
10566 ;;
10567 auto)
10568 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: python is missing or unusable; some features may be unavailable." >&5
10569 $as_echo "$as_me: WARNING: python is missing or unusable; some features may be unavailable." >&2;}
10570 ;;
10571 *)
10572 as_fn_error $? "no usable python found at ${with_python}" "$LINENO" 5
10573 ;;
10574 esac
10575 else
10576 if test -n "${python_prefix}"; then
10577
10578 cat >>confdefs.h <<_ACEOF
10579 #define WITH_PYTHON_PATH "${python_prefix}"
10580 _ACEOF
10581
10582
10583 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
10584 if test "x$prefix" = xNONE; then
10585 test_prefix=/usr/local
10586 else
10587 test_prefix=$prefix
10588 fi
10589 else
10590 test_prefix=$exec_prefix
10591 fi
10592 value=0
10593 case ${python_prefix} in
10594 "${test_prefix}"|"${test_prefix}/"*|\
10595 '${exec_prefix}'|'${exec_prefix}/'*)
10596 value=1
10597 ;;
10598 esac
10599
10600 cat >>confdefs.h <<_ACEOF
10601 #define PYTHON_PATH_RELOCATABLE $value
10602 _ACEOF
10603
10604
10605 fi
10606 fi
10607 fi
10608
10609 if test "${have_libpython}" != no; then
10610
10611 $as_echo "#define HAVE_PYTHON 1" >>confdefs.h
10612
10613 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_PYTHON_OBS)"
10614 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_PYTHON_DEPS)"
10615 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_PYTHON_SRCS)"
10616 CONFIG_INSTALL="$CONFIG_INSTALL install-python"
10617 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_PYTHON_CFLAGS)"
10618
10619 # Flags needed to compile Python code (taken from python-config --cflags).
10620 # We cannot call python-config directly because it will output whatever was
10621 # used when compiling the Python interpreter itself, including flags which
10622 # would make the python-related objects be compiled differently from the
10623 # rest of GDB (e.g., -O2 and -fPIC).
10624 if test "${GCC}" = yes; then
10625 tentative_python_cflags="-fno-strict-aliasing -fwrapv"
10626 # Python headers recommend -DNDEBUG, but it's unclear if that just
10627 # refers to building Python itself. In release mode, though, it
10628 # doesn't hurt for the Python code in gdb to follow.
10629 $development || tentative_python_cflags="$tentative_python_cflags -DNDEBUG"
10630 fi
10631
10632 if test "x${tentative_python_cflags}" != x; then
10633 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler flags for python code" >&5
10634 $as_echo_n "checking compiler flags for python code... " >&6; }
10635 for flag in ${tentative_python_cflags}; do
10636 # Check that the compiler accepts it
10637 saved_CFLAGS="$CFLAGS"
10638 CFLAGS="$CFLAGS $flag"
10639 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10640 /* end confdefs.h. */
10641
10642 int
10643 main ()
10644 {
10645
10646 ;
10647 return 0;
10648 }
10649 _ACEOF
10650 if ac_fn_c_try_compile "$LINENO"; then :
10651 PYTHON_CFLAGS="${PYTHON_CFLAGS} $flag"
10652 fi
10653 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
10654 CFLAGS="$saved_CFLAGS"
10655 done
10656 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${PYTHON_CFLAGS}" >&5
10657 $as_echo "${PYTHON_CFLAGS}" >&6; }
10658 fi
10659
10660 # On x64 Windows, Python's include headers, and pyconfig.h in
10661 # particular, rely on MS_WIN64 macro to detect that it's a 64bit
10662 # version of Windows. Unfortunately, MS_WIN64 is only defined if
10663 # _MSC_VER, a Microsoft-specific macro, is defined. So, when
10664 # building on x64 Windows with GCC, we define MS_WIN64 ourselves.
10665 # The issue was reported to the Python community, but still isn't
10666 # solved as of 2012-10-02 (http://bugs.python.org/issue4709).
10667
10668 case "$gdb_host" in
10669 mingw64)
10670 if test "${GCC}" = yes; then
10671 CPPFLAGS="$CPPFLAGS -DMS_WIN64"
10672 fi
10673 ;;
10674 esac
10675 else
10676 # Even if Python support is not compiled in, we need to have this file
10677 # included so that the "python" command, et.al., still exists.
10678 CONFIG_OBS="$CONFIG_OBS python/python.o"
10679 CONFIG_SRCS="$CONFIG_SRCS python/python.c"
10680 fi
10681
10682 # Work around Python http://bugs.python.org/issue10112. See also
10683 # http://bugs.python.org/issue11410, otherwise -Wl,--dynamic-list has
10684 # no effect. Note that the only test after this that uses Python is
10685 # the -rdynamic/-Wl,--dynamic-list test, and we do want that one to be
10686 # run without -export-dynamic too.
10687 PYTHON_LIBS=`echo $PYTHON_LIBS | sed -e 's/-Xlinker -export-dynamic//'`
10688
10689
10690
10691
10692 if test "${have_libpython}" != no; then
10693 HAVE_PYTHON_TRUE=
10694 HAVE_PYTHON_FALSE='#'
10695 else
10696 HAVE_PYTHON_TRUE='#'
10697 HAVE_PYTHON_FALSE=
10698 fi
10699
10700
10701 # -------------------- #
10702 # Check for libguile. #
10703 # -------------------- #
10704
10705
10706
10707
10708
10709
10710 # Check whether --with-guile was given.
10711 if test "${with_guile+set}" = set; then :
10712 withval=$with_guile;
10713 else
10714 with_guile=auto
10715 fi
10716
10717 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use guile" >&5
10718 $as_echo_n "checking whether to use guile... " >&6; }
10719 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_guile" >&5
10720 $as_echo "$with_guile" >&6; }
10721
10722 # Extract the first word of "pkg-config", so it can be a program name with args.
10723 set dummy pkg-config; ac_word=$2
10724 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10725 $as_echo_n "checking for $ac_word... " >&6; }
10726 if ${ac_cv_path_pkg_config_prog_path+:} false; then :
10727 $as_echo_n "(cached) " >&6
10728 else
10729 case $pkg_config_prog_path in
10730 [\\/]* | ?:[\\/]*)
10731 ac_cv_path_pkg_config_prog_path="$pkg_config_prog_path" # Let the user override the test with a path.
10732 ;;
10733 *)
10734 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10735 for as_dir in $PATH
10736 do
10737 IFS=$as_save_IFS
10738 test -z "$as_dir" && as_dir=.
10739 for ac_exec_ext in '' $ac_executable_extensions; do
10740 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10741 ac_cv_path_pkg_config_prog_path="$as_dir/$ac_word$ac_exec_ext"
10742 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10743 break 2
10744 fi
10745 done
10746 done
10747 IFS=$as_save_IFS
10748
10749 test -z "$ac_cv_path_pkg_config_prog_path" && ac_cv_path_pkg_config_prog_path="missing"
10750 ;;
10751 esac
10752 fi
10753 pkg_config_prog_path=$ac_cv_path_pkg_config_prog_path
10754 if test -n "$pkg_config_prog_path"; then
10755 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $pkg_config_prog_path" >&5
10756 $as_echo "$pkg_config_prog_path" >&6; }
10757 else
10758 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10759 $as_echo "no" >&6; }
10760 fi
10761
10762
10763
10764 try_guile_versions="guile-2.0"
10765 have_libguile=no
10766 case "${with_guile}" in
10767 no)
10768 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: guile support disabled; some features will be unavailable." >&5
10769 $as_echo "$as_me: WARNING: guile support disabled; some features will be unavailable." >&2;}
10770 ;;
10771 auto)
10772 if test "${pkg_config_prog_path}" = "missing"; then
10773 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pkg-config not found, guile support disabled" >&5
10774 $as_echo "$as_me: WARNING: pkg-config not found, guile support disabled" >&2;}
10775 else
10776
10777 pkg_config=${pkg_config_prog_path}
10778 guile_version_list=${try_guile_versions}
10779 flag_errors=no
10780
10781 found_usable_guile=checking
10782 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10783 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10784 for guile_version in ${guile_version_list}; do
10785 ${pkg_config} --exists ${guile_version} 2>/dev/null
10786 if test $? != 0; then
10787 continue
10788 fi
10789 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10790 if test $? != 0; then
10791 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10792 fi
10793 new_LIBS=`${pkg_config} --libs ${guile_version}`
10794 if test $? != 0; then
10795 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10796 fi
10797 found_usable_guile=${guile_version}
10798 break
10799 done
10800 if test "${found_usable_guile}" = "checking"; then
10801 if test "${flag_errors}" = "yes"; then
10802 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10803 else
10804 found_usable_guile=no
10805 fi
10806 fi
10807 if test "${found_usable_guile}" != no; then
10808 save_CPPFLAGS=$CPPFLAGS
10809 save_LIBS=$LIBS
10810 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10811 LIBS="$LIBS $new_LIBS"
10812 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10813 /* end confdefs.h. */
10814 #include "libguile.h"
10815 int
10816 main ()
10817 {
10818 scm_init_guile ();
10819 ;
10820 return 0;
10821 }
10822 _ACEOF
10823 if ac_fn_c_try_link "$LINENO"; then :
10824 have_libguile=yes
10825 GUILE_CPPFLAGS=$new_CPPFLAGS
10826 GUILE_LIBS=$new_LIBS
10827 else
10828 found_usable_guile=no
10829 fi
10830 rm -f core conftest.err conftest.$ac_objext \
10831 conftest$ac_exeext conftest.$ac_ext
10832 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10833 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
10834
10835 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10836
10837
10838 fi
10839
10840 CPPFLAGS=$save_CPPFLAGS
10841 LIBS=$save_LIBS
10842 if test "${found_usable_guile}" = no; then
10843 if test "${flag_errors}" = yes; then
10844 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10845 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10846 as_fn_error $? "linking guile version ${guile_version} test program failed
10847 See \`config.log' for more details" "$LINENO" 5; }
10848 fi
10849 fi
10850 fi
10851 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10852 $as_echo "${found_usable_guile}" >&6; }
10853
10854 fi
10855 ;;
10856 yes)
10857 if test "${pkg_config_prog_path}" = "missing"; then
10858 as_fn_error $? "pkg-config not found" "$LINENO" 5
10859 fi
10860
10861 pkg_config=${pkg_config_prog_path}
10862 guile_version_list=${try_guile_versions}
10863 flag_errors=yes
10864
10865 found_usable_guile=checking
10866 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10867 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10868 for guile_version in ${guile_version_list}; do
10869 ${pkg_config} --exists ${guile_version} 2>/dev/null
10870 if test $? != 0; then
10871 continue
10872 fi
10873 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10874 if test $? != 0; then
10875 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10876 fi
10877 new_LIBS=`${pkg_config} --libs ${guile_version}`
10878 if test $? != 0; then
10879 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10880 fi
10881 found_usable_guile=${guile_version}
10882 break
10883 done
10884 if test "${found_usable_guile}" = "checking"; then
10885 if test "${flag_errors}" = "yes"; then
10886 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10887 else
10888 found_usable_guile=no
10889 fi
10890 fi
10891 if test "${found_usable_guile}" != no; then
10892 save_CPPFLAGS=$CPPFLAGS
10893 save_LIBS=$LIBS
10894 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10895 LIBS="$LIBS $new_LIBS"
10896 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10897 /* end confdefs.h. */
10898 #include "libguile.h"
10899 int
10900 main ()
10901 {
10902 scm_init_guile ();
10903 ;
10904 return 0;
10905 }
10906 _ACEOF
10907 if ac_fn_c_try_link "$LINENO"; then :
10908 have_libguile=yes
10909 GUILE_CPPFLAGS=$new_CPPFLAGS
10910 GUILE_LIBS=$new_LIBS
10911 else
10912 found_usable_guile=no
10913 fi
10914 rm -f core conftest.err conftest.$ac_objext \
10915 conftest$ac_exeext conftest.$ac_ext
10916 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10917 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
10918
10919 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
10920
10921
10922 fi
10923
10924 CPPFLAGS=$save_CPPFLAGS
10925 LIBS=$save_LIBS
10926 if test "${found_usable_guile}" = no; then
10927 if test "${flag_errors}" = yes; then
10928 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
10929 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
10930 as_fn_error $? "linking guile version ${guile_version} test program failed
10931 See \`config.log' for more details" "$LINENO" 5; }
10932 fi
10933 fi
10934 fi
10935 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
10936 $as_echo "${found_usable_guile}" >&6; }
10937
10938 ;;
10939 [\\/]* | ?:[\\/]*)
10940 if test -x "${with_guile}"; then
10941
10942 pkg_config=${with_guile}
10943 guile_version_list=${try_guile_versions}
10944 flag_errors=yes
10945
10946 found_usable_guile=checking
10947 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
10948 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
10949 for guile_version in ${guile_version_list}; do
10950 ${pkg_config} --exists ${guile_version} 2>/dev/null
10951 if test $? != 0; then
10952 continue
10953 fi
10954 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
10955 if test $? != 0; then
10956 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
10957 fi
10958 new_LIBS=`${pkg_config} --libs ${guile_version}`
10959 if test $? != 0; then
10960 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
10961 fi
10962 found_usable_guile=${guile_version}
10963 break
10964 done
10965 if test "${found_usable_guile}" = "checking"; then
10966 if test "${flag_errors}" = "yes"; then
10967 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
10968 else
10969 found_usable_guile=no
10970 fi
10971 fi
10972 if test "${found_usable_guile}" != no; then
10973 save_CPPFLAGS=$CPPFLAGS
10974 save_LIBS=$LIBS
10975 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
10976 LIBS="$LIBS $new_LIBS"
10977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
10978 /* end confdefs.h. */
10979 #include "libguile.h"
10980 int
10981 main ()
10982 {
10983 scm_init_guile ();
10984 ;
10985 return 0;
10986 }
10987 _ACEOF
10988 if ac_fn_c_try_link "$LINENO"; then :
10989 have_libguile=yes
10990 GUILE_CPPFLAGS=$new_CPPFLAGS
10991 GUILE_LIBS=$new_LIBS
10992 else
10993 found_usable_guile=no
10994 fi
10995 rm -f core conftest.err conftest.$ac_objext \
10996 conftest$ac_exeext conftest.$ac_ext
10997 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
10998 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
10999
11000 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11001
11002
11003 fi
11004
11005 CPPFLAGS=$save_CPPFLAGS
11006 LIBS=$save_LIBS
11007 if test "${found_usable_guile}" = no; then
11008 if test "${flag_errors}" = yes; then
11009 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11010 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11011 as_fn_error $? "linking guile version ${guile_version} test program failed
11012 See \`config.log' for more details" "$LINENO" 5; }
11013 fi
11014 fi
11015 fi
11016 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11017 $as_echo "${found_usable_guile}" >&6; }
11018
11019 else
11020 as_fn_error $? "Guile config program not executable: ${with_guile}" "$LINENO" 5
11021 fi
11022 ;;
11023 "" | */*)
11024 # Disallow --with=guile="" and --with-guile=foo/bar.
11025 as_fn_error $? "invalid value for --with-guile" "$LINENO" 5
11026 ;;
11027 *)
11028 # A space separate list of guile versions to try, in order.
11029 if test "${pkg_config_prog_path}" = "missing"; then
11030 as_fn_error $? "pkg-config not found" "$LINENO" 5
11031 fi
11032
11033 pkg_config=${pkg_config_prog_path}
11034 guile_version_list=${with_guile}
11035 flag_errors=yes
11036
11037 found_usable_guile=checking
11038 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for usable guile from ${pkg_config}" >&5
11039 $as_echo_n "checking for usable guile from ${pkg_config}... " >&6; }
11040 for guile_version in ${guile_version_list}; do
11041 ${pkg_config} --exists ${guile_version} 2>/dev/null
11042 if test $? != 0; then
11043 continue
11044 fi
11045 new_CPPFLAGS=`${pkg_config} --cflags ${guile_version}`
11046 if test $? != 0; then
11047 as_fn_error $? "failure running pkg-config --cflags ${guile_version}" "$LINENO" 5
11048 fi
11049 new_LIBS=`${pkg_config} --libs ${guile_version}`
11050 if test $? != 0; then
11051 as_fn_error $? "failure running pkg-config --libs ${guile_version}" "$LINENO" 5
11052 fi
11053 found_usable_guile=${guile_version}
11054 break
11055 done
11056 if test "${found_usable_guile}" = "checking"; then
11057 if test "${flag_errors}" = "yes"; then
11058 as_fn_error $? "unable to find usable guile version from \"${guile_version_list}\"" "$LINENO" 5
11059 else
11060 found_usable_guile=no
11061 fi
11062 fi
11063 if test "${found_usable_guile}" != no; then
11064 save_CPPFLAGS=$CPPFLAGS
11065 save_LIBS=$LIBS
11066 CPPFLAGS="$CPPFLAGS $new_CPPFLAGS"
11067 LIBS="$LIBS $new_LIBS"
11068 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11069 /* end confdefs.h. */
11070 #include "libguile.h"
11071 int
11072 main ()
11073 {
11074 scm_init_guile ();
11075 ;
11076 return 0;
11077 }
11078 _ACEOF
11079 if ac_fn_c_try_link "$LINENO"; then :
11080 have_libguile=yes
11081 GUILE_CPPFLAGS=$new_CPPFLAGS
11082 GUILE_LIBS=$new_LIBS
11083 else
11084 found_usable_guile=no
11085 fi
11086 rm -f core conftest.err conftest.$ac_objext \
11087 conftest$ac_exeext conftest.$ac_ext
11088 ac_fn_c_check_func "$LINENO" "scm_set_automatic_finalization_enabled" "ac_cv_func_scm_set_automatic_finalization_enabled"
11089 if test "x$ac_cv_func_scm_set_automatic_finalization_enabled" = xyes; then :
11090
11091 $as_echo "#define HAVE_GUILE_MANUAL_FINALIZATION 1" >>confdefs.h
11092
11093
11094 fi
11095
11096 CPPFLAGS=$save_CPPFLAGS
11097 LIBS=$save_LIBS
11098 if test "${found_usable_guile}" = no; then
11099 if test "${flag_errors}" = yes; then
11100 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11101 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11102 as_fn_error $? "linking guile version ${guile_version} test program failed
11103 See \`config.log' for more details" "$LINENO" 5; }
11104 fi
11105 fi
11106 fi
11107 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${found_usable_guile}" >&5
11108 $as_echo "${found_usable_guile}" >&6; }
11109
11110 ;;
11111 esac
11112
11113 if test "${have_libguile}" != no; then
11114 case "${with_guile}" in
11115 [\\/]* | ?:[\\/]*)
11116
11117 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11118 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11119 if ${ac_cv_guild_program_name+:} false; then :
11120 $as_echo_n "(cached) " >&6
11121 else
11122 ac_cv_guild_program_name="`"${with_guile}" --variable guild "${guile_version}"`"
11123
11124 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11125 # the 'guild' and 'bindir' variables. In that case, try to guess
11126 # what the program name is, at the risk of getting it wrong if
11127 # Guile was configured with '--program-suffix' or similar.
11128 if test "x$ac_cv_guild_program_name" = "x"; then
11129 guile_exec_prefix="`"${with_guile}" --variable exec_prefix "${guile_version}"`"
11130 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11131 fi
11132
11133 fi
11134 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11135 $as_echo "$ac_cv_guild_program_name" >&6; }
11136
11137 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11138 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11139 fi
11140
11141 GUILD="$ac_cv_guild_program_name"
11142
11143
11144 ;;
11145 *)
11146
11147 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the absolute file name of the 'guild' command" >&5
11148 $as_echo_n "checking for the absolute file name of the 'guild' command... " >&6; }
11149 if ${ac_cv_guild_program_name+:} false; then :
11150 $as_echo_n "(cached) " >&6
11151 else
11152 ac_cv_guild_program_name="`"${pkg_config_prog_path}" --variable guild "${guile_version}"`"
11153
11154 # In Guile up to 2.0.11 included, guile-2.0.pc would not define
11155 # the 'guild' and 'bindir' variables. In that case, try to guess
11156 # what the program name is, at the risk of getting it wrong if
11157 # Guile was configured with '--program-suffix' or similar.
11158 if test "x$ac_cv_guild_program_name" = "x"; then
11159 guile_exec_prefix="`"${pkg_config_prog_path}" --variable exec_prefix "${guile_version}"`"
11160 ac_cv_guild_program_name="$guile_exec_prefix/bin/guild"
11161 fi
11162
11163 fi
11164 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_program_name" >&5
11165 $as_echo "$ac_cv_guild_program_name" >&6; }
11166
11167 if ! "$ac_cv_guild_program_name" --version >&5 2>&5; then
11168 as_fn_error $? "'$ac_cv_guild_program_name' appears to be unusable" "$LINENO" 5
11169 fi
11170
11171 GUILD="$ac_cv_guild_program_name"
11172
11173
11174 ;;
11175 esac
11176
11177
11178 if test "$cross_compiling" = no; then
11179 GUILD_TARGET_FLAG=
11180 else
11181 GUILD_TARGET_FLAG="--target=$host"
11182 fi
11183
11184
11185
11186
11187 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether guild supports this host" >&5
11188 $as_echo_n "checking whether guild supports this host... " >&6; }
11189 if ${ac_cv_guild_ok+:} false; then :
11190 $as_echo_n "(cached) " >&6
11191 else
11192 echo "$ac_cv_guild_program_name compile $GUILD_TARGET_FLAG -o conftest.go $srcdir/guile/lib/gdb/support.scm" >&5
11193 if "$ac_cv_guild_program_name" compile $GUILD_TARGET_FLAG -o conftest.go "$srcdir/guile/lib/gdb/support.scm" >&5 2>&5; then
11194 ac_cv_guild_ok=yes
11195 else
11196 ac_cv_guild_ok=no
11197 fi
11198 fi
11199 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_guild_ok" >&5
11200 $as_echo "$ac_cv_guild_ok" >&6; }
11201
11202 if test "$ac_cv_guild_ok" = no; then
11203 have_libguile=no
11204 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: disabling guile support" >&5
11205 $as_echo "$as_me: WARNING: disabling guile support" >&2;}
11206 fi
11207 fi
11208
11209 if test "${have_libguile}" != no; then
11210
11211 $as_echo "#define HAVE_GUILE 1" >>confdefs.h
11212
11213 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_GUILE_OBS)"
11214 CONFIG_DEPS="$CONFIG_DEPS \$(SUBDIR_GUILE_DEPS)"
11215 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_GUILE_SRCS)"
11216 CONFIG_INSTALL="$CONFIG_INSTALL install-guile"
11217 ENABLE_CFLAGS="$ENABLE_CFLAGS \$(SUBDIR_GUILE_CFLAGS)"
11218
11219 save_LIBS="$LIBS"
11220 save_CPPFLAGS="$CPPFLAGS"
11221 LIBS="$GUILE_LIBS"
11222 CPPFLAGS="$GUILE_CPPFLAGS"
11223 for ac_func in scm_new_smob
11224 do :
11225 ac_fn_c_check_func "$LINENO" "scm_new_smob" "ac_cv_func_scm_new_smob"
11226 if test "x$ac_cv_func_scm_new_smob" = xyes; then :
11227 cat >>confdefs.h <<_ACEOF
11228 #define HAVE_SCM_NEW_SMOB 1
11229 _ACEOF
11230
11231 fi
11232 done
11233
11234 LIBS="$save_LIBS"
11235 CPPFLAGS="$save_CPPFLAGS"
11236 else
11237 # Even if Guile support is not compiled in, we need to have these files
11238 # included.
11239 CONFIG_OBS="$CONFIG_OBS guile/guile.o"
11240 CONFIG_SRCS="$CONFIG_SRCS guile/guile.c"
11241 fi
11242
11243
11244 if test "${have_libguile}" != no; then
11245 HAVE_GUILE_TRUE=
11246 HAVE_GUILE_FALSE='#'
11247 else
11248 HAVE_GUILE_TRUE='#'
11249 HAVE_GUILE_FALSE=
11250 fi
11251
11252
11253 # ---------------------------- #
11254 # Check for source highlight. #
11255 # ---------------------------- #
11256
11257 SRCHIGH_LIBS=
11258 SRCHIGH_CFLAGS=
11259
11260 # Check whether --enable-source-highlight was given.
11261 if test "${enable_source_highlight+set}" = set; then :
11262 enableval=$enable_source_highlight; case "${enableval}" in
11263 yes) enable_source_highlight=yes ;;
11264 no) enable_source_highlight=no ;;
11265 *) as_fn_error $? "bad value ${enableval} for source-highlight option" "$LINENO" 5 ;;
11266 esac
11267 else
11268 enable_source_highlight=auto
11269 fi
11270
11271
11272 if test "${enable_source_highlight}" != "no"; then
11273 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the source-highlight library" >&5
11274 $as_echo_n "checking for the source-highlight library... " >&6; }
11275 if test "${pkg_config_prog_path}" = "missing"; then
11276 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no - pkg-config not found" >&5
11277 $as_echo "no - pkg-config not found" >&6; }
11278 if test "${enable_source_highlight}" = "yes"; then
11279 as_fn_error $? "pkg-config was not found in your system" "$LINENO" 5
11280 fi
11281 else
11282 case "$LDFLAGS" in
11283 *static-libstdc*)
11284 as_fn_error $? "source highlight is incompatible with -static-libstdc++; either use --disable-source-highlight or --without-static-standard-libraries" "$LINENO" 5
11285 ;;
11286 esac
11287
11288 if ${pkg_config_prog_path} --exists source-highlight; then
11289 SRCHIGH_CFLAGS=`${pkg_config_prog_path} --cflags source-highlight`
11290 SRCHIGH_LIBS=`${pkg_config_prog_path} --libs source-highlight`
11291
11292 $as_echo "#define HAVE_SOURCE_HIGHLIGHT 1" >>confdefs.h
11293
11294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
11295 $as_echo "yes" >&6; }
11296 else
11297 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11298 $as_echo "no" >&6; }
11299 if test "${enable_source_highlight}" = "yes"; then
11300 as_fn_error $? "source-highlight was not found in your system" "$LINENO" 5
11301 fi
11302 fi
11303 fi
11304 fi
11305
11306
11307
11308 # ------------------------- #
11309 # Checks for header files. #
11310 # ------------------------- #
11311
11312 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
11313 $as_echo_n "checking for ANSI C header files... " >&6; }
11314 if ${ac_cv_header_stdc+:} false; then :
11315 $as_echo_n "(cached) " >&6
11316 else
11317 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11318 /* end confdefs.h. */
11319 #include <stdlib.h>
11320 #include <stdarg.h>
11321 #include <string.h>
11322 #include <float.h>
11323
11324 int
11325 main ()
11326 {
11327
11328 ;
11329 return 0;
11330 }
11331 _ACEOF
11332 if ac_fn_c_try_compile "$LINENO"; then :
11333 ac_cv_header_stdc=yes
11334 else
11335 ac_cv_header_stdc=no
11336 fi
11337 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11338
11339 if test $ac_cv_header_stdc = yes; then
11340 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
11341 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11342 /* end confdefs.h. */
11343 #include <string.h>
11344
11345 _ACEOF
11346 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11347 $EGREP "memchr" >/dev/null 2>&1; then :
11348
11349 else
11350 ac_cv_header_stdc=no
11351 fi
11352 rm -f conftest*
11353
11354 fi
11355
11356 if test $ac_cv_header_stdc = yes; then
11357 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
11358 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11359 /* end confdefs.h. */
11360 #include <stdlib.h>
11361
11362 _ACEOF
11363 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
11364 $EGREP "free" >/dev/null 2>&1; then :
11365
11366 else
11367 ac_cv_header_stdc=no
11368 fi
11369 rm -f conftest*
11370
11371 fi
11372
11373 if test $ac_cv_header_stdc = yes; then
11374 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
11375 if test "$cross_compiling" = yes; then :
11376 :
11377 else
11378 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11379 /* end confdefs.h. */
11380 #include <ctype.h>
11381 #include <stdlib.h>
11382 #if ((' ' & 0x0FF) == 0x020)
11383 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
11384 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
11385 #else
11386 # define ISLOWER(c) \
11387 (('a' <= (c) && (c) <= 'i') \
11388 || ('j' <= (c) && (c) <= 'r') \
11389 || ('s' <= (c) && (c) <= 'z'))
11390 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
11391 #endif
11392
11393 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
11394 int
11395 main ()
11396 {
11397 int i;
11398 for (i = 0; i < 256; i++)
11399 if (XOR (islower (i), ISLOWER (i))
11400 || toupper (i) != TOUPPER (i))
11401 return 2;
11402 return 0;
11403 }
11404 _ACEOF
11405 if ac_fn_c_try_run "$LINENO"; then :
11406
11407 else
11408 ac_cv_header_stdc=no
11409 fi
11410 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
11411 conftest.$ac_objext conftest.beam conftest.$ac_ext
11412 fi
11413
11414 fi
11415 fi
11416 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
11417 $as_echo "$ac_cv_header_stdc" >&6; }
11418 if test $ac_cv_header_stdc = yes; then
11419
11420 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
11421
11422 fi
11423
11424 # elf_hp.h is for HP/UX 64-bit shared library support.
11425 for ac_header in nlist.h machine/reg.h poll.h sys/poll.h \
11426 thread_db.h \
11427 sys/file.h sys/filio.h sys/ioctl.h sys/param.h \
11428 sys/resource.h sys/ptrace.h ptrace.h \
11429 sys/reg.h sys/debugreg.h sys/select.h \
11430 termios.h elf_hp.h
11431 do :
11432 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11433 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11434 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11435 cat >>confdefs.h <<_ACEOF
11436 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11437 _ACEOF
11438
11439 fi
11440
11441 done
11442
11443 for ac_header in sys/user.h
11444 do :
11445 ac_fn_c_check_header_compile "$LINENO" "sys/user.h" "ac_cv_header_sys_user_h" "#if HAVE_SYS_PARAM_H
11446 # include <sys/param.h>
11447 #endif
11448
11449 "
11450 if test "x$ac_cv_header_sys_user_h" = xyes; then :
11451 cat >>confdefs.h <<_ACEOF
11452 #define HAVE_SYS_USER_H 1
11453 _ACEOF
11454
11455 fi
11456
11457 done
11458
11459
11460 for ac_header in curses.h cursesX.h ncurses.h ncursesw/ncurses.h ncurses/ncurses.h ncurses/term.h
11461 do :
11462 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
11463 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
11464 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
11465 cat >>confdefs.h <<_ACEOF
11466 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
11467 _ACEOF
11468
11469 fi
11470
11471 done
11472
11473 for ac_header in term.h
11474 do :
11475 ac_fn_c_check_header_compile "$LINENO" "term.h" "ac_cv_header_term_h" "#if HAVE_CURSES_H
11476 # include <curses.h>
11477 #endif
11478
11479 "
11480 if test "x$ac_cv_header_term_h" = xyes; then :
11481 cat >>confdefs.h <<_ACEOF
11482 #define HAVE_TERM_H 1
11483 _ACEOF
11484
11485 fi
11486
11487 done
11488
11489
11490 # ------------------------- #
11491 # Checks for declarations. #
11492 # ------------------------- #
11493
11494
11495 # Check for presence and size of long long.
11496 ac_fn_c_check_type "$LINENO" "long long" "ac_cv_type_long_long" "$ac_includes_default"
11497 if test "x$ac_cv_type_long_long" = xyes; then :
11498
11499 cat >>confdefs.h <<_ACEOF
11500 #define HAVE_LONG_LONG 1
11501 _ACEOF
11502
11503 # The cast to long int works around a bug in the HP C Compiler
11504 # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
11505 # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
11506 # This bug is HP SR number 8606223364.
11507 { $as_echo "$as_me:${as_lineno-$LINENO}: checking size of long long" >&5
11508 $as_echo_n "checking size of long long... " >&6; }
11509 if ${ac_cv_sizeof_long_long+:} false; then :
11510 $as_echo_n "(cached) " >&6
11511 else
11512 if ac_fn_c_compute_int "$LINENO" "(long int) (sizeof (long long))" "ac_cv_sizeof_long_long" "$ac_includes_default"; then :
11513
11514 else
11515 if test "$ac_cv_type_long_long" = yes; then
11516 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
11517 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
11518 as_fn_error 77 "cannot compute sizeof (long long)
11519 See \`config.log' for more details" "$LINENO" 5; }
11520 else
11521 ac_cv_sizeof_long_long=0
11522 fi
11523 fi
11524
11525 fi
11526 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_long_long" >&5
11527 $as_echo "$ac_cv_sizeof_long_long" >&6; }
11528
11529
11530
11531 cat >>confdefs.h <<_ACEOF
11532 #define SIZEOF_LONG_LONG $ac_cv_sizeof_long_long
11533 _ACEOF
11534
11535
11536 fi
11537
11538
11539 as_ac_Symbol=`$as_echo "ac_cv_have_decl_basename(char *)" | $as_tr_sh`
11540 ac_fn_c_check_decl "$LINENO" "basename(char *)" "$as_ac_Symbol" "$ac_includes_default"
11541 if eval test \"x\$"$as_ac_Symbol"\" = x"yes"; then :
11542 ac_have_decl=1
11543 else
11544 ac_have_decl=0
11545 fi
11546
11547 cat >>confdefs.h <<_ACEOF
11548 #define HAVE_DECL_BASENAME $ac_have_decl
11549 _ACEOF
11550 ac_fn_c_check_decl "$LINENO" "ffs" "ac_cv_have_decl_ffs" "$ac_includes_default"
11551 if test "x$ac_cv_have_decl_ffs" = xyes; then :
11552 ac_have_decl=1
11553 else
11554 ac_have_decl=0
11555 fi
11556
11557 cat >>confdefs.h <<_ACEOF
11558 #define HAVE_DECL_FFS $ac_have_decl
11559 _ACEOF
11560 ac_fn_c_check_decl "$LINENO" "asprintf" "ac_cv_have_decl_asprintf" "$ac_includes_default"
11561 if test "x$ac_cv_have_decl_asprintf" = xyes; then :
11562 ac_have_decl=1
11563 else
11564 ac_have_decl=0
11565 fi
11566
11567 cat >>confdefs.h <<_ACEOF
11568 #define HAVE_DECL_ASPRINTF $ac_have_decl
11569 _ACEOF
11570 ac_fn_c_check_decl "$LINENO" "vasprintf" "ac_cv_have_decl_vasprintf" "$ac_includes_default"
11571 if test "x$ac_cv_have_decl_vasprintf" = xyes; then :
11572 ac_have_decl=1
11573 else
11574 ac_have_decl=0
11575 fi
11576
11577 cat >>confdefs.h <<_ACEOF
11578 #define HAVE_DECL_VASPRINTF $ac_have_decl
11579 _ACEOF
11580 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11581 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11582 ac_have_decl=1
11583 else
11584 ac_have_decl=0
11585 fi
11586
11587 cat >>confdefs.h <<_ACEOF
11588 #define HAVE_DECL_SNPRINTF $ac_have_decl
11589 _ACEOF
11590 ac_fn_c_check_decl "$LINENO" "vsnprintf" "ac_cv_have_decl_vsnprintf" "$ac_includes_default"
11591 if test "x$ac_cv_have_decl_vsnprintf" = xyes; then :
11592 ac_have_decl=1
11593 else
11594 ac_have_decl=0
11595 fi
11596
11597 cat >>confdefs.h <<_ACEOF
11598 #define HAVE_DECL_VSNPRINTF $ac_have_decl
11599 _ACEOF
11600
11601 ac_fn_c_check_decl "$LINENO" "strtol" "ac_cv_have_decl_strtol" "$ac_includes_default"
11602 if test "x$ac_cv_have_decl_strtol" = xyes; then :
11603 ac_have_decl=1
11604 else
11605 ac_have_decl=0
11606 fi
11607
11608 cat >>confdefs.h <<_ACEOF
11609 #define HAVE_DECL_STRTOL $ac_have_decl
11610 _ACEOF
11611 ac_fn_c_check_decl "$LINENO" "strtoul" "ac_cv_have_decl_strtoul" "$ac_includes_default"
11612 if test "x$ac_cv_have_decl_strtoul" = xyes; then :
11613 ac_have_decl=1
11614 else
11615 ac_have_decl=0
11616 fi
11617
11618 cat >>confdefs.h <<_ACEOF
11619 #define HAVE_DECL_STRTOUL $ac_have_decl
11620 _ACEOF
11621 ac_fn_c_check_decl "$LINENO" "strtoll" "ac_cv_have_decl_strtoll" "$ac_includes_default"
11622 if test "x$ac_cv_have_decl_strtoll" = xyes; then :
11623 ac_have_decl=1
11624 else
11625 ac_have_decl=0
11626 fi
11627
11628 cat >>confdefs.h <<_ACEOF
11629 #define HAVE_DECL_STRTOLL $ac_have_decl
11630 _ACEOF
11631 ac_fn_c_check_decl "$LINENO" "strtoull" "ac_cv_have_decl_strtoull" "$ac_includes_default"
11632 if test "x$ac_cv_have_decl_strtoull" = xyes; then :
11633 ac_have_decl=1
11634 else
11635 ac_have_decl=0
11636 fi
11637
11638 cat >>confdefs.h <<_ACEOF
11639 #define HAVE_DECL_STRTOULL $ac_have_decl
11640 _ACEOF
11641
11642 ac_fn_c_check_decl "$LINENO" "strverscmp" "ac_cv_have_decl_strverscmp" "$ac_includes_default"
11643 if test "x$ac_cv_have_decl_strverscmp" = xyes; then :
11644 ac_have_decl=1
11645 else
11646 ac_have_decl=0
11647 fi
11648
11649 cat >>confdefs.h <<_ACEOF
11650 #define HAVE_DECL_STRVERSCMP $ac_have_decl
11651 _ACEOF
11652
11653
11654
11655 ac_fn_c_check_decl "$LINENO" "snprintf" "ac_cv_have_decl_snprintf" "$ac_includes_default"
11656 if test "x$ac_cv_have_decl_snprintf" = xyes; then :
11657 ac_have_decl=1
11658 else
11659 ac_have_decl=0
11660 fi
11661
11662 cat >>confdefs.h <<_ACEOF
11663 #define HAVE_DECL_SNPRINTF $ac_have_decl
11664 _ACEOF
11665
11666
11667 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LC_MESSAGES" >&5
11668 $as_echo_n "checking for LC_MESSAGES... " >&6; }
11669 if ${am_cv_val_LC_MESSAGES+:} false; then :
11670 $as_echo_n "(cached) " >&6
11671 else
11672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11673 /* end confdefs.h. */
11674 #include <locale.h>
11675 int
11676 main ()
11677 {
11678 return LC_MESSAGES
11679 ;
11680 return 0;
11681 }
11682 _ACEOF
11683 if ac_fn_c_try_link "$LINENO"; then :
11684 am_cv_val_LC_MESSAGES=yes
11685 else
11686 am_cv_val_LC_MESSAGES=no
11687 fi
11688 rm -f core conftest.err conftest.$ac_objext \
11689 conftest$ac_exeext conftest.$ac_ext
11690 fi
11691 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_val_LC_MESSAGES" >&5
11692 $as_echo "$am_cv_val_LC_MESSAGES" >&6; }
11693 if test $am_cv_val_LC_MESSAGES = yes; then
11694
11695 $as_echo "#define HAVE_LC_MESSAGES 1" >>confdefs.h
11696
11697 fi
11698
11699
11700 # ------------------ #
11701 # Checks for types. #
11702 # ------------------ #
11703
11704 ac_fn_c_check_type "$LINENO" "socklen_t" "ac_cv_type_socklen_t" "#include <sys/types.h>
11705 #include <sys/socket.h>
11706
11707 "
11708 if test "x$ac_cv_type_socklen_t" = xyes; then :
11709
11710 cat >>confdefs.h <<_ACEOF
11711 #define HAVE_SOCKLEN_T 1
11712 _ACEOF
11713
11714
11715 fi
11716
11717
11718 # ------------------------------------- #
11719 # Checks for compiler characteristics. #
11720 # ------------------------------------- #
11721
11722 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5
11723 $as_echo_n "checking for an ANSI C-conforming const... " >&6; }
11724 if ${ac_cv_c_const+:} false; then :
11725 $as_echo_n "(cached) " >&6
11726 else
11727 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11728 /* end confdefs.h. */
11729
11730 int
11731 main ()
11732 {
11733
11734 #ifndef __cplusplus
11735 /* Ultrix mips cc rejects this sort of thing. */
11736 typedef int charset[2];
11737 const charset cs = { 0, 0 };
11738 /* SunOS 4.1.1 cc rejects this. */
11739 char const *const *pcpcc;
11740 char **ppc;
11741 /* NEC SVR4.0.2 mips cc rejects this. */
11742 struct point {int x, y;};
11743 static struct point const zero = {0,0};
11744 /* AIX XL C 1.02.0.0 rejects this.
11745 It does not let you subtract one const X* pointer from another in
11746 an arm of an if-expression whose if-part is not a constant
11747 expression */
11748 const char *g = "string";
11749 pcpcc = &g + (g ? g-g : 0);
11750 /* HPUX 7.0 cc rejects these. */
11751 ++pcpcc;
11752 ppc = (char**) pcpcc;
11753 pcpcc = (char const *const *) ppc;
11754 { /* SCO 3.2v4 cc rejects this sort of thing. */
11755 char tx;
11756 char *t = &tx;
11757 char const *s = 0 ? (char *) 0 : (char const *) 0;
11758
11759 *t++ = 0;
11760 if (s) return 0;
11761 }
11762 { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */
11763 int x[] = {25, 17};
11764 const int *foo = &x[0];
11765 ++foo;
11766 }
11767 { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
11768 typedef const int *iptr;
11769 iptr p = 0;
11770 ++p;
11771 }
11772 { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying
11773 "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
11774 struct s { int j; const int *ap[3]; } bx;
11775 struct s *b = &bx; b->j = 5;
11776 }
11777 { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
11778 const int foo = 10;
11779 if (!foo) return 0;
11780 }
11781 return !cs[0] && !zero.x;
11782 #endif
11783
11784 ;
11785 return 0;
11786 }
11787 _ACEOF
11788 if ac_fn_c_try_compile "$LINENO"; then :
11789 ac_cv_c_const=yes
11790 else
11791 ac_cv_c_const=no
11792 fi
11793 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11794 fi
11795 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5
11796 $as_echo "$ac_cv_c_const" >&6; }
11797 if test $ac_cv_c_const = no; then
11798
11799 $as_echo "#define const /**/" >>confdefs.h
11800
11801 fi
11802
11803 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5
11804 $as_echo_n "checking for inline... " >&6; }
11805 if ${ac_cv_c_inline+:} false; then :
11806 $as_echo_n "(cached) " >&6
11807 else
11808 ac_cv_c_inline=no
11809 for ac_kw in inline __inline__ __inline; do
11810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11811 /* end confdefs.h. */
11812 #ifndef __cplusplus
11813 typedef int foo_t;
11814 static $ac_kw foo_t static_foo () {return 0; }
11815 $ac_kw foo_t foo () {return 0; }
11816 #endif
11817
11818 _ACEOF
11819 if ac_fn_c_try_compile "$LINENO"; then :
11820 ac_cv_c_inline=$ac_kw
11821 fi
11822 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11823 test "$ac_cv_c_inline" != no && break
11824 done
11825
11826 fi
11827 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5
11828 $as_echo "$ac_cv_c_inline" >&6; }
11829
11830 case $ac_cv_c_inline in
11831 inline | yes) ;;
11832 *)
11833 case $ac_cv_c_inline in
11834 no) ac_val=;;
11835 *) ac_val=$ac_cv_c_inline;;
11836 esac
11837 cat >>confdefs.h <<_ACEOF
11838 #ifndef __cplusplus
11839 #define inline $ac_val
11840 #endif
11841 _ACEOF
11842 ;;
11843 esac
11844
11845 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
11846 $as_echo_n "checking whether byte ordering is bigendian... " >&6; }
11847 if ${ac_cv_c_bigendian+:} false; then :
11848 $as_echo_n "(cached) " >&6
11849 else
11850 ac_cv_c_bigendian=unknown
11851 # See if we're dealing with a universal compiler.
11852 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11853 /* end confdefs.h. */
11854 #ifndef __APPLE_CC__
11855 not a universal capable compiler
11856 #endif
11857 typedef int dummy;
11858
11859 _ACEOF
11860 if ac_fn_c_try_compile "$LINENO"; then :
11861
11862 # Check for potential -arch flags. It is not universal unless
11863 # there are at least two -arch flags with different values.
11864 ac_arch=
11865 ac_prev=
11866 for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
11867 if test -n "$ac_prev"; then
11868 case $ac_word in
11869 i?86 | x86_64 | ppc | ppc64)
11870 if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
11871 ac_arch=$ac_word
11872 else
11873 ac_cv_c_bigendian=universal
11874 break
11875 fi
11876 ;;
11877 esac
11878 ac_prev=
11879 elif test "x$ac_word" = "x-arch"; then
11880 ac_prev=arch
11881 fi
11882 done
11883 fi
11884 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11885 if test $ac_cv_c_bigendian = unknown; then
11886 # See if sys/param.h defines the BYTE_ORDER macro.
11887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11888 /* end confdefs.h. */
11889 #include <sys/types.h>
11890 #include <sys/param.h>
11891
11892 int
11893 main ()
11894 {
11895 #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
11896 && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
11897 && LITTLE_ENDIAN)
11898 bogus endian macros
11899 #endif
11900
11901 ;
11902 return 0;
11903 }
11904 _ACEOF
11905 if ac_fn_c_try_compile "$LINENO"; then :
11906 # It does; now see whether it defined to BIG_ENDIAN or not.
11907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11908 /* end confdefs.h. */
11909 #include <sys/types.h>
11910 #include <sys/param.h>
11911
11912 int
11913 main ()
11914 {
11915 #if BYTE_ORDER != BIG_ENDIAN
11916 not big endian
11917 #endif
11918
11919 ;
11920 return 0;
11921 }
11922 _ACEOF
11923 if ac_fn_c_try_compile "$LINENO"; then :
11924 ac_cv_c_bigendian=yes
11925 else
11926 ac_cv_c_bigendian=no
11927 fi
11928 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11929 fi
11930 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11931 fi
11932 if test $ac_cv_c_bigendian = unknown; then
11933 # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
11934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11935 /* end confdefs.h. */
11936 #include <limits.h>
11937
11938 int
11939 main ()
11940 {
11941 #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
11942 bogus endian macros
11943 #endif
11944
11945 ;
11946 return 0;
11947 }
11948 _ACEOF
11949 if ac_fn_c_try_compile "$LINENO"; then :
11950 # It does; now see whether it defined to _BIG_ENDIAN or not.
11951 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11952 /* end confdefs.h. */
11953 #include <limits.h>
11954
11955 int
11956 main ()
11957 {
11958 #ifndef _BIG_ENDIAN
11959 not big endian
11960 #endif
11961
11962 ;
11963 return 0;
11964 }
11965 _ACEOF
11966 if ac_fn_c_try_compile "$LINENO"; then :
11967 ac_cv_c_bigendian=yes
11968 else
11969 ac_cv_c_bigendian=no
11970 fi
11971 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11972 fi
11973 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
11974 fi
11975 if test $ac_cv_c_bigendian = unknown; then
11976 # Compile a test program.
11977 if test "$cross_compiling" = yes; then :
11978 # Try to guess by grepping values from an object file.
11979 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
11980 /* end confdefs.h. */
11981 short int ascii_mm[] =
11982 { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
11983 short int ascii_ii[] =
11984 { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
11985 int use_ascii (int i) {
11986 return ascii_mm[i] + ascii_ii[i];
11987 }
11988 short int ebcdic_ii[] =
11989 { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
11990 short int ebcdic_mm[] =
11991 { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
11992 int use_ebcdic (int i) {
11993 return ebcdic_mm[i] + ebcdic_ii[i];
11994 }
11995 extern int foo;
11996
11997 int
11998 main ()
11999 {
12000 return use_ascii (foo) == use_ebcdic (foo);
12001 ;
12002 return 0;
12003 }
12004 _ACEOF
12005 if ac_fn_c_try_compile "$LINENO"; then :
12006 if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
12007 ac_cv_c_bigendian=yes
12008 fi
12009 if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
12010 if test "$ac_cv_c_bigendian" = unknown; then
12011 ac_cv_c_bigendian=no
12012 else
12013 # finding both strings is unlikely to happen, but who knows?
12014 ac_cv_c_bigendian=unknown
12015 fi
12016 fi
12017 fi
12018 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12019 else
12020 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12021 /* end confdefs.h. */
12022 $ac_includes_default
12023 int
12024 main ()
12025 {
12026
12027 /* Are we little or big endian? From Harbison&Steele. */
12028 union
12029 {
12030 long int l;
12031 char c[sizeof (long int)];
12032 } u;
12033 u.l = 1;
12034 return u.c[sizeof (long int) - 1] == 1;
12035
12036 ;
12037 return 0;
12038 }
12039 _ACEOF
12040 if ac_fn_c_try_run "$LINENO"; then :
12041 ac_cv_c_bigendian=no
12042 else
12043 ac_cv_c_bigendian=yes
12044 fi
12045 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12046 conftest.$ac_objext conftest.beam conftest.$ac_ext
12047 fi
12048
12049 fi
12050 fi
12051 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
12052 $as_echo "$ac_cv_c_bigendian" >&6; }
12053 case $ac_cv_c_bigendian in #(
12054 yes)
12055 $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h
12056 ;; #(
12057 no)
12058 ;; #(
12059 universal)
12060
12061 $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h
12062
12063 ;; #(
12064 *)
12065 as_fn_error $? "unknown endianness
12066 presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;;
12067 esac
12068
12069
12070 # ------------------------------ #
12071 # Checks for library functions. #
12072 # ------------------------------ #
12073
12074 for ac_func in getuid getgid \
12075 pipe poll pread pread64 pwrite resize_term \
12076 getpgid setsid \
12077 sigaction sigsetmask socketpair \
12078 ttrace wborder wresize setlocale iconvlist libiconvlist btowc \
12079 setrlimit getrlimit posix_madvise waitpid \
12080 use_default_colors
12081 do :
12082 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12083 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12084 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12085 cat >>confdefs.h <<_ACEOF
12086 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12087 _ACEOF
12088
12089 fi
12090 done
12091
12092
12093 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12094 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12095 if ${am_cv_langinfo_codeset+:} false; then :
12096 $as_echo_n "(cached) " >&6
12097 else
12098 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12099 /* end confdefs.h. */
12100 #include <langinfo.h>
12101 int
12102 main ()
12103 {
12104 char* cs = nl_langinfo(CODESET);
12105 ;
12106 return 0;
12107 }
12108 _ACEOF
12109 if ac_fn_c_try_link "$LINENO"; then :
12110 am_cv_langinfo_codeset=yes
12111 else
12112 am_cv_langinfo_codeset=no
12113 fi
12114 rm -f core conftest.err conftest.$ac_objext \
12115 conftest$ac_exeext conftest.$ac_ext
12116
12117 fi
12118 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12119 $as_echo "$am_cv_langinfo_codeset" >&6; }
12120 if test $am_cv_langinfo_codeset = yes; then
12121
12122 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12123
12124 fi
12125
12126 ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default"
12127 if test "x$ac_cv_type_size_t" = xyes; then :
12128
12129 else
12130
12131 cat >>confdefs.h <<_ACEOF
12132 #define size_t unsigned int
12133 _ACEOF
12134
12135 fi
12136
12137
12138
12139
12140 for ac_header in $ac_header_list
12141 do :
12142 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12143 ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
12144 "
12145 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12146 cat >>confdefs.h <<_ACEOF
12147 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12148 _ACEOF
12149
12150 fi
12151
12152 done
12153
12154
12155
12156
12157
12158
12159
12160 ac_fn_c_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default"
12161 if test "x$ac_cv_type_pid_t" = xyes; then :
12162
12163 else
12164
12165 cat >>confdefs.h <<_ACEOF
12166 #define pid_t int
12167 _ACEOF
12168
12169 fi
12170
12171 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
12172 $as_echo_n "checking for a sed that does not truncate output... " >&6; }
12173 if ${ac_cv_path_SED+:} false; then :
12174 $as_echo_n "(cached) " >&6
12175 else
12176 ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
12177 for ac_i in 1 2 3 4 5 6 7; do
12178 ac_script="$ac_script$as_nl$ac_script"
12179 done
12180 echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
12181 { ac_script=; unset ac_script;}
12182 if test -z "$SED"; then
12183 ac_path_SED_found=false
12184 # Loop through the user's path and test for each of PROGNAME-LIST
12185 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12186 for as_dir in $PATH
12187 do
12188 IFS=$as_save_IFS
12189 test -z "$as_dir" && as_dir=.
12190 for ac_prog in sed gsed; do
12191 for ac_exec_ext in '' $ac_executable_extensions; do
12192 ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
12193 as_fn_executable_p "$ac_path_SED" || continue
12194 # Check for GNU ac_path_SED and select it if it is found.
12195 # Check for GNU $ac_path_SED
12196 case `"$ac_path_SED" --version 2>&1` in
12197 *GNU*)
12198 ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
12199 *)
12200 ac_count=0
12201 $as_echo_n 0123456789 >"conftest.in"
12202 while :
12203 do
12204 cat "conftest.in" "conftest.in" >"conftest.tmp"
12205 mv "conftest.tmp" "conftest.in"
12206 cp "conftest.in" "conftest.nl"
12207 $as_echo '' >> "conftest.nl"
12208 "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
12209 diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12210 as_fn_arith $ac_count + 1 && ac_count=$as_val
12211 if test $ac_count -gt ${ac_path_SED_max-0}; then
12212 # Best one so far, save it but keep looking for a better one
12213 ac_cv_path_SED="$ac_path_SED"
12214 ac_path_SED_max=$ac_count
12215 fi
12216 # 10*(2^10) chars as input seems more than enough
12217 test $ac_count -gt 10 && break
12218 done
12219 rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12220 esac
12221
12222 $ac_path_SED_found && break 3
12223 done
12224 done
12225 done
12226 IFS=$as_save_IFS
12227 if test -z "$ac_cv_path_SED"; then
12228 as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
12229 fi
12230 else
12231 ac_cv_path_SED=$SED
12232 fi
12233
12234 fi
12235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
12236 $as_echo "$ac_cv_path_SED" >&6; }
12237 SED="$ac_cv_path_SED"
12238 rm -f conftest.sed
12239
12240
12241 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
12242 $as_echo_n "checking for ANSI C header files... " >&6; }
12243 if ${ac_cv_header_stdc+:} false; then :
12244 $as_echo_n "(cached) " >&6
12245 else
12246 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12247 /* end confdefs.h. */
12248 #include <stdlib.h>
12249 #include <stdarg.h>
12250 #include <string.h>
12251 #include <float.h>
12252
12253 int
12254 main ()
12255 {
12256
12257 ;
12258 return 0;
12259 }
12260 _ACEOF
12261 if ac_fn_c_try_compile "$LINENO"; then :
12262 ac_cv_header_stdc=yes
12263 else
12264 ac_cv_header_stdc=no
12265 fi
12266 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
12267
12268 if test $ac_cv_header_stdc = yes; then
12269 # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
12270 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12271 /* end confdefs.h. */
12272 #include <string.h>
12273
12274 _ACEOF
12275 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12276 $EGREP "memchr" >/dev/null 2>&1; then :
12277
12278 else
12279 ac_cv_header_stdc=no
12280 fi
12281 rm -f conftest*
12282
12283 fi
12284
12285 if test $ac_cv_header_stdc = yes; then
12286 # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
12287 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12288 /* end confdefs.h. */
12289 #include <stdlib.h>
12290
12291 _ACEOF
12292 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12293 $EGREP "free" >/dev/null 2>&1; then :
12294
12295 else
12296 ac_cv_header_stdc=no
12297 fi
12298 rm -f conftest*
12299
12300 fi
12301
12302 if test $ac_cv_header_stdc = yes; then
12303 # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
12304 if test "$cross_compiling" = yes; then :
12305 :
12306 else
12307 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12308 /* end confdefs.h. */
12309 #include <ctype.h>
12310 #include <stdlib.h>
12311 #if ((' ' & 0x0FF) == 0x020)
12312 # define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
12313 # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
12314 #else
12315 # define ISLOWER(c) \
12316 (('a' <= (c) && (c) <= 'i') \
12317 || ('j' <= (c) && (c) <= 'r') \
12318 || ('s' <= (c) && (c) <= 'z'))
12319 # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
12320 #endif
12321
12322 #define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
12323 int
12324 main ()
12325 {
12326 int i;
12327 for (i = 0; i < 256; i++)
12328 if (XOR (islower (i), ISLOWER (i))
12329 || toupper (i) != TOUPPER (i))
12330 return 2;
12331 return 0;
12332 }
12333 _ACEOF
12334 if ac_fn_c_try_run "$LINENO"; then :
12335
12336 else
12337 ac_cv_header_stdc=no
12338 fi
12339 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12340 conftest.$ac_objext conftest.beam conftest.$ac_ext
12341 fi
12342
12343 fi
12344 fi
12345 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
12346 $as_echo "$ac_cv_header_stdc" >&6; }
12347 if test $ac_cv_header_stdc = yes; then
12348
12349 $as_echo "#define STDC_HEADERS 1" >>confdefs.h
12350
12351 fi
12352
12353 # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
12354 # for constant arguments. Useless!
12355 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5
12356 $as_echo_n "checking for working alloca.h... " >&6; }
12357 if ${ac_cv_working_alloca_h+:} false; then :
12358 $as_echo_n "(cached) " >&6
12359 else
12360 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12361 /* end confdefs.h. */
12362 #include <alloca.h>
12363 int
12364 main ()
12365 {
12366 char *p = (char *) alloca (2 * sizeof (int));
12367 if (p) return 0;
12368 ;
12369 return 0;
12370 }
12371 _ACEOF
12372 if ac_fn_c_try_link "$LINENO"; then :
12373 ac_cv_working_alloca_h=yes
12374 else
12375 ac_cv_working_alloca_h=no
12376 fi
12377 rm -f core conftest.err conftest.$ac_objext \
12378 conftest$ac_exeext conftest.$ac_ext
12379 fi
12380 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5
12381 $as_echo "$ac_cv_working_alloca_h" >&6; }
12382 if test $ac_cv_working_alloca_h = yes; then
12383
12384 $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h
12385
12386 fi
12387
12388 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5
12389 $as_echo_n "checking for alloca... " >&6; }
12390 if ${ac_cv_func_alloca_works+:} false; then :
12391 $as_echo_n "(cached) " >&6
12392 else
12393 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12394 /* end confdefs.h. */
12395 #ifdef __GNUC__
12396 # define alloca __builtin_alloca
12397 #else
12398 # ifdef _MSC_VER
12399 # include <malloc.h>
12400 # define alloca _alloca
12401 # else
12402 # ifdef HAVE_ALLOCA_H
12403 # include <alloca.h>
12404 # else
12405 # ifdef _AIX
12406 #pragma alloca
12407 # else
12408 # ifndef alloca /* predefined by HP cc +Olibcalls */
12409 void *alloca (size_t);
12410 # endif
12411 # endif
12412 # endif
12413 # endif
12414 #endif
12415
12416 int
12417 main ()
12418 {
12419 char *p = (char *) alloca (1);
12420 if (p) return 0;
12421 ;
12422 return 0;
12423 }
12424 _ACEOF
12425 if ac_fn_c_try_link "$LINENO"; then :
12426 ac_cv_func_alloca_works=yes
12427 else
12428 ac_cv_func_alloca_works=no
12429 fi
12430 rm -f core conftest.err conftest.$ac_objext \
12431 conftest$ac_exeext conftest.$ac_ext
12432 fi
12433 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5
12434 $as_echo "$ac_cv_func_alloca_works" >&6; }
12435
12436 if test $ac_cv_func_alloca_works = yes; then
12437
12438 $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h
12439
12440 else
12441 # The SVR3 libPW and SVR4 libucb both contain incompatible functions
12442 # that cause trouble. Some versions do not even contain alloca or
12443 # contain a buggy version. If you still want to use their alloca,
12444 # use ar to extract alloca.o from them instead of compiling alloca.c.
12445
12446 ALLOCA=\${LIBOBJDIR}alloca.$ac_objext
12447
12448 $as_echo "#define C_ALLOCA 1" >>confdefs.h
12449
12450
12451 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5
12452 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; }
12453 if ${ac_cv_os_cray+:} false; then :
12454 $as_echo_n "(cached) " >&6
12455 else
12456 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12457 /* end confdefs.h. */
12458 #if defined CRAY && ! defined CRAY2
12459 webecray
12460 #else
12461 wenotbecray
12462 #endif
12463
12464 _ACEOF
12465 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
12466 $EGREP "webecray" >/dev/null 2>&1; then :
12467 ac_cv_os_cray=yes
12468 else
12469 ac_cv_os_cray=no
12470 fi
12471 rm -f conftest*
12472
12473 fi
12474 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5
12475 $as_echo "$ac_cv_os_cray" >&6; }
12476 if test $ac_cv_os_cray = yes; then
12477 for ac_func in _getb67 GETB67 getb67; do
12478 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12479 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12480 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12481
12482 cat >>confdefs.h <<_ACEOF
12483 #define CRAY_STACKSEG_END $ac_func
12484 _ACEOF
12485
12486 break
12487 fi
12488
12489 done
12490 fi
12491
12492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5
12493 $as_echo_n "checking stack direction for C alloca... " >&6; }
12494 if ${ac_cv_c_stack_direction+:} false; then :
12495 $as_echo_n "(cached) " >&6
12496 else
12497 if test "$cross_compiling" = yes; then :
12498 ac_cv_c_stack_direction=0
12499 else
12500 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12501 /* end confdefs.h. */
12502 $ac_includes_default
12503 int
12504 find_stack_direction (int *addr, int depth)
12505 {
12506 int dir, dummy = 0;
12507 if (! addr)
12508 addr = &dummy;
12509 *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1;
12510 dir = depth ? find_stack_direction (addr, depth - 1) : 0;
12511 return dir + dummy;
12512 }
12513
12514 int
12515 main (int argc, char **argv)
12516 {
12517 return find_stack_direction (0, argc + !argv + 20) < 0;
12518 }
12519 _ACEOF
12520 if ac_fn_c_try_run "$LINENO"; then :
12521 ac_cv_c_stack_direction=1
12522 else
12523 ac_cv_c_stack_direction=-1
12524 fi
12525 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12526 conftest.$ac_objext conftest.beam conftest.$ac_ext
12527 fi
12528
12529 fi
12530 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5
12531 $as_echo "$ac_cv_c_stack_direction" >&6; }
12532 cat >>confdefs.h <<_ACEOF
12533 #define STACK_DIRECTION $ac_cv_c_stack_direction
12534 _ACEOF
12535
12536
12537 fi
12538
12539
12540 WIN32APILIBS=
12541 case ${host} in
12542 *mingw32*)
12543
12544 $as_echo "#define USE_WIN32API 1" >>confdefs.h
12545
12546 WIN32APILIBS="-lws2_32"
12547 ;;
12548 esac
12549
12550
12551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for nl_langinfo and CODESET" >&5
12552 $as_echo_n "checking for nl_langinfo and CODESET... " >&6; }
12553 if ${am_cv_langinfo_codeset+:} false; then :
12554 $as_echo_n "(cached) " >&6
12555 else
12556 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12557 /* end confdefs.h. */
12558 #include <langinfo.h>
12559 int
12560 main ()
12561 {
12562 char* cs = nl_langinfo(CODESET);
12563 ;
12564 return 0;
12565 }
12566 _ACEOF
12567 if ac_fn_c_try_link "$LINENO"; then :
12568 am_cv_langinfo_codeset=yes
12569 else
12570 am_cv_langinfo_codeset=no
12571 fi
12572 rm -f core conftest.err conftest.$ac_objext \
12573 conftest$ac_exeext conftest.$ac_ext
12574
12575 fi
12576 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_langinfo_codeset" >&5
12577 $as_echo "$am_cv_langinfo_codeset" >&6; }
12578 if test $am_cv_langinfo_codeset = yes; then
12579
12580 $as_echo "#define HAVE_LANGINFO_CODESET 1" >>confdefs.h
12581
12582 fi
12583
12584
12585 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
12586 do :
12587 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
12588 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
12589 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
12590 cat >>confdefs.h <<_ACEOF
12591 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
12592 _ACEOF
12593
12594 fi
12595
12596 done
12597
12598
12599
12600 for ac_func in getpagesize
12601 do :
12602 ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize"
12603 if test "x$ac_cv_func_getpagesize" = xyes; then :
12604 cat >>confdefs.h <<_ACEOF
12605 #define HAVE_GETPAGESIZE 1
12606 _ACEOF
12607
12608 fi
12609 done
12610
12611 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5
12612 $as_echo_n "checking for working mmap... " >&6; }
12613 if ${ac_cv_func_mmap_fixed_mapped+:} false; then :
12614 $as_echo_n "(cached) " >&6
12615 else
12616 if test "$cross_compiling" = yes; then :
12617 ac_cv_func_mmap_fixed_mapped=no
12618 else
12619 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12620 /* end confdefs.h. */
12621 $ac_includes_default
12622 /* malloc might have been renamed as rpl_malloc. */
12623 #undef malloc
12624
12625 /* Thanks to Mike Haertel and Jim Avera for this test.
12626 Here is a matrix of mmap possibilities:
12627 mmap private not fixed
12628 mmap private fixed at somewhere currently unmapped
12629 mmap private fixed at somewhere already mapped
12630 mmap shared not fixed
12631 mmap shared fixed at somewhere currently unmapped
12632 mmap shared fixed at somewhere already mapped
12633 For private mappings, we should verify that changes cannot be read()
12634 back from the file, nor mmap's back from the file at a different
12635 address. (There have been systems where private was not correctly
12636 implemented like the infamous i386 svr4.0, and systems where the
12637 VM page cache was not coherent with the file system buffer cache
12638 like early versions of FreeBSD and possibly contemporary NetBSD.)
12639 For shared mappings, we should conversely verify that changes get
12640 propagated back to all the places they're supposed to be.
12641
12642 Grep wants private fixed already mapped.
12643 The main things grep needs to know about mmap are:
12644 * does it exist and is it safe to write into the mmap'd area
12645 * how to use it (BSD variants) */
12646
12647 #include <fcntl.h>
12648 #include <sys/mman.h>
12649
12650 #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H
12651 char *malloc ();
12652 #endif
12653
12654 /* This mess was copied from the GNU getpagesize.h. */
12655 #ifndef HAVE_GETPAGESIZE
12656 # ifdef _SC_PAGESIZE
12657 # define getpagesize() sysconf(_SC_PAGESIZE)
12658 # else /* no _SC_PAGESIZE */
12659 # ifdef HAVE_SYS_PARAM_H
12660 # include <sys/param.h>
12661 # ifdef EXEC_PAGESIZE
12662 # define getpagesize() EXEC_PAGESIZE
12663 # else /* no EXEC_PAGESIZE */
12664 # ifdef NBPG
12665 # define getpagesize() NBPG * CLSIZE
12666 # ifndef CLSIZE
12667 # define CLSIZE 1
12668 # endif /* no CLSIZE */
12669 # else /* no NBPG */
12670 # ifdef NBPC
12671 # define getpagesize() NBPC
12672 # else /* no NBPC */
12673 # ifdef PAGESIZE
12674 # define getpagesize() PAGESIZE
12675 # endif /* PAGESIZE */
12676 # endif /* no NBPC */
12677 # endif /* no NBPG */
12678 # endif /* no EXEC_PAGESIZE */
12679 # else /* no HAVE_SYS_PARAM_H */
12680 # define getpagesize() 8192 /* punt totally */
12681 # endif /* no HAVE_SYS_PARAM_H */
12682 # endif /* no _SC_PAGESIZE */
12683
12684 #endif /* no HAVE_GETPAGESIZE */
12685
12686 int
12687 main ()
12688 {
12689 char *data, *data2, *data3;
12690 const char *cdata2;
12691 int i, pagesize;
12692 int fd, fd2;
12693
12694 pagesize = getpagesize ();
12695
12696 /* First, make a file with some known garbage in it. */
12697 data = (char *) malloc (pagesize);
12698 if (!data)
12699 return 1;
12700 for (i = 0; i < pagesize; ++i)
12701 *(data + i) = rand ();
12702 umask (0);
12703 fd = creat ("conftest.mmap", 0600);
12704 if (fd < 0)
12705 return 2;
12706 if (write (fd, data, pagesize) != pagesize)
12707 return 3;
12708 close (fd);
12709
12710 /* Next, check that the tail of a page is zero-filled. File must have
12711 non-zero length, otherwise we risk SIGBUS for entire page. */
12712 fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600);
12713 if (fd2 < 0)
12714 return 4;
12715 cdata2 = "";
12716 if (write (fd2, cdata2, 1) != 1)
12717 return 5;
12718 data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L);
12719 if (data2 == MAP_FAILED)
12720 return 6;
12721 for (i = 0; i < pagesize; ++i)
12722 if (*(data2 + i))
12723 return 7;
12724 close (fd2);
12725 if (munmap (data2, pagesize))
12726 return 8;
12727
12728 /* Next, try to mmap the file at a fixed address which already has
12729 something else allocated at it. If we can, also make sure that
12730 we see the same garbage. */
12731 fd = open ("conftest.mmap", O_RDWR);
12732 if (fd < 0)
12733 return 9;
12734 if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
12735 MAP_PRIVATE | MAP_FIXED, fd, 0L))
12736 return 10;
12737 for (i = 0; i < pagesize; ++i)
12738 if (*(data + i) != *(data2 + i))
12739 return 11;
12740
12741 /* Finally, make sure that changes to the mapped area do not
12742 percolate back to the file as seen by read(). (This is a bug on
12743 some variants of i386 svr4.0.) */
12744 for (i = 0; i < pagesize; ++i)
12745 *(data2 + i) = *(data2 + i) + 1;
12746 data3 = (char *) malloc (pagesize);
12747 if (!data3)
12748 return 12;
12749 if (read (fd, data3, pagesize) != pagesize)
12750 return 13;
12751 for (i = 0; i < pagesize; ++i)
12752 if (*(data + i) != *(data3 + i))
12753 return 14;
12754 close (fd);
12755 return 0;
12756 }
12757 _ACEOF
12758 if ac_fn_c_try_run "$LINENO"; then :
12759 ac_cv_func_mmap_fixed_mapped=yes
12760 else
12761 ac_cv_func_mmap_fixed_mapped=no
12762 fi
12763 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12764 conftest.$ac_objext conftest.beam conftest.$ac_ext
12765 fi
12766
12767 fi
12768 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5
12769 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; }
12770 if test $ac_cv_func_mmap_fixed_mapped = yes; then
12771
12772 $as_echo "#define HAVE_MMAP 1" >>confdefs.h
12773
12774 fi
12775 rm -f conftest.mmap conftest.txt
12776
12777 for ac_header in vfork.h
12778 do :
12779 ac_fn_c_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default"
12780 if test "x$ac_cv_header_vfork_h" = xyes; then :
12781 cat >>confdefs.h <<_ACEOF
12782 #define HAVE_VFORK_H 1
12783 _ACEOF
12784
12785 fi
12786
12787 done
12788
12789 for ac_func in fork vfork
12790 do :
12791 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12792 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12793 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12794 cat >>confdefs.h <<_ACEOF
12795 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12796 _ACEOF
12797
12798 fi
12799 done
12800
12801 if test "x$ac_cv_func_fork" = xyes; then
12802 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5
12803 $as_echo_n "checking for working fork... " >&6; }
12804 if ${ac_cv_func_fork_works+:} false; then :
12805 $as_echo_n "(cached) " >&6
12806 else
12807 if test "$cross_compiling" = yes; then :
12808 ac_cv_func_fork_works=cross
12809 else
12810 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12811 /* end confdefs.h. */
12812 $ac_includes_default
12813 int
12814 main ()
12815 {
12816
12817 /* By Ruediger Kuhlmann. */
12818 return fork () < 0;
12819
12820 ;
12821 return 0;
12822 }
12823 _ACEOF
12824 if ac_fn_c_try_run "$LINENO"; then :
12825 ac_cv_func_fork_works=yes
12826 else
12827 ac_cv_func_fork_works=no
12828 fi
12829 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12830 conftest.$ac_objext conftest.beam conftest.$ac_ext
12831 fi
12832
12833 fi
12834 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5
12835 $as_echo "$ac_cv_func_fork_works" >&6; }
12836
12837 else
12838 ac_cv_func_fork_works=$ac_cv_func_fork
12839 fi
12840 if test "x$ac_cv_func_fork_works" = xcross; then
12841 case $host in
12842 *-*-amigaos* | *-*-msdosdjgpp*)
12843 # Override, as these systems have only a dummy fork() stub
12844 ac_cv_func_fork_works=no
12845 ;;
12846 *)
12847 ac_cv_func_fork_works=yes
12848 ;;
12849 esac
12850 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5
12851 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;}
12852 fi
12853 ac_cv_func_vfork_works=$ac_cv_func_vfork
12854 if test "x$ac_cv_func_vfork" = xyes; then
12855 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5
12856 $as_echo_n "checking for working vfork... " >&6; }
12857 if ${ac_cv_func_vfork_works+:} false; then :
12858 $as_echo_n "(cached) " >&6
12859 else
12860 if test "$cross_compiling" = yes; then :
12861 ac_cv_func_vfork_works=cross
12862 else
12863 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
12864 /* end confdefs.h. */
12865 /* Thanks to Paul Eggert for this test. */
12866 $ac_includes_default
12867 #include <sys/wait.h>
12868 #ifdef HAVE_VFORK_H
12869 # include <vfork.h>
12870 #endif
12871 /* On some sparc systems, changes by the child to local and incoming
12872 argument registers are propagated back to the parent. The compiler
12873 is told about this with #include <vfork.h>, but some compilers
12874 (e.g. gcc -O) don't grok <vfork.h>. Test for this by using a
12875 static variable whose address is put into a register that is
12876 clobbered by the vfork. */
12877 static void
12878 #ifdef __cplusplus
12879 sparc_address_test (int arg)
12880 # else
12881 sparc_address_test (arg) int arg;
12882 #endif
12883 {
12884 static pid_t child;
12885 if (!child) {
12886 child = vfork ();
12887 if (child < 0) {
12888 perror ("vfork");
12889 _exit(2);
12890 }
12891 if (!child) {
12892 arg = getpid();
12893 write(-1, "", 0);
12894 _exit (arg);
12895 }
12896 }
12897 }
12898
12899 int
12900 main ()
12901 {
12902 pid_t parent = getpid ();
12903 pid_t child;
12904
12905 sparc_address_test (0);
12906
12907 child = vfork ();
12908
12909 if (child == 0) {
12910 /* Here is another test for sparc vfork register problems. This
12911 test uses lots of local variables, at least as many local
12912 variables as main has allocated so far including compiler
12913 temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris
12914 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should
12915 reuse the register of parent for one of the local variables,
12916 since it will think that parent can't possibly be used any more
12917 in this routine. Assigning to the local variable will thus
12918 munge parent in the parent process. */
12919 pid_t
12920 p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
12921 p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
12922 /* Convince the compiler that p..p7 are live; otherwise, it might
12923 use the same hardware register for all 8 local variables. */
12924 if (p != p1 || p != p2 || p != p3 || p != p4
12925 || p != p5 || p != p6 || p != p7)
12926 _exit(1);
12927
12928 /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
12929 from child file descriptors. If the child closes a descriptor
12930 before it execs or exits, this munges the parent's descriptor
12931 as well. Test for this by closing stdout in the child. */
12932 _exit(close(fileno(stdout)) != 0);
12933 } else {
12934 int status;
12935 struct stat st;
12936
12937 while (wait(&status) != child)
12938 ;
12939 return (
12940 /* Was there some problem with vforking? */
12941 child < 0
12942
12943 /* Did the child fail? (This shouldn't happen.) */
12944 || status
12945
12946 /* Did the vfork/compiler bug occur? */
12947 || parent != getpid()
12948
12949 /* Did the file descriptor bug occur? */
12950 || fstat(fileno(stdout), &st) != 0
12951 );
12952 }
12953 }
12954 _ACEOF
12955 if ac_fn_c_try_run "$LINENO"; then :
12956 ac_cv_func_vfork_works=yes
12957 else
12958 ac_cv_func_vfork_works=no
12959 fi
12960 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
12961 conftest.$ac_objext conftest.beam conftest.$ac_ext
12962 fi
12963
12964 fi
12965 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5
12966 $as_echo "$ac_cv_func_vfork_works" >&6; }
12967
12968 fi;
12969 if test "x$ac_cv_func_fork_works" = xcross; then
12970 ac_cv_func_vfork_works=$ac_cv_func_vfork
12971 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5
12972 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;}
12973 fi
12974
12975 if test "x$ac_cv_func_vfork_works" = xyes; then
12976
12977 $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h
12978
12979 else
12980
12981 $as_echo "#define vfork fork" >>confdefs.h
12982
12983 fi
12984 if test "x$ac_cv_func_fork_works" = xyes; then
12985
12986 $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h
12987
12988 fi
12989
12990 for ac_func in fdwalk getrlimit pipe pipe2 socketpair sigaction \
12991 ptrace64 sbrk setns sigaltstack sigprocmask \
12992 setpgid setpgrp getrusage getauxval
12993 do :
12994 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
12995 ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var"
12996 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
12997 cat >>confdefs.h <<_ACEOF
12998 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
12999 _ACEOF
13000
13001 fi
13002 done
13003
13004
13005 ac_fn_c_check_decl "$LINENO" "ADDR_NO_RANDOMIZE" "ac_cv_have_decl_ADDR_NO_RANDOMIZE" "#include <sys/personality.h>
13006 "
13007 if test "x$ac_cv_have_decl_ADDR_NO_RANDOMIZE" = xyes; then :
13008 ac_have_decl=1
13009 else
13010 ac_have_decl=0
13011 fi
13012
13013 cat >>confdefs.h <<_ACEOF
13014 #define HAVE_DECL_ADDR_NO_RANDOMIZE $ac_have_decl
13015 _ACEOF
13016
13017
13018 if test "$cross_compiling" = yes; then :
13019 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13020 /* end confdefs.h. */
13021 #include <sys/personality.h>
13022 int
13023 main ()
13024 {
13025
13026 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13027 # define ADDR_NO_RANDOMIZE 0x0040000
13028 # endif
13029 /* Test the flag could be set and stays set. */
13030 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13031 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13032 return 1
13033 ;
13034 return 0;
13035 }
13036 _ACEOF
13037 if ac_fn_c_try_link "$LINENO"; then :
13038 have_personality=true
13039 else
13040 have_personality=false
13041 fi
13042 rm -f core conftest.err conftest.$ac_objext \
13043 conftest$ac_exeext conftest.$ac_ext
13044 else
13045 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13046 /* end confdefs.h. */
13047 #include <sys/personality.h>
13048 int
13049 main ()
13050 {
13051
13052 # if !HAVE_DECL_ADDR_NO_RANDOMIZE
13053 # define ADDR_NO_RANDOMIZE 0x0040000
13054 # endif
13055 /* Test the flag could be set and stays set. */
13056 personality (personality (0xffffffff) | ADDR_NO_RANDOMIZE);
13057 if (!(personality (personality (0xffffffff)) & ADDR_NO_RANDOMIZE))
13058 return 1
13059 ;
13060 return 0;
13061 }
13062 _ACEOF
13063 if ac_fn_c_try_run "$LINENO"; then :
13064 have_personality=true
13065 else
13066 have_personality=false
13067 fi
13068 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
13069 conftest.$ac_objext conftest.beam conftest.$ac_ext
13070 fi
13071
13072 if $have_personality
13073 then
13074
13075 $as_echo "#define HAVE_PERSONALITY 1" >>confdefs.h
13076
13077 fi
13078
13079 ac_fn_c_check_decl "$LINENO" "strstr" "ac_cv_have_decl_strstr" "$ac_includes_default"
13080 if test "x$ac_cv_have_decl_strstr" = xyes; then :
13081 ac_have_decl=1
13082 else
13083 ac_have_decl=0
13084 fi
13085
13086 cat >>confdefs.h <<_ACEOF
13087 #define HAVE_DECL_STRSTR $ac_have_decl
13088 _ACEOF
13089
13090
13091 # ----------------------- #
13092 # Checks for structures. #
13093 # ----------------------- #
13094
13095 ac_fn_c_check_member "$LINENO" "struct stat" "st_blocks" "ac_cv_member_struct_stat_st_blocks" "$ac_includes_default"
13096 if test "x$ac_cv_member_struct_stat_st_blocks" = xyes; then :
13097
13098 cat >>confdefs.h <<_ACEOF
13099 #define HAVE_STRUCT_STAT_ST_BLOCKS 1
13100 _ACEOF
13101
13102
13103 fi
13104 ac_fn_c_check_member "$LINENO" "struct stat" "st_blksize" "ac_cv_member_struct_stat_st_blksize" "$ac_includes_default"
13105 if test "x$ac_cv_member_struct_stat_st_blksize" = xyes; then :
13106
13107 cat >>confdefs.h <<_ACEOF
13108 #define HAVE_STRUCT_STAT_ST_BLKSIZE 1
13109 _ACEOF
13110
13111
13112 fi
13113
13114
13115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing kinfo_getfile" >&5
13116 $as_echo_n "checking for library containing kinfo_getfile... " >&6; }
13117 if ${ac_cv_search_kinfo_getfile+:} false; then :
13118 $as_echo_n "(cached) " >&6
13119 else
13120 ac_func_search_save_LIBS=$LIBS
13121 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13122 /* end confdefs.h. */
13123
13124 /* Override any GCC internal prototype to avoid an error.
13125 Use char because int might match the return type of a GCC
13126 builtin and then its argument prototype would still apply. */
13127 #ifdef __cplusplus
13128 extern "C"
13129 #endif
13130 char kinfo_getfile ();
13131 int
13132 main ()
13133 {
13134 return kinfo_getfile ();
13135 ;
13136 return 0;
13137 }
13138 _ACEOF
13139 for ac_lib in '' util util-freebsd; do
13140 if test -z "$ac_lib"; then
13141 ac_res="none required"
13142 else
13143 ac_res=-l$ac_lib
13144 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
13145 fi
13146 if ac_fn_c_try_link "$LINENO"; then :
13147 ac_cv_search_kinfo_getfile=$ac_res
13148 fi
13149 rm -f core conftest.err conftest.$ac_objext \
13150 conftest$ac_exeext
13151 if ${ac_cv_search_kinfo_getfile+:} false; then :
13152 break
13153 fi
13154 done
13155 if ${ac_cv_search_kinfo_getfile+:} false; then :
13156
13157 else
13158 ac_cv_search_kinfo_getfile=no
13159 fi
13160 rm conftest.$ac_ext
13161 LIBS=$ac_func_search_save_LIBS
13162 fi
13163 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_kinfo_getfile" >&5
13164 $as_echo "$ac_cv_search_kinfo_getfile" >&6; }
13165 ac_res=$ac_cv_search_kinfo_getfile
13166 if test "$ac_res" != no; then :
13167 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
13168
13169 $as_echo "#define HAVE_KINFO_GETFILE 1" >>confdefs.h
13170
13171 fi
13172
13173
13174 # Check for std::thread. This does not work on some platforms, like
13175 # mingw and DJGPP.
13176 ac_ext=cpp
13177 ac_cpp='$CXXCPP $CPPFLAGS'
13178 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13179 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13180 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13181
13182
13183
13184
13185
13186 ac_ext=c
13187 ac_cpp='$CPP $CPPFLAGS'
13188 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13189 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13190 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13191
13192 ax_pthread_ok=no
13193
13194 # We used to check for pthread.h first, but this fails if pthread.h
13195 # requires special compiler flags (e.g. on Tru64 or Sequent).
13196 # It gets checked for in the link test anyway.
13197
13198 # First of all, check if the user has set any of the PTHREAD_LIBS,
13199 # etcetera environment variables, and if threads linking works using
13200 # them:
13201 if test "x$PTHREAD_CFLAGS$PTHREAD_LIBS" != "x"; then
13202 ax_pthread_save_CC="$CC"
13203 ax_pthread_save_CFLAGS="$CFLAGS"
13204 ax_pthread_save_LIBS="$LIBS"
13205 if test "x$PTHREAD_CC" != "x"; then :
13206 CC="$PTHREAD_CC"
13207 fi
13208 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13209 LIBS="$PTHREAD_LIBS $LIBS"
13210 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS" >&5
13211 $as_echo_n "checking for pthread_join using $CC $PTHREAD_CFLAGS $PTHREAD_LIBS... " >&6; }
13212 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13213 /* end confdefs.h. */
13214
13215 /* Override any GCC internal prototype to avoid an error.
13216 Use char because int might match the return type of a GCC
13217 builtin and then its argument prototype would still apply. */
13218 #ifdef __cplusplus
13219 extern "C"
13220 #endif
13221 char pthread_join ();
13222 int
13223 main ()
13224 {
13225 return pthread_join ();
13226 ;
13227 return 0;
13228 }
13229 _ACEOF
13230 if ac_fn_c_try_link "$LINENO"; then :
13231 ax_pthread_ok=yes
13232 fi
13233 rm -f core conftest.err conftest.$ac_objext \
13234 conftest$ac_exeext conftest.$ac_ext
13235 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13236 $as_echo "$ax_pthread_ok" >&6; }
13237 if test "x$ax_pthread_ok" = "xno"; then
13238 PTHREAD_LIBS=""
13239 PTHREAD_CFLAGS=""
13240 fi
13241 CC="$ax_pthread_save_CC"
13242 CFLAGS="$ax_pthread_save_CFLAGS"
13243 LIBS="$ax_pthread_save_LIBS"
13244 fi
13245
13246 # We must check for the threads library under a number of different
13247 # names; the ordering is very important because some systems
13248 # (e.g. DEC) have both -lpthread and -lpthreads, where one of the
13249 # libraries is broken (non-POSIX).
13250
13251 # Create a list of thread flags to try. Items starting with a "-" are
13252 # C compiler flags, and other items are library names, except for "none"
13253 # which indicates that we try without any flags at all, and "pthread-config"
13254 # which is a program returning the flags for the Pth emulation library.
13255
13256 ax_pthread_flags="pthreads none -Kthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config"
13257
13258 # The ordering *is* (sometimes) important. Some notes on the
13259 # individual items follow:
13260
13261 # pthreads: AIX (must check this before -lpthread)
13262 # none: in case threads are in libc; should be tried before -Kthread and
13263 # other compiler flags to prevent continual compiler warnings
13264 # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h)
13265 # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads), Tru64
13266 # (Note: HP C rejects this with "bad form for `-t' option")
13267 # -pthreads: Solaris/gcc (Note: HP C also rejects)
13268 # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it
13269 # doesn't hurt to check since this sometimes defines pthreads and
13270 # -D_REENTRANT too), HP C (must be checked before -lpthread, which
13271 # is present but should not be used directly; and before -mthreads,
13272 # because the compiler interprets this as "-mt" + "-hreads")
13273 # -mthreads: Mingw32/gcc, Lynx/gcc
13274 # pthread: Linux, etcetera
13275 # --thread-safe: KAI C++
13276 # pthread-config: use pthread-config program (for GNU Pth library)
13277
13278 case $host_os in
13279
13280 freebsd*)
13281
13282 # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able)
13283 # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread)
13284
13285 ax_pthread_flags="-kthread lthread $ax_pthread_flags"
13286 ;;
13287
13288 hpux*)
13289
13290 # From the cc(1) man page: "[-mt] Sets various -D flags to enable
13291 # multi-threading and also sets -lpthread."
13292
13293 ax_pthread_flags="-mt -pthread pthread $ax_pthread_flags"
13294 ;;
13295
13296 openedition*)
13297
13298 # IBM z/OS requires a feature-test macro to be defined in order to
13299 # enable POSIX threads at all, so give the user a hint if this is
13300 # not set. (We don't define these ourselves, as they can affect
13301 # other portions of the system API in unpredictable ways.)
13302
13303 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13304 /* end confdefs.h. */
13305
13306 # if !defined(_OPEN_THREADS) && !defined(_UNIX03_THREADS)
13307 AX_PTHREAD_ZOS_MISSING
13308 # endif
13309
13310 _ACEOF
13311 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13312 $EGREP "AX_PTHREAD_ZOS_MISSING" >/dev/null 2>&1; then :
13313 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&5
13314 $as_echo "$as_me: WARNING: IBM z/OS requires -D_OPEN_THREADS or -D_UNIX03_THREADS to enable pthreads support." >&2;}
13315 fi
13316 rm -f conftest*
13317
13318 ;;
13319
13320 solaris*)
13321
13322 # On Solaris (at least, for some versions), libc contains stubbed
13323 # (non-functional) versions of the pthreads routines, so link-based
13324 # tests will erroneously succeed. (N.B.: The stubs are missing
13325 # pthread_cleanup_push, or rather a function called by this macro,
13326 # so we could check for that, but who knows whether they'll stub
13327 # that too in a future libc.) So we'll check first for the
13328 # standard Solaris way of linking pthreads (-mt -lpthread).
13329
13330 ax_pthread_flags="-mt,pthread pthread $ax_pthread_flags"
13331 ;;
13332 esac
13333
13334 # GCC generally uses -pthread, or -pthreads on some platforms (e.g. SPARC)
13335
13336 if test "x$GCC" = "xyes"; then :
13337 ax_pthread_flags="-pthread -pthreads $ax_pthread_flags"
13338 fi
13339
13340 # The presence of a feature test macro requesting re-entrant function
13341 # definitions is, on some systems, a strong hint that pthreads support is
13342 # correctly enabled
13343
13344 case $host_os in
13345 darwin* | hpux* | linux* | osf* | solaris*)
13346 ax_pthread_check_macro="_REENTRANT"
13347 ;;
13348
13349 aix*)
13350 ax_pthread_check_macro="_THREAD_SAFE"
13351 ;;
13352
13353 *)
13354 ax_pthread_check_macro="--"
13355 ;;
13356 esac
13357 if test "x$ax_pthread_check_macro" = "x--"; then :
13358 ax_pthread_check_cond=0
13359 else
13360 ax_pthread_check_cond="!defined($ax_pthread_check_macro)"
13361 fi
13362
13363 # Are we compiling with Clang?
13364
13365 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC is Clang" >&5
13366 $as_echo_n "checking whether $CC is Clang... " >&6; }
13367 if ${ax_cv_PTHREAD_CLANG+:} false; then :
13368 $as_echo_n "(cached) " >&6
13369 else
13370 ax_cv_PTHREAD_CLANG=no
13371 # Note that Autoconf sets GCC=yes for Clang as well as GCC
13372 if test "x$GCC" = "xyes"; then
13373 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13374 /* end confdefs.h. */
13375 /* Note: Clang 2.7 lacks __clang_[a-z]+__ */
13376 # if defined(__clang__) && defined(__llvm__)
13377 AX_PTHREAD_CC_IS_CLANG
13378 # endif
13379
13380 _ACEOF
13381 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
13382 $EGREP "AX_PTHREAD_CC_IS_CLANG" >/dev/null 2>&1; then :
13383 ax_cv_PTHREAD_CLANG=yes
13384 fi
13385 rm -f conftest*
13386
13387 fi
13388
13389 fi
13390 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG" >&5
13391 $as_echo "$ax_cv_PTHREAD_CLANG" >&6; }
13392 ax_pthread_clang="$ax_cv_PTHREAD_CLANG"
13393
13394 ax_pthread_clang_warning=no
13395
13396 # Clang needs special handling, because older versions handle the -pthread
13397 # option in a rather... idiosyncratic way
13398
13399 if test "x$ax_pthread_clang" = "xyes"; then
13400
13401 # Clang takes -pthread; it has never supported any other flag
13402
13403 # (Note 1: This will need to be revisited if a system that Clang
13404 # supports has POSIX threads in a separate library. This tends not
13405 # to be the way of modern systems, but it's conceivable.)
13406
13407 # (Note 2: On some systems, notably Darwin, -pthread is not needed
13408 # to get POSIX threads support; the API is always present and
13409 # active. We could reasonably leave PTHREAD_CFLAGS empty. But
13410 # -pthread does define _REENTRANT, and while the Darwin headers
13411 # ignore this macro, third-party headers might not.)
13412
13413 PTHREAD_CFLAGS="-pthread"
13414 PTHREAD_LIBS=
13415
13416 ax_pthread_ok=yes
13417
13418 # However, older versions of Clang make a point of warning the user
13419 # that, in an invocation where only linking and no compilation is
13420 # taking place, the -pthread option has no effect ("argument unused
13421 # during compilation"). They expect -pthread to be passed in only
13422 # when source code is being compiled.
13423 #
13424 # Problem is, this is at odds with the way Automake and most other
13425 # C build frameworks function, which is that the same flags used in
13426 # compilation (CFLAGS) are also used in linking. Many systems
13427 # supported by AX_PTHREAD require exactly this for POSIX threads
13428 # support, and in fact it is often not straightforward to specify a
13429 # flag that is used only in the compilation phase and not in
13430 # linking. Such a scenario is extremely rare in practice.
13431 #
13432 # Even though use of the -pthread flag in linking would only print
13433 # a warning, this can be a nuisance for well-run software projects
13434 # that build with -Werror. So if the active version of Clang has
13435 # this misfeature, we search for an option to squash it.
13436
13437 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread" >&5
13438 $as_echo_n "checking whether Clang needs flag to prevent \"argument unused\" warning when linking with -pthread... " >&6; }
13439 if ${ax_cv_PTHREAD_CLANG_NO_WARN_FLAG+:} false; then :
13440 $as_echo_n "(cached) " >&6
13441 else
13442 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG=unknown
13443 # Create an alternate version of $ac_link that compiles and
13444 # links in two steps (.c -> .o, .o -> exe) instead of one
13445 # (.c -> exe), because the warning occurs only in the second
13446 # step
13447 ax_pthread_save_ac_link="$ac_link"
13448 ax_pthread_sed='s/conftest\.\$ac_ext/conftest.$ac_objext/g'
13449 ax_pthread_link_step=`$as_echo "$ac_link" | sed "$ax_pthread_sed"`
13450 ax_pthread_2step_ac_link="($ac_compile) && (echo ==== >&5) && ($ax_pthread_link_step)"
13451 ax_pthread_save_CFLAGS="$CFLAGS"
13452 for ax_pthread_try in '' -Qunused-arguments -Wno-unused-command-line-argument unknown; do
13453 if test "x$ax_pthread_try" = "xunknown"; then :
13454 break
13455 fi
13456 CFLAGS="-Werror -Wunknown-warning-option $ax_pthread_try -pthread $ax_pthread_save_CFLAGS"
13457 ac_link="$ax_pthread_save_ac_link"
13458 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13459 /* end confdefs.h. */
13460 int main(void){return 0;}
13461 _ACEOF
13462 if ac_fn_c_try_link "$LINENO"; then :
13463 ac_link="$ax_pthread_2step_ac_link"
13464 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13465 /* end confdefs.h. */
13466 int main(void){return 0;}
13467 _ACEOF
13468 if ac_fn_c_try_link "$LINENO"; then :
13469 break
13470 fi
13471 rm -f core conftest.err conftest.$ac_objext \
13472 conftest$ac_exeext conftest.$ac_ext
13473
13474 fi
13475 rm -f core conftest.err conftest.$ac_objext \
13476 conftest$ac_exeext conftest.$ac_ext
13477 done
13478 ac_link="$ax_pthread_save_ac_link"
13479 CFLAGS="$ax_pthread_save_CFLAGS"
13480 if test "x$ax_pthread_try" = "x"; then :
13481 ax_pthread_try=no
13482 fi
13483 ax_cv_PTHREAD_CLANG_NO_WARN_FLAG="$ax_pthread_try"
13484
13485 fi
13486 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&5
13487 $as_echo "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" >&6; }
13488
13489 case "$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG" in
13490 no | unknown) ;;
13491 *) PTHREAD_CFLAGS="$ax_cv_PTHREAD_CLANG_NO_WARN_FLAG $PTHREAD_CFLAGS" ;;
13492 esac
13493
13494 fi # $ax_pthread_clang = yes
13495
13496 if test "x$ax_pthread_ok" = "xno"; then
13497 for ax_pthread_try_flag in $ax_pthread_flags; do
13498
13499 case $ax_pthread_try_flag in
13500 none)
13501 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5
13502 $as_echo_n "checking whether pthreads work without any flags... " >&6; }
13503 ;;
13504
13505 -mt,pthread)
13506 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with -mt -lpthread" >&5
13507 $as_echo_n "checking whether pthreads work with -mt -lpthread... " >&6; }
13508 PTHREAD_CFLAGS="-mt"
13509 PTHREAD_LIBS="-lpthread"
13510 ;;
13511
13512 -*)
13513 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $ax_pthread_try_flag" >&5
13514 $as_echo_n "checking whether pthreads work with $ax_pthread_try_flag... " >&6; }
13515 PTHREAD_CFLAGS="$ax_pthread_try_flag"
13516 ;;
13517
13518 pthread-config)
13519 # Extract the first word of "pthread-config", so it can be a program name with args.
13520 set dummy pthread-config; ac_word=$2
13521 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13522 $as_echo_n "checking for $ac_word... " >&6; }
13523 if ${ac_cv_prog_ax_pthread_config+:} false; then :
13524 $as_echo_n "(cached) " >&6
13525 else
13526 if test -n "$ax_pthread_config"; then
13527 ac_cv_prog_ax_pthread_config="$ax_pthread_config" # Let the user override the test.
13528 else
13529 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13530 for as_dir in $PATH
13531 do
13532 IFS=$as_save_IFS
13533 test -z "$as_dir" && as_dir=.
13534 for ac_exec_ext in '' $ac_executable_extensions; do
13535 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13536 ac_cv_prog_ax_pthread_config="yes"
13537 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13538 break 2
13539 fi
13540 done
13541 done
13542 IFS=$as_save_IFS
13543
13544 test -z "$ac_cv_prog_ax_pthread_config" && ac_cv_prog_ax_pthread_config="no"
13545 fi
13546 fi
13547 ax_pthread_config=$ac_cv_prog_ax_pthread_config
13548 if test -n "$ax_pthread_config"; then
13549 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_config" >&5
13550 $as_echo "$ax_pthread_config" >&6; }
13551 else
13552 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13553 $as_echo "no" >&6; }
13554 fi
13555
13556
13557 if test "x$ax_pthread_config" = "xno"; then :
13558 continue
13559 fi
13560 PTHREAD_CFLAGS="`pthread-config --cflags`"
13561 PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`"
13562 ;;
13563
13564 *)
13565 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$ax_pthread_try_flag" >&5
13566 $as_echo_n "checking for the pthreads library -l$ax_pthread_try_flag... " >&6; }
13567 PTHREAD_LIBS="-l$ax_pthread_try_flag"
13568 ;;
13569 esac
13570
13571 ax_pthread_save_CFLAGS="$CFLAGS"
13572 ax_pthread_save_LIBS="$LIBS"
13573 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13574 LIBS="$PTHREAD_LIBS $LIBS"
13575
13576 # Check for various functions. We must include pthread.h,
13577 # since some functions may be macros. (On the Sequent, we
13578 # need a special flag -Kthread to make this header compile.)
13579 # We check for pthread_join because it is in -lpthread on IRIX
13580 # while pthread_create is in libc. We check for pthread_attr_init
13581 # due to DEC craziness with -lpthreads. We check for
13582 # pthread_cleanup_push because it is one of the few pthread
13583 # functions on Solaris that doesn't have a non-functional libc stub.
13584 # We try pthread_create on general principles.
13585
13586 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13587 /* end confdefs.h. */
13588 #include <pthread.h>
13589 # if $ax_pthread_check_cond
13590 # error "$ax_pthread_check_macro must be defined"
13591 # endif
13592 static void routine(void *a) { a = 0; }
13593 static void *start_routine(void *a) { return a; }
13594 int
13595 main ()
13596 {
13597 pthread_t th; pthread_attr_t attr;
13598 pthread_create(&th, 0, start_routine, 0);
13599 pthread_join(th, 0);
13600 pthread_attr_init(&attr);
13601 pthread_cleanup_push(routine, 0);
13602 pthread_cleanup_pop(0) /* ; */
13603 ;
13604 return 0;
13605 }
13606 _ACEOF
13607 if ac_fn_c_try_link "$LINENO"; then :
13608 ax_pthread_ok=yes
13609 fi
13610 rm -f core conftest.err conftest.$ac_objext \
13611 conftest$ac_exeext conftest.$ac_ext
13612
13613 CFLAGS="$ax_pthread_save_CFLAGS"
13614 LIBS="$ax_pthread_save_LIBS"
13615
13616 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_pthread_ok" >&5
13617 $as_echo "$ax_pthread_ok" >&6; }
13618 if test "x$ax_pthread_ok" = "xyes"; then :
13619 break
13620 fi
13621
13622 PTHREAD_LIBS=""
13623 PTHREAD_CFLAGS=""
13624 done
13625 fi
13626
13627 # Various other checks:
13628 if test "x$ax_pthread_ok" = "xyes"; then
13629 ax_pthread_save_CFLAGS="$CFLAGS"
13630 ax_pthread_save_LIBS="$LIBS"
13631 CFLAGS="$CFLAGS $PTHREAD_CFLAGS"
13632 LIBS="$PTHREAD_LIBS $LIBS"
13633
13634 # Detect AIX lossage: JOINABLE attribute is called UNDETACHED.
13635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5
13636 $as_echo_n "checking for joinable pthread attribute... " >&6; }
13637 if ${ax_cv_PTHREAD_JOINABLE_ATTR+:} false; then :
13638 $as_echo_n "(cached) " >&6
13639 else
13640 ax_cv_PTHREAD_JOINABLE_ATTR=unknown
13641 for ax_pthread_attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do
13642 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13643 /* end confdefs.h. */
13644 #include <pthread.h>
13645 int
13646 main ()
13647 {
13648 int attr = $ax_pthread_attr; return attr /* ; */
13649 ;
13650 return 0;
13651 }
13652 _ACEOF
13653 if ac_fn_c_try_link "$LINENO"; then :
13654 ax_cv_PTHREAD_JOINABLE_ATTR=$ax_pthread_attr; break
13655 fi
13656 rm -f core conftest.err conftest.$ac_objext \
13657 conftest$ac_exeext conftest.$ac_ext
13658 done
13659
13660 fi
13661 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_JOINABLE_ATTR" >&5
13662 $as_echo "$ax_cv_PTHREAD_JOINABLE_ATTR" >&6; }
13663 if test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xunknown" && \
13664 test "x$ax_cv_PTHREAD_JOINABLE_ATTR" != "xPTHREAD_CREATE_JOINABLE" && \
13665 test "x$ax_pthread_joinable_attr_defined" != "xyes"; then :
13666
13667 cat >>confdefs.h <<_ACEOF
13668 #define PTHREAD_CREATE_JOINABLE $ax_cv_PTHREAD_JOINABLE_ATTR
13669 _ACEOF
13670
13671 ax_pthread_joinable_attr_defined=yes
13672
13673 fi
13674
13675 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether more special flags are required for pthreads" >&5
13676 $as_echo_n "checking whether more special flags are required for pthreads... " >&6; }
13677 if ${ax_cv_PTHREAD_SPECIAL_FLAGS+:} false; then :
13678 $as_echo_n "(cached) " >&6
13679 else
13680 ax_cv_PTHREAD_SPECIAL_FLAGS=no
13681 case $host_os in
13682 solaris*)
13683 ax_cv_PTHREAD_SPECIAL_FLAGS="-D_POSIX_PTHREAD_SEMANTICS"
13684 ;;
13685 esac
13686
13687 fi
13688 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_SPECIAL_FLAGS" >&5
13689 $as_echo "$ax_cv_PTHREAD_SPECIAL_FLAGS" >&6; }
13690 if test "x$ax_cv_PTHREAD_SPECIAL_FLAGS" != "xno" && \
13691 test "x$ax_pthread_special_flags_added" != "xyes"; then :
13692 PTHREAD_CFLAGS="$ax_cv_PTHREAD_SPECIAL_FLAGS $PTHREAD_CFLAGS"
13693 ax_pthread_special_flags_added=yes
13694 fi
13695
13696 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTHREAD_PRIO_INHERIT" >&5
13697 $as_echo_n "checking for PTHREAD_PRIO_INHERIT... " >&6; }
13698 if ${ax_cv_PTHREAD_PRIO_INHERIT+:} false; then :
13699 $as_echo_n "(cached) " >&6
13700 else
13701 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13702 /* end confdefs.h. */
13703 #include <pthread.h>
13704 int
13705 main ()
13706 {
13707 int i = PTHREAD_PRIO_INHERIT;
13708 ;
13709 return 0;
13710 }
13711 _ACEOF
13712 if ac_fn_c_try_link "$LINENO"; then :
13713 ax_cv_PTHREAD_PRIO_INHERIT=yes
13714 else
13715 ax_cv_PTHREAD_PRIO_INHERIT=no
13716 fi
13717 rm -f core conftest.err conftest.$ac_objext \
13718 conftest$ac_exeext conftest.$ac_ext
13719
13720 fi
13721 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ax_cv_PTHREAD_PRIO_INHERIT" >&5
13722 $as_echo "$ax_cv_PTHREAD_PRIO_INHERIT" >&6; }
13723 if test "x$ax_cv_PTHREAD_PRIO_INHERIT" = "xyes" && \
13724 test "x$ax_pthread_prio_inherit_defined" != "xyes"; then :
13725
13726 $as_echo "#define HAVE_PTHREAD_PRIO_INHERIT 1" >>confdefs.h
13727
13728 ax_pthread_prio_inherit_defined=yes
13729
13730 fi
13731
13732 CFLAGS="$ax_pthread_save_CFLAGS"
13733 LIBS="$ax_pthread_save_LIBS"
13734
13735 # More AIX lossage: compile with *_r variant
13736 if test "x$GCC" != "xyes"; then
13737 case $host_os in
13738 aix*)
13739 case "x/$CC" in #(
13740 x*/c89|x*/c89_128|x*/c99|x*/c99_128|x*/cc|x*/cc128|x*/xlc|x*/xlc_v6|x*/xlc128|x*/xlc128_v6) :
13741 #handle absolute path differently from PATH based program lookup
13742 case "x$CC" in #(
13743 x/*) :
13744 if as_fn_executable_p ${CC}_r; then :
13745 PTHREAD_CC="${CC}_r"
13746 fi ;; #(
13747 *) :
13748 for ac_prog in ${CC}_r
13749 do
13750 # Extract the first word of "$ac_prog", so it can be a program name with args.
13751 set dummy $ac_prog; ac_word=$2
13752 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13753 $as_echo_n "checking for $ac_word... " >&6; }
13754 if ${ac_cv_prog_PTHREAD_CC+:} false; then :
13755 $as_echo_n "(cached) " >&6
13756 else
13757 if test -n "$PTHREAD_CC"; then
13758 ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test.
13759 else
13760 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13761 for as_dir in $PATH
13762 do
13763 IFS=$as_save_IFS
13764 test -z "$as_dir" && as_dir=.
13765 for ac_exec_ext in '' $ac_executable_extensions; do
13766 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13767 ac_cv_prog_PTHREAD_CC="$ac_prog"
13768 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13769 break 2
13770 fi
13771 done
13772 done
13773 IFS=$as_save_IFS
13774
13775 fi
13776 fi
13777 PTHREAD_CC=$ac_cv_prog_PTHREAD_CC
13778 if test -n "$PTHREAD_CC"; then
13779 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5
13780 $as_echo "$PTHREAD_CC" >&6; }
13781 else
13782 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13783 $as_echo "no" >&6; }
13784 fi
13785
13786
13787 test -n "$PTHREAD_CC" && break
13788 done
13789 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
13790 ;;
13791 esac ;; #(
13792 *) :
13793 ;;
13794 esac
13795 ;;
13796 esac
13797 fi
13798 fi
13799
13800 test -n "$PTHREAD_CC" || PTHREAD_CC="$CC"
13801
13802
13803
13804
13805
13806 # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND:
13807 if test "x$ax_pthread_ok" = "xyes"; then
13808 threads=yes
13809 :
13810 else
13811 ax_pthread_ok=no
13812 threads=no
13813 fi
13814 ac_ext=cpp
13815 ac_cpp='$CXXCPP $CPPFLAGS'
13816 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13817 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13818 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
13819
13820
13821 if test "$threads" = "yes"; then
13822 save_LIBS="$LIBS"
13823 LIBS="$PTHREAD_LIBS $LIBS"
13824 save_CXXFLAGS="$CXXFLAGS"
13825 CXXFLAGS="$PTHREAD_CFLAGS $save_CXXFLAGS"
13826 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for std::thread" >&5
13827 $as_echo_n "checking for std::thread... " >&6; }
13828 if ${gdb_cv_cxx_std_thread+:} false; then :
13829 $as_echo_n "(cached) " >&6
13830 else
13831 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13832 /* end confdefs.h. */
13833 #include <thread>
13834 void callback() { }
13835 int
13836 main ()
13837 {
13838 std::thread t(callback);
13839 ;
13840 return 0;
13841 }
13842 _ACEOF
13843 if ac_fn_cxx_try_compile "$LINENO"; then :
13844 gdb_cv_cxx_std_thread=yes
13845 else
13846 gdb_cv_cxx_std_thread=no
13847 fi
13848 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13849 fi
13850 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_cxx_std_thread" >&5
13851 $as_echo "$gdb_cv_cxx_std_thread" >&6; }
13852
13853 # This check must be here, while LIBS includes any necessary
13854 # threading library.
13855 for ac_func in pthread_sigmask pthread_setname_np
13856 do :
13857 as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh`
13858 ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var"
13859 if eval test \"x\$"$as_ac_var"\" = x"yes"; then :
13860 cat >>confdefs.h <<_ACEOF
13861 #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1
13862 _ACEOF
13863
13864 fi
13865 done
13866
13867
13868 LIBS="$save_LIBS"
13869 CXXFLAGS="$save_CXXFLAGS"
13870 fi
13871 if test "$gdb_cv_cxx_std_thread" = "yes"; then
13872
13873 $as_echo "#define CXX_STD_THREAD 1" >>confdefs.h
13874
13875 fi
13876 ac_ext=c
13877 ac_cpp='$CPP $CPPFLAGS'
13878 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
13879 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
13880 ac_compiler_gnu=$ac_cv_c_compiler_gnu
13881
13882
13883 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sigsetjmp" >&5
13884 $as_echo_n "checking for sigsetjmp... " >&6; }
13885 if ${gdb_cv_func_sigsetjmp+:} false; then :
13886 $as_echo_n "(cached) " >&6
13887 else
13888 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13889 /* end confdefs.h. */
13890
13891 #include <setjmp.h>
13892
13893 int
13894 main ()
13895 {
13896 sigjmp_buf env; while (! sigsetjmp (env, 1)) siglongjmp (env, 1);
13897 ;
13898 return 0;
13899 }
13900 _ACEOF
13901 if ac_fn_c_try_compile "$LINENO"; then :
13902 gdb_cv_func_sigsetjmp=yes
13903 else
13904 gdb_cv_func_sigsetjmp=no
13905 fi
13906 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
13907 fi
13908 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_sigsetjmp" >&5
13909 $as_echo "$gdb_cv_func_sigsetjmp" >&6; }
13910 if test "$gdb_cv_func_sigsetjmp" = "yes"; then
13911
13912 $as_echo "#define HAVE_SIGSETJMP 1" >>confdefs.h
13913
13914 fi
13915
13916
13917 # Check whether --with-intel_pt was given.
13918 if test "${with_intel_pt+set}" = set; then :
13919 withval=$with_intel_pt;
13920 else
13921 with_intel_pt=auto
13922 fi
13923
13924 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use intel pt" >&5
13925 $as_echo_n "checking whether to use intel pt... " >&6; }
13926 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_intel_pt" >&5
13927 $as_echo "$with_intel_pt" >&6; }
13928
13929 if test "${with_intel_pt}" = no; then
13930 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&5
13931 $as_echo "$as_me: WARNING: Intel Processor Trace support disabled; some features may be unavailable." >&2;}
13932 HAVE_LIBIPT=no
13933 else
13934 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
13935 /* end confdefs.h. */
13936
13937 #include <linux/perf_event.h>
13938 #ifndef PERF_ATTR_SIZE_VER5
13939 # error
13940 #endif
13941
13942 _ACEOF
13943 if ac_fn_c_try_cpp "$LINENO"; then :
13944 perf_event=yes
13945 else
13946 perf_event=no
13947 fi
13948 rm -f conftest.err conftest.i conftest.$ac_ext
13949 if test "$perf_event" != yes; then
13950 if test "$with_intel_pt" = yes; then
13951 as_fn_error $? "linux/perf_event.h missing or too old" "$LINENO" 5
13952 else
13953 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&5
13954 $as_echo "$as_me: WARNING: linux/perf_event.h missing or too old; some features may be unavailable." >&2;}
13955 fi
13956 fi
13957
13958
13959
13960
13961
13962
13963
13964
13965
13966 use_additional=yes
13967
13968 acl_save_prefix="$prefix"
13969 prefix="$acl_final_prefix"
13970 acl_save_exec_prefix="$exec_prefix"
13971 exec_prefix="$acl_final_exec_prefix"
13972
13973 eval additional_includedir=\"$includedir\"
13974 eval additional_libdir=\"$libdir\"
13975
13976 exec_prefix="$acl_save_exec_prefix"
13977 prefix="$acl_save_prefix"
13978
13979
13980 # Check whether --with-libipt-prefix was given.
13981 if test "${with_libipt_prefix+set}" = set; then :
13982 withval=$with_libipt_prefix;
13983 if test "X$withval" = "Xno"; then
13984 use_additional=no
13985 else
13986 if test "X$withval" = "X"; then
13987
13988 acl_save_prefix="$prefix"
13989 prefix="$acl_final_prefix"
13990 acl_save_exec_prefix="$exec_prefix"
13991 exec_prefix="$acl_final_exec_prefix"
13992
13993 eval additional_includedir=\"$includedir\"
13994 eval additional_libdir=\"$libdir\"
13995
13996 exec_prefix="$acl_save_exec_prefix"
13997 prefix="$acl_save_prefix"
13998
13999 else
14000 additional_includedir="$withval/include"
14001 additional_libdir="$withval/lib"
14002 fi
14003 fi
14004
14005 fi
14006
14007 LIBIPT=
14008 LTLIBIPT=
14009 INCIPT=
14010 rpathdirs=
14011 ltrpathdirs=
14012 names_already_handled=
14013 names_next_round='ipt '
14014 while test -n "$names_next_round"; do
14015 names_this_round="$names_next_round"
14016 names_next_round=
14017 for name in $names_this_round; do
14018 already_handled=
14019 for n in $names_already_handled; do
14020 if test "$n" = "$name"; then
14021 already_handled=yes
14022 break
14023 fi
14024 done
14025 if test -z "$already_handled"; then
14026 names_already_handled="$names_already_handled $name"
14027 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
14028 eval value=\"\$HAVE_LIB$uppername\"
14029 if test -n "$value"; then
14030 if test "$value" = yes; then
14031 eval value=\"\$LIB$uppername\"
14032 test -z "$value" || LIBIPT="${LIBIPT}${LIBIPT:+ }$value"
14033 eval value=\"\$LTLIB$uppername\"
14034 test -z "$value" || LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$value"
14035 else
14036 :
14037 fi
14038 else
14039 found_dir=
14040 found_la=
14041 found_so=
14042 found_a=
14043 if test $use_additional = yes; then
14044 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
14045 found_dir="$additional_libdir"
14046 found_so="$additional_libdir/lib$name.$shlibext"
14047 if test -f "$additional_libdir/lib$name.la"; then
14048 found_la="$additional_libdir/lib$name.la"
14049 fi
14050 else
14051 if test -f "$additional_libdir/lib$name.$libext"; then
14052 found_dir="$additional_libdir"
14053 found_a="$additional_libdir/lib$name.$libext"
14054 if test -f "$additional_libdir/lib$name.la"; then
14055 found_la="$additional_libdir/lib$name.la"
14056 fi
14057 fi
14058 fi
14059 fi
14060 if test "X$found_dir" = "X"; then
14061 for x in $LDFLAGS $LTLIBIPT; do
14062
14063 acl_save_prefix="$prefix"
14064 prefix="$acl_final_prefix"
14065 acl_save_exec_prefix="$exec_prefix"
14066 exec_prefix="$acl_final_exec_prefix"
14067 eval x=\"$x\"
14068 exec_prefix="$acl_save_exec_prefix"
14069 prefix="$acl_save_prefix"
14070
14071 case "$x" in
14072 -L*)
14073 dir=`echo "X$x" | sed -e 's/^X-L//'`
14074 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
14075 found_dir="$dir"
14076 found_so="$dir/lib$name.$shlibext"
14077 if test -f "$dir/lib$name.la"; then
14078 found_la="$dir/lib$name.la"
14079 fi
14080 else
14081 if test -f "$dir/lib$name.$libext"; then
14082 found_dir="$dir"
14083 found_a="$dir/lib$name.$libext"
14084 if test -f "$dir/lib$name.la"; then
14085 found_la="$dir/lib$name.la"
14086 fi
14087 fi
14088 fi
14089 ;;
14090 esac
14091 if test "X$found_dir" != "X"; then
14092 break
14093 fi
14094 done
14095 fi
14096 if test "X$found_dir" != "X"; then
14097 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$found_dir -l$name"
14098 if test "X$found_so" != "X"; then
14099 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
14100 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14101 else
14102 haveit=
14103 for x in $ltrpathdirs; do
14104 if test "X$x" = "X$found_dir"; then
14105 haveit=yes
14106 break
14107 fi
14108 done
14109 if test -z "$haveit"; then
14110 ltrpathdirs="$ltrpathdirs $found_dir"
14111 fi
14112 if test "$hardcode_direct" = yes; then
14113 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14114 else
14115 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
14116 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14117 haveit=
14118 for x in $rpathdirs; do
14119 if test "X$x" = "X$found_dir"; then
14120 haveit=yes
14121 break
14122 fi
14123 done
14124 if test -z "$haveit"; then
14125 rpathdirs="$rpathdirs $found_dir"
14126 fi
14127 else
14128 haveit=
14129 for x in $LDFLAGS $LIBIPT; do
14130
14131 acl_save_prefix="$prefix"
14132 prefix="$acl_final_prefix"
14133 acl_save_exec_prefix="$exec_prefix"
14134 exec_prefix="$acl_final_exec_prefix"
14135 eval x=\"$x\"
14136 exec_prefix="$acl_save_exec_prefix"
14137 prefix="$acl_save_prefix"
14138
14139 if test "X$x" = "X-L$found_dir"; then
14140 haveit=yes
14141 break
14142 fi
14143 done
14144 if test -z "$haveit"; then
14145 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir"
14146 fi
14147 if test "$hardcode_minus_L" != no; then
14148 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_so"
14149 else
14150 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14151 fi
14152 fi
14153 fi
14154 fi
14155 else
14156 if test "X$found_a" != "X"; then
14157 LIBIPT="${LIBIPT}${LIBIPT:+ }$found_a"
14158 else
14159 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$found_dir -l$name"
14160 fi
14161 fi
14162 additional_includedir=
14163 case "$found_dir" in
14164 */lib | */lib/)
14165 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
14166 additional_includedir="$basedir/include"
14167 ;;
14168 esac
14169 if test "X$additional_includedir" != "X"; then
14170 if test "X$additional_includedir" != "X/usr/include"; then
14171 haveit=
14172 if test "X$additional_includedir" = "X/usr/local/include"; then
14173 if test -n "$GCC"; then
14174 case $host_os in
14175 linux*) haveit=yes;;
14176 esac
14177 fi
14178 fi
14179 if test -z "$haveit"; then
14180 for x in $CPPFLAGS $INCIPT; do
14181
14182 acl_save_prefix="$prefix"
14183 prefix="$acl_final_prefix"
14184 acl_save_exec_prefix="$exec_prefix"
14185 exec_prefix="$acl_final_exec_prefix"
14186 eval x=\"$x\"
14187 exec_prefix="$acl_save_exec_prefix"
14188 prefix="$acl_save_prefix"
14189
14190 if test "X$x" = "X-I$additional_includedir"; then
14191 haveit=yes
14192 break
14193 fi
14194 done
14195 if test -z "$haveit"; then
14196 if test -d "$additional_includedir"; then
14197 INCIPT="${INCIPT}${INCIPT:+ }-I$additional_includedir"
14198 fi
14199 fi
14200 fi
14201 fi
14202 fi
14203 if test -n "$found_la"; then
14204 save_libdir="$libdir"
14205 case "$found_la" in
14206 */* | *\\*) . "$found_la" ;;
14207 *) . "./$found_la" ;;
14208 esac
14209 libdir="$save_libdir"
14210 for dep in $dependency_libs; do
14211 case "$dep" in
14212 -L*)
14213 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
14214 if test "X$additional_libdir" != "X/usr/lib"; then
14215 haveit=
14216 if test "X$additional_libdir" = "X/usr/local/lib"; then
14217 if test -n "$GCC"; then
14218 case $host_os in
14219 linux*) haveit=yes;;
14220 esac
14221 fi
14222 fi
14223 if test -z "$haveit"; then
14224 haveit=
14225 for x in $LDFLAGS $LIBIPT; do
14226
14227 acl_save_prefix="$prefix"
14228 prefix="$acl_final_prefix"
14229 acl_save_exec_prefix="$exec_prefix"
14230 exec_prefix="$acl_final_exec_prefix"
14231 eval x=\"$x\"
14232 exec_prefix="$acl_save_exec_prefix"
14233 prefix="$acl_save_prefix"
14234
14235 if test "X$x" = "X-L$additional_libdir"; then
14236 haveit=yes
14237 break
14238 fi
14239 done
14240 if test -z "$haveit"; then
14241 if test -d "$additional_libdir"; then
14242 LIBIPT="${LIBIPT}${LIBIPT:+ }-L$additional_libdir"
14243 fi
14244 fi
14245 haveit=
14246 for x in $LDFLAGS $LTLIBIPT; do
14247
14248 acl_save_prefix="$prefix"
14249 prefix="$acl_final_prefix"
14250 acl_save_exec_prefix="$exec_prefix"
14251 exec_prefix="$acl_final_exec_prefix"
14252 eval x=\"$x\"
14253 exec_prefix="$acl_save_exec_prefix"
14254 prefix="$acl_save_prefix"
14255
14256 if test "X$x" = "X-L$additional_libdir"; then
14257 haveit=yes
14258 break
14259 fi
14260 done
14261 if test -z "$haveit"; then
14262 if test -d "$additional_libdir"; then
14263 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-L$additional_libdir"
14264 fi
14265 fi
14266 fi
14267 fi
14268 ;;
14269 -R*)
14270 dir=`echo "X$dep" | sed -e 's/^X-R//'`
14271 if test "$enable_rpath" != no; then
14272 haveit=
14273 for x in $rpathdirs; do
14274 if test "X$x" = "X$dir"; then
14275 haveit=yes
14276 break
14277 fi
14278 done
14279 if test -z "$haveit"; then
14280 rpathdirs="$rpathdirs $dir"
14281 fi
14282 haveit=
14283 for x in $ltrpathdirs; do
14284 if test "X$x" = "X$dir"; then
14285 haveit=yes
14286 break
14287 fi
14288 done
14289 if test -z "$haveit"; then
14290 ltrpathdirs="$ltrpathdirs $dir"
14291 fi
14292 fi
14293 ;;
14294 -l*)
14295 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
14296 ;;
14297 *.la)
14298 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
14299 ;;
14300 *)
14301 LIBIPT="${LIBIPT}${LIBIPT:+ }$dep"
14302 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }$dep"
14303 ;;
14304 esac
14305 done
14306 fi
14307 else
14308 LIBIPT="${LIBIPT}${LIBIPT:+ }-l$name"
14309 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-l$name"
14310 fi
14311 fi
14312 fi
14313 done
14314 done
14315 if test "X$rpathdirs" != "X"; then
14316 if test -n "$hardcode_libdir_separator"; then
14317 alldirs=
14318 for found_dir in $rpathdirs; do
14319 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
14320 done
14321 acl_save_libdir="$libdir"
14322 libdir="$alldirs"
14323 eval flag=\"$hardcode_libdir_flag_spec\"
14324 libdir="$acl_save_libdir"
14325 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14326 else
14327 for found_dir in $rpathdirs; do
14328 acl_save_libdir="$libdir"
14329 libdir="$found_dir"
14330 eval flag=\"$hardcode_libdir_flag_spec\"
14331 libdir="$acl_save_libdir"
14332 LIBIPT="${LIBIPT}${LIBIPT:+ }$flag"
14333 done
14334 fi
14335 fi
14336 if test "X$ltrpathdirs" != "X"; then
14337 for found_dir in $ltrpathdirs; do
14338 LTLIBIPT="${LTLIBIPT}${LTLIBIPT:+ }-R$found_dir"
14339 done
14340 fi
14341
14342
14343 ac_save_CPPFLAGS="$CPPFLAGS"
14344
14345 for element in $INCIPT; do
14346 haveit=
14347 for x in $CPPFLAGS; do
14348
14349 acl_save_prefix="$prefix"
14350 prefix="$acl_final_prefix"
14351 acl_save_exec_prefix="$exec_prefix"
14352 exec_prefix="$acl_final_exec_prefix"
14353 eval x=\"$x\"
14354 exec_prefix="$acl_save_exec_prefix"
14355 prefix="$acl_save_prefix"
14356
14357 if test "X$x" = "X$element"; then
14358 haveit=yes
14359 break
14360 fi
14361 done
14362 if test -z "$haveit"; then
14363 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
14364 fi
14365 done
14366
14367
14368 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libipt" >&5
14369 $as_echo_n "checking for libipt... " >&6; }
14370 if ${ac_cv_libipt+:} false; then :
14371 $as_echo_n "(cached) " >&6
14372 else
14373
14374 ac_save_LIBS="$LIBS"
14375 LIBS="$LIBS $LIBIPT"
14376 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14377 /* end confdefs.h. */
14378 #include "intel-pt.h"
14379 int
14380 main ()
14381 {
14382 pt_insn_alloc_decoder (0);
14383 ;
14384 return 0;
14385 }
14386 _ACEOF
14387 if ac_fn_c_try_link "$LINENO"; then :
14388 ac_cv_libipt=yes
14389 else
14390 ac_cv_libipt=no
14391 fi
14392 rm -f core conftest.err conftest.$ac_objext \
14393 conftest$ac_exeext conftest.$ac_ext
14394 LIBS="$ac_save_LIBS"
14395
14396 fi
14397 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libipt" >&5
14398 $as_echo "$ac_cv_libipt" >&6; }
14399 if test "$ac_cv_libipt" = yes; then
14400 HAVE_LIBIPT=yes
14401
14402 $as_echo "#define HAVE_LIBIPT 1" >>confdefs.h
14403
14404 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libipt" >&5
14405 $as_echo_n "checking how to link with libipt... " >&6; }
14406 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBIPT" >&5
14407 $as_echo "$LIBIPT" >&6; }
14408 else
14409 HAVE_LIBIPT=no
14410 CPPFLAGS="$ac_save_CPPFLAGS"
14411 LIBIPT=
14412 LTLIBIPT=
14413 fi
14414
14415
14416
14417
14418
14419
14420 if test "$HAVE_LIBIPT" != yes; then
14421 if test "$with_intel_pt" = yes; then
14422 as_fn_error $? "libipt is missing or unusable" "$LINENO" 5
14423 else
14424 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libipt is missing or unusable; some features may be unavailable." >&5
14425 $as_echo "$as_me: WARNING: libipt is missing or unusable; some features may be unavailable." >&2;}
14426 fi
14427 else
14428 save_LIBS=$LIBS
14429 LIBS="$LIBS $LIBIPT"
14430 for ac_func in pt_insn_event
14431 do :
14432 ac_fn_c_check_func "$LINENO" "pt_insn_event" "ac_cv_func_pt_insn_event"
14433 if test "x$ac_cv_func_pt_insn_event" = xyes; then :
14434 cat >>confdefs.h <<_ACEOF
14435 #define HAVE_PT_INSN_EVENT 1
14436 _ACEOF
14437
14438 fi
14439 done
14440
14441 ac_fn_c_check_member "$LINENO" "struct pt_insn" "enabled" "ac_cv_member_struct_pt_insn_enabled" "#include <intel-pt.h>
14442 "
14443 if test "x$ac_cv_member_struct_pt_insn_enabled" = xyes; then :
14444
14445 cat >>confdefs.h <<_ACEOF
14446 #define HAVE_STRUCT_PT_INSN_ENABLED 1
14447 _ACEOF
14448
14449
14450 fi
14451 ac_fn_c_check_member "$LINENO" "struct pt_insn" "resynced" "ac_cv_member_struct_pt_insn_resynced" "#include <intel-pt.h>
14452 "
14453 if test "x$ac_cv_member_struct_pt_insn_resynced" = xyes; then :
14454
14455 cat >>confdefs.h <<_ACEOF
14456 #define HAVE_STRUCT_PT_INSN_RESYNCED 1
14457 _ACEOF
14458
14459
14460 fi
14461
14462 LIBS=$save_LIBS
14463 fi
14464 fi
14465
14466 if test "$ac_cv_header_sys_procfs_h" = yes; then
14467 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gregset_t in sys/procfs.h" >&5
14468 $as_echo_n "checking for gregset_t in sys/procfs.h... " >&6; }
14469 if ${bfd_cv_have_sys_procfs_type_gregset_t+:} false; then :
14470 $as_echo_n "(cached) " >&6
14471 else
14472 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14473 /* end confdefs.h. */
14474
14475 #define _SYSCALL32
14476 /* Needed for new procfs interface on sparc-solaris. */
14477 #define _STRUCTURED_PROC 1
14478 #include <sys/procfs.h>
14479 int
14480 main ()
14481 {
14482 gregset_t avar
14483 ;
14484 return 0;
14485 }
14486 _ACEOF
14487 if ac_fn_c_try_compile "$LINENO"; then :
14488 bfd_cv_have_sys_procfs_type_gregset_t=yes
14489 else
14490 bfd_cv_have_sys_procfs_type_gregset_t=no
14491
14492 fi
14493 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14494 fi
14495
14496 if test $bfd_cv_have_sys_procfs_type_gregset_t = yes; then
14497
14498 $as_echo "#define HAVE_GREGSET_T 1" >>confdefs.h
14499
14500 fi
14501 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_gregset_t" >&5
14502 $as_echo "$bfd_cv_have_sys_procfs_type_gregset_t" >&6; }
14503
14504 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fpregset_t in sys/procfs.h" >&5
14505 $as_echo_n "checking for fpregset_t in sys/procfs.h... " >&6; }
14506 if ${bfd_cv_have_sys_procfs_type_fpregset_t+:} false; then :
14507 $as_echo_n "(cached) " >&6
14508 else
14509 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14510 /* end confdefs.h. */
14511
14512 #define _SYSCALL32
14513 /* Needed for new procfs interface on sparc-solaris. */
14514 #define _STRUCTURED_PROC 1
14515 #include <sys/procfs.h>
14516 int
14517 main ()
14518 {
14519 fpregset_t avar
14520 ;
14521 return 0;
14522 }
14523 _ACEOF
14524 if ac_fn_c_try_compile "$LINENO"; then :
14525 bfd_cv_have_sys_procfs_type_fpregset_t=yes
14526 else
14527 bfd_cv_have_sys_procfs_type_fpregset_t=no
14528
14529 fi
14530 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14531 fi
14532
14533 if test $bfd_cv_have_sys_procfs_type_fpregset_t = yes; then
14534
14535 $as_echo "#define HAVE_FPREGSET_T 1" >>confdefs.h
14536
14537 fi
14538 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_fpregset_t" >&5
14539 $as_echo "$bfd_cv_have_sys_procfs_type_fpregset_t" >&6; }
14540
14541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset_t in sys/procfs.h" >&5
14542 $as_echo_n "checking for prgregset_t in sys/procfs.h... " >&6; }
14543 if ${bfd_cv_have_sys_procfs_type_prgregset_t+:} false; then :
14544 $as_echo_n "(cached) " >&6
14545 else
14546 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14547 /* end confdefs.h. */
14548
14549 #define _SYSCALL32
14550 /* Needed for new procfs interface on sparc-solaris. */
14551 #define _STRUCTURED_PROC 1
14552 #include <sys/procfs.h>
14553 int
14554 main ()
14555 {
14556 prgregset_t avar
14557 ;
14558 return 0;
14559 }
14560 _ACEOF
14561 if ac_fn_c_try_compile "$LINENO"; then :
14562 bfd_cv_have_sys_procfs_type_prgregset_t=yes
14563 else
14564 bfd_cv_have_sys_procfs_type_prgregset_t=no
14565
14566 fi
14567 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14568 fi
14569
14570 if test $bfd_cv_have_sys_procfs_type_prgregset_t = yes; then
14571
14572 $as_echo "#define HAVE_PRGREGSET_T 1" >>confdefs.h
14573
14574 fi
14575 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset_t" >&5
14576 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset_t" >&6; }
14577
14578 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prfpregset_t in sys/procfs.h" >&5
14579 $as_echo_n "checking for prfpregset_t in sys/procfs.h... " >&6; }
14580 if ${bfd_cv_have_sys_procfs_type_prfpregset_t+:} false; then :
14581 $as_echo_n "(cached) " >&6
14582 else
14583 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14584 /* end confdefs.h. */
14585
14586 #define _SYSCALL32
14587 /* Needed for new procfs interface on sparc-solaris. */
14588 #define _STRUCTURED_PROC 1
14589 #include <sys/procfs.h>
14590 int
14591 main ()
14592 {
14593 prfpregset_t avar
14594 ;
14595 return 0;
14596 }
14597 _ACEOF
14598 if ac_fn_c_try_compile "$LINENO"; then :
14599 bfd_cv_have_sys_procfs_type_prfpregset_t=yes
14600 else
14601 bfd_cv_have_sys_procfs_type_prfpregset_t=no
14602
14603 fi
14604 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14605 fi
14606
14607 if test $bfd_cv_have_sys_procfs_type_prfpregset_t = yes; then
14608
14609 $as_echo "#define HAVE_PRFPREGSET_T 1" >>confdefs.h
14610
14611 fi
14612 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prfpregset_t" >&5
14613 $as_echo "$bfd_cv_have_sys_procfs_type_prfpregset_t" >&6; }
14614
14615 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for prgregset32_t in sys/procfs.h" >&5
14616 $as_echo_n "checking for prgregset32_t in sys/procfs.h... " >&6; }
14617 if ${bfd_cv_have_sys_procfs_type_prgregset32_t+:} false; then :
14618 $as_echo_n "(cached) " >&6
14619 else
14620 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14621 /* end confdefs.h. */
14622
14623 #define _SYSCALL32
14624 /* Needed for new procfs interface on sparc-solaris. */
14625 #define _STRUCTURED_PROC 1
14626 #include <sys/procfs.h>
14627 int
14628 main ()
14629 {
14630 prgregset32_t avar
14631 ;
14632 return 0;
14633 }
14634 _ACEOF
14635 if ac_fn_c_try_compile "$LINENO"; then :
14636 bfd_cv_have_sys_procfs_type_prgregset32_t=yes
14637 else
14638 bfd_cv_have_sys_procfs_type_prgregset32_t=no
14639
14640 fi
14641 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14642 fi
14643
14644 if test $bfd_cv_have_sys_procfs_type_prgregset32_t = yes; then
14645
14646 $as_echo "#define HAVE_PRGREGSET32_T 1" >>confdefs.h
14647
14648 fi
14649 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_prgregset32_t" >&5
14650 $as_echo "$bfd_cv_have_sys_procfs_type_prgregset32_t" >&6; }
14651
14652 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for lwpid_t in sys/procfs.h" >&5
14653 $as_echo_n "checking for lwpid_t in sys/procfs.h... " >&6; }
14654 if ${bfd_cv_have_sys_procfs_type_lwpid_t+:} false; then :
14655 $as_echo_n "(cached) " >&6
14656 else
14657 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14658 /* end confdefs.h. */
14659
14660 #define _SYSCALL32
14661 /* Needed for new procfs interface on sparc-solaris. */
14662 #define _STRUCTURED_PROC 1
14663 #include <sys/procfs.h>
14664 int
14665 main ()
14666 {
14667 lwpid_t avar
14668 ;
14669 return 0;
14670 }
14671 _ACEOF
14672 if ac_fn_c_try_compile "$LINENO"; then :
14673 bfd_cv_have_sys_procfs_type_lwpid_t=yes
14674 else
14675 bfd_cv_have_sys_procfs_type_lwpid_t=no
14676
14677 fi
14678 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14679 fi
14680
14681 if test $bfd_cv_have_sys_procfs_type_lwpid_t = yes; then
14682
14683 $as_echo "#define HAVE_LWPID_T 1" >>confdefs.h
14684
14685 fi
14686 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_lwpid_t" >&5
14687 $as_echo "$bfd_cv_have_sys_procfs_type_lwpid_t" >&6; }
14688
14689 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for psaddr_t in sys/procfs.h" >&5
14690 $as_echo_n "checking for psaddr_t in sys/procfs.h... " >&6; }
14691 if ${bfd_cv_have_sys_procfs_type_psaddr_t+:} false; then :
14692 $as_echo_n "(cached) " >&6
14693 else
14694 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14695 /* end confdefs.h. */
14696
14697 #define _SYSCALL32
14698 /* Needed for new procfs interface on sparc-solaris. */
14699 #define _STRUCTURED_PROC 1
14700 #include <sys/procfs.h>
14701 int
14702 main ()
14703 {
14704 psaddr_t avar
14705 ;
14706 return 0;
14707 }
14708 _ACEOF
14709 if ac_fn_c_try_compile "$LINENO"; then :
14710 bfd_cv_have_sys_procfs_type_psaddr_t=yes
14711 else
14712 bfd_cv_have_sys_procfs_type_psaddr_t=no
14713
14714 fi
14715 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14716 fi
14717
14718 if test $bfd_cv_have_sys_procfs_type_psaddr_t = yes; then
14719
14720 $as_echo "#define HAVE_PSADDR_T 1" >>confdefs.h
14721
14722 fi
14723 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_psaddr_t" >&5
14724 $as_echo "$bfd_cv_have_sys_procfs_type_psaddr_t" >&6; }
14725
14726 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for elf_fpregset_t in sys/procfs.h" >&5
14727 $as_echo_n "checking for elf_fpregset_t in sys/procfs.h... " >&6; }
14728 if ${bfd_cv_have_sys_procfs_type_elf_fpregset_t+:} false; then :
14729 $as_echo_n "(cached) " >&6
14730 else
14731 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14732 /* end confdefs.h. */
14733
14734 #define _SYSCALL32
14735 /* Needed for new procfs interface on sparc-solaris. */
14736 #define _STRUCTURED_PROC 1
14737 #include <sys/procfs.h>
14738 int
14739 main ()
14740 {
14741 elf_fpregset_t avar
14742 ;
14743 return 0;
14744 }
14745 _ACEOF
14746 if ac_fn_c_try_compile "$LINENO"; then :
14747 bfd_cv_have_sys_procfs_type_elf_fpregset_t=yes
14748 else
14749 bfd_cv_have_sys_procfs_type_elf_fpregset_t=no
14750
14751 fi
14752 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14753 fi
14754
14755 if test $bfd_cv_have_sys_procfs_type_elf_fpregset_t = yes; then
14756
14757 $as_echo "#define HAVE_ELF_FPREGSET_T 1" >>confdefs.h
14758
14759 fi
14760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&5
14761 $as_echo "$bfd_cv_have_sys_procfs_type_elf_fpregset_t" >&6; }
14762
14763 fi
14764
14765
14766 # Check the return and argument types of ptrace.
14767
14768
14769 for ac_header in sys/ptrace.h ptrace.h
14770 do :
14771 as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
14772 ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
14773 if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
14774 cat >>confdefs.h <<_ACEOF
14775 #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
14776 _ACEOF
14777
14778 fi
14779
14780 done
14781
14782
14783 gdb_ptrace_headers='
14784 #include <sys/types.h>
14785 #if HAVE_SYS_PTRACE_H
14786 # include <sys/ptrace.h>
14787 #endif
14788 #if HAVE_UNISTD_H
14789 # include <unistd.h>
14790 #endif
14791 '
14792 # There is no point in checking if we don't have a prototype.
14793 ac_fn_c_check_decl "$LINENO" "ptrace" "ac_cv_have_decl_ptrace" "$gdb_ptrace_headers
14794 "
14795 if test "x$ac_cv_have_decl_ptrace" = xyes; then :
14796 ac_have_decl=1
14797 else
14798 ac_have_decl=0
14799 fi
14800
14801 cat >>confdefs.h <<_ACEOF
14802 #define HAVE_DECL_PTRACE $ac_have_decl
14803 _ACEOF
14804 if test $ac_have_decl = 1; then :
14805
14806 else
14807
14808 : ${gdb_cv_func_ptrace_ret='int'}
14809 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
14810
14811 fi
14812
14813 # Check return type. Varargs (used on GNU/Linux) conflict with the
14814 # empty argument list, so check for that explicitly.
14815 { $as_echo "$as_me:${as_lineno-$LINENO}: checking return type of ptrace" >&5
14816 $as_echo_n "checking return type of ptrace... " >&6; }
14817 if ${gdb_cv_func_ptrace_ret+:} false; then :
14818 $as_echo_n "(cached) " >&6
14819 else
14820 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14821 /* end confdefs.h. */
14822 $gdb_ptrace_headers
14823 int
14824 main ()
14825 {
14826 extern long ptrace (enum __ptrace_request, ...);
14827 ;
14828 return 0;
14829 }
14830 _ACEOF
14831 if ac_fn_c_try_compile "$LINENO"; then :
14832 gdb_cv_func_ptrace_ret='long'
14833 else
14834 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14835 /* end confdefs.h. */
14836 $gdb_ptrace_headers
14837 int
14838 main ()
14839 {
14840 extern int ptrace ();
14841 ;
14842 return 0;
14843 }
14844 _ACEOF
14845 if ac_fn_c_try_compile "$LINENO"; then :
14846 gdb_cv_func_ptrace_ret='int'
14847 else
14848 gdb_cv_func_ptrace_ret='long'
14849 fi
14850 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14851 fi
14852 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14853 fi
14854 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_ret" >&5
14855 $as_echo "$gdb_cv_func_ptrace_ret" >&6; }
14856
14857 cat >>confdefs.h <<_ACEOF
14858 #define PTRACE_TYPE_RET $gdb_cv_func_ptrace_ret
14859 _ACEOF
14860
14861 # Check argument types.
14862 { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for ptrace" >&5
14863 $as_echo_n "checking types of arguments for ptrace... " >&6; }
14864 if ${gdb_cv_func_ptrace_args+:} false; then :
14865 $as_echo_n "(cached) " >&6
14866 else
14867
14868 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14869 /* end confdefs.h. */
14870 $gdb_ptrace_headers
14871 int
14872 main ()
14873 {
14874 extern long ptrace (enum __ptrace_request, ...);
14875 ;
14876 return 0;
14877 }
14878 _ACEOF
14879 if ac_fn_c_try_compile "$LINENO"; then :
14880 gdb_cv_func_ptrace_args='enum __ptrace_request,int,long,long'
14881 else
14882
14883 for gdb_arg1 in 'int' 'long'; do
14884 for gdb_arg2 in 'pid_t' 'int' 'long'; do
14885 for gdb_arg3 in 'int *' 'caddr_t' 'int' 'long' 'void *'; do
14886 for gdb_arg4 in 'int' 'long' 'void *'; do
14887 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14888 /* end confdefs.h. */
14889 $gdb_ptrace_headers
14890 int
14891 main ()
14892 {
14893
14894 extern $gdb_cv_func_ptrace_ret
14895 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4);
14896
14897 ;
14898 return 0;
14899 }
14900 _ACEOF
14901 if ac_fn_c_try_compile "$LINENO"; then :
14902 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4";
14903 break 4;
14904 fi
14905 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14906 for gdb_arg5 in 'int *' 'int' 'long'; do
14907 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14908 /* end confdefs.h. */
14909 $gdb_ptrace_headers
14910 int
14911 main ()
14912 {
14913
14914 extern $gdb_cv_func_ptrace_ret
14915 ptrace ($gdb_arg1, $gdb_arg2, $gdb_arg3, $gdb_arg4, $gdb_arg5);
14916
14917 ;
14918 return 0;
14919 }
14920 _ACEOF
14921 if ac_fn_c_try_compile "$LINENO"; then :
14922
14923 gdb_cv_func_ptrace_args="$gdb_arg1,$gdb_arg2,$gdb_arg3,$gdb_arg4,$gdb_arg5";
14924 break 5;
14925 fi
14926 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14927 done
14928 done
14929 done
14930 done
14931 done
14932 # Provide a safe default value.
14933 : ${gdb_cv_func_ptrace_args='int,int,long,long'}
14934
14935 fi
14936 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
14937 fi
14938 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_func_ptrace_args" >&5
14939 $as_echo "$gdb_cv_func_ptrace_args" >&6; }
14940 ac_save_IFS=$IFS; IFS=','
14941 set dummy `echo "$gdb_cv_func_ptrace_args" | sed 's/\*/\*/g'`
14942 IFS=$ac_save_IFS
14943 shift
14944
14945 cat >>confdefs.h <<_ACEOF
14946 #define PTRACE_TYPE_ARG1 $1
14947 _ACEOF
14948
14949
14950 cat >>confdefs.h <<_ACEOF
14951 #define PTRACE_TYPE_ARG3 $3
14952 _ACEOF
14953
14954
14955 cat >>confdefs.h <<_ACEOF
14956 #define PTRACE_TYPE_ARG4 $4
14957 _ACEOF
14958
14959 if test -n "$5"; then
14960
14961 cat >>confdefs.h <<_ACEOF
14962 #define PTRACE_TYPE_ARG5 $5
14963 _ACEOF
14964
14965 fi
14966
14967
14968 if test "$cross_compiling" = no; then
14969 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
14970 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
14971 if ${ac_cv_func_setpgrp_void+:} false; then :
14972 $as_echo_n "(cached) " >&6
14973 else
14974 if test "$cross_compiling" = yes; then :
14975 as_fn_error $? "cannot check setpgrp when cross compiling" "$LINENO" 5
14976 else
14977 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
14978 /* end confdefs.h. */
14979 $ac_includes_default
14980 int
14981 main ()
14982 {
14983 /* If this system has a BSD-style setpgrp which takes arguments,
14984 setpgrp(1, 1) will fail with ESRCH and return -1, in that case
14985 exit successfully. */
14986 return setpgrp (1,1) != -1;
14987 ;
14988 return 0;
14989 }
14990 _ACEOF
14991 if ac_fn_c_try_run "$LINENO"; then :
14992 ac_cv_func_setpgrp_void=no
14993 else
14994 ac_cv_func_setpgrp_void=yes
14995 fi
14996 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
14997 conftest.$ac_objext conftest.beam conftest.$ac_ext
14998 fi
14999
15000 fi
15001 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15002 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15003 if test $ac_cv_func_setpgrp_void = yes; then
15004
15005 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15006
15007 fi
15008
15009 else
15010 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether setpgrp takes no argument" >&5
15011 $as_echo_n "checking whether setpgrp takes no argument... " >&6; }
15012 if ${ac_cv_func_setpgrp_void+:} false; then :
15013 $as_echo_n "(cached) " >&6
15014 else
15015 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15016 /* end confdefs.h. */
15017
15018 #include <unistd.h>
15019
15020 int
15021 main ()
15022 {
15023
15024 if (setpgrp(1,1) == -1)
15025 exit (0);
15026 else
15027 exit (1);
15028
15029 ;
15030 return 0;
15031 }
15032 _ACEOF
15033 if ac_fn_c_try_compile "$LINENO"; then :
15034 ac_cv_func_setpgrp_void=no
15035 else
15036 ac_cv_func_setpgrp_void=yes
15037 fi
15038 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15039 fi
15040 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_setpgrp_void" >&5
15041 $as_echo "$ac_cv_func_setpgrp_void" >&6; }
15042 if test "$ac_cv_func_setpgrp_void" = yes; then
15043 $as_echo "#define SETPGRP_VOID 1" >>confdefs.h
15044
15045 fi
15046 fi
15047
15048 # Assume we'll default to using the included libiberty regex.
15049 gdb_use_included_regex=yes
15050
15051 # However, if the system regex is GNU regex, then default to *not*
15052 # using the included regex.
15053 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU regex" >&5
15054 $as_echo_n "checking for GNU regex... " >&6; }
15055 if ${gdb_cv_have_gnu_regex+:} false; then :
15056 $as_echo_n "(cached) " >&6
15057 else
15058 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15059 /* end confdefs.h. */
15060 #include <gnu-versions.h>
15061 int
15062 main ()
15063 {
15064 #define REGEX_INTERFACE_VERSION 1
15065 #if _GNU_REGEX_INTERFACE_VERSION != REGEX_INTERFACE_VERSION
15066 # error "Version mismatch"
15067 #endif
15068 ;
15069 return 0;
15070 }
15071 _ACEOF
15072 if ac_fn_c_try_compile "$LINENO"; then :
15073 gdb_cv_have_gnu_regex=yes
15074 else
15075 gdb_cv_have_gnu_regex=no
15076 fi
15077 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15078 fi
15079 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_gnu_regex" >&5
15080 $as_echo "$gdb_cv_have_gnu_regex" >&6; }
15081 if test "$gdb_cv_have_gnu_regex" = yes; then
15082 gdb_use_included_regex=no
15083 fi
15084
15085
15086 # Check whether --with-included-regex was given.
15087 if test "${with_included_regex+set}" = set; then :
15088 withval=$with_included_regex; gdb_with_regex=$withval
15089 else
15090 gdb_with_regex=$gdb_use_included_regex
15091 fi
15092
15093 if test "$gdb_with_regex" = yes; then
15094
15095 $as_echo "#define USE_INCLUDED_REGEX 1" >>confdefs.h
15096
15097 fi
15098
15099 # Check if <sys/proc.h> defines `struct thread' with a td_pcb member.
15100 ac_fn_c_check_member "$LINENO" "struct thread" "td_pcb" "ac_cv_member_struct_thread_td_pcb" "#include <sys/param.h>
15101 #include <sys/proc.h>
15102
15103 "
15104 if test "x$ac_cv_member_struct_thread_td_pcb" = xyes; then :
15105
15106 cat >>confdefs.h <<_ACEOF
15107 #define HAVE_STRUCT_THREAD_TD_PCB 1
15108 _ACEOF
15109
15110
15111 fi
15112
15113
15114 # See if <sys/lwp.h> defines `struct lwp`.
15115 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct lwp" >&5
15116 $as_echo_n "checking for struct lwp... " >&6; }
15117 if ${gdb_cv_struct_lwp+:} false; then :
15118 $as_echo_n "(cached) " >&6
15119 else
15120 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15121 /* end confdefs.h. */
15122 #include <sys/param.h>
15123 #define _KMEMUSER
15124 #include <sys/lwp.h>
15125 int
15126 main ()
15127 {
15128 struct lwp l;
15129 ;
15130 return 0;
15131 }
15132 _ACEOF
15133 if ac_fn_c_try_compile "$LINENO"; then :
15134 gdb_cv_struct_lwp=yes
15135 else
15136 gdb_cv_struct_lwp=no
15137 fi
15138 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15139 fi
15140 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_lwp" >&5
15141 $as_echo "$gdb_cv_struct_lwp" >&6; }
15142 if test "$gdb_cv_struct_lwp" = yes; then
15143
15144 $as_echo "#define HAVE_STRUCT_LWP 1" >>confdefs.h
15145
15146 fi
15147
15148 # See if <machine/reg.h> degines `struct reg'.
15149 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for struct reg in machine/reg.h" >&5
15150 $as_echo_n "checking for struct reg in machine/reg.h... " >&6; }
15151 if ${gdb_cv_struct_reg+:} false; then :
15152 $as_echo_n "(cached) " >&6
15153 else
15154 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15155 /* end confdefs.h. */
15156 #include <sys/types.h>
15157 #include <machine/reg.h>
15158 int
15159 main ()
15160 {
15161 struct reg r;
15162 ;
15163 return 0;
15164 }
15165 _ACEOF
15166 if ac_fn_c_try_compile "$LINENO"; then :
15167 gdb_cv_struct_reg=yes
15168 else
15169 gdb_cv_struct_reg=no
15170 fi
15171 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15172 fi
15173 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_struct_reg" >&5
15174 $as_echo "$gdb_cv_struct_reg" >&6; }
15175 if test "$gdb_cv_struct_reg" = yes; then
15176
15177 $as_echo "#define HAVE_STRUCT_REG 1" >>confdefs.h
15178
15179 fi
15180
15181 # See if <machine/reg.h> supports the %fs and %gs i386 segment registers.
15182 # Older i386 BSD's don't have the r_fs and r_gs members of `struct reg'.
15183 ac_fn_c_check_member "$LINENO" "struct reg" "r_fs" "ac_cv_member_struct_reg_r_fs" "#include <sys/types.h>
15184 #include <machine/reg.h>
15185 "
15186 if test "x$ac_cv_member_struct_reg_r_fs" = xyes; then :
15187
15188 cat >>confdefs.h <<_ACEOF
15189 #define HAVE_STRUCT_REG_R_FS 1
15190 _ACEOF
15191
15192
15193 fi
15194 ac_fn_c_check_member "$LINENO" "struct reg" "r_gs" "ac_cv_member_struct_reg_r_gs" "#include <sys/types.h>
15195 #include <machine/reg.h>
15196 "
15197 if test "x$ac_cv_member_struct_reg_r_gs" = xyes; then :
15198
15199 cat >>confdefs.h <<_ACEOF
15200 #define HAVE_STRUCT_REG_R_GS 1
15201 _ACEOF
15202
15203
15204 fi
15205
15206
15207 # See if <sys/user.h> supports the %fs_base and %gs_bas amd64 segment registers.
15208 # Older amd64 Linux's don't have the fs_base and gs_base members of
15209 # `struct user_regs_struct'.
15210 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>
15211 #include <sys/user.h>
15212 "
15213 if test "x$ac_cv_member_struct_user_regs_struct_fs_base" = xyes; then :
15214
15215 cat >>confdefs.h <<_ACEOF
15216 #define HAVE_STRUCT_USER_REGS_STRUCT_FS_BASE 1
15217 _ACEOF
15218
15219
15220 fi
15221 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>
15222 #include <sys/user.h>
15223 "
15224 if test "x$ac_cv_member_struct_user_regs_struct_gs_base" = xyes; then :
15225
15226 cat >>confdefs.h <<_ACEOF
15227 #define HAVE_STRUCT_USER_REGS_STRUCT_GS_BASE 1
15228 _ACEOF
15229
15230
15231 fi
15232
15233
15234 # See if <sys/ptrace.h> provides the PTRACE_GETREGS request.
15235 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETREGS" >&5
15236 $as_echo_n "checking for PTRACE_GETREGS... " >&6; }
15237 if ${gdb_cv_have_ptrace_getregs+:} false; then :
15238 $as_echo_n "(cached) " >&6
15239 else
15240 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15241 /* end confdefs.h. */
15242 #include <sys/ptrace.h>
15243 int
15244 main ()
15245 {
15246 PTRACE_GETREGS;
15247 ;
15248 return 0;
15249 }
15250 _ACEOF
15251 if ac_fn_c_try_compile "$LINENO"; then :
15252 gdb_cv_have_ptrace_getregs=yes
15253 else
15254 gdb_cv_have_ptrace_getregs=no
15255 fi
15256 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15257 fi
15258
15259 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getregs" >&5
15260 $as_echo "$gdb_cv_have_ptrace_getregs" >&6; }
15261 if test "$gdb_cv_have_ptrace_getregs" = yes; then
15262
15263 $as_echo "#define HAVE_PTRACE_GETREGS 1" >>confdefs.h
15264
15265 fi
15266
15267 # See if <sys/ptrace.h> provides the PTRACE_GETFPXREGS request.
15268 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PTRACE_GETFPXREGS" >&5
15269 $as_echo_n "checking for PTRACE_GETFPXREGS... " >&6; }
15270 if ${gdb_cv_have_ptrace_getfpxregs+:} false; then :
15271 $as_echo_n "(cached) " >&6
15272 else
15273 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15274 /* end confdefs.h. */
15275 #include <sys/ptrace.h>
15276 int
15277 main ()
15278 {
15279 PTRACE_GETFPXREGS;
15280 ;
15281 return 0;
15282 }
15283 _ACEOF
15284 if ac_fn_c_try_compile "$LINENO"; then :
15285 gdb_cv_have_ptrace_getfpxregs=yes
15286 else
15287 gdb_cv_have_ptrace_getfpxregs=no
15288 fi
15289 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15290 fi
15291
15292 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_ptrace_getfpxregs" >&5
15293 $as_echo "$gdb_cv_have_ptrace_getfpxregs" >&6; }
15294 if test "$gdb_cv_have_ptrace_getfpxregs" = yes; then
15295
15296 $as_echo "#define HAVE_PTRACE_GETFPXREGS 1" >>confdefs.h
15297
15298 fi
15299
15300 # See if <sys/ptrace.h> provides the PT_GETDBREGS request.
15301 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETDBREGS" >&5
15302 $as_echo_n "checking for PT_GETDBREGS... " >&6; }
15303 if ${gdb_cv_have_pt_getdbregs+:} false; then :
15304 $as_echo_n "(cached) " >&6
15305 else
15306 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15307 /* end confdefs.h. */
15308 #include <sys/types.h>
15309 #include <sys/ptrace.h>
15310 int
15311 main ()
15312 {
15313 PT_GETDBREGS;
15314 ;
15315 return 0;
15316 }
15317 _ACEOF
15318 if ac_fn_c_try_compile "$LINENO"; then :
15319 gdb_cv_have_pt_getdbregs=yes
15320 else
15321 gdb_cv_have_pt_getdbregs=no
15322 fi
15323 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15324 fi
15325
15326 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getdbregs" >&5
15327 $as_echo "$gdb_cv_have_pt_getdbregs" >&6; }
15328 if test "$gdb_cv_have_pt_getdbregs" = yes; then
15329
15330 $as_echo "#define HAVE_PT_GETDBREGS 1" >>confdefs.h
15331
15332 fi
15333
15334 # See if <sys/ptrace.h> provides the PT_GETXMMREGS request.
15335 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PT_GETXMMREGS" >&5
15336 $as_echo_n "checking for PT_GETXMMREGS... " >&6; }
15337 if ${gdb_cv_have_pt_getxmmregs+:} false; then :
15338 $as_echo_n "(cached) " >&6
15339 else
15340 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15341 /* end confdefs.h. */
15342 #include <sys/types.h>
15343 #include <sys/ptrace.h>
15344 int
15345 main ()
15346 {
15347 PT_GETXMMREGS;
15348 ;
15349 return 0;
15350 }
15351 _ACEOF
15352 if ac_fn_c_try_compile "$LINENO"; then :
15353 gdb_cv_have_pt_getxmmregs=yes
15354 else
15355 gdb_cv_have_pt_getxmmregs=no
15356 fi
15357 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15358 fi
15359
15360 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_pt_getxmmregs" >&5
15361 $as_echo "$gdb_cv_have_pt_getxmmregs" >&6; }
15362 if test "$gdb_cv_have_pt_getxmmregs" = yes; then
15363
15364 $as_echo "#define HAVE_PT_GETXMMREGS 1" >>confdefs.h
15365
15366 fi
15367
15368 # See if <sys/ptrace.h> supports LWP names on FreeBSD
15369 # Older FreeBSD versions don't have the pl_tdname member of
15370 # `struct ptrace_lwpinfo'.
15371 ac_fn_c_check_member "$LINENO" "struct ptrace_lwpinfo" "pl_tdname" "ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" "#include <sys/ptrace.h>
15372 "
15373 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_tdname" = xyes; then :
15374
15375 cat >>confdefs.h <<_ACEOF
15376 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_TDNAME 1
15377 _ACEOF
15378
15379
15380 fi
15381
15382
15383 # See if <sys/ptrace.h> supports syscall fields on FreeBSD. The
15384 # pl_syscall_code member of `struct ptrace_lwpinfo' was added in
15385 # FreeBSD 10.3.
15386 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>
15387 "
15388 if test "x$ac_cv_member_struct_ptrace_lwpinfo_pl_syscall_code" = xyes; then :
15389
15390 cat >>confdefs.h <<_ACEOF
15391 #define HAVE_STRUCT_PTRACE_LWPINFO_PL_SYSCALL_CODE 1
15392 _ACEOF
15393
15394
15395 fi
15396
15397
15398 # Check if the compiler supports the `long long' type.
15399
15400 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in compiler" >&5
15401 $as_echo_n "checking for long long support in compiler... " >&6; }
15402 if ${gdb_cv_c_long_long+:} false; then :
15403 $as_echo_n "(cached) " >&6
15404 else
15405 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15406 /* end confdefs.h. */
15407 extern long long foo;
15408 int
15409 main ()
15410 {
15411 switch (foo & 2) { case 0: return 1; }
15412 ;
15413 return 0;
15414 }
15415 _ACEOF
15416 if ac_fn_c_try_compile "$LINENO"; then :
15417 gdb_cv_c_long_long=yes
15418 else
15419 gdb_cv_c_long_long=no
15420 fi
15421 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15422 fi
15423 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_long" >&5
15424 $as_echo "$gdb_cv_c_long_long" >&6; }
15425 if test "$gdb_cv_c_long_long" != yes; then
15426 # libdecnumber requires long long.
15427 as_fn_error $? "Compiler must support long long for GDB." "$LINENO" 5
15428 fi
15429
15430 # Check if the compiler and runtime support printing long longs.
15431
15432 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long long support in printf" >&5
15433 $as_echo_n "checking for long long support in printf... " >&6; }
15434 if ${gdb_cv_printf_has_long_long+:} false; then :
15435 $as_echo_n "(cached) " >&6
15436 else
15437 if test "$cross_compiling" = yes; then :
15438 gdb_cv_printf_has_long_long=no
15439 else
15440 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15441 /* end confdefs.h. */
15442 $ac_includes_default
15443 int
15444 main ()
15445 {
15446 char buf[32];
15447 long long l = 0;
15448 l = (l << 16) + 0x0123;
15449 l = (l << 16) + 0x4567;
15450 l = (l << 16) + 0x89ab;
15451 l = (l << 16) + 0xcdef;
15452 sprintf (buf, "0x%016llx", l);
15453 return (strcmp ("0x0123456789abcdef", buf));
15454 ;
15455 return 0;
15456 }
15457 _ACEOF
15458 if ac_fn_c_try_run "$LINENO"; then :
15459 gdb_cv_printf_has_long_long=yes
15460 else
15461 gdb_cv_printf_has_long_long=no
15462 fi
15463 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15464 conftest.$ac_objext conftest.beam conftest.$ac_ext
15465 fi
15466
15467 fi
15468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_long" >&5
15469 $as_echo "$gdb_cv_printf_has_long_long" >&6; }
15470 if test "$gdb_cv_printf_has_long_long" = yes; then
15471
15472 $as_echo "#define PRINTF_HAS_LONG_LONG 1" >>confdefs.h
15473
15474 fi
15475
15476 # Check if the compiler and runtime support printing decfloats.
15477
15478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for decfloat support in printf" >&5
15479 $as_echo_n "checking for decfloat support in printf... " >&6; }
15480 if ${gdb_cv_printf_has_decfloat+:} false; then :
15481 $as_echo_n "(cached) " >&6
15482 else
15483 if test "$cross_compiling" = yes; then :
15484 gdb_cv_printf_has_decfloat=no
15485 else
15486 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15487 /* end confdefs.h. */
15488 $ac_includes_default
15489 int
15490 main ()
15491 {
15492 char buf[64];
15493 _Decimal32 d32 = 1.2345df;
15494 _Decimal64 d64 = 1.2345dd;
15495 _Decimal128 d128 = 1.2345dl;
15496 sprintf (buf, "Decimal32: %H\nDecimal64: %D\nDecimal128: %DD", d32, d64, d128);
15497 return (strcmp ("Decimal32: 1.2345\nDecimal64: 1.2345\nDecimal128: 1.2345", buf));
15498 ;
15499 return 0;
15500 }
15501 _ACEOF
15502 if ac_fn_c_try_run "$LINENO"; then :
15503 gdb_cv_printf_has_decfloat=yes
15504 else
15505 gdb_cv_printf_has_decfloat=no
15506 fi
15507 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15508 conftest.$ac_objext conftest.beam conftest.$ac_ext
15509 fi
15510
15511 fi
15512 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_decfloat" >&5
15513 $as_echo "$gdb_cv_printf_has_decfloat" >&6; }
15514 if test "$gdb_cv_printf_has_decfloat" = yes; then
15515
15516 $as_echo "#define PRINTF_HAS_DECFLOAT 1" >>confdefs.h
15517
15518 fi
15519
15520 # Check if the compiler supports the `long double' type. We can't use
15521 # AC_C_LONG_DOUBLE because that one does additional checks on the
15522 # constants defined in <float.h> that fail on some systems,
15523 # e.g. FreeBSD/i386 4.7 and OpenBSD/i386 3.6.
15524
15525 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in compiler" >&5
15526 $as_echo_n "checking for long double support in compiler... " >&6; }
15527 if ${gdb_cv_c_long_double+:} false; then :
15528 $as_echo_n "(cached) " >&6
15529 else
15530 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15531 /* end confdefs.h. */
15532 long double foo;
15533 _ACEOF
15534 if ac_fn_c_try_compile "$LINENO"; then :
15535 gdb_cv_c_long_double=yes
15536 else
15537 gdb_cv_c_long_double=no
15538 fi
15539 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15540 fi
15541 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_c_long_double" >&5
15542 $as_echo "$gdb_cv_c_long_double" >&6; }
15543 if test "$gdb_cv_c_long_double" = yes; then
15544
15545 $as_echo "#define HAVE_LONG_DOUBLE 1" >>confdefs.h
15546
15547 fi
15548
15549 # Check if the compiler and runtime support printing long doubles.
15550
15551 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in printf" >&5
15552 $as_echo_n "checking for long double support in printf... " >&6; }
15553 if ${gdb_cv_printf_has_long_double+:} false; then :
15554 $as_echo_n "(cached) " >&6
15555 else
15556 if test "$cross_compiling" = yes; then :
15557 gdb_cv_printf_has_long_double=no
15558 else
15559 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15560 /* end confdefs.h. */
15561 $ac_includes_default
15562 int
15563 main ()
15564 {
15565 char buf[16];
15566 long double f = 3.141592653;
15567 sprintf (buf, "%Lg", f);
15568 return (strncmp ("3.14159", buf, 7));
15569 ;
15570 return 0;
15571 }
15572 _ACEOF
15573 if ac_fn_c_try_run "$LINENO"; then :
15574 gdb_cv_printf_has_long_double=yes
15575 else
15576 gdb_cv_printf_has_long_double=no
15577 fi
15578 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15579 conftest.$ac_objext conftest.beam conftest.$ac_ext
15580 fi
15581
15582 fi
15583 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_printf_has_long_double" >&5
15584 $as_echo "$gdb_cv_printf_has_long_double" >&6; }
15585 if test "$gdb_cv_printf_has_long_double" = yes; then
15586
15587 $as_echo "#define PRINTF_HAS_LONG_DOUBLE 1" >>confdefs.h
15588
15589 fi
15590
15591 # Check if the compiler and runtime support scanning long doubles.
15592
15593 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for long double support in scanf" >&5
15594 $as_echo_n "checking for long double support in scanf... " >&6; }
15595 if ${gdb_cv_scanf_has_long_double+:} false; then :
15596 $as_echo_n "(cached) " >&6
15597 else
15598 if test "$cross_compiling" = yes; then :
15599 gdb_cv_scanf_has_long_double=no
15600 else
15601 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15602 /* end confdefs.h. */
15603 #include <stdio.h>
15604 int
15605 main ()
15606 {
15607 char *buf = "3.141592653";
15608 long double f = 0;
15609 sscanf (buf, "%Lg", &f);
15610 return !(f > 3.14159 && f < 3.14160);
15611 ;
15612 return 0;
15613 }
15614 _ACEOF
15615 if ac_fn_c_try_run "$LINENO"; then :
15616 gdb_cv_scanf_has_long_double=yes
15617 else
15618 gdb_cv_scanf_has_long_double=no
15619 fi
15620 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15621 conftest.$ac_objext conftest.beam conftest.$ac_ext
15622 fi
15623
15624 fi
15625 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_scanf_has_long_double" >&5
15626 $as_echo "$gdb_cv_scanf_has_long_double" >&6; }
15627 if test "$gdb_cv_scanf_has_long_double" = yes; then
15628
15629 $as_echo "#define SCANF_HAS_LONG_DOUBLE 1" >>confdefs.h
15630
15631 fi
15632
15633 case ${host_os} in
15634 aix*)
15635 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -bbigtoc option" >&5
15636 $as_echo_n "checking for -bbigtoc option... " >&6; }
15637 if ${gdb_cv_bigtoc+:} false; then :
15638 $as_echo_n "(cached) " >&6
15639 else
15640
15641 SAVE_LDFLAGS=$LDFLAGS
15642
15643 case $GCC in
15644 yes) gdb_cv_bigtoc=-Wl,-bbigtoc ;;
15645 *) gdb_cv_bigtoc=-bbigtoc ;;
15646 esac
15647
15648 LDFLAGS=$LDFLAGS\ $gdb_cv_bigtoc
15649 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15650 /* end confdefs.h. */
15651
15652 int
15653 main ()
15654 {
15655 int i;
15656 ;
15657 return 0;
15658 }
15659 _ACEOF
15660 if ac_fn_c_try_link "$LINENO"; then :
15661
15662 else
15663 gdb_cv_bigtoc=
15664 fi
15665 rm -f core conftest.err conftest.$ac_objext \
15666 conftest$ac_exeext conftest.$ac_ext
15667 LDFLAGS="${SAVE_LDFLAGS}"
15668
15669 fi
15670 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_bigtoc" >&5
15671 $as_echo "$gdb_cv_bigtoc" >&6; }
15672 CONFIG_LDFLAGS="${CONFIG_LDFLAGS} ${gdb_cv_bigtoc}"
15673 ;;
15674 esac
15675
15676 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the dynamic export flag" >&5
15677 $as_echo_n "checking for the dynamic export flag... " >&6; }
15678 dynamic_list=false
15679 if test "${gdb_native}" = yes; then
15680 # The dynamically loaded libthread_db needs access to symbols in the gdb
15681 # executable. Older GNU ld supports --export-dynamic but --dynamic-list
15682 # may not be supported there.
15683 old_LDFLAGS="$LDFLAGS"
15684 # Older GNU ld supports --export-dynamic but --dynamic-list it does not.
15685 RDYNAMIC="-Wl,--dynamic-list=${srcdir}/proc-service.list"
15686 LDFLAGS="$LDFLAGS $RDYNAMIC"
15687 if test "${have_libpython}" = no; then
15688 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15689 /* end confdefs.h. */
15690
15691 int
15692 main ()
15693 {
15694
15695 ;
15696 return 0;
15697 }
15698 _ACEOF
15699 if ac_fn_c_try_link "$LINENO"; then :
15700 dynamic_list=true
15701 fi
15702 rm -f core conftest.err conftest.$ac_objext \
15703 conftest$ac_exeext conftest.$ac_ext
15704 else
15705 # Workaround http://bugs.python.org/issue4434 where static
15706 # libpythonX.Y.a would get its symbols required for
15707 # pythonX.Y/lib-dynload/*.so modules hidden by -Wl,--dynamic-list.
15708 # Problem does not happen for the recommended libpythonX.Y.so linkage.
15709
15710 # Note the workaround for Python
15711 # http://bugs.python.org/issue10112 earlier has removed
15712 # -export-dynamic from PYTHON_LIBS. That's exactly what we want
15713 # here too, as otherwise it'd make this -Wl,--dynamic-list test
15714 # always pass.
15715 old_CFLAGS="$CFLAGS"
15716 CFLAGS="$CFLAGS $PYTHON_CFLAGS"
15717 old_LIBS="$LIBS"
15718 LIBS="$LIBS $PYTHON_LIBS"
15719 old_CPPFLAGS="$CPPFLAGS"
15720 CPPFLAGS="$CPPFLAGS $PYTHON_CPPFLAGS"
15721 if test "$cross_compiling" = yes; then :
15722 true
15723 else
15724 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15725 /* end confdefs.h. */
15726 #include "Python.h"
15727 int
15728 main ()
15729 {
15730 int err;
15731 Py_Initialize ();
15732 err = PyRun_SimpleString ("import itertools\n");
15733 Py_Finalize ();
15734 return err == 0 ? 0 : 1;
15735 ;
15736 return 0;
15737 }
15738 _ACEOF
15739 if ac_fn_c_try_run "$LINENO"; then :
15740 dynamic_list=true
15741 fi
15742 rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
15743 conftest.$ac_objext conftest.beam conftest.$ac_ext
15744 fi
15745
15746 LIBS="$old_LIBS"
15747 CFLAGS="$old_CFLAGS"
15748 CPPFLAGS="$old_CPPFLAGS"
15749 fi
15750 LDFLAGS="$old_LDFLAGS"
15751 fi
15752 if $dynamic_list; then
15753 found="-Wl,--dynamic-list"
15754 RDYNAMIC='-Wl,--dynamic-list=$(srcdir)/proc-service.list'
15755 else
15756 found="-rdynamic"
15757 RDYNAMIC="-rdynamic"
15758 fi
15759
15760 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $found" >&5
15761 $as_echo "$found" >&6; }
15762
15763
15764 if test "${build}" = "${host}" -a "${host}" = "${target}" ; then
15765 case ${host_os} in
15766 aix*)
15767 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AiX thread debugging library" >&5
15768 $as_echo_n "checking for AiX thread debugging library... " >&6; }
15769 if ${gdb_cv_have_aix_thread_debug+:} false; then :
15770 $as_echo_n "(cached) " >&6
15771 else
15772 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15773 /* end confdefs.h. */
15774 #include <sys/pthdebug.h>
15775 int
15776 main ()
15777 {
15778 #ifndef PTHDB_VERSION_3
15779 #error
15780 #endif
15781 ;
15782 return 0;
15783 }
15784 _ACEOF
15785 if ac_fn_c_try_compile "$LINENO"; then :
15786 gdb_cv_have_aix_thread_debug=yes
15787 else
15788 gdb_cv_have_aix_thread_debug=no
15789 fi
15790 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15791 fi
15792
15793 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_have_aix_thread_debug" >&5
15794 $as_echo "$gdb_cv_have_aix_thread_debug" >&6; }
15795 if test "$gdb_cv_have_aix_thread_debug" = yes; then
15796 CONFIG_SRCS="${CONFIG_SRCS} aix-thread.c"
15797 CONFIG_OBS="${CONFIG_OBS} aix-thread.o"
15798 LIBS="$LIBS -lpthdebug"
15799
15800 # Older versions of AIX do not provide the declaration for
15801 # the getthrds function (it appears that it was introduced
15802 # with AIX 6.x).
15803 ac_fn_c_check_decl "$LINENO" "getthrds" "ac_cv_have_decl_getthrds" "#include <procinfo.h>
15804 "
15805 if test "x$ac_cv_have_decl_getthrds" = xyes; then :
15806 ac_have_decl=1
15807 else
15808 ac_have_decl=0
15809 fi
15810
15811 cat >>confdefs.h <<_ACEOF
15812 #define HAVE_DECL_GETTHRDS $ac_have_decl
15813 _ACEOF
15814
15815 fi
15816 ;;
15817 esac
15818
15819 fi
15820
15821 if test "x$ac_cv_header_thread_db_h" = "xyes"; then
15822 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTALLOC" >&5
15823 $as_echo_n "checking whether <thread_db.h> has TD_NOTALLOC... " >&6; }
15824 if ${gdb_cv_thread_db_h_has_td_notalloc+:} false; then :
15825 $as_echo_n "(cached) " >&6
15826 else
15827 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15828 /* end confdefs.h. */
15829 #include <thread_db.h>
15830 int
15831 main ()
15832 {
15833 int i = TD_NOTALLOC;
15834 ;
15835 return 0;
15836 }
15837 _ACEOF
15838 if ac_fn_c_try_compile "$LINENO"; then :
15839 gdb_cv_thread_db_h_has_td_notalloc=yes
15840 else
15841 gdb_cv_thread_db_h_has_td_notalloc=no
15842
15843 fi
15844 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15845
15846 fi
15847 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notalloc" >&5
15848 $as_echo "$gdb_cv_thread_db_h_has_td_notalloc" >&6; }
15849 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_VERSION" >&5
15850 $as_echo_n "checking whether <thread_db.h> has TD_VERSION... " >&6; }
15851 if ${gdb_cv_thread_db_h_has_td_version+:} false; then :
15852 $as_echo_n "(cached) " >&6
15853 else
15854 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15855 /* end confdefs.h. */
15856 #include <thread_db.h>
15857 int
15858 main ()
15859 {
15860 int i = TD_VERSION;
15861 ;
15862 return 0;
15863 }
15864 _ACEOF
15865 if ac_fn_c_try_compile "$LINENO"; then :
15866 gdb_cv_thread_db_h_has_td_version=yes
15867 else
15868 gdb_cv_thread_db_h_has_td_version=no
15869
15870 fi
15871 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15872
15873 fi
15874 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_version" >&5
15875 $as_echo "$gdb_cv_thread_db_h_has_td_version" >&6; }
15876 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether <thread_db.h> has TD_NOTLS" >&5
15877 $as_echo_n "checking whether <thread_db.h> has TD_NOTLS... " >&6; }
15878 if ${gdb_cv_thread_db_h_has_td_notls+:} false; then :
15879 $as_echo_n "(cached) " >&6
15880 else
15881 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
15882 /* end confdefs.h. */
15883 #include <thread_db.h>
15884 int
15885 main ()
15886 {
15887 int i = TD_NOTLS;
15888 ;
15889 return 0;
15890 }
15891 _ACEOF
15892 if ac_fn_c_try_compile "$LINENO"; then :
15893 gdb_cv_thread_db_h_has_td_notls=yes
15894 else
15895 gdb_cv_thread_db_h_has_td_notls=no
15896
15897 fi
15898 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
15899
15900 fi
15901 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_thread_db_h_has_td_notls" >&5
15902 $as_echo "$gdb_cv_thread_db_h_has_td_notls" >&6; }
15903 fi
15904 if test "x$gdb_cv_thread_db_h_has_td_notalloc" = "xyes"; then
15905
15906 $as_echo "#define THREAD_DB_HAS_TD_NOTALLOC 1" >>confdefs.h
15907
15908 fi
15909 if test "x$gdb_cv_thread_db_h_has_td_version" = "xyes"; then
15910
15911 $as_echo "#define THREAD_DB_HAS_TD_VERSION 1" >>confdefs.h
15912
15913 fi
15914 if test "x$gdb_cv_thread_db_h_has_td_notls" = "xyes"; then
15915
15916 $as_echo "#define THREAD_DB_HAS_TD_NOTLS 1" >>confdefs.h
15917
15918 fi
15919
15920 case $host_os in
15921 go32* | *djgpp*)
15922 gdbinit=gdb.ini
15923 ;;
15924 *)
15925 gdbinit=.gdbinit
15926 ;;
15927 esac
15928
15929 cat >>confdefs.h <<_ACEOF
15930 #define GDBINIT "$gdbinit"
15931 _ACEOF
15932
15933
15934
15935 # Support for --with-sysroot is a copy of GDB_AC_WITH_DIR,
15936 # except that the argument to --with-sysroot is optional.
15937 # --with-sysroot (or --with-sysroot=yes) sets the default sysroot path.
15938 if test "x$with_sysroot" = xyes; then
15939 with_sysroot="${exec_prefix}/${target_alias}/sys-root"
15940 fi
15941
15942 # Check whether --with-sysroot was given.
15943 if test "${with_sysroot+set}" = set; then :
15944 withval=$with_sysroot; TARGET_SYSTEM_ROOT=$withval
15945 else
15946 TARGET_SYSTEM_ROOT=
15947 fi
15948
15949
15950 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15951 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15952 ac_define_dir=`eval echo $TARGET_SYSTEM_ROOT`
15953 ac_define_dir=`eval echo $ac_define_dir`
15954
15955 cat >>confdefs.h <<_ACEOF
15956 #define TARGET_SYSTEM_ROOT "$ac_define_dir"
15957 _ACEOF
15958
15959
15960
15961
15962 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
15963 if test "x$prefix" = xNONE; then
15964 test_prefix=/usr/local
15965 else
15966 test_prefix=$prefix
15967 fi
15968 else
15969 test_prefix=$exec_prefix
15970 fi
15971 value=0
15972 case ${ac_define_dir} in
15973 "${test_prefix}"|"${test_prefix}/"*|\
15974 '${exec_prefix}'|'${exec_prefix}/'*)
15975 value=1
15976 ;;
15977 esac
15978
15979 cat >>confdefs.h <<_ACEOF
15980 #define TARGET_SYSTEM_ROOT_RELOCATABLE $value
15981 _ACEOF
15982
15983
15984
15985
15986
15987 # Check whether --with-system-gdbinit was given.
15988 if test "${with_system_gdbinit+set}" = set; then :
15989 withval=$with_system_gdbinit;
15990 SYSTEM_GDBINIT=$withval
15991 else
15992 SYSTEM_GDBINIT=
15993 fi
15994
15995
15996 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
15997 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
15998 ac_define_dir=`eval echo $SYSTEM_GDBINIT`
15999 ac_define_dir=`eval echo $ac_define_dir`
16000
16001 cat >>confdefs.h <<_ACEOF
16002 #define SYSTEM_GDBINIT "$ac_define_dir"
16003 _ACEOF
16004
16005
16006
16007
16008 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16009 if test "x$prefix" = xNONE; then
16010 test_prefix=/usr/local
16011 else
16012 test_prefix=$prefix
16013 fi
16014 else
16015 test_prefix=$exec_prefix
16016 fi
16017 value=0
16018 case ${ac_define_dir} in
16019 "${test_prefix}"|"${test_prefix}/"*|\
16020 '${exec_prefix}'|'${exec_prefix}/'*)
16021 value=1
16022 ;;
16023 esac
16024
16025 cat >>confdefs.h <<_ACEOF
16026 #define SYSTEM_GDBINIT_RELOCATABLE $value
16027 _ACEOF
16028
16029
16030
16031
16032
16033 # Check whether --with-system-gdbinit-dir was given.
16034 if test "${with_system_gdbinit_dir+set}" = set; then :
16035 withval=$with_system_gdbinit_dir;
16036 SYSTEM_GDBINIT_DIR=$withval
16037 else
16038 SYSTEM_GDBINIT_DIR=
16039 fi
16040
16041
16042 test "x$prefix" = xNONE && prefix="$ac_default_prefix"
16043 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
16044 ac_define_dir=`eval echo $SYSTEM_GDBINIT_DIR`
16045 ac_define_dir=`eval echo $ac_define_dir`
16046
16047 cat >>confdefs.h <<_ACEOF
16048 #define SYSTEM_GDBINIT_DIR "$ac_define_dir"
16049 _ACEOF
16050
16051
16052
16053
16054 if test "x$exec_prefix" = xNONE || test "x$exec_prefix" = 'x${prefix}'; then
16055 if test "x$prefix" = xNONE; then
16056 test_prefix=/usr/local
16057 else
16058 test_prefix=$prefix
16059 fi
16060 else
16061 test_prefix=$exec_prefix
16062 fi
16063 value=0
16064 case ${ac_define_dir} in
16065 "${test_prefix}"|"${test_prefix}/"*|\
16066 '${exec_prefix}'|'${exec_prefix}/'*)
16067 value=1
16068 ;;
16069 esac
16070
16071 cat >>confdefs.h <<_ACEOF
16072 #define SYSTEM_GDBINIT_DIR_RELOCATABLE $value
16073 _ACEOF
16074
16075
16076
16077
16078
16079 # Check whether --enable-werror was given.
16080 if test "${enable_werror+set}" = set; then :
16081 enableval=$enable_werror; case "${enableval}" in
16082 yes | y) ERROR_ON_WARNING="yes" ;;
16083 no | n) ERROR_ON_WARNING="no" ;;
16084 *) as_fn_error $? "bad value ${enableval} for --enable-werror" "$LINENO" 5 ;;
16085 esac
16086 fi
16087
16088
16089 # Enable -Werror by default when using gcc. Turn it off for releases.
16090 if test "${GCC}" = yes -a -z "${ERROR_ON_WARNING}" && $development; then
16091 ERROR_ON_WARNING=yes
16092 fi
16093
16094 WERROR_CFLAGS=""
16095 if test "${ERROR_ON_WARNING}" = yes ; then
16096 WERROR_CFLAGS="-Werror"
16097 fi
16098
16099 # The options we'll try to enable.
16100 build_warnings="-Wall -Wpointer-arith \
16101 -Wno-unused -Wunused-value -Wunused-variable -Wunused-function \
16102 -Wno-switch -Wno-char-subscripts \
16103 -Wempty-body -Wunused-but-set-parameter -Wunused-but-set-variable \
16104 -Wno-sign-compare -Wno-error=maybe-uninitialized \
16105 -Wno-mismatched-tags \
16106 -Wno-error=deprecated-register \
16107 -Wsuggest-override \
16108 -Wimplicit-fallthrough=3 \
16109 -Wduplicated-cond \
16110 -Wshadow=local \
16111 -Wdeprecated-copy \
16112 -Wdeprecated-copy-dtor \
16113 -Wredundant-move \
16114 -Wmissing-declarations \
16115 -Wstrict-null-sentinel"
16116
16117 case "${host}" in
16118 *-*-mingw32*)
16119 # Enable -Wno-format by default when using gcc on mingw since many
16120 # GCC versions complain about %I64.
16121 build_warnings="$build_warnings -Wno-format" ;;
16122 *-*-solaris*)
16123 # Solaris 11.4 <python2.7/ceval.h> uses #pragma no_inline that GCC
16124 # doesn't understand.
16125 build_warnings="$build_warnings -Wno-unknown-pragmas"
16126 # Solaris 11 <unistd.h> marks vfork deprecated.
16127 build_warnings="$build_warnings -Wno-deprecated-declarations" ;;
16128 *)
16129 # Note that gcc requires -Wformat for -Wformat-nonliteral to work,
16130 # but there's a special case for this below.
16131 build_warnings="$build_warnings -Wformat-nonliteral" ;;
16132 esac
16133
16134 # Check whether --enable-build-warnings was given.
16135 if test "${enable_build_warnings+set}" = set; then :
16136 enableval=$enable_build_warnings; case "${enableval}" in
16137 yes) ;;
16138 no) build_warnings="-w";;
16139 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16140 build_warnings="${build_warnings} ${t}";;
16141 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16142 build_warnings="${t} ${build_warnings}";;
16143 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16144 esac
16145 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16146 echo "Setting compiler warning flags = $build_warnings" 6>&1
16147 fi
16148 fi
16149 # Check whether --enable-gdb-build-warnings was given.
16150 if test "${enable_gdb_build_warnings+set}" = set; then :
16151 enableval=$enable_gdb_build_warnings; case "${enableval}" in
16152 yes) ;;
16153 no) build_warnings="-w";;
16154 ,*) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16155 build_warnings="${build_warnings} ${t}";;
16156 *,) t=`echo "${enableval}" | sed -e "s/,/ /g"`
16157 build_warnings="${t} ${build_warnings}";;
16158 *) build_warnings=`echo "${enableval}" | sed -e "s/,/ /g"`;;
16159 esac
16160 if test x"$silent" != x"yes" && test x"$build_warnings" != x""; then
16161 echo "Setting GDB specific compiler warning flags = $build_warnings" 6>&1
16162 fi
16163 fi
16164
16165 # The set of warnings supported by a C++ compiler is not the same as
16166 # of the C compiler.
16167 ac_ext=cpp
16168 ac_cpp='$CXXCPP $CPPFLAGS'
16169 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16170 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16171 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16172
16173
16174 WARN_CFLAGS=""
16175 if test "x${build_warnings}" != x -a "x$GCC" = xyes
16176 then
16177 { $as_echo "$as_me:${as_lineno-$LINENO}: checking compiler warning flags" >&5
16178 $as_echo_n "checking compiler warning flags... " >&6; }
16179 # Separate out the -Werror flag as some files just cannot be
16180 # compiled with it enabled.
16181 for w in ${build_warnings}; do
16182 # GCC does not complain about -Wno-unknown-warning. Invert
16183 # and test -Wunknown-warning instead.
16184 case $w in
16185 -Wno-*)
16186 wtest=`echo $w | sed 's/-Wno-/-W/g'` ;;
16187 -Wformat-nonliteral)
16188 # gcc requires -Wformat before -Wformat-nonliteral
16189 # will work, so stick them together.
16190 w="-Wformat $w"
16191 wtest="$w"
16192 ;;
16193 *)
16194 wtest=$w ;;
16195 esac
16196
16197 case $w in
16198 -Werr*) WERROR_CFLAGS=-Werror ;;
16199 *)
16200 # Check whether GCC accepts it.
16201 saved_CFLAGS="$CFLAGS"
16202 CFLAGS="$CFLAGS -Werror $wtest"
16203 saved_CXXFLAGS="$CXXFLAGS"
16204 CXXFLAGS="$CXXFLAGS -Werror $wtest"
16205 if test "x$w" = "x-Wunused-variable"; then
16206 # Check for https://gcc.gnu.org/bugzilla/show_bug.cgi?id=38958,
16207 # fixed in GCC 4.9. This test is derived from the gdb
16208 # source code that triggered this bug in GCC.
16209 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16210 /* end confdefs.h. */
16211 struct scoped_restore_base {};
16212 struct scoped_restore_tmpl : public scoped_restore_base {
16213 ~scoped_restore_tmpl() {}
16214 };
16215 int
16216 main ()
16217 {
16218 const scoped_restore_base &b = scoped_restore_tmpl();
16219 ;
16220 return 0;
16221 }
16222 _ACEOF
16223 if ac_fn_cxx_try_compile "$LINENO"; then :
16224 WARN_CFLAGS="${WARN_CFLAGS} $w"
16225 fi
16226 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16227 else
16228 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16229 /* end confdefs.h. */
16230
16231 int
16232 main ()
16233 {
16234
16235 ;
16236 return 0;
16237 }
16238 _ACEOF
16239 if ac_fn_cxx_try_compile "$LINENO"; then :
16240 WARN_CFLAGS="${WARN_CFLAGS} $w"
16241 fi
16242 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
16243 fi
16244 CFLAGS="$saved_CFLAGS"
16245 CXXFLAGS="$saved_CXXFLAGS"
16246 esac
16247 done
16248 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${WARN_CFLAGS} ${WERROR_CFLAGS}" >&5
16249 $as_echo "${WARN_CFLAGS} ${WERROR_CFLAGS}" >&6; }
16250 fi
16251
16252
16253
16254 ac_ext=c
16255 ac_cpp='$CPP $CPPFLAGS'
16256 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16257 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16258 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16259
16260
16261
16262 # Check whether --enable-ubsan was given.
16263 if test "${enable_ubsan+set}" = set; then :
16264 enableval=$enable_ubsan;
16265 else
16266 enable_ubsan=no
16267 fi
16268
16269 if test "x$enable_ubsan" = xauto; then
16270 if $development; then
16271 enable_ubsan=yes
16272 fi
16273 fi
16274 ac_ext=cpp
16275 ac_cpp='$CXXCPP $CPPFLAGS'
16276 ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16277 ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16278 ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
16279
16280 if test "x$enable_ubsan" = xyes; then
16281 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -fsanitize=undefined is accepted" >&5
16282 $as_echo_n "checking whether -fsanitize=undefined is accepted... " >&6; }
16283 saved_CXXFLAGS="$CXXFLAGS"
16284 CXXFLAGS="$CXXFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16285 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16286 /* end confdefs.h. */
16287
16288 int
16289 main ()
16290 {
16291
16292 ;
16293 return 0;
16294 }
16295 _ACEOF
16296 if ac_fn_cxx_try_link "$LINENO"; then :
16297 enable_ubsan=yes
16298 else
16299 enable_ubsan=no
16300 fi
16301 rm -f core conftest.err conftest.$ac_objext \
16302 conftest$ac_exeext conftest.$ac_ext
16303 CXXFLAGS="$saved_CXXFLAGS"
16304 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_ubsan" >&5
16305 $as_echo "$enable_ubsan" >&6; }
16306 if test "x$enable_ubsan" = xyes; then
16307 WARN_CFLAGS="$WARN_CFLAGS -fsanitize=undefined -fno-sanitize-recover=undefined"
16308 CONFIG_LDFLAGS="$CONFIG_LDFLAGS -fsanitize=undefined"
16309 fi
16310 fi
16311 ac_ext=c
16312 ac_cpp='$CPP $CPPFLAGS'
16313 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
16314 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
16315 ac_compiler_gnu=$ac_cv_c_compiler_gnu
16316
16317
16318
16319 # In the Cygwin environment, we need some additional flags.
16320 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cygwin" >&5
16321 $as_echo_n "checking for cygwin... " >&6; }
16322 if ${gdb_cv_os_cygwin+:} false; then :
16323 $as_echo_n "(cached) " >&6
16324 else
16325 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16326 /* end confdefs.h. */
16327
16328 #if defined (__CYGWIN__) || defined (__CYGWIN32__)
16329 lose
16330 #endif
16331 _ACEOF
16332 if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
16333 $EGREP "^lose$" >/dev/null 2>&1; then :
16334 gdb_cv_os_cygwin=yes
16335 else
16336 gdb_cv_os_cygwin=no
16337 fi
16338 rm -f conftest*
16339
16340 fi
16341 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_os_cygwin" >&5
16342 $as_echo "$gdb_cv_os_cygwin" >&6; }
16343
16344
16345 SER_HARDWIRE="ser-base.o ser-unix.o ser-pipe.o ser-tcp.o"
16346 case ${host} in
16347 *go32* ) SER_HARDWIRE=ser-go32.o ;;
16348 *djgpp* ) SER_HARDWIRE=ser-go32.o ;;
16349 *mingw32*) SER_HARDWIRE="ser-base.o ser-tcp.o ser-mingw.o" ;;
16350 *) SER_HARDWIRE="$SER_HARDWIRE ser-uds.o" ;;
16351 esac
16352
16353
16354 # libreadline needs libuser32.a in a cygwin environment
16355 WIN32LIBS=
16356 if test x"$gdb_cv_os_cygwin" = xyes; then
16357 WIN32LIBS="-luser32"
16358 case "${target}" in
16359 *cygwin*) WIN32LIBS="$WIN32LIBS -limagehlp"
16360 ;;
16361 esac
16362 fi
16363
16364 # The ser-tcp.c module requires sockets.
16365 # Note that WIN32APILIBS is set by GDB_AC_COMMON.
16366 WIN32LIBS="$WIN32LIBS $WIN32APILIBS"
16367
16368 # Add ELF support to GDB, but only if BFD includes ELF support.
16369
16370 OLD_CFLAGS=$CFLAGS
16371 OLD_LDFLAGS=$LDFLAGS
16372 OLD_LIBS=$LIBS
16373 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16374 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16375 # always want our bfd.
16376 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
16377 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16378 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
16379 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
16380 LIBS="-lbfd -liberty -lz $intl $LIBS"
16381 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ELF support in BFD" >&5
16382 $as_echo_n "checking for ELF support in BFD... " >&6; }
16383 if ${gdb_cv_var_elf+:} false; then :
16384 $as_echo_n "(cached) " >&6
16385 else
16386 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16387 /* end confdefs.h. */
16388 #include <stdlib.h>
16389 #include "bfd.h"
16390 #include "elf-bfd.h"
16391
16392 int
16393 main ()
16394 {
16395 return bfd_get_elf_phdr_upper_bound (NULL);
16396 ;
16397 return 0;
16398 }
16399 _ACEOF
16400 if ac_fn_c_try_link "$LINENO"; then :
16401 gdb_cv_var_elf=yes
16402 else
16403 gdb_cv_var_elf=no
16404 fi
16405 rm -f core conftest.err conftest.$ac_objext \
16406 conftest$ac_exeext conftest.$ac_ext
16407 fi
16408 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_elf" >&5
16409 $as_echo "$gdb_cv_var_elf" >&6; }
16410 CFLAGS=$OLD_CFLAGS
16411 LDFLAGS=$OLD_LDFLAGS
16412 LIBS=$OLD_LIBS
16413 if test "$gdb_cv_var_elf" = yes; then
16414 CONFIG_OBS="$CONFIG_OBS elfread.o stap-probe.o dtrace-probe.o"
16415
16416 $as_echo "#define HAVE_ELF 1" >>confdefs.h
16417
16418 # -ldl is provided by bfd/Makfile.am (LIBDL) <PLUGINS>.
16419 if test "$plugins" = "yes"; then
16420 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5
16421 $as_echo_n "checking for library containing dlopen... " >&6; }
16422 if ${ac_cv_search_dlopen+:} false; then :
16423 $as_echo_n "(cached) " >&6
16424 else
16425 ac_func_search_save_LIBS=$LIBS
16426 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16427 /* end confdefs.h. */
16428
16429 /* Override any GCC internal prototype to avoid an error.
16430 Use char because int might match the return type of a GCC
16431 builtin and then its argument prototype would still apply. */
16432 #ifdef __cplusplus
16433 extern "C"
16434 #endif
16435 char dlopen ();
16436 int
16437 main ()
16438 {
16439 return dlopen ();
16440 ;
16441 return 0;
16442 }
16443 _ACEOF
16444 for ac_lib in '' dl; do
16445 if test -z "$ac_lib"; then
16446 ac_res="none required"
16447 else
16448 ac_res=-l$ac_lib
16449 LIBS="-l$ac_lib $ac_func_search_save_LIBS"
16450 fi
16451 if ac_fn_c_try_link "$LINENO"; then :
16452 ac_cv_search_dlopen=$ac_res
16453 fi
16454 rm -f core conftest.err conftest.$ac_objext \
16455 conftest$ac_exeext
16456 if ${ac_cv_search_dlopen+:} false; then :
16457 break
16458 fi
16459 done
16460 if ${ac_cv_search_dlopen+:} false; then :
16461
16462 else
16463 ac_cv_search_dlopen=no
16464 fi
16465 rm conftest.$ac_ext
16466 LIBS=$ac_func_search_save_LIBS
16467 fi
16468 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5
16469 $as_echo "$ac_cv_search_dlopen" >&6; }
16470 ac_res=$ac_cv_search_dlopen
16471 if test "$ac_res" != no; then :
16472 test "$ac_res" = "none required" || LIBS="$ac_res $LIBS"
16473
16474 fi
16475
16476 fi
16477 fi
16478
16479 # Add macho support to GDB, but only if BFD includes it.
16480
16481 OLD_CFLAGS=$CFLAGS
16482 OLD_LDFLAGS=$LDFLAGS
16483 OLD_LIBS=$LIBS
16484 # Put the old CFLAGS/LDFLAGS last, in case the user's (C|LD)FLAGS
16485 # points somewhere with bfd, with -I/foo/lib and -L/foo/lib. We
16486 # always want our bfd.
16487 CFLAGS="-I${srcdir}/../include -I../bfd -I${srcdir}/../bfd $CFLAGS"
16488 ZLIBDIR=`echo $zlibdir | sed 's,\$(top_builddir)/,,g'`
16489 LDFLAGS="-L../bfd -L../libiberty $ZLIBDIR $LDFLAGS"
16490 intl=`echo $LIBINTL | sed 's,${top_builddir}/,,g'`
16491 LIBS="-lbfd -liberty -lz $intl $LIBS"
16492 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Mach-O support in BFD" >&5
16493 $as_echo_n "checking for Mach-O support in BFD... " >&6; }
16494 if ${gdb_cv_var_macho+:} false; then :
16495 $as_echo_n "(cached) " >&6
16496 else
16497 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16498 /* end confdefs.h. */
16499 #include <stdlib.h>
16500 #include "bfd.h"
16501 #include "mach-o.h"
16502
16503 int
16504 main ()
16505 {
16506 return bfd_mach_o_lookup_command (NULL, 0, NULL);
16507 ;
16508 return 0;
16509 }
16510 _ACEOF
16511 if ac_fn_c_try_link "$LINENO"; then :
16512 gdb_cv_var_macho=yes
16513 else
16514 gdb_cv_var_macho=no
16515 fi
16516 rm -f core conftest.err conftest.$ac_objext \
16517 conftest$ac_exeext conftest.$ac_ext
16518 fi
16519 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $gdb_cv_var_macho" >&5
16520 $as_echo "$gdb_cv_var_macho" >&6; }
16521 CFLAGS=$OLD_CFLAGS
16522 LDFLAGS=$OLD_LDFLAGS
16523 LIBS=$OLD_LIBS
16524 if test "$gdb_cv_var_macho" = yes; then
16525 CONFIG_OBS="$CONFIG_OBS machoread.o"
16526 fi
16527
16528 # Add any host-specific objects to GDB.
16529 CONFIG_OBS="${CONFIG_OBS} ${gdb_host_obs}"
16530
16531 # If building on ELF, look for lzma support for embedded compressed debug info.
16532 if test "$gdb_cv_var_elf" = yes; then
16533
16534 # Check whether --with-lzma was given.
16535 if test "${with_lzma+set}" = set; then :
16536 withval=$with_lzma;
16537 else
16538 with_lzma=auto
16539 fi
16540
16541 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use lzma" >&5
16542 $as_echo_n "checking whether to use lzma... " >&6; }
16543 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_lzma" >&5
16544 $as_echo "$with_lzma" >&6; }
16545
16546 if test "${with_lzma}" != no; then
16547
16548
16549
16550
16551
16552
16553
16554
16555 use_additional=yes
16556
16557 acl_save_prefix="$prefix"
16558 prefix="$acl_final_prefix"
16559 acl_save_exec_prefix="$exec_prefix"
16560 exec_prefix="$acl_final_exec_prefix"
16561
16562 eval additional_includedir=\"$includedir\"
16563 eval additional_libdir=\"$libdir\"
16564
16565 exec_prefix="$acl_save_exec_prefix"
16566 prefix="$acl_save_prefix"
16567
16568
16569 # Check whether --with-liblzma-prefix was given.
16570 if test "${with_liblzma_prefix+set}" = set; then :
16571 withval=$with_liblzma_prefix;
16572 if test "X$withval" = "Xno"; then
16573 use_additional=no
16574 else
16575 if test "X$withval" = "X"; then
16576
16577 acl_save_prefix="$prefix"
16578 prefix="$acl_final_prefix"
16579 acl_save_exec_prefix="$exec_prefix"
16580 exec_prefix="$acl_final_exec_prefix"
16581
16582 eval additional_includedir=\"$includedir\"
16583 eval additional_libdir=\"$libdir\"
16584
16585 exec_prefix="$acl_save_exec_prefix"
16586 prefix="$acl_save_prefix"
16587
16588 else
16589 additional_includedir="$withval/include"
16590 additional_libdir="$withval/lib"
16591 fi
16592 fi
16593
16594 fi
16595
16596 LIBLZMA=
16597 LTLIBLZMA=
16598 INCLZMA=
16599 rpathdirs=
16600 ltrpathdirs=
16601 names_already_handled=
16602 names_next_round='lzma '
16603 while test -n "$names_next_round"; do
16604 names_this_round="$names_next_round"
16605 names_next_round=
16606 for name in $names_this_round; do
16607 already_handled=
16608 for n in $names_already_handled; do
16609 if test "$n" = "$name"; then
16610 already_handled=yes
16611 break
16612 fi
16613 done
16614 if test -z "$already_handled"; then
16615 names_already_handled="$names_already_handled $name"
16616 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
16617 eval value=\"\$HAVE_LIB$uppername\"
16618 if test -n "$value"; then
16619 if test "$value" = yes; then
16620 eval value=\"\$LIB$uppername\"
16621 test -z "$value" || LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$value"
16622 eval value=\"\$LTLIB$uppername\"
16623 test -z "$value" || LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$value"
16624 else
16625 :
16626 fi
16627 else
16628 found_dir=
16629 found_la=
16630 found_so=
16631 found_a=
16632 if test $use_additional = yes; then
16633 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
16634 found_dir="$additional_libdir"
16635 found_so="$additional_libdir/lib$name.$shlibext"
16636 if test -f "$additional_libdir/lib$name.la"; then
16637 found_la="$additional_libdir/lib$name.la"
16638 fi
16639 else
16640 if test -f "$additional_libdir/lib$name.$libext"; then
16641 found_dir="$additional_libdir"
16642 found_a="$additional_libdir/lib$name.$libext"
16643 if test -f "$additional_libdir/lib$name.la"; then
16644 found_la="$additional_libdir/lib$name.la"
16645 fi
16646 fi
16647 fi
16648 fi
16649 if test "X$found_dir" = "X"; then
16650 for x in $LDFLAGS $LTLIBLZMA; do
16651
16652 acl_save_prefix="$prefix"
16653 prefix="$acl_final_prefix"
16654 acl_save_exec_prefix="$exec_prefix"
16655 exec_prefix="$acl_final_exec_prefix"
16656 eval x=\"$x\"
16657 exec_prefix="$acl_save_exec_prefix"
16658 prefix="$acl_save_prefix"
16659
16660 case "$x" in
16661 -L*)
16662 dir=`echo "X$x" | sed -e 's/^X-L//'`
16663 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
16664 found_dir="$dir"
16665 found_so="$dir/lib$name.$shlibext"
16666 if test -f "$dir/lib$name.la"; then
16667 found_la="$dir/lib$name.la"
16668 fi
16669 else
16670 if test -f "$dir/lib$name.$libext"; then
16671 found_dir="$dir"
16672 found_a="$dir/lib$name.$libext"
16673 if test -f "$dir/lib$name.la"; then
16674 found_la="$dir/lib$name.la"
16675 fi
16676 fi
16677 fi
16678 ;;
16679 esac
16680 if test "X$found_dir" != "X"; then
16681 break
16682 fi
16683 done
16684 fi
16685 if test "X$found_dir" != "X"; then
16686 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$found_dir -l$name"
16687 if test "X$found_so" != "X"; then
16688 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
16689 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16690 else
16691 haveit=
16692 for x in $ltrpathdirs; do
16693 if test "X$x" = "X$found_dir"; then
16694 haveit=yes
16695 break
16696 fi
16697 done
16698 if test -z "$haveit"; then
16699 ltrpathdirs="$ltrpathdirs $found_dir"
16700 fi
16701 if test "$hardcode_direct" = yes; then
16702 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16703 else
16704 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
16705 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16706 haveit=
16707 for x in $rpathdirs; do
16708 if test "X$x" = "X$found_dir"; then
16709 haveit=yes
16710 break
16711 fi
16712 done
16713 if test -z "$haveit"; then
16714 rpathdirs="$rpathdirs $found_dir"
16715 fi
16716 else
16717 haveit=
16718 for x in $LDFLAGS $LIBLZMA; do
16719
16720 acl_save_prefix="$prefix"
16721 prefix="$acl_final_prefix"
16722 acl_save_exec_prefix="$exec_prefix"
16723 exec_prefix="$acl_final_exec_prefix"
16724 eval x=\"$x\"
16725 exec_prefix="$acl_save_exec_prefix"
16726 prefix="$acl_save_prefix"
16727
16728 if test "X$x" = "X-L$found_dir"; then
16729 haveit=yes
16730 break
16731 fi
16732 done
16733 if test -z "$haveit"; then
16734 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir"
16735 fi
16736 if test "$hardcode_minus_L" != no; then
16737 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_so"
16738 else
16739 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16740 fi
16741 fi
16742 fi
16743 fi
16744 else
16745 if test "X$found_a" != "X"; then
16746 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$found_a"
16747 else
16748 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$found_dir -l$name"
16749 fi
16750 fi
16751 additional_includedir=
16752 case "$found_dir" in
16753 */lib | */lib/)
16754 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
16755 additional_includedir="$basedir/include"
16756 ;;
16757 esac
16758 if test "X$additional_includedir" != "X"; then
16759 if test "X$additional_includedir" != "X/usr/include"; then
16760 haveit=
16761 if test "X$additional_includedir" = "X/usr/local/include"; then
16762 if test -n "$GCC"; then
16763 case $host_os in
16764 linux*) haveit=yes;;
16765 esac
16766 fi
16767 fi
16768 if test -z "$haveit"; then
16769 for x in $CPPFLAGS $INCLZMA; do
16770
16771 acl_save_prefix="$prefix"
16772 prefix="$acl_final_prefix"
16773 acl_save_exec_prefix="$exec_prefix"
16774 exec_prefix="$acl_final_exec_prefix"
16775 eval x=\"$x\"
16776 exec_prefix="$acl_save_exec_prefix"
16777 prefix="$acl_save_prefix"
16778
16779 if test "X$x" = "X-I$additional_includedir"; then
16780 haveit=yes
16781 break
16782 fi
16783 done
16784 if test -z "$haveit"; then
16785 if test -d "$additional_includedir"; then
16786 INCLZMA="${INCLZMA}${INCLZMA:+ }-I$additional_includedir"
16787 fi
16788 fi
16789 fi
16790 fi
16791 fi
16792 if test -n "$found_la"; then
16793 save_libdir="$libdir"
16794 case "$found_la" in
16795 */* | *\\*) . "$found_la" ;;
16796 *) . "./$found_la" ;;
16797 esac
16798 libdir="$save_libdir"
16799 for dep in $dependency_libs; do
16800 case "$dep" in
16801 -L*)
16802 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
16803 if test "X$additional_libdir" != "X/usr/lib"; then
16804 haveit=
16805 if test "X$additional_libdir" = "X/usr/local/lib"; then
16806 if test -n "$GCC"; then
16807 case $host_os in
16808 linux*) haveit=yes;;
16809 esac
16810 fi
16811 fi
16812 if test -z "$haveit"; then
16813 haveit=
16814 for x in $LDFLAGS $LIBLZMA; do
16815
16816 acl_save_prefix="$prefix"
16817 prefix="$acl_final_prefix"
16818 acl_save_exec_prefix="$exec_prefix"
16819 exec_prefix="$acl_final_exec_prefix"
16820 eval x=\"$x\"
16821 exec_prefix="$acl_save_exec_prefix"
16822 prefix="$acl_save_prefix"
16823
16824 if test "X$x" = "X-L$additional_libdir"; then
16825 haveit=yes
16826 break
16827 fi
16828 done
16829 if test -z "$haveit"; then
16830 if test -d "$additional_libdir"; then
16831 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-L$additional_libdir"
16832 fi
16833 fi
16834 haveit=
16835 for x in $LDFLAGS $LTLIBLZMA; do
16836
16837 acl_save_prefix="$prefix"
16838 prefix="$acl_final_prefix"
16839 acl_save_exec_prefix="$exec_prefix"
16840 exec_prefix="$acl_final_exec_prefix"
16841 eval x=\"$x\"
16842 exec_prefix="$acl_save_exec_prefix"
16843 prefix="$acl_save_prefix"
16844
16845 if test "X$x" = "X-L$additional_libdir"; then
16846 haveit=yes
16847 break
16848 fi
16849 done
16850 if test -z "$haveit"; then
16851 if test -d "$additional_libdir"; then
16852 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-L$additional_libdir"
16853 fi
16854 fi
16855 fi
16856 fi
16857 ;;
16858 -R*)
16859 dir=`echo "X$dep" | sed -e 's/^X-R//'`
16860 if test "$enable_rpath" != no; then
16861 haveit=
16862 for x in $rpathdirs; do
16863 if test "X$x" = "X$dir"; then
16864 haveit=yes
16865 break
16866 fi
16867 done
16868 if test -z "$haveit"; then
16869 rpathdirs="$rpathdirs $dir"
16870 fi
16871 haveit=
16872 for x in $ltrpathdirs; do
16873 if test "X$x" = "X$dir"; then
16874 haveit=yes
16875 break
16876 fi
16877 done
16878 if test -z "$haveit"; then
16879 ltrpathdirs="$ltrpathdirs $dir"
16880 fi
16881 fi
16882 ;;
16883 -l*)
16884 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
16885 ;;
16886 *.la)
16887 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
16888 ;;
16889 *)
16890 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$dep"
16891 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }$dep"
16892 ;;
16893 esac
16894 done
16895 fi
16896 else
16897 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }-l$name"
16898 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-l$name"
16899 fi
16900 fi
16901 fi
16902 done
16903 done
16904 if test "X$rpathdirs" != "X"; then
16905 if test -n "$hardcode_libdir_separator"; then
16906 alldirs=
16907 for found_dir in $rpathdirs; do
16908 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
16909 done
16910 acl_save_libdir="$libdir"
16911 libdir="$alldirs"
16912 eval flag=\"$hardcode_libdir_flag_spec\"
16913 libdir="$acl_save_libdir"
16914 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16915 else
16916 for found_dir in $rpathdirs; do
16917 acl_save_libdir="$libdir"
16918 libdir="$found_dir"
16919 eval flag=\"$hardcode_libdir_flag_spec\"
16920 libdir="$acl_save_libdir"
16921 LIBLZMA="${LIBLZMA}${LIBLZMA:+ }$flag"
16922 done
16923 fi
16924 fi
16925 if test "X$ltrpathdirs" != "X"; then
16926 for found_dir in $ltrpathdirs; do
16927 LTLIBLZMA="${LTLIBLZMA}${LTLIBLZMA:+ }-R$found_dir"
16928 done
16929 fi
16930
16931
16932 ac_save_CPPFLAGS="$CPPFLAGS"
16933
16934 for element in $INCLZMA; do
16935 haveit=
16936 for x in $CPPFLAGS; do
16937
16938 acl_save_prefix="$prefix"
16939 prefix="$acl_final_prefix"
16940 acl_save_exec_prefix="$exec_prefix"
16941 exec_prefix="$acl_final_exec_prefix"
16942 eval x=\"$x\"
16943 exec_prefix="$acl_save_exec_prefix"
16944 prefix="$acl_save_prefix"
16945
16946 if test "X$x" = "X$element"; then
16947 haveit=yes
16948 break
16949 fi
16950 done
16951 if test -z "$haveit"; then
16952 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
16953 fi
16954 done
16955
16956
16957 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblzma" >&5
16958 $as_echo_n "checking for liblzma... " >&6; }
16959 if ${ac_cv_liblzma+:} false; then :
16960 $as_echo_n "(cached) " >&6
16961 else
16962
16963 ac_save_LIBS="$LIBS"
16964 LIBS="$LIBS $LIBLZMA"
16965 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
16966 /* end confdefs.h. */
16967 #include "lzma.h"
16968 int
16969 main ()
16970 {
16971 lzma_index_iter iter;
16972 lzma_index_iter_init (&iter, 0);
16973 lzma_mf_is_supported (LZMA_MF_HC3);
16974 ;
16975 return 0;
16976 }
16977 _ACEOF
16978 if ac_fn_c_try_link "$LINENO"; then :
16979 ac_cv_liblzma=yes
16980 else
16981 ac_cv_liblzma=no
16982 fi
16983 rm -f core conftest.err conftest.$ac_objext \
16984 conftest$ac_exeext conftest.$ac_ext
16985 LIBS="$ac_save_LIBS"
16986
16987 fi
16988 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_liblzma" >&5
16989 $as_echo "$ac_cv_liblzma" >&6; }
16990 if test "$ac_cv_liblzma" = yes; then
16991 HAVE_LIBLZMA=yes
16992
16993 $as_echo "#define HAVE_LIBLZMA 1" >>confdefs.h
16994
16995 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with liblzma" >&5
16996 $as_echo_n "checking how to link with liblzma... " >&6; }
16997 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBLZMA" >&5
16998 $as_echo "$LIBLZMA" >&6; }
16999 else
17000 HAVE_LIBLZMA=no
17001 CPPFLAGS="$ac_save_CPPFLAGS"
17002 LIBLZMA=
17003 LTLIBLZMA=
17004 fi
17005
17006
17007
17008
17009
17010
17011 if test "$HAVE_LIBLZMA" != yes; then
17012 if test "$with_lzma" = yes; then
17013 as_fn_error $? "missing liblzma for --with-lzma" "$LINENO" 5
17014 fi
17015 fi
17016 fi
17017 fi
17018
17019 LIBGUI="../libgui/src/libgui.a"
17020 GUI_CFLAGS_X="-I${srcdir}/../libgui/src"
17021
17022
17023
17024 WIN32LDAPP=
17025
17026
17027
17028 case "${host}" in
17029 *-*-cygwin* | *-*-mingw* )
17030 configdir="win"
17031 ;;
17032 *)
17033 configdir="unix"
17034 ;;
17035 esac
17036
17037 GDBTKLIBS=
17038 if test "${enable_gdbtk}" = "yes"; then
17039
17040 # Gdbtk must have an absolute path to srcdir in order to run
17041 # properly when not installed.
17042 here=`pwd`
17043 cd ${srcdir}
17044 GDBTK_SRC_DIR=`pwd`
17045 cd $here
17046
17047
17048 #
17049 # Ok, lets find the tcl configuration
17050 # First, look for one uninstalled.
17051 # the alternative search directory is invoked by --with-tcl
17052 #
17053
17054 if test x"${no_tcl}" = x ; then
17055 # we reset no_tcl in case something fails here
17056 no_tcl=true
17057
17058 # Check whether --with-tcl was given.
17059 if test "${with_tcl+set}" = set; then :
17060 withval=$with_tcl; with_tclconfig=${withval}
17061 fi
17062
17063 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl configuration" >&5
17064 $as_echo_n "checking for Tcl configuration... " >&6; }
17065 if ${ac_cv_c_tclconfig+:} false; then :
17066 $as_echo_n "(cached) " >&6
17067 else
17068
17069
17070 # First check to see if --with-tcl was specified.
17071 case "${host}" in
17072 *-*-cygwin*) platDir="win" ;;
17073 *) platDir="unix" ;;
17074 esac
17075 if test x"${with_tclconfig}" != x ; then
17076 if test -f "${with_tclconfig}/tclConfig.sh" ; then
17077 ac_cv_c_tclconfig=`(cd ${with_tclconfig}; pwd)`
17078 else
17079 as_fn_error $? "${with_tclconfig} directory doesn't contain tclConfig.sh" "$LINENO" 5
17080 fi
17081 fi
17082
17083 # then check for a private Tcl installation
17084 if test x"${ac_cv_c_tclconfig}" = x ; then
17085 for i in \
17086 ../tcl \
17087 `ls -dr ../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17088 `ls -dr ../tcl[8-9].[0-9] 2>/dev/null` \
17089 `ls -dr ../tcl[8-9].[0-9]* 2>/dev/null` \
17090 ../../tcl \
17091 `ls -dr ../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17092 `ls -dr ../../tcl[8-9].[0-9] 2>/dev/null` \
17093 `ls -dr ../../tcl[8-9].[0-9]* 2>/dev/null` \
17094 ../../../tcl \
17095 `ls -dr ../../../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17096 `ls -dr ../../../tcl[8-9].[0-9] 2>/dev/null` \
17097 `ls -dr ../../../tcl[8-9].[0-9]* 2>/dev/null` ; do
17098 if test -f "$i/$platDir/tclConfig.sh" ; then
17099 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17100 break
17101 fi
17102 done
17103 fi
17104
17105 # on Darwin, check in Framework installation locations
17106 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tclconfig}" = x ; then
17107 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17108 `ls -d /Library/Frameworks 2>/dev/null` \
17109 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17110 `ls -d /System/Library/Frameworks 2>/dev/null` \
17111 ; do
17112 if test -f "$i/Tcl.framework/tclConfig.sh" ; then
17113 ac_cv_c_tclconfig=`(cd $i/Tcl.framework; pwd)`
17114 break
17115 fi
17116 done
17117 fi
17118
17119 # check in a few common install locations
17120 if test x"${ac_cv_c_tclconfig}" = x ; then
17121 for i in `ls -d ${libdir} 2>/dev/null` \
17122 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17123 `ls -d ${prefix}/lib 2>/dev/null` \
17124 `ls -d /usr/local/lib 2>/dev/null` \
17125 `ls -d /usr/contrib/lib 2>/dev/null` \
17126 `ls -d /usr/lib 2>/dev/null` \
17127 ; do
17128 if test -f "$i/tclConfig.sh" ; then
17129 ac_cv_c_tclconfig=`(cd $i; pwd)`
17130 break
17131 fi
17132 done
17133 fi
17134
17135 # check in a few other private locations
17136 if test x"${ac_cv_c_tclconfig}" = x ; then
17137 for i in \
17138 ${srcdir}/../tcl \
17139 `ls -dr ${srcdir}/../tcl[8-9].[0-9].[0-9]* 2>/dev/null` \
17140 `ls -dr ${srcdir}/../tcl[8-9].[0-9] 2>/dev/null` \
17141 `ls -dr ${srcdir}/../tcl[8-9].[0-9]* 2>/dev/null` ; do
17142 if test -f "$i/$platDir/tclConfig.sh" ; then
17143 ac_cv_c_tclconfig=`(cd $i/$platDir; pwd)`
17144 break
17145 fi
17146 done
17147 fi
17148
17149 fi
17150
17151
17152 if test x"${ac_cv_c_tclconfig}" = x ; then
17153 TCL_BIN_DIR="# no Tcl configs found"
17154 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tcl configuration definitions" >&5
17155 $as_echo "$as_me: WARNING: Can't find Tcl configuration definitions" >&2;}
17156 else
17157 no_tcl=
17158 TCL_BIN_DIR=${ac_cv_c_tclconfig}
17159 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TCL_BIN_DIR}/tclConfig.sh" >&5
17160 $as_echo "found ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
17161 fi
17162 fi
17163
17164
17165 # If $no_tk is nonempty, then we can't do Tk, and there is no
17166 # point to doing Tcl.
17167
17168 #
17169 # Ok, lets find the tk configuration
17170 # First, look for one uninstalled.
17171 # the alternative search directory is invoked by --with-tk
17172 #
17173
17174 if test x"${no_tk}" = x ; then
17175 # we reset no_tk in case something fails here
17176 no_tk=true
17177
17178 # Check whether --with-tk was given.
17179 if test "${with_tk+set}" = set; then :
17180 withval=$with_tk; with_tkconfig=${withval}
17181 fi
17182
17183 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk configuration" >&5
17184 $as_echo_n "checking for Tk configuration... " >&6; }
17185 if ${ac_cv_c_tkconfig+:} false; then :
17186 $as_echo_n "(cached) " >&6
17187 else
17188
17189
17190 # First check to see if --with-tkconfig was specified.
17191 if test x"${with_tkconfig}" != x ; then
17192 if test -f "${with_tkconfig}/tkConfig.sh" ; then
17193 ac_cv_c_tkconfig=`(cd ${with_tkconfig}; pwd)`
17194 else
17195 as_fn_error $? "${with_tkconfig} directory doesn't contain tkConfig.sh" "$LINENO" 5
17196 fi
17197 fi
17198
17199 # then check for a private Tk library
17200 case "${host}" in
17201 *-*-cygwin*) platDir="win" ;;
17202 *) platDir="unix" ;;
17203 esac
17204 if test x"${ac_cv_c_tkconfig}" = x ; then
17205 for i in \
17206 ../tk \
17207 `ls -dr ../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17208 `ls -dr ../tk[8-9].[0-9] 2>/dev/null` \
17209 `ls -dr ../tk[8-9].[0-9]* 2>/dev/null` \
17210 ../../tk \
17211 `ls -dr ../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17212 `ls -dr ../../tk[8-9].[0-9] 2>/dev/null` \
17213 `ls -dr ../../tk[8-9].[0-9]* 2>/dev/null` \
17214 ../../../tk \
17215 `ls -dr ../../../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17216 `ls -dr ../../../tk[8-9].[0-9] 2>/dev/null` \
17217 `ls -dr ../../../tk[8-9].[0-9]* 2>/dev/null` ; do
17218 if test -f "$i/$platDir/tkConfig.sh" ; then
17219 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17220 break
17221 fi
17222 done
17223 fi
17224
17225 # on Darwin, check in Framework installation locations
17226 if test "`uname -s`" = "Darwin" -a x"${ac_cv_c_tkconfig}" = x ; then
17227 for i in `ls -d ~/Library/Frameworks 2>/dev/null` \
17228 `ls -d /Library/Frameworks 2>/dev/null` \
17229 `ls -d /Network/Library/Frameworks 2>/dev/null` \
17230 `ls -d /System/Library/Frameworks 2>/dev/null` \
17231 ; do
17232 if test -f "$i/Tk.framework/tkConfig.sh" ; then
17233 ac_cv_c_tkconfig=`(cd $i/Tk.framework; pwd)`
17234 break
17235 fi
17236 done
17237 fi
17238
17239 # check in a few common install locations
17240 if test x"${ac_cv_c_tkconfig}" = x ; then
17241 for i in `ls -d ${libdir} 2>/dev/null` \
17242 `ls -d ${exec_prefix}/lib 2>/dev/null` \
17243 `ls -d ${prefix}/lib 2>/dev/null` \
17244 `ls -d /usr/local/lib 2>/dev/null` \
17245 `ls -d /usr/contrib/lib 2>/dev/null` \
17246 `ls -d /usr/lib 2>/dev/null` \
17247 ; do
17248 if test -f "$i/tkConfig.sh" ; then
17249 ac_cv_c_tkconfig=`(cd $i; pwd)`
17250 break
17251 fi
17252 done
17253 fi
17254 # check in a few other private locations
17255 if test x"${ac_cv_c_tkconfig}" = x ; then
17256 for i in \
17257 ${srcdir}/../tk \
17258 `ls -dr ${srcdir}/../tk[8-9].[0-9].[0-9]* 2>/dev/null` \
17259 `ls -dr ${srcdir}/../tk[8-9].[0-9] 2>/dev/null` \
17260 `ls -dr ${srcdir}/../tk[8-9].[0-9]* 2>/dev/null` ; do
17261 if test -f "$i/$platDir/tkConfig.sh" ; then
17262 ac_cv_c_tkconfig=`(cd $i/$platDir; pwd)`
17263 break
17264 fi
17265 done
17266 fi
17267
17268 fi
17269
17270
17271 if test x"${ac_cv_c_tkconfig}" = x ; then
17272 TK_BIN_DIR="# no Tk configs found"
17273 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Can't find Tk configuration definitions" >&5
17274 $as_echo "$as_me: WARNING: Can't find Tk configuration definitions" >&2;}
17275 else
17276 no_tk=
17277 TK_BIN_DIR=${ac_cv_c_tkconfig}
17278 { $as_echo "$as_me:${as_lineno-$LINENO}: result: found ${TK_BIN_DIR}/tkConfig.sh" >&5
17279 $as_echo "found ${TK_BIN_DIR}/tkConfig.sh" >&6; }
17280 fi
17281 fi
17282
17283
17284 if test -z "${no_tcl}" -a -z "${no_tk}"; then
17285
17286 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TCL_BIN_DIR}/tclConfig.sh" >&5
17287 $as_echo_n "checking for existence of ${TCL_BIN_DIR}/tclConfig.sh... " >&6; }
17288
17289 if test -f "${TCL_BIN_DIR}/tclConfig.sh" ; then
17290 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17291 $as_echo "loading" >&6; }
17292 . ${TCL_BIN_DIR}/tclConfig.sh
17293 else
17294 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TCL_BIN_DIR}/tclConfig.sh" >&5
17295 $as_echo "could not find ${TCL_BIN_DIR}/tclConfig.sh" >&6; }
17296 fi
17297
17298 # eval is required to do the TCL_DBGX substitution
17299 eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
17300 eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
17301
17302 # If the TCL_BIN_DIR is the build directory (not the install directory),
17303 # then set the common variable name to the value of the build variables.
17304 # For example, the variable TCL_LIB_SPEC will be set to the value
17305 # of TCL_BUILD_LIB_SPEC. An extension should make use of TCL_LIB_SPEC
17306 # instead of TCL_BUILD_LIB_SPEC since it will work with both an
17307 # installed and uninstalled version of Tcl.
17308 if test -f "${TCL_BIN_DIR}/Makefile" ; then
17309 TCL_LIB_SPEC=${TCL_BUILD_LIB_SPEC}
17310 TCL_STUB_LIB_SPEC=${TCL_BUILD_STUB_LIB_SPEC}
17311 TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
17312 elif test "`uname -s`" = "Darwin"; then
17313 # If Tcl was built as a framework, attempt to use the libraries
17314 # from the framework at the given location so that linking works
17315 # against Tcl.framework installed in an arbitrary location.
17316 case ${TCL_DEFS} in
17317 *TCL_FRAMEWORK*)
17318 if test -f "${TCL_BIN_DIR}/${TCL_LIB_FILE}"; then
17319 for i in "`cd ${TCL_BIN_DIR}; pwd`" \
17320 "`cd ${TCL_BIN_DIR}/../..; pwd`"; do
17321 if test "`basename "$i"`" = "${TCL_LIB_FILE}.framework"; then
17322 TCL_LIB_SPEC="-F`dirname "$i"` -framework ${TCL_LIB_FILE}"
17323 break
17324 fi
17325 done
17326 fi
17327 if test -f "${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"; then
17328 TCL_STUB_LIB_SPEC="-L${TCL_BIN_DIR} ${TCL_STUB_LIB_FLAG}"
17329 TCL_STUB_LIB_PATH="${TCL_BIN_DIR}/${TCL_STUB_LIB_FILE}"
17330 fi
17331 ;;
17332 esac
17333 fi
17334
17335 # eval is required to do the TCL_DBGX substitution
17336 eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
17337 eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
17338 eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
17339 eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
17340
17341
17342
17343
17344
17345
17346
17347
17348
17349
17350
17351
17352
17353
17354
17355 # Check for in-tree tcl
17356 here=`pwd`
17357 cd ${srcdir}/..
17358 topdir=`pwd`
17359 cd ${here}
17360
17361 intree="no"
17362 if test "${TCL_SRC_DIR}" = "${topdir}/tcl"; then
17363 intree="yes"
17364 fi
17365
17366 # Find Tcl private headers
17367 if test x"${intree}" = xno; then
17368
17369 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tcl private headers" >&5
17370 $as_echo_n "checking for Tcl private headers... " >&6; }
17371 private_dir=""
17372 dir=`echo ${TCL_INCLUDE_SPEC}/tcl-private/generic | sed -e s/-I//`
17373 if test -f ${dir}/tclInt.h ; then
17374 private_dir=${dir}
17375 fi
17376
17377 if test x"${private_dir}" = x; then
17378 as_fn_error $? "could not find private Tcl headers" "$LINENO" 5
17379 else
17380 TCL_PRIVATE_INCLUDE="-I${private_dir}"
17381 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17382 $as_echo "${private_dir}" >&6; }
17383 fi
17384
17385 TCL_INCLUDE="${TCL_INCLUDE_SPEC} ${TCL_PRIVATE_INCLUDE}"
17386 TCL_LIBRARY="${TCL_LIB_SPEC}"
17387 TCL_DEPS=""
17388 else
17389 # If building tcl in the same src tree, private headers
17390 # are not needed, but we need to be sure to use the right
17391 # headers library
17392 TCL_INCLUDE="-I${TCL_SRC_DIR}/generic"
17393 TCL_LIBRARY="${TCL_BUILD_LIB_SPEC}"
17394 TCL_DEPS="../tcl/${configdir}${TCL_LIB_FILE}"
17395 fi
17396
17397
17398
17399
17400
17401 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for existence of ${TK_BIN_DIR}/tkConfig.sh" >&5
17402 $as_echo_n "checking for existence of ${TK_BIN_DIR}/tkConfig.sh... " >&6; }
17403
17404 if test -f "${TK_BIN_DIR}/tkConfig.sh" ; then
17405 { $as_echo "$as_me:${as_lineno-$LINENO}: result: loading" >&5
17406 $as_echo "loading" >&6; }
17407 . ${TK_BIN_DIR}/tkConfig.sh
17408 else
17409 { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not find ${TK_BIN_DIR}/tkConfig.sh" >&5
17410 $as_echo "could not find ${TK_BIN_DIR}/tkConfig.sh" >&6; }
17411 fi
17412
17413 # eval is required to do the TK_DBGX substitution
17414 eval "TK_LIB_FILE=\"${TK_LIB_FILE}\""
17415 eval "TK_STUB_LIB_FILE=\"${TK_STUB_LIB_FILE}\""
17416
17417 # If the TK_BIN_DIR is the build directory (not the install directory),
17418 # then set the common variable name to the value of the build variables.
17419 # For example, the variable TK_LIB_SPEC will be set to the value
17420 # of TK_BUILD_LIB_SPEC. An extension should make use of TK_LIB_SPEC
17421 # instead of TK_BUILD_LIB_SPEC since it will work with both an
17422 # installed and uninstalled version of Tcl.
17423 if test -f "${TK_BIN_DIR}/Makefile" ; then
17424 TK_LIB_SPEC=${TK_BUILD_LIB_SPEC}
17425 TK_STUB_LIB_SPEC=${TK_BUILD_STUB_LIB_SPEC}
17426 TK_STUB_LIB_PATH=${TK_BUILD_STUB_LIB_PATH}
17427 elif test "`uname -s`" = "Darwin"; then
17428 # If Tk was built as a framework, attempt to use the libraries
17429 # from the framework at the given location so that linking works
17430 # against Tk.framework installed in an arbitrary location.
17431 case ${TK_DEFS} in
17432 *TK_FRAMEWORK*)
17433 if test -f "${TK_BIN_DIR}/${TK_LIB_FILE}"; then
17434 for i in "`cd ${TK_BIN_DIR}; pwd`" \
17435 "`cd ${TK_BIN_DIR}/../..; pwd`"; do
17436 if test "`basename "$i"`" = "${TK_LIB_FILE}.framework"; then
17437 TK_LIB_SPEC="-F`dirname "$i"` -framework ${TK_LIB_FILE}"
17438 break
17439 fi
17440 done
17441 fi
17442 if test -f "${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"; then
17443 TK_STUB_LIB_SPEC="-L${TK_BIN_DIR} ${TK_STUB_LIB_FLAG}"
17444 TK_STUB_LIB_PATH="${TK_BIN_DIR}/${TK_STUB_LIB_FILE}"
17445 fi
17446 ;;
17447 esac
17448 fi
17449
17450 # eval is required to do the TK_DBGX substitution
17451 eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}\""
17452 eval "TK_LIB_SPEC=\"${TK_LIB_SPEC}\""
17453 eval "TK_STUB_LIB_FLAG=\"${TK_STUB_LIB_FLAG}\""
17454 eval "TK_STUB_LIB_SPEC=\"${TK_STUB_LIB_SPEC}\""
17455
17456
17457
17458
17459
17460
17461
17462
17463
17464
17465
17466
17467
17468
17469 # Check for in-tree Tk
17470 intree="no"
17471 if test "${TK_SRC_DIR}" = "${topdir}/tk"; then
17472 intree="yes"
17473 fi
17474
17475 # Find Tk private headers
17476 if test x"${intree}" = xno; then
17477
17478 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Tk private headers" >&5
17479 $as_echo_n "checking for Tk private headers... " >&6; }
17480 private_dir=""
17481 dir=`echo ${TK_INCLUDE_SPEC}/tk-private/generic | sed -e s/-I//`
17482 if test -f ${dir}/tkInt.h; then
17483 private_dir=${dir}
17484 fi
17485
17486 if test x"${private_dir}" = x; then
17487 as_fn_error $? "could not find Tk private headers" "$LINENO" 5
17488 else
17489 TK_PRIVATE_INCLUDE="-I${private_dir}"
17490 { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${private_dir}" >&5
17491 $as_echo "${private_dir}" >&6; }
17492 fi
17493
17494 TK_INCLUDE="${TK_INCLUDE_SPEC} ${TK_PRIVATE_INCLUDE}"
17495 TK_LIBRARY=${TK_LIB_SPEC}
17496 TK_DEPS=""
17497 else
17498 TK_INCLUDE="-I${TK_SRC_DIR}/generic"
17499 TK_LIBRARY="${TK_BUILD_LIB_SPEC}"
17500 TK_DEPS="../tk/${configdir}/${TK_LIB_FILE}"
17501 fi
17502
17503
17504
17505
17506
17507 ENABLE_CFLAGS="${ENABLE_CFLAGS} \$(SUBDIR_GDBTK_CFLAGS)"
17508
17509 # Include some libraries that Tcl and Tk want.
17510 TCL_LIBS='$(LIBGUI) $(TK) $(TCL) $(X11_LDFLAGS) $(X11_LIBS)'
17511 # Yes, the ordering seems wrong here. But it isn't.
17512 # TK_LIBS is the list of libraries that need to be linked
17513 # after Tcl/Tk. Note that this isn't put into LIBS. If it
17514 # were in LIBS then any link tests after this point would
17515 # try to include things like `$(LIBGUI)', which wouldn't work.
17516 GDBTKLIBS="${TCL_LIBS} ${TK_LIBS}"
17517
17518 CONFIG_OBS="${CONFIG_OBS} \$(SUBDIR_GDBTK_OBS)"
17519 CONFIG_DEPS="${CONFIG_DEPS} \$(SUBDIR_GDBTK_DEPS)"
17520 CONFIG_SRCS="${CONFIG_SRCS} \$(SUBDIR_GDBTK_SRCS)"
17521 CONFIG_ALL="${CONFIG_ALL} all-gdbtk"
17522 CONFIG_CLEAN="${CONFIG_CLEAN} clean-gdbtk"
17523 CONFIG_INSTALL="${CONFIG_INSTALL} install-gdbtk"
17524 CONFIG_UNINSTALL="${CONFIG_UNINSTALL} uninstall-gdbtk"
17525
17526 if test x"$gdb_cv_os_cygwin" = xyes; then
17527 WIN32LIBS="${WIN32LIBS} -lshell32 -lgdi32 -lcomdlg32 -ladvapi32"
17528 WIN32LDAPP="-Wl,--subsystem,console"
17529 CONFIG_OBS="${CONFIG_OBS} gdbres.o"
17530 fi
17531
17532 subdirs="$subdirs gdbtk"
17533
17534 fi
17535 fi
17536
17537
17538
17539
17540
17541
17542
17543
17544 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
17545 $as_echo_n "checking for X... " >&6; }
17546
17547
17548 # Check whether --with-x was given.
17549 if test "${with_x+set}" = set; then :
17550 withval=$with_x;
17551 fi
17552
17553 # $have_x is `yes', `no', `disabled', or empty when we do not yet know.
17554 if test "x$with_x" = xno; then
17555 # The user explicitly disabled X.
17556 have_x=disabled
17557 else
17558 case $x_includes,$x_libraries in #(
17559 *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
17560 *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
17561 $as_echo_n "(cached) " >&6
17562 else
17563 # One or both of the vars are not set, and there is no cached value.
17564 ac_x_includes=no ac_x_libraries=no
17565 rm -f -r conftest.dir
17566 if mkdir conftest.dir; then
17567 cd conftest.dir
17568 cat >Imakefile <<'_ACEOF'
17569 incroot:
17570 @echo incroot='${INCROOT}'
17571 usrlibdir:
17572 @echo usrlibdir='${USRLIBDIR}'
17573 libdir:
17574 @echo libdir='${LIBDIR}'
17575 _ACEOF
17576 if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
17577 # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
17578 for ac_var in incroot usrlibdir libdir; do
17579 eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
17580 done
17581 # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
17582 for ac_extension in a so sl dylib la dll; do
17583 if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
17584 test -f "$ac_im_libdir/libX11.$ac_extension"; then
17585 ac_im_usrlibdir=$ac_im_libdir; break
17586 fi
17587 done
17588 # Screen out bogus values from the imake configuration. They are
17589 # bogus both because they are the default anyway, and because
17590 # using them would break gcc on systems where it needs fixed includes.
17591 case $ac_im_incroot in
17592 /usr/include) ac_x_includes= ;;
17593 *) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
17594 esac
17595 case $ac_im_usrlibdir in
17596 /usr/lib | /usr/lib64 | /lib | /lib64) ;;
17597 *) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
17598 esac
17599 fi
17600 cd ..
17601 rm -f -r conftest.dir
17602 fi
17603
17604 # Standard set of common directories for X headers.
17605 # Check X11 before X11Rn because it is often a symlink to the current release.
17606 ac_x_header_dirs='
17607 /usr/X11/include
17608 /usr/X11R7/include
17609 /usr/X11R6/include
17610 /usr/X11R5/include
17611 /usr/X11R4/include
17612
17613 /usr/include/X11
17614 /usr/include/X11R7
17615 /usr/include/X11R6
17616 /usr/include/X11R5
17617 /usr/include/X11R4
17618
17619 /usr/local/X11/include
17620 /usr/local/X11R7/include
17621 /usr/local/X11R6/include
17622 /usr/local/X11R5/include
17623 /usr/local/X11R4/include
17624
17625 /usr/local/include/X11
17626 /usr/local/include/X11R7
17627 /usr/local/include/X11R6
17628 /usr/local/include/X11R5
17629 /usr/local/include/X11R4
17630
17631 /usr/X386/include
17632 /usr/x386/include
17633 /usr/XFree86/include/X11
17634
17635 /usr/include
17636 /usr/local/include
17637 /usr/unsupported/include
17638 /usr/athena/include
17639 /usr/local/x11r5/include
17640 /usr/lpp/Xamples/include
17641
17642 /usr/openwin/include
17643 /usr/openwin/share/include'
17644
17645 if test "$ac_x_includes" = no; then
17646 # Guess where to find include files, by looking for Xlib.h.
17647 # First, try using that file with no special directory specified.
17648 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17649 /* end confdefs.h. */
17650 #include <X11/Xlib.h>
17651 _ACEOF
17652 if ac_fn_c_try_cpp "$LINENO"; then :
17653 # We can compile using X headers with no special include directory.
17654 ac_x_includes=
17655 else
17656 for ac_dir in $ac_x_header_dirs; do
17657 if test -r "$ac_dir/X11/Xlib.h"; then
17658 ac_x_includes=$ac_dir
17659 break
17660 fi
17661 done
17662 fi
17663 rm -f conftest.err conftest.i conftest.$ac_ext
17664 fi # $ac_x_includes = no
17665
17666 if test "$ac_x_libraries" = no; then
17667 # Check for the libraries.
17668 # See if we find them without any special options.
17669 # Don't add to $LIBS permanently.
17670 ac_save_LIBS=$LIBS
17671 LIBS="-lX11 $LIBS"
17672 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
17673 /* end confdefs.h. */
17674 #include <X11/Xlib.h>
17675 int
17676 main ()
17677 {
17678 XrmInitialize ()
17679 ;
17680 return 0;
17681 }
17682 _ACEOF
17683 if ac_fn_c_try_link "$LINENO"; then :
17684 LIBS=$ac_save_LIBS
17685 # We can link X programs with no special library path.
17686 ac_x_libraries=
17687 else
17688 LIBS=$ac_save_LIBS
17689 for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
17690 do
17691 # Don't even attempt the hair of trying to link an X program!
17692 for ac_extension in a so sl dylib la dll; do
17693 if test -r "$ac_dir/libX11.$ac_extension"; then
17694 ac_x_libraries=$ac_dir
17695 break 2
17696 fi
17697 done
17698 done
17699 fi
17700 rm -f core conftest.err conftest.$ac_objext \
17701 conftest$ac_exeext conftest.$ac_ext
17702 fi # $ac_x_libraries = no
17703
17704 case $ac_x_includes,$ac_x_libraries in #(
17705 no,* | *,no | *\'*)
17706 # Didn't find X, or a directory has "'" in its name.
17707 ac_cv_have_x="have_x=no";; #(
17708 *)
17709 # Record where we found X for the cache.
17710 ac_cv_have_x="have_x=yes\
17711 ac_x_includes='$ac_x_includes'\
17712 ac_x_libraries='$ac_x_libraries'"
17713 esac
17714 fi
17715 ;; #(
17716 *) have_x=yes;;
17717 esac
17718 eval "$ac_cv_have_x"
17719 fi # $with_x != no
17720
17721 if test "$have_x" != yes; then
17722 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
17723 $as_echo "$have_x" >&6; }
17724 no_x=yes
17725 else
17726 # If each of the values was on the command line, it overrides each guess.
17727 test "x$x_includes" = xNONE && x_includes=$ac_x_includes
17728 test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
17729 # Update the cache value to reflect the command line values.
17730 ac_cv_have_x="have_x=yes\
17731 ac_x_includes='$x_includes'\
17732 ac_x_libraries='$x_libraries'"
17733 { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
17734 $as_echo "libraries $x_libraries, headers $x_includes" >&6; }
17735 fi
17736
17737
17738 # Unlike the sim directory, whether a simulator is linked is controlled by
17739 # presence of a gdb_sim definition in the target configure.tgt entry.
17740 # This code just checks for a few cases where we'd like to ignore those
17741 # definitions, even when they're present in the '.mt' file. These cases
17742 # are when --disable-sim is specified, or if the simulator directory is
17743 # not part of the source tree.
17744 #
17745 # Check whether --enable-sim was given.
17746 if test "${enable_sim+set}" = set; then :
17747 enableval=$enable_sim; echo "enable_sim = $enable_sim";
17748 echo "enableval = ${enableval}";
17749 case "${enableval}" in
17750 yes) ignore_sim=false ;;
17751 no) ignore_sim=true ;;
17752 *) ignore_sim=false ;;
17753 esac
17754 else
17755 ignore_sim=false
17756 fi
17757
17758
17759 if test ! -d "${srcdir}/../sim"; then
17760 ignore_sim=true
17761 fi
17762
17763 SIM=
17764 SIM_OBS=
17765 if test "${ignore_sim}" = "false"; then
17766 if test x"${gdb_sim}" != x ; then
17767 SIM="${gdb_sim}"
17768 SIM_OBS="remote-sim.o"
17769
17770 $as_echo "#define WITH_SIM 1" >>confdefs.h
17771
17772
17773 # Some tdep code should only be compiled in when the ppc sim is
17774 # built. PR sim/13418.
17775 case $target in
17776 powerpc*-*-*)
17777
17778 $as_echo "#define WITH_PPC_SIM 1" >>confdefs.h
17779
17780 ;;
17781 esac
17782 fi
17783 fi
17784
17785
17786
17787
17788
17789
17790
17791
17792
17793
17794
17795
17796
17797
17798 # List of host floatformats.
17799
17800 cat >>confdefs.h <<_ACEOF
17801 #define GDB_HOST_FLOAT_FORMAT $gdb_host_float_format
17802 _ACEOF
17803
17804
17805 cat >>confdefs.h <<_ACEOF
17806 #define GDB_HOST_DOUBLE_FORMAT $gdb_host_double_format
17807 _ACEOF
17808
17809
17810 cat >>confdefs.h <<_ACEOF
17811 #define GDB_HOST_LONG_DOUBLE_FORMAT $gdb_host_long_double_format
17812 _ACEOF
17813
17814
17815 # target_subdir is used by the testsuite to find the target libraries.
17816 target_subdir=
17817 if test "${host}" != "${target}"; then
17818 target_subdir="${target_alias}/"
17819 fi
17820
17821
17822 # Import nat definitions.
17823 nat_makefile_frag=/dev/null
17824 if test "${gdb_native}" = "yes"; then
17825 . ${srcdir}/configure.nat
17826 nativefile=$NAT_FILE
17827 fi
17828
17829
17830
17831
17832
17833
17834
17835
17836
17837
17838
17839 if test x"${gdb_osabi}" != x ; then
17840
17841 cat >>confdefs.h <<_ACEOF
17842 #define GDB_OSABI_DEFAULT $gdb_osabi
17843 _ACEOF
17844
17845 fi
17846
17847 # Check for babeltrace and babeltrace-ctf
17848
17849 # Check whether --with-babeltrace was given.
17850 if test "${with_babeltrace+set}" = set; then :
17851 withval=$with_babeltrace;
17852 else
17853 with_babeltrace=auto
17854 fi
17855
17856 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use babeltrace" >&5
17857 $as_echo_n "checking whether to use babeltrace... " >&6; }
17858 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_babeltrace" >&5
17859 $as_echo "$with_babeltrace" >&6; }
17860
17861 if test "x$with_babeltrace" = "xno"; then
17862 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&5
17863 $as_echo "$as_me: WARNING: babletrace support disabled; GDB is unable to read CTF data." >&2;}
17864 else
17865 # Append -Werror to CFLAGS so that configure can catch the warning
17866 # "assignment from incompatible pointer type", which is related to
17867 # the babeltrace change from 1.0.3 to 1.1.0. Babeltrace 1.1.0 works
17868 # in GDB, while babeltrace 1.0.3 is broken.
17869 # AC_LIB_HAVE_LINKFLAGS may modify CPPFLAGS in it, so it should be
17870 # safe to save and restore CFLAGS here.
17871 saved_CFLAGS=$CFLAGS
17872 CFLAGS="$CFLAGS -Werror"
17873
17874
17875
17876
17877
17878
17879
17880
17881 use_additional=yes
17882
17883 acl_save_prefix="$prefix"
17884 prefix="$acl_final_prefix"
17885 acl_save_exec_prefix="$exec_prefix"
17886 exec_prefix="$acl_final_exec_prefix"
17887
17888 eval additional_includedir=\"$includedir\"
17889 eval additional_libdir=\"$libdir\"
17890
17891 exec_prefix="$acl_save_exec_prefix"
17892 prefix="$acl_save_prefix"
17893
17894
17895 # Check whether --with-libbabeltrace-prefix was given.
17896 if test "${with_libbabeltrace_prefix+set}" = set; then :
17897 withval=$with_libbabeltrace_prefix;
17898 if test "X$withval" = "Xno"; then
17899 use_additional=no
17900 else
17901 if test "X$withval" = "X"; then
17902
17903 acl_save_prefix="$prefix"
17904 prefix="$acl_final_prefix"
17905 acl_save_exec_prefix="$exec_prefix"
17906 exec_prefix="$acl_final_exec_prefix"
17907
17908 eval additional_includedir=\"$includedir\"
17909 eval additional_libdir=\"$libdir\"
17910
17911 exec_prefix="$acl_save_exec_prefix"
17912 prefix="$acl_save_prefix"
17913
17914 else
17915 additional_includedir="$withval/include"
17916 additional_libdir="$withval/lib"
17917 fi
17918 fi
17919
17920 fi
17921
17922 LIBBABELTRACE=
17923 LTLIBBABELTRACE=
17924 INCBABELTRACE=
17925 rpathdirs=
17926 ltrpathdirs=
17927 names_already_handled=
17928 names_next_round='babeltrace babeltrace-ctf'
17929 while test -n "$names_next_round"; do
17930 names_this_round="$names_next_round"
17931 names_next_round=
17932 for name in $names_this_round; do
17933 already_handled=
17934 for n in $names_already_handled; do
17935 if test "$n" = "$name"; then
17936 already_handled=yes
17937 break
17938 fi
17939 done
17940 if test -z "$already_handled"; then
17941 names_already_handled="$names_already_handled $name"
17942 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
17943 eval value=\"\$HAVE_LIB$uppername\"
17944 if test -n "$value"; then
17945 if test "$value" = yes; then
17946 eval value=\"\$LIB$uppername\"
17947 test -z "$value" || LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$value"
17948 eval value=\"\$LTLIB$uppername\"
17949 test -z "$value" || LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$value"
17950 else
17951 :
17952 fi
17953 else
17954 found_dir=
17955 found_la=
17956 found_so=
17957 found_a=
17958 if test $use_additional = yes; then
17959 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
17960 found_dir="$additional_libdir"
17961 found_so="$additional_libdir/lib$name.$shlibext"
17962 if test -f "$additional_libdir/lib$name.la"; then
17963 found_la="$additional_libdir/lib$name.la"
17964 fi
17965 else
17966 if test -f "$additional_libdir/lib$name.$libext"; then
17967 found_dir="$additional_libdir"
17968 found_a="$additional_libdir/lib$name.$libext"
17969 if test -f "$additional_libdir/lib$name.la"; then
17970 found_la="$additional_libdir/lib$name.la"
17971 fi
17972 fi
17973 fi
17974 fi
17975 if test "X$found_dir" = "X"; then
17976 for x in $LDFLAGS $LTLIBBABELTRACE; do
17977
17978 acl_save_prefix="$prefix"
17979 prefix="$acl_final_prefix"
17980 acl_save_exec_prefix="$exec_prefix"
17981 exec_prefix="$acl_final_exec_prefix"
17982 eval x=\"$x\"
17983 exec_prefix="$acl_save_exec_prefix"
17984 prefix="$acl_save_prefix"
17985
17986 case "$x" in
17987 -L*)
17988 dir=`echo "X$x" | sed -e 's/^X-L//'`
17989 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
17990 found_dir="$dir"
17991 found_so="$dir/lib$name.$shlibext"
17992 if test -f "$dir/lib$name.la"; then
17993 found_la="$dir/lib$name.la"
17994 fi
17995 else
17996 if test -f "$dir/lib$name.$libext"; then
17997 found_dir="$dir"
17998 found_a="$dir/lib$name.$libext"
17999 if test -f "$dir/lib$name.la"; then
18000 found_la="$dir/lib$name.la"
18001 fi
18002 fi
18003 fi
18004 ;;
18005 esac
18006 if test "X$found_dir" != "X"; then
18007 break
18008 fi
18009 done
18010 fi
18011 if test "X$found_dir" != "X"; then
18012 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$found_dir -l$name"
18013 if test "X$found_so" != "X"; then
18014 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18015 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18016 else
18017 haveit=
18018 for x in $ltrpathdirs; do
18019 if test "X$x" = "X$found_dir"; then
18020 haveit=yes
18021 break
18022 fi
18023 done
18024 if test -z "$haveit"; then
18025 ltrpathdirs="$ltrpathdirs $found_dir"
18026 fi
18027 if test "$hardcode_direct" = yes; then
18028 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18029 else
18030 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18031 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18032 haveit=
18033 for x in $rpathdirs; do
18034 if test "X$x" = "X$found_dir"; then
18035 haveit=yes
18036 break
18037 fi
18038 done
18039 if test -z "$haveit"; then
18040 rpathdirs="$rpathdirs $found_dir"
18041 fi
18042 else
18043 haveit=
18044 for x in $LDFLAGS $LIBBABELTRACE; do
18045
18046 acl_save_prefix="$prefix"
18047 prefix="$acl_final_prefix"
18048 acl_save_exec_prefix="$exec_prefix"
18049 exec_prefix="$acl_final_exec_prefix"
18050 eval x=\"$x\"
18051 exec_prefix="$acl_save_exec_prefix"
18052 prefix="$acl_save_prefix"
18053
18054 if test "X$x" = "X-L$found_dir"; then
18055 haveit=yes
18056 break
18057 fi
18058 done
18059 if test -z "$haveit"; then
18060 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir"
18061 fi
18062 if test "$hardcode_minus_L" != no; then
18063 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_so"
18064 else
18065 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18066 fi
18067 fi
18068 fi
18069 fi
18070 else
18071 if test "X$found_a" != "X"; then
18072 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$found_a"
18073 else
18074 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$found_dir -l$name"
18075 fi
18076 fi
18077 additional_includedir=
18078 case "$found_dir" in
18079 */lib | */lib/)
18080 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18081 additional_includedir="$basedir/include"
18082 ;;
18083 esac
18084 if test "X$additional_includedir" != "X"; then
18085 if test "X$additional_includedir" != "X/usr/include"; then
18086 haveit=
18087 if test "X$additional_includedir" = "X/usr/local/include"; then
18088 if test -n "$GCC"; then
18089 case $host_os in
18090 linux*) haveit=yes;;
18091 esac
18092 fi
18093 fi
18094 if test -z "$haveit"; then
18095 for x in $CPPFLAGS $INCBABELTRACE; do
18096
18097 acl_save_prefix="$prefix"
18098 prefix="$acl_final_prefix"
18099 acl_save_exec_prefix="$exec_prefix"
18100 exec_prefix="$acl_final_exec_prefix"
18101 eval x=\"$x\"
18102 exec_prefix="$acl_save_exec_prefix"
18103 prefix="$acl_save_prefix"
18104
18105 if test "X$x" = "X-I$additional_includedir"; then
18106 haveit=yes
18107 break
18108 fi
18109 done
18110 if test -z "$haveit"; then
18111 if test -d "$additional_includedir"; then
18112 INCBABELTRACE="${INCBABELTRACE}${INCBABELTRACE:+ }-I$additional_includedir"
18113 fi
18114 fi
18115 fi
18116 fi
18117 fi
18118 if test -n "$found_la"; then
18119 save_libdir="$libdir"
18120 case "$found_la" in
18121 */* | *\\*) . "$found_la" ;;
18122 *) . "./$found_la" ;;
18123 esac
18124 libdir="$save_libdir"
18125 for dep in $dependency_libs; do
18126 case "$dep" in
18127 -L*)
18128 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18129 if test "X$additional_libdir" != "X/usr/lib"; then
18130 haveit=
18131 if test "X$additional_libdir" = "X/usr/local/lib"; then
18132 if test -n "$GCC"; then
18133 case $host_os in
18134 linux*) haveit=yes;;
18135 esac
18136 fi
18137 fi
18138 if test -z "$haveit"; then
18139 haveit=
18140 for x in $LDFLAGS $LIBBABELTRACE; do
18141
18142 acl_save_prefix="$prefix"
18143 prefix="$acl_final_prefix"
18144 acl_save_exec_prefix="$exec_prefix"
18145 exec_prefix="$acl_final_exec_prefix"
18146 eval x=\"$x\"
18147 exec_prefix="$acl_save_exec_prefix"
18148 prefix="$acl_save_prefix"
18149
18150 if test "X$x" = "X-L$additional_libdir"; then
18151 haveit=yes
18152 break
18153 fi
18154 done
18155 if test -z "$haveit"; then
18156 if test -d "$additional_libdir"; then
18157 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-L$additional_libdir"
18158 fi
18159 fi
18160 haveit=
18161 for x in $LDFLAGS $LTLIBBABELTRACE; do
18162
18163 acl_save_prefix="$prefix"
18164 prefix="$acl_final_prefix"
18165 acl_save_exec_prefix="$exec_prefix"
18166 exec_prefix="$acl_final_exec_prefix"
18167 eval x=\"$x\"
18168 exec_prefix="$acl_save_exec_prefix"
18169 prefix="$acl_save_prefix"
18170
18171 if test "X$x" = "X-L$additional_libdir"; then
18172 haveit=yes
18173 break
18174 fi
18175 done
18176 if test -z "$haveit"; then
18177 if test -d "$additional_libdir"; then
18178 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-L$additional_libdir"
18179 fi
18180 fi
18181 fi
18182 fi
18183 ;;
18184 -R*)
18185 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18186 if test "$enable_rpath" != no; then
18187 haveit=
18188 for x in $rpathdirs; do
18189 if test "X$x" = "X$dir"; then
18190 haveit=yes
18191 break
18192 fi
18193 done
18194 if test -z "$haveit"; then
18195 rpathdirs="$rpathdirs $dir"
18196 fi
18197 haveit=
18198 for x in $ltrpathdirs; do
18199 if test "X$x" = "X$dir"; then
18200 haveit=yes
18201 break
18202 fi
18203 done
18204 if test -z "$haveit"; then
18205 ltrpathdirs="$ltrpathdirs $dir"
18206 fi
18207 fi
18208 ;;
18209 -l*)
18210 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18211 ;;
18212 *.la)
18213 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18214 ;;
18215 *)
18216 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$dep"
18217 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }$dep"
18218 ;;
18219 esac
18220 done
18221 fi
18222 else
18223 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }-l$name"
18224 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-l$name"
18225 fi
18226 fi
18227 fi
18228 done
18229 done
18230 if test "X$rpathdirs" != "X"; then
18231 if test -n "$hardcode_libdir_separator"; then
18232 alldirs=
18233 for found_dir in $rpathdirs; do
18234 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18235 done
18236 acl_save_libdir="$libdir"
18237 libdir="$alldirs"
18238 eval flag=\"$hardcode_libdir_flag_spec\"
18239 libdir="$acl_save_libdir"
18240 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18241 else
18242 for found_dir in $rpathdirs; do
18243 acl_save_libdir="$libdir"
18244 libdir="$found_dir"
18245 eval flag=\"$hardcode_libdir_flag_spec\"
18246 libdir="$acl_save_libdir"
18247 LIBBABELTRACE="${LIBBABELTRACE}${LIBBABELTRACE:+ }$flag"
18248 done
18249 fi
18250 fi
18251 if test "X$ltrpathdirs" != "X"; then
18252 for found_dir in $ltrpathdirs; do
18253 LTLIBBABELTRACE="${LTLIBBABELTRACE}${LTLIBBABELTRACE:+ }-R$found_dir"
18254 done
18255 fi
18256
18257
18258 ac_save_CPPFLAGS="$CPPFLAGS"
18259
18260 for element in $INCBABELTRACE; do
18261 haveit=
18262 for x in $CPPFLAGS; 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$element"; then
18273 haveit=yes
18274 break
18275 fi
18276 done
18277 if test -z "$haveit"; then
18278 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18279 fi
18280 done
18281
18282
18283 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libbabeltrace" >&5
18284 $as_echo_n "checking for libbabeltrace... " >&6; }
18285 if ${ac_cv_libbabeltrace+:} false; then :
18286 $as_echo_n "(cached) " >&6
18287 else
18288
18289 ac_save_LIBS="$LIBS"
18290 LIBS="$LIBS $LIBBABELTRACE"
18291 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18292 /* end confdefs.h. */
18293 #include <babeltrace/babeltrace.h>
18294 #include <babeltrace/ctf/events.h>
18295 #include <babeltrace/ctf/iterator.h>
18296 int
18297 main ()
18298 {
18299 struct bt_iter_pos *pos = bt_iter_get_pos (bt_ctf_get_iter (NULL));
18300 struct bt_ctf_event *event = NULL;
18301 const struct bt_definition *scope;
18302
18303 pos->type = BT_SEEK_BEGIN;
18304 bt_iter_set_pos (bt_ctf_get_iter (NULL), pos);
18305 scope = bt_ctf_get_top_level_scope (event,
18306 BT_STREAM_EVENT_HEADER);
18307 bt_ctf_get_uint64 (bt_ctf_get_field (event, scope, "id"));
18308
18309 ;
18310 return 0;
18311 }
18312 _ACEOF
18313 if ac_fn_c_try_link "$LINENO"; then :
18314 ac_cv_libbabeltrace=yes
18315 else
18316 ac_cv_libbabeltrace=no
18317 fi
18318 rm -f core conftest.err conftest.$ac_objext \
18319 conftest$ac_exeext conftest.$ac_ext
18320 LIBS="$ac_save_LIBS"
18321
18322 fi
18323 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libbabeltrace" >&5
18324 $as_echo "$ac_cv_libbabeltrace" >&6; }
18325 if test "$ac_cv_libbabeltrace" = yes; then
18326 HAVE_LIBBABELTRACE=yes
18327
18328 $as_echo "#define HAVE_LIBBABELTRACE 1" >>confdefs.h
18329
18330 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libbabeltrace" >&5
18331 $as_echo_n "checking how to link with libbabeltrace... " >&6; }
18332 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBBABELTRACE" >&5
18333 $as_echo "$LIBBABELTRACE" >&6; }
18334 else
18335 HAVE_LIBBABELTRACE=no
18336 CPPFLAGS="$ac_save_CPPFLAGS"
18337 LIBBABELTRACE=
18338 LTLIBBABELTRACE=
18339 fi
18340
18341
18342
18343
18344
18345
18346 CFLAGS=$saved_CFLAGS
18347
18348 if test "$HAVE_LIBBABELTRACE" != yes; then
18349 if test "$with_babeltrace" = yes; then
18350 as_fn_error $? "babeltrace is missing or unusable" "$LINENO" 5
18351 else
18352 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&5
18353 $as_echo "$as_me: WARNING: babeltrace is missing or unusable; GDB is unable to read CTF data." >&2;}
18354 fi
18355 fi
18356 fi
18357
18358 # Check for xxhash
18359
18360 # Check whether --with-xxhash was given.
18361 if test "${with_xxhash+set}" = set; then :
18362 withval=$with_xxhash;
18363 else
18364 with_xxhash=auto
18365 fi
18366
18367
18368 if test "x$with_xxhash" != "xno"; then
18369
18370
18371
18372
18373
18374
18375
18376
18377 use_additional=yes
18378
18379 acl_save_prefix="$prefix"
18380 prefix="$acl_final_prefix"
18381 acl_save_exec_prefix="$exec_prefix"
18382 exec_prefix="$acl_final_exec_prefix"
18383
18384 eval additional_includedir=\"$includedir\"
18385 eval additional_libdir=\"$libdir\"
18386
18387 exec_prefix="$acl_save_exec_prefix"
18388 prefix="$acl_save_prefix"
18389
18390
18391 # Check whether --with-libxxhash-prefix was given.
18392 if test "${with_libxxhash_prefix+set}" = set; then :
18393 withval=$with_libxxhash_prefix;
18394 if test "X$withval" = "Xno"; then
18395 use_additional=no
18396 else
18397 if test "X$withval" = "X"; then
18398
18399 acl_save_prefix="$prefix"
18400 prefix="$acl_final_prefix"
18401 acl_save_exec_prefix="$exec_prefix"
18402 exec_prefix="$acl_final_exec_prefix"
18403
18404 eval additional_includedir=\"$includedir\"
18405 eval additional_libdir=\"$libdir\"
18406
18407 exec_prefix="$acl_save_exec_prefix"
18408 prefix="$acl_save_prefix"
18409
18410 else
18411 additional_includedir="$withval/include"
18412 additional_libdir="$withval/lib"
18413 fi
18414 fi
18415
18416 fi
18417
18418 LIBXXHASH=
18419 LTLIBXXHASH=
18420 INCXXHASH=
18421 rpathdirs=
18422 ltrpathdirs=
18423 names_already_handled=
18424 names_next_round='xxhash '
18425 while test -n "$names_next_round"; do
18426 names_this_round="$names_next_round"
18427 names_next_round=
18428 for name in $names_this_round; do
18429 already_handled=
18430 for n in $names_already_handled; do
18431 if test "$n" = "$name"; then
18432 already_handled=yes
18433 break
18434 fi
18435 done
18436 if test -z "$already_handled"; then
18437 names_already_handled="$names_already_handled $name"
18438 uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
18439 eval value=\"\$HAVE_LIB$uppername\"
18440 if test -n "$value"; then
18441 if test "$value" = yes; then
18442 eval value=\"\$LIB$uppername\"
18443 test -z "$value" || LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$value"
18444 eval value=\"\$LTLIB$uppername\"
18445 test -z "$value" || LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$value"
18446 else
18447 :
18448 fi
18449 else
18450 found_dir=
18451 found_la=
18452 found_so=
18453 found_a=
18454 if test $use_additional = yes; then
18455 if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
18456 found_dir="$additional_libdir"
18457 found_so="$additional_libdir/lib$name.$shlibext"
18458 if test -f "$additional_libdir/lib$name.la"; then
18459 found_la="$additional_libdir/lib$name.la"
18460 fi
18461 else
18462 if test -f "$additional_libdir/lib$name.$libext"; then
18463 found_dir="$additional_libdir"
18464 found_a="$additional_libdir/lib$name.$libext"
18465 if test -f "$additional_libdir/lib$name.la"; then
18466 found_la="$additional_libdir/lib$name.la"
18467 fi
18468 fi
18469 fi
18470 fi
18471 if test "X$found_dir" = "X"; then
18472 for x in $LDFLAGS $LTLIBXXHASH; do
18473
18474 acl_save_prefix="$prefix"
18475 prefix="$acl_final_prefix"
18476 acl_save_exec_prefix="$exec_prefix"
18477 exec_prefix="$acl_final_exec_prefix"
18478 eval x=\"$x\"
18479 exec_prefix="$acl_save_exec_prefix"
18480 prefix="$acl_save_prefix"
18481
18482 case "$x" in
18483 -L*)
18484 dir=`echo "X$x" | sed -e 's/^X-L//'`
18485 if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
18486 found_dir="$dir"
18487 found_so="$dir/lib$name.$shlibext"
18488 if test -f "$dir/lib$name.la"; then
18489 found_la="$dir/lib$name.la"
18490 fi
18491 else
18492 if test -f "$dir/lib$name.$libext"; then
18493 found_dir="$dir"
18494 found_a="$dir/lib$name.$libext"
18495 if test -f "$dir/lib$name.la"; then
18496 found_la="$dir/lib$name.la"
18497 fi
18498 fi
18499 fi
18500 ;;
18501 esac
18502 if test "X$found_dir" != "X"; then
18503 break
18504 fi
18505 done
18506 fi
18507 if test "X$found_dir" != "X"; then
18508 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$found_dir -l$name"
18509 if test "X$found_so" != "X"; then
18510 if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
18511 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18512 else
18513 haveit=
18514 for x in $ltrpathdirs; do
18515 if test "X$x" = "X$found_dir"; then
18516 haveit=yes
18517 break
18518 fi
18519 done
18520 if test -z "$haveit"; then
18521 ltrpathdirs="$ltrpathdirs $found_dir"
18522 fi
18523 if test "$hardcode_direct" = yes; then
18524 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18525 else
18526 if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
18527 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18528 haveit=
18529 for x in $rpathdirs; do
18530 if test "X$x" = "X$found_dir"; then
18531 haveit=yes
18532 break
18533 fi
18534 done
18535 if test -z "$haveit"; then
18536 rpathdirs="$rpathdirs $found_dir"
18537 fi
18538 else
18539 haveit=
18540 for x in $LDFLAGS $LIBXXHASH; do
18541
18542 acl_save_prefix="$prefix"
18543 prefix="$acl_final_prefix"
18544 acl_save_exec_prefix="$exec_prefix"
18545 exec_prefix="$acl_final_exec_prefix"
18546 eval x=\"$x\"
18547 exec_prefix="$acl_save_exec_prefix"
18548 prefix="$acl_save_prefix"
18549
18550 if test "X$x" = "X-L$found_dir"; then
18551 haveit=yes
18552 break
18553 fi
18554 done
18555 if test -z "$haveit"; then
18556 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir"
18557 fi
18558 if test "$hardcode_minus_L" != no; then
18559 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_so"
18560 else
18561 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18562 fi
18563 fi
18564 fi
18565 fi
18566 else
18567 if test "X$found_a" != "X"; then
18568 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$found_a"
18569 else
18570 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$found_dir -l$name"
18571 fi
18572 fi
18573 additional_includedir=
18574 case "$found_dir" in
18575 */lib | */lib/)
18576 basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
18577 additional_includedir="$basedir/include"
18578 ;;
18579 esac
18580 if test "X$additional_includedir" != "X"; then
18581 if test "X$additional_includedir" != "X/usr/include"; then
18582 haveit=
18583 if test "X$additional_includedir" = "X/usr/local/include"; then
18584 if test -n "$GCC"; then
18585 case $host_os in
18586 linux*) haveit=yes;;
18587 esac
18588 fi
18589 fi
18590 if test -z "$haveit"; then
18591 for x in $CPPFLAGS $INCXXHASH; do
18592
18593 acl_save_prefix="$prefix"
18594 prefix="$acl_final_prefix"
18595 acl_save_exec_prefix="$exec_prefix"
18596 exec_prefix="$acl_final_exec_prefix"
18597 eval x=\"$x\"
18598 exec_prefix="$acl_save_exec_prefix"
18599 prefix="$acl_save_prefix"
18600
18601 if test "X$x" = "X-I$additional_includedir"; then
18602 haveit=yes
18603 break
18604 fi
18605 done
18606 if test -z "$haveit"; then
18607 if test -d "$additional_includedir"; then
18608 INCXXHASH="${INCXXHASH}${INCXXHASH:+ }-I$additional_includedir"
18609 fi
18610 fi
18611 fi
18612 fi
18613 fi
18614 if test -n "$found_la"; then
18615 save_libdir="$libdir"
18616 case "$found_la" in
18617 */* | *\\*) . "$found_la" ;;
18618 *) . "./$found_la" ;;
18619 esac
18620 libdir="$save_libdir"
18621 for dep in $dependency_libs; do
18622 case "$dep" in
18623 -L*)
18624 additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
18625 if test "X$additional_libdir" != "X/usr/lib"; then
18626 haveit=
18627 if test "X$additional_libdir" = "X/usr/local/lib"; then
18628 if test -n "$GCC"; then
18629 case $host_os in
18630 linux*) haveit=yes;;
18631 esac
18632 fi
18633 fi
18634 if test -z "$haveit"; then
18635 haveit=
18636 for x in $LDFLAGS $LIBXXHASH; do
18637
18638 acl_save_prefix="$prefix"
18639 prefix="$acl_final_prefix"
18640 acl_save_exec_prefix="$exec_prefix"
18641 exec_prefix="$acl_final_exec_prefix"
18642 eval x=\"$x\"
18643 exec_prefix="$acl_save_exec_prefix"
18644 prefix="$acl_save_prefix"
18645
18646 if test "X$x" = "X-L$additional_libdir"; then
18647 haveit=yes
18648 break
18649 fi
18650 done
18651 if test -z "$haveit"; then
18652 if test -d "$additional_libdir"; then
18653 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-L$additional_libdir"
18654 fi
18655 fi
18656 haveit=
18657 for x in $LDFLAGS $LTLIBXXHASH; do
18658
18659 acl_save_prefix="$prefix"
18660 prefix="$acl_final_prefix"
18661 acl_save_exec_prefix="$exec_prefix"
18662 exec_prefix="$acl_final_exec_prefix"
18663 eval x=\"$x\"
18664 exec_prefix="$acl_save_exec_prefix"
18665 prefix="$acl_save_prefix"
18666
18667 if test "X$x" = "X-L$additional_libdir"; then
18668 haveit=yes
18669 break
18670 fi
18671 done
18672 if test -z "$haveit"; then
18673 if test -d "$additional_libdir"; then
18674 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-L$additional_libdir"
18675 fi
18676 fi
18677 fi
18678 fi
18679 ;;
18680 -R*)
18681 dir=`echo "X$dep" | sed -e 's/^X-R//'`
18682 if test "$enable_rpath" != no; then
18683 haveit=
18684 for x in $rpathdirs; do
18685 if test "X$x" = "X$dir"; then
18686 haveit=yes
18687 break
18688 fi
18689 done
18690 if test -z "$haveit"; then
18691 rpathdirs="$rpathdirs $dir"
18692 fi
18693 haveit=
18694 for x in $ltrpathdirs; do
18695 if test "X$x" = "X$dir"; then
18696 haveit=yes
18697 break
18698 fi
18699 done
18700 if test -z "$haveit"; then
18701 ltrpathdirs="$ltrpathdirs $dir"
18702 fi
18703 fi
18704 ;;
18705 -l*)
18706 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
18707 ;;
18708 *.la)
18709 names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
18710 ;;
18711 *)
18712 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$dep"
18713 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }$dep"
18714 ;;
18715 esac
18716 done
18717 fi
18718 else
18719 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }-l$name"
18720 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-l$name"
18721 fi
18722 fi
18723 fi
18724 done
18725 done
18726 if test "X$rpathdirs" != "X"; then
18727 if test -n "$hardcode_libdir_separator"; then
18728 alldirs=
18729 for found_dir in $rpathdirs; do
18730 alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
18731 done
18732 acl_save_libdir="$libdir"
18733 libdir="$alldirs"
18734 eval flag=\"$hardcode_libdir_flag_spec\"
18735 libdir="$acl_save_libdir"
18736 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18737 else
18738 for found_dir in $rpathdirs; do
18739 acl_save_libdir="$libdir"
18740 libdir="$found_dir"
18741 eval flag=\"$hardcode_libdir_flag_spec\"
18742 libdir="$acl_save_libdir"
18743 LIBXXHASH="${LIBXXHASH}${LIBXXHASH:+ }$flag"
18744 done
18745 fi
18746 fi
18747 if test "X$ltrpathdirs" != "X"; then
18748 for found_dir in $ltrpathdirs; do
18749 LTLIBXXHASH="${LTLIBXXHASH}${LTLIBXXHASH:+ }-R$found_dir"
18750 done
18751 fi
18752
18753
18754 ac_save_CPPFLAGS="$CPPFLAGS"
18755
18756 for element in $INCXXHASH; do
18757 haveit=
18758 for x in $CPPFLAGS; do
18759
18760 acl_save_prefix="$prefix"
18761 prefix="$acl_final_prefix"
18762 acl_save_exec_prefix="$exec_prefix"
18763 exec_prefix="$acl_final_exec_prefix"
18764 eval x=\"$x\"
18765 exec_prefix="$acl_save_exec_prefix"
18766 prefix="$acl_save_prefix"
18767
18768 if test "X$x" = "X$element"; then
18769 haveit=yes
18770 break
18771 fi
18772 done
18773 if test -z "$haveit"; then
18774 CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }$element"
18775 fi
18776 done
18777
18778
18779 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libxxhash" >&5
18780 $as_echo_n "checking for libxxhash... " >&6; }
18781 if ${ac_cv_libxxhash+:} false; then :
18782 $as_echo_n "(cached) " >&6
18783 else
18784
18785 ac_save_LIBS="$LIBS"
18786 LIBS="$LIBS $LIBXXHASH"
18787 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
18788 /* end confdefs.h. */
18789 #include <xxhash.h>
18790 int
18791 main ()
18792 {
18793 XXH32("foo", 3, 0);
18794
18795 ;
18796 return 0;
18797 }
18798 _ACEOF
18799 if ac_fn_c_try_link "$LINENO"; then :
18800 ac_cv_libxxhash=yes
18801 else
18802 ac_cv_libxxhash=no
18803 fi
18804 rm -f core conftest.err conftest.$ac_objext \
18805 conftest$ac_exeext conftest.$ac_ext
18806 LIBS="$ac_save_LIBS"
18807
18808 fi
18809 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_libxxhash" >&5
18810 $as_echo "$ac_cv_libxxhash" >&6; }
18811 if test "$ac_cv_libxxhash" = yes; then
18812 HAVE_LIBXXHASH=yes
18813
18814 $as_echo "#define HAVE_LIBXXHASH 1" >>confdefs.h
18815
18816 { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libxxhash" >&5
18817 $as_echo_n "checking how to link with libxxhash... " >&6; }
18818 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBXXHASH" >&5
18819 $as_echo "$LIBXXHASH" >&6; }
18820 else
18821 HAVE_LIBXXHASH=no
18822 CPPFLAGS="$ac_save_CPPFLAGS"
18823 LIBXXHASH=
18824 LTLIBXXHASH=
18825 fi
18826
18827
18828
18829
18830
18831
18832 if test "$HAVE_LIBXXHASH" != yes; then
18833 if test "$with_xxhash" = yes; then
18834 as_fn_error $? "xxhash is missing or unusable" "$LINENO" 5
18835 fi
18836 fi
18837 if test "x$with_xxhash" = "xauto"; then
18838 with_xxhash="$HAVE_LIBXXHASH"
18839 fi
18840 fi
18841
18842 { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use xxhash" >&5
18843 $as_echo_n "checking whether to use xxhash... " >&6; }
18844 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_xxhash" >&5
18845 $as_echo "$with_xxhash" >&6; }
18846
18847 NM_H=
18848 rm -f nm.h
18849 if test "${nativefile}" != ""; then
18850 case "${nativefile}" in
18851 nm-*.h ) GDB_NM_FILE="config/${gdb_host_cpu}/${nativefile}" ;;
18852 * ) GDB_NM_FILE="${nativefile}"
18853 esac
18854 ac_config_links="$ac_config_links nm.h:$GDB_NM_FILE"
18855
18856
18857 cat >>confdefs.h <<_ACEOF
18858 #define GDB_NM_FILE "${GDB_NM_FILE}"
18859 _ACEOF
18860
18861 NM_H=nm.h
18862 fi
18863
18864
18865
18866 for ac_prog in xsltproc
18867 do
18868 # Extract the first word of "$ac_prog", so it can be a program name with args.
18869 set dummy $ac_prog; ac_word=$2
18870 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18871 $as_echo_n "checking for $ac_word... " >&6; }
18872 if ${ac_cv_path_XSLTPROC+:} false; then :
18873 $as_echo_n "(cached) " >&6
18874 else
18875 case $XSLTPROC in
18876 [\\/]* | ?:[\\/]*)
18877 ac_cv_path_XSLTPROC="$XSLTPROC" # Let the user override the test with a path.
18878 ;;
18879 *)
18880 as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18881 for as_dir in $PATH
18882 do
18883 IFS=$as_save_IFS
18884 test -z "$as_dir" && as_dir=.
18885 for ac_exec_ext in '' $ac_executable_extensions; do
18886 if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18887 ac_cv_path_XSLTPROC="$as_dir/$ac_word$ac_exec_ext"
18888 $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18889 break 2
18890 fi
18891 done
18892 done
18893 IFS=$as_save_IFS
18894
18895 ;;
18896 esac
18897 fi
18898 XSLTPROC=$ac_cv_path_XSLTPROC
18899 if test -n "$XSLTPROC"; then
18900 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XSLTPROC" >&5
18901 $as_echo "$XSLTPROC" >&6; }
18902 else
18903 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18904 $as_echo "no" >&6; }
18905 fi
18906
18907
18908 test -n "$XSLTPROC" && break
18909 done
18910 test -n "$XSLTPROC" || XSLTPROC="missing"
18911
18912 if test "x$USE_MAINTAINER_MODE" = xyes; then
18913 if test "${XSLTPROC}" = missing; then
18914 as_fn_error $? "unable to find xsltproc. maintainer-mode requires xsltproc." "$LINENO" 5
18915 fi
18916 fi
18917
18918
18919
18920
18921
18922 $as_echo "#define GDB_DEFAULT_HOST_CHARSET \"UTF-8\"" >>confdefs.h
18923
18924
18925
18926 # Check whether we will enable the inclusion of unit tests when
18927 # compiling GDB.
18928 #
18929 # The default value of this option changes depending whether we're on
18930 # development mode (in which case it's "true") or not (in which case
18931 # it's "false").
18932 # Check whether --enable-unit-tests was given.
18933 if test "${enable_unit_tests+set}" = set; then :
18934 enableval=$enable_unit_tests; case "${enableval}" in
18935 yes) enable_unittests=true ;;
18936 no) enable_unittests=false ;;
18937 *) as_fn_error $? "bad value ${enableval} for --{enable,disable}-unit-tests option" "$LINENO" 5 ;;
18938 esac
18939 else
18940 enable_unittests=$development
18941 fi
18942
18943
18944 if $enable_unittests; then
18945
18946 $as_echo "#define GDB_SELF_TEST 1" >>confdefs.h
18947
18948
18949 CONFIG_OBS="$CONFIG_OBS \$(SUBDIR_UNITTESTS_OBS) selftest-arch.o"
18950 CONFIG_SRCS="$CONFIG_SRCS \$(SUBDIR_UNITTESTS_SRCS) selftest-arch.c"
18951
18952 fi
18953
18954
18955
18956 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
18957 GDB_TRANSFORM_NAME=`echo gdb | sed -e "$gdb_ac_transform"`
18958 if test "x$GDB_TRANSFORM_NAME" = x; then
18959 GDB_TRANSFORM_NAME=gdb
18960 fi
18961
18962
18963
18964 gdb_ac_transform=`echo "$program_transform_name" | sed -e 's/\\$\\$/\\$/g'`
18965 GCORE_TRANSFORM_NAME=`echo gcore | sed -e "$gdb_ac_transform"`
18966 if test "x$GCORE_TRANSFORM_NAME" = x; then
18967 GCORE_TRANSFORM_NAME=gcore
18968 fi
18969
18970
18971 ac_config_files="$ac_config_files gcore"
18972
18973 ac_config_files="$ac_config_files Makefile gdb-gdb.gdb gdb-gdb.py doc/Makefile data-directory/Makefile"
18974
18975
18976 cat >confcache <<\_ACEOF
18977 # This file is a shell script that caches the results of configure
18978 # tests run on this system so they can be shared between configure
18979 # scripts and configure runs, see configure's option --config-cache.
18980 # It is not useful on other systems. If it contains results you don't
18981 # want to keep, you may remove or edit it.
18982 #
18983 # config.status only pays attention to the cache file if you give it
18984 # the --recheck option to rerun configure.
18985 #
18986 # `ac_cv_env_foo' variables (set or unset) will be overridden when
18987 # loading this file, other *unset* `ac_cv_foo' will be assigned the
18988 # following values.
18989
18990 _ACEOF
18991
18992 # The following way of writing the cache mishandles newlines in values,
18993 # but we know of no workaround that is simple, portable, and efficient.
18994 # So, we kill variables containing newlines.
18995 # Ultrix sh set writes to stderr and can't be redirected directly,
18996 # and sets the high bit in the cache file unless we assign to the vars.
18997 (
18998 for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
18999 eval ac_val=\$$ac_var
19000 case $ac_val in #(
19001 *${as_nl}*)
19002 case $ac_var in #(
19003 *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
19004 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
19005 esac
19006 case $ac_var in #(
19007 _ | IFS | as_nl) ;; #(
19008 BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
19009 *) { eval $ac_var=; unset $ac_var;} ;;
19010 esac ;;
19011 esac
19012 done
19013
19014 (set) 2>&1 |
19015 case $as_nl`(ac_space=' '; set) 2>&1` in #(
19016 *${as_nl}ac_space=\ *)
19017 # `set' does not quote correctly, so add quotes: double-quote
19018 # substitution turns \\\\ into \\, and sed turns \\ into \.
19019 sed -n \
19020 "s/'/'\\\\''/g;
19021 s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
19022 ;; #(
19023 *)
19024 # `set' quotes correctly as required by POSIX, so do not add quotes.
19025 sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
19026 ;;
19027 esac |
19028 sort
19029 ) |
19030 sed '
19031 /^ac_cv_env_/b end
19032 t clear
19033 :clear
19034 s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
19035 t end
19036 s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
19037 :end' >>confcache
19038 if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
19039 if test -w "$cache_file"; then
19040 if test "x$cache_file" != "x/dev/null"; then
19041 { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
19042 $as_echo "$as_me: updating cache $cache_file" >&6;}
19043 if test ! -f "$cache_file" || test -h "$cache_file"; then
19044 cat confcache >"$cache_file"
19045 else
19046 case $cache_file in #(
19047 */* | ?:*)
19048 mv -f confcache "$cache_file"$$ &&
19049 mv -f "$cache_file"$$ "$cache_file" ;; #(
19050 *)
19051 mv -f confcache "$cache_file" ;;
19052 esac
19053 fi
19054 fi
19055 else
19056 { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
19057 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
19058 fi
19059 fi
19060 rm -f confcache
19061
19062 test "x$prefix" = xNONE && prefix=$ac_default_prefix
19063 # Let make expand exec_prefix.
19064 test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
19065
19066 DEFS=-DHAVE_CONFIG_H
19067
19068 ac_libobjs=
19069 ac_ltlibobjs=
19070 U=
19071 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
19072 # 1. Remove the extension, and $U if already installed.
19073 ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
19074 ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
19075 # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR
19076 # will be set to the directory where LIBOBJS objects are built.
19077 as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
19078 as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
19079 done
19080 LIBOBJS=$ac_libobjs
19081
19082 LTLIBOBJS=$ac_ltlibobjs
19083
19084
19085 if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then
19086 as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined.
19087 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19088 fi
19089 if test -z "${HAVE_PYTHON_TRUE}" && test -z "${HAVE_PYTHON_FALSE}"; then
19090 as_fn_error $? "conditional \"HAVE_PYTHON\" was never defined.
19091 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19092 fi
19093 if test -z "${HAVE_GUILE_TRUE}" && test -z "${HAVE_GUILE_FALSE}"; then
19094 as_fn_error $? "conditional \"HAVE_GUILE\" was never defined.
19095 Usually this means the macro was only invoked conditionally." "$LINENO" 5
19096 fi
19097
19098
19099 : "${CONFIG_STATUS=./config.status}"
19100 ac_write_fail=0
19101 ac_clean_files_save=$ac_clean_files
19102 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
19103 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
19104 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
19105 as_write_fail=0
19106 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
19107 #! $SHELL
19108 # Generated by $as_me.
19109 # Run this file to recreate the current configuration.
19110 # Compiler output produced by configure, useful for debugging
19111 # configure, is in config.log if it exists.
19112
19113 debug=false
19114 ac_cs_recheck=false
19115 ac_cs_silent=false
19116
19117 SHELL=\${CONFIG_SHELL-$SHELL}
19118 export SHELL
19119 _ASEOF
19120 cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
19121 ## -------------------- ##
19122 ## M4sh Initialization. ##
19123 ## -------------------- ##
19124
19125 # Be more Bourne compatible
19126 DUALCASE=1; export DUALCASE # for MKS sh
19127 if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
19128 emulate sh
19129 NULLCMD=:
19130 # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
19131 # is contrary to our usage. Disable this feature.
19132 alias -g '${1+"$@"}'='"$@"'
19133 setopt NO_GLOB_SUBST
19134 else
19135 case `(set -o) 2>/dev/null` in #(
19136 *posix*) :
19137 set -o posix ;; #(
19138 *) :
19139 ;;
19140 esac
19141 fi
19142
19143
19144 as_nl='
19145 '
19146 export as_nl
19147 # Printing a long string crashes Solaris 7 /usr/bin/printf.
19148 as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
19149 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
19150 as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
19151 # Prefer a ksh shell builtin over an external printf program on Solaris,
19152 # but without wasting forks for bash or zsh.
19153 if test -z "$BASH_VERSION$ZSH_VERSION" \
19154 && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
19155 as_echo='print -r --'
19156 as_echo_n='print -rn --'
19157 elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
19158 as_echo='printf %s\n'
19159 as_echo_n='printf %s'
19160 else
19161 if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
19162 as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
19163 as_echo_n='/usr/ucb/echo -n'
19164 else
19165 as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
19166 as_echo_n_body='eval
19167 arg=$1;
19168 case $arg in #(
19169 *"$as_nl"*)
19170 expr "X$arg" : "X\\(.*\\)$as_nl";
19171 arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
19172 esac;
19173 expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
19174 '
19175 export as_echo_n_body
19176 as_echo_n='sh -c $as_echo_n_body as_echo'
19177 fi
19178 export as_echo_body
19179 as_echo='sh -c $as_echo_body as_echo'
19180 fi
19181
19182 # The user is always right.
19183 if test "${PATH_SEPARATOR+set}" != set; then
19184 PATH_SEPARATOR=:
19185 (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
19186 (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
19187 PATH_SEPARATOR=';'
19188 }
19189 fi
19190
19191
19192 # IFS
19193 # We need space, tab and new line, in precisely that order. Quoting is
19194 # there to prevent editors from complaining about space-tab.
19195 # (If _AS_PATH_WALK were called with IFS unset, it would disable word
19196 # splitting by setting IFS to empty value.)
19197 IFS=" "" $as_nl"
19198
19199 # Find who we are. Look in the path if we contain no directory separator.
19200 as_myself=
19201 case $0 in #((
19202 *[\\/]* ) as_myself=$0 ;;
19203 *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19204 for as_dir in $PATH
19205 do
19206 IFS=$as_save_IFS
19207 test -z "$as_dir" && as_dir=.
19208 test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
19209 done
19210 IFS=$as_save_IFS
19211
19212 ;;
19213 esac
19214 # We did not find ourselves, most probably we were run as `sh COMMAND'
19215 # in which case we are not to be found in the path.
19216 if test "x$as_myself" = x; then
19217 as_myself=$0
19218 fi
19219 if test ! -f "$as_myself"; then
19220 $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
19221 exit 1
19222 fi
19223
19224 # Unset variables that we do not need and which cause bugs (e.g. in
19225 # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1"
19226 # suppresses any "Segmentation fault" message there. '((' could
19227 # trigger a bug in pdksh 5.2.14.
19228 for as_var in BASH_ENV ENV MAIL MAILPATH
19229 do eval test x\${$as_var+set} = xset \
19230 && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
19231 done
19232 PS1='$ '
19233 PS2='> '
19234 PS4='+ '
19235
19236 # NLS nuisances.
19237 LC_ALL=C
19238 export LC_ALL
19239 LANGUAGE=C
19240 export LANGUAGE
19241
19242 # CDPATH.
19243 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
19244
19245
19246 # as_fn_error STATUS ERROR [LINENO LOG_FD]
19247 # ----------------------------------------
19248 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
19249 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
19250 # script with STATUS, using 1 if that was 0.
19251 as_fn_error ()
19252 {
19253 as_status=$1; test $as_status -eq 0 && as_status=1
19254 if test "$4"; then
19255 as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
19256 $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
19257 fi
19258 $as_echo "$as_me: error: $2" >&2
19259 as_fn_exit $as_status
19260 } # as_fn_error
19261
19262
19263 # as_fn_set_status STATUS
19264 # -----------------------
19265 # Set $? to STATUS, without forking.
19266 as_fn_set_status ()
19267 {
19268 return $1
19269 } # as_fn_set_status
19270
19271 # as_fn_exit STATUS
19272 # -----------------
19273 # Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
19274 as_fn_exit ()
19275 {
19276 set +e
19277 as_fn_set_status $1
19278 exit $1
19279 } # as_fn_exit
19280
19281 # as_fn_unset VAR
19282 # ---------------
19283 # Portably unset VAR.
19284 as_fn_unset ()
19285 {
19286 { eval $1=; unset $1;}
19287 }
19288 as_unset=as_fn_unset
19289 # as_fn_append VAR VALUE
19290 # ----------------------
19291 # Append the text in VALUE to the end of the definition contained in VAR. Take
19292 # advantage of any shell optimizations that allow amortized linear growth over
19293 # repeated appends, instead of the typical quadratic growth present in naive
19294 # implementations.
19295 if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
19296 eval 'as_fn_append ()
19297 {
19298 eval $1+=\$2
19299 }'
19300 else
19301 as_fn_append ()
19302 {
19303 eval $1=\$$1\$2
19304 }
19305 fi # as_fn_append
19306
19307 # as_fn_arith ARG...
19308 # ------------------
19309 # Perform arithmetic evaluation on the ARGs, and store the result in the
19310 # global $as_val. Take advantage of shells that can avoid forks. The arguments
19311 # must be portable across $(()) and expr.
19312 if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
19313 eval 'as_fn_arith ()
19314 {
19315 as_val=$(( $* ))
19316 }'
19317 else
19318 as_fn_arith ()
19319 {
19320 as_val=`expr "$@" || test $? -eq 1`
19321 }
19322 fi # as_fn_arith
19323
19324
19325 if expr a : '\(a\)' >/dev/null 2>&1 &&
19326 test "X`expr 00001 : '.*\(...\)'`" = X001; then
19327 as_expr=expr
19328 else
19329 as_expr=false
19330 fi
19331
19332 if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
19333 as_basename=basename
19334 else
19335 as_basename=false
19336 fi
19337
19338 if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
19339 as_dirname=dirname
19340 else
19341 as_dirname=false
19342 fi
19343
19344 as_me=`$as_basename -- "$0" ||
19345 $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
19346 X"$0" : 'X\(//\)$' \| \
19347 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
19348 $as_echo X/"$0" |
19349 sed '/^.*\/\([^/][^/]*\)\/*$/{
19350 s//\1/
19351 q
19352 }
19353 /^X\/\(\/\/\)$/{
19354 s//\1/
19355 q
19356 }
19357 /^X\/\(\/\).*/{
19358 s//\1/
19359 q
19360 }
19361 s/.*/./; q'`
19362
19363 # Avoid depending upon Character Ranges.
19364 as_cr_letters='abcdefghijklmnopqrstuvwxyz'
19365 as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
19366 as_cr_Letters=$as_cr_letters$as_cr_LETTERS
19367 as_cr_digits='0123456789'
19368 as_cr_alnum=$as_cr_Letters$as_cr_digits
19369
19370 ECHO_C= ECHO_N= ECHO_T=
19371 case `echo -n x` in #(((((
19372 -n*)
19373 case `echo 'xy\c'` in
19374 *c*) ECHO_T=' ';; # ECHO_T is single tab character.
19375 xy) ECHO_C='\c';;
19376 *) echo `echo ksh88 bug on AIX 6.1` > /dev/null
19377 ECHO_T=' ';;
19378 esac;;
19379 *)
19380 ECHO_N='-n';;
19381 esac
19382
19383 rm -f conf$$ conf$$.exe conf$$.file
19384 if test -d conf$$.dir; then
19385 rm -f conf$$.dir/conf$$.file
19386 else
19387 rm -f conf$$.dir
19388 mkdir conf$$.dir 2>/dev/null
19389 fi
19390 if (echo >conf$$.file) 2>/dev/null; then
19391 if ln -s conf$$.file conf$$ 2>/dev/null; then
19392 as_ln_s='ln -s'
19393 # ... but there are two gotchas:
19394 # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
19395 # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
19396 # In both cases, we have to default to `cp -pR'.
19397 ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
19398 as_ln_s='cp -pR'
19399 elif ln conf$$.file conf$$ 2>/dev/null; then
19400 as_ln_s=ln
19401 else
19402 as_ln_s='cp -pR'
19403 fi
19404 else
19405 as_ln_s='cp -pR'
19406 fi
19407 rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
19408 rmdir conf$$.dir 2>/dev/null
19409
19410
19411 # as_fn_mkdir_p
19412 # -------------
19413 # Create "$as_dir" as a directory, including parents if necessary.
19414 as_fn_mkdir_p ()
19415 {
19416
19417 case $as_dir in #(
19418 -*) as_dir=./$as_dir;;
19419 esac
19420 test -d "$as_dir" || eval $as_mkdir_p || {
19421 as_dirs=
19422 while :; do
19423 case $as_dir in #(
19424 *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
19425 *) as_qdir=$as_dir;;
19426 esac
19427 as_dirs="'$as_qdir' $as_dirs"
19428 as_dir=`$as_dirname -- "$as_dir" ||
19429 $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
19430 X"$as_dir" : 'X\(//\)[^/]' \| \
19431 X"$as_dir" : 'X\(//\)$' \| \
19432 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
19433 $as_echo X"$as_dir" |
19434 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
19435 s//\1/
19436 q
19437 }
19438 /^X\(\/\/\)[^/].*/{
19439 s//\1/
19440 q
19441 }
19442 /^X\(\/\/\)$/{
19443 s//\1/
19444 q
19445 }
19446 /^X\(\/\).*/{
19447 s//\1/
19448 q
19449 }
19450 s/.*/./; q'`
19451 test -d "$as_dir" && break
19452 done
19453 test -z "$as_dirs" || eval "mkdir $as_dirs"
19454 } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
19455
19456
19457 } # as_fn_mkdir_p
19458 if mkdir -p . 2>/dev/null; then
19459 as_mkdir_p='mkdir -p "$as_dir"'
19460 else
19461 test -d ./-p && rmdir ./-p
19462 as_mkdir_p=false
19463 fi
19464
19465
19466 # as_fn_executable_p FILE
19467 # -----------------------
19468 # Test if FILE is an executable regular file.
19469 as_fn_executable_p ()
19470 {
19471 test -f "$1" && test -x "$1"
19472 } # as_fn_executable_p
19473 as_test_x='test -x'
19474 as_executable_p=as_fn_executable_p
19475
19476 # Sed expression to map a string onto a valid CPP name.
19477 as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
19478
19479 # Sed expression to map a string onto a valid variable name.
19480 as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
19481
19482
19483 exec 6>&1
19484 ## ----------------------------------- ##
19485 ## Main body of $CONFIG_STATUS script. ##
19486 ## ----------------------------------- ##
19487 _ASEOF
19488 test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
19489
19490 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19491 # Save the log message, to keep $0 and so on meaningful, and to
19492 # report actual input values of CONFIG_FILES etc. instead of their
19493 # values after options handling.
19494 ac_log="
19495 This file was extended by $as_me, which was
19496 generated by GNU Autoconf 2.69. Invocation command line was
19497
19498 CONFIG_FILES = $CONFIG_FILES
19499 CONFIG_HEADERS = $CONFIG_HEADERS
19500 CONFIG_LINKS = $CONFIG_LINKS
19501 CONFIG_COMMANDS = $CONFIG_COMMANDS
19502 $ $0 $@
19503
19504 on `(hostname || uname -n) 2>/dev/null | sed 1q`
19505 "
19506
19507 _ACEOF
19508
19509 case $ac_config_files in *"
19510 "*) set x $ac_config_files; shift; ac_config_files=$*;;
19511 esac
19512
19513 case $ac_config_headers in *"
19514 "*) set x $ac_config_headers; shift; ac_config_headers=$*;;
19515 esac
19516
19517
19518 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19519 # Files that config.status was made for.
19520 config_files="$ac_config_files"
19521 config_headers="$ac_config_headers"
19522 config_links="$ac_config_links"
19523 config_commands="$ac_config_commands"
19524
19525 _ACEOF
19526
19527 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19528 ac_cs_usage="\
19529 \`$as_me' instantiates files and other configuration actions
19530 from templates according to the current configuration. Unless the files
19531 and actions are specified as TAGs, all are instantiated by default.
19532
19533 Usage: $0 [OPTION]... [TAG]...
19534
19535 -h, --help print this help, then exit
19536 -V, --version print version number and configuration settings, then exit
19537 --config print configuration, then exit
19538 -q, --quiet, --silent
19539 do not print progress messages
19540 -d, --debug don't remove temporary files
19541 --recheck update $as_me by reconfiguring in the same conditions
19542 --file=FILE[:TEMPLATE]
19543 instantiate the configuration file FILE
19544 --header=FILE[:TEMPLATE]
19545 instantiate the configuration header FILE
19546
19547 Configuration files:
19548 $config_files
19549
19550 Configuration headers:
19551 $config_headers
19552
19553 Configuration links:
19554 $config_links
19555
19556 Configuration commands:
19557 $config_commands
19558
19559 Report bugs to the package provider."
19560
19561 _ACEOF
19562 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19563 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
19564 ac_cs_version="\\
19565 config.status
19566 configured by $0, generated by GNU Autoconf 2.69,
19567 with options \\"\$ac_cs_config\\"
19568
19569 Copyright (C) 2012 Free Software Foundation, Inc.
19570 This config.status script is free software; the Free Software Foundation
19571 gives unlimited permission to copy, distribute and modify it."
19572
19573 ac_pwd='$ac_pwd'
19574 srcdir='$srcdir'
19575 INSTALL='$INSTALL'
19576 AWK='$AWK'
19577 test -n "\$AWK" || AWK=awk
19578 _ACEOF
19579
19580 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19581 # The default lists apply if the user does not specify any file.
19582 ac_need_defaults=:
19583 while test $# != 0
19584 do
19585 case $1 in
19586 --*=?*)
19587 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19588 ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
19589 ac_shift=:
19590 ;;
19591 --*=)
19592 ac_option=`expr "X$1" : 'X\([^=]*\)='`
19593 ac_optarg=
19594 ac_shift=:
19595 ;;
19596 *)
19597 ac_option=$1
19598 ac_optarg=$2
19599 ac_shift=shift
19600 ;;
19601 esac
19602
19603 case $ac_option in
19604 # Handling of the options.
19605 -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
19606 ac_cs_recheck=: ;;
19607 --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
19608 $as_echo "$ac_cs_version"; exit ;;
19609 --config | --confi | --conf | --con | --co | --c )
19610 $as_echo "$ac_cs_config"; exit ;;
19611 --debug | --debu | --deb | --de | --d | -d )
19612 debug=: ;;
19613 --file | --fil | --fi | --f )
19614 $ac_shift
19615 case $ac_optarg in
19616 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19617 '') as_fn_error $? "missing file argument" ;;
19618 esac
19619 as_fn_append CONFIG_FILES " '$ac_optarg'"
19620 ac_need_defaults=false;;
19621 --header | --heade | --head | --hea )
19622 $ac_shift
19623 case $ac_optarg in
19624 *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
19625 esac
19626 as_fn_append CONFIG_HEADERS " '$ac_optarg'"
19627 ac_need_defaults=false;;
19628 --he | --h)
19629 # Conflict between --help and --header
19630 as_fn_error $? "ambiguous option: \`$1'
19631 Try \`$0 --help' for more information.";;
19632 --help | --hel | -h )
19633 $as_echo "$ac_cs_usage"; exit ;;
19634 -q | -quiet | --quiet | --quie | --qui | --qu | --q \
19635 | -silent | --silent | --silen | --sile | --sil | --si | --s)
19636 ac_cs_silent=: ;;
19637
19638 # This is an error.
19639 -*) as_fn_error $? "unrecognized option: \`$1'
19640 Try \`$0 --help' for more information." ;;
19641
19642 *) as_fn_append ac_config_targets " $1"
19643 ac_need_defaults=false ;;
19644
19645 esac
19646 shift
19647 done
19648
19649 ac_configure_extra_args=
19650
19651 if $ac_cs_silent; then
19652 exec 6>/dev/null
19653 ac_configure_extra_args="$ac_configure_extra_args --silent"
19654 fi
19655
19656 _ACEOF
19657 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19658 if \$ac_cs_recheck; then
19659 set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
19660 shift
19661 \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
19662 CONFIG_SHELL='$SHELL'
19663 export CONFIG_SHELL
19664 exec "\$@"
19665 fi
19666
19667 _ACEOF
19668 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19669 exec 5>>config.log
19670 {
19671 echo
19672 sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
19673 ## Running $as_me. ##
19674 _ASBOX
19675 $as_echo "$ac_log"
19676 } >&5
19677
19678 _ACEOF
19679 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19680 #
19681 # INIT-COMMANDS
19682 #
19683 ac_aux_dir=$ac_aux_dir DEPDIR=$DEPDIR
19684 GDB_NM_FILE=$GDB_NM_FILE
19685
19686 _ACEOF
19687
19688 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19689
19690 # Handling of arguments.
19691 for ac_config_target in $ac_config_targets
19692 do
19693 case $ac_config_target in
19694 "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h:config.in" ;;
19695 "depdir") CONFIG_COMMANDS="$CONFIG_COMMANDS depdir" ;;
19696 "jit-reader.h") CONFIG_FILES="$CONFIG_FILES jit-reader.h:jit-reader.in" ;;
19697 "nm.h") CONFIG_LINKS="$CONFIG_LINKS nm.h:$GDB_NM_FILE" ;;
19698 "gcore") CONFIG_FILES="$CONFIG_FILES gcore" ;;
19699 "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;;
19700 "gdb-gdb.gdb") CONFIG_FILES="$CONFIG_FILES gdb-gdb.gdb" ;;
19701 "gdb-gdb.py") CONFIG_FILES="$CONFIG_FILES gdb-gdb.py" ;;
19702 "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;;
19703 "data-directory/Makefile") CONFIG_FILES="$CONFIG_FILES data-directory/Makefile" ;;
19704
19705 *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
19706 esac
19707 done
19708
19709
19710 # If the user did not use the arguments to specify the items to instantiate,
19711 # then the envvar interface is used. Set only those that are not.
19712 # We use the long form for the default assignment because of an extremely
19713 # bizarre bug on SunOS 4.1.3.
19714 if $ac_need_defaults; then
19715 test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
19716 test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
19717 test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
19718 test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
19719 fi
19720
19721 # Have a temporary directory for convenience. Make it in the build tree
19722 # simply because there is no reason against having it here, and in addition,
19723 # creating and moving files from /tmp can sometimes cause problems.
19724 # Hook for its removal unless debugging.
19725 # Note that there is a small window in which the directory will not be cleaned:
19726 # after its creation but before its name has been assigned to `$tmp'.
19727 $debug ||
19728 {
19729 tmp= ac_tmp=
19730 trap 'exit_status=$?
19731 : "${ac_tmp:=$tmp}"
19732 { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
19733 ' 0
19734 trap 'as_fn_exit 1' 1 2 13 15
19735 }
19736 # Create a (secure) tmp directory for tmp files.
19737
19738 {
19739 tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
19740 test -d "$tmp"
19741 } ||
19742 {
19743 tmp=./conf$$-$RANDOM
19744 (umask 077 && mkdir "$tmp")
19745 } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
19746 ac_tmp=$tmp
19747
19748 # Set up the scripts for CONFIG_FILES section.
19749 # No need to generate them if there are no CONFIG_FILES.
19750 # This happens for instance with `./config.status config.h'.
19751 if test -n "$CONFIG_FILES"; then
19752
19753 if $AWK 'BEGIN { getline <"/dev/null" }' </dev/null 2>/dev/null; then
19754 ac_cs_awk_getline=:
19755 ac_cs_awk_pipe_init=
19756 ac_cs_awk_read_file='
19757 while ((getline aline < (F[key])) > 0)
19758 print(aline)
19759 close(F[key])'
19760 ac_cs_awk_pipe_fini=
19761 else
19762 ac_cs_awk_getline=false
19763 ac_cs_awk_pipe_init="print \"cat <<'|#_!!_#|' &&\""
19764 ac_cs_awk_read_file='
19765 print "|#_!!_#|"
19766 print "cat " F[key] " &&"
19767 '$ac_cs_awk_pipe_init
19768 # The final `:' finishes the AND list.
19769 ac_cs_awk_pipe_fini='END { print "|#_!!_#|"; print ":" }'
19770 fi
19771 ac_cr=`echo X | tr X '\015'`
19772 # On cygwin, bash can eat \r inside `` if the user requested igncr.
19773 # But we know of no other shell where ac_cr would be empty at this
19774 # point, so we can use a bashism as a fallback.
19775 if test "x$ac_cr" = x; then
19776 eval ac_cr=\$\'\\r\'
19777 fi
19778 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
19779 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
19780 ac_cs_awk_cr='\\r'
19781 else
19782 ac_cs_awk_cr=$ac_cr
19783 fi
19784
19785 echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
19786 _ACEOF
19787
19788 # Create commands to substitute file output variables.
19789 {
19790 echo "cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1" &&
19791 echo 'cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&' &&
19792 echo "$ac_subst_files" | sed 's/.*/F["&"]="$&"/' &&
19793 echo "_ACAWK" &&
19794 echo "_ACEOF"
19795 } >conf$$files.sh &&
19796 . ./conf$$files.sh ||
19797 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19798 rm -f conf$$files.sh
19799
19800 {
19801 echo "cat >conf$$subs.awk <<_ACEOF" &&
19802 echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
19803 echo "_ACEOF"
19804 } >conf$$subs.sh ||
19805 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19806 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
19807 ac_delim='%!_!# '
19808 for ac_last_try in false false false false false :; do
19809 . ./conf$$subs.sh ||
19810 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19811
19812 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
19813 if test $ac_delim_n = $ac_delim_num; then
19814 break
19815 elif $ac_last_try; then
19816 as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
19817 else
19818 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19819 fi
19820 done
19821 rm -f conf$$subs.sh
19822
19823 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19824 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
19825 _ACEOF
19826 sed -n '
19827 h
19828 s/^/S["/; s/!.*/"]=/
19829 p
19830 g
19831 s/^[^!]*!//
19832 :repl
19833 t repl
19834 s/'"$ac_delim"'$//
19835 t delim
19836 :nl
19837 h
19838 s/\(.\{148\}\)..*/\1/
19839 t more1
19840 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
19841 p
19842 n
19843 b repl
19844 :more1
19845 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19846 p
19847 g
19848 s/.\{148\}//
19849 t nl
19850 :delim
19851 h
19852 s/\(.\{148\}\)..*/\1/
19853 t more2
19854 s/["\\]/\\&/g; s/^/"/; s/$/"/
19855 p
19856 b
19857 :more2
19858 s/["\\]/\\&/g; s/^/"/; s/$/"\\/
19859 p
19860 g
19861 s/.\{148\}//
19862 t delim
19863 ' <conf$$subs.awk | sed '
19864 /^[^""]/{
19865 N
19866 s/\n//
19867 }
19868 ' >>$CONFIG_STATUS || ac_write_fail=1
19869 rm -f conf$$subs.awk
19870 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
19871 _ACAWK
19872 cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
19873 for (key in S) S_is_set[key] = 1
19874 FS = "\a"
19875 \$ac_cs_awk_pipe_init
19876 }
19877 {
19878 line = $ 0
19879 nfields = split(line, field, "@")
19880 substed = 0
19881 len = length(field[1])
19882 for (i = 2; i < nfields; i++) {
19883 key = field[i]
19884 keylen = length(key)
19885 if (S_is_set[key]) {
19886 value = S[key]
19887 line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
19888 len += length(value) + length(field[++i])
19889 substed = 1
19890 } else
19891 len += 1 + keylen
19892 }
19893 if (nfields == 3 && !substed) {
19894 key = field[2]
19895 if (F[key] != "" && line ~ /^[ ]*@.*@[ ]*$/) {
19896 \$ac_cs_awk_read_file
19897 next
19898 }
19899 }
19900 print line
19901 }
19902 \$ac_cs_awk_pipe_fini
19903 _ACAWK
19904 _ACEOF
19905 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19906 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
19907 sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
19908 else
19909 cat
19910 fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
19911 || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
19912 _ACEOF
19913
19914 # VPATH may cause trouble with some makes, so we remove sole $(srcdir),
19915 # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
19916 # trailing colons and then remove the whole line if VPATH becomes empty
19917 # (actually we leave an empty line to preserve line numbers).
19918 if test "x$srcdir" = x.; then
19919 ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{
19920 h
19921 s///
19922 s/^/:/
19923 s/[ ]*$/:/
19924 s/:\$(srcdir):/:/g
19925 s/:\${srcdir}:/:/g
19926 s/:@srcdir@:/:/g
19927 s/^:*//
19928 s/:*$//
19929 x
19930 s/\(=[ ]*\).*/\1/
19931 G
19932 s/\n//
19933 s/^[^=]*=[ ]*$//
19934 }'
19935 fi
19936
19937 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
19938 fi # test -n "$CONFIG_FILES"
19939
19940 # Set up the scripts for CONFIG_HEADERS section.
19941 # No need to generate them if there are no CONFIG_HEADERS.
19942 # This happens for instance with `./config.status Makefile'.
19943 if test -n "$CONFIG_HEADERS"; then
19944 cat >"$ac_tmp/defines.awk" <<\_ACAWK ||
19945 BEGIN {
19946 _ACEOF
19947
19948 # Transform confdefs.h into an awk script `defines.awk', embedded as
19949 # here-document in config.status, that substitutes the proper values into
19950 # config.h.in to produce config.h.
19951
19952 # Create a delimiter string that does not exist in confdefs.h, to ease
19953 # handling of long lines.
19954 ac_delim='%!_!# '
19955 for ac_last_try in false false :; do
19956 ac_tt=`sed -n "/$ac_delim/p" confdefs.h`
19957 if test -z "$ac_tt"; then
19958 break
19959 elif $ac_last_try; then
19960 as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5
19961 else
19962 ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
19963 fi
19964 done
19965
19966 # For the awk script, D is an array of macro values keyed by name,
19967 # likewise P contains macro parameters if any. Preserve backslash
19968 # newline sequences.
19969
19970 ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]*
19971 sed -n '
19972 s/.\{148\}/&'"$ac_delim"'/g
19973 t rset
19974 :rset
19975 s/^[ ]*#[ ]*define[ ][ ]*/ /
19976 t def
19977 d
19978 :def
19979 s/\\$//
19980 t bsnl
19981 s/["\\]/\\&/g
19982 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19983 D["\1"]=" \3"/p
19984 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p
19985 d
19986 :bsnl
19987 s/["\\]/\\&/g
19988 s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\
19989 D["\1"]=" \3\\\\\\n"\\/p
19990 t cont
19991 s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p
19992 t cont
19993 d
19994 :cont
19995 n
19996 s/.\{148\}/&'"$ac_delim"'/g
19997 t clear
19998 :clear
19999 s/\\$//
20000 t bsnlc
20001 s/["\\]/\\&/g; s/^/"/; s/$/"/p
20002 d
20003 :bsnlc
20004 s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p
20005 b cont
20006 ' <confdefs.h | sed '
20007 s/'"$ac_delim"'/"\\\
20008 "/g' >>$CONFIG_STATUS || ac_write_fail=1
20009
20010 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20011 for (key in D) D_is_set[key] = 1
20012 FS = "\a"
20013 }
20014 /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ {
20015 line = \$ 0
20016 split(line, arg, " ")
20017 if (arg[1] == "#") {
20018 defundef = arg[2]
20019 mac1 = arg[3]
20020 } else {
20021 defundef = substr(arg[1], 2)
20022 mac1 = arg[2]
20023 }
20024 split(mac1, mac2, "(") #)
20025 macro = mac2[1]
20026 prefix = substr(line, 1, index(line, defundef) - 1)
20027 if (D_is_set[macro]) {
20028 # Preserve the white space surrounding the "#".
20029 print prefix "define", macro P[macro] D[macro]
20030 next
20031 } else {
20032 # Replace #undef with comments. This is necessary, for example,
20033 # in the case of _POSIX_SOURCE, which is predefined and required
20034 # on some systems where configure will not decide to define it.
20035 if (defundef == "undef") {
20036 print "/*", prefix defundef, macro, "*/"
20037 next
20038 }
20039 }
20040 }
20041 { print }
20042 _ACAWK
20043 _ACEOF
20044 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20045 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5
20046 fi # test -n "$CONFIG_HEADERS"
20047
20048
20049 eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS"
20050 shift
20051 for ac_tag
20052 do
20053 case $ac_tag in
20054 :[FHLC]) ac_mode=$ac_tag; continue;;
20055 esac
20056 case $ac_mode$ac_tag in
20057 :[FHL]*:*);;
20058 :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
20059 :[FH]-) ac_tag=-:-;;
20060 :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
20061 esac
20062 ac_save_IFS=$IFS
20063 IFS=:
20064 set x $ac_tag
20065 IFS=$ac_save_IFS
20066 shift
20067 ac_file=$1
20068 shift
20069
20070 case $ac_mode in
20071 :L) ac_source=$1;;
20072 :[FH])
20073 ac_file_inputs=
20074 for ac_f
20075 do
20076 case $ac_f in
20077 -) ac_f="$ac_tmp/stdin";;
20078 *) # Look for the file first in the build tree, then in the source tree
20079 # (if the path is not absolute). The absolute path cannot be DOS-style,
20080 # because $ac_f cannot contain `:'.
20081 test -f "$ac_f" ||
20082 case $ac_f in
20083 [\\/$]*) false;;
20084 *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
20085 esac ||
20086 as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
20087 esac
20088 case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
20089 as_fn_append ac_file_inputs " '$ac_f'"
20090 done
20091
20092 # Let's still pretend it is `configure' which instantiates (i.e., don't
20093 # use $as_me), people would be surprised to read:
20094 # /* config.h. Generated by config.status. */
20095 configure_input='Generated from '`
20096 $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
20097 `' by configure.'
20098 if test x"$ac_file" != x-; then
20099 configure_input="$ac_file. $configure_input"
20100 { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
20101 $as_echo "$as_me: creating $ac_file" >&6;}
20102 fi
20103 # Neutralize special characters interpreted by sed in replacement strings.
20104 case $configure_input in #(
20105 *\&* | *\|* | *\\* )
20106 ac_sed_conf_input=`$as_echo "$configure_input" |
20107 sed 's/[\\\\&|]/\\\\&/g'`;; #(
20108 *) ac_sed_conf_input=$configure_input;;
20109 esac
20110
20111 case $ac_tag in
20112 *:-:* | *:-) cat >"$ac_tmp/stdin" \
20113 || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
20114 esac
20115 ;;
20116 esac
20117
20118 ac_dir=`$as_dirname -- "$ac_file" ||
20119 $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
20120 X"$ac_file" : 'X\(//\)[^/]' \| \
20121 X"$ac_file" : 'X\(//\)$' \| \
20122 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
20123 $as_echo X"$ac_file" |
20124 sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
20125 s//\1/
20126 q
20127 }
20128 /^X\(\/\/\)[^/].*/{
20129 s//\1/
20130 q
20131 }
20132 /^X\(\/\/\)$/{
20133 s//\1/
20134 q
20135 }
20136 /^X\(\/\).*/{
20137 s//\1/
20138 q
20139 }
20140 s/.*/./; q'`
20141 as_dir="$ac_dir"; as_fn_mkdir_p
20142 ac_builddir=.
20143
20144 case "$ac_dir" in
20145 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20146 *)
20147 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20148 # A ".." for each directory in $ac_dir_suffix.
20149 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20150 case $ac_top_builddir_sub in
20151 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20152 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20153 esac ;;
20154 esac
20155 ac_abs_top_builddir=$ac_pwd
20156 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20157 # for backward compatibility:
20158 ac_top_builddir=$ac_top_build_prefix
20159
20160 case $srcdir in
20161 .) # We are building in place.
20162 ac_srcdir=.
20163 ac_top_srcdir=$ac_top_builddir_sub
20164 ac_abs_top_srcdir=$ac_pwd ;;
20165 [\\/]* | ?:[\\/]* ) # Absolute name.
20166 ac_srcdir=$srcdir$ac_dir_suffix;
20167 ac_top_srcdir=$srcdir
20168 ac_abs_top_srcdir=$srcdir ;;
20169 *) # Relative name.
20170 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20171 ac_top_srcdir=$ac_top_build_prefix$srcdir
20172 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20173 esac
20174 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20175
20176
20177 case $ac_mode in
20178 :F)
20179 #
20180 # CONFIG_FILE
20181 #
20182
20183 case $INSTALL in
20184 [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
20185 *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;;
20186 esac
20187 _ACEOF
20188
20189 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20190 # If the template does not know about datarootdir, expand it.
20191 # FIXME: This hack should be removed a few years after 2.60.
20192 ac_datarootdir_hack=; ac_datarootdir_seen=
20193 ac_sed_dataroot='
20194 /datarootdir/ {
20195 p
20196 q
20197 }
20198 /@datadir@/p
20199 /@docdir@/p
20200 /@infodir@/p
20201 /@localedir@/p
20202 /@mandir@/p'
20203 case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
20204 *datarootdir*) ac_datarootdir_seen=yes;;
20205 *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
20206 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
20207 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
20208 _ACEOF
20209 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20210 ac_datarootdir_hack='
20211 s&@datadir@&$datadir&g
20212 s&@docdir@&$docdir&g
20213 s&@infodir@&$infodir&g
20214 s&@localedir@&$localedir&g
20215 s&@mandir@&$mandir&g
20216 s&\\\${datarootdir}&$datarootdir&g' ;;
20217 esac
20218 _ACEOF
20219
20220 # Neutralize VPATH when `$srcdir' = `.'.
20221 # Shell code in configure.ac might set extrasub.
20222 # FIXME: do we really want to maintain this feature?
20223 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
20224 ac_sed_extra="$ac_vpsub
20225 $extrasub
20226 _ACEOF
20227 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
20228 :t
20229 /@[a-zA-Z_][a-zA-Z_0-9]*@/!b
20230 s|@configure_input@|$ac_sed_conf_input|;t t
20231 s&@top_builddir@&$ac_top_builddir_sub&;t t
20232 s&@top_build_prefix@&$ac_top_build_prefix&;t t
20233 s&@srcdir@&$ac_srcdir&;t t
20234 s&@abs_srcdir@&$ac_abs_srcdir&;t t
20235 s&@top_srcdir@&$ac_top_srcdir&;t t
20236 s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
20237 s&@builddir@&$ac_builddir&;t t
20238 s&@abs_builddir@&$ac_abs_builddir&;t t
20239 s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
20240 s&@INSTALL@&$ac_INSTALL&;t t
20241 $ac_datarootdir_hack
20242 "
20243 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" |
20244 if $ac_cs_awk_getline; then
20245 $AWK -f "$ac_tmp/subs.awk"
20246 else
20247 $AWK -f "$ac_tmp/subs.awk" | $SHELL
20248 fi \
20249 >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20250
20251 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
20252 { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
20253 { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \
20254 "$ac_tmp/out"`; test -z "$ac_out"; } &&
20255 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20256 which seems to be undefined. Please make sure it is defined" >&5
20257 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
20258 which seems to be undefined. Please make sure it is defined" >&2;}
20259
20260 rm -f "$ac_tmp/stdin"
20261 case $ac_file in
20262 -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
20263 *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
20264 esac \
20265 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20266 ;;
20267 :H)
20268 #
20269 # CONFIG_HEADER
20270 #
20271 if test x"$ac_file" != x-; then
20272 {
20273 $as_echo "/* $configure_input */" \
20274 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs"
20275 } >"$ac_tmp/config.h" \
20276 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20277 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then
20278 { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5
20279 $as_echo "$as_me: $ac_file is unchanged" >&6;}
20280 else
20281 rm -f "$ac_file"
20282 mv "$ac_tmp/config.h" "$ac_file" \
20283 || as_fn_error $? "could not create $ac_file" "$LINENO" 5
20284 fi
20285 else
20286 $as_echo "/* $configure_input */" \
20287 && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \
20288 || as_fn_error $? "could not create -" "$LINENO" 5
20289 fi
20290 ;;
20291 :L)
20292 #
20293 # CONFIG_LINK
20294 #
20295
20296 if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
20297 :
20298 else
20299 # Prefer the file from the source tree if names are identical.
20300 if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
20301 ac_source=$srcdir/$ac_source
20302 fi
20303
20304 { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
20305 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
20306
20307 if test ! -r "$ac_source"; then
20308 as_fn_error $? "$ac_source: file not found" "$LINENO" 5
20309 fi
20310 rm -f "$ac_file"
20311
20312 # Try a relative symlink, then a hard link, then a copy.
20313 case $ac_source in
20314 [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
20315 *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
20316 esac
20317 ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
20318 ln "$ac_source" "$ac_file" 2>/dev/null ||
20319 cp -p "$ac_source" "$ac_file" ||
20320 as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
20321 fi
20322 ;;
20323 :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5
20324 $as_echo "$as_me: executing $ac_file commands" >&6;}
20325 ;;
20326 esac
20327
20328
20329 case $ac_file$ac_mode in
20330 "config.h":H) echo > stamp-h ;;
20331 "depdir":C) $SHELL $ac_aux_dir/mkinstalldirs $DEPDIR ;;
20332 "nm.h":L) echo > stamp-nmh ;;
20333 "gcore":F) chmod +x gcore ;;
20334
20335 esac
20336 done # for ac_tag
20337
20338
20339 as_fn_exit 0
20340 _ACEOF
20341 ac_clean_files=$ac_clean_files_save
20342
20343 test $ac_write_fail = 0 ||
20344 as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
20345
20346
20347 # configure is writing to config.log, and then calls config.status.
20348 # config.status does its own redirection, appending to config.log.
20349 # Unfortunately, on DOS this fails, as config.log is still kept open
20350 # by configure, so config.status won't be able to write to it; its
20351 # output is simply discarded. So we exec the FD to /dev/null,
20352 # effectively closing config.log, so it can be properly (re)opened and
20353 # appended to by config.status. When coming back to configure, we
20354 # need to make the FD available again.
20355 if test "$no_create" != yes; then
20356 ac_cs_success=:
20357 ac_config_status_args=
20358 test "$silent" = yes &&
20359 ac_config_status_args="$ac_config_status_args --quiet"
20360 exec 5>/dev/null
20361 $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
20362 exec 5>>config.log
20363 # Use ||, not &&, to avoid exiting from the if with $? = 1, which
20364 # would make configure fail if this is the last instruction.
20365 $ac_cs_success || as_fn_exit 1
20366 fi
20367
20368 #
20369 # CONFIG_SUBDIRS section.
20370 #
20371 if test "$no_recursion" != yes; then
20372
20373 # Remove --cache-file, --srcdir, and --disable-option-checking arguments
20374 # so they do not pile up.
20375 ac_sub_configure_args=
20376 ac_prev=
20377 eval "set x $ac_configure_args"
20378 shift
20379 for ac_arg
20380 do
20381 if test -n "$ac_prev"; then
20382 ac_prev=
20383 continue
20384 fi
20385 case $ac_arg in
20386 -cache-file | --cache-file | --cache-fil | --cache-fi \
20387 | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
20388 ac_prev=cache_file ;;
20389 -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
20390 | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
20391 | --c=*)
20392 ;;
20393 --config-cache | -C)
20394 ;;
20395 -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
20396 ac_prev=srcdir ;;
20397 -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
20398 ;;
20399 -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
20400 ac_prev=prefix ;;
20401 -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
20402 ;;
20403 --disable-option-checking)
20404 ;;
20405 *)
20406 case $ac_arg in
20407 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
20408 esac
20409 as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
20410 esac
20411 done
20412
20413 # Always prepend --prefix to ensure using the same prefix
20414 # in subdir configurations.
20415 ac_arg="--prefix=$prefix"
20416 case $ac_arg in
20417 *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
20418 esac
20419 ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
20420
20421 # Pass --silent
20422 if test "$silent" = yes; then
20423 ac_sub_configure_args="--silent $ac_sub_configure_args"
20424 fi
20425
20426 # Always prepend --disable-option-checking to silence warnings, since
20427 # different subdirs can have different --enable and --with options.
20428 ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
20429
20430 ac_popdir=`pwd`
20431 for ac_dir in : $subdirs; do test "x$ac_dir" = x: && continue
20432
20433 # Do not complain, so a configure script can configure whichever
20434 # parts of a large source tree are present.
20435 test -d "$srcdir/$ac_dir" || continue
20436
20437 ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
20438 $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
20439 $as_echo "$ac_msg" >&6
20440 as_dir="$ac_dir"; as_fn_mkdir_p
20441 ac_builddir=.
20442
20443 case "$ac_dir" in
20444 .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
20445 *)
20446 ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
20447 # A ".." for each directory in $ac_dir_suffix.
20448 ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
20449 case $ac_top_builddir_sub in
20450 "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
20451 *) ac_top_build_prefix=$ac_top_builddir_sub/ ;;
20452 esac ;;
20453 esac
20454 ac_abs_top_builddir=$ac_pwd
20455 ac_abs_builddir=$ac_pwd$ac_dir_suffix
20456 # for backward compatibility:
20457 ac_top_builddir=$ac_top_build_prefix
20458
20459 case $srcdir in
20460 .) # We are building in place.
20461 ac_srcdir=.
20462 ac_top_srcdir=$ac_top_builddir_sub
20463 ac_abs_top_srcdir=$ac_pwd ;;
20464 [\\/]* | ?:[\\/]* ) # Absolute name.
20465 ac_srcdir=$srcdir$ac_dir_suffix;
20466 ac_top_srcdir=$srcdir
20467 ac_abs_top_srcdir=$srcdir ;;
20468 *) # Relative name.
20469 ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
20470 ac_top_srcdir=$ac_top_build_prefix$srcdir
20471 ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
20472 esac
20473 ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
20474
20475
20476 cd "$ac_dir"
20477
20478 # Check for guested configure; otherwise get Cygnus style configure.
20479 if test -f "$ac_srcdir/configure.gnu"; then
20480 ac_sub_configure=$ac_srcdir/configure.gnu
20481 elif test -f "$ac_srcdir/configure"; then
20482 ac_sub_configure=$ac_srcdir/configure
20483 elif test -f "$ac_srcdir/configure.in"; then
20484 # This should be Cygnus configure.
20485 ac_sub_configure=$ac_aux_dir/configure
20486 else
20487 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: no configuration information is in $ac_dir" >&5
20488 $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2;}
20489 ac_sub_configure=
20490 fi
20491
20492 # The recursion is here.
20493 if test -n "$ac_sub_configure"; then
20494 # Make the cache file name correct relative to the subdirectory.
20495 case $cache_file in
20496 [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
20497 *) # Relative name.
20498 ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
20499 esac
20500
20501 { $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
20502 $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
20503 # The eval makes quoting arguments work.
20504 eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
20505 --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
20506 as_fn_error $? "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
20507 fi
20508
20509 cd "$ac_popdir"
20510 done
20511 fi
20512 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
20513 { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
20514 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
20515 fi
20516